summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/CodeEditor/modules
diff options
context:
space:
mode:
authorYaco <franco@reevo.org>2020-06-04 11:01:00 -0300
committerYaco <franco@reevo.org>2020-06-04 11:01:00 -0300
commitfc7369835258467bf97eb64f184b93691f9a9fd5 (patch)
treedaabd60089d2dd76d9f5fb416b005fbe159c799d /www/wiki/extensions/CodeEditor/modules
first commit
Diffstat (limited to 'www/wiki/extensions/CodeEditor/modules')
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/LICENSE24
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ace.js20199
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ext-beautify.js334
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ext-elastic_tabstops_lite.js274
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ext-emmet.js1223
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ext-error_marker.js6
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ext-keybinding_menu.js170
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ext-language_tools.js1956
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ext-linking.js61
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ext-modelist.js209
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ext-searchbox.js508
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ext-settings_menu.js663
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ext-spellcheck.js71
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ext-split.js246
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ext-static_highlight.js161
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ext-statusbar.js53
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ext-textarea.js560
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ext-themelist.js62
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/ext-whitespace.js206
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/keybinding-emacs.js1181
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/keybinding-vim.js5598
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-abap.js214
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-abc.js261
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-actionscript.js267
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-ada.js87
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-apache_conf.js356
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-applescript.js271
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-asciidoc.js342
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-assembly_x86.js186
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-autohotkey.js235
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-batchfile.js223
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-bro.js327
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-c9search.js287
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-c_cpp.js487
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-cirru.js203
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-clojure.js307
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-cobol.js94
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-coffee.js392
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-coldfusion.js2567
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-csharp.js495
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-css.js699
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-curly.js2535
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-d.js513
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-dart.js689
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-diff.js139
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-django.js2565
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-dockerfile.js492
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-dot.js410
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-drools.js457
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-eiffel.js128
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-ejs.js2999
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-elixir.js494
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-elm.js299
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-erlang.js1002
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-forth.js290
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-fortran.js423
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-ftl.js1182
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-gcode.js86
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-gherkin.js163
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-gitignore.js52
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-glsl.js564
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-gobstones.js922
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-golang.js406
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-graphqlschema.js206
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-groovy.js980
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-haml.js1547
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-handlebars.js2593
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-haskell.js372
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-haskell_cabal.js134
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-haxe.js379
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-hjson.js346
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-html.js2480
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-html_elixir.js3059
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-html_ruby.js3016
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-ini.js155
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-io.js246
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-jack.js339
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-jade.js2129
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-java.js935
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-javascript.js789
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-json.js319
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-jsoniq.js2619
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-jsp.js1388
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-jsx.js404
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-julia.js296
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-kotlin.js786
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-latex.js289
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-less.js819
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-liquid.js1184
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-lisp.js105
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-livescript.js271
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-logiql.js310
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-lsl.js335
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-lua.js424
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-luapage.js2978
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-lucene.js70
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-makefile.js404
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-markdown.js2865
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-mask.js1786
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-matlab.js256
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-maze.js284
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-mel.js256
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-mushcode.js674
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-mysql.js160
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-nix.js631
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-nsis.js305
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-objectivec.js725
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-ocaml.js414
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-pascal.js198
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-perl.js373
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-pgsql.js1500
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-php.js12856
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-pig.js303
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-plain_text.js25
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-powershell.js411
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-praat.js468
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-prolog.js364
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-properties.js73
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-protobuf.js577
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-python.js265
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-r.js301
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-razor.js2845
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-rdoc.js236
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-rhtml.js2779
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-rst.js249
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-ruby.js491
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-rust.js272
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-sass.js434
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-scad.js407
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-scala.js975
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-scheme.js225
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-scss.js586
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-sh.js441
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-sjs.js1006
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-smarty.js2606
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-snippets.js199
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-soy_template.js2819
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-space.js160
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-sparql.js313
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-sql.js103
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-sqlserver.js437
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-stylus.js462
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-svg.js1568
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-swift.js382
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-tcl.js376
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-tex.js152
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-text.js1
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-textile.js142
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-toml.js146
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-tsx.js891
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-turtle.js289
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-twig.js2664
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-typescript.js872
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-vala.js669
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-vbscript.js199
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-velocity.js2762
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-verilog.js104
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-vhdl.js110
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-wollok.js905
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-xml.js664
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-xquery.js2631
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/mode-yaml.js289
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/abap.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/abc.js38
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/actionscript.js164
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/ada.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/apache_conf.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/applescript.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/asciidoc.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/assembly_x86.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/autohotkey.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/batchfile.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/bro.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/c9search.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/c_cpp.js138
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/cirru.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/clojure.js97
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/cobol.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/coffee.js102
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/coldfusion.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/csharp.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/css.js974
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/curly.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/d.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/dart.js90
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/diff.js18
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/django.js115
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/dockerfile.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/dot.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/drools.js26
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/eiffel.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/ejs.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/elixir.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/elm.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/erlang.js167
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/forth.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/fortran.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/ftl.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/gcode.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/gherkin.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/gitignore.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/glsl.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/gobstones.js41
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/golang.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/graphqlschema.js39
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/groovy.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/haml.js27
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/handlebars.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/haskell.js89
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/haskell_cabal.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/haxe.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/hjson.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/html.js862
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/html_elixir.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/html_ruby.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/ini.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/io.js69
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/jack.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/jade.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/java.js247
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/javascript.js202
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/json.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/jsoniq.js68
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/jsp.js106
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/jsx.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/julia.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/kotlin.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/latex.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/less.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/liquid.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/lisp.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/livescript.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/logiql.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/lsl.js1239
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/lua.js28
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/luapage.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/lucene.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/makefile.js11
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/markdown.js95
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/mask.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/matlab.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/maze.js16
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/mel.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/mushcode.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/mysql.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/nix.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/nsis.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/objectivec.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/ocaml.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/pascal.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/perl.js354
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/pgsql.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/php.js384
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/pig.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/plain_text.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/powershell.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/praat.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/prolog.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/properties.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/protobuf.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/python.js165
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/r.js128
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/razor.js10
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/rdoc.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/rhtml.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/rst.js29
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/ruby.js935
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/rust.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/sass.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/scad.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/scala.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/scheme.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/scss.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/sh.js90
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/sjs.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/smarty.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/snippets.js16
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/soy_template.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/space.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/sparql.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/sql.js33
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/sqlserver.js76
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/stylus.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/svg.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/swift.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/tcl.js99
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/tex.js197
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/text.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/textile.js37
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/toml.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/tsx.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/turtle.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/twig.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/typescript.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/vala.js193
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/vbscript.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/velocity.js36
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/verilog.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/vhdl.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/wollok.js91
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/xml.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/xquery.js68
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/snippets/yaml.js7
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-ambiance.js182
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-chaos.js156
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-chrome.js128
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-clouds.js95
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-clouds_midnight.js96
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-cobalt.js113
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-crimson_editor.js118
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-dawn.js108
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-dreamweaver.js141
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-eclipse.js98
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-github.js103
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-gob.js112
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-gruvbox.js82
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-idle_fingers.js96
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-iplastic.js121
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-katzenmilch.js121
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-kr_theme.js104
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-kuroir.js61
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-merbivore.js95
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-merbivore_soft.js96
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-mono_industrial.js107
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-monokai.js105
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-pastel_on_dark.js108
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-solarized_dark.js88
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-solarized_light.js91
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-sqlserver.js138
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-terminal.js114
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-textmate.js129
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow.js108
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow_night.js108
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow_night_blue.js106
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow_night_bright.js121
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow_night_eighties.js108
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-twilight.js109
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-vibrant_ink.js94
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/theme-xcode.js88
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/worker-coffee.js2157
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/worker-css.js8761
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/worker-html.js11605
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/worker-javascript.js12528
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/worker-json.js2396
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/worker-lua.js3632
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/worker-php.js4302
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/worker-xml.js3887
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ace/worker-xquery.js58351
-rw-r--r--www/wiki/extensions/CodeEditor/modules/ext.codeEditor.js36
-rw-r--r--www/wiki/extensions/CodeEditor/modules/jquery.codeEditor.js851
-rw-r--r--www/wiki/extensions/CodeEditor/modules/jquery.codeEditor.less75
351 files changed, 272729 insertions, 0 deletions
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/LICENSE b/www/wiki/extensions/CodeEditor/modules/ace/LICENSE
new file mode 100644
index 00000000..4760be2a
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/LICENSE
@@ -0,0 +1,24 @@
+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.
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ace.js b/www/wiki/extensions/CodeEditor/modules/ace/ace.js
new file mode 100644
index 00000000..068debb2
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ace.js
@@ -0,0 +1,20199 @@
+/* ***** 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 ***** */
+
+/**
+ * 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 (!global && typeof window != "undefined") global = window; // strict mode
+
+
+if (!ACE_NAMESPACE && typeof requirejs !== "undefined")
+ return;
+
+
+var define = function(module, deps, payload) {
+ if (typeof module !== "string") {
+ if (define.original)
+ define.original.apply(this, arguments);
+ else {
+ console.error("dropping module because define wasn\'t a string.");
+ console.trace();
+ }
+ return;
+ }
+ if (arguments.length == 2)
+ payload = deps;
+ if (!define.modules[module]) {
+ define.payloads[module] = payload;
+ define.modules[module] = null;
+ }
+};
+
+define.modules = {};
+define.payloads = {};
+
+/**
+ * Get at functionality define()ed using the function above
+ */
+var _require = function(parentId, module, callback) {
+ if (typeof module === "string") {
+ var payload = lookup(parentId, module);
+ if (payload != undefined) {
+ callback && callback();
+ return payload;
+ }
+ } else 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 == undefined && require.original)
+ return;
+ params.push(dep);
+ }
+ return callback && callback.apply(null, params) || true;
+ }
+};
+
+var require = function(module, callback) {
+ var packagedModule = _require("", module, callback);
+ if (packagedModule == undefined && require.original)
+ return require.original.apply(this, arguments);
+ return packagedModule;
+};
+
+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) {
+ module = define.payloads[moduleName];
+ 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;
+ delete define.payloads[moduleName];
+ }
+ module = define.modules[moduleName] = exports || module;
+ }
+ return module;
+};
+
+function exportAce(ns) {
+ 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/lib/regexp",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+ 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) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ 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 ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ 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, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ 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("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ 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("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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 || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+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, "");
+ };
+}
+
+function toInteger(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;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
+
+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");
+
+});
+
+ace.define("ace/lib/dom",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var XHTML_NS = "http://www.w3.org/1999/xhtml";
+
+exports.getDocumentHead = function(doc) {
+ if (!doc)
+ doc = document;
+ return doc.head || doc.getElementsByTagName("head")[0] || doc.documentElement;
+}
+
+exports.createElement = function(tag, ns) {
+ return document.createElementNS ?
+ document.createElementNS(ns || XHTML_NS, tag) :
+ document.createElement(tag);
+};
+
+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 (id)
+ cssText += "\n/*# sourceURL=ace/css/" + id + " */";
+
+ if (doc.createStyleSheet) {
+ style = doc.createStyleSheet();
+ style.cssText = cssText;
+ if (id)
+ style.owningElement.id = id;
+ } else {
+ style = exports.createElement("style");
+ style.appendChild(doc.createTextNode(cssText));
+ if (id)
+ style.id = id;
+
+ exports.getDocumentHead(doc).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;
+
+ exports.getDocumentHead(doc).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
+ );
+};
+
+exports.scrollbarWidth = function(document) {
+ var inner = exports.createElement("ace_inner");
+ inner.style.width = "100%";
+ inner.style.minWidth = "0px";
+ inner.style.height = "200px";
+ inner.style.display = "block";
+
+ var outer = exports.createElement("ace_outer");
+ var style = outer.style;
+
+ style.position = "absolute";
+ style.left = "-10000px";
+ style.overflow = "hidden";
+ style.width = "200px";
+ style.minWidth = "0px";
+ style.height = "150px";
+ style.display = "block";
+
+ outer.appendChild(inner);
+
+ var 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;
+};
+
+if (typeof document == "undefined") {
+ exports.importCssString = function() {};
+ return;
+}
+
+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.setInnerHtml = function(el, innerHtml) {
+ var element = el.cloneNode(false);//document.createElement("div");
+ element.innerHTML = innerHtml;
+ el.parentNode.replaceChild(element, el);
+ return element;
+};
+
+if ("textContent" in document.documentElement) {
+ exports.setInnerText = function(el, innerText) {
+ el.textContent = innerText;
+ };
+
+ exports.getInnerText = function(el) {
+ return el.textContent;
+ };
+}
+else {
+ exports.setInnerText = function(el, innerText) {
+ el.innerText = innerText;
+ };
+
+ exports.getInnerText = function(el) {
+ return el.innerText;
+ };
+}
+
+exports.getParentWindow = function(document) {
+ return document.defaultView || document.parentWindow;
+};
+
+});
+
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"], function(require, exports, module) {
+"use strict";
+
+require("./fixoldbrowsers");
+
+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,
+ "super": 8, "meta": 8, "command": 8, "cmd": 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",
+ '-13': "NumpadEnter",
+ 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: '.',
+ 186: ';', 187: '=', 188: ',', 189: '-', 190: '.', 191: '/', 192: '`',
+ 219: '[', 220: '\\',221: ']', 222: "'", 111: '/', 106: '*'
+ }
+ };
+ var name, i;
+ for (i in ret.FUNCTION_KEYS) {
+ name = ret.FUNCTION_KEYS[i].toLowerCase();
+ ret[name] = parseInt(i, 10);
+ }
+ for (i in ret.PRINTABLE_KEYS) {
+ name = ret.PRINTABLE_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] = '-';
+
+ (function() {
+ var mods = ["cmd", "ctrl", "alt", "shift"];
+ for (var i = Math.pow(2, mods.length); i--;) {
+ ret.KEY_MODS[i] = mods.filter(function(x) {
+ return i & ret.KEY_MODS[x];
+ }).join("-") + "-";
+ }
+ })();
+
+ ret.KEY_MODS[0] = "";
+ ret.KEY_MODS[-1] = "input-";
+
+ return ret;
+})();
+oop.mixin(exports, Keys);
+
+exports.keyCodeToString = function(keyCode) {
+ var keyString = Keys[keyCode];
+ if (typeof keyString != "string")
+ keyString = String.fromCharCode(keyCode);
+ return keyString.toLowerCase();
+};
+
+});
+
+ace.define("ace/lib/useragent",["require","exports","module"], function(require, exports, module) {
+"use strict";
+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((ua.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1])
+ : parseFloat((ua.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]); // for ie
+
+exports.isOldIE = exports.isIE && exports.isIE < 9;
+exports.isGecko = exports.isMozilla = (window.Controllers || window.controllers) && window.navigator.product === "Gecko";
+exports.isOldGecko = exports.isGecko && parseInt((ua.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.isChromeOS = ua.indexOf(" CrOS ") >= 0;
+
+exports.isIOS = /iPad|iPhone|iPod/.test(ua) && !window.MSStream;
+
+if (exports.isIOS) exports.isMac = true;
+
+});
+
+ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) {
+"use strict";
+
+var keys = require("./keys");
+var useragent = require("./useragent");
+
+var pressedKeys = null;
+var ts = 0;
+
+exports.addListener = function(elem, type, callback) {
+ if (elem.addEventListener) {
+ return elem.addEventListener(type, callback, false);
+ }
+ if (elem.attachEvent) {
+ var wrapper = function() {
+ callback.call(elem, 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" || (useragent.isMac && (e.ctrlKey && !e.altKey && !e.shiftKey)))
+ return 2;
+ if (e.preventDefault) {
+ return e.button;
+ }
+ else {
+ return {1:0, 2:2, 4:1}[e.button];
+ }
+};
+
+exports.capture = function(el, eventHandler, releaseCaptureHandler) {
+ function onMouseUp(e) {
+ eventHandler && eventHandler(e);
+ releaseCaptureHandler && releaseCaptureHandler(e);
+
+ exports.removeListener(document, "mousemove", eventHandler, true);
+ exports.removeListener(document, "mouseup", onMouseUp, true);
+ exports.removeListener(document, "dragstart", onMouseUp, true);
+ }
+
+ exports.addListener(document, "mousemove", eventHandler, true);
+ exports.addListener(document, "mouseup", onMouseUp, true);
+ exports.addListener(document, "dragstart", onMouseUp, true);
+
+ return onMouseUp;
+};
+
+exports.addTouchMoveListener = function (el, callback) {
+ if ("ontouchmove" in el) {
+ var startx, starty;
+ exports.addListener(el, "touchstart", function (e) {
+ var touchObj = e.changedTouches[0];
+ startx = touchObj.clientX;
+ starty = touchObj.clientY;
+ });
+ exports.addListener(el, "touchmove", function (e) {
+ var factor = 1,
+ touchObj = e.changedTouches[0];
+
+ e.wheelX = -(touchObj.clientX - startx) / factor;
+ e.wheelY = -(touchObj.clientY - starty) / factor;
+
+ startx = touchObj.clientX;
+ starty = touchObj.clientY;
+
+ callback(e);
+ });
+ }
+};
+
+exports.addMouseWheelListener = function(el, callback) {
+ if ("onmousewheel" in el) {
+ exports.addListener(el, "mousewheel", function(e) {
+ 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;
+ }
+ callback(e);
+ });
+ } else if ("onwheel" in el) {
+ exports.addListener(el, "wheel", function(e) {
+ var factor = 0.35;
+ switch (e.deltaMode) {
+ case e.DOM_DELTA_PIXEL:
+ e.wheelX = e.deltaX * factor || 0;
+ e.wheelY = e.deltaY * factor || 0;
+ break;
+ case e.DOM_DELTA_LINE:
+ case e.DOM_DELTA_PAGE:
+ e.wheelX = (e.deltaX || 0) * 5;
+ e.wheelY = (e.deltaY || 0) * 5;
+ break;
+ }
+
+ callback(e);
+ });
+ } else {
+ exports.addListener(el, "DOMMouseScroll", function(e) {
+ 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.addMultiMouseDownListener = function(elements, timeouts, eventHandler, callbackName) {
+ var clicks = 0;
+ var startX, startY, timer;
+ var eventNames = {
+ 2: "dblclick",
+ 3: "tripleclick",
+ 4: "quadclick"
+ };
+
+ function onMousedown(e) {
+ if (exports.getButton(e) !== 0) {
+ clicks = 0;
+ } else if (e.detail > 1) {
+ clicks++;
+ if (clicks > 4)
+ clicks = 1;
+ } else {
+ clicks = 1;
+ }
+ if (useragent.isIE) {
+ var isNewClick = Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5;
+ if (!timer || isNewClick)
+ clicks = 1;
+ if (timer)
+ clearTimeout(timer);
+ timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600);
+
+ if (clicks == 1) {
+ startX = e.clientX;
+ startY = e.clientY;
+ }
+ }
+
+ e._clicks = clicks;
+
+ eventHandler[callbackName]("mousedown", e);
+
+ if (clicks > 4)
+ clicks = 0;
+ else if (clicks > 1)
+ return eventHandler[callbackName](eventNames[clicks], e);
+ }
+ function onDblclick(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);
+ }
+ if (!Array.isArray(elements))
+ elements = [elements];
+ elements.forEach(function(el) {
+ exports.addListener(el, "mousedown", onMousedown);
+ if (useragent.isOldIE)
+ exports.addListener(el, "dblclick", onDblclick);
+ });
+};
+
+var getModifierHash = useragent.isMac && useragent.isOpera && !("KeyboardEvent" in window)
+ ? function(e) {
+ return 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0);
+ }
+ : function(e) {
+ return 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0);
+ };
+
+exports.getModifierString = function(e) {
+ return keys.KEY_MODS[getModifierHash(e)];
+};
+
+function normalizeCommandKeys(callback, e, keyCode) {
+ var hashId = getModifierHash(e);
+
+ if (!useragent.isMac && pressedKeys) {
+ if (e.getModifierState && (e.getModifierState("OS") || e.getModifierState("Win")))
+ hashId |= 8;
+ if (pressedKeys.altGr) {
+ if ((3 & hashId) != 3)
+ pressedKeys.altGr = 0;
+ else
+ return;
+ }
+ if (keyCode === 18 || keyCode === 17) {
+ var location = "location" in e ? e.location : e.keyLocation;
+ if (keyCode === 17 && location === 1) {
+ if (pressedKeys[keyCode] == 1)
+ ts = e.timeStamp;
+ } else if (keyCode === 18 && hashId === 3 && location === 2) {
+ var dt = e.timeStamp - ts;
+ if (dt < 50)
+ pressedKeys.altGr = true;
+ }
+ }
+ }
+
+ if (keyCode in keys.MODIFIER_KEYS) {
+ keyCode = -1;
+ }
+ if (hashId & 8 && (keyCode >= 91 && keyCode <= 93)) {
+ keyCode = -1;
+ }
+
+ if (!hashId && keyCode === 13) {
+ var location = "location" in e ? e.location : e.keyLocation;
+ if (location === 3) {
+ callback(e, hashId, -keyCode);
+ if (e.defaultPrevented)
+ return;
+ }
+ }
+
+ if (useragent.isChromeOS && hashId & 8) {
+ callback(e, hashId, keyCode);
+ if (e.defaultPrevented)
+ return;
+ else
+ hashId &= ~8;
+ }
+ 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 lastDefaultPrevented = null;
+
+ addListener(el, "keydown", function(e) {
+ pressedKeys[e.keyCode] = (pressedKeys[e.keyCode] || 0) + 1;
+ var result = normalizeCommandKeys(callback, e, e.keyCode);
+ lastDefaultPrevented = e.defaultPrevented;
+ return result;
+ });
+
+ addListener(el, "keypress", function(e) {
+ if (lastDefaultPrevented && (e.ctrlKey || e.altKey || e.shiftKey || e.metaKey)) {
+ exports.stopEvent(e);
+ lastDefaultPrevented = null;
+ }
+ });
+
+ addListener(el, "keyup", function(e) {
+ pressedKeys[e.keyCode] = null;
+ });
+
+ if (!pressedKeys) {
+ resetPressedKeys();
+ addListener(window, "focus", resetPressedKeys);
+ }
+ }
+};
+function resetPressedKeys() {
+ pressedKeys = Object.create(null);
+}
+
+if (typeof window == "object" && 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 = typeof window == "object" && (window.requestAnimationFrame
+ || window.mozRequestAnimationFrame
+ || window.webkitRequestAnimationFrame
+ || window.msRequestAnimationFrame
+ || window.oRequestAnimationFrame);
+
+if (exports.nextFrame)
+ exports.nextFrame = exports.nextFrame.bind(window);
+else
+ exports.nextFrame = function(callback) {
+ setTimeout(callback, 17);
+ };
+});
+
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.last = function(a) {
+ return a[a.length - 1];
+};
+
+exports.stringReverse = function(string) {
+ return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+ var result = '';
+ while (count > 0) {
+ if (count & 1)
+ result += string;
+
+ if (count >>= 1)
+ string += string;
+ }
+ return result;
+};
+
+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 deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
+ return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
+ }
+ if (Object.prototype.toString.call(obj) !== "[object Object]")
+ return obj;
+
+ copy = {};
+ for (var key in obj)
+ copy[key] = deepCopy(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;
+ };
+
+ deferred.isPending = function() {
+ return timer;
+ };
+
+ return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+ _self.schedule = _self;
+
+ _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_ios",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/lib/keys"], function(require, exports, module) {
+"use strict";
+
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+var dom = require("../lib/dom");
+var lang = require("../lib/lang");
+var KEYS = require("../lib/keys");
+var MODS = KEYS.KEY_MODS;
+var BROKEN_SETDATA = useragent.isChrome < 18;
+var USE_IE_MIME_TYPE = useragent.isIE;
+
+var TextInput = function(parentNode, host) {
+ var self = this;
+ var text = dom.createElement("textarea");
+ text.className = useragent.isIOS ? "ace_text-input ace_text-input-ios" : "ace_text-input";
+
+ if (useragent.isTouchPad)
+ text.setAttribute("x-palm-disable-auto-cap", true);
+
+ text.setAttribute("wrap", "off");
+ text.setAttribute("autocorrect", "off");
+ text.setAttribute("autocapitalize", "off");
+ text.setAttribute("spellcheck", false);
+
+ text.style.opacity = "0";
+ parentNode.insertBefore(text, parentNode.firstChild);
+
+ var PLACEHOLDER = "\n aaaa a\n";
+
+ var copied = false;
+ var cut = false;
+ var pasted = false;
+ var inComposition = false;
+ var tempStyle = '';
+ var isSelectionEmpty = true;
+ try { var isFocused = document.activeElement === text; } catch(e) {}
+
+ event.addListener(text, "blur", function(e) {
+ host.onBlur(e);
+ isFocused = false;
+ });
+ event.addListener(text, "focus", function(e) {
+ isFocused = true;
+ host.onFocus(e);
+ resetSelection();
+ });
+ this.focus = function() {
+ if (tempStyle) return text.focus();
+ text.style.position = "fixed";
+ 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 (!inComposition) {
+ text.value = PLACEHOLDER;
+ isFocused && resetSelection();
+ }
+ });
+
+ function resetSelection(isEmpty) {
+ if (inComposition)
+ return;
+ inComposition = true;
+
+ if (inputHandler) {
+ selectionStart = 0;
+ selectionEnd = isEmpty ? 0 : text.value.length - 1;
+ } else {
+ var selectionStart = 4;
+ var selectionEnd = 5;
+ }
+ try {
+ text.setSelectionRange(selectionStart, selectionEnd);
+ } catch(e) {}
+
+ inComposition = false;
+ }
+
+ function resetValue() {
+ if (inComposition)
+ 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;
+ };
+
+ var onSelect = function(e) {
+ if (isAllSelected(text)) {
+ host.selectAll();
+ resetSelection();
+ } else if (inputHandler) {
+ resetSelection(host.selection.isEmpty());
+ }
+ };
+
+ var inputHandler = null;
+ this.setInputHandler = function(cb) {inputHandler = cb};
+ this.getInputHandler = function() {return inputHandler};
+ var afterContextMenu = false;
+
+ var sendText = function(data) {
+ if (text.selectionStart === 4 && text.selectionEnd === 5) {
+ return;
+ }
+ if (inputHandler) {
+ data = inputHandler(data);
+ inputHandler = null;
+ }
+ if (pasted) {
+ resetSelection();
+ if (data)
+ host.onPaste(data);
+ pasted = false;
+ } else if (data == PLACEHOLDER.substr(0) && text.selectionStart === 4) {
+ if (afterContextMenu)
+ host.execCommand("del", {source: "ace"});
+ else // some versions of android do not fire keydown when pressing backspace
+ host.execCommand("backspace", {source: "ace"});
+ } else if (!copied) {
+ if (data.substring(0, 9) == PLACEHOLDER && data.length > PLACEHOLDER.length)
+ data = data.substr(9);
+ else if (data.substr(0, 4) == PLACEHOLDER.substr(0, 4))
+ data = data.substr(4, data.length - PLACEHOLDER.length + 1);
+ else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))
+ data = data.slice(0, -1);
+ if (data == PLACEHOLDER.charAt(0)) {
+ } else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))
+ data = data.slice(0, -1);
+
+ if (data)
+ host.onTextInput(data);
+ }
+ if (copied) {
+ copied = false;
+ }
+ if (afterContextMenu)
+ afterContextMenu = false;
+ };
+ var onInput = function(e) {
+ if (inComposition)
+ return;
+ var data = text.value;
+ sendText(data);
+ resetValue();
+ };
+
+ var handleClipboardData = function(e, data, forceIEMime) {
+ var clipboardData = e.clipboardData || window.clipboardData;
+ if (!clipboardData || BROKEN_SETDATA)
+ return;
+ var mime = USE_IE_MIME_TYPE || forceIEMime ? "Text" : "text/plain";
+ try {
+ if (data) {
+ return clipboardData.setData(mime, data) !== false;
+ } else {
+ return clipboardData.getData(mime);
+ }
+ } catch(e) {
+ if (!forceIEMime)
+ return handleClipboardData(e, data, true);
+ }
+ };
+
+ var doCopy = function(e, isCut) {
+ var data = host.getCopyText();
+ if (!data)
+ return event.preventDefault(e);
+
+ if (handleClipboardData(e, data)) {
+ if (useragent.isIOS) {
+ cut = isCut;
+ text.value = "\n aa" + data + "a a\n";
+ text.setSelectionRange(4, 4 + data.length);
+ copied = {
+ value: data
+ };
+ }
+ isCut ? host.onCut() : host.onCopy();
+ if (!useragent.isIOS) event.preventDefault(e);
+ } else {
+ copied = true;
+ text.value = data;
+ text.select();
+ setTimeout(function(){
+ copied = false;
+ resetValue();
+ resetSelection();
+ isCut ? host.onCut() : host.onCopy();
+ });
+ }
+ };
+
+ var onCut = function(e) {
+ doCopy(e, true);
+ };
+
+ var onCopy = function(e) {
+ doCopy(e, false);
+ };
+
+ var onPaste = function(e) {
+ var data = handleClipboardData(e);
+ if (typeof data == "string") {
+ if (data)
+ host.onPaste(data, e);
+ 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);
+ var onCompositionStart = function(e) {
+ if (inComposition || !host.onCompositionStart || host.$readOnly)
+ return;
+ inComposition = {};
+ inComposition.canUndo = host.session.$undoManager;
+ host.onCompositionStart();
+ setTimeout(onCompositionUpdate, 0);
+ host.on("mousedown", onCompositionEnd);
+ if (inComposition.canUndo && !host.selection.isEmpty()) {
+ host.insert("");
+ host.session.markUndoGroup();
+ host.selection.clearSelection();
+ }
+ host.session.markUndoGroup();
+ };
+
+ var onCompositionUpdate = function() {
+ if (!inComposition || !host.onCompositionUpdate || host.$readOnly)
+ return;
+ var val = text.value.replace(/\x01/g, "");
+ if (inComposition.lastValue === val) return;
+
+ host.onCompositionUpdate(val);
+ if (inComposition.lastValue)
+ host.undo();
+ if (inComposition.canUndo)
+ inComposition.lastValue = val;
+ if (inComposition.lastValue) {
+ var r = host.selection.getRange();
+ host.insert(inComposition.lastValue);
+ host.session.markUndoGroup();
+ inComposition.range = host.selection.getRange();
+ host.selection.setRange(r);
+ host.selection.clearSelection();
+ }
+ };
+
+ var onCompositionEnd = function(e) {
+ if (!host.onCompositionEnd || host.$readOnly) return;
+ var c = inComposition;
+ inComposition = false;
+ var timer = setTimeout(function() {
+ timer = null;
+ var str = text.value.replace(/\x01/g, "");
+ if (inComposition)
+ return;
+ else if (str == c.lastValue)
+ resetValue();
+ else if (!c.lastValue && str) {
+ resetValue();
+ sendText(str);
+ }
+ });
+ inputHandler = function compositionInputHandler(str) {
+ if (timer)
+ clearTimeout(timer);
+ str = str.replace(/\x01/g, "");
+ if (str == c.lastValue)
+ return "";
+ if (c.lastValue && timer)
+ host.undo();
+ return str;
+ };
+ host.onCompositionEnd();
+ host.removeListener("mousedown", onCompositionEnd);
+ if (e.type == "compositionend" && c.range) {
+ host.selection.setRange(c.range);
+ }
+ var needsOnInput =
+ (!!useragent.isChrome && useragent.isChrome >= 53) ||
+ (!!useragent.isWebKit && useragent.isWebKit >= 603);
+
+ if (needsOnInput) {
+ onInput();
+ }
+ };
+
+
+
+ var syncComposition = lang.delayedCall(onCompositionUpdate, 50);
+
+ event.addListener(text, "compositionstart", onCompositionStart);
+ if (useragent.isGecko) {
+ event.addListener(text, "text", function(){syncComposition.schedule()});
+ } else {
+ event.addListener(text, "keyup", function(){syncComposition.schedule()});
+ event.addListener(text, "keydown", function(){syncComposition.schedule()});
+ }
+ event.addListener(text, "compositionend", onCompositionEnd);
+
+ this.getElement = function() {
+ return text;
+ };
+
+ this.setReadOnly = function(readOnly) {
+ text.readOnly = readOnly;
+ };
+
+ this.onContextMenu = function(e) {
+ afterContextMenu = true;
+ resetSelection(host.selection.isEmpty());
+ host._emit("nativecontextmenu", {target: host, domEvent: e});
+ this.moveToMouse(e, true);
+ };
+
+ this.moveToMouse = function(e, bringToFront) {
+ if (!tempStyle)
+ tempStyle = text.style.cssText;
+ text.style.cssText = (bringToFront ? "z-index:100000;" : "")
+ + "height:" + text.style.height + ";"
+ + (useragent.isIE ? "opacity:0.1;" : "");
+
+ var rect = host.container.getBoundingClientRect();
+ var style = dom.computedStyle(host.container);
+ var top = rect.top + (parseInt(style.borderTopWidth) || 0);
+ var left = rect.left + (parseInt(rect.borderLeftWidth) || 0);
+ var maxTop = rect.bottom - top - text.clientHeight -2;
+ var move = function(e) {
+ text.style.left = e.clientX - left - 2 + "px";
+ text.style.top = Math.min(e.clientY - top - 2, maxTop) + "px";
+ };
+ move(e);
+
+ if (e.type != "mousedown")
+ return;
+
+ if (host.renderer.$keepTextAreaAtCursor)
+ host.renderer.$keepTextAreaAtCursor = null;
+
+ clearTimeout(closeTimeout);
+ if (useragent.isWin)
+ event.capture(host.container, move, onContextMenuClose);
+ };
+
+ this.onContextMenuClose = onContextMenuClose;
+ var closeTimeout;
+ function onContextMenuClose() {
+ clearTimeout(closeTimeout);
+ closeTimeout = setTimeout(function () {
+ if (tempStyle) {
+ text.style.cssText = tempStyle;
+ tempStyle = '';
+ }
+ if (host.renderer.$keepTextAreaAtCursor == null) {
+ host.renderer.$keepTextAreaAtCursor = true;
+ host.renderer.$moveTextAreaToCursor();
+ }
+ }, 0);
+ }
+
+ var onContextMenu = function(e) {
+ host.textInput.onContextMenu(e);
+ onContextMenuClose();
+ };
+ event.addListener(text, "mouseup", onContextMenu);
+ event.addListener(text, "mousedown", function(e) {
+ e.preventDefault();
+ onContextMenuClose();
+ });
+ event.addListener(host.renderer.scroller, "contextmenu", onContextMenu);
+ event.addListener(text, "contextmenu", onContextMenu);
+
+ if (useragent.isIOS) {
+ var typingResetTimeout = null;
+ var typing = false;
+
+ parentNode.addEventListener("keydown", function (e) {
+ if (typingResetTimeout) clearTimeout(typingResetTimeout);
+ typing = true;
+ });
+
+ parentNode.addEventListener("keyup", function (e) {
+ typingResetTimeout = setTimeout(function () {
+ typing = false;
+ }, 100);
+ });
+ var detectArrowKeys = function(e) {
+ if (document.activeElement !== text) return;
+ if (typing) return;
+
+ if (cut) {
+ return setTimeout(function () {
+ cut = false;
+ }, 100);
+ }
+ var selectionStart = text.selectionStart;
+ var selectionEnd = text.selectionEnd;
+ text.setSelectionRange(4, 5);
+ if (selectionStart == selectionEnd) {
+ switch (selectionStart) {
+ case 0: host.onCommandKey(null, 0, KEYS.up); break;
+ case 1: host.onCommandKey(null, 0, KEYS.home); break;
+ case 2: host.onCommandKey(null, MODS.option, KEYS.left); break;
+ case 4: host.onCommandKey(null, 0, KEYS.left); break;
+ case 5: host.onCommandKey(null, 0, KEYS.right); break;
+ case 7: host.onCommandKey(null, MODS.option, KEYS.right); break;
+ case 8: host.onCommandKey(null, 0, KEYS.end); break;
+ case 9: host.onCommandKey(null, 0, KEYS.down); break;
+ }
+ } else {
+ switch (selectionEnd) {
+ case 6: host.onCommandKey(null, MODS.shift, KEYS.right); break;
+ case 7: host.onCommandKey(null, MODS.shift | MODS.option, KEYS.right); break;
+ case 8: host.onCommandKey(null, MODS.shift, KEYS.end); break;
+ case 9: host.onCommandKey(null, MODS.shift, KEYS.down); break;
+ }
+ switch (selectionStart) {
+ case 0: host.onCommandKey(null, MODS.shift, KEYS.up); break;
+ case 1: host.onCommandKey(null, MODS.shift, KEYS.home); break;
+ case 2: host.onCommandKey(null, MODS.shift | MODS.option, KEYS.left); break;
+ case 3: host.onCommandKey(null, MODS.shift, KEYS.left); break;
+ }
+ }
+ }
+ document.addEventListener("selectionchange", detectArrowKeys);
+ host.on("destroy", function() {
+ document.removeEventListener("selectionchange", detectArrowKeys);
+ })
+ }
+};
+
+exports.TextInput = TextInput;
+});
+
+ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/keyboard/textinput_ios"], function(require, exports, module) {
+"use strict";
+
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+var dom = require("../lib/dom");
+var lang = require("../lib/lang");
+var BROKEN_SETDATA = useragent.isChrome < 18;
+var USE_IE_MIME_TYPE = useragent.isIE;
+
+var TextInputIOS = require("./textinput_ios").TextInput
+var TextInput = function(parentNode, host) {
+ if (useragent.isIOS)
+ return TextInputIOS.call(this, parentNode, host);
+
+ var text = dom.createElement("textarea");
+ text.className = "ace_text-input";
+
+ text.setAttribute("wrap", "off");
+ text.setAttribute("autocorrect", "off");
+ text.setAttribute("autocapitalize", "off");
+ text.setAttribute("spellcheck", false);
+
+ text.style.opacity = "0";
+ parentNode.insertBefore(text, parentNode.firstChild);
+
+ var PLACEHOLDER = "\u2028\u2028";
+
+ var copied = false;
+ var pasted = false;
+ var inComposition = false;
+ var tempStyle = '';
+ var isSelectionEmpty = true;
+ try { var isFocused = document.activeElement === text; } catch(e) {}
+
+ event.addListener(text, "blur", function(e) {
+ host.onBlur(e);
+ isFocused = false;
+ });
+ event.addListener(text, "focus", function(e) {
+ isFocused = true;
+ host.onFocus(e);
+ resetSelection();
+ });
+ this.focus = function() {
+ if (tempStyle) return text.focus();
+ var top = text.style.top;
+ text.style.position = "fixed";
+ text.style.top = "0px";
+ text.focus();
+ setTimeout(function() {
+ text.style.position = "";
+ if (text.style.top == "0px")
+ text.style.top = top;
+ }, 0);
+ };
+ this.blur = function() {
+ text.blur();
+ };
+ this.isFocused = function() {
+ return isFocused;
+ };
+ var syncSelection = lang.delayedCall(function() {
+ isFocused && resetSelection(isSelectionEmpty);
+ });
+ var syncValue = lang.delayedCall(function() {
+ if (!inComposition) {
+ text.value = PLACEHOLDER;
+ isFocused && resetSelection();
+ }
+ });
+
+ function resetSelection(isEmpty) {
+ if (inComposition)
+ return;
+ inComposition = true;
+
+ if (inputHandler) {
+ selectionStart = 0;
+ selectionEnd = isEmpty ? 0 : text.value.length - 1;
+ } else {
+ var selectionStart = isEmpty ? 2 : 1;
+ var selectionEnd = 2;
+ }
+ try {
+ text.setSelectionRange(selectionStart, selectionEnd);
+ } catch(e){}
+
+ inComposition = false;
+ }
+
+ function resetValue() {
+ if (inComposition)
+ 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;
+ };
+
+ var onSelect = function(e) {
+ if (copied) {
+ copied = false;
+ } else if (isAllSelected(text)) {
+ host.selectAll();
+ resetSelection();
+ } else if (inputHandler) {
+ resetSelection(host.selection.isEmpty());
+ }
+ };
+
+ var inputHandler = null;
+ this.setInputHandler = function(cb) {inputHandler = cb};
+ this.getInputHandler = function() {return inputHandler};
+ var afterContextMenu = false;
+
+ var sendText = function(data) {
+ if (inputHandler) {
+ data = inputHandler(data);
+ inputHandler = null;
+ }
+ if (pasted) {
+ resetSelection();
+ if (data)
+ host.onPaste(data);
+ pasted = false;
+ } else if (data == PLACEHOLDER.charAt(0)) {
+ if (afterContextMenu)
+ host.execCommand("del", {source: "ace"});
+ else // some versions of android do not fire keydown when pressing backspace
+ host.execCommand("backspace", {source: "ace"});
+ } else {
+ if (data.substring(0, 2) == PLACEHOLDER)
+ data = data.substr(2);
+ else if (data.charAt(0) == PLACEHOLDER.charAt(0))
+ data = data.substr(1);
+ else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))
+ data = data.slice(0, -1);
+ if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0))
+ data = data.slice(0, -1);
+
+ if (data)
+ host.onTextInput(data);
+ }
+ if (afterContextMenu)
+ afterContextMenu = false;
+ };
+ var onInput = function(e) {
+ if (inComposition)
+ return;
+ var data = text.value;
+ sendText(data);
+ resetValue();
+ };
+
+ var handleClipboardData = function(e, data, forceIEMime) {
+ var clipboardData = e.clipboardData || window.clipboardData;
+ if (!clipboardData || BROKEN_SETDATA)
+ return;
+ var mime = USE_IE_MIME_TYPE || forceIEMime ? "Text" : "text/plain";
+ try {
+ if (data) {
+ return clipboardData.setData(mime, data) !== false;
+ } else {
+ return clipboardData.getData(mime);
+ }
+ } catch(e) {
+ if (!forceIEMime)
+ return handleClipboardData(e, data, true);
+ }
+ };
+
+ var doCopy = function(e, isCut) {
+ var data = host.getCopyText();
+ if (!data)
+ return event.preventDefault(e);
+
+ if (handleClipboardData(e, data)) {
+ isCut ? host.onCut() : host.onCopy();
+ event.preventDefault(e);
+ } else {
+ copied = true;
+ text.value = data;
+ text.select();
+ setTimeout(function(){
+ copied = false;
+ resetValue();
+ resetSelection();
+ isCut ? host.onCut() : host.onCopy();
+ });
+ }
+ };
+
+ var onCut = function(e) {
+ doCopy(e, true);
+ };
+
+ var onCopy = function(e) {
+ doCopy(e, false);
+ };
+
+ var onPaste = function(e) {
+ var data = handleClipboardData(e);
+ if (typeof data == "string") {
+ if (data)
+ host.onPaste(data, e);
+ 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) {
+ if (inComposition || !host.onCompositionStart || host.$readOnly)
+ return;
+ inComposition = {};
+ inComposition.canUndo = host.session.$undoManager;
+ host.onCompositionStart();
+ setTimeout(onCompositionUpdate, 0);
+ host.on("mousedown", onCompositionEnd);
+ if (inComposition.canUndo && !host.selection.isEmpty()) {
+ host.insert("");
+ host.session.markUndoGroup();
+ host.selection.clearSelection();
+ }
+ host.session.markUndoGroup();
+ };
+
+ var onCompositionUpdate = function() {
+ if (!inComposition || !host.onCompositionUpdate || host.$readOnly)
+ return;
+ var val = text.value.replace(/\u2028/g, "");
+ if (inComposition.lastValue === val) return;
+
+ host.onCompositionUpdate(val);
+ if (inComposition.lastValue)
+ host.undo();
+ if (inComposition.canUndo)
+ inComposition.lastValue = val;
+ if (inComposition.lastValue) {
+ var r = host.selection.getRange();
+ host.insert(inComposition.lastValue);
+ host.session.markUndoGroup();
+ inComposition.range = host.selection.getRange();
+ host.selection.setRange(r);
+ host.selection.clearSelection();
+ }
+ };
+
+ var onCompositionEnd = function(e) {
+ if (!host.onCompositionEnd || host.$readOnly) return;
+ var c = inComposition;
+ inComposition = false;
+ var timer = setTimeout(function() {
+ timer = null;
+ var str = text.value.replace(/\u2028/g, "");
+ if (inComposition)
+ return;
+ else if (str == c.lastValue)
+ resetValue();
+ else if (!c.lastValue && str) {
+ resetValue();
+ sendText(str);
+ }
+ });
+ inputHandler = function compositionInputHandler(str) {
+ if (timer)
+ clearTimeout(timer);
+ str = str.replace(/\u2028/g, "");
+ if (str == c.lastValue)
+ return "";
+ if (c.lastValue && timer)
+ host.undo();
+ return str;
+ };
+ host.onCompositionEnd();
+ host.removeListener("mousedown", onCompositionEnd);
+ if (e.type == "compositionend" && c.range) {
+ host.selection.setRange(c.range);
+ }
+ var needsOnInput =
+ (!!useragent.isChrome && useragent.isChrome >= 53) ||
+ (!!useragent.isWebKit && useragent.isWebKit >= 603);
+
+ if (needsOnInput) {
+ onInput();
+ }
+ };
+
+
+
+ var syncComposition = lang.delayedCall(onCompositionUpdate, 50);
+
+ event.addListener(text, "compositionstart", onCompositionStart);
+ if (useragent.isGecko) {
+ event.addListener(text, "text", function(){syncComposition.schedule()});
+ } else {
+ event.addListener(text, "keyup", function(){syncComposition.schedule()});
+ event.addListener(text, "keydown", function(){syncComposition.schedule()});
+ }
+ event.addListener(text, "compositionend", onCompositionEnd);
+
+ this.getElement = function() {
+ return text;
+ };
+
+ this.setReadOnly = function(readOnly) {
+ text.readOnly = readOnly;
+ };
+
+ this.onContextMenu = function(e) {
+ afterContextMenu = true;
+ resetSelection(host.selection.isEmpty());
+ host._emit("nativecontextmenu", {target: host, domEvent: e});
+ this.moveToMouse(e, true);
+ };
+
+ this.moveToMouse = function(e, bringToFront) {
+ if (!tempStyle)
+ tempStyle = text.style.cssText;
+ text.style.cssText = (bringToFront ? "z-index:100000;" : "")
+ + "height:" + text.style.height + ";"
+ + (useragent.isIE ? "opacity:0.1;" : "");
+
+ var rect = host.container.getBoundingClientRect();
+ var style = dom.computedStyle(host.container);
+ var top = rect.top + (parseInt(style.borderTopWidth) || 0);
+ var left = rect.left + (parseInt(rect.borderLeftWidth) || 0);
+ var maxTop = rect.bottom - top - text.clientHeight -2;
+ var move = function(e) {
+ text.style.left = e.clientX - left - 2 + "px";
+ text.style.top = Math.min(e.clientY - top - 2, maxTop) + "px";
+ };
+ move(e);
+
+ if (e.type != "mousedown")
+ return;
+
+ if (host.renderer.$keepTextAreaAtCursor)
+ host.renderer.$keepTextAreaAtCursor = null;
+
+ clearTimeout(closeTimeout);
+ if (useragent.isWin)
+ event.capture(host.container, move, onContextMenuClose);
+ };
+
+ this.onContextMenuClose = onContextMenuClose;
+ var closeTimeout;
+ function onContextMenuClose() {
+ clearTimeout(closeTimeout);
+ closeTimeout = setTimeout(function () {
+ if (tempStyle) {
+ text.style.cssText = tempStyle;
+ tempStyle = '';
+ }
+ if (host.renderer.$keepTextAreaAtCursor == null) {
+ host.renderer.$keepTextAreaAtCursor = true;
+ host.renderer.$moveTextAreaToCursor();
+ }
+ }, 0);
+ }
+
+ var onContextMenu = function(e) {
+ host.textInput.onContextMenu(e);
+ onContextMenuClose();
+ };
+ event.addListener(text, "mouseup", onContextMenu);
+ event.addListener(text, "mousedown", function(e) {
+ e.preventDefault();
+ onContextMenuClose();
+ });
+ event.addListener(host.renderer.scroller, "contextmenu", onContextMenu);
+ event.addListener(text, "contextmenu", onContextMenu);
+};
+
+exports.TextInput = TextInput;
+});
+
+ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"], function(require, exports, module) {
+"use strict";
+
+var dom = require("../lib/dom");
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+
+var DRAG_OFFSET = 0; // 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));
+ editor.setDefaultHandler("touchmove", this.onTouchMove.bind(mouseHandler));
+
+ var exports = ["select", "startSelect", "selectEnd", "selectAllEnd", "selectByWordsEnd",
+ "selectByLinesEnd", "dragWait", "dragWaitEnd", "focusWait"];
+
+ exports.forEach(function(x) {
+ mouseHandler[x] = this[x];
+ }, this);
+
+ mouseHandler.selectByLines = this.extendSelectionBy.bind(mouseHandler, "getLineRange");
+ mouseHandler.selectByWords = this.extendSelectionBy.bind(mouseHandler, "getWordRange");
+}
+
+(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();
+ editor.$blockScrolling++;
+ if (selectionEmpty || button == 1)
+ editor.selection.moveToPosition(pos);
+ editor.$blockScrolling--;
+ if (button == 2) {
+ editor.textInput.onContextMenu(ev.domEvent);
+ if (!useragent.isMozilla)
+ ev.preventDefault();
+ }
+ return;
+ }
+
+ this.mousedownEvent.time = Date.now();
+ if (inSelection && !editor.isFocused()) {
+ editor.focus();
+ if (this.$focusTimout && !this.$clickSelection && !editor.inMultiSelectMode) {
+ this.setState("focusWait");
+ this.captureMouse(ev);
+ return;
+ }
+ }
+
+ this.captureMouse(ev);
+ this.startSelect(pos, ev.domEvent._clicks > 1);
+ return ev.preventDefault();
+ };
+
+ this.startSelect = function(pos, waitForClickSelection) {
+ pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y);
+ var editor = this.editor;
+ editor.$blockScrolling++;
+ if (this.mousedownEvent.getShiftKey())
+ editor.selection.selectToPosition(pos);
+ else if (!waitForClickSelection)
+ editor.selection.moveToPosition(pos);
+ if (!waitForClickSelection)
+ this.select();
+ if (editor.renderer.scroller.setCapture) {
+ editor.renderer.scroller.setCapture();
+ }
+ editor.setStyle("ace_selecting");
+ this.setState("select");
+ editor.$blockScrolling--;
+ };
+
+ this.select = function() {
+ var anchor, editor = this.editor;
+ var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y);
+ editor.$blockScrolling++;
+ 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.$blockScrolling--;
+ 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);
+ editor.$blockScrolling++;
+ 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.$blockScrolling--;
+ editor.renderer.scrollCursorIntoView();
+ };
+
+ this.selectEnd =
+ this.selectAllEnd =
+ this.selectByWordsEnd =
+ this.selectByLinesEnd = function() {
+ this.$clickSelection = null;
+ this.editor.unsetStyle("ace_selecting");
+ if (this.editor.renderer.scroller.releaseCapture) {
+ this.editor.renderer.scroller.releaseCapture();
+ }
+ };
+
+ this.focusWait = function() {
+ var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
+ var time = Date.now();
+
+ if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimout)
+ this.startSelect(this.mousedownEvent.getDocumentPosition());
+ };
+
+ 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.setState("select");
+ } else {
+ range = editor.selection.getWordRange(pos.row, pos.column);
+ this.setState("selectByWords");
+ }
+ this.$clickSelection = range;
+ this.select();
+ };
+
+ this.onTripleClick = function(ev) {
+ var pos = ev.getDocumentPosition();
+ var editor = this.editor;
+
+ this.setState("selectByLines");
+ var range = editor.getSelectionRange();
+ if (range.isMultiLine() && range.contains(pos.row, pos.column)) {
+ this.$clickSelection = editor.selection.getLineRange(range.start.row);
+ this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end;
+ } else {
+ this.$clickSelection = editor.selection.getLineRange(pos.row);
+ }
+ this.select();
+ };
+
+ this.onQuadClick = function(ev) {
+ var editor = this.editor;
+
+ editor.selectAll();
+ this.$clickSelection = editor.getSelectionRange();
+ this.setState("selectAll");
+ };
+
+ this.onMouseWheel = function(ev) {
+ if (ev.getAccelKey())
+ return;
+ if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) {
+ ev.wheelX = ev.wheelY;
+ ev.wheelY = 0;
+ }
+
+ var t = ev.domEvent.timeStamp;
+ var dt = t - (this.$lastScrollTime||0);
+
+ var editor = this.editor;
+ var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);
+ if (isScrolable || dt < 200) {
+ this.$lastScrollTime = t;
+ editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);
+ return ev.stop();
+ }
+ };
+
+ this.onTouchMove = function (ev) {
+ var t = ev.domEvent.timeStamp;
+ var dt = t - (this.$lastScrollTime || 0);
+
+ var editor = this.editor;
+ var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);
+ if (isScrolable || dt < 200) {
+ this.$lastScrollTime = t;
+ editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed);
+ return ev.stop();
+ }
+ };
+
+}).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 if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column)
+ var cmp = cursor.column - 4;
+ 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/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+function Tooltip (parentNode) {
+ this.isOpen = false;
+ this.$element = null;
+ this.$parentNode = parentNode;
+}
+
+(function() {
+ this.$init = function() {
+ this.$element = dom.createElement("div");
+ this.$element.className = "ace_tooltip";
+ this.$element.style.display = "none";
+ this.$parentNode.appendChild(this.$element);
+ return this.$element;
+ };
+ this.getElement = function() {
+ return this.$element || this.$init();
+ };
+ this.setText = function(text) {
+ dom.setInnerText(this.getElement(), text);
+ };
+ this.setHtml = function(html) {
+ this.getElement().innerHTML = html;
+ };
+ this.setPosition = function(x, y) {
+ this.getElement().style.left = x + "px";
+ this.getElement().style.top = y + "px";
+ };
+ this.setClassName = function(className) {
+ dom.addCssClass(this.getElement(), className);
+ };
+ this.show = function(text, x, y) {
+ if (text != null)
+ this.setText(text);
+ if (x != null && y != null)
+ this.setPosition(x, y);
+ if (!this.isOpen) {
+ this.getElement().style.display = "block";
+ this.isOpen = true;
+ }
+ };
+
+ this.hide = function() {
+ if (this.isOpen) {
+ this.getElement().style.display = "none";
+ this.isOpen = false;
+ }
+ };
+ this.getHeight = function() {
+ return this.getElement().offsetHeight;
+ };
+ this.getWidth = function() {
+ return this.getElement().offsetWidth;
+ };
+
+ this.destroy = function() {
+ this.isOpen = false;
+ if (this.$element && this.$element.parentNode) {
+ this.$element.parentNode.removeChild(this.$element);
+ }
+ };
+
+}).call(Tooltip.prototype);
+
+exports.Tooltip = Tooltip;
+});
+
+ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"], function(require, exports, module) {
+"use strict";
+var dom = require("../lib/dom");
+var oop = require("../lib/oop");
+var event = require("../lib/event");
+var Tooltip = require("../tooltip").Tooltip;
+
+function GutterHandler(mouseHandler) {
+ var editor = mouseHandler.editor;
+ var gutter = editor.renderer.$gutterLayer;
+ var tooltip = new GutterTooltip(editor.container);
+
+ mouseHandler.editor.setDefaultHandler("guttermousedown", function(e) {
+ if (!editor.isFocused() || e.getButton() != 0)
+ return;
+ var gutterRegion = gutter.getRegion(e);
+
+ if (gutterRegion == "foldWidgets")
+ 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.setState("selectByLines");
+ mouseHandler.captureMouse(e);
+ return e.preventDefault();
+ });
+
+
+ var tooltipTimeout, mouseEvent, tooltipAnnotation;
+
+ function showTooltip() {
+ 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.setHtml(tooltipAnnotation);
+ tooltip.show();
+ editor._signal("showGutterTooltip", tooltip);
+ editor.on("mousewheel", hideTooltip);
+
+ if (mouseHandler.$tooltipFollowsMouse) {
+ moveTooltip(mouseEvent);
+ } else {
+ var gutterElement = mouseEvent.domEvent.target;
+ var rect = gutterElement.getBoundingClientRect();
+ var style = tooltip.getElement().style;
+ style.left = rect.right + "px";
+ style.top = rect.bottom + "px";
+ }
+ }
+
+ function hideTooltip() {
+ if (tooltipTimeout)
+ tooltipTimeout = clearTimeout(tooltipTimeout);
+ if (tooltipAnnotation) {
+ tooltip.hide();
+ tooltipAnnotation = null;
+ editor._signal("hideGutterTooltip", tooltip);
+ editor.removeEventListener("mousewheel", hideTooltip);
+ }
+ }
+
+ function moveTooltip(e) {
+ tooltip.setPosition(e.x, e.y);
+ }
+
+ 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 && mouseHandler.$tooltipFollowsMouse)
+ 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);
+ });
+
+ editor.on("changeSession", hideTooltip);
+}
+
+function GutterTooltip(parentNode) {
+ Tooltip.call(this, parentNode);
+}
+
+oop.inherits(GutterTooltip, Tooltip);
+
+(function(){
+ this.setPosition = function(x, y) {
+ var windowWidth = window.innerWidth || document.documentElement.clientWidth;
+ var windowHeight = window.innerHeight || document.documentElement.clientHeight;
+ var width = this.getWidth();
+ var height = this.getHeight();
+ x += 15;
+ y += 15;
+ if (x + width > windowWidth) {
+ x -= (x + width) - windowWidth;
+ }
+ if (y + height > windowHeight) {
+ y -= 20 + height;
+ }
+ Tooltip.prototype.setPosition.call(this, x, y);
+ };
+
+}).call(GutterTooltip.prototype);
+
+
+
+exports.GutterHandler = GutterHandler;
+
+});
+
+ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) {
+"use strict";
+
+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;
+
+
+ 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_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"], function(require, exports, module) {
+"use strict";
+
+var dom = require("../lib/dom");
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+
+var AUTOSCROLL_DELAY = 200;
+var SCROLL_CURSOR_DELAY = 200;
+var SCROLL_CURSOR_HYSTERESIS = 5;
+
+function DragdropHandler(mouseHandler) {
+
+ var editor = mouseHandler.editor;
+
+ var blankImage = dom.createElement("img");
+ blankImage.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";
+ if (useragent.isOpera)
+ blankImage.style.cssText = "width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;";
+
+ var exports = ["dragWait", "dragWaitEnd", "startDrag", "dragReadyEnd", "onMouseDrag"];
+
+ exports.forEach(function(x) {
+ mouseHandler[x] = this[x];
+ }, this);
+ editor.addEventListener("mousedown", this.onMouseDown.bind(mouseHandler));
+
+
+ var mouseTarget = editor.container;
+ var dragSelectionMarker, x, y;
+ var timerId, range;
+ var dragCursor, counter = 0;
+ var dragOperation;
+ var isInternal;
+ var autoScrollStartTime;
+ var cursorMovedTime;
+ var cursorPointOnCaretMoved;
+
+ this.onDragStart = function(e) {
+ if (this.cancelDrag || !mouseTarget.draggable) {
+ var self = this;
+ setTimeout(function(){
+ self.startSelect();
+ self.captureMouse(e);
+ }, 0);
+ return e.preventDefault();
+ }
+ range = editor.getSelectionRange();
+
+ var dataTransfer = e.dataTransfer;
+ dataTransfer.effectAllowed = editor.getReadOnly() ? "copy" : "copyMove";
+ if (useragent.isOpera) {
+ editor.container.appendChild(blankImage);
+ blankImage.scrollTop = 0;
+ }
+ dataTransfer.setDragImage && dataTransfer.setDragImage(blankImage, 0, 0);
+ if (useragent.isOpera) {
+ editor.container.removeChild(blankImage);
+ }
+ dataTransfer.clearData();
+ dataTransfer.setData("Text", editor.session.getTextRange());
+
+ isInternal = true;
+ this.setState("drag");
+ };
+
+ this.onDragEnd = function(e) {
+ mouseTarget.draggable = false;
+ isInternal = false;
+ this.setState(null);
+ if (!editor.getReadOnly()) {
+ var dropEffect = e.dataTransfer.dropEffect;
+ if (!dragOperation && dropEffect == "move")
+ editor.session.remove(editor.getSelectionRange());
+ editor.renderer.$cursorLayer.setBlinking(true);
+ }
+ this.editor.unsetStyle("ace_dragging");
+ this.editor.renderer.setCursorStyle("");
+ };
+
+ this.onDragEnter = function(e) {
+ if (editor.getReadOnly() || !canAccept(e.dataTransfer))
+ return;
+ x = e.clientX;
+ y = e.clientY;
+ if (!dragSelectionMarker)
+ addDragMarker();
+ counter++;
+ e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);
+ return event.preventDefault(e);
+ };
+
+ this.onDragOver = function(e) {
+ if (editor.getReadOnly() || !canAccept(e.dataTransfer))
+ return;
+ x = e.clientX;
+ y = e.clientY;
+ if (!dragSelectionMarker) {
+ addDragMarker();
+ counter++;
+ }
+ if (onMouseMoveTimer !== null)
+ onMouseMoveTimer = null;
+
+ e.dataTransfer.dropEffect = dragOperation = getDropEffect(e);
+ return event.preventDefault(e);
+ };
+
+ this.onDragLeave = function(e) {
+ counter--;
+ if (counter <= 0 && dragSelectionMarker) {
+ clearDragMarker();
+ dragOperation = null;
+ return event.preventDefault(e);
+ }
+ };
+
+ this.onDrop = function(e) {
+ if (!dragCursor)
+ return;
+ var dataTransfer = e.dataTransfer;
+ if (isInternal) {
+ switch (dragOperation) {
+ case "move":
+ if (range.contains(dragCursor.row, dragCursor.column)) {
+ range = {
+ start: dragCursor,
+ end: dragCursor
+ };
+ } else {
+ range = editor.moveText(range, dragCursor);
+ }
+ break;
+ case "copy":
+ range = editor.moveText(range, dragCursor, true);
+ break;
+ }
+ } else {
+ var dropData = dataTransfer.getData('Text');
+ range = {
+ start: dragCursor,
+ end: editor.session.insert(dragCursor, dropData)
+ };
+ editor.focus();
+ dragOperation = null;
+ }
+ clearDragMarker();
+ return event.preventDefault(e);
+ };
+
+ event.addListener(mouseTarget, "dragstart", this.onDragStart.bind(mouseHandler));
+ event.addListener(mouseTarget, "dragend", this.onDragEnd.bind(mouseHandler));
+ event.addListener(mouseTarget, "dragenter", this.onDragEnter.bind(mouseHandler));
+ event.addListener(mouseTarget, "dragover", this.onDragOver.bind(mouseHandler));
+ event.addListener(mouseTarget, "dragleave", this.onDragLeave.bind(mouseHandler));
+ event.addListener(mouseTarget, "drop", this.onDrop.bind(mouseHandler));
+
+ function scrollCursorIntoView(cursor, prevCursor) {
+ var now = Date.now();
+ var vMovement = !prevCursor || cursor.row != prevCursor.row;
+ var hMovement = !prevCursor || cursor.column != prevCursor.column;
+ if (!cursorMovedTime || vMovement || hMovement) {
+ editor.$blockScrolling += 1;
+ editor.moveCursorToPosition(cursor);
+ editor.$blockScrolling -= 1;
+ cursorMovedTime = now;
+ cursorPointOnCaretMoved = {x: x, y: y};
+ } else {
+ var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y);
+ if (distance > SCROLL_CURSOR_HYSTERESIS) {
+ cursorMovedTime = null;
+ } else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) {
+ editor.renderer.scrollCursorIntoView();
+ cursorMovedTime = null;
+ }
+ }
+ }
+
+ function autoScroll(cursor, prevCursor) {
+ var now = Date.now();
+ var lineHeight = editor.renderer.layerConfig.lineHeight;
+ var characterWidth = editor.renderer.layerConfig.characterWidth;
+ var editorRect = editor.renderer.scroller.getBoundingClientRect();
+ var offsets = {
+ x: {
+ left: x - editorRect.left,
+ right: editorRect.right - x
+ },
+ y: {
+ top: y - editorRect.top,
+ bottom: editorRect.bottom - y
+ }
+ };
+ var nearestXOffset = Math.min(offsets.x.left, offsets.x.right);
+ var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom);
+ var scrollCursor = {row: cursor.row, column: cursor.column};
+ if (nearestXOffset / characterWidth <= 2) {
+ scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2);
+ }
+ if (nearestYOffset / lineHeight <= 1) {
+ scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1);
+ }
+ var vScroll = cursor.row != scrollCursor.row;
+ var hScroll = cursor.column != scrollCursor.column;
+ var vMovement = !prevCursor || cursor.row != prevCursor.row;
+ if (vScroll || (hScroll && !vMovement)) {
+ if (!autoScrollStartTime)
+ autoScrollStartTime = now;
+ else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY)
+ editor.renderer.scrollCursorIntoView(scrollCursor);
+ } else {
+ autoScrollStartTime = null;
+ }
+ }
+
+ function onDragInterval() {
+ var prevCursor = dragCursor;
+ dragCursor = editor.renderer.screenToTextCoordinates(x, y);
+ scrollCursorIntoView(dragCursor, prevCursor);
+ autoScroll(dragCursor, prevCursor);
+ }
+
+ function addDragMarker() {
+ range = editor.selection.toOrientedRange();
+ dragSelectionMarker = editor.session.addMarker(range, "ace_selection", editor.getSelectionStyle());
+ editor.clearSelection();
+ if (editor.isFocused())
+ editor.renderer.$cursorLayer.setBlinking(false);
+ clearInterval(timerId);
+ onDragInterval();
+ timerId = setInterval(onDragInterval, 20);
+ counter = 0;
+ event.addListener(document, "mousemove", onMouseMove);
+ }
+
+ function clearDragMarker() {
+ clearInterval(timerId);
+ editor.session.removeMarker(dragSelectionMarker);
+ dragSelectionMarker = null;
+ editor.$blockScrolling += 1;
+ editor.selection.fromOrientedRange(range);
+ editor.$blockScrolling -= 1;
+ if (editor.isFocused() && !isInternal)
+ editor.renderer.$cursorLayer.setBlinking(!editor.getReadOnly());
+ range = null;
+ dragCursor = null;
+ counter = 0;
+ autoScrollStartTime = null;
+ cursorMovedTime = null;
+ event.removeListener(document, "mousemove", onMouseMove);
+ }
+ var onMouseMoveTimer = null;
+ function onMouseMove() {
+ if (onMouseMoveTimer == null) {
+ onMouseMoveTimer = setTimeout(function() {
+ if (onMouseMoveTimer != null && dragSelectionMarker)
+ clearDragMarker();
+ }, 20);
+ }
+ }
+
+ function canAccept(dataTransfer) {
+ var types = dataTransfer.types;
+ return !types || Array.prototype.some.call(types, function(type) {
+ return type == 'text/plain' || type == 'Text';
+ });
+ }
+
+ function getDropEffect(e) {
+ var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized'];
+ var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized'];
+
+ var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey;
+ var effectAllowed = "uninitialized";
+ try {
+ effectAllowed = e.dataTransfer.effectAllowed.toLowerCase();
+ } catch (e) {}
+ var dropEffect = "none";
+
+ if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0)
+ dropEffect = "copy";
+ else if (moveAllowed.indexOf(effectAllowed) >= 0)
+ dropEffect = "move";
+ else if (copyAllowed.indexOf(effectAllowed) >= 0)
+ dropEffect = "copy";
+
+ return dropEffect;
+ }
+}
+
+(function() {
+
+ this.dragWait = function() {
+ var interval = Date.now() - this.mousedownEvent.time;
+ if (interval > this.editor.getDragDelay())
+ this.startDrag();
+ };
+
+ this.dragWaitEnd = function() {
+ var target = this.editor.container;
+ target.draggable = false;
+ this.startSelect(this.mousedownEvent.getDocumentPosition());
+ this.selectEnd();
+ };
+
+ this.dragReadyEnd = function(e) {
+ this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly());
+ this.editor.unsetStyle("ace_dragging");
+ this.editor.renderer.setCursorStyle("");
+ this.dragWaitEnd();
+ };
+
+ this.startDrag = function(){
+ this.cancelDrag = false;
+ var editor = this.editor;
+ var target = editor.container;
+ target.draggable = true;
+ editor.renderer.$cursorLayer.setBlinking(false);
+ editor.setStyle("ace_dragging");
+ var cursorStyle = useragent.isWin ? "default" : "move";
+ editor.renderer.setCursorStyle(cursorStyle);
+ this.setState("dragReady");
+ };
+
+ this.onMouseDrag = function(e) {
+ var target = this.editor.container;
+ if (useragent.isIE && this.state == "dragReady") {
+ var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
+ if (distance > 3)
+ target.dragDrop();
+ }
+ if (this.state === "dragWait") {
+ var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y);
+ if (distance > 0) {
+ target.draggable = false;
+ this.startSelect(this.mousedownEvent.getDocumentPosition());
+ }
+ }
+ };
+
+ this.onMouseDown = function(e) {
+ if (!this.$dragEnabled)
+ return;
+ this.mousedownEvent = e;
+ var editor = this.editor;
+
+ var inSelection = e.inSelection();
+ var button = e.getButton();
+ var clickCount = e.domEvent.detail || 1;
+ if (clickCount === 1 && button === 0 && inSelection) {
+ if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey()))
+ return;
+ this.mousedownEvent.time = Date.now();
+ var eventTarget = e.domEvent.target || e.domEvent.srcElement;
+ if ("unselectable" in eventTarget)
+ eventTarget.unselectable = "on";
+ if (editor.getDragDelay()) {
+ if (useragent.isWebKit) {
+ this.cancelDrag = true;
+ var mouseTarget = editor.container;
+ mouseTarget.draggable = true;
+ }
+ this.setState("dragWait");
+ } else {
+ this.startDrag();
+ }
+ this.captureMouse(e, this.onMouseDrag.bind(this));
+ e.defaultPrevented = true;
+ }
+ };
+
+}).call(DragdropHandler.prototype);
+
+
+function calcDistance(ax, ay, bx, by) {
+ return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2));
+}
+
+exports.DragdropHandler = DragdropHandler;
+
+});
+
+ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+"use strict";
+var dom = require("./dom");
+
+exports.get = function (url, callback) {
+ var xhr = new XMLHttpRequest();
+ xhr.open('GET', url, true);
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState === 4) {
+ callback(xhr.responseText);
+ }
+ };
+ xhr.send(null);
+};
+
+exports.loadScript = function(path, callback) {
+ var head = dom.getDocumentHead();
+ var s = document.createElement('script');
+
+ s.src = path;
+ head.appendChild(s);
+
+ s.onload = s.onreadystatechange = function(_, isAbort) {
+ if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") {
+ s = s.onload = s.onreadystatechange = null;
+ if (!isAbort)
+ callback();
+ }
+ };
+};
+exports.qualifyURL = function(url) {
+ var a = document.createElement('a');
+ a.href = url;
+ return a.href;
+}
+
+});
+
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
+
+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 = stopPropagation;
+ if (!e.preventDefault)
+ e.preventDefault = preventDefault;
+
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e, this);
+ if (e.propagationStopped)
+ break;
+ }
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e, this);
+};
+
+
+EventEmitter._signal = function(eventName, e) {
+ var listeners = (this._eventRegistry || {})[eventName];
+ if (!listeners)
+ return;
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++)
+ listeners[i](e, this);
+};
+
+EventEmitter.once = function(eventName, callback) {
+ var _self = this;
+ callback && this.addEventListener(eventName, function newCallback() {
+ _self.removeEventListener(eventName, newCallback);
+ callback.apply(null, arguments);
+ });
+};
+
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ handlers = this._defaultHandlers = {_disabled_: {}};
+
+ if (handlers[eventName]) {
+ var old = handlers[eventName];
+ var disabled = handlers._disabled_[eventName];
+ if (!disabled)
+ handlers._disabled_[eventName] = disabled = [];
+ disabled.push(old);
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+ handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ return;
+ var disabled = handlers._disabled_[eventName];
+
+ if (handlers[eventName] == callback) {
+ var old = handlers[eventName];
+ if (disabled)
+ this.setDefaultHandler(eventName, disabled.pop());
+ } else if (disabled) {
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
+
+ if (listeners.indexOf(callback) == -1)
+ listeners[capturing ? "unshift" : "push"](callback);
+ return callback;
+};
+
+EventEmitter.off =
+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/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) {
+"no use strict";
+
+var oop = require("./oop");
+var EventEmitter = require("./event_emitter").EventEmitter;
+
+var optionsProvider = {
+ setOptions: function(optList) {
+ Object.keys(optList).forEach(function(key) {
+ this.setOption(key, optList[key]);
+ }, this);
+ },
+ getOptions: function(optionNames) {
+ var result = {};
+ if (!optionNames) {
+ optionNames = Object.keys(this.$options);
+ } else if (!Array.isArray(optionNames)) {
+ result = optionNames;
+ optionNames = Object.keys(result);
+ }
+ optionNames.forEach(function(key) {
+ result[key] = this.getOption(key);
+ }, this);
+ return result;
+ },
+ setOption: function(name, value) {
+ if (this["$" + name] === value)
+ return;
+ var opt = this.$options[name];
+ if (!opt) {
+ return warn('misspelled option "' + name + '"');
+ }
+ if (opt.forwardTo)
+ return this[opt.forwardTo] && this[opt.forwardTo].setOption(name, value);
+
+ if (!opt.handlesSet)
+ this["$" + name] = value;
+ if (opt && opt.set)
+ opt.set.call(this, value);
+ },
+ getOption: function(name) {
+ var opt = this.$options[name];
+ if (!opt) {
+ return warn('misspelled option "' + name + '"');
+ }
+ if (opt.forwardTo)
+ return this[opt.forwardTo] && this[opt.forwardTo].getOption(name);
+ return opt && opt.get ? opt.get.call(this) : this["$" + name];
+ }
+};
+
+function warn(message) {
+ if (typeof console != "undefined" && console.warn)
+ console.warn.apply(console, arguments);
+}
+
+function reportError(msg, data) {
+ var e = new Error(msg);
+ e.data = data;
+ if (typeof console == "object" && console.error)
+ console.error(e);
+ setTimeout(function() { throw e; });
+}
+
+var AppConfig = function() {
+ this.$defaultOptions = {};
+};
+
+(function() {
+ oop.implement(this, EventEmitter);
+ this.defineOptions = function(obj, path, options) {
+ if (!obj.$options)
+ this.$defaultOptions[path] = obj.$options = {};
+
+ Object.keys(options).forEach(function(key) {
+ var opt = options[key];
+ if (typeof opt == "string")
+ opt = {forwardTo: opt};
+
+ opt.name || (opt.name = key);
+ obj.$options[opt.name] = opt;
+ if ("initialValue" in opt)
+ obj["$" + opt.name] = opt.initialValue;
+ });
+ oop.implement(obj, optionsProvider);
+
+ return this;
+ };
+
+ this.resetOptions = function(obj) {
+ Object.keys(obj.$options).forEach(function(key) {
+ var opt = obj.$options[key];
+ if ("value" in opt)
+ obj.setOption(key, opt.value);
+ });
+ };
+
+ this.setDefaultValue = function(path, name, value) {
+ var opts = this.$defaultOptions[path] || (this.$defaultOptions[path] = {});
+ if (opts[name]) {
+ if (opts.forwardTo)
+ this.setDefaultValue(opts.forwardTo, name, value);
+ else
+ opts[name].value = value;
+ }
+ };
+
+ this.setDefaultValues = function(path, optionHash) {
+ Object.keys(optionHash).forEach(function(key) {
+ this.setDefaultValue(path, key, optionHash[key]);
+ }, this);
+ };
+
+ this.warn = warn;
+ this.reportError = reportError;
+
+}).call(AppConfig.prototype);
+
+exports.AppConfig = AppConfig;
+
+});
+
+ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/lib/net","ace/lib/app_config"], function(require, exports, module) {
+"no use strict";
+
+var lang = require("./lib/lang");
+var oop = require("./lib/oop");
+var net = require("./lib/net");
+var AppConfig = require("./lib/app_config").AppConfig;
+
+module.exports = exports = new AppConfig();
+
+var global = (function() {
+ return this || typeof window != "undefined" && window;
+})();
+
+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 sep = component == "snippets" ? "/" : "-";
+ var base = parts[parts.length - 1];
+ if (component == "worker" && sep == "-") {
+ var re = new RegExp("^" + component + "[\\-_]|[\\-_]" + component + "$", "g");
+ base = base.replace(re, "");
+ }
+
+ if ((!base || base == component) && parts.length > 1)
+ base = parts[parts.length - 2];
+ var path = options[component + "Path"];
+ if (path == null) {
+ path = options.basePath;
+ } else if (sep == "/") {
+ component = sep = "";
+ }
+ if (path && path.slice(-1) != "/")
+ path += "/";
+ return path + component + sep + base + this.get("suffix");
+};
+
+exports.setModuleUrl = function(name, subst) {
+ return options.$moduleUrls[name] = subst;
+};
+
+exports.$loading = {};
+exports.loadModule = function(moduleName, onLoad) {
+ var module, moduleType;
+ if (Array.isArray(moduleName)) {
+ moduleType = moduleName[0];
+ moduleName = moduleName[1];
+ }
+
+ try {
+ module = require(moduleName);
+ } catch (e) {}
+ if (module && !exports.$loading[moduleName])
+ return onLoad && onLoad(module);
+
+ if (!exports.$loading[moduleName])
+ exports.$loading[moduleName] = [];
+
+ exports.$loading[moduleName].push(onLoad);
+
+ if (exports.$loading[moduleName].length > 1)
+ return;
+
+ var afterLoad = function() {
+ require([moduleName], function(module) {
+ exports._emit("load.module", {name: moduleName, module: module});
+ var listeners = exports.$loading[moduleName];
+ exports.$loading[moduleName] = null;
+ listeners.forEach(function(onLoad) {
+ onLoad && onLoad(module);
+ });
+ });
+ };
+
+ if (!exports.get("packaged"))
+ return afterLoad();
+ net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad);
+};
+init(true);function init(packaged) {
+
+ if (!global || !global.document)
+ return;
+
+ options.packaged = packaged || require.packaged || module.packaged || (global.define && define.packaged);
+
+ var scriptOptions = {};
+ var scriptUrl = "";
+ var currentScript = (document.currentScript || document._currentScript ); // native or polyfill
+ var currentDocument = currentScript && currentScript.ownerDocument || document;
+
+ var scripts = currentDocument.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.basePath = scriptOptions.base;
+ 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]);
+}
+
+exports.init = init;
+
+function deHyphenate(str) {
+ return str.replace(/-(.)/g, function(m, m1) { return m1.toUpperCase(); });
+}
+
+});
+
+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_handler","ace/config"], function(require, exports, module) {
+"use strict";
+
+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_handler").DragdropHandler;
+var config = require("../config");
+
+var MouseHandler = function(editor) {
+ var _self = this;
+ this.editor = editor;
+
+ new DefaultHandlers(this);
+ new DefaultGutterHandler(this);
+ new DragdropHandler(this);
+
+ var focusEditor = function(e) {
+ var windowBlurred = !document.hasFocus || !document.hasFocus()
+ || !editor.isFocused() && document.activeElement == (editor.textInput && editor.textInput.getElement())
+ if (windowBlurred)
+ window.focus();
+ editor.focus();
+ };
+
+ 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,
+ editor.renderer.scrollBarV && editor.renderer.scrollBarV.inner,
+ editor.renderer.scrollBarH && editor.renderer.scrollBarH.inner,
+ editor.textInput && editor.textInput.getElement()
+ ].filter(Boolean), [400, 300, 250], this, "onMouseEvent");
+ event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, "mousewheel"));
+ event.addTouchMoveListener(editor.container, this.onTouchMove.bind(this, "touchmove"));
+
+ 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"));
+
+ event.addListener(mouseTarget, "mousedown", focusEditor);
+ event.addListener(gutterEl, "mousedown", focusEditor);
+ if (useragent.isIE && editor.renderer.scrollBarV) {
+ event.addListener(editor.renderer.scrollBarV.element, "mousedown", focusEditor);
+ event.addListener(editor.renderer.scrollBarH.element, "mousedown", focusEditor);
+ }
+
+ editor.on("mousemove", function(e){
+ if (_self.state || _self.$dragDelay || !_self.$dragEnabled)
+ return;
+
+ var character = editor.renderer.screenToTextCoordinates(e.x, e.y);
+ var range = editor.session.selection.getRange();
+ var renderer = editor.renderer;
+
+ if (!range.isEmpty() && range.insideStart(character.row, character.column)) {
+ renderer.setCursorStyle("default");
+ } else {
+ renderer.setCursorStyle("");
+ }
+ });
+};
+
+(function() {
+ this.onMouseEvent = function(name, e) {
+ this.editor._emit(name, new MouseEvent(e, this.editor));
+ };
+
+ 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.onTouchMove = function (name, e) {
+ var mouseEvent = new MouseEvent(e, this.editor);
+ mouseEvent.speed = 1;//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, mouseMoveHandler) {
+ 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) {
+ if (!e) return;
+ if (useragent.isWebKit && !e.which && self.releaseMouse)
+ return self.releaseMouse();
+
+ self.x = e.clientX;
+ self.y = e.clientY;
+ mouseMoveHandler && mouseMoveHandler(e);
+ self.mouseEvent = new MouseEvent(e, self.editor);
+ self.$mouseMoved = true;
+ };
+
+ var onCaptureEnd = function(e) {
+ clearInterval(timerId);
+ onCaptureInterval();
+ self[self.state + "End"] && self[self.state + "End"](e);
+ self.state = "";
+ if (renderer.$keepTextAreaAtCursor == null) {
+ renderer.$keepTextAreaAtCursor = true;
+ renderer.$moveTextAreaToCursor();
+ }
+ self.isMousePressed = false;
+ self.$onCaptureMouseMove = self.releaseMouse = null;
+ e && self.onMouseEvent("mouseup", e);
+ };
+
+ var onCaptureInterval = function() {
+ self[self.state] && self[self.state]();
+ self.$mouseMoved = false;
+ };
+
+ if (useragent.isOldIE && ev.domEvent.type == "dblclick") {
+ return setTimeout(function() {onCaptureEnd(ev);});
+ }
+
+ self.$onCaptureMouseMove = onMouseMove;
+ self.releaseMouse = event.capture(this.editor.container, onMouseMove, onCaptureEnd);
+ var timerId = setInterval(onCaptureInterval, 20);
+ };
+ this.releaseMouse = null;
+ this.cancelContextMenu = function() {
+ var stop = function(e) {
+ if (e && e.domEvent && e.domEvent.type != "contextmenu")
+ return;
+ this.editor.off("nativecontextmenu", stop);
+ if (e && e.domEvent)
+ event.stopEvent(e.domEvent);
+ }.bind(this);
+ setTimeout(stop, 10);
+ this.editor.on("nativecontextmenu", stop);
+ };
+}).call(MouseHandler.prototype);
+
+config.defineOptions(MouseHandler.prototype, "mouseHandler", {
+ scrollSpeed: {initialValue: 2},
+ dragDelay: {initialValue: (useragent.isMac ? 150 : 0)},
+ dragEnabled: {initialValue: true},
+ focusTimout: {initialValue: 0},
+ tooltipFollowsMouse: {initialValue: true}
+});
+
+
+exports.MouseHandler = MouseHandler;
+});
+
+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;
+ 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) {
+ 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);
+ if (!editor.isFocused())
+ editor.focus();
+ 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 data = session.getParentFoldRangeData(row, true);
+ var range = data.range || data.firstRange;
+
+ if (range) {
+ 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) {
+"use strict";
+
+var keyUtil = require("../lib/keys");
+var event = require("../lib/event");
+
+var KeyBinding = function(editor) {
+ this.$editor = editor;
+ this.$data = {editor: editor};
+ this.$handlers = [];
+ this.setDefaultHandler(editor.commands);
+};
+
+(function() {
+ this.setDefaultHandler = function(kb) {
+ this.removeKeyboardHandler(this.$defaultHandler);
+ this.$defaultHandler = kb;
+ this.addKeyboardHandler(kb, 0);
+ };
+
+ this.setKeyboardHandler = function(kb) {
+ var h = this.$handlers;
+ if (h[h.length - 1] == kb)
+ return;
+
+ while (h[h.length - 1] && h[h.length - 1] != this.$defaultHandler)
+ this.removeKeyboardHandler(h[h.length - 1]);
+
+ this.addKeyboardHandler(kb, 1);
+ };
+
+ this.addKeyboardHandler = function(kb, pos) {
+ if (!kb)
+ return;
+ if (typeof kb == "function" && !kb.handleKeyboard)
+ kb.handleKeyboard = kb;
+ 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.getStatusText = function() {
+ var data = this.$data;
+ var editor = data.editor;
+ return this.$handlers.map(function(h) {
+ return h.getStatusText && h.getStatusText(editor, data) || "";
+ }).filter(Boolean).join(" ");
+ };
+
+ 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 = true;
+ } else {
+ success = commands.exec(toExecute.command, this.$editor, toExecute.args, e);
+ }
+ if (success && e && hashId != -1 &&
+ toExecute.passEvent != true && toExecute.command.passEvent != true
+ ) {
+ event.stopEvent(e);
+ }
+ if (success)
+ break;
+ }
+
+ if (!success && hashId == -1) {
+ toExecute = {command: "insertstring"};
+ success = commands.exec("insertstring", this.$editor, keyString);
+ }
+
+ if (success && this.$editor._signal)
+ this.$editor._signal("keyboardActivity", toExecute);
+
+ return success;
+ };
+
+ this.onCommandKey = function(e, hashId, keyCode) {
+ var keyString = keyUtil.keyCodeToString(keyCode);
+ this.$callKeyboardHandlers(hashId, keyString, keyCode, e);
+ };
+
+ this.onTextInput = function(text) {
+ this.$callKeyboardHandlers(-1, text);
+ };
+
+}).call(KeyBinding.prototype);
+
+exports.KeyBinding = KeyBinding;
+});
+
+ace.define("ace/lib/bidiutil",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var ArabicAlefBetIntervalsBegine = ['\u0621', '\u0641'];
+var ArabicAlefBetIntervalsEnd = ['\u063A', '\u064a'];
+var dir = 0, hiLevel = 0;
+var lastArabic = false, hasUBAT_AL = false, hasUBAT_B = false, hasUBAT_S = false, hasBlockSep = false, hasSegSep = false;
+
+var impTab_LTR = [ [ 0, 3, 0, 1, 0, 0, 0 ], [ 0, 3, 0, 1, 2, 2, 0 ], [ 0, 3, 0, 0x11, 2, 0, 1 ], [ 0, 3, 5, 5, 4, 1, 0 ], [ 0, 3, 0x15, 0x15, 4, 0, 1 ], [ 0, 3, 5, 5, 4, 2, 0 ]
+];
+
+var impTab_RTL = [ [ 2, 0, 1, 1, 0, 1, 0 ], [ 2, 0, 1, 1, 0, 2, 0 ], [ 2, 0, 2, 1, 3, 2, 0 ], [ 2, 0, 2, 0x21, 3, 1, 1 ]
+];
+
+var LTR = 0, RTL = 1;
+
+var L = 0;
+var R = 1;
+var EN = 2;
+var AN = 3;
+var ON = 4;
+var B = 5;
+var S = 6;
+var AL = 7;
+var WS = 8;
+var CS = 9;
+var ES = 10;
+var ET = 11;
+var NSM = 12;
+var LRE = 13;
+var RLE = 14;
+var PDF = 15;
+var LRO = 16;
+var RLO = 17;
+var BN = 18;
+
+var UnicodeTBL00 = [
+BN,BN,BN,BN,BN,BN,BN,BN,BN,S,B,S,WS,B,BN,BN,
+BN,BN,BN,BN,BN,BN,BN,BN,BN,BN,BN,BN,B,B,B,S,
+WS,ON,ON,ET,ET,ET,ON,ON,ON,ON,ON,ES,CS,ES,CS,CS,
+EN,EN,EN,EN,EN,EN,EN,EN,EN,EN,CS,ON,ON,ON,ON,ON,
+ON,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,
+L,L,L,L,L,L,L,L,L,L,L,ON,ON,ON,ON,ON,
+ON,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,
+L,L,L,L,L,L,L,L,L,L,L,ON,ON,ON,ON,BN,
+BN,BN,BN,BN,BN,B,BN,BN,BN,BN,BN,BN,BN,BN,BN,BN,
+BN,BN,BN,BN,BN,BN,BN,BN,BN,BN,BN,BN,BN,BN,BN,BN,
+CS,ON,ET,ET,ET,ET,ON,ON,ON,ON,L,ON,ON,BN,ON,ON,
+ET,ET,EN,EN,ON,L,ON,ON,ON,EN,L,ON,ON,ON,ON,ON
+];
+
+var UnicodeTBL20 = [
+WS,WS,WS,WS,WS,WS,WS,WS,WS,WS,WS,BN,BN,BN,L,R ,
+ON,ON,ON,ON,ON,ON,ON,ON,ON,ON,ON,ON,ON,ON,ON,ON,
+ON,ON,ON,ON,ON,ON,ON,ON,WS,B,LRE,RLE,PDF,LRO,RLO,CS,
+ET,ET,ET,ET,ET,ON,ON,ON,ON,ON,ON,ON,ON,ON,ON,ON,
+ON,ON,ON,ON,CS,ON,ON,ON,ON,ON,ON,ON,ON,ON,ON,ON,
+ON,ON,ON,ON,ON,ON,ON,ON,ON,ON,ON,ON,ON,ON,ON,WS
+];
+
+function _computeLevels(chars, levels, len, charTypes) {
+ var impTab = dir ? impTab_RTL : impTab_LTR
+ , prevState = null, newClass = null, newLevel = null, newState = 0
+ , action = null, cond = null, condPos = -1, i = null, ix = null, classes = [];
+
+ if (!charTypes) {
+ for (i = 0, charTypes = []; i < len; i++) {
+ charTypes[i] = _getCharacterType(chars[i]);
+ }
+ }
+ hiLevel = dir;
+ lastArabic = false;
+ hasUBAT_AL = false;
+ hasUBAT_B = false;
+ hasUBAT_S = false;
+ for (ix = 0; ix < len; ix++){
+ prevState = newState;
+ classes[ix] = newClass = _getCharClass(chars, charTypes, classes, ix);
+ newState = impTab[prevState][newClass];
+ action = newState & 0xF0;
+ newState &= 0x0F;
+ levels[ix] = newLevel = impTab[newState][5];
+ if (action > 0){
+ if (action == 0x10){
+ for(i = condPos; i < ix; i++){
+ levels[i] = 1;
+ }
+ condPos = -1;
+ } else {
+ condPos = -1;
+ }
+ }
+ cond = impTab[newState][6];
+ if (cond){
+ if(condPos == -1){
+ condPos = ix;
+ }
+ }else{
+ if (condPos > -1){
+ for(i = condPos; i < ix; i++){
+ levels[i] = newLevel;
+ }
+ condPos = -1;
+ }
+ }
+ if (charTypes[ix] == B){
+ levels[ix] = 0;
+ }
+ hiLevel |= newLevel;
+ }
+ if (hasUBAT_S){
+ for(i = 0; i < len; i++){
+ if(charTypes[i] == S){
+ levels[i] = dir;
+ for(var j = i - 1; j >= 0; j--){
+ if(charTypes[j] == WS){
+ levels[j] = dir;
+ }else{
+ break;
+ }
+ }
+ }
+ }
+ }
+}
+
+function _invertLevel(lev, levels, _array) {
+ if (hiLevel < lev){
+ return;
+ }
+ if (lev == 1 && dir == RTL && !hasUBAT_B){
+ _array.reverse();
+ return;
+ }
+ var len = _array.length, start = 0, end, lo, hi, tmp;
+ while(start < len){
+ if (levels[start] >= lev){
+ end = start + 1;
+ while(end < len && levels[end] >= lev){
+ end++;
+ }
+ for(lo = start, hi = end - 1 ; lo < hi; lo++, hi--){
+ tmp = _array[lo];
+ _array[lo] = _array[hi];
+ _array[hi] = tmp;
+ }
+ start = end;
+ }
+ start++;
+ }
+}
+
+function _getCharClass(chars, types, classes, ix) {
+ var cType = types[ix], wType, nType, len, i;
+ switch(cType){
+ case L:
+ case R:
+ lastArabic = false;
+ case ON:
+ case AN:
+ return cType;
+ case EN:
+ return lastArabic ? AN : EN;
+ case AL:
+ lastArabic = true;
+ hasUBAT_AL = true;
+ return R;
+ case WS:
+ return ON;
+ case CS:
+ if (ix < 1 || (ix + 1) >= types.length ||
+ ((wType = classes[ix - 1]) != EN && wType != AN) ||
+ ((nType = types[ix + 1]) != EN && nType != AN)){
+ return ON;
+ }
+ if (lastArabic){nType = AN;}
+ return nType == wType ? nType : ON;
+ case ES:
+ wType = ix > 0 ? classes[ix - 1] : B;
+ if (wType == EN && (ix + 1) < types.length && types[ix + 1] == EN){
+ return EN;
+ }
+ return ON;
+ case ET:
+ if (ix > 0 && classes[ix - 1] == EN){
+ return EN;
+ }
+ if (lastArabic){
+ return ON;
+ }
+ i = ix + 1;
+ len = types.length;
+ while (i < len && types[i] == ET){
+ i++;
+ }
+ if (i < len && types[i] == EN){
+ return EN;
+ }
+ return ON;
+ case NSM:
+ len = types.length;
+ i = ix + 1;
+ while (i < len && types[i] == NSM){
+ i++;
+ }
+ if (i < len){
+ var c = chars[ix], rtlCandidate = (c >= 0x0591 && c <= 0x08FF) || c == 0xFB1E;
+
+ wType = types[i];
+ if (rtlCandidate && (wType == R || wType == AL)){
+ return R;
+ }
+ }
+
+ if (ix < 1 || (wType = types[ix - 1]) == B){
+ return ON;
+ }
+ return classes[ix - 1];
+ case B:
+ lastArabic = false;
+ hasUBAT_B = true;
+ return dir;
+ case S:
+ hasUBAT_S = true;
+ return ON;
+ case LRE:
+ case RLE:
+ case LRO:
+ case RLO:
+ case PDF:
+ lastArabic = false;
+ case BN:
+ return ON;
+ }
+}
+
+function _getCharacterType( ch ) {
+ var uc = ch.charCodeAt(0), hi = uc >> 8;
+
+ if (hi == 0) {
+ return ((uc > 0x00BF) ? L : UnicodeTBL00[uc]);
+ } else if (hi == 5) {
+ return (/[\u0591-\u05f4]/.test(ch) ? R : L);
+ } else if (hi == 6) {
+ if (/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ch))
+ return NSM;
+ else if (/[\u0660-\u0669\u066b-\u066c]/.test(ch))
+ return AN;
+ else if (uc == 0x066A)
+ return ET;
+ else if (/[\u06f0-\u06f9]/.test(ch))
+ return EN;
+ else
+ return AL;
+ } else if (hi == 0x20 && uc <= 0x205F) {
+ return UnicodeTBL20[uc & 0xFF];
+ } else if (hi == 0xFE) {
+ return (uc >= 0xFE70 ? AL : ON);
+ }
+ return ON;
+}
+
+function _isArabicDiacritics( ch ) {
+ return (ch >= '\u064b' && ch <= '\u0655');
+}
+exports.L = L;
+exports.R = R;
+exports.EN = EN;
+exports.ON_R = 3;
+exports.AN = 4;
+exports.R_H = 5;
+exports.B = 6;
+
+exports.DOT = "\xB7";
+exports.doBidiReorder = function(text, textCharTypes, isRtl) {
+ if (text.length < 2)
+ return {};
+
+ var chars = text.split(""), logicalFromVisual = new Array(chars.length),
+ bidiLevels = new Array(chars.length), levels = [];
+
+ dir = isRtl ? RTL : LTR;
+
+ _computeLevels(chars, levels, chars.length, textCharTypes);
+
+ for (var i = 0; i < logicalFromVisual.length; logicalFromVisual[i] = i, i++);
+
+ _invertLevel(2, levels, logicalFromVisual);
+ _invertLevel(1, levels, logicalFromVisual);
+
+ for (var i = 0; i < logicalFromVisual.length - 1; i++) { //fix levels to reflect character width
+ if (textCharTypes[i] === AN) {
+ levels[i] = exports.AN;
+ } else if (levels[i] === R && ((textCharTypes[i] > AL && textCharTypes[i] < LRE)
+ || textCharTypes[i] === ON || textCharTypes[i] === BN)) {
+ levels[i] = exports.ON_R;
+ } else if ((i > 0 && chars[i - 1] === '\u0644') && /\u0622|\u0623|\u0625|\u0627/.test(chars[i])) {
+ levels[i - 1] = levels[i] = exports.R_H;
+ i++;
+ }
+ }
+ if (chars[chars.length - 1] === exports.DOT)
+ levels[chars.length - 1] = exports.B;
+
+ for (var i = 0; i < logicalFromVisual.length; i++) {
+ bidiLevels[i] = levels[logicalFromVisual[i]];
+ }
+
+ return {'logicalFromVisual': logicalFromVisual, 'bidiLevels': bidiLevels};
+};
+exports.hasBidiCharacters = function(text, textCharTypes){
+ var ret = false;
+ for (var i = 0; i < text.length; i++){
+ textCharTypes[i] = _getCharacterType(text.charAt(i));
+ if (!ret && (textCharTypes[i] == R || textCharTypes[i] == AL))
+ ret = true;
+ }
+ return ret;
+};
+exports.getVisualFromLogicalIdx = function(logIdx, rowMap) {
+ for (var i = 0; i < rowMap.logicalFromVisual.length; i++) {
+ if (rowMap.logicalFromVisual[i] == logIdx)
+ return i;
+ }
+ return 0;
+};
+
+});
+
+ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang","ace/lib/useragent"], function(require, exports, module) {
+"use strict";
+
+var bidiUtil = require("./lib/bidiutil");
+var lang = require("./lib/lang");
+var useragent = require("./lib/useragent");
+var BidiHandler = function(session) {
+ this.session = session;
+ this.bidiMap = {};
+ this.currentRow = null;
+ this.bidiUtil = bidiUtil;
+ this.charWidths = [];
+ this.EOL = "\xAC";
+ this.showInvisibles = true;
+ this.isRtlDir = false;
+ this.line = "";
+ this.wrapIndent = 0;
+ this.isLastRow = false;
+ this.EOF = "\xB6";
+};
+
+(function() {
+ this.isBidiRow = function(screenRow, docRow, splitIndex) {
+ if (screenRow !== this.currentRow) {
+ this.currentRow = screenRow;
+ this.updateRowLine(docRow, splitIndex);
+ this.updateBidiMap();
+ }
+ return this.bidiMap.bidiLevels;
+ };
+
+ this.getDocumentRow = function() {
+ var docRow = 0;
+ var rowCache = this.session.$screenRowCache;
+ if (rowCache.length) {
+ var index = this.session.$getRowCacheIndex(rowCache, this.currentRow);
+ if (index >= 0)
+ docRow = this.session.$docRowCache[index];
+ }
+
+ return docRow;
+ };
+
+ this.getSplitIndex = function() {
+ var splitIndex = 0;
+ var rowCache = this.session.$screenRowCache;
+ if (rowCache.length) {
+ var currentIndex, prevIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow);
+ while (this.currentRow - splitIndex > 0) {
+ currentIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow - splitIndex - 1);
+ if (currentIndex !== prevIndex)
+ break;
+
+ prevIndex = currentIndex;
+ splitIndex++;
+ }
+ }
+
+ return splitIndex;
+ };
+
+ this.updateRowLine = function(docRow, splitIndex) {
+ if (docRow === undefined)
+ docRow = this.getDocumentRow();
+
+ this.wrapIndent = 0;
+ this.isLastRow = (docRow === this.session.getLength() - 1);
+ this.line = this.session.getLine(docRow);
+ if (this.session.$useWrapMode) {
+ var splits = this.session.$wrapData[docRow];
+ if (splits) {
+ if (splitIndex === undefined)
+ splitIndex = this.getSplitIndex();
+
+ if(splitIndex > 0 && splits.length) {
+ this.wrapIndent = splits.indent;
+ this.line = (splitIndex < splits.length) ?
+ this.line.substring(splits[splitIndex - 1], splits[splits.length - 1]) :
+ this.line.substring(splits[splits.length - 1]);
+ } else {
+ this.line = this.line.substring(0, splits[splitIndex]);
+ }
+ }
+ }
+ var session = this.session, shift = 0, size;
+ this.line = this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g, function(ch, i){
+ if (ch === '\t' || session.isFullWidth(ch.charCodeAt(0))) {
+ size = (ch === '\t') ? session.getScreenTabSize(i + shift) : 2;
+ shift += size - 1;
+ return lang.stringRepeat(bidiUtil.DOT, size);
+ }
+ return ch;
+ });
+ };
+
+ this.updateBidiMap = function() {
+ var textCharTypes = [], endOfLine = this.isLastRow ? this.EOF : this.EOL;
+ var line = this.line + (this.showInvisibles ? endOfLine : bidiUtil.DOT);
+ if (bidiUtil.hasBidiCharacters(line, textCharTypes)) {
+ this.bidiMap = bidiUtil.doBidiReorder(line, textCharTypes, this.isRtlDir);
+ } else {
+ this.bidiMap = {};
+ }
+ };
+ this.markAsDirty = function() {
+ this.currentRow = null;
+ };
+ this.updateCharacterWidths = function($fontMetrics) {
+ var _regularCharWidth = $fontMetrics.$measureCharWidth('a'), _bidiCharWidth = $fontMetrics.$measureCharWidth('\u05d4');
+
+ this.charWidths[bidiUtil.L] = this.charWidths[bidiUtil.EN] = this.charWidths[bidiUtil.ON_R] = _regularCharWidth;
+ this.charWidths[bidiUtil.R] = this.charWidths[bidiUtil.AN] = _bidiCharWidth;
+ this.charWidths[bidiUtil.R_H] = useragent.isChrome ? _bidiCharWidth : _bidiCharWidth * 0.45;
+ this.charWidths[bidiUtil.B] = 0;
+
+ if (this.currentRow !== null) {
+ this.updateBidiMap();
+ }
+ };
+
+ this.getShowInvisibles = function() {
+ return this.showInvisibles;
+ };
+
+ this.setShowInvisibles = function(showInvisibles) {
+ this.showInvisibles = showInvisibles;
+ if (this.currentRow !== null) {
+ this.updateBidiMap();
+ }
+ };
+
+ this.setEolChar = function(eolChar) {
+ this.EOL = eolChar;
+ };
+
+ this.setTextDir = function(isRtlDir) {
+ this.isRtlDir = isRtlDir;
+ };
+ this.getPosLeft = function(col) {
+ col -= this.wrapIndent;
+ var visualIdx = bidiUtil.getVisualFromLogicalIdx(col > 0 ? col - 1 : 0, this.bidiMap),
+ levels = this.bidiMap.bidiLevels, left = 0;
+
+ if (col === 0 && levels[visualIdx] % 2 !== 0)
+ visualIdx++;
+
+ for (var i = 0; i < visualIdx; i++) {
+ left += this.charWidths[levels[i]];
+ }
+
+ if (col !== 0 && levels[visualIdx] % 2 === 0)
+ left += this.charWidths[levels[visualIdx]];
+
+ if (this.wrapIndent)
+ left += this.wrapIndent * this.charWidths[bidiUtil.L];
+
+ return left;
+ };
+ this.getSelections = function(startCol, endCol) {
+ var map = this.bidiMap, levels = map.bidiLevels, level, offset = this.wrapIndent * this.charWidths[bidiUtil.L], selections = [],
+ selColMin = Math.min(startCol, endCol) - this.wrapIndent, selColMax = Math.max(startCol, endCol) - this.wrapIndent,
+ isSelected = false, isSelectedPrev = false, selectionStart = 0;
+
+ for (var logIdx, visIdx = 0; visIdx < levels.length; visIdx++) {
+ logIdx = map.logicalFromVisual[visIdx];
+ level = levels[visIdx];
+ isSelected = (logIdx >= selColMin) && (logIdx < selColMax);
+ if (isSelected && !isSelectedPrev) {
+ selectionStart = offset;
+ } else if (!isSelected && isSelectedPrev) {
+ selections.push({left: selectionStart, width: offset - selectionStart});
+ }
+ offset += this.charWidths[level];
+ isSelectedPrev = isSelected;
+ }
+
+ if (isSelected && (visIdx === levels.length)) {
+ selections.push({left: selectionStart, width: offset - selectionStart});
+ }
+
+ return selections;
+ };
+ this.offsetToCol = function(posX) {
+ var logicalIdx = 0, posX = Math.max(posX, 0),
+ offset = 0, visualIdx = 0, levels = this.bidiMap.bidiLevels,
+ charWidth = this.charWidths[levels[visualIdx]];
+
+ if (this.wrapIndent) {
+ posX -= this.wrapIndent * this.charWidths[bidiUtil.L];
+ }
+
+ while(posX > offset + charWidth/2) {
+ offset += charWidth;
+ if(visualIdx === levels.length - 1) {
+ charWidth = 0;
+ break;
+ }
+ charWidth = this.charWidths[levels[++visualIdx]];
+ }
+
+ if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && (levels[visualIdx] % 2 === 0)){
+ if(posX < offset)
+ visualIdx--;
+ logicalIdx = this.bidiMap.logicalFromVisual[visualIdx];
+
+ } else if (visualIdx > 0 && (levels[visualIdx - 1] % 2 === 0) && (levels[visualIdx] % 2 !== 0)){
+ logicalIdx = 1 + ((posX > offset) ? this.bidiMap.logicalFromVisual[visualIdx]
+ : this.bidiMap.logicalFromVisual[visualIdx - 1]);
+
+ } else if ((this.isRtlDir && visualIdx === levels.length - 1 && charWidth === 0 && (levels[visualIdx - 1] % 2 === 0))
+ || (!this.isRtlDir && visualIdx === 0 && (levels[visualIdx] % 2 !== 0))){
+ logicalIdx = 1 + this.bidiMap.logicalFromVisual[visualIdx];
+ } else {
+ if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && charWidth !== 0)
+ visualIdx--;
+ logicalIdx = this.bidiMap.logicalFromVisual[visualIdx];
+ }
+
+ return (logicalIdx + this.wrapIndent);
+ };
+
+}).call(BidiHandler.prototype);
+
+exports.BidiHandler = BidiHandler;
+});
+
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+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};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
+
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {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
+ );
+ };
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
+ };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
+
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+
+
+exports.Range = Range;
+});
+
+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;
+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);
+ }
+ if (this.getRange().isEmpty())
+ this.$isEmpty = true;
+ 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.moveTo = function(row, column) {
+ this.clearSelection();
+ this.moveCursorTo(row, column);
+ };
+ this.moveToPosition = function(pos) {
+ this.clearSelection();
+ 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 === true)
+ 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.wouldMoveIntoSoftTab = function(cursor, tabSize, direction) {
+ var start = cursor.column;
+ var end = cursor.column + tabSize;
+
+ if (direction < 0) {
+ start = cursor.column - tabSize;
+ end = cursor.column;
+ }
+ return this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(start, end).split(" ").length-1 == tabSize
+ }
+ 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.wouldMoveIntoSoftTab(cursor, tabSize, -1) && !this.session.getNavigateWithinSoftTabs()) {
+ 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.wouldMoveIntoSoftTab(cursor, tabSize, 1) && !this.session.getNavigateWithinSoftTabs()) {
+ 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.session.$useEmacsStyleLineStart)
+ firstColumnPosition.column += leadingSpace[0].length;
+ this.moveCursorToPosition(firstColumnPosition);
+ };
+ 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
+ );
+
+ var offsetX;
+
+ if (chars === 0) {
+ if (rows !== 0) {
+ if (this.session.$bidiHandler.isBidiRow(screenPos.row, this.lead.row)) {
+ offsetX = this.session.$bidiHandler.getPosLeft(screenPos.column);
+ screenPos.column = Math.round(offsetX / this.session.$bidiHandler.charWidths[0]);
+ } else {
+ offsetX = screenPos.column * this.session.$bidiHandler.charWidths[0];
+ }
+ }
+
+ if (this.$desiredColumn)
+ screenPos.column = this.$desiredColumn;
+ else
+ this.$desiredColumn = screenPos.column;
+ }
+
+ var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column, offsetX);
+
+ if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) {
+ if (this.session.lineWidgets && this.session.lineWidgets[docPos.row]) {
+ if (docPos.row > 0 || rows > 0)
+ docPos.row++;
+ }
+ }
+ 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;
+ };
+ this.getRangeOfMovements = function(func) {
+ var start = this.getCursor();
+ try {
+ func(this);
+ var end = this.getCursor();
+ return Range.fromPoints(start,end);
+ } catch(e) {
+ return Range.fromPoints(start,start);
+ } finally {
+ this.moveCursorToPosition(start);
+ }
+ };
+
+ this.toJSON = function() {
+ if (this.rangeCount) {
+ var data = this.ranges.map(function(r) {
+ var r1 = r.clone();
+ r1.isBackwards = r.cursor == r.start;
+ return r1;
+ });
+ } else {
+ var data = this.getRange();
+ data.isBackwards = this.isBackwards();
+ }
+ return data;
+ };
+
+ this.fromJSON = function(data) {
+ if (data.start == undefined) {
+ if (this.rangeList) {
+ this.toSingleRange(data[0]);
+ for (var i = data.length; i--; ) {
+ var r = Range.fromPoints(data[i].start, data[i].end);
+ if (data[i].isBackwards)
+ r.cursor = r.start;
+ this.addRange(r, true);
+ }
+ return;
+ } else
+ data = data[0];
+ }
+ if (this.rangeList)
+ this.toSingleRange(data);
+ this.setSelectionRange(data, data.isBackwards);
+ };
+
+ this.isEqual = function(data) {
+ if ((data.length || this.rangeCount) && data.length != this.rangeCount)
+ return false;
+ if (!data.length || !this.ranges)
+ return this.getRange().isEqual(data);
+
+ for (var i = this.ranges.length; i--; ) {
+ if (!this.ranges[i].isEqual(data[i]))
+ return false;
+ }
+ return true;
+ };
+
+}).call(Selection.prototype);
+
+exports.Selection = Selection;
+});
+
+ace.define("ace/tokenizer",["require","exports","module","ace/config"], function(require, exports, module) {
+"use strict";
+
+var config = require("./config");
+var MAX_TOKEN_COUNT = 2000;
+var Tokenizer = function(rules) {
+ this.states = rules;
+
+ this.regExps = {};
+ this.matchMappings = {};
+ for (var key in this.states) {
+ var state = this.states[key];
+ var ruleRegExps = [];
+ var matchTotal = 0;
+ var mapping = this.matchMappings[key] = {defaultToken: "text"};
+ var flag = "g";
+
+ var splitterRurles = [];
+ for (var i = 0; i < state.length; i++) {
+ var rule = state[i];
+ if (rule.defaultToken)
+ mapping.defaultToken = rule.defaultToken;
+ if (rule.caseInsensitive)
+ flag = "gi";
+ if (rule.regex == null)
+ continue;
+
+ if (rule.regex instanceof RegExp)
+ rule.regex = rule.regex.toString().slice(1, -1);
+ var adjustedregex = rule.regex;
+ var matchcount = new RegExp("(?:(" + adjustedregex + ")|(.))").exec("a").length - 2;
+ if (Array.isArray(rule.token)) {
+ if (rule.token.length == 1 || matchcount == 1) {
+ rule.token = rule.token[0];
+ } else if (matchcount - 1 != rule.token.length) {
+ this.reportError("number of classes and regexp groups doesn't match", {
+ rule: rule,
+ groupCount: matchcount - 1
+ });
+ rule.token = rule.token[0];
+ } else {
+ rule.tokenArray = rule.token;
+ rule.token = null;
+ rule.onMatch = this.$arrayTokens;
+ }
+ } else if (typeof rule.token == "function" && !rule.onMatch) {
+ if (matchcount > 1)
+ rule.onMatch = this.$applyToken;
+ else
+ rule.onMatch = rule.token;
+ }
+
+ if (matchcount > 1) {
+ if (/\\\d/.test(rule.regex)) {
+ adjustedregex = rule.regex.replace(/\\([0-9]+)/g, function(match, digit) {
+ return "\\" + (parseInt(digit, 10) + matchTotal + 1);
+ });
+ } else {
+ matchcount = 1;
+ adjustedregex = this.removeCapturingGroups(rule.regex);
+ }
+ if (!rule.splitRegex && typeof rule.token != "string")
+ splitterRurles.push(rule); // flag will be known only at the very end
+ }
+
+ mapping[matchTotal] = i;
+ matchTotal += matchcount;
+
+ ruleRegExps.push(adjustedregex);
+ if (!rule.onMatch)
+ rule.onMatch = null;
+ }
+
+ if (!ruleRegExps.length) {
+ mapping[0] = 0;
+ ruleRegExps.push("$");
+ }
+
+ splitterRurles.forEach(function(rule) {
+ rule.splitRegex = this.createSplitterRegexp(rule.regex, flag);
+ }, this);
+
+ this.regExps[key] = new RegExp("(" + ruleRegExps.join(")|(") + ")|($)", flag);
+ }
+};
+
+(function() {
+ this.$setMaxTokenCount = function(m) {
+ MAX_TOKEN_COUNT = m | 0;
+ };
+
+ this.$applyToken = function(str) {
+ var values = this.splitRegex.exec(str).slice(1);
+ var types = this.token.apply(this, values);
+ if (typeof types === "string")
+ return [{type: types, value: str}];
+
+ var tokens = [];
+ for (var i = 0, l = types.length; i < l; i++) {
+ if (values[i])
+ tokens[tokens.length] = {
+ type: types[i],
+ value: values[i]
+ };
+ }
+ return tokens;
+ };
+
+ this.$arrayTokens = function(str) {
+ if (!str)
+ return [];
+ var values = this.splitRegex.exec(str);
+ if (!values)
+ return "text";
+ var tokens = [];
+ var types = this.tokenArray;
+ for (var i = 0, l = types.length; i < l; i++) {
+ if (values[i + 1])
+ tokens[tokens.length] = {
+ type: types[i],
+ value: values[i + 1]
+ };
+ }
+ return tokens;
+ };
+
+ this.removeCapturingGroups = function(src) {
+ var r = src.replace(
+ /\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,
+ function(x, y) {return y ? "(?:" : x;}
+ );
+ return r;
+ };
+
+ this.createSplitterRegexp = function(src, flag) {
+ if (src.indexOf("(?=") != -1) {
+ var stack = 0;
+ var inChClass = false;
+ var lastCapture = {};
+ src.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g, function(
+ m, esc, parenOpen, parenClose, square, index
+ ) {
+ if (inChClass) {
+ inChClass = square != "]";
+ } else if (square) {
+ inChClass = true;
+ } else if (parenClose) {
+ if (stack == lastCapture.stack) {
+ lastCapture.end = index+1;
+ lastCapture.stack = -1;
+ }
+ stack--;
+ } else if (parenOpen) {
+ stack++;
+ if (parenOpen.length != 1) {
+ lastCapture.stack = stack
+ lastCapture.start = index;
+ }
+ }
+ return m;
+ });
+
+ if (lastCapture.end != null && /^\)*$/.test(src.substr(lastCapture.end)))
+ src = src.substring(0, lastCapture.start) + src.substr(lastCapture.end);
+ }
+ if (src.charAt(0) != "^") src = "^" + src;
+ if (src.charAt(src.length - 1) != "$") src += "$";
+
+ return new RegExp(src, (flag||"").replace("g", ""));
+ };
+ this.getLineTokens = function(line, startState) {
+ if (startState && typeof startState != "string") {
+ var stack = startState.slice(0);
+ startState = stack[0];
+ if (startState === "#tmp") {
+ stack.shift()
+ startState = stack.shift()
+ }
+ } else
+ var stack = [];
+
+ var currentState = startState || "start";
+ var state = this.states[currentState];
+ if (!state) {
+ currentState = "start";
+ state = this.states[currentState];
+ }
+ var mapping = this.matchMappings[currentState];
+ var re = this.regExps[currentState];
+ re.lastIndex = 0;
+
+ var match, tokens = [];
+ var lastIndex = 0;
+ var matchAttempts = 0;
+
+ var token = {type: null, value: ""};
+
+ while (match = re.exec(line)) {
+ var type = mapping.defaultToken;
+ var rule = null;
+ var value = match[0];
+ var index = re.lastIndex;
+
+ if (index - value.length > lastIndex) {
+ var skipped = line.substring(lastIndex, index - value.length);
+ if (token.type == type) {
+ token.value += skipped;
+ } else {
+ if (token.type)
+ tokens.push(token);
+ token = {type: type, value: skipped};
+ }
+ }
+
+ for (var i = 0; i < match.length-2; i++) {
+ if (match[i + 1] === undefined)
+ continue;
+
+ rule = state[mapping[i]];
+
+ if (rule.onMatch)
+ type = rule.onMatch(value, currentState, stack, line);
+ else
+ type = rule.token;
+
+ if (rule.next) {
+ if (typeof rule.next == "string") {
+ currentState = rule.next;
+ } else {
+ currentState = rule.next(currentState, stack);
+ }
+
+ state = this.states[currentState];
+ if (!state) {
+ this.reportError("state doesn't exist", currentState);
+ currentState = "start";
+ state = this.states[currentState];
+ }
+ mapping = this.matchMappings[currentState];
+ lastIndex = index;
+ re = this.regExps[currentState];
+ re.lastIndex = index;
+ }
+ if (rule.consumeLineEnd)
+ lastIndex = index;
+ break;
+ }
+
+ if (value) {
+ if (typeof type === "string") {
+ if ((!rule || rule.merge !== false) && token.type === type) {
+ token.value += value;
+ } else {
+ if (token.type)
+ tokens.push(token);
+ token = {type: type, value: value};
+ }
+ } else if (type) {
+ if (token.type)
+ tokens.push(token);
+ token = {type: null, value: ""};
+ for (var i = 0; i < type.length; i++)
+ tokens.push(type[i]);
+ }
+ }
+
+ if (lastIndex == line.length)
+ break;
+
+ lastIndex = index;
+
+ if (matchAttempts++ > MAX_TOKEN_COUNT) {
+ if (matchAttempts > 2 * line.length) {
+ this.reportError("infinite loop with in ace tokenizer", {
+ startState: startState,
+ line: line
+ });
+ }
+ while (lastIndex < line.length) {
+ if (token.type)
+ tokens.push(token);
+ token = {
+ value: line.substring(lastIndex, lastIndex += 2000),
+ type: "overflow"
+ };
+ }
+ currentState = "start";
+ stack = [];
+ break;
+ }
+ }
+
+ if (token.type)
+ tokens.push(token);
+
+ if (stack.length > 1) {
+ if (stack[0] !== currentState)
+ stack.unshift("#tmp", currentState);
+ }
+ return {
+ tokens : tokens,
+ state : stack.length ? stack : currentState
+ };
+ };
+
+ this.reportError = config.reportError;
+
+}).call(Tokenizer.prototype);
+
+exports.Tokenizer = Tokenizer;
+});
+
+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() {
+
+ this.$rules = {
+ "start" : [{
+ token : "empty_line",
+ regex : '^$'
+ }, {
+ defaultToken : "text"
+ }]
+ };
+};
+
+(function() {
+
+ this.addRules = function(rules, prefix) {
+ if (!prefix) {
+ for (var key in rules)
+ this.$rules[key] = rules[key];
+ return;
+ }
+ 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.onMatch) {
+ if (typeof rule.next == "string") {
+ if (rule.next.indexOf(prefix) !== 0)
+ rule.next = prefix + rule.next;
+ }
+ if (rule.nextState && rule.nextState.indexOf(prefix) !== 0)
+ rule.nextState = prefix + rule.nextState;
+ }
+ }
+ this.$rules[prefix + key] = state;
+ }
+ };
+
+ this.getRules = function() {
+ return this.$rules;
+ };
+
+ this.embedRules = function (HighlightRules, prefix, escapeRules, states, append) {
+ var embedRules = typeof HighlightRules == "function"
+ ? new HighlightRules().getRules()
+ : HighlightRules;
+ 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;
+ };
+
+ var pushState = function(currentState, stack) {
+ if (currentState != "start" || stack.length)
+ stack.unshift(this.nextState, currentState);
+ return this.nextState;
+ };
+ var popState = function(currentState, stack) {
+ stack.shift();
+ return stack.shift() || "start";
+ };
+
+ this.normalizeRules = function() {
+ var id = 0;
+ var rules = this.$rules;
+ function processState(key) {
+ var state = rules[key];
+ state.processed = true;
+ for (var i = 0; i < state.length; i++) {
+ var rule = state[i];
+ var toInsert = null;
+ if (Array.isArray(rule)) {
+ toInsert = rule;
+ rule = {};
+ }
+ if (!rule.regex && rule.start) {
+ rule.regex = rule.start;
+ if (!rule.next)
+ rule.next = [];
+ rule.next.push({
+ defaultToken: rule.token
+ }, {
+ token: rule.token + ".end",
+ regex: rule.end || rule.start,
+ next: "pop"
+ });
+ rule.token = rule.token + ".start";
+ rule.push = true;
+ }
+ var next = rule.next || rule.push;
+ if (next && Array.isArray(next)) {
+ var stateName = rule.stateName;
+ if (!stateName) {
+ stateName = rule.token;
+ if (typeof stateName != "string")
+ stateName = stateName[0] || "";
+ if (rules[stateName])
+ stateName += id++;
+ }
+ rules[stateName] = next;
+ rule.next = stateName;
+ processState(stateName);
+ } else if (next == "pop") {
+ rule.next = popState;
+ }
+
+ if (rule.push) {
+ rule.nextState = rule.next || rule.push;
+ rule.next = pushState;
+ delete rule.push;
+ }
+
+ if (rule.rules) {
+ for (var r in rule.rules) {
+ if (rules[r]) {
+ if (rules[r].push)
+ rules[r].push.apply(rules[r], rule.rules[r]);
+ } else {
+ rules[r] = rule.rules[r];
+ }
+ }
+ }
+ var includeName = typeof rule == "string" ? rule : rule.include;
+ if (includeName) {
+ if (Array.isArray(includeName))
+ toInsert = includeName.map(function(x) { return rules[x]; });
+ else
+ toInsert = rules[includeName];
+ }
+
+ if (toInsert) {
+ var args = [i, 1].concat(toInsert);
+ if (rule.noEscape)
+ args = args.filter(function(x) {return !x.next;});
+ state.splice.apply(state, args);
+ i--;
+ }
+
+ if (rule.keywordMap) {
+ rule.token = this.createKeywordMapper(
+ rule.keywordMap, rule.defaultToken || "text", rule.caseInsensitive
+ );
+ delete rule.defaultToken;
+ }
+ }
+ }
+ Object.keys(rules).forEach(processState, this);
+ };
+
+ 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;
+ });
+ if (Object.getPrototypeOf(keywords)) {
+ keywords.__proto__ = null;
+ }
+ this.$keywordList = Object.keys(keywords);
+ 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) {
+"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/token_iterator",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Range = require("./range").Range;
+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() {
+ this.$tokenIndex += 1;
+ var rowCount;
+ while (this.$tokenIndex >= this.$rowTokens.length) {
+ this.$row += 1;
+ if (!rowCount)
+ rowCount = this.$session.getLength();
+ 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;
+ };
+ this.getCurrentTokenPosition = function() {
+ return {row: this.$row, column: this.getCurrentTokenColumn()};
+ };
+ this.getCurrentTokenRange = function() {
+ var token = this.$rowTokens[this.$tokenIndex];
+ var column = this.getCurrentTokenColumn();
+ return new Range(this.$row, column, this.$row, column + token.value.length);
+ };
+
+}).call(TokenIterator.prototype);
+
+exports.TokenIterator = TokenIterator;
+});
+
+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) {
+"use strict";
+
+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 context;
+var contextCache = {};
+var defaultQuotes = {'"' : '"', "'" : "'"};
+
+var initContext = function(editor) {
+ var id = -1;
+ if (editor.multiSelect) {
+ id = editor.selection.index;
+ if (contextCache.rangeCount != editor.multiSelect.rangeCount)
+ contextCache = {rangeCount: editor.multiSelect.rangeCount};
+ }
+ if (contextCache[id])
+ return context = contextCache[id];
+ context = contextCache[id] = {
+ autoInsertedBrackets: 0,
+ autoInsertedRow: -1,
+ autoInsertedLineEnd: "",
+ maybeInsertedBrackets: 0,
+ maybeInsertedRow: -1,
+ maybeInsertedLineStart: "",
+ maybeInsertedLineEnd: ""
+ };
+};
+
+var getWrapped = function(selection, selected, opening, closing) {
+ var rowDiff = selection.end.row - selection.start.row;
+ return {
+ text: opening + selected + closing,
+ selection: [
+ 0,
+ selection.start.column + 1,
+ rowDiff,
+ selection.end.column + (rowDiff ? 0 : 1)
+ ]
+ };
+};
+
+var CstyleBehaviour = function(options) {
+ this.add("braces", "insertion", function(state, action, editor, session, text) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (text == '{') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '{', '}');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ if (/[\]\}\)]/.test(line[cursor.column]) || editor.inMultiSelectMode || options && options.braces) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "}");
+ return {
+ text: '{}',
+ selection: [1, 1]
+ };
+ } else {
+ CstyleBehaviour.recordMaybeInsert(editor, session, "{");
+ return {
+ text: '{',
+ selection: [1, 1]
+ };
+ }
+ }
+ } else if (text == '}') {
+ initContext(editor);
+ 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") {
+ initContext(editor);
+ var closing = "";
+ if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) {
+ closing = lang.stringRepeat("}", context.maybeInsertedBrackets);
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ 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 next_indent = this.$getIndent(session.getLine(openBracePos.row));
+ } else if (closing) {
+ var next_indent = this.$getIndent(line);
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ return;
+ }
+ var indent = next_indent + session.getTabString();
+
+ return {
+ text: '\n' + indent + '\n' + next_indent + closing,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ CstyleBehaviour.clearMaybeInsertedClosing();
+ }
+ });
+
+ this.add("braces", "deletion", function(state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected == '{') {
+ initContext(editor);
+ 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 {
+ context.maybeInsertedBrackets--;
+ }
+ }
+ });
+
+ this.add("parens", "insertion", function(state, action, editor, session, text) {
+ if (text == '(') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '(', ')');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, ")");
+ return {
+ text: '()',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ')') {
+ initContext(editor);
+ 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 == '(') {
+ initContext(editor);
+ 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 == '[') {
+ initContext(editor);
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, '[', ']');
+ } else if (CstyleBehaviour.isSaneInsertion(editor, session)) {
+ CstyleBehaviour.recordAutoInsert(editor, session, "]");
+ return {
+ text: '[]',
+ selection: [1, 1]
+ };
+ }
+ } else if (text == ']') {
+ initContext(editor);
+ 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 == '[') {
+ initContext(editor);
+ 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) {
+ var quotes = session.$mode.$quotes || defaultQuotes;
+ if (text.length == 1 && quotes[text]) {
+ if (this.lineCommentStart && this.lineCommentStart.indexOf(text) != -1)
+ return;
+ initContext(editor);
+ var quote = text;
+ var selection = editor.getSelectionRange();
+ var selected = session.doc.getTextRange(selection);
+ if (selected !== "" && (selected.length != 1 || !quotes[selected]) && editor.getWrapBehavioursEnabled()) {
+ return getWrapped(selection, selected, quote, quote);
+ } else if (!selected) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var leftChar = line.substring(cursor.column-1, cursor.column);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+
+ var token = session.getTokenAt(cursor.row, cursor.column);
+ var rightToken = session.getTokenAt(cursor.row, cursor.column + 1);
+ if (leftChar == "\\" && token && /escape/.test(token.type))
+ return null;
+
+ var stringBefore = token && /string|escape/.test(token.type);
+ var stringAfter = !rightToken || /string|escape/.test(rightToken.type);
+
+ var pair;
+ if (rightChar == quote) {
+ pair = stringBefore !== stringAfter;
+ if (pair && /string\.end/.test(rightToken.type))
+ pair = false;
+ } else {
+ if (stringBefore && !stringAfter)
+ return null; // wrap string with different quote
+ if (stringBefore && stringAfter)
+ return null; // do not pair quotes inside strings
+ var wordRe = session.$mode.tokenRe;
+ wordRe.lastIndex = 0;
+ var isWordBefore = wordRe.test(leftChar);
+ wordRe.lastIndex = 0;
+ var isWordAfter = wordRe.test(leftChar);
+ if (isWordBefore || isWordAfter)
+ return null; // before or after alphanumeric
+ if (rightChar && !/[\s;,.})\]\\]/.test(rightChar))
+ return null; // there is rightChar and it isn't closing
+ pair = true;
+ }
+ return {
+ text: pair ? quote + quote : "",
+ 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 == "'")) {
+ initContext(editor);
+ var line = session.doc.getLine(range.start.row);
+ var rightChar = line.substring(range.start.column + 1, range.start.column + 2);
+ if (rightChar == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+};
+
+
+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, context.autoInsertedLineEnd[0]))
+ context.autoInsertedBrackets = 0;
+ context.autoInsertedRow = cursor.row;
+ context.autoInsertedLineEnd = bracket + line.substr(cursor.column);
+ context.autoInsertedBrackets++;
+};
+
+CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ if (!this.isMaybeInsertedClosing(cursor, line))
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = cursor.row;
+ context.maybeInsertedLineStart = line.substr(0, cursor.column) + bracket;
+ context.maybeInsertedLineEnd = line.substr(cursor.column);
+ context.maybeInsertedBrackets++;
+};
+
+CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) {
+ return context.autoInsertedBrackets > 0 &&
+ cursor.row === context.autoInsertedRow &&
+ bracket === context.autoInsertedLineEnd[0] &&
+ line.substr(cursor.column) === context.autoInsertedLineEnd;
+};
+
+CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) {
+ return context.maybeInsertedBrackets > 0 &&
+ cursor.row === context.maybeInsertedRow &&
+ line.substr(cursor.column) === context.maybeInsertedLineEnd &&
+ line.substr(0, cursor.column) == context.maybeInsertedLineStart;
+};
+
+CstyleBehaviour.popAutoInsertedClosing = function() {
+ context.autoInsertedLineEnd = context.autoInsertedLineEnd.substr(1);
+ context.autoInsertedBrackets--;
+};
+
+CstyleBehaviour.clearMaybeInsertedClosing = function() {
+ if (context) {
+ context.maybeInsertedBrackets = 0;
+ context.maybeInsertedRow = -1;
+ }
+};
+
+
+
+oop.inherits(CstyleBehaviour, Behaviour);
+
+exports.CstyleBehaviour = CstyleBehaviour;
+});
+
+ace.define("ace/unicode",["require","exports","module"], function(require, exports, module) {
+"use strict";
+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/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"], function(require, exports, module) {
+"use strict";
+
+var Tokenizer = require("../tokenizer").Tokenizer;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var unicode = require("../unicode");
+var lang = require("../lib/lang");
+var TokenIterator = require("../token_iterator").TokenIterator;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = TextHighlightRules;
+};
+
+(function() {
+ this.$defaultBehaviour = new CstyleBehaviour();
+
+ 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() {
+ if (!this.$tokenizer) {
+ this.$highlightRules = this.$highlightRules || new this.HighlightRules(this.$highlightRuleConfig);
+ this.$tokenizer = new Tokenizer(this.$highlightRules.getRules());
+ }
+ return this.$tokenizer;
+ };
+
+ this.lineCommentStart = "";
+ this.blockComment = "";
+
+ this.toggleCommentLines = function(state, session, startRow, endRow) {
+ var doc = session.doc;
+
+ var ignoreBlankLines = true;
+ var shouldRemove = true;
+ var minIndent = Infinity;
+ var tabSize = session.getTabSize();
+ var insertAtTabStop = false;
+
+ if (!this.lineCommentStart) {
+ if (!this.blockComment)
+ return false;
+ var lineCommentStart = this.blockComment.start;
+ var lineCommentEnd = this.blockComment.end;
+ var regexpStart = new RegExp("^(\\s*)(?:" + lang.escapeRegExp(lineCommentStart) + ")");
+ var regexpEnd = new RegExp("(?:" + lang.escapeRegExp(lineCommentEnd) + ")\\s*$");
+
+ var comment = function(line, i) {
+ if (testRemove(line, i))
+ return;
+ if (!ignoreBlankLines || /\S/.test(line)) {
+ doc.insertInLine({row: i, column: line.length}, lineCommentEnd);
+ doc.insertInLine({row: i, column: minIndent}, lineCommentStart);
+ }
+ };
+
+ var uncomment = function(line, i) {
+ var m;
+ if (m = line.match(regexpEnd))
+ doc.removeInLine(i, line.length - m[0].length, line.length);
+ if (m = line.match(regexpStart))
+ doc.removeInLine(i, m[1].length, m[0].length);
+ };
+
+ var testRemove = function(line, row) {
+ if (regexpStart.test(line))
+ return true;
+ var tokens = session.getTokens(row);
+ for (var i = 0; i < tokens.length; i++) {
+ if (tokens[i].type === "comment")
+ return true;
+ }
+ };
+ } else {
+ if (Array.isArray(this.lineCommentStart)) {
+ var regexpStart = this.lineCommentStart.map(lang.escapeRegExp).join("|");
+ var lineCommentStart = this.lineCommentStart[0];
+ } else {
+ var regexpStart = lang.escapeRegExp(this.lineCommentStart);
+ var lineCommentStart = this.lineCommentStart;
+ }
+ regexpStart = new RegExp("^(\\s*)(?:" + regexpStart + ") ?");
+
+ insertAtTabStop = session.getUseSoftTabs();
+
+ var uncomment = function(line, i) {
+ var m = line.match(regexpStart);
+ if (!m) return;
+ var start = m[1].length, end = m[0].length;
+ if (!shouldInsertSpace(line, start, end) && m[0][end - 1] == " ")
+ end--;
+ doc.removeInLine(i, start, end);
+ };
+ var commentWithSpace = lineCommentStart + " ";
+ var comment = function(line, i) {
+ if (!ignoreBlankLines || /\S/.test(line)) {
+ if (shouldInsertSpace(line, minIndent, minIndent))
+ doc.insertInLine({row: i, column: minIndent}, commentWithSpace);
+ else
+ doc.insertInLine({row: i, column: minIndent}, lineCommentStart);
+ }
+ };
+ var testRemove = function(line, i) {
+ return regexpStart.test(line);
+ };
+
+ var shouldInsertSpace = function(line, before, after) {
+ var spaces = 0;
+ while (before-- && line.charAt(before) == " ")
+ spaces++;
+ if (spaces % tabSize != 0)
+ return false;
+ var spaces = 0;
+ while (line.charAt(after++) == " ")
+ spaces++;
+ if (tabSize > 2)
+ return spaces % tabSize != tabSize - 1;
+ else
+ return spaces % tabSize == 0;
+ return true;
+ };
+ }
+
+ function iter(fun) {
+ for (var i = startRow; i <= endRow; i++)
+ fun(doc.getLine(i), i);
+ }
+
+
+ var minEmptyLength = Infinity;
+ iter(function(line, i) {
+ var indent = line.search(/\S/);
+ if (indent !== -1) {
+ if (indent < minIndent)
+ minIndent = indent;
+ if (shouldRemove && !testRemove(line, i))
+ shouldRemove = false;
+ } else if (minEmptyLength > line.length) {
+ minEmptyLength = line.length;
+ }
+ });
+
+ if (minIndent == Infinity) {
+ minIndent = minEmptyLength;
+ ignoreBlankLines = false;
+ shouldRemove = false;
+ }
+
+ if (insertAtTabStop && minIndent % tabSize != 0)
+ minIndent = Math.floor(minIndent / tabSize) * tabSize;
+
+ iter(shouldRemove ? uncomment : comment);
+ };
+
+ this.toggleBlockComment = function(state, session, range, cursor) {
+ var comment = this.blockComment;
+ if (!comment)
+ return;
+ if (!comment.start && comment[0])
+ comment = comment[0];
+
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ var sel = session.selection;
+ var initialRange = session.selection.toOrientedRange();
+ var startRow, colDiff;
+
+ if (token && /comment/.test(token.type)) {
+ var startRange, endRange;
+ while (token && /comment/.test(token.type)) {
+ var i = token.value.indexOf(comment.start);
+ if (i != -1) {
+ var row = iterator.getCurrentTokenRow();
+ var column = iterator.getCurrentTokenColumn() + i;
+ startRange = new Range(row, column, row, column + comment.start.length);
+ break;
+ }
+ token = iterator.stepBackward();
+ }
+
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ while (token && /comment/.test(token.type)) {
+ var i = token.value.indexOf(comment.end);
+ if (i != -1) {
+ var row = iterator.getCurrentTokenRow();
+ var column = iterator.getCurrentTokenColumn() + i;
+ endRange = new Range(row, column, row, column + comment.end.length);
+ break;
+ }
+ token = iterator.stepForward();
+ }
+ if (endRange)
+ session.remove(endRange);
+ if (startRange) {
+ session.remove(startRange);
+ startRow = startRange.start.row;
+ colDiff = -comment.start.length;
+ }
+ } else {
+ colDiff = comment.start.length;
+ startRow = range.start.row;
+ session.insert(range.end, comment.end);
+ session.insert(range.start, comment.start);
+ }
+ if (initialRange.start.row == startRow)
+ initialRange.start.column += colDiff;
+ if (initialRange.end.row == startRow)
+ initialRange.end.column += colDiff;
+ session.selection.fromOrientedRange(initialRange);
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ };
+
+ this.$getIndent = function(line) {
+ return line.match(/^\s*/)[0];
+ };
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+ this.createModeDelegates = function (mapping) {
+ this.$embeds = [];
+ this.$modes = {};
+ for (var i in mapping) {
+ if (mapping[i]) {
+ this.$embeds.push(i);
+ this.$modes[i] = new mapping[i]();
+ }
+ }
+
+ var delegations = ["toggleBlockComment", "toggleCommentLines", "getNextLineIndent",
+ "checkOutdent", "autoOutdent", "transformAction", "getCompletions"];
+
+ 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];
+ if (typeof state != "string")
+ state = state[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;
+ }
+ }
+ }
+ }
+ };
+
+ this.getKeywords = function(append) {
+ if (!this.completionKeywords) {
+ var rules = this.$tokenizer.rules;
+ var completionKeywords = [];
+ for (var rule in rules) {
+ var ruleItr = rules[rule];
+ for (var r = 0, l = ruleItr.length; r < l; r++) {
+ if (typeof ruleItr[r].token === "string") {
+ if (/keyword|support|storage/.test(ruleItr[r].token))
+ completionKeywords.push(ruleItr[r].regex);
+ }
+ else if (typeof ruleItr[r].token === "object") {
+ for (var a = 0, aLength = ruleItr[r].token.length; a < aLength; a++) {
+ if (/keyword|support|storage/.test(ruleItr[r].token[a])) {
+ var rule = ruleItr[r].regex.match(/\(.+?\)/g)[a];
+ completionKeywords.push(rule.substr(1, rule.length - 2));
+ }
+ }
+ }
+ }
+ }
+ this.completionKeywords = completionKeywords;
+ }
+ if (!append)
+ return this.$keywordList;
+ return completionKeywords.concat(this.$keywordList || []);
+ };
+
+ this.$createKeywordList = function() {
+ if (!this.$highlightRules)
+ this.getTokenizer();
+ return this.$keywordList = this.$highlightRules.$keywordList || [];
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var keywords = this.$keywordList || this.$createKeywordList();
+ return keywords.map(function(word) {
+ return {
+ name: word,
+ value: word,
+ score: 0,
+ meta: "keyword"
+ };
+ });
+ };
+
+ this.$id = "ace/mode/text";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/apply_delta",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+function throwDeltaError(delta, errorText){
+ console.log("Invalid Delta:", delta);
+ throw "Invalid Delta: " + errorText;
+}
+
+function positionInDocument(docLines, position) {
+ return position.row >= 0 && position.row < docLines.length &&
+ position.column >= 0 && position.column <= docLines[position.row].length;
+}
+
+function validateDelta(docLines, delta) {
+ if (delta.action != "insert" && delta.action != "remove")
+ throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
+ if (!(delta.lines instanceof Array))
+ throwDeltaError(delta, "delta.lines must be an Array");
+ if (!delta.start || !delta.end)
+ throwDeltaError(delta, "delta.start/end must be an present");
+ var start = delta.start;
+ if (!positionInDocument(docLines, delta.start))
+ throwDeltaError(delta, "delta.start must be contained in document");
+ var end = delta.end;
+ if (delta.action == "remove" && !positionInDocument(docLines, end))
+ throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
+ var numRangeRows = end.row - start.row;
+ var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
+ if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
+ throwDeltaError(delta, "delta.range must match delta lines");
+}
+
+exports.applyDelta = function(docLines, delta, doNotValidate) {
+
+ var row = delta.start.row;
+ var startColumn = delta.start.column;
+ var line = docLines[row] || "";
+ switch (delta.action) {
+ case "insert":
+ var lines = delta.lines;
+ if (lines.length === 1) {
+ docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
+ } else {
+ var args = [row, 1].concat(delta.lines);
+ docLines.splice.apply(docLines, args);
+ docLines[row] = line.substring(0, startColumn) + docLines[row];
+ docLines[row + delta.lines.length - 1] += line.substring(startColumn);
+ }
+ break;
+ case "remove":
+ var endColumn = delta.end.column;
+ var endRow = delta.end.row;
+ if (row === endRow) {
+ docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
+ } else {
+ docLines.splice(
+ row, endRow - row + 1,
+ line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
+ );
+ }
+ break;
+ }
+}
+});
+
+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;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+ this.getDocument = function() {
+ return this.document;
+ };
+ this.$insertRight = false;
+ this.onChange = function(delta) {
+ if (delta.start.row == delta.end.row && delta.start.row != this.row)
+ return;
+
+ if (delta.start.row > this.row)
+ return;
+
+ var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
+ this.setPosition(point.row, point.column, true);
+ };
+
+ function $pointsInOrder(point1, point2, equalPointsInOrder) {
+ var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
+ return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
+ }
+
+ function $getTransformedPoint(delta, point, moveIfEqual) {
+ var deltaIsInsert = delta.action == "insert";
+ var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
+ var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
+ var deltaStart = delta.start;
+ var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
+ if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
+ return {
+ row: point.row,
+ column: point.column
+ };
+ }
+ if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
+ return {
+ row: point.row + deltaRowShift,
+ column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
+ };
+ }
+
+ return {
+ row: deltaStart.row,
+ column: deltaStart.column
+ };
+ }
+ 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._signal("change", {
+ old: old,
+ value: pos
+ });
+ };
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
+ };
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("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/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var applyDelta = require("./apply_delta").applyDelta;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(textOrLines) {
+ this.$lines = [""];
+ if (textOrLines.length === 0) {
+ this.$lines = [""];
+ } else if (Array.isArray(textOrLines)) {
+ this.insertMergedLines({row: 0, column: 0}, textOrLines);
+ } else {
+ this.insert({row: 0, column:0}, textOrLines);
+ }
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setValue = function(text) {
+ var len = this.getLength() - 1;
+ this.remove(new Range(0, 0, len, this.getLine(len).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);
+ this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
+ };
+ this.getNewLineCharacter = function() {
+ switch (this.$newLineMode) {
+ case "windows":
+ return "\r\n";
+ case "unix":
+ return "\n";
+ default:
+ return this.$autoNewLine || "\n";
+ }
+ };
+
+ this.$autoNewLine = "";
+ this.$newLineMode = "auto";
+ this.setNewLineMode = function(newLineMode) {
+ if (this.$newLineMode === newLineMode)
+ return;
+
+ this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
+ };
+ 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) {
+ return this.getLinesForRange(range).join(this.getNewLineCharacter());
+ };
+ this.getLinesForRange = function(range) {
+ var lines;
+ if (range.start.row === range.end.row) {
+ lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
+ } else {
+ lines = this.getLines(range.start.row, range.end.row);
+ lines[0] = (lines[0] || "").substring(range.start.column);
+ var l = lines.length - 1;
+ if (range.end.row - range.start.row == l)
+ lines[l] = lines[l].substring(0, range.end.column);
+ }
+ return lines;
+ };
+ this.insertLines = function(row, lines) {
+ console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
+ return this.insertFullLines(row, lines);
+ };
+ this.removeLines = function(firstRow, lastRow) {
+ console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
+ return this.removeFullLines(firstRow, lastRow);
+ };
+ this.insertNewLine = function(position) {
+ console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
+ return this.insertMergedLines(position, ["", ""]);
+ };
+ this.insert = function(position, text) {
+ if (this.getLength() <= 1)
+ this.$detectNewLine(text);
+
+ return this.insertMergedLines(position, this.$split(text));
+ };
+ this.insertInLine = function(position, text) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = this.pos(position.row, position.column + text.length);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: [text]
+ }, true);
+
+ return this.clonePos(end);
+ };
+
+ this.clippedPos = function(row, column) {
+ var length = this.getLength();
+ if (row === undefined) {
+ row = length;
+ } else if (row < 0) {
+ row = 0;
+ } else if (row >= length) {
+ row = length - 1;
+ column = undefined;
+ }
+ var line = this.getLine(row);
+ if (column == undefined)
+ column = line.length;
+ column = Math.min(Math.max(column, 0), line.length);
+ return {row: row, column: column};
+ };
+
+ this.clonePos = function(pos) {
+ return {row: pos.row, column: pos.column};
+ };
+
+ this.pos = function(row, column) {
+ return {row: row, column: column};
+ };
+
+ 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;
+ } else {
+ position.row = Math.max(0, position.row);
+ position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
+ }
+ return position;
+ };
+ this.insertFullLines = function(row, lines) {
+ row = Math.min(Math.max(row, 0), this.getLength());
+ var column = 0;
+ if (row < this.getLength()) {
+ lines = lines.concat([""]);
+ column = 0;
+ } else {
+ lines = [""].concat(lines);
+ row--;
+ column = this.$lines[row].length;
+ }
+ this.insertMergedLines({row: row, column: column}, lines);
+ };
+ this.insertMergedLines = function(position, lines) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = {
+ row: start.row + lines.length - 1,
+ column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
+ };
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: lines
+ });
+
+ return this.clonePos(end);
+ };
+ this.remove = function(range) {
+ var start = this.clippedPos(range.start.row, range.start.column);
+ var end = this.clippedPos(range.end.row, range.end.column);
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ });
+ return this.clonePos(start);
+ };
+ this.removeInLine = function(row, startColumn, endColumn) {
+ var start = this.clippedPos(row, startColumn);
+ var end = this.clippedPos(row, endColumn);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ }, true);
+
+ return this.clonePos(start);
+ };
+ this.removeFullLines = function(firstRow, lastRow) {
+ firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
+ lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
+ var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
+ var deleteLastNewLine = lastRow < this.getLength() - 1;
+ var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );
+ var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );
+ var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );
+ var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length );
+ var range = new Range(startRow, startCol, endRow, endCol);
+ var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
+
+ this.applyDelta({
+ start: range.start,
+ end: range.end,
+ action: "remove",
+ lines: this.getLinesForRange(range)
+ });
+ return deletedLines;
+ };
+ this.removeNewLine = function(row) {
+ if (row < this.getLength() - 1 && row >= 0) {
+ this.applyDelta({
+ start: this.pos(row, this.getLine(row).length),
+ end: this.pos(row + 1, 0),
+ action: "remove",
+ lines: ["", ""]
+ });
+ }
+ };
+ this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
+ if (text.length === 0 && range.isEmpty())
+ return range.start;
+ if (text == this.getTextRange(range))
+ return range.end;
+
+ this.remove(range);
+ var end;
+ if (text) {
+ end = this.insert(range.start, text);
+ }
+ else {
+ end = range.start;
+ }
+
+ return end;
+ };
+ this.applyDeltas = function(deltas) {
+ for (var i=0; i<deltas.length; i++) {
+ this.applyDelta(deltas[i]);
+ }
+ };
+ this.revertDeltas = function(deltas) {
+ for (var i=deltas.length-1; i>=0; i--) {
+ this.revertDelta(deltas[i]);
+ }
+ };
+ this.applyDelta = function(delta, doNotValidate) {
+ var isInsert = delta.action == "insert";
+ if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
+ : !Range.comparePoints(delta.start, delta.end)) {
+ return;
+ }
+
+ if (isInsert && delta.lines.length > 20000)
+ this.$splitAndapplyLargeDelta(delta, 20000);
+ applyDelta(this.$lines, delta, doNotValidate);
+ this._signal("change", delta);
+ };
+
+ this.$splitAndapplyLargeDelta = function(delta, MAX) {
+ var lines = delta.lines;
+ var l = lines.length;
+ var row = delta.start.row;
+ var column = delta.start.column;
+ var from = 0, to = 0;
+ do {
+ from = to;
+ to += MAX - 1;
+ var chunk = lines.slice(from, to);
+ if (to > l) {
+ delta.lines = chunk;
+ delta.start.row = row + from;
+ delta.start.column = column;
+ break;
+ }
+ chunk.push("");
+ this.applyDelta({
+ start: this.pos(row + from, column),
+ end: this.pos(row + to, column = 0),
+ action: delta.action,
+ lines: chunk
+ }, true);
+ } while(true);
+ };
+ this.revertDelta = function(delta) {
+ this.applyDelta({
+ start: this.clonePos(delta.start),
+ end: this.clonePos(delta.end),
+ action: (delta.action == "insert" ? "remove" : "insert"),
+ lines: delta.lines.slice()
+ });
+ };
+ 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 + newlineLength;
+
+ return index + pos.column;
+ };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+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.states = [];
+ this.currentLine = 0;
+ this.tokenizer = tokenizer;
+
+ var self = this;
+
+ this.$worker = function() {
+ if (!self.running) { return; }
+
+ var workerStart = new Date();
+ var currentLine = self.currentLine;
+ var endLine = -1;
+ var doc = self.doc;
+
+ var startLine = currentLine;
+ while (self.lines[currentLine])
+ currentLine++;
+
+ var len = doc.getLength();
+ var processedLines = 0;
+ self.running = false;
+ while (currentLine < len) {
+ self.$tokenizeRow(currentLine);
+ endLine = currentLine;
+ do {
+ currentLine++;
+ } while (self.lines[currentLine]);
+ processedLines ++;
+ if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) {
+ self.running = setTimeout(self.$worker, 20);
+ break;
+ }
+ }
+ self.currentLine = currentLine;
+
+ if (endLine == -1)
+ endLine = currentLine;
+
+ if (startLine <= endLine)
+ self.fireUpdateEvent(startLine, endLine);
+ };
+};
+
+(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._signal("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.scheduleStart = function() {
+ if (!this.running)
+ this.running = setTimeout(this.$worker, 700);
+ }
+
+ this.$updateOnChange = function(delta) {
+ var startRow = delta.start.row;
+ var len = delta.end.row - startRow;
+
+ if (len === 0) {
+ this.lines[startRow] = null;
+ } else if (delta.action == "remove") {
+ 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.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];
+
+ var data = this.tokenizer.getLineTokens(line, state, row);
+
+ 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) {
+"use strict";
+
+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);
+ }
+ }
+ };
+
+}).call(SearchHighlight.prototype);
+
+exports.SearchHighlight = SearchHighlight;
+});
+
+ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+
+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 new Error("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 new Error("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,
+ cmp, 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];
+
+ cmp = fold.range.compareStart(endRow, endColumn);
+ if (cmp == -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 || cmp === 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 pos = this.getNextFoldTo(row, column);
+
+ if (!pos || pos.kind == "inside")
+ return null;
+
+ var fold = pos.fold;
+ var folds = this.folds;
+ var foldData = this.foldData;
+
+ 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;
+
+ 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/range_list",["require","exports","module","ace/range"], function(require, exports, module) {
+"use strict";
+var Range = require("./range").Range;
+var comparePoints = Range.comparePoints;
+
+var RangeList = function() {
+ this.ranges = [];
+};
+
+(function() {
+ this.comparePoints = comparePoints;
+
+ this.pointIndex = function(pos, excludeEdges, startIndex) {
+ var list = this.ranges;
+
+ for (var i = startIndex || 0; i < list.length; i++) {
+ var range = list[i];
+ var cmpEnd = comparePoints(pos, range.end);
+ if (cmpEnd > 0)
+ continue;
+ var cmpStart = comparePoints(pos, range.start);
+ if (cmpEnd === 0)
+ return excludeEdges && cmpStart !== 0 ? -i-2 : i;
+ if (cmpStart > 0 || (cmpStart === 0 && !excludeEdges))
+ return i;
+
+ return -i-1;
+ }
+ return -i - 1;
+ };
+
+ this.add = function(range) {
+ var excludeEdges = !range.isEmpty();
+ var startIndex = this.pointIndex(range.start, excludeEdges);
+ if (startIndex < 0)
+ startIndex = -startIndex - 1;
+
+ var endIndex = this.pointIndex(range.end, excludeEdges, 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.apply(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;
+
+ list = list.sort(function(a, b) {
+ return comparePoints(a.start, b.start);
+ });
+
+ var next = list[0], range;
+ for (var i = 1; i < list.length; i++) {
+ range = next;
+ next = list[i];
+ var cmp = comparePoints(range.end, next.start);
+ if (cmp < 0)
+ continue;
+
+ if (cmp == 0 && !range.isEmpty() && !next.isEmpty())
+ continue;
+
+ if (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--;
+ }
+
+ this.ranges = list;
+
+ 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(delta) {
+ if (delta.action == "insert"){
+ var start = delta.start;
+ var end = delta.end;
+ } else {
+ var end = delta.start;
+ var start = delta.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 ) {
+ if (r.start.column == start.column && this.$insertRight) {
+ } else {
+ r.start.column += colDiff;
+ r.start.row += lineDif;
+ }
+ }
+ if (r.end.row == startRow && r.end.column >= start.column) {
+ if (r.end.column == start.column && this.$insertRight) {
+ continue;
+ }
+ if (r.end.column == start.column && colDiff > 0 && i < n - 1) {
+ if (r.end.column > r.start.column && r.end.column == ranges[i+1].start.column)
+ r.end.column -= colDiff;
+ }
+ 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/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+var RangeList = require("../range_list").RangeList;
+var oop = require("../lib/oop")
+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 = this.ranges = [];
+};
+
+oop.inherits(Fold, RangeList);
+
+(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());
+ });
+ fold.collapseChildren = this.collapseChildren;
+ return fold;
+ };
+
+ this.addSubFold = function(fold) {
+ if (this.range.isEqual(fold))
+ return;
+
+ if (!this.range.containsRange(fold))
+ throw new Error("A fold can't intersect already existing fold" + fold.range + this.range);
+ consumeRange(fold, this.start);
+
+ var row = fold.start.row, column = fold.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 new Error("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;
+ };
+
+ this.restoreRange = function(range) {
+ return restoreRange(range, this.start);
+ };
+
+}).call(Fold.prototype);
+
+function consumePoint(point, anchor) {
+ point.row -= anchor.row;
+ if (point.row == 0)
+ point.column -= anchor.column;
+}
+function consumeRange(range, anchor) {
+ consumePoint(range.start, anchor);
+ consumePoint(range.end, anchor);
+}
+function restorePoint(point, anchor) {
+ if (point.row == 0)
+ point.column += anchor.column;
+ point.row += anchor.row;
+}
+function restoreRange(range, anchor) {
+ restorePoint(range.start, anchor);
+ restorePoint(range.end, anchor);
+}
+
+});
+
+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() {
+ 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) {
+ 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);
+ }
+ }
+ start.column -= 1;
+ end.column += 1;
+
+ return foundFolds;
+ };
+
+ this.getFoldsInRangeList = function(ranges) {
+ if (Array.isArray(ranges)) {
+ var folds = [];
+ ranges.forEach(function(range) {
+ folds = folds.concat(this.getFoldsInRange(range));
+ }, this);
+ } else {
+ var folds = this.getFoldsInRange(ranges);
+ }
+ return folds;
+ };
+ this.getAllFolds = function() {
+ var folds = [];
+ var foldLines = this.$foldData;
+
+ for (var i = 0; i < foldLines.length; i++)
+ for (var j = 0; j < foldLines[i].folds.length; j++)
+ folds.push(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);
+ fold.collapseChildren = range.collapseChildren;
+ }
+ 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 ||
+ startRow == endRow && startColumn <= endColumn - 2))
+ throw new Error("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))
+ this.removeFold(startFold);
+
+ if (endFold && !endFold.range.isEnd(endRow, endColumn))
+ this.removeFold(endFold);
+ var folds = this.getFoldsInRange(fold.range);
+ if (folds.length > 0) {
+ this.removeFolds(folds);
+ folds.forEach(function(subFold) {
+ fold.addSubFold(subFold);
+ });
+ }
+
+ 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._signal("changeFold", { data: fold, action: "add" });
+
+ 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.$updating) {
+ if (this.$useWrapMode)
+ this.$updateWrapData(startRow, endRow);
+ else
+ this.$updateRowLengthCache(startRow, endRow);
+ }
+ this.$modified = true;
+ this._signal("changeFold", { data: fold, action: "remove" });
+ };
+
+ 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(subFold) {
+ fold.restoreRange(subFold);
+ this.addFold(subFold);
+ }, this);
+ if (fold.collapseChildren > 0) {
+ this.foldAll(fold.start.row+1, fold.end.row, fold.collapseChildren-1);
+ }
+ 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);
+ expandInner = true;
+ } 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.getFoldsInRangeList(range);
+ if (expandInner) {
+ this.removeFolds(folds);
+ } else {
+ var subFolds = folds;
+ while (subFolds.length) {
+ this.expandFolds(subFolds);
+ subFolds = this.getFoldsInRangeList(range);
+ }
+ }
+ if (folds.length)
+ return folds;
+ };
+ 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.getRowFoldStart = function(docRow, startFoldRow) {
+ var foldLine = this.getFoldLine(docRow, startFoldRow);
+ return foldLine ? foldLine.start.row : docRow;
+ };
+
+ this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) {
+ if (startRow == null)
+ startRow = foldLine.start.row;
+ if (startColumn == null)
+ startColumn = 0;
+ if (endRow == null)
+ endRow = foldLine.end.row;
+ if (endColumn == null)
+ endColumn = this.getLine(endRow).length;
+ var doc = this.doc;
+ var textLine = "";
+
+ foldLine.walk(function(placeholder, row, column, lastColumn) {
+ if (row < startRow)
+ return;
+ 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);
+ }
+ }, 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();
+ var type = token.type;
+ if (token && /^comment|string/.test(type)) {
+ type = type.match(/comment|string/)[0];
+ if (type == "comment")
+ type += "|doc-start";
+ var re = new RegExp(type);
+ var range = new Range();
+ 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) {
+ var lastRow = -1;
+ do {
+ token = iterator.stepForward();
+ if (lastRow == -1) {
+ var state = this.getState(iterator.$row);
+ if (!re.test(state))
+ lastRow = iterator.$row;
+ } else if (iterator.$row > lastRow) {
+ break;
+ }
+ } 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, depth) {
+ if (depth == undefined)
+ depth = 100000; // JSON.stringify doesn't hanle Infinity
+ var foldWidgets = this.foldWidgets;
+ if (!foldWidgets)
+ return; // mode doesn't support folding
+ endRow = endRow || this.getLength();
+ startRow = startRow || 0;
+ for (var row = startRow; 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.isMultiLine()
+ && range.end.row <= endRow
+ && range.start.row >= startRow
+ ) {
+ row = range.end.row;
+ try {
+ var fold = this.addFold("...", range);
+ if (fold)
+ fold.collapseChildren = depth;
+ } 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.off('change', this.$updateFoldWidgets);
+ this.off('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);
+ this._signal("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.$tokenizerUpdateFoldWidgets = this.tokenizerUpdateFoldWidgets.bind(this);
+ this.on('change', this.$updateFoldWidgets);
+ this.on('tokenizerUpdate', this.$tokenizerUpdateFoldWidgets);
+ };
+
+ this.getParentFoldRangeData = function (row, ignoreCurrent) {
+ var fw = this.foldWidgets;
+ if (!fw || (ignoreCurrent && fw[row]))
+ return {};
+
+ var i = row - 1, firstRange;
+ while (i >= 0) {
+ var c = fw[i];
+ if (c == null)
+ c = fw[i] = this.getFoldWidget(i);
+
+ if (c == "start") {
+ var range = this.getFoldWidgetRange(i);
+ if (!firstRange)
+ firstRange = range;
+ if (range && range.end.row >= row)
+ break;
+ }
+ i--;
+ }
+
+ return {
+ range: i !== -1 && range,
+ firstRange: firstRange
+ };
+ };
+
+ this.onFoldWidgetClick = function(row, e) {
+ e = e.domEvent;
+ var options = {
+ children: e.shiftKey,
+ all: e.ctrlKey || e.metaKey,
+ siblings: e.altKey
+ };
+
+ var range = this.$toggleFoldWidget(row, options);
+ if (!range) {
+ var el = (e.target || e.srcElement);
+ if (el && /ace_fold-widget/.test(el.className))
+ el.className += " ace_invalid";
+ }
+ };
+
+ this.$toggleFoldWidget = function(row, options) {
+ if (!this.getFoldWidget)
+ return;
+ var type = this.getFoldWidget(row);
+ var line = this.getLine(row);
+
+ var dir = type === "end" ? -1 : 1;
+ var fold = this.getFoldAt(row, dir === -1 ? 0 : line.length, dir);
+
+ if (fold) {
+ if (options.children || options.all)
+ this.removeFold(fold);
+ else
+ this.expandFold(fold);
+ return fold;
+ }
+
+ var range = this.getFoldWidgetRange(row, true);
+ if (range && !range.isMultiLine()) {
+ fold = this.getFoldAt(range.start.row, range.start.column, 1);
+ if (fold && range.isEqual(fold.range)) {
+ this.removeFold(fold);
+ return fold;
+ }
+ }
+
+ if (options.siblings) {
+ var data = this.getParentFoldRangeData(row);
+ if (data.range) {
+ var startRow = data.range.start.row + 1;
+ var endRow = data.range.end.row;
+ }
+ this.foldAll(startRow, endRow, options.all ? 10000 : 0);
+ } else if (options.children) {
+ endRow = range ? range.end.row : this.getLength();
+ this.foldAll(row + 1, endRow, options.all ? 10000 : 0);
+ } else if (range) {
+ if (options.all)
+ range.collapseChildren = 10000;
+ this.addFold("...", range);
+ }
+
+ return range;
+ };
+
+
+
+ this.toggleFoldWidget = function(toggleParent) {
+ var row = this.selection.getCursor().row;
+ row = this.getRowFoldStart(row);
+ var range = this.$toggleFoldWidget(row, {});
+
+ if (range)
+ return;
+ var data = this.getParentFoldRangeData(row, true);
+ range = data.range || data.firstRange;
+
+ if (range) {
+ row = range.start.row;
+ var fold = this.getFoldAt(row, this.getLine(row).length, 1);
+
+ if (fold) {
+ this.removeFold(fold);
+ } else {
+ this.addFold("...", range);
+ }
+ }
+ };
+
+ this.updateFoldWidgets = function(delta) {
+ var firstRow = delta.start.row;
+ var len = delta.end.row - firstRow;
+
+ if (len === 0) {
+ this.foldWidgets[firstRow] = null;
+ } else if (delta.action == 'remove') {
+ this.foldWidgets.splice(firstRow, len + 1, null);
+ } else {
+ var args = Array(len + 1);
+ args.unshift(firstRow, 1);
+ this.foldWidgets.splice.apply(this.foldWidgets, args);
+ }
+ };
+ this.tokenizerUpdateFoldWidgets = function(e) {
+ var rows = e.data;
+ if (rows.first != rows.last) {
+ if (this.foldWidgets.length > rows.first)
+ this.foldWidgets.splice(rows.first, this.foldWidgets.length);
+ }
+ };
+}
+
+exports.Folding = Folding;
+
+});
+
+ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+var Range = require("../range").Range;
+
+
+function BracketMatch() {
+
+ this.findMatchingBracket = function(position, chr) {
+ if (position.column == 0) return null;
+
+ var charBeforeCursor = chr || 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")
+ .replace(/\b(?:end)\b/, "(?:start|begin|end)")
+ + ")+"
+ );
+ }
+ 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")
+ .replace(/\b(?:start|begin)\b/, "(?:start|begin|end)")
+ + ")+"
+ );
+ }
+ 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/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","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) {
+"use strict";
+
+var oop = require("./lib/oop");
+var lang = require("./lib/lang");
+var BidiHandler = require("./bidihandler").BidiHandler;
+var config = require("./config");
+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.id = "session" + (++EditSession.$uid);
+ this.$foldData.toString = function() {
+ return this.join("\n");
+ };
+ this.on("changeFold", this.onChangeFold.bind(this));
+ this.$onChange = this.onChange.bind(this);
+
+ if (typeof text != "object" || !text.getLine)
+ text = new Document(text);
+
+ this.$bidiHandler = new BidiHandler(this);
+ this.setDocument(text);
+ this.selection = new Selection(this);
+
+ config.resetOptions(this);
+ this.setMode(mode);
+ config._signal("session", this);
+};
+
+
+EditSession.$uid = 0;
+
+(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 l = this.$docRowCache.length;
+ var i = this.$getRowCacheIndex(this.$docRowCache, docRow) + 1;
+ if (l > i) {
+ 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(delta) {
+ this.$modified = true;
+ this.$bidiHandler.markAsDirty();
+ this.$resetRowCache(delta.start.row);
+
+ var removedFolds = this.$updateInternalDataOnChange(delta);
+ 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 && this.bgTokenizer.$updateOnChange(delta);
+ this._signal("change", delta);
+ };
+ this.setValue = function(text) {
+ this.doc.setValue(text);
+ this.selection.moveTo(0, 0);
+
+ this.$resetRowCache(0);
+ this.$deltas = [];
+ this.$deltasDoc = [];
+ this.$deltasFold = [];
+ this.setUndoManager(this.$undoManager);
+ 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],
+ merge: self.mergeUndoDeltas
+ });
+ }
+ self.mergeUndoDeltas = false;
+ self.$deltas = [];
+ };
+ this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager);
+ }
+ };
+ this.markUndoGroup = function() {
+ if (this.$syncInformUndoManager)
+ 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.setUseSoftTabs = function(val) {
+ this.setOption("useSoftTabs", val);
+ };
+ this.getUseSoftTabs = function() {
+ return this.$useSoftTabs && !this.$mode.$indentWithTabs;
+ };
+ this.setTabSize = function(tabSize) {
+ this.setOption("tabSize", tabSize);
+ };
+ this.getTabSize = function() {
+ return this.$tabSize;
+ };
+ this.isTabStop = function(position) {
+ return this.$useSoftTabs && (position.column % this.$tabSize === 0);
+ };
+ this.setNavigateWithinSoftTabs = function (navigateWithinSoftTabs) {
+ this.setOption("navigateWithinSoftTabs", navigateWithinSoftTabs)
+ }
+ this.getNavigateWithinSoftTabs = function() {
+ return this.$navigateWithinSoftTabs;
+ }
+
+ this.$overwrite = false;
+ this.setOverwrite = function(overwrite) {
+ this.setOption("overwrite", overwrite);
+ };
+ 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._signal("changeBreakpoint", {});
+ };
+ this.removeGutterDecoration = function(row, className) {
+ this.$decorations[row] = (this.$decorations[row] || "").replace(" " + className, "");
+ this._signal("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._signal("changeBreakpoint", {});
+ };
+ this.clearBreakpoints = function() {
+ this.$breakpoints = [];
+ this._signal("changeBreakpoint", {});
+ };
+ this.setBreakpoint = function(row, className) {
+ if (className === undefined)
+ className = "ace_breakpoint";
+ if (className)
+ this.$breakpoints[row] = className;
+ else
+ delete this.$breakpoints[row];
+ this._signal("changeBreakpoint", {});
+ };
+ this.clearBreakpoint = function(row) {
+ delete this.$breakpoints[row];
+ this._signal("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._signal("changeFrontMarker");
+ } else {
+ this.$backMarkers[id] = marker;
+ this._signal("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._signal("changeFrontMarker");
+ } else {
+ this.$backMarkers[id] = marker;
+ this._signal("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._signal(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);
+ range.id = this.addMarker(range, clazz, "fullLine", inFront);
+ return range;
+ };
+ this.setAnnotations = function(annotations) {
+ this.$annotations = annotations;
+ this._signal("changeAnnotation", {});
+ };
+ this.getAnnotations = function() {
+ return this.$annotations || [];
+ };
+ this.clearAnnotations = function() {
+ this.setAnnotations([]);
+ };
+ 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.setUseWorker = function(useWorker) { this.setOption("useWorker", useWorker); };
+ this.getUseWorker = function() { return this.$useWorker; };
+ this.onReloadTokenizer = function(e) {
+ var rows = e.data;
+ this.bgTokenizer.start(rows.first);
+ this._signal("tokenizerUpdate", e);
+ };
+
+ this.$modes = {};
+ this.$mode = null;
+ this.$modeId = null;
+ this.setMode = function(mode, cb) {
+ if (mode && typeof mode === "object") {
+ if (mode.getTokenizer)
+ return this.$onChangeMode(mode);
+ var options = mode;
+ var path = options.path;
+ } else {
+ path = mode || "ace/mode/text";
+ }
+ if (!this.$modes["ace/mode/text"])
+ this.$modes["ace/mode/text"] = new TextMode();
+
+ if (this.$modes[path] && !options) {
+ this.$onChangeMode(this.$modes[path]);
+ cb && cb();
+ return;
+ }
+ this.$modeId = path;
+ config.loadModule(["mode", path], function(m) {
+ if (this.$modeId !== path)
+ return cb && cb();
+ if (this.$modes[path] && !options) {
+ this.$onChangeMode(this.$modes[path]);
+ } else if (m && m.Mode) {
+ m = new m.Mode(options);
+ if (!options) {
+ this.$modes[path] = m;
+ m.$id = path;
+ }
+ this.$onChangeMode(m);
+ }
+ cb && cb();
+ }.bind(this));
+ if (!this.$mode)
+ this.$onChangeMode(this.$modes["ace/mode/text"], true);
+ };
+
+ this.$onChangeMode = function(mode, $isPlaceholder) {
+ if (!$isPlaceholder)
+ this.$modeId = mode.$id;
+ 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._signal("tokenizerUpdate", e);
+ });
+ } else {
+ this.bgTokenizer.setTokenizer(tokenizer);
+ }
+
+ this.bgTokenizer.setDocument(this.getDocument());
+
+ this.tokenRe = mode.tokenRe;
+ this.nonTokenRe = mode.nonTokenRe;
+
+
+ if (!$isPlaceholder) {
+ if (mode.attachToSession)
+ mode.attachToSession(this);
+ this.$options.wrapMethod.set.call(this, this.$wrapMethod);
+ this.$setFolding(mode.foldingRules);
+ this.bgTokenizer.start(0);
+ this._emit("changeMode");
+ }
+ };
+
+ this.$stopWorker = function() {
+ if (this.$worker) {
+ this.$worker.terminate();
+ this.$worker = null;
+ }
+ };
+
+ this.$startWorker = function() {
+ try {
+ this.$worker = this.$mode.createWorker(this);
+ } catch (e) {
+ config.warn("Could not load worker", e);
+ this.$worker = null;
+ }
+ };
+ this.getMode = function() {
+ return this.$mode;
+ };
+
+ this.$scrollTop = 0;
+ this.setScrollTop = function(scrollTop) {
+ if (this.$scrollTop === scrollTop || isNaN(scrollTop))
+ return;
+
+ this.$scrollTop = scrollTop;
+ this._signal("changeScrollTop", scrollTop);
+ };
+ this.getScrollTop = function() {
+ return this.$scrollTop;
+ };
+
+ this.$scrollLeft = 0;
+ this.setScrollLeft = function(scrollLeft) {
+ if (this.$scrollLeft === scrollLeft || isNaN(scrollLeft))
+ return;
+
+ this.$scrollLeft = scrollLeft;
+ this._signal("changeScrollLeft", scrollLeft);
+ };
+ this.getScrollLeft = function() {
+ return this.$scrollLeft;
+ };
+ this.getScreenWidth = function() {
+ this.$computeWidth();
+ if (this.lineWidgets)
+ return Math.max(this.getLineWidgetMaxWidth(), this.screenWidth);
+ return this.screenWidth;
+ };
+
+ this.getLineWidgetMaxWidth = function() {
+ if (this.lineWidgetsWidth != null) return this.lineWidgetsWidth;
+ var width = 0;
+ this.lineWidgets.forEach(function(w) {
+ if (w && w.screenWidth > width)
+ width = w.screenWidth;
+ });
+ return this.lineWidgetWidth = width;
+ };
+
+ 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.removeFullLines = function(firstRow, lastRow){
+ return this.doc.removeFullLines(firstRow, lastRow);
+ };
+ 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) {
+ return isUndo ? delta.action !== "insert" : delta.action === "insert";
+ }
+
+ var delta = deltas[0];
+ var range, point;
+ var lastDeltaIsInsert = false;
+ if (isInsert(delta)) {
+ range = Range.fromPoints(delta.start, delta.end);
+ lastDeltaIsInsert = true;
+ } else {
+ range = Range.fromPoints(delta.start, delta.start);
+ lastDeltaIsInsert = false;
+ }
+
+ for (var i = 1; i < deltas.length; i++) {
+ delta = deltas[i];
+ if (isInsert(delta)) {
+ point = delta.start;
+ if (range.compare(point.row, point.column) == -1) {
+ range.setStart(point);
+ }
+ point = delta.end;
+ if (range.compare(point.row, point.column) == 1) {
+ range.setEnd(point);
+ }
+ lastDeltaIsInsert = true;
+ } else {
+ point = delta.start;
+ if (range.compare(point.row, point.column) == -1) {
+ range = Range.fromPoints(delta.start, delta.start);
+ }
+ lastDeltaIsInsert = false;
+ }
+ }
+ if (lastUndoRange != null) {
+ if (Range.comparePoints(lastUndoRange.start, range.start) === 0) {
+ lastUndoRange.start.column += range.end.column - range.start.column;
+ lastUndoRange.end.column += range.end.column - range.start.column;
+ }
+
+ 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, copy) {
+ var text = this.getTextRange(fromRange);
+ var folds = this.getFoldsInRange(fromRange);
+
+ var toRange = Range.fromPoints(toPosition, toPosition);
+ if (!copy) {
+ this.remove(fromRange);
+ var rowDiff = fromRange.start.row - fromRange.end.row;
+ var collDiff = rowDiff ? -fromRange.end.column : fromRange.start.column - fromRange.end.column;
+ if (collDiff) {
+ if (toRange.start.row == fromRange.end.row && toRange.start.column > fromRange.end.column)
+ toRange.start.column += collDiff;
+ if (toRange.end.row == fromRange.end.row && toRange.end.column > fromRange.end.column)
+ toRange.end.column += collDiff;
+ }
+ if (rowDiff && toRange.start.row >= fromRange.end.row) {
+ toRange.start.row += rowDiff;
+ toRange.end.row += rowDiff;
+ }
+ }
+
+ toRange.end = this.insert(toRange.start, text);
+ if (folds.length) {
+ var oldStart = fromRange.start;
+ var newStart = toRange.start;
+ var rowDiff = newStart.row - oldStart.row;
+ var collDiff = newStart.column - oldStart.column;
+ this.addFolds(folds.map(function(x) {
+ x = x.clone();
+ if (x.start.row == oldStart.row)
+ x.start.column += collDiff;
+ if (x.end.row == oldStart.row)
+ x.end.column += collDiff;
+ x.start.row += rowDiff;
+ x.end.row += rowDiff;
+ return x;
+ }));
+ }
+
+ return toRange;
+ };
+ this.indentRows = function(startRow, endRow, indentString) {
+ indentString = indentString.replace(/\t/g, this.getTabString());
+ for (var row=startRow; row<=endRow; row++)
+ this.doc.insertInLine({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.$moveLines = function(firstRow, lastRow, dir) {
+ firstRow = this.getRowFoldStart(firstRow);
+ lastRow = this.getRowFoldEnd(lastRow);
+ if (dir < 0) {
+ var row = this.getRowFoldStart(firstRow + dir);
+ if (row < 0) return 0;
+ var diff = row-firstRow;
+ } else if (dir > 0) {
+ var row = this.getRowFoldEnd(lastRow + dir);
+ if (row > this.doc.getLength()-1) return 0;
+ var diff = row-lastRow;
+ } else {
+ firstRow = this.$clipRowToDocument(firstRow);
+ lastRow = this.$clipRowToDocument(lastRow);
+ var diff = lastRow - firstRow + 1;
+ }
+
+ var range = new Range(firstRow, 0, lastRow, Number.MAX_VALUE);
+ var folds = this.getFoldsInRange(range).map(function(x){
+ x = x.clone();
+ x.start.row += diff;
+ x.end.row += diff;
+ return x;
+ });
+
+ var lines = dir == 0
+ ? this.doc.getLines(firstRow, lastRow)
+ : this.doc.removeFullLines(firstRow, lastRow);
+ this.doc.insertFullLines(firstRow+diff, lines);
+ folds.length && this.addFolds(folds);
+ return diff;
+ };
+ this.moveLinesUp = function(firstRow, lastRow) {
+ return this.$moveLines(firstRow, lastRow, -1);
+ };
+ this.moveLinesDown = function(firstRow, lastRow) {
+ return this.$moveLines(firstRow, lastRow, 1);
+ };
+ this.duplicateLines = function(firstRow, lastRow) {
+ return this.$moveLines(firstRow, lastRow, 0);
+ };
+
+
+ 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 = Array(len);
+ this.$updateWrapData(0, len - 1);
+ }
+
+ this._signal("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, max: max };
+ this.$modified = true;
+ this.$bidiHandler.markAsDirty();
+ if (this.$useWrapMode)
+ this._signal("changeWrapMode");
+ }
+ };
+ this.adjustWrapLimit = function(desiredLimit, $printMargin) {
+ var limits = this.$wrapLimitRange;
+ if (limits.max < 0)
+ limits = {min: $printMargin, max: $printMargin};
+ var wrapLimit = this.$constrainWrapLimit(desiredLimit, limits.min, limits.max);
+ if (wrapLimit != this.$wrapLimit && wrapLimit > 1) {
+ this.$wrapLimit = wrapLimit;
+ this.$modified = true;
+ if (this.$useWrapMode) {
+ this.$updateWrapData(0, this.getLength() - 1);
+ this.$resetRowCache(0);
+ this._signal("changeWrapLimit");
+ }
+ return true;
+ }
+ return false;
+ };
+
+ this.$constrainWrapLimit = function(wrapLimit, min, max) {
+ if (min)
+ wrapLimit = Math.max(min, wrapLimit);
+
+ if (max)
+ wrapLimit = Math.min(max, wrapLimit);
+
+ return wrapLimit;
+ };
+ this.getWrapLimit = function() {
+ return this.$wrapLimit;
+ };
+ this.setWrapLimit = function (limit) {
+ this.setWrapLimitRange(limit, limit);
+ };
+ this.getWrapLimitRange = function() {
+ return {
+ min : this.$wrapLimitRange.min,
+ max : this.$wrapLimitRange.max
+ };
+ };
+
+ this.$updateInternalDataOnChange = function(delta) {
+ var useWrapMode = this.$useWrapMode;
+ var action = delta.action;
+ var start = delta.start;
+ var end = delta.end;
+ var firstRow = start.row;
+ var lastRow = end.row;
+ var len = lastRow - firstRow;
+ var removedFolds = null;
+
+ this.$updating = true;
+ if (len != 0) {
+ if (action === "remove") {
+ this[useWrapMode ? "$wrapData" : "$rowLengthCache"].splice(firstRow, len);
+
+ var foldLines = this.$foldData;
+ removedFolds = this.getFoldsInRange(delta);
+ 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 = Array(len);
+ args.unshift(firstRow, 0);
+ var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache
+ arr.splice.apply(arr, 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);
+ if (foldLine) {
+ 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(delta.start.column - delta.end.column);
+ if (action === "remove") {
+ removedFolds = this.getFoldsInRange(delta);
+ 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!");
+ }
+ this.$updating = false;
+
+ 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(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
+ );
+
+ 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, tabSize) {
+ if (tokens.length == 0) {
+ return [];
+ }
+
+ var splits = [];
+ var displayLength = tokens.length;
+ var lastSplit = 0, lastDocSplit = 0;
+
+ var isCode = this.$wrapAsCode;
+
+ var indentedSoftWrap = this.$indentedSoftWrap;
+ var maxIndent = wrapLimit <= Math.max(2 * tabSize, 8)
+ || indentedSoftWrap === false ? 0 : Math.floor(wrapLimit / 2);
+
+ function getWrapIndent() {
+ var indentation = 0;
+ if (maxIndent === 0)
+ return indentation;
+ if (indentedSoftWrap) {
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (token == SPACE)
+ indentation += 1;
+ else if (token == TAB)
+ indentation += tabSize;
+ else if (token == TAB_SPACE)
+ continue;
+ else
+ break;
+ }
+ }
+ if (isCode && indentedSoftWrap !== false)
+ indentation += tabSize;
+ return Math.min(indentation, maxIndent);
+ }
+ 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;
+ });
+
+ if (!splits.length) {
+ indent = getWrapIndent();
+ splits.indent = indent;
+ }
+ lastDocSplit += len;
+ splits.push(lastDocSplit);
+ lastSplit = screenPos;
+ }
+ var indent = 0;
+ while (displayLength - lastSplit > wrapLimit - indent) {
+ var split = lastSplit + wrapLimit - indent;
+ if (tokens[split - 1] >= SPACE && tokens[split] >= SPACE) {
+ 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 - (wrapLimit -(wrapLimit>>2)), lastSplit - 1);
+ while (split > minSplit && tokens[split] < PLACEHOLDER_START) {
+ split --;
+ }
+ if (isCode) {
+ while (split > minSplit && tokens[split] < PLACEHOLDER_START) {
+ split --;
+ }
+ while (split > minSplit && tokens[split] == PUNCTUATION) {
+ split --;
+ }
+ } else {
+ while (split > minSplit && tokens[split] < SPACE) {
+ split --;
+ }
+ }
+ if (split > minSplit) {
+ addSplit(++split);
+ continue;
+ }
+ split = lastSplit + wrapLimit;
+ if (tokens[split] == CHAR_EXT)
+ split--;
+ addSplit(split - indent);
+ }
+ 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.lineWidgets = null;
+ this.getRowLength = function(row) {
+ if (this.lineWidgets)
+ var h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;
+ else
+ h = 0
+ if (!this.$useWrapMode || !this.$wrapData[row]) {
+ return 1 + h;
+ } else {
+ return this.$wrapData[row].length + 1 + h;
+ }
+ };
+ this.getRowLineCount = function(row) {
+ if (!this.$useWrapMode || !this.$wrapData[row]) {
+ return 1;
+ } else {
+ return this.$wrapData[row].length + 1;
+ }
+ };
+
+ this.getRowWrapIndent = function(screenRow) {
+ if (this.$useWrapMode) {
+ var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE);
+ var splits = this.$wrapData[pos.row];
+ return splits.length && splits[0] < pos.column ? splits.indent : 0;
+ } else {
+ return 0;
+ }
+ }
+ 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, offsetX) {
+ 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 > 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;
+ }
+ var wrapIndent = 0, splitIndex = Math.floor(screenRow - row);
+ if (this.$useWrapMode) {
+ var splits = this.$wrapData[docRow];
+ if (splits) {
+ column = splits[splitIndex];
+ if(splitIndex > 0 && splits.length) {
+ wrapIndent = splits.indent;
+ docColumn = splits[splitIndex - 1] || splits[splits.length - 1];
+ line = line.substring(docColumn);
+ }
+ }
+ }
+
+ if (offsetX !== undefined && this.$bidiHandler.isBidiRow(row + splitIndex, docRow, splitIndex))
+ screenColumn = this.$bidiHandler.offsetToCol(offsetX);
+
+ docColumn += this.$getStringScreenWidth(line, screenColumn - wrapIndent)[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;
+ }
+ var wrapIndent = 0;
+ if (this.$useWrapMode) {
+ var wrapRow = this.$wrapData[foldStartRow];
+ if (wrapRow) {
+ var screenRowOffset = 0;
+ while (textLine.length >= wrapRow[screenRowOffset]) {
+ screenRow ++;
+ screenRowOffset++;
+ }
+ textLine = textLine.substring(
+ wrapRow[screenRowOffset - 1] || 0, textLine.length
+ );
+ wrapIndent = screenRowOffset > 0 ? wrapRow.indent : 0;
+ }
+ }
+
+ return {
+ row: screenRow,
+ column: wrapIndent + 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) {
+ var splits = this.$wrapData[row];
+ screenRows += splits ? splits.length + 1 : 1;
+ row ++;
+ if (row > foldStart) {
+ row = fold.end.row+1;
+ fold = this.$foldData[i++];
+ foldStart = fold ?fold.start.row :Infinity;
+ }
+ }
+ }
+ if (this.lineWidgets)
+ screenRows += this.$getWidgetScreenLength();
+
+ return screenRows;
+ };
+ this.$setFontMetrics = function(fm) {
+ if (!this.$enableVarChar) return;
+ this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) {
+ if (maxScreenColumn === 0)
+ return [0, 0];
+ if (!maxScreenColumn)
+ maxScreenColumn = Infinity;
+ screenColumn = screenColumn || 0;
+
+ var c, column;
+ for (column = 0; column < str.length; column++) {
+ c = str.charAt(column);
+ if (c === "\t") {
+ screenColumn += this.getScreenTabSize(screenColumn);
+ } else {
+ screenColumn += fm.getCharacterWidth(c);
+ }
+ if (screenColumn > maxScreenColumn) {
+ break;
+ }
+ }
+
+ return [screenColumn, column];
+ };
+ };
+
+ this.destroy = function() {
+ if (this.bgTokenizer) {
+ this.bgTokenizer.setDocument(null);
+ this.bgTokenizer = null;
+ }
+ this.$stopWorker();
+ };
+
+ this.isFullWidth = isFullWidth;
+ 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);
+
+
+config.defineOptions(EditSession.prototype, "session", {
+ wrap: {
+ set: function(value) {
+ if (!value || value == "off")
+ value = false;
+ else if (value == "free")
+ value = true;
+ else if (value == "printMargin")
+ value = -1;
+ else if (typeof value == "string")
+ value = parseInt(value, 10) || false;
+
+ if (this.$wrap == value)
+ return;
+ this.$wrap = value;
+ if (!value) {
+ this.setUseWrapMode(false);
+ } else {
+ var col = typeof value == "number" ? value : null;
+ this.setWrapLimitRange(col, col);
+ this.setUseWrapMode(true);
+ }
+ },
+ get: function() {
+ if (this.getUseWrapMode()) {
+ if (this.$wrap == -1)
+ return "printMargin";
+ if (!this.getWrapLimitRange().min)
+ return "free";
+ return this.$wrap;
+ }
+ return "off";
+ },
+ handlesSet: true
+ },
+ wrapMethod: {
+ set: function(val) {
+ val = val == "auto"
+ ? this.$mode.type != "text"
+ : val != "text";
+ if (val != this.$wrapAsCode) {
+ this.$wrapAsCode = val;
+ if (this.$useWrapMode) {
+ this.$modified = true;
+ this.$resetRowCache(0);
+ this.$updateWrapData(0, this.getLength() - 1);
+ }
+ }
+ },
+ initialValue: "auto"
+ },
+ indentedSoftWrap: { initialValue: true },
+ firstLineNumber: {
+ set: function() {this._signal("changeBreakpoint");},
+ initialValue: 1
+ },
+ useWorker: {
+ set: function(useWorker) {
+ this.$useWorker = useWorker;
+
+ this.$stopWorker();
+ if (useWorker)
+ this.$startWorker();
+ },
+ initialValue: true
+ },
+ useSoftTabs: {initialValue: true},
+ tabSize: {
+ set: function(tabSize) {
+ if (isNaN(tabSize) || this.$tabSize === tabSize) return;
+
+ this.$modified = true;
+ this.$rowLengthCache = [];
+ this.$tabSize = tabSize;
+ this._signal("changeTabSize");
+ },
+ initialValue: 4,
+ handlesSet: true
+ },
+ navigateWithinSoftTabs: {initialValue: false},
+ overwrite: {
+ set: function(val) {this._signal("changeOverwrite");},
+ initialValue: false
+ },
+ newLineMode: {
+ set: function(val) {this.doc.setNewLineMode(val)},
+ get: function() {return this.doc.getNewLineMode()},
+ handlesSet: true
+ },
+ mode: {
+ set: function(val) { this.setMode(val) },
+ get: function() { return this.$modeId }
+ }
+});
+
+exports.EditSession = EditSession;
+});
+
+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 = {};
+};
+
+(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 options = this.$options;
+ var iterator = this.$matchIterator(session, options);
+ if (!iterator)
+ return false;
+
+ var firstRange = null;
+ iterator.forEach(function(sr, sc, er, ec) {
+ firstRange = new Range(sr, sc, er, ec);
+ if (sc == ec && options.start && options.start.start
+ && options.skipCurrent != false && firstRange.isEqual(options.start)
+ ) {
+ firstRange = null;
+ return false;
+ }
+
+ 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;
+ var prevRange;
+ outer: for (var row = re.offset || 0; row <= maxRow; row++) {
+ for (var j = 0; j < len; j++)
+ if (lines[row + j].search(re[j]) == -1)
+ continue outer;
+
+ var startLine = lines[row];
+ var line = lines[row + len - 1];
+ var startIndex = startLine.length - startLine.match(re[0])[0].length;
+ var endIndex = line.match(re[len - 1])[0].length;
+
+ if (prevRange && prevRange.end.row === row &&
+ prevRange.end.column > startIndex
+ ) {
+ continue;
+ }
+ ranges.push(prevRange = new Range(
+ row, startIndex, row + len - 1, endIndex
+ ));
+ if (len > 2)
+ row = row + len - 2;
+ }
+ } 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--;
+
+ ranges = ranges.slice(i, j + 1);
+ for (i = 0, j = ranges.length; i < j; i++) {
+ ranges[i].start.row += range.start.row;
+ ranges[i].end.row += range.start.row;
+ }
+ }
+
+ 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.$assembleRegExp = function(options, $disableFakeMultiline) {
+ 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 = addWordBoundary(needle, options);
+
+ var modifier = options.caseSensitive ? "gm" : "gmi";
+
+ options.$isMultiLine = !$disableFakeMultiline && /[\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;
+ }
+ return re;
+ };
+
+ this.$matchIterator = function(session, options) {
+ var re = this.$assembleRegExp(options);
+ if (!re)
+ return false;
+ 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;
+
+ if (backwards) {
+ var forEach = function(callback) {
+ var row = start.row;
+ if (forEachInLine(row, start.column, callback))
+ return;
+ for (row--; row >= firstRow; row--)
+ if (forEachInLine(row, Number.MAX_VALUE, callback))
+ return;
+ if (options.wrap == false)
+ return;
+ for (row = lastRow, firstRow = start.row; row >= firstRow; row--)
+ if (forEachInLine(row, Number.MAX_VALUE, callback))
+ return;
+ };
+ }
+ else {
+ var forEach = function(callback) {
+ var row = start.row;
+ if (forEachInLine(row, start.column, callback))
+ return;
+ for (row = row + 1; row <= lastRow; row++)
+ if (forEachInLine(row, 0, callback))
+ return;
+ if (options.wrap == false)
+ return;
+ for (row = firstRow, lastRow = start.row; row <= lastRow; row++)
+ if (forEachInLine(row, 0, callback))
+ return;
+ };
+ }
+
+ if (options.$isMultiLine) {
+ var len = re.length;
+ var forEachInLine = function(row, offset, callback) {
+ var startRow = backwards ? row - len + 1 : row;
+ if (startRow < 0) return;
+ var line = session.getLine(startRow);
+ var startIndex = line.search(re[0])
+ if (!backwards && startIndex < offset || startIndex === -1) return;
+ for (var i = 1; i < len; i++) {
+ line = session.getLine(startRow + i);
+ if (line.search(re[i]) == -1)
+ return;
+ }
+ var endIndex = line.match(re[len - 1])[0].length;
+ if (backwards && endIndex > offset) return;
+ if (callback(startRow, startIndex, startRow + len - 1, endIndex))
+ return true;
+ };
+ }
+ else if (backwards) {
+ var forEachInLine = function(row, endIndex, callback) {
+ var line = session.getLine(row);
+ var matches = [];
+ var m, last = 0;
+ re.lastIndex = 0;
+ while((m = re.exec(line))) {
+ var length = m[0].length;
+ last = m.index;
+ if (!length) {
+ if (last >= line.length) break;
+ re.lastIndex = last += 1;
+ }
+ if (m.index + length > endIndex)
+ break;
+ matches.push(m.index, length)
+ }
+ for (var i = matches.length - 1; i >= 0; i -= 2) {
+ var column = matches[i - 1];
+ var length = matches[i];
+ if (callback(row, column, row, column + length))
+ return true;
+ }
+ };
+ }
+ else {
+ var forEachInLine = function(row, startIndex, callback) {
+ var line = session.getLine(row);
+ var m;
+ var last = startIndex;
+ re.lastIndex = startIndex;
+ while((m = re.exec(line))) {
+ var length = m[0].length;
+ last = m.index;
+ if (callback(row, last, row,last + length))
+ return true;
+ if (!length) {
+ re.lastIndex = last += 1;
+ if (last >= line.length) return false;
+ }
+ }
+ };
+ }
+ return {forEach: forEach};
+ };
+
+}).call(Search.prototype);
+
+function addWordBoundary(needle, options) {
+ function wordBoundary(c) {
+ if (/\w/.test(c) || options.regExp) return "\\b";
+ return "";
+ }
+ return wordBoundary(needle[0]) + needle
+ + wordBoundary(needle[needle.length - 1]);
+}
+
+exports.Search = Search;
+});
+
+ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) {
+"use strict";
+
+var keyUtil = require("../lib/keys");
+var useragent = require("../lib/useragent");
+var KEY_MODS = keyUtil.KEY_MODS;
+
+function HashHandler(config, platform) {
+ this.platform = platform || (useragent.isMac ? "mac" : "win");
+ this.commands = {};
+ this.commandKeyBinding = {};
+ this.addCommands(config);
+ this.$singleCommand = true;
+}
+
+function MultiHashHandler(config, platform) {
+ HashHandler.call(this, config, platform);
+ this.$singleCommand = false;
+}
+
+MultiHashHandler.prototype = HashHandler.prototype;
+
+(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, keepCommand) {
+ var name = command && (typeof command === 'string' ? command : command.name);
+ command = this.commands[name];
+ if (!keepCommand)
+ delete this.commands[name];
+ var ckb = this.commandKeyBinding;
+ for (var keyId in ckb) {
+ var cmdGroup = ckb[keyId];
+ if (cmdGroup == command) {
+ delete ckb[keyId];
+ } else if (Array.isArray(cmdGroup)) {
+ var i = cmdGroup.indexOf(command);
+ if (i != -1) {
+ cmdGroup.splice(i, 1);
+ if (cmdGroup.length == 1)
+ ckb[keyId] = cmdGroup[0];
+ }
+ }
+ }
+ };
+
+ this.bindKey = function(key, command, position) {
+ if (typeof key == "object" && key) {
+ if (position == undefined)
+ position = key.position;
+ key = key[this.platform];
+ }
+ if (!key)
+ return;
+ if (typeof command == "function")
+ return this.addCommand({exec: command, bindKey: key, name: command.name || key});
+
+ key.split("|").forEach(function(keyPart) {
+ var chain = "";
+ if (keyPart.indexOf(" ") != -1) {
+ var parts = keyPart.split(/\s+/);
+ keyPart = parts.pop();
+ parts.forEach(function(keyPart) {
+ var binding = this.parseKeys(keyPart);
+ var id = KEY_MODS[binding.hashId] + binding.key;
+ chain += (chain ? " " : "") + id;
+ this._addCommandToBinding(chain, "chainKeys");
+ }, this);
+ chain += " ";
+ }
+ var binding = this.parseKeys(keyPart);
+ var id = KEY_MODS[binding.hashId] + binding.key;
+ this._addCommandToBinding(chain + id, command, position);
+ }, this);
+ };
+
+ function getPosition(command) {
+ return typeof command == "object" && command.bindKey
+ && command.bindKey.position
+ || (command.isDefault ? -100 : 0);
+ }
+ this._addCommandToBinding = function(keyId, command, position) {
+ var ckb = this.commandKeyBinding, i;
+ if (!command) {
+ delete ckb[keyId];
+ } else if (!ckb[keyId] || this.$singleCommand) {
+ ckb[keyId] = command;
+ } else {
+ if (!Array.isArray(ckb[keyId])) {
+ ckb[keyId] = [ckb[keyId]];
+ } else if ((i = ckb[keyId].indexOf(command)) != -1) {
+ ckb[keyId].splice(i, 1);
+ }
+
+ if (typeof position != "number") {
+ position = getPosition(command);
+ }
+
+ var commands = ckb[keyId];
+ for (i = 0; i < commands.length; i++) {
+ var other = commands[i];
+ var otherPos = getPosition(other);
+ if (otherPos > position)
+ break;
+ }
+ commands.splice(i, 0, command);
+ }
+ };
+
+ this.addCommands = function(commands) {
+ commands && Object.keys(commands).forEach(function(name) {
+ var command = commands[name];
+ if (!command)
+ return;
+
+ if (typeof command === "string")
+ return this.bindKey(command, name);
+
+ if (typeof command === "function")
+ command = { exec: command };
+
+ if (typeof command !== "object")
+ return;
+
+ 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) {
+ this.bindKey(command.bindKey, 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) {
+ if (typeof console != "undefined")
+ console.error("invalid modifier " + parts[i] + " in " + keys);
+ return false;
+ }
+ hashId |= modifier;
+ }
+ return {key: key, hashId: hashId};
+ };
+
+ this.findKeyCommand = function findKeyCommand(hashId, keyString) {
+ var key = KEY_MODS[hashId] + keyString;
+ return this.commandKeyBinding[key];
+ };
+
+ this.handleKeyboard = function(data, hashId, keyString, keyCode) {
+ if (keyCode < 0) return;
+ var key = KEY_MODS[hashId] + keyString;
+ var command = this.commandKeyBinding[key];
+ if (data.$keyChain) {
+ data.$keyChain += " " + key;
+ command = this.commandKeyBinding[data.$keyChain] || command;
+ }
+
+ if (command) {
+ if (command == "chainKeys" || command[command.length - 1] == "chainKeys") {
+ data.$keyChain = data.$keyChain || key;
+ return {command: "null"};
+ }
+ }
+
+ if (data.$keyChain) {
+ if ((!hashId || hashId == 4) && keyString.length == 1)
+ data.$keyChain = data.$keyChain.slice(0, -key.length - 1); // wait for input
+ else if (hashId == -1 || keyCode > 0)
+ data.$keyChain = ""; // reset keyChain
+ }
+ return {command: command};
+ };
+
+ this.getStatusText = function(editor, data) {
+ return data.$keyChain || "";
+ };
+
+}).call(HashHandler.prototype);
+
+exports.HashHandler = HashHandler;
+exports.MultiHashHandler = MultiHashHandler;
+});
+
+ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var MultiHashHandler = require("../keyboard/hash_handler").MultiHashHandler;
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+
+var CommandManager = function(platform, commands) {
+ MultiHashHandler.call(this, commands, platform);
+ this.byName = this.commands;
+ this.setDefaultHandler("exec", function(e) {
+ return e.command.exec(e.editor, e.args || {});
+ });
+};
+
+oop.inherits(CommandManager, MultiHashHandler);
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.exec = function(command, editor, args) {
+ if (Array.isArray(command)) {
+ for (var i = command.length; i--; ) {
+ if (this.exec(command[i], editor, args)) return true;
+ }
+ return false;
+ }
+
+ if (typeof command === "string")
+ command = this.commands[command];
+
+ if (!command)
+ return false;
+
+ if (editor && editor.$readOnly && !command.readOnly)
+ return false;
+
+ if (command.isAvailable && !command.isAvailable(editor))
+ return false;
+
+ var e = {editor: editor, command: command, args: args};
+ e.returnValue = this._emit("exec", e);
+ this._signal("afterExec", e);
+
+ return e.returnValue === 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/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"], function(require, exports, module) {
+"use strict";
+
+var lang = require("../lib/lang");
+var config = require("../config");
+var Range = require("../range").Range;
+
+function bindKey(win, mac) {
+ return {win: win, mac: mac};
+}
+exports.commands = [{
+ name: "showSettingsMenu",
+ bindKey: bindKey("Ctrl-,", "Command-,"),
+ exec: function(editor) {
+ config.loadModule("ace/ext/settings_menu", function(module) {
+ module.init(editor);
+ editor.showSettingsMenu();
+ });
+ },
+ readOnly: true
+}, {
+ name: "goToNextError",
+ bindKey: bindKey("Alt-E", "F4"),
+ exec: function(editor) {
+ config.loadModule("ace/ext/error_marker", function(module) {
+ module.showErrorMarker(editor, 1);
+ });
+ },
+ scrollIntoView: "animate",
+ readOnly: true
+}, {
+ name: "goToPreviousError",
+ bindKey: bindKey("Alt-Shift-E", "Shift-F4"),
+ exec: function(editor) {
+ config.loadModule("ace/ext/error_marker", function(module) {
+ module.showErrorMarker(editor, -1);
+ });
+ },
+ scrollIntoView: "animate",
+ readOnly: true
+}, {
+ 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); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "center",
+ 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); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "center",
+ readOnly: true
+}, {
+ name: "toggleFoldWidget",
+ bindKey: bindKey("F2", "F2"),
+ exec: function(editor) { editor.session.toggleFoldWidget(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "center",
+ readOnly: true
+}, {
+ name: "toggleParentFoldWidget",
+ bindKey: bindKey("Alt-F2", "Alt-F2"),
+ exec: function(editor) { editor.session.toggleFoldWidget(true); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "center",
+ readOnly: true
+}, {
+ name: "foldall",
+ bindKey: bindKey(null, "Ctrl-Command-Option-0"),
+ exec: function(editor) { editor.session.foldAll(); },
+ scrollIntoView: "center",
+ readOnly: true
+}, {
+ name: "foldOther",
+ bindKey: bindKey("Alt-0", "Command-Option-0"),
+ exec: function(editor) {
+ editor.session.foldAll();
+ editor.session.unfold(editor.selection.getAllRanges());
+ },
+ scrollIntoView: "center",
+ readOnly: true
+}, {
+ name: "unfoldall",
+ bindKey: bindKey("Alt-Shift-0", "Command-Option-Shift-0"),
+ exec: function(editor) { editor.session.unfold(); },
+ scrollIntoView: "center",
+ readOnly: true
+}, {
+ name: "findnext",
+ bindKey: bindKey("Ctrl-K", "Command-G"),
+ exec: function(editor) { editor.findNext(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "center",
+ readOnly: true
+}, {
+ name: "findprevious",
+ bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"),
+ exec: function(editor) { editor.findPrevious(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "center",
+ readOnly: true
+}, {
+ name: "selectOrFindNext",
+ bindKey: bindKey("Alt-K", "Ctrl-G"),
+ exec: function(editor) {
+ if (editor.selection.isEmpty())
+ editor.selection.selectWord();
+ else
+ editor.findNext();
+ },
+ readOnly: true
+}, {
+ name: "selectOrFindPrevious",
+ bindKey: bindKey("Alt-Shift-K", "Ctrl-Shift-G"),
+ exec: function(editor) {
+ if (editor.selection.isEmpty())
+ editor.selection.selectWord();
+ else
+ editor.findPrevious();
+ },
+ readOnly: true
+}, {
+ name: "find",
+ bindKey: bindKey("Ctrl-F", "Command-F"),
+ exec: function(editor) {
+ config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor)});
+ },
+ readOnly: true
+}, {
+ name: "overwrite",
+ bindKey: "Insert",
+ exec: function(editor) { editor.toggleOverwrite(); },
+ readOnly: true
+}, {
+ name: "selecttostart",
+ bindKey: bindKey("Ctrl-Shift-Home", "Command-Shift-Home|Command-Shift-Up"),
+ exec: function(editor) { editor.getSelection().selectFileStart(); },
+ multiSelectAction: "forEach",
+ readOnly: true,
+ scrollIntoView: "animate",
+ aceCommandGroup: "fileJump"
+}, {
+ name: "gotostart",
+ bindKey: bindKey("Ctrl-Home", "Command-Home|Command-Up"),
+ exec: function(editor) { editor.navigateFileStart(); },
+ multiSelectAction: "forEach",
+ readOnly: true,
+ scrollIntoView: "animate",
+ aceCommandGroup: "fileJump"
+}, {
+ name: "selectup",
+ bindKey: bindKey("Shift-Up", "Shift-Up|Ctrl-Shift-P"),
+ exec: function(editor) { editor.getSelection().selectUp(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "golineup",
+ bindKey: bindKey("Up", "Up|Ctrl-P"),
+ exec: function(editor, args) { editor.navigateUp(args.times); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "selecttoend",
+ bindKey: bindKey("Ctrl-Shift-End", "Command-Shift-End|Command-Shift-Down"),
+ exec: function(editor) { editor.getSelection().selectFileEnd(); },
+ multiSelectAction: "forEach",
+ readOnly: true,
+ scrollIntoView: "animate",
+ aceCommandGroup: "fileJump"
+}, {
+ name: "gotoend",
+ bindKey: bindKey("Ctrl-End", "Command-End|Command-Down"),
+ exec: function(editor) { editor.navigateFileEnd(); },
+ multiSelectAction: "forEach",
+ readOnly: true,
+ scrollIntoView: "animate",
+ aceCommandGroup: "fileJump"
+}, {
+ name: "selectdown",
+ bindKey: bindKey("Shift-Down", "Shift-Down|Ctrl-Shift-N"),
+ exec: function(editor) { editor.getSelection().selectDown(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "golinedown",
+ bindKey: bindKey("Down", "Down|Ctrl-N"),
+ exec: function(editor, args) { editor.navigateDown(args.times); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "selectwordleft",
+ bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"),
+ exec: function(editor) { editor.getSelection().selectWordLeft(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "gotowordleft",
+ bindKey: bindKey("Ctrl-Left", "Option-Left"),
+ exec: function(editor) { editor.navigateWordLeft(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "selecttolinestart",
+ bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left|Ctrl-Shift-A"),
+ exec: function(editor) { editor.getSelection().selectLineStart(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "gotolinestart",
+ bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"),
+ exec: function(editor) { editor.navigateLineStart(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "selectleft",
+ bindKey: bindKey("Shift-Left", "Shift-Left|Ctrl-Shift-B"),
+ exec: function(editor) { editor.getSelection().selectLeft(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "gotoleft",
+ bindKey: bindKey("Left", "Left|Ctrl-B"),
+ exec: function(editor, args) { editor.navigateLeft(args.times); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "selectwordright",
+ bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"),
+ exec: function(editor) { editor.getSelection().selectWordRight(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "gotowordright",
+ bindKey: bindKey("Ctrl-Right", "Option-Right"),
+ exec: function(editor) { editor.navigateWordRight(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "selecttolineend",
+ bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right|Shift-End|Ctrl-Shift-E"),
+ exec: function(editor) { editor.getSelection().selectLineEnd(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "gotolineend",
+ bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"),
+ exec: function(editor) { editor.navigateLineEnd(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "selectright",
+ bindKey: bindKey("Shift-Right", "Shift-Right"),
+ exec: function(editor) { editor.getSelection().selectRight(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "gotoright",
+ bindKey: bindKey("Right", "Right|Ctrl-F"),
+ exec: function(editor, args) { editor.navigateRight(args.times); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ 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",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "selectlineend",
+ bindKey: "Shift-End",
+ exec: function(editor) { editor.getSelection().selectLineEnd(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ 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-P"),
+ exec: function(editor) { editor.jumpToMatching(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "animate",
+ readOnly: true
+}, {
+ name: "selecttomatching",
+ bindKey: bindKey("Ctrl-Shift-P", "Ctrl-Shift-P"),
+ exec: function(editor) { editor.jumpToMatching(true); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "animate",
+ readOnly: true
+}, {
+ name: "expandToMatching",
+ bindKey: bindKey("Ctrl-Shift-M", "Ctrl-Shift-M"),
+ exec: function(editor) { editor.jumpToMatching(true, true); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "animate",
+ readOnly: true
+}, {
+ name: "passKeysToBrowser",
+ bindKey: bindKey(null, null),
+ exec: function() {},
+ passEvent: true,
+ readOnly: true
+}, {
+ name: "copy",
+ exec: function(editor) {
+ },
+ 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();
+ }
+ },
+ scrollIntoView: "cursor",
+ multiSelectAction: "forEach"
+}, {
+ name: "paste",
+ exec: function(editor, args) {
+ editor.$handlePaste(args);
+ },
+ scrollIntoView: "cursor"
+}, {
+ name: "removeline",
+ bindKey: bindKey("Ctrl-D", "Command-D"),
+ exec: function(editor) { editor.removeLines(); },
+ scrollIntoView: "cursor",
+ multiSelectAction: "forEachLine"
+}, {
+ name: "duplicateSelection",
+ bindKey: bindKey("Ctrl-Shift-D", "Command-Shift-D"),
+ exec: function(editor) { editor.duplicateSelection(); },
+ scrollIntoView: "cursor",
+ multiSelectAction: "forEach"
+}, {
+ name: "sortlines",
+ bindKey: bindKey("Ctrl-Alt-S", "Command-Alt-S"),
+ exec: function(editor) { editor.sortLines(); },
+ scrollIntoView: "selection",
+ multiSelectAction: "forEachLine"
+}, {
+ name: "togglecomment",
+ bindKey: bindKey("Ctrl-/", "Command-/"),
+ exec: function(editor) { editor.toggleCommentLines(); },
+ multiSelectAction: "forEachLine",
+ scrollIntoView: "selectionPart"
+}, {
+ name: "toggleBlockComment",
+ bindKey: bindKey("Ctrl-Shift-/", "Command-Shift-/"),
+ exec: function(editor) { editor.toggleBlockComment(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "selectionPart"
+}, {
+ name: "modifyNumberUp",
+ bindKey: bindKey("Ctrl-Shift-Up", "Alt-Shift-Up"),
+ exec: function(editor) { editor.modifyNumber(1); },
+ scrollIntoView: "cursor",
+ multiSelectAction: "forEach"
+}, {
+ name: "modifyNumberDown",
+ bindKey: bindKey("Ctrl-Shift-Down", "Alt-Shift-Down"),
+ exec: function(editor) { editor.modifyNumber(-1); },
+ scrollIntoView: "cursor",
+ multiSelectAction: "forEach"
+}, {
+ name: "replace",
+ bindKey: bindKey("Ctrl-H", "Command-Option-F"),
+ exec: function(editor) {
+ config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor, true)});
+ }
+}, {
+ 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(); },
+ scrollIntoView: "cursor"
+}, {
+ name: "movelinesup",
+ bindKey: bindKey("Alt-Up", "Option-Up"),
+ exec: function(editor) { editor.moveLinesUp(); },
+ scrollIntoView: "cursor"
+}, {
+ name: "copylinesdown",
+ bindKey: bindKey("Alt-Shift-Down", "Command-Option-Down"),
+ exec: function(editor) { editor.copyLinesDown(); },
+ scrollIntoView: "cursor"
+}, {
+ name: "movelinesdown",
+ bindKey: bindKey("Alt-Down", "Option-Down"),
+ exec: function(editor) { editor.moveLinesDown(); },
+ scrollIntoView: "cursor"
+}, {
+ name: "del",
+ bindKey: bindKey("Delete", "Delete|Ctrl-D|Shift-Delete"),
+ exec: function(editor) { editor.remove("right"); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
+}, {
+ name: "backspace",
+ bindKey: bindKey(
+ "Shift-Backspace|Backspace",
+ "Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"
+ ),
+ exec: function(editor) { editor.remove("left"); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
+}, {
+ name: "cut_or_delete",
+ bindKey: bindKey("Shift-Delete", null),
+ exec: function(editor) {
+ if (editor.selection.isEmpty()) {
+ editor.remove("left");
+ } else {
+ return false;
+ }
+ },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
+}, {
+ name: "removetolinestart",
+ bindKey: bindKey("Alt-Backspace", "Command-Backspace"),
+ exec: function(editor) { editor.removeToLineStart(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
+}, {
+ name: "removetolineend",
+ bindKey: bindKey("Alt-Delete", "Ctrl-K"),
+ exec: function(editor) { editor.removeToLineEnd(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
+}, {
+ name: "removewordleft",
+ bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"),
+ exec: function(editor) { editor.removeWordLeft(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
+}, {
+ name: "removewordright",
+ bindKey: bindKey("Ctrl-Delete", "Alt-Delete"),
+ exec: function(editor) { editor.removeWordRight(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
+}, {
+ name: "outdent",
+ bindKey: bindKey("Shift-Tab", "Shift-Tab"),
+ exec: function(editor) { editor.blockOutdent(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "selectionPart"
+}, {
+ name: "indent",
+ bindKey: bindKey("Tab", "Tab"),
+ exec: function(editor) { editor.indent(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "selectionPart"
+}, {
+ name: "blockoutdent",
+ bindKey: bindKey("Ctrl-[", "Ctrl-["),
+ exec: function(editor) { editor.blockOutdent(); },
+ multiSelectAction: "forEachLine",
+ scrollIntoView: "selectionPart"
+}, {
+ name: "blockindent",
+ bindKey: bindKey("Ctrl-]", "Ctrl-]"),
+ exec: function(editor) { editor.blockIndent(); },
+ multiSelectAction: "forEachLine",
+ scrollIntoView: "selectionPart"
+}, {
+ name: "insertstring",
+ exec: function(editor, str) { editor.insert(str); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
+}, {
+ name: "inserttext",
+ exec: function(editor, args) {
+ editor.insert(lang.stringRepeat(args.text || "", args.times || 1));
+ },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
+}, {
+ name: "splitline",
+ bindKey: bindKey(null, "Ctrl-O"),
+ exec: function(editor) { editor.splitLine(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
+}, {
+ name: "transposeletters",
+ bindKey: bindKey("Alt-Shift-X", "Ctrl-T"),
+ exec: function(editor) { editor.transposeLetters(); },
+ multiSelectAction: function(editor) {editor.transposeSelections(1); },
+ scrollIntoView: "cursor"
+}, {
+ name: "touppercase",
+ bindKey: bindKey("Ctrl-U", "Ctrl-U"),
+ exec: function(editor) { editor.toUpperCase(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
+}, {
+ name: "tolowercase",
+ bindKey: bindKey("Ctrl-Shift-U", "Ctrl-Shift-U"),
+ exec: function(editor) { editor.toLowerCase(); },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor"
+}, {
+ name: "expandtoline",
+ bindKey: bindKey("Ctrl-Shift-L", "Command-Shift-L"),
+ exec: function(editor) {
+ var range = editor.selection.getRange();
+
+ range.start.column = range.end.column = 0;
+ range.end.row++;
+ editor.selection.setRange(range, false);
+ },
+ multiSelectAction: "forEach",
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "joinlines",
+ bindKey: bindKey(null, null),
+ exec: function(editor) {
+ var isBackwards = editor.selection.isBackwards();
+ var selectionStart = isBackwards ? editor.selection.getSelectionLead() : editor.selection.getSelectionAnchor();
+ var selectionEnd = isBackwards ? editor.selection.getSelectionAnchor() : editor.selection.getSelectionLead();
+ var firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length;
+ var selectedText = editor.session.doc.getTextRange(editor.selection.getRange());
+ var selectedCount = selectedText.replace(/\n\s*/, " ").length;
+ var insertLine = editor.session.doc.getLine(selectionStart.row);
+
+ for (var i = selectionStart.row + 1; i <= selectionEnd.row + 1; i++) {
+ var curLine = lang.stringTrimLeft(lang.stringTrimRight(editor.session.doc.getLine(i)));
+ if (curLine.length !== 0) {
+ curLine = " " + curLine;
+ }
+ insertLine += curLine;
+ }
+
+ if (selectionEnd.row + 1 < (editor.session.doc.getLength() - 1)) {
+ insertLine += editor.session.doc.getNewLineCharacter();
+ }
+
+ editor.clearSelection();
+ editor.session.doc.replace(new Range(selectionStart.row, 0, selectionEnd.row + 2, 0), insertLine);
+
+ if (selectedCount > 0) {
+ editor.selection.moveCursorTo(selectionStart.row, selectionStart.column);
+ editor.selection.selectTo(selectionStart.row, selectionStart.column + selectedCount);
+ } else {
+ firstLineEndCol = editor.session.doc.getLine(selectionStart.row).length > firstLineEndCol ? (firstLineEndCol + 1) : firstLineEndCol;
+ editor.selection.moveCursorTo(selectionStart.row, firstLineEndCol);
+ }
+ },
+ multiSelectAction: "forEach",
+ readOnly: true
+}, {
+ name: "invertSelection",
+ bindKey: bindKey(null, null),
+ exec: function(editor) {
+ var endRow = editor.session.doc.getLength() - 1;
+ var endCol = editor.session.doc.getLine(endRow).length;
+ var ranges = editor.selection.rangeList.ranges;
+ var newRanges = [];
+ if (ranges.length < 1) {
+ ranges = [editor.selection.getRange()];
+ }
+
+ for (var i = 0; i < ranges.length; i++) {
+ if (i == (ranges.length - 1)) {
+ if (!(ranges[i].end.row === endRow && ranges[i].end.column === endCol)) {
+ newRanges.push(new Range(ranges[i].end.row, ranges[i].end.column, endRow, endCol));
+ }
+ }
+
+ if (i === 0) {
+ if (!(ranges[i].start.row === 0 && ranges[i].start.column === 0)) {
+ newRanges.push(new Range(0, 0, ranges[i].start.row, ranges[i].start.column));
+ }
+ } else {
+ newRanges.push(new Range(ranges[i-1].end.row, ranges[i-1].end.column, ranges[i].start.row, ranges[i].start.column));
+ }
+ }
+
+ editor.exitMultiSelectMode();
+ editor.clearSelection();
+
+ for(var i = 0; i < newRanges.length; i++) {
+ editor.selection.addRange(newRanges[i], false);
+ }
+ },
+ readOnly: true,
+ scrollIntoView: "none"
+}];
+
+});
+
+ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","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","ace/config","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+require("./lib/fixoldbrowsers");
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+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 config = require("./config");
+var TokenIterator = require("./token_iterator").TokenIterator;
+var Editor = function(renderer, session) {
+ var container = renderer.getContainerElement();
+ this.container = container;
+ this.renderer = renderer;
+ this.id = "editor" + (++Editor.$uid);
+
+ this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands);
+ if (typeof document == "object") {
+ this.textInput = new TextInput(renderer.getTextAreaContainer(), this);
+ this.renderer.textarea = this.textInput.getElement();
+ this.$mouseHandler = new MouseHandler(this);
+ new FoldHandler(this);
+ }
+
+ this.keyBinding = new KeyBinding(this);
+
+ this.$blockScrolling = 0;
+ this.$search = new Search().set({
+ wrap: true
+ });
+
+ this.$historyTracker = this.$historyTracker.bind(this);
+ this.commands.on("exec", this.$historyTracker);
+
+ this.$initOperationListeners();
+
+ this._$emitInputEvent = lang.delayedCall(function() {
+ this._signal("input", {});
+ if (this.session && this.session.bgTokenizer)
+ this.session.bgTokenizer.scheduleStart();
+ }.bind(this));
+
+ this.on("change", function(_, _self) {
+ _self._$emitInputEvent.schedule(31);
+ });
+
+ this.setSession(session || new EditSession(""));
+ config.resetOptions(this);
+ config._signal("editor", this);
+};
+
+Editor.$uid = 0;
+
+(function(){
+
+ oop.implement(this, EventEmitter);
+
+ this.$initOperationListeners = function() {
+ function last(a) {return a[a.length - 1]}
+
+ this.selections = [];
+ this.commands.on("exec", this.startOperation.bind(this), true);
+ this.commands.on("afterExec", this.endOperation.bind(this), true);
+
+ this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this));
+
+ this.on("change", function() {
+ this.curOp || this.startOperation();
+ this.curOp.docChanged = true;
+ }.bind(this), true);
+
+ this.on("changeSelection", function() {
+ this.curOp || this.startOperation();
+ this.curOp.selectionChanged = true;
+ }.bind(this), true);
+ };
+
+ this.curOp = null;
+ this.prevOp = {};
+ this.startOperation = function(commadEvent) {
+ if (this.curOp) {
+ if (!commadEvent || this.curOp.command)
+ return;
+ this.prevOp = this.curOp;
+ }
+ if (!commadEvent) {
+ this.previousCommand = null;
+ commadEvent = {};
+ }
+
+ this.$opResetTimer.schedule();
+ this.curOp = {
+ command: commadEvent.command || {},
+ args: commadEvent.args,
+ scrollTop: this.renderer.scrollTop
+ };
+ if (this.curOp.command.name && this.curOp.command.scrollIntoView !== undefined)
+ this.$blockScrolling++;
+ };
+
+ this.endOperation = function(e) {
+ if (this.curOp) {
+ if (e && e.returnValue === false)
+ return this.curOp = null;
+ this._signal("beforeEndOperation");
+ var command = this.curOp.command;
+ if (command.name && this.$blockScrolling > 0)
+ this.$blockScrolling--;
+ var scrollIntoView = command && command.scrollIntoView;
+ if (scrollIntoView) {
+ switch (scrollIntoView) {
+ case "center-animate":
+ scrollIntoView = "animate";
+ case "center":
+ this.renderer.scrollCursorIntoView(null, 0.5);
+ break;
+ case "animate":
+ case "cursor":
+ this.renderer.scrollCursorIntoView();
+ break;
+ case "selectionPart":
+ var range = this.selection.getRange();
+ var config = this.renderer.layerConfig;
+ if (range.start.row >= config.lastRow || range.end.row <= config.firstRow) {
+ this.renderer.scrollSelectionIntoView(this.selection.anchor, this.selection.lead);
+ }
+ break;
+ default:
+ break;
+ }
+ if (scrollIntoView == "animate")
+ this.renderer.animateScrolling(this.curOp.scrollTop);
+ }
+
+ this.prevOp = this.curOp;
+ this.curOp = null;
+ }
+ };
+ this.$mergeableCommands = ["backspace", "del", "insertstring"];
+ this.$historyTracker = function(e) {
+ if (!this.$mergeUndoDeltas)
+ return;
+
+ var prev = this.prevOp;
+ var mergeableCommands = this.$mergeableCommands;
+ var shouldMerge = prev.command && (e.command.name == prev.command.name);
+ if (e.command.name == "insertstring") {
+ var text = e.args;
+ if (this.mergeNextCommand === undefined)
+ this.mergeNextCommand = true;
+
+ shouldMerge = shouldMerge
+ && this.mergeNextCommand // previous command allows to coalesce with
+ && (!/\s/.test(text) || /\s/.test(prev.args)); // previous insertion was of same type
+
+ this.mergeNextCommand = true;
+ } else {
+ shouldMerge = shouldMerge
+ && mergeableCommands.indexOf(e.command.name) !== -1; // the command is mergeable
+ }
+
+ if (
+ this.$mergeUndoDeltas != "always"
+ && Date.now() - this.sequenceStartTime > 2000
+ ) {
+ shouldMerge = false; // the sequence is too long
+ }
+
+ if (shouldMerge)
+ this.session.mergeUndoDeltas = true;
+ else if (mergeableCommands.indexOf(e.command.name) !== -1)
+ this.sequenceStartTime = Date.now();
+ };
+ this.setKeyboardHandler = function(keyboardHandler, cb) {
+ if (keyboardHandler && typeof keyboardHandler === "string") {
+ this.$keybindingId = keyboardHandler;
+ var _self = this;
+ config.loadModule(["keybinding", keyboardHandler], function(module) {
+ if (_self.$keybindingId == keyboardHandler)
+ _self.keyBinding.setKeyboardHandler(module && module.handler);
+ cb && cb();
+ });
+ } else {
+ this.$keybindingId = null;
+ this.keyBinding.setKeyboardHandler(keyboardHandler);
+ cb && cb();
+ }
+ };
+ this.getKeyboardHandler = function() {
+ return this.keyBinding.getKeyboardHandler();
+ };
+ this.setSession = function(session) {
+ if (this.session == session)
+ return;
+ if (this.curOp) this.endOperation();
+ this.curOp = {};
+
+ var oldSession = this.session;
+ if (oldSession) {
+ this.session.off("change", this.$onDocumentChange);
+ this.session.off("changeMode", this.$onChangeMode);
+ this.session.off("tokenizerUpdate", this.$onTokenizerUpdate);
+ this.session.off("changeTabSize", this.$onChangeTabSize);
+ this.session.off("changeWrapLimit", this.$onChangeWrapLimit);
+ this.session.off("changeWrapMode", this.$onChangeWrapMode);
+ this.session.off("changeFold", this.$onChangeFold);
+ this.session.off("changeFrontMarker", this.$onChangeFrontMarker);
+ this.session.off("changeBackMarker", this.$onChangeBackMarker);
+ this.session.off("changeBreakpoint", this.$onChangeBreakpoint);
+ this.session.off("changeAnnotation", this.$onChangeAnnotation);
+ this.session.off("changeOverwrite", this.$onCursorChange);
+ this.session.off("changeScrollTop", this.$onScrollTopChange);
+ this.session.off("changeScrollLeft", this.$onScrollLeftChange);
+
+ var selection = this.session.getSelection();
+ selection.off("changeCursor", this.$onCursorChange);
+ selection.off("changeSelection", this.$onSelectionChange);
+ }
+
+ this.session = session;
+ if (session) {
+ this.$onDocumentChange = this.onDocumentChange.bind(this);
+ session.on("change", this.$onDocumentChange);
+ this.renderer.setSession(session);
+
+ this.$onChangeMode = this.onChangeMode.bind(this);
+ session.on("changeMode", this.$onChangeMode);
+
+ this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this);
+ session.on("tokenizerUpdate", this.$onTokenizerUpdate);
+
+ this.$onChangeTabSize = this.renderer.onChangeTabSize.bind(this.renderer);
+ session.on("changeTabSize", this.$onChangeTabSize);
+
+ this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this);
+ session.on("changeWrapLimit", this.$onChangeWrapLimit);
+
+ this.$onChangeWrapMode = this.onChangeWrapMode.bind(this);
+ session.on("changeWrapMode", this.$onChangeWrapMode);
+
+ this.$onChangeFold = this.onChangeFold.bind(this);
+ session.on("changeFold", this.$onChangeFold);
+
+ this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this);
+ this.session.on("changeFrontMarker", this.$onChangeFrontMarker);
+
+ this.$onChangeBackMarker = this.onChangeBackMarker.bind(this);
+ this.session.on("changeBackMarker", this.$onChangeBackMarker);
+
+ this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this);
+ this.session.on("changeBreakpoint", this.$onChangeBreakpoint);
+
+ this.$onChangeAnnotation = this.onChangeAnnotation.bind(this);
+ this.session.on("changeAnnotation", this.$onChangeAnnotation);
+
+ this.$onCursorChange = this.onCursorChange.bind(this);
+ this.session.on("changeOverwrite", this.$onCursorChange);
+
+ this.$onScrollTopChange = this.onScrollTopChange.bind(this);
+ this.session.on("changeScrollTop", this.$onScrollTopChange);
+
+ this.$onScrollLeftChange = this.onScrollLeftChange.bind(this);
+ this.session.on("changeScrollLeft", this.$onScrollLeftChange);
+
+ this.selection = session.getSelection();
+ this.selection.on("changeCursor", this.$onCursorChange);
+
+ this.$onSelectionChange = this.onSelectionChange.bind(this);
+ this.selection.on("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();
+ } else {
+ this.selection = null;
+ this.renderer.setSession(session);
+ }
+
+ this._signal("changeSession", {
+ session: session,
+ oldSession: oldSession
+ });
+
+ this.curOp = null;
+
+ oldSession && oldSession._signal("changeEditor", {oldEditor: this});
+ session && session._signal("changeEditor", {editor: this});
+
+ if (session && session.bgTokenizer)
+ session.bgTokenizer.scheduleStart();
+ };
+ 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, cb) {
+ this.renderer.setTheme(theme, cb);
+ };
+ this.getTheme = function() {
+ return this.renderer.getTheme();
+ };
+ this.setStyle = function(style) {
+ this.renderer.setStyle(style);
+ };
+ this.unsetStyle = function(style) {
+ this.renderer.unsetStyle(style);
+ };
+ this.getFontSize = function () {
+ return this.getOption("fontSize") ||
+ dom.computedStyle(this.container, "fontSize");
+ };
+ this.setFontSize = function(size) {
+ this.setOption("fontSize", size);
+ };
+
+ 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 session = self.session;
+ if (!session || !session.bgTokenizer) return;
+ var pos = session.findMatchingBracket(self.getCursorPosition());
+ if (pos) {
+ var range = new Range(pos.row, pos.column, pos.row, pos.column + 1);
+ } else if (session.$mode.getMatching) {
+ var range = session.$mode.getMatching(self.session);
+ }
+ if (range)
+ session.$bracketHighlight = session.addMarker(range, "ace_bracket", "text");
+ }, 50);
+ };
+ this.$highlightTags = function() {
+ if (this.$highlightTagPending)
+ return;
+ var self = this;
+ this.$highlightTagPending = true;
+ setTimeout(function() {
+ self.$highlightTagPending = false;
+
+ var session = self.session;
+ if (!session || !session.bgTokenizer) return;
+
+ var pos = self.getCursorPosition();
+ var iterator = new TokenIterator(self.session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+
+ if (!token || !/\b(?:tag-open|tag-name)/.test(token.type)) {
+ session.removeMarker(session.$tagHighlight);
+ session.$tagHighlight = null;
+ return;
+ }
+
+ if (token.type.indexOf("tag-open") != -1) {
+ token = iterator.stepForward();
+ if (!token)
+ return;
+ }
+
+ var tag = token.value;
+ var depth = 0;
+ var prevToken = iterator.stepBackward();
+
+ if (prevToken.value == '<'){
+ do {
+ prevToken = token;
+ token = iterator.stepForward();
+
+ if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {
+ if (prevToken.value === '<'){
+ depth++;
+ } else if (prevToken.value === '</'){
+ depth--;
+ }
+ }
+
+ } while (token && depth >= 0);
+ } else {
+ do {
+ token = prevToken;
+ prevToken = iterator.stepBackward();
+
+ if (token && token.value === tag && token.type.indexOf('tag-name') !== -1) {
+ if (prevToken.value === '<') {
+ depth++;
+ } else if (prevToken.value === '</') {
+ depth--;
+ }
+ }
+ } while (prevToken && depth <= 0);
+ iterator.stepForward();
+ }
+
+ if (!token) {
+ session.removeMarker(session.$tagHighlight);
+ session.$tagHighlight = null;
+ return;
+ }
+
+ var row = iterator.getCurrentTokenRow();
+ var column = iterator.getCurrentTokenColumn();
+ var range = new Range(row, column, row, column+token.value.length);
+ var sbm = session.$backMarkers[session.$tagHighlight];
+ if (session.$tagHighlight && sbm != undefined && range.compareRange(sbm.range) !== 0) {
+ session.removeMarker(session.$tagHighlight);
+ session.$tagHighlight = null;
+ }
+
+ if (range && !session.$tagHighlight)
+ session.$tagHighlight = 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(e) {
+ if (this.$isFocused)
+ return;
+ this.$isFocused = true;
+ this.renderer.showCursor();
+ this.renderer.visualizeFocus();
+ this._emit("focus", e);
+ };
+ this.onBlur = function(e) {
+ if (!this.$isFocused)
+ return;
+ this.$isFocused = false;
+ this.renderer.hideCursor();
+ this.renderer.visualizeBlur();
+ this._emit("blur", e);
+ };
+
+ this.$cursorChange = function() {
+ this.renderer.updateCursor();
+ };
+ this.onDocumentChange = function(delta) {
+ var wrap = this.session.$useWrapMode;
+ var lastRow = (delta.start.row == delta.end.row ? delta.end.row : Infinity);
+ this.renderer.updateLines(delta.start.row, lastRow, wrap);
+
+ this._signal("change", delta);
+ this.$cursorChange();
+ this.$updateHighlightActiveLine();
+ };
+
+ 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) {
+ config.warn("Automatically scrolling cursor into view after selection change",
+ "this will be disabled in the next version",
+ "set editor.$blockScrolling = Infinity to disable this message"
+ );
+ this.renderer.scrollCursorIntoView();
+ }
+
+ this.$highlightBrackets();
+ this.$highlightTags();
+ this.$updateHighlightActiveLine();
+ this._signal("changeSelection");
+ };
+
+ this.$updateHighlightActiveLine = function() {
+ var session = this.getSession();
+
+ var highlight;
+ if (this.$highlightActiveLine) {
+ if ((this.$selectionStyle != "line" || !this.selection.isMultiLine()))
+ highlight = this.getCursorPosition();
+ if (this.renderer.$maxLines && this.session.getLength() === 1 && !(this.renderer.$minLines > 1))
+ highlight = false;
+ }
+
+ if (session.$highlightLineMarker && !highlight) {
+ session.removeMarker(session.$highlightLineMarker.id);
+ session.$highlightLineMarker = null;
+ } else if (!session.$highlightLineMarker && highlight) {
+ var range = new Range(highlight.row, highlight.column, highlight.row, Infinity);
+ range.id = session.addMarker(range, "ace_active-line", "screenLine");
+ session.$highlightLineMarker = range;
+ } else if (highlight) {
+ session.$highlightLineMarker.start.row = highlight.row;
+ session.$highlightLineMarker.end.row = highlight.row;
+ session.$highlightLineMarker.start.column = highlight.column;
+ session._signal("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._signal("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(e) {
+ this.renderer.updateText();
+ this._emit("changeMode", e);
+ };
+
+
+ this.onChangeWrapLimit = function() {
+ this.renderer.updateFull();
+ };
+
+ this.onChangeWrapMode = function() {
+ this.renderer.onResize(true);
+ };
+
+
+ this.onChangeFold = function() {
+ this.$updateHighlightActiveLine();
+ this.renderer.updateFull();
+ };
+ this.getSelectedText = function() {
+ return this.session.getTextRange(this.getSelectionRange());
+ };
+ this.getCopyText = function() {
+ var text = this.getSelectedText();
+ this._signal("copy", text);
+ return text;
+ };
+ this.onCopy = function() {
+ this.commands.exec("copy", this);
+ };
+ this.onCut = function() {
+ this.commands.exec("cut", this);
+ };
+ this.onPaste = function(text, event) {
+ var e = {text: text, event: event};
+ this.commands.exec("paste", this, e);
+ };
+
+ this.$handlePaste = function(e) {
+ if (typeof e == "string")
+ e = {text: e};
+ this._signal("paste", e);
+ var text = e.text;
+ if (!this.inMultiSelectMode || this.inVirtualSelectionMode) {
+ this.insert(text);
+ } else {
+ 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.execCommand = function(command, args) {
+ return this.commands.exec(command, this, args);
+ };
+ this.insert = function(text, pasted) {
+ var session = this.session;
+ var mode = session.getMode();
+ var cursor = this.getCursorPosition();
+
+ if (this.getBehavioursEnabled() && !pasted) {
+ var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text);
+ if (transform) {
+ if (text !== transform.text) {
+ this.session.mergeUndoDeltas = false;
+ this.$mergeNextCommand = false;
+ }
+ text = transform.text;
+
+ }
+ }
+
+ if (text == "\t")
+ text = this.session.getTabString();
+ if (!this.selection.isEmpty()) {
+ var range = this.getSelectionRange();
+ cursor = this.session.remove(range);
+ this.clearSelection();
+ }
+ else if (this.session.getOverwrite() && text.indexOf("\n") == -1) {
+ var range = new Range.fromPoints(cursor, cursor);
+ range.end.column += text.length;
+ this.session.remove(range);
+ }
+
+ if (text == "\n" || text == "\r\n") {
+ var line = session.getLine(cursor.row);
+ if (cursor.column > line.search(/\S|$/)) {
+ var d = line.substr(cursor.column).search(/\S|$/);
+ session.doc.removeInLine(cursor.row, cursor.column, cursor.column + d);
+ }
+ }
+ 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());
+
+ session.insert({row: cursor.row+1, column: 0}, 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.setOption("scrollSpeed", speed);
+ };
+ this.getScrollSpeed = function() {
+ return this.getOption("scrollSpeed");
+ };
+ this.setDragDelay = function(dragDelay) {
+ this.setOption("dragDelay", dragDelay);
+ };
+ this.getDragDelay = function() {
+ return this.getOption("dragDelay");
+ };
+ this.setSelectionStyle = function(val) {
+ this.setOption("selectionStyle", val);
+ };
+ this.getSelectionStyle = function() {
+ return this.getOption("selectionStyle");
+ };
+ this.setHighlightActiveLine = function(shouldHighlight) {
+ this.setOption("highlightActiveLine", shouldHighlight);
+ };
+ this.getHighlightActiveLine = function() {
+ return this.getOption("highlightActiveLine");
+ };
+ this.setHighlightGutterLine = function(shouldHighlight) {
+ this.setOption("highlightGutterLine", shouldHighlight);
+ };
+
+ this.getHighlightGutterLine = function() {
+ return this.getOption("highlightGutterLine");
+ };
+ this.setHighlightSelectedWord = function(shouldHighlight) {
+ this.setOption("highlightSelectedWord", shouldHighlight);
+ };
+ 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.setReadOnly = function(readOnly) {
+ this.setOption("readOnly", readOnly);
+ };
+ this.getReadOnly = function() {
+ return this.getOption("readOnly");
+ };
+ this.setBehavioursEnabled = function (enabled) {
+ this.setOption("behavioursEnabled", enabled);
+ };
+ this.getBehavioursEnabled = function () {
+ return this.getOption("behavioursEnabled");
+ };
+ this.setWrapBehavioursEnabled = function (enabled) {
+ this.setOption("wrapBehavioursEnabled", enabled);
+ };
+ this.getWrapBehavioursEnabled = function () {
+ return this.getOption("wrapBehavioursEnabled");
+ };
+ this.setShowFoldWidgets = function(show) {
+ this.setOption("showFoldWidgets", show);
+
+ };
+ this.getShowFoldWidgets = function() {
+ return this.getOption("showFoldWidgets");
+ };
+
+ this.setFadeFoldWidgets = function(fade) {
+ this.setOption("fadeFoldWidgets", fade);
+ };
+
+ this.getFadeFoldWidgets = function() {
+ return this.getOption("fadeFoldWidgets");
+ };
+ 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 (range.end.column === 0) {
+ var text = session.getTextRange(range);
+ if (text[text.length - 1] == "\n") {
+ var line = session.getLine(range.end.row);
+ if (/^\s+$/.test(line)) {
+ range.end.column = line.length;
+ }
+ }
+ }
+ 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.session.selection.moveToPosition(range.end);
+ };
+ 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) {
+ var rows = this.$getSelectedRows();
+ session.indentRows(rows.first, rows.last, "\t");
+ return;
+ } else if (range.start.column < range.end.column) {
+ var text = session.getTextRange(range);
+ if (!/^\s+$/.test(text)) {
+ var rows = this.$getSelectedRows();
+ session.indentRows(rows.first, rows.last, "\t");
+ return;
+ }
+ }
+
+ var line = session.getLine(range.start.row);
+ var position = range.start;
+ var size = session.getTabSize();
+ var column = session.documentToScreenColumn(position.row, position.column);
+
+ if (this.session.getUseSoftTabs()) {
+ var count = (size - column % size);
+ var indentString = lang.stringRepeat(" ", count);
+ } else {
+ var count = column % size;
+ while (line[range.start.column - 1] == " " && count) {
+ range.start.column--;
+ count--;
+ }
+ this.selection.setSelectionRange(range);
+ indentString = "\t";
+ }
+ return this.insert(indentString);
+ };
+ this.blockIndent = function() {
+ var rows = this.$getSelectedRows();
+ this.session.indentRows(rows.first, rows.last, "\t");
+ };
+ 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.toggleBlockComment = function() {
+ var cursor = this.getCursorPosition();
+ var state = this.session.getState(cursor.row);
+ var range = this.getSelectionRange();
+ this.session.getMode().toggleBlockComment(state, this.session, range, cursor);
+ };
+ 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) {
+ 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();
+ this.session.removeFullLines(rows.first, rows.last);
+ this.clearSelection();
+ };
+
+ this.duplicateSelection = function() {
+ var sel = this.selection;
+ var doc = this.session;
+ var range = sel.getRange();
+ var reverse = sel.isBackwards();
+ if (range.isEmpty()) {
+ var row = range.start.row;
+ doc.duplicateLines(row, row);
+ } else {
+ var point = reverse ? 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(1, false);
+ };
+ this.moveLinesUp = function() {
+ this.$moveLines(-1, false);
+ };
+ this.moveText = function(range, toPosition, copy) {
+ return this.session.moveText(range, toPosition, copy);
+ };
+ this.copyLinesUp = function() {
+ this.$moveLines(-1, true);
+ };
+ this.copyLinesDown = function() {
+ this.$moveLines(1, true);
+ };
+ this.$moveLines = function(dir, copy) {
+ var rows, moved;
+ var selection = this.selection;
+ if (!selection.inMultiSelectMode || this.inVirtualSelectionMode) {
+ var range = selection.toOrientedRange();
+ rows = this.$getSelectedRows(range);
+ moved = this.session.$moveLines(rows.first, rows.last, copy ? 0 : dir);
+ if (copy && dir == -1) moved = 0;
+ range.moveBy(moved, 0);
+ selection.fromOrientedRange(range);
+ } else {
+ var ranges = selection.rangeList.ranges;
+ selection.rangeList.detach(this.session);
+ this.inVirtualSelectionMode = true;
+
+ var diff = 0;
+ var totalDiff = 0;
+ var l = ranges.length;
+ for (var i = 0; i < l; i++) {
+ var rangeIndex = i;
+ ranges[i].moveBy(diff, 0);
+ rows = this.$getSelectedRows(ranges[i]);
+ var first = rows.first;
+ var last = rows.last;
+ while (++i < l) {
+ if (totalDiff) ranges[i].moveBy(totalDiff, 0);
+ var subRows = this.$getSelectedRows(ranges[i]);
+ if (copy && subRows.first != last)
+ break;
+ else if (!copy && subRows.first > last + 1)
+ break;
+ last = subRows.last;
+ }
+ i--;
+ diff = this.session.$moveLines(first, last, copy ? 0 : dir);
+ if (copy && dir == -1) rangeIndex = i + 1;
+ while (rangeIndex <= i) {
+ ranges[rangeIndex].moveBy(diff, 0);
+ rangeIndex++;
+ }
+ if (!copy) diff = 0;
+ totalDiff += diff;
+ }
+
+ selection.fromOrientedRange(selection.ranges[0]);
+ selection.rangeList.attach(this.session);
+ this.inVirtualSelectionMode = false;
+ }
+ };
+ this.$getSelectedRows = function(range) {
+ range = (range || this.getSelectionRange()).collapseRows();
+
+ return {
+ first: this.session.getRowFoldStart(range.start.row),
+ last: this.session.getRowFoldEnd(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, expand) {
+ var cursor = this.getCursorPosition();
+ var iterator = new TokenIterator(this.session, cursor.row, cursor.column);
+ var prevToken = iterator.getCurrentToken();
+ var token = prevToken || iterator.stepForward();
+
+ if (!token) return;
+ var matchType;
+ var found = false;
+ var depth = {};
+ var i = cursor.column - token.start;
+ var bracketType;
+ var brackets = {
+ ")": "(",
+ "(": "(",
+ "]": "[",
+ "[": "[",
+ "{": "{",
+ "}": "{"
+ };
+
+ do {
+ if (token.value.match(/[{}()\[\]]/g)) {
+ for (; i < token.value.length && !found; i++) {
+ if (!brackets[token.value[i]]) {
+ continue;
+ }
+
+ bracketType = brackets[token.value[i]] + '.' + token.type.replace("rparen", "lparen");
+
+ if (isNaN(depth[bracketType])) {
+ depth[bracketType] = 0;
+ }
+
+ switch (token.value[i]) {
+ case '(':
+ case '[':
+ case '{':
+ depth[bracketType]++;
+ break;
+ case ')':
+ case ']':
+ case '}':
+ depth[bracketType]--;
+
+ if (depth[bracketType] === -1) {
+ matchType = 'bracket';
+ found = true;
+ }
+ break;
+ }
+ }
+ }
+ else if (token && token.type.indexOf('tag-name') !== -1) {
+ if (isNaN(depth[token.value])) {
+ depth[token.value] = 0;
+ }
+
+ if (prevToken.value === '<') {
+ depth[token.value]++;
+ }
+ else if (prevToken.value === '</') {
+ depth[token.value]--;
+ }
+
+ if (depth[token.value] === -1) {
+ matchType = 'tag';
+ found = true;
+ }
+ }
+
+ if (!found) {
+ prevToken = token;
+ token = iterator.stepForward();
+ i = 0;
+ }
+ } while (token && !found);
+ if (!matchType)
+ return;
+
+ var range, pos;
+ if (matchType === 'bracket') {
+ range = this.session.getBracketRange(cursor);
+ if (!range) {
+ range = new Range(
+ iterator.getCurrentTokenRow(),
+ iterator.getCurrentTokenColumn() + i - 1,
+ iterator.getCurrentTokenRow(),
+ iterator.getCurrentTokenColumn() + i - 1
+ );
+ pos = range.start;
+ if (expand || pos.row === cursor.row && Math.abs(pos.column - cursor.column) < 2)
+ range = this.session.getBracketRange(pos);
+ }
+ }
+ else if (matchType === 'tag') {
+ if (token && token.type.indexOf('tag-name') !== -1)
+ var tag = token.value;
+ else
+ return;
+
+ range = new Range(
+ iterator.getCurrentTokenRow(),
+ iterator.getCurrentTokenColumn() - 2,
+ iterator.getCurrentTokenRow(),
+ iterator.getCurrentTokenColumn() - 2
+ );
+ if (range.compare(cursor.row, cursor.column) === 0) {
+ found = false;
+ do {
+ token = prevToken;
+ prevToken = iterator.stepBackward();
+
+ if (prevToken) {
+ if (prevToken.type.indexOf('tag-close') !== -1) {
+ range.setEnd(iterator.getCurrentTokenRow(), iterator.getCurrentTokenColumn() + 1);
+ }
+
+ if (token.value === tag && token.type.indexOf('tag-name') !== -1) {
+ if (prevToken.value === '<') {
+ depth[tag]++;
+ }
+ else if (prevToken.value === '</') {
+ depth[tag]--;
+ }
+
+ if (depth[tag] === 0)
+ found = true;
+ }
+ }
+ } while (prevToken && !found);
+ }
+ if (token && token.type.indexOf('tag-name')) {
+ pos = range.start;
+ if (pos.row == cursor.row && Math.abs(pos.column - cursor.column) < 2)
+ pos = range.end;
+ }
+ }
+
+ pos = range && range.cursor || pos;
+ if (pos) {
+ if (select) {
+ if (range && expand) {
+ this.selection.setRange(range);
+ } else if (range && range.isEqual(this.getSelectionRange())) {
+ this.clearSelection();
+ } else {
+ this.selection.selectTo(pos.row, pos.column);
+ }
+ } else {
+ this.selection.moveTo(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.exitMultiSelectMode && this.exitMultiSelectMode();
+ 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.selection.moveTo(row, column);
+ };
+ this.navigateUp = function(times) {
+ if (this.selection.isMultiLine() && !this.selection.isBackwards()) {
+ var selectionStart = this.selection.anchor.getPosition();
+ return this.moveCursorToPosition(selectionStart);
+ }
+ this.selection.clearSelection();
+ this.selection.moveCursorBy(-times || -1, 0);
+ };
+ this.navigateDown = function(times) {
+ if (this.selection.isMultiLine() && this.selection.isBackwards()) {
+ var selectionEnd = this.selection.anchor.getPosition();
+ return this.moveCursorToPosition(selectionEnd);
+ }
+ this.selection.clearSelection();
+ this.selection.moveCursorBy(times || 1, 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);
+ 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.selection.moveTo(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();
+ this._signal("destroy", this);
+ if (this.session) {
+ this.session.destroy();
+ }
+ };
+ this.setAutoScrollEditorIntoView = function(enable) {
+ if (!enable)
+ return;
+ var rect;
+ var self = this;
+ var shouldScroll = false;
+ if (!this.$scrollAnchor)
+ this.$scrollAnchor = document.createElement("div");
+ var scrollAnchor = this.$scrollAnchor;
+ scrollAnchor.style.cssText = "position:absolute";
+ this.container.insertBefore(scrollAnchor, this.container.firstChild);
+ var onChangeSelection = this.on("changeSelection", function() {
+ shouldScroll = true;
+ });
+ var onBeforeRender = this.renderer.on("beforeRender", function() {
+ if (shouldScroll)
+ rect = self.renderer.container.getBoundingClientRect();
+ });
+ var onAfterRender = this.renderer.on("afterRender", function() {
+ if (shouldScroll && rect && (self.isFocused()
+ || self.searchBox && self.searchBox.isFocused())
+ ) {
+ var renderer = self.renderer;
+ var pos = renderer.$cursorLayer.$pixelPos;
+ var config = renderer.layerConfig;
+ var top = pos.top - config.offset;
+ if (pos.top >= 0 && top + rect.top < 0) {
+ shouldScroll = true;
+ } else if (pos.top < config.height &&
+ pos.top + rect.top + config.lineHeight > window.innerHeight) {
+ shouldScroll = false;
+ } else {
+ shouldScroll = null;
+ }
+ if (shouldScroll != null) {
+ scrollAnchor.style.top = top + "px";
+ scrollAnchor.style.left = pos.left + "px";
+ scrollAnchor.style.height = config.lineHeight + "px";
+ scrollAnchor.scrollIntoView(shouldScroll);
+ }
+ shouldScroll = rect = null;
+ }
+ });
+ this.setAutoScrollEditorIntoView = function(enable) {
+ if (enable)
+ return;
+ delete this.setAutoScrollEditorIntoView;
+ this.off("changeSelection", onChangeSelection);
+ this.renderer.off("afterRender", onAfterRender);
+ this.renderer.off("beforeRender", onBeforeRender);
+ };
+ };
+
+
+ this.$resetCursorStyle = function() {
+ var style = this.$cursorStyle || "ace";
+ var cursorLayer = this.renderer.$cursorLayer;
+ if (!cursorLayer)
+ return;
+ cursorLayer.setSmoothBlinking(/smooth/.test(style));
+ cursorLayer.isBlinking = !this.$readOnly && style != "wide";
+ dom.setCssClass(cursorLayer.element, "ace_slim-cursors", /slim/.test(style));
+ };
+
+}).call(Editor.prototype);
+
+
+
+config.defineOptions(Editor.prototype, "editor", {
+ selectionStyle: {
+ set: function(style) {
+ this.onSelectionChange();
+ this._signal("changeSelectionStyle", {data: style});
+ },
+ initialValue: "line"
+ },
+ highlightActiveLine: {
+ set: function() {this.$updateHighlightActiveLine();},
+ initialValue: true
+ },
+ highlightSelectedWord: {
+ set: function(shouldHighlight) {this.$onSelectionChange();},
+ initialValue: true
+ },
+ readOnly: {
+ set: function(readOnly) {
+ this.$resetCursorStyle();
+ },
+ initialValue: false
+ },
+ cursorStyle: {
+ set: function(val) { this.$resetCursorStyle(); },
+ values: ["ace", "slim", "smooth", "wide"],
+ initialValue: "ace"
+ },
+ mergeUndoDeltas: {
+ values: [false, true, "always"],
+ initialValue: true
+ },
+ behavioursEnabled: {initialValue: true},
+ wrapBehavioursEnabled: {initialValue: true},
+ autoScrollEditorIntoView: {
+ set: function(val) {this.setAutoScrollEditorIntoView(val)}
+ },
+ keyboardHandler: {
+ set: function(val) { this.setKeyboardHandler(val); },
+ get: function() { return this.keybindingId; },
+ handlesSet: true
+ },
+
+ hScrollBarAlwaysVisible: "renderer",
+ vScrollBarAlwaysVisible: "renderer",
+ highlightGutterLine: "renderer",
+ animatedScroll: "renderer",
+ showInvisibles: "renderer",
+ showPrintMargin: "renderer",
+ printMarginColumn: "renderer",
+ printMargin: "renderer",
+ fadeFoldWidgets: "renderer",
+ showFoldWidgets: "renderer",
+ showLineNumbers: "renderer",
+ showGutter: "renderer",
+ displayIndentGuides: "renderer",
+ fontSize: "renderer",
+ fontFamily: "renderer",
+ maxLines: "renderer",
+ minLines: "renderer",
+ scrollPastEnd: "renderer",
+ fixedWidthGutter: "renderer",
+ theme: "renderer",
+
+ scrollSpeed: "$mouseHandler",
+ dragDelay: "$mouseHandler",
+ dragEnabled: "$mouseHandler",
+ focusTimout: "$mouseHandler",
+ tooltipFollowsMouse: "$mouseHandler",
+
+ firstLineNumber: "session",
+ overwrite: "session",
+ newLineMode: "session",
+ useWorker: "session",
+ useSoftTabs: "session",
+ tabSize: "session",
+ wrap: "session",
+ indentedSoftWrap: "session",
+ foldStyle: "session",
+ mode: "session"
+});
+
+exports.Editor = Editor;
+});
+
+ace.define("ace/undomanager",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var UndoManager = function() {
+ this.reset();
+};
+
+(function() {
+ this.execute = function(options) {
+ var deltaSets = options.args[0];
+ this.$doc = options.args[1];
+ if (options.merge && this.hasUndo()){
+ this.dirtyCounter--;
+ deltaSets = this.$undoStack.pop().concat(deltaSets);
+ }
+ this.$undoStack.push(deltaSets);
+ this.$redoStack = [];
+ if (this.dirtyCounter < 0) {
+ this.dirtyCounter = NaN;
+ }
+ this.dirtyCounter++;
+ };
+ this.undo = function(dontSelect) {
+ var deltaSets = this.$undoStack.pop();
+ var undoSelectionRange = null;
+ if (deltaSets) {
+ undoSelectionRange = this.$doc.undoChanges(deltaSets, dontSelect);
+ this.$redoStack.push(deltaSets);
+ this.dirtyCounter--;
+ }
+
+ return undoSelectionRange;
+ };
+ this.redo = function(dontSelect) {
+ var deltaSets = this.$redoStack.pop();
+ var redoSelectionRange = null;
+ if (deltaSets) {
+ redoSelectionRange =
+ this.$doc.redoChanges(this.$deserializeDeltas(deltaSets), dontSelect);
+ this.$undoStack.push(deltaSets);
+ this.dirtyCounter++;
+ }
+ return redoSelectionRange;
+ };
+ this.reset = function() {
+ this.$undoStack = [];
+ this.$redoStack = [];
+ this.dirtyCounter = 0;
+ };
+ this.hasUndo = function() {
+ return this.$undoStack.length > 0;
+ };
+ this.hasRedo = function() {
+ return this.$redoStack.length > 0;
+ };
+ this.markClean = function() {
+ this.dirtyCounter = 0;
+ };
+ this.isClean = function() {
+ return this.dirtyCounter === 0;
+ };
+ this.$serializeDeltas = function(deltaSets) {
+ return cloneDeltaSetsObj(deltaSets, $serializeDelta);
+ };
+ this.$deserializeDeltas = function(deltaSets) {
+ return cloneDeltaSetsObj(deltaSets, $deserializeDelta);
+ };
+
+ function $serializeDelta(delta){
+ return {
+ action: delta.action,
+ start: delta.start,
+ end: delta.end,
+ lines: delta.lines.length == 1 ? null : delta.lines,
+ text: delta.lines.length == 1 ? delta.lines[0] : null
+ };
+ }
+
+ function $deserializeDelta(delta) {
+ return {
+ action: delta.action,
+ start: delta.start,
+ end: delta.end,
+ lines: delta.lines || [delta.text]
+ };
+ }
+
+ function cloneDeltaSetsObj(deltaSets_old, fnGetModifiedDelta) {
+ var deltaSets_new = new Array(deltaSets_old.length);
+ for (var i = 0; i < deltaSets_old.length; i++) {
+ var deltaSet_old = deltaSets_old[i];
+ var deltaSet_new = { group: deltaSet_old.group, deltas: new Array(deltaSet_old.length)};
+
+ for (var j = 0; j < deltaSet_old.deltas.length; j++) {
+ var delta_old = deltaSet_old.deltas[j];
+ deltaSet_new.deltas[j] = fnGetModifiedDelta(delta_old);
+ }
+
+ deltaSets_new[i] = deltaSet_new;
+ }
+ return deltaSets_new;
+ }
+
+}).call(UndoManager.prototype);
+
+exports.UndoManager = UndoManager;
+});
+
+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) {
+"use strict";
+
+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);
+
+ this.$cells = [];
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.setSession = function(session) {
+ if (this.session)
+ this.session.removeEventListener("change", this.$updateAnnotations);
+ this.session = session;
+ if (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 = [];
+ 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 (delta) {
+ if (!this.$annotations.length)
+ return;
+ var firstRow = delta.start.row;
+ var len = delta.end.row - firstRow;
+ if (len === 0) {
+ } else if (delta.action == 'remove') {
+ this.$annotations.splice(firstRow, len + 1, null);
+ } else {
+ var args = new Array(len + 1);
+ args.unshift(firstRow, 1);
+ this.$annotations.splice.apply(this.$annotations, args);
+ }
+ };
+
+ this.update = function(config) {
+ var session = this.session;
+ var firstRow = config.firstRow;
+ var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar
+ session.getLength() - 1);
+ var fold = session.getNextFoldLine(firstRow);
+ var foldStart = fold ? fold.start.row : Infinity;
+ var foldWidgets = this.$showFoldWidgets && session.foldWidgets;
+ var breakpoints = session.$breakpoints;
+ var decorations = session.$decorations;
+ var firstLineNumber = session.$firstLineNumber;
+ var lastLineNumber = 0;
+
+ var gutterRenderer = session.gutterRenderer || this.$renderer;
+
+ var cell = null;
+ var index = -1;
+ var row = firstRow;
+ while (true) {
+ if (row > foldStart) {
+ row = fold.end.row + 1;
+ fold = session.getNextFoldLine(row, fold);
+ foldStart = fold ? fold.start.row : Infinity;
+ }
+ if (row > lastRow) {
+ while (this.$cells.length > index + 1) {
+ cell = this.$cells.pop();
+ this.element.removeChild(cell.element);
+ }
+ break;
+ }
+
+ cell = this.$cells[++index];
+ if (!cell) {
+ cell = {element: null, textNode: null, foldWidget: null};
+ cell.element = dom.createElement("div");
+ cell.textNode = document.createTextNode('');
+ cell.element.appendChild(cell.textNode);
+ this.element.appendChild(cell.element);
+ this.$cells[index] = cell;
+ }
+
+ var className = "ace_gutter-cell ";
+ if (breakpoints[row])
+ className += breakpoints[row];
+ if (decorations[row])
+ className += decorations[row];
+ if (this.$annotations[row])
+ className += this.$annotations[row].className;
+ if (cell.element.className != className)
+ cell.element.className = className;
+
+ var height = session.getRowLength(row) * config.lineHeight + "px";
+ if (height != cell.element.style.height)
+ cell.element.style.height = height;
+
+ if (foldWidgets) {
+ var c = foldWidgets[row];
+ if (c == null)
+ c = foldWidgets[row] = session.getFoldWidget(row);
+ }
+
+ if (c) {
+ if (!cell.foldWidget) {
+ cell.foldWidget = dom.createElement("span");
+ cell.element.appendChild(cell.foldWidget);
+ }
+ var className = "ace_fold-widget ace_" + c;
+ if (c == "start" && row == foldStart && row < fold.end.row)
+ className += " ace_closed";
+ else
+ className += " ace_open";
+ if (cell.foldWidget.className != className)
+ cell.foldWidget.className = className;
+
+ var height = config.lineHeight + "px";
+ if (cell.foldWidget.style.height != height)
+ cell.foldWidget.style.height = height;
+ } else {
+ if (cell.foldWidget) {
+ cell.element.removeChild(cell.foldWidget);
+ cell.foldWidget = null;
+ }
+ }
+
+ var text = lastLineNumber = gutterRenderer
+ ? gutterRenderer.getText(session, row)
+ : row + firstLineNumber;
+ if (text !== cell.textNode.data)
+ cell.textNode.data = text;
+
+ row++;
+ }
+
+ this.element.style.height = config.minHeight + "px";
+
+ if (this.$fixedWidth || session.$useWrapMode)
+ lastLineNumber = session.getLength() + firstLineNumber;
+
+ var gutterWidth = gutterRenderer
+ ? gutterRenderer.getWidth(session, lastLineNumber, config)
+ : lastLineNumber.toString().length * config.characterWidth;
+
+ var padding = this.$padding || this.$computePadding();
+ gutterWidth += padding.left + padding.right;
+ if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) {
+ this.gutterWidth = gutterWidth;
+ this.element.style.width = Math.ceil(this.gutterWidth) + "px";
+ this._emit("changeGutterWidth", gutterWidth);
+ }
+ };
+
+ this.$fixedWidth = false;
+
+ this.$showLineNumbers = true;
+ this.$renderer = "";
+ this.setShowLineNumbers = function(show) {
+ this.$renderer = !show && {
+ getWidth: function() {return ""},
+ getText: function() {return ""}
+ };
+ };
+
+ this.getShowLineNumbers = function() {
+ return this.$showLineNumbers;
+ };
+
+ 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 || 0;
+ this.$padding.right = parseInt(style.paddingRight) || 0;
+ 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) {
+"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) {
+ 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 + (this.session.$bidiHandler.isBidiRow(range.start.row)
+ ? this.session.$bidiHandler.getPosLeft(range.start.column)
+ : 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 (marker.type == "screenLine") {
+ this.drawScreenLineMarker(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 {
+ if (this.session.$bidiHandler.isBidiRow(range.start.row)) {
+ this.drawBidiSingleLineMarker(html, range, marker.clazz + " ace_start" + " ace_br15", config);
+ } else {
+ this.drawSingleLineMarker(html, range, marker.clazz + " ace_start" + " ace_br15", config);
+ }
+ }
+ }
+ this.element.innerHTML = html.join("");
+ };
+
+ this.$getTop = function(row, layerConfig) {
+ return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight;
+ };
+
+ function getBorderClass(tl, tr, br, bl) {
+ return (tl ? 1 : 0) | (tr ? 2 : 0) | (br ? 4 : 0) | (bl ? 8 : 0);
+ }
+ this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig, extraStyle) {
+ var session = this.session;
+ var start = range.start.row;
+ var end = range.end.row;
+ var row = start;
+ var prev = 0;
+ var curr = 0;
+ var next = session.getScreenLastRowColumn(row);
+ var clazzModified = null;
+ var lineRange = new Range(row, range.start.column, row, curr);
+ for (; row <= end; row++) {
+ lineRange.start.row = lineRange.end.row = row;
+ lineRange.start.column = row == start ? range.start.column : session.getRowWrapIndent(row);
+ lineRange.end.column = next;
+ prev = curr;
+ curr = next;
+ next = row + 1 < end ? session.getScreenLastRowColumn(row + 1) : row == end ? 0 : range.end.column;
+ clazzModified = clazz + (row == start ? " ace_start" : "") + " ace_br"
+ + getBorderClass(row == start || row == start + 1 && range.start.column, prev < curr, curr > next, row == end);
+
+ if (this.session.$bidiHandler.isBidiRow(row)) {
+ this.drawBidiSingleLineMarker(stringBuilder, lineRange, clazzModified,
+ layerConfig, row == end ? 0 : 1, extraStyle);
+ } else {
+ this.drawSingleLineMarker(stringBuilder, lineRange, clazzModified,
+ layerConfig, row == end ? 0 : 1, extraStyle);
+ }
+ }
+ };
+ this.drawMultiLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {
+ var padding = this.$padding;
+ var height, top, left;
+ extraStyle = extraStyle || "";
+ if (this.session.$bidiHandler.isBidiRow(range.start.row)) {
+ var range1 = range.clone();
+ range1.end.row = range1.start.row;
+ range1.end.column = this.session.getLine(range1.start.row).length;
+ this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + " ace_br1 ace_start", config, null, extraStyle);
+ } else {
+ height = config.lineHeight;
+ top = this.$getTop(range.start.row, config);
+ left = padding + range.start.column * config.characterWidth;
+ stringBuilder.push(
+ "<div class='", clazz, " ace_br1 ace_start' style='",
+ "height:", height, "px;",
+ "right:0;",
+ "top:", top, "px;",
+ "left:", left, "px;", extraStyle, "'></div>"
+ );
+ }
+ if (this.session.$bidiHandler.isBidiRow(range.end.row)) {
+ var range1 = range.clone();
+ range1.start.row = range1.end.row;
+ range1.start.column = 0;
+ this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + " ace_br12", config, null, extraStyle);
+ } else {
+ var width = range.end.column * config.characterWidth;
+ height = config.lineHeight;
+ top = this.$getTop(range.end.row, config);
+ stringBuilder.push(
+ "<div class='", clazz, " ace_br12' style='",
+ "height:", height, "px;",
+ "width:", width, "px;",
+ "top:", top, "px;",
+ "left:", padding, "px;", extraStyle, "'></div>"
+ );
+ }
+ height = (range.end.row - range.start.row - 1) * config.lineHeight;
+ if (height <= 0)
+ return;
+ top = this.$getTop(range.start.row + 1, config);
+
+ var radiusClass = (range.start.column ? 1 : 0) | (range.end.column ? 0 : 8);
+
+ stringBuilder.push(
+ "<div class='", clazz, (radiusClass ? " ace_br" + radiusClass : ""), "' style='",
+ "height:", height, "px;",
+ "right:0;",
+ "top:", top, "px;",
+ "left:", padding, "px;", extraStyle, "'></div>"
+ );
+ };
+ this.drawSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) {
+ 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;", extraStyle || "", "'></div>"
+ );
+ };
+ this.drawBidiSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) {
+ var height = config.lineHeight, top = this.$getTop(range.start.row, config), padding = this.$padding;
+ var selections = this.session.$bidiHandler.getSelections(range.start.column, range.end.column);
+
+ selections.forEach(function(selection) {
+ stringBuilder.push(
+ "<div class='", clazz, "' style='",
+ "height:", height, "px;",
+ "width:", selection.width + (extraLength || 0), "px;",
+ "top:", top, "px;",
+ "left:", padding + selection.left, "px;", extraStyle || "", "'></div>"
+ );
+ });
+ };
+
+ this.drawFullLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {
+ 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;", extraStyle || "", "'></div>"
+ );
+ };
+
+ this.drawScreenLineMarker = function(stringBuilder, range, clazz, config, extraStyle) {
+ var top = this.$getTop(range.start.row, config);
+ var height = config.lineHeight;
+
+ stringBuilder.push(
+ "<div class='", clazz, "' style='",
+ "height:", height, "px;",
+ "top:", top, "px;",
+ "left:0;right:0;", extraStyle || "", "'></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) {
+"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.$updateEolChar = this.$updateEolChar.bind(this);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.EOF_CHAR = "\xB6";
+ this.EOL_CHAR_LF = "\xAC";
+ this.EOL_CHAR_CRLF = "\xa4";
+ this.EOL_CHAR = this.EOL_CHAR_LF;
+ this.TAB_CHAR = "\u2014"; //"\u21E5";
+ this.SPACE_CHAR = "\xB7";
+ this.$padding = 0;
+
+ this.$updateEolChar = function() {
+ var EOL_CHAR = this.session.doc.getNewLineCharacter() == "\n"
+ ? this.EOL_CHAR_LF
+ : this.EOL_CHAR_CRLF;
+ if (this.EOL_CHAR != EOL_CHAR) {
+ this.EOL_CHAR = EOL_CHAR;
+ return true;
+ }
+ }
+
+ this.setPadding = function(padding) {
+ this.$padding = padding;
+ this.element.style.padding = "0 " + padding + "px";
+ };
+
+ this.getLineHeight = function() {
+ return this.$fontMetrics.$characterSize.height || 0;
+ };
+
+ this.getCharacterWidth = function() {
+ return this.$fontMetrics.$characterSize.width || 0;
+ };
+
+ this.$setFontMetrics = function(measure) {
+ this.$fontMetrics = measure;
+ this.$fontMetrics.on("changeCharacterSize", function(e) {
+ this._signal("changeCharacterSize", e);
+ }.bind(this));
+ this.$pollSizeChanges();
+ }
+
+ this.checkForSizeChanges = function() {
+ this.$fontMetrics.checkForSizeChanges();
+ };
+ this.$pollSizeChanges = function() {
+ return this.$pollSizeChangesTimer = this.$fontMetrics.$pollSizeChanges();
+ };
+ this.setSession = function(session) {
+ this.session = session;
+ if (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 ace_invisible_tab'>"
+ + lang.stringRepeat(this.TAB_CHAR, i)
+ + "</span>");
+ } else {
+ tabStr.push(lang.stringRepeat(" ", i));
+ }
+ }
+ if (this.displayIndentGuides) {
+ this.$indentGuideRe = /\s\S| \t|\t |\s$/;
+ var className = "ace_indent-guide";
+ var spaceClass = "";
+ var tabClass = "";
+ if (this.showInvisibles) {
+ className += " ace_invisible";
+ spaceClass = " ace_invisible_space";
+ tabClass = " ace_invisible_tab";
+ var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize);
+ var tabContent = lang.stringRepeat(this.TAB_CHAR, this.tabSize);
+ } else{
+ var spaceContent = lang.stringRepeat(" ", this.tabSize);
+ var tabContent = spaceContent;
+ }
+
+ this.$tabStrings[" "] = "<span class='" + className + spaceClass + "'>" + spaceContent + "</span>";
+ this.$tabStrings["\t"] = "<span class='" + className + tabClass + "'>" + 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
+ );
+ lineElement.style.height = config.lineHeight * this.session.getRowLength(row) + "px";
+ lineElement.innerHTML = 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);
+ container.style.height = config.lineHeight * this.session.getRowLength(row) + "px";
+
+ } else {
+ while(container.firstChild)
+ fragment.appendChild(container.firstChild);
+ }
+
+ 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' style='height:", config.lineHeight*this.session.getRowLength(row), "px'>")
+
+ this.$renderLine(html, row, false, row == foldStart ? foldLine : false);
+
+ if (this.$useLineGroups())
+ html.push("</div>"); // end the line group
+
+ row++;
+ }
+ this.element.innerHTML = 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\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\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 self.showInvisibles
+ ? "<span class='ace_invisible ace_invisible_space'>" + lang.stringRepeat(self.SPACE_CHAR, c.length) + "</span>"
+ : c;
+ } else if (c == "&") {
+ return "&#38;";
+ } else if (c == "<") {
+ return "&#60;";
+ } else if (c == ">") {
+ return "&#62;";
+ } 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_invisible_space" : "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_invisible_space 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, max) {
+ var cols = value.search(this.$indentGuideRe);
+ if (cols <= 0 || cols >= max)
+ return value;
+ if (value[0] == " ") {
+ cols -= cols % this.tabSize;
+ stringBuilder.push(lang.stringRepeat(this.$tabStrings[" "], cols/this.tabSize));
+ return value.substr(cols);
+ } else if (value[0] == "\t") {
+ stringBuilder.push(lang.stringRepeat(this.$tabStrings["\t"], cols));
+ 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, splitChars);
+ 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'>"
+ );
+ }
+
+ stringBuilder.push(lang.stringRepeat("\xa0", splits.indent));
+
+ 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 * (
+ this.$useLineGroups() ? 1 :this.session.getRowLength(row)
+ ), "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 ace_invisible_eol'>",
+ 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) {
+"use strict";
+
+var dom = require("../lib/dom");
+var isIE8;
+
+var Cursor = function(parentEl) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_layer ace_cursor-layer";
+ parentEl.appendChild(this.element);
+
+ if (isIE8 === undefined)
+ isIE8 = !("opacity" in this.element.style);
+
+ 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");
+ this.$updateCursors = (isIE8
+ ? this.$updateVisibility
+ : this.$updateOpacity).bind(this);
+};
+
+(function() {
+
+ this.$updateVisibility = function(val) {
+ var cursors = this.cursors;
+ for (var i = cursors.length; i--; )
+ cursors[i].style.visibility = val ? "" : "hidden";
+ };
+ this.$updateOpacity = function(val) {
+ var cursors = this.cursors;
+ for (var i = cursors.length; i--; )
+ cursors[i].style.opacity = val ? "" : "0";
+ };
+
+
+ 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 && !isIE8) {
+ this.smoothBlinking = smoothBlinking;
+ dom.setCssClass(this.element, "ace_smooth-blinking", smoothBlinking);
+ this.$updateCursors(true);
+ this.$updateCursors = (this.$updateOpacity).bind(this);
+ 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() {
+ var update = this.$updateCursors;
+ clearInterval(this.intervalId);
+ clearTimeout(this.timeoutId);
+ if (this.smoothBlinking) {
+ dom.removeCssClass(this.element, "ace_smooth-blinking");
+ }
+
+ update(true);
+
+ 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() {
+ update(false);
+ }, 0.6 * this.blinkInterval);
+ }.bind(this);
+
+ this.intervalId = setInterval(function() {
+ update(true);
+ blink();
+ }, 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 + (this.session.$bidiHandler.isBidiRow(pos.row, position.row)
+ ? this.session.$bidiHandler.getPosLeft(pos.column)
+ : 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 = 0, n = selections.length; i < n; i++) {
+ var pixelPos = this.getPixelPosition(selections[i].cursor, true);
+ if ((pixelPos.top > config.height + config.offset ||
+ pixelPos.top < 0) && i > 1) {
+ continue;
+ }
+
+ var style = (this.cursors[cursorIndex++] || this.addCursor()).style;
+
+ if (!this.drawCursor) {
+ style.left = pixelPos.left + "px";
+ style.top = pixelPos.top + "px";
+ style.width = config.characterWidth + "px";
+ style.height = config.lineHeight + "px";
+ } else {
+ this.drawCursor(style, pixelPos, config, selections[i], this.session);
+ }
+ }
+ while (this.cursors.length > cursorIndex)
+ this.removeCursor();
+
+ var overwrite = this.session.getOverwrite();
+ this.$setOverwrite(overwrite);
+ this.$pixelPos = pixelPos;
+ this.restartTimer();
+ };
+
+ this.drawCursor = null;
+
+ 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) {
+"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 MAX_SCROLL_H = 0x8000;
+var ScrollBar = function(parent) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_scrollbar ace_scrollbar" + this.classSuffix;
+
+ this.inner = dom.createElement("div");
+ this.inner.className = "ace_scrollbar-inner";
+ this.element.appendChild(this.inner);
+
+ parent.appendChild(this.element);
+
+ this.setVisible(false);
+ this.skipEvent = false;
+
+ event.addListener(this.element, "scroll", this.onScroll.bind(this));
+ event.addListener(this.element, "mousedown", event.preventDefault);
+};
+
+(function() {
+ oop.implement(this, EventEmitter);
+
+ this.setVisible = function(isVisible) {
+ this.element.style.display = isVisible ? "" : "none";
+ this.isVisible = isVisible;
+ this.coeff = 1;
+ };
+}).call(ScrollBar.prototype);
+var VScrollBar = function(parent, renderer) {
+ ScrollBar.call(this, parent);
+ this.scrollTop = 0;
+ this.scrollHeight = 0;
+ renderer.$scrollbarWidth =
+ this.width = dom.scrollbarWidth(parent.ownerDocument);
+ this.inner.style.width =
+ this.element.style.width = (this.width || 15) + 5 + "px";
+ this.$minWidth = 0;
+};
+
+oop.inherits(VScrollBar, ScrollBar);
+
+(function() {
+
+ this.classSuffix = '-v';
+ this.onScroll = function() {
+ if (!this.skipEvent) {
+ this.scrollTop = this.element.scrollTop;
+ if (this.coeff != 1) {
+ var h = this.element.clientHeight / this.scrollHeight;
+ this.scrollTop = this.scrollTop * (1 - h) / (this.coeff - h);
+ }
+ this._emit("scroll", {data: this.scrollTop});
+ }
+ this.skipEvent = false;
+ };
+ this.getWidth = function() {
+ return Math.max(this.isVisible ? this.width : 0, this.$minWidth || 0);
+ };
+ this.setHeight = function(height) {
+ this.element.style.height = height + "px";
+ };
+ this.setInnerHeight =
+ this.setScrollHeight = function(height) {
+ this.scrollHeight = height;
+ if (height > MAX_SCROLL_H) {
+ this.coeff = MAX_SCROLL_H / height;
+ height = MAX_SCROLL_H;
+ } else if (this.coeff != 1) {
+ this.coeff = 1
+ }
+ this.inner.style.height = height + "px";
+ };
+ this.setScrollTop = function(scrollTop) {
+ if (this.scrollTop != scrollTop) {
+ this.skipEvent = true;
+ this.scrollTop = scrollTop;
+ this.element.scrollTop = scrollTop * this.coeff;
+ }
+ };
+
+}).call(VScrollBar.prototype);
+var HScrollBar = function(parent, renderer) {
+ ScrollBar.call(this, parent);
+ this.scrollLeft = 0;
+ this.height = renderer.$scrollbarWidth;
+ this.inner.style.height =
+ this.element.style.height = (this.height || 15) + 5 + "px";
+};
+
+oop.inherits(HScrollBar, ScrollBar);
+
+(function() {
+
+ this.classSuffix = '-h';
+ this.onScroll = function() {
+ if (!this.skipEvent) {
+ this.scrollLeft = this.element.scrollLeft;
+ this._emit("scroll", {data: this.scrollLeft});
+ }
+ this.skipEvent = false;
+ };
+ this.getHeight = function() {
+ return this.isVisible ? this.height : 0;
+ };
+ this.setWidth = function(width) {
+ this.element.style.width = width + "px";
+ };
+ this.setInnerWidth = function(width) {
+ this.inner.style.width = width + "px";
+ };
+ this.setScrollWidth = function(width) {
+ this.inner.style.width = width + "px";
+ };
+ this.setScrollLeft = function(scrollLeft) {
+ if (this.scrollLeft != scrollLeft) {
+ this.skipEvent = true;
+ this.scrollLeft = this.element.scrollLeft = scrollLeft;
+ }
+ };
+
+}).call(HScrollBar.prototype);
+
+
+exports.ScrollBar = VScrollBar; // backward compatibility
+exports.ScrollBarV = VScrollBar; // backward compatibility
+exports.ScrollBarH = HScrollBar; // backward compatibility
+
+exports.VScrollBar = VScrollBar;
+exports.HScrollBar = HScrollBar;
+});
+
+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.changes = this.changes | change;
+ if (!this.pending && this.changes) {
+ 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/layer/font_metrics",["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 CHAR_COUNT = 0;
+
+var FontMetrics = exports.FontMetrics = function(parentEl) {
+ this.el = dom.createElement("div");
+ this.$setMeasureNodeStyles(this.el.style, true);
+
+ this.$main = dom.createElement("div");
+ this.$setMeasureNodeStyles(this.$main.style);
+
+ this.$measureNode = dom.createElement("div");
+ this.$setMeasureNodeStyles(this.$measureNode.style);
+
+
+ this.el.appendChild(this.$main);
+ this.el.appendChild(this.$measureNode);
+ parentEl.appendChild(this.el);
+
+ if (!CHAR_COUNT)
+ this.$testFractionalRect();
+ this.$measureNode.innerHTML = lang.stringRepeat("X", CHAR_COUNT);
+
+ this.$characterSize = {width: 0, height: 0};
+ this.checkForSizeChanges();
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+
+ this.$characterSize = {width: 0, height: 0};
+
+ this.$testFractionalRect = function() {
+ var el = dom.createElement("div");
+ this.$setMeasureNodeStyles(el.style);
+ el.style.width = "0.2px";
+ document.documentElement.appendChild(el);
+ var w = el.getBoundingClientRect().width;
+ if (w > 0 && w < 1)
+ CHAR_COUNT = 50;
+ else
+ CHAR_COUNT = 100;
+ el.parentNode.removeChild(el);
+ };
+
+ this.$setMeasureNodeStyles = function(style, isRoot) {
+ style.width = style.height = "auto";
+ style.left = style.top = "0px";
+ style.visibility = "hidden";
+ style.position = "absolute";
+ style.whiteSpace = "pre";
+
+ if (useragent.isIE < 8) {
+ style["font-family"] = "inherit";
+ } else {
+ style.font = "inherit";
+ }
+ style.overflow = isRoot ? "hidden" : "visible";
+ };
+
+ 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.charSizes = Object.create(null);
+ this.allowBoldFonts = boldSize && boldSize.width === size.width && boldSize.height === size.height;
+ this._emit("changeCharacterSize", {data: size});
+ }
+ };
+
+ this.$pollSizeChanges = function() {
+ if (this.$pollSizeChangesTimer)
+ return this.$pollSizeChangesTimer;
+ var self = this;
+ return this.$pollSizeChangesTimer = setInterval(function() {
+ self.checkForSizeChanges();
+ }, 500);
+ };
+
+ this.setPolling = function(val) {
+ if (val) {
+ this.$pollSizeChanges();
+ } else if (this.$pollSizeChangesTimer) {
+ clearInterval(this.$pollSizeChangesTimer);
+ this.$pollSizeChangesTimer = 0;
+ }
+ };
+
+ this.$measureSizes = function() {
+ if (CHAR_COUNT === 50) {
+ var rect = null;
+ try {
+ rect = this.$measureNode.getBoundingClientRect();
+ } catch(e) {
+ rect = {width: 0, height:0 };
+ }
+ var size = {
+ height: rect.height,
+ width: rect.width / CHAR_COUNT
+ };
+ } else {
+ var size = {
+ height: this.$measureNode.clientHeight,
+ width: this.$measureNode.clientWidth / CHAR_COUNT
+ };
+ }
+ if (size.width === 0 || size.height === 0)
+ return null;
+ return size;
+ };
+
+ this.$measureCharWidth = function(ch) {
+ this.$main.innerHTML = lang.stringRepeat(ch, CHAR_COUNT);
+ var rect = this.$main.getBoundingClientRect();
+ return rect.width / CHAR_COUNT;
+ };
+
+ this.getCharacterWidth = function(ch) {
+ var w = this.charSizes[ch];
+ if (w === undefined) {
+ w = this.charSizes[ch] = this.$measureCharWidth(ch) / this.$characterSize.width;
+ }
+ return w;
+ };
+
+ this.destroy = function() {
+ clearInterval(this.$pollSizeChangesTimer);
+ if (this.el && this.el.parentNode)
+ this.el.parentNode.removeChild(this.el);
+ };
+
+}).call(FontMetrics.prototype);
+
+});
+
+ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+var config = require("./config");
+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 HScrollBar = require("./scrollbar").HScrollBar;
+var VScrollBar = require("./scrollbar").VScrollBar;
+var RenderLoop = require("./renderloop").RenderLoop;
+var FontMetrics = require("./layer/font_metrics").FontMetrics;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var editorCss = ".ace_editor {\
+position: relative;\
+overflow: hidden;\
+font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\
+direction: ltr;\
+text-align: left;\
+-webkit-tap-highlight-color: rgba(0, 0, 0, 0);\
+}\
+.ace_scroller {\
+position: absolute;\
+overflow: hidden;\
+top: 0;\
+bottom: 0;\
+background-color: inherit;\
+-ms-user-select: none;\
+-moz-user-select: none;\
+-webkit-user-select: none;\
+user-select: none;\
+cursor: text;\
+}\
+.ace_content {\
+position: absolute;\
+-moz-box-sizing: border-box;\
+-webkit-box-sizing: border-box;\
+box-sizing: border-box;\
+min-width: 100%;\
+}\
+.ace_dragging .ace_scroller:before{\
+position: absolute;\
+top: 0;\
+left: 0;\
+right: 0;\
+bottom: 0;\
+content: '';\
+background: rgba(250, 250, 250, 0.01);\
+z-index: 1000;\
+}\
+.ace_dragging.ace_dark .ace_scroller:before{\
+background: rgba(0, 0, 0, 0.01);\
+}\
+.ace_selecting, .ace_selecting * {\
+cursor: text !important;\
+}\
+.ace_gutter {\
+position: absolute;\
+overflow : hidden;\
+width: auto;\
+top: 0;\
+bottom: 0;\
+left: 0;\
+cursor: default;\
+z-index: 4;\
+-ms-user-select: none;\
+-moz-user-select: none;\
+-webkit-user-select: none;\
+user-select: none;\
+}\
+.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,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==\");\
+background-repeat: no-repeat;\
+background-position: 2px center;\
+}\
+.ace_gutter-cell.ace_warning {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==\");\
+background-position: 2px center;\
+}\
+.ace_gutter-cell.ace_info {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=\");\
+background-position: 2px center;\
+}\
+.ace_dark .ace_gutter-cell.ace_info {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC\");\
+}\
+.ace_scrollbar {\
+position: absolute;\
+right: 0;\
+bottom: 0;\
+z-index: 6;\
+}\
+.ace_scrollbar-inner {\
+position: absolute;\
+cursor: text;\
+left: 0;\
+top: 0;\
+}\
+.ace_scrollbar-v{\
+overflow-x: hidden;\
+overflow-y: scroll;\
+top: 0;\
+}\
+.ace_scrollbar-h {\
+overflow-x: scroll;\
+overflow-y: hidden;\
+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;\
+font: inherit;\
+padding: 0 1px;\
+margin: 0 -1px;\
+text-indent: -1em;\
+-ms-user-select: text;\
+-moz-user-select: text;\
+-webkit-user-select: text;\
+user-select: text;\
+white-space: pre!important;\
+}\
+.ace_text-input.ace_composition {\
+background: inherit;\
+color: inherit;\
+z-index: 1000;\
+opacity: 1;\
+text-indent: 0;\
+}\
+.ace_layer {\
+z-index: 1;\
+position: absolute;\
+overflow: hidden;\
+word-wrap: normal;\
+white-space: pre;\
+height: 100%;\
+width: 100%;\
+-moz-box-sizing: border-box;\
+-webkit-box-sizing: border-box;\
+box-sizing: border-box;\
+pointer-events: none;\
+}\
+.ace_gutter-layer {\
+position: relative;\
+width: auto;\
+text-align: right;\
+pointer-events: auto;\
+}\
+.ace_text-layer {\
+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;\
+border-left: 2px solid;\
+transform: translatez(0);\
+}\
+.ace_multiselect .ace_cursor {\
+border-left-width: 1px;\
+}\
+.ace_slim-cursors .ace_cursor {\
+border-left-width: 1px;\
+}\
+.ace_overwrite-cursors .ace_cursor {\
+border-left-width: 0;\
+border-bottom: 1px solid;\
+}\
+.ace_hidden-cursors .ace_cursor {\
+opacity: 0.2;\
+}\
+.ace_smooth-blinking .ace_cursor {\
+-webkit-transition: opacity 0.18s;\
+transition: opacity 0.18s;\
+}\
+.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\
+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;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\
+url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=\");\
+background-repeat: no-repeat, repeat-x;\
+background-position: center center, top left;\
+color: transparent;\
+border: 1px solid black;\
+border-radius: 2px;\
+cursor: pointer;\
+pointer-events: auto;\
+}\
+.ace_dark .ace_fold {\
+}\
+.ace_fold:hover{\
+background-image:\
+url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII=\"),\
+url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC\");\
+}\
+.ace_tooltip {\
+background-color: #FFF;\
+background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));\
+background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\
+border: 1px solid gray;\
+border-radius: 1px;\
+box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\
+color: black;\
+max-width: 100%;\
+padding: 3px 4px;\
+position: fixed;\
+z-index: 999999;\
+-moz-box-sizing: border-box;\
+-webkit-box-sizing: border-box;\
+box-sizing: border-box;\
+cursor: default;\
+white-space: pre;\
+word-wrap: break-word;\
+line-height: normal;\
+font-style: normal;\
+font-weight: normal;\
+letter-spacing: normal;\
+pointer-events: none;\
+}\
+.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: none;\
+width: 11px;\
+vertical-align: top;\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==\");\
+background-repeat: no-repeat;\
+background-position: center;\
+border-radius: 3px;\
+border: 1px solid transparent;\
+cursor: pointer;\
+}\
+.ace_folding-enabled .ace_fold-widget {\
+display: inline-block; \
+}\
+.ace_fold-widget.ace_end {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==\");\
+}\
+.ace_fold-widget.ace_closed {\
+background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==\");\
+}\
+.ace_fold-widget:hover {\
+border: 1px solid rgba(0, 0, 0, 0.3);\
+background-color: rgba(255, 255, 255, 0.2);\
+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);\
+box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\
+}\
+.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 {\
+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 {\
+-webkit-transition: opacity 0.4s ease 0.05s;\
+transition: opacity 0.4s ease 0.05s;\
+opacity: 0;\
+}\
+.ace_fade-fold-widgets:hover .ace_fold-widget {\
+-webkit-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;\
+}\
+.ace_error-marker {\
+background-color: rgba(255, 0, 0,0.2);\
+position: absolute;\
+z-index: 9;\
+}\
+.ace_highlight-marker {\
+background-color: rgba(255, 255, 0,0.2);\
+position: absolute;\
+z-index: 8;\
+}\
+.ace_br1 {border-top-left-radius : 3px;}\
+.ace_br2 {border-top-right-radius : 3px;}\
+.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\
+.ace_br4 {border-bottom-right-radius: 3px;}\
+.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\
+.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\
+.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\
+.ace_br8 {border-bottom-left-radius : 3px;}\
+.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\
+.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\
+.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\
+.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\
+.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\
+.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\
+.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\
+.ace_text-input-ios {\
+position: absolute !important;\
+top: -100000px !important;\
+left: -100000px !important;\
+}\
+";
+
+dom.importCssString(editorCss, "ace_editor.css");
+
+var VirtualRenderer = function(container, theme) {
+ var _self = this;
+
+ this.container = container || dom.createElement("div");
+ this.$keepTextAreaAtCursor = !useragent.isOldIE;
+
+ dom.addCssClass(this.container, "ace_editor");
+
+ this.setTheme(theme);
+
+ this.$gutter = dom.createElement("div");
+ this.$gutter.className = "ace_gutter";
+ this.container.appendChild(this.$gutter);
+ this.$gutter.setAttribute("aria-hidden", true);
+
+ 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.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.$vScroll = false;
+
+ this.scrollBar =
+ this.scrollBarV = new VScrollBar(this.container, this);
+ this.scrollBarH = new HScrollBar(this.container, this);
+ this.scrollBarV.addEventListener("scroll", function(e) {
+ if (!_self.$scrollAnimation)
+ _self.session.setScrollTop(e.data - _self.scrollMargin.top);
+ });
+ this.scrollBarH.addEventListener("scroll", function(e) {
+ if (!_self.$scrollAnimation)
+ _self.session.setScrollLeft(e.data - _self.scrollMargin.left);
+ });
+
+ this.scrollTop = 0;
+ this.scrollLeft = 0;
+
+ this.cursorPos = {
+ row : 0,
+ column : 0
+ };
+
+ this.$fontMetrics = new FontMetrics(this.container);
+ this.$textLayer.$setFontMetrics(this.$fontMetrics);
+ this.$textLayer.addEventListener("changeCharacterSize", function(e) {
+ _self.updateCharacterSize();
+ _self.onResize(true, _self.gutterWidth, _self.$size.width, _self.$size.height);
+ _self._signal("changeCharacterSize", e);
+ });
+
+ this.$size = {
+ width: 0,
+ height: 0,
+ scrollerHeight: 0,
+ scrollerWidth: 0,
+ $dirty: true
+ };
+
+ this.layerConfig = {
+ width : 1,
+ padding : 0,
+ firstRow : 0,
+ firstRowScreen: 0,
+ lastRow : 0,
+ lineHeight : 0,
+ characterWidth : 0,
+ minHeight : 1,
+ maxHeight : 1,
+ offset : 0,
+ height : 1,
+ gutterOffset: 1
+ };
+
+ this.scrollMargin = {
+ left: 0,
+ right: 0,
+ top: 0,
+ bottom: 0,
+ v: 0,
+ h: 0
+ };
+
+ this.$loop = new RenderLoop(
+ this.$renderChanges.bind(this),
+ this.container.ownerDocument.defaultView
+ );
+ this.$loop.schedule(this.CHANGE_FULL);
+
+ this.updateCharacterSize();
+ this.setPadding(4);
+ config.resetOptions(this);
+ config._emit("renderer", this);
+};
+
+(function() {
+
+ 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.layerConfig.characterWidth =
+ this.characterWidth = this.$textLayer.getCharacterWidth();
+ this.layerConfig.lineHeight =
+ this.lineHeight = this.$textLayer.getLineHeight();
+ this.$updatePrintMargin();
+ };
+ this.setSession = function(session) {
+ if (this.session)
+ this.session.doc.off("changeNewLineMode", this.onChangeNewLineMode);
+
+ this.session = session;
+ if (session && this.scrollMargin.top && session.getScrollTop() <= 0)
+ session.setScrollTop(-this.scrollMargin.top);
+
+ this.$cursorLayer.setSession(session);
+ this.$markerBack.setSession(session);
+ this.$markerFront.setSession(session);
+ this.$gutterLayer.setSession(session);
+ this.$textLayer.setSession(session);
+ if (!session)
+ return;
+
+ this.$loop.schedule(this.CHANGE_FULL);
+ this.session.$setFontMetrics(this.$fontMetrics);
+ this.scrollBarH.scrollLeft = this.scrollBarV.scrollTop = null;
+
+ this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this);
+ this.onChangeNewLineMode()
+ this.session.doc.on("changeNewLineMode", this.onChangeNewLineMode);
+ };
+ this.updateLines = function(firstRow, lastRow, force) {
+ 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.lastRow < this.layerConfig.firstRow) {
+ if (force)
+ this.$changedLines.lastRow = this.layerConfig.lastRow;
+ else
+ return;
+ }
+ if (this.$changedLines.firstRow > this.layerConfig.lastRow)
+ return;
+ this.$loop.schedule(this.CHANGE_LINES);
+ };
+
+ this.onChangeNewLineMode = function() {
+ this.$loop.schedule(this.CHANGE_TEXT);
+ this.$textLayer.$updateEolChar();
+ this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR);
+ };
+
+ 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.$changes = 0;
+ this.$updateSizeAsync = function() {
+ if (this.$loop.pending)
+ this.$size.$dirty = true;
+ else
+ this.onResize();
+ };
+ this.onResize = function(force, gutterWidth, width, height) {
+ if (this.resizing > 2)
+ return;
+ else if (this.resizing > 0)
+ this.resizing++;
+ else
+ this.resizing = force ? 1 : 0;
+ var el = this.container;
+ if (!height)
+ height = el.clientHeight || el.scrollHeight;
+ if (!width)
+ width = el.clientWidth || el.scrollWidth;
+ var changes = this.$updateCachedSize(force, gutterWidth, width, height);
+
+
+ if (!this.$size.scrollerHeight || (!width && !height))
+ return this.resizing = 0;
+
+ if (force)
+ this.$gutterLayer.$padding = null;
+
+ if (force)
+ this.$renderChanges(changes | this.$changes, true);
+ else
+ this.$loop.schedule(changes | this.$changes);
+
+ if (this.resizing)
+ this.resizing = 0;
+ this.scrollBarV.scrollLeft = this.scrollBarV.scrollTop = null;
+ };
+
+ this.$updateCachedSize = function(force, gutterWidth, width, height) {
+ height -= (this.$extraHeight || 0);
+ var changes = 0;
+ var size = this.$size;
+ var oldSize = {
+ width: size.width,
+ height: size.height,
+ scrollerHeight: size.scrollerHeight,
+ scrollerWidth: size.scrollerWidth
+ };
+ if (height && (force || size.height != height)) {
+ size.height = height;
+ changes |= this.CHANGE_SIZE;
+
+ size.scrollerHeight = size.height;
+ if (this.$horizScroll)
+ size.scrollerHeight -= this.scrollBarH.getHeight();
+ this.scrollBarV.element.style.bottom = this.scrollBarH.getHeight() + "px";
+
+ changes = changes | this.CHANGE_SCROLL;
+ }
+
+ if (width && (force || size.width != width)) {
+ changes |= this.CHANGE_SIZE;
+ size.width = width;
+
+ if (gutterWidth == null)
+ gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;
+
+ this.gutterWidth = gutterWidth;
+
+ this.scrollBarH.element.style.left =
+ this.scroller.style.left = gutterWidth + "px";
+ size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth());
+
+ this.scrollBarH.element.style.right =
+ this.scroller.style.right = this.scrollBarV.getWidth() + "px";
+ this.scroller.style.bottom = this.scrollBarH.getHeight() + "px";
+
+ if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force)
+ changes |= this.CHANGE_FULL;
+ }
+
+ size.$dirty = !width || !height;
+
+ if (changes)
+ this._signal("resize", oldSize);
+
+ return changes;
+ };
+
+ this.onGutterResize = function() {
+ var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0;
+ if (gutterWidth != this.gutterWidth)
+ this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height);
+
+ if (this.session.getUseWrapMode() && this.adjustWrapLimit()) {
+ this.$loop.schedule(this.CHANGE_FULL);
+ } else if (this.$size.$dirty) {
+ this.$loop.schedule(this.CHANGE_FULL);
+ } else {
+ this.$computeLayerConfig();
+ this.$loop.schedule(this.CHANGE_MARKER);
+ }
+ };
+ this.adjustWrapLimit = function() {
+ var availableWidth = this.$size.scrollerWidth - this.$padding * 2;
+ var limit = Math.floor(availableWidth / this.characterWidth);
+ return this.session.adjustWrapLimit(limit, this.$showPrintMargin && this.$printMarginColumn);
+ };
+ this.setAnimatedScroll = function(shouldAnimate){
+ this.setOption("animatedScroll", shouldAnimate);
+ };
+ this.getAnimatedScroll = function() {
+ return this.$animatedScroll;
+ };
+ this.setShowInvisibles = function(showInvisibles) {
+ this.setOption("showInvisibles", showInvisibles);
+ this.session.$bidiHandler.setShowInvisibles(showInvisibles);
+ };
+ this.getShowInvisibles = function() {
+ return this.getOption("showInvisibles");
+ };
+ this.getDisplayIndentGuides = function() {
+ return this.getOption("displayIndentGuides");
+ };
+
+ this.setDisplayIndentGuides = function(display) {
+ this.setOption("displayIndentGuides", display);
+ };
+ this.setShowPrintMargin = function(showPrintMargin) {
+ this.setOption("showPrintMargin", showPrintMargin);
+ };
+ this.getShowPrintMargin = function() {
+ return this.getOption("showPrintMargin");
+ };
+ this.setPrintMarginColumn = function(showPrintMargin) {
+ this.setOption("printMarginColumn", showPrintMargin);
+ };
+ this.getPrintMarginColumn = function() {
+ return this.getOption("printMarginColumn");
+ };
+ this.getShowGutter = function(){
+ return this.getOption("showGutter");
+ };
+ this.setShowGutter = function(show){
+ return this.setOption("showGutter", show);
+ };
+
+ this.getFadeFoldWidgets = function(){
+ return this.getOption("fadeFoldWidgets")
+ };
+
+ this.setFadeFoldWidgets = function(show) {
+ this.setOption("fadeFoldWidgets", show);
+ };
+
+ this.setHighlightGutterLine = function(shouldHighlight) {
+ this.setOption("highlightGutterLine", shouldHighlight);
+ };
+
+ this.getHighlightGutterLine = function() {
+ return this.getOption("highlightGutterLine");
+ };
+
+ this.$updateGutterLineHighlight = function() {
+ var pos = this.$cursorLayer.$pixelPos;
+ var height = this.layerConfig.lineHeight;
+ if (this.session.getUseWrapMode()) {
+ var cursor = this.session.selection.getCursor();
+ cursor.column = 0;
+ pos = this.$cursorLayer.getPixelPosition(cursor, true);
+ height *= this.session.getRowLength(cursor.row);
+ }
+ this.$gutterLineHighlight.style.top = pos.top - this.layerConfig.offset + "px";
+ this.$gutterLineHighlight.style.height = height + "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";
+
+ if (this.session && this.session.$wrap == -1)
+ this.adjustWrapLimit();
+ };
+ this.getContainerElement = function() {
+ return this.container;
+ };
+ this.getMouseEventTarget = function() {
+ return this.scroller;
+ };
+ this.getTextAreaContainer = function() {
+ return this.container;
+ };
+ this.$moveTextAreaToCursor = function() {
+ if (!this.$keepTextAreaAtCursor)
+ return;
+ var config = this.layerConfig;
+ var posTop = this.$cursorLayer.$pixelPos.top;
+ var posLeft = this.$cursorLayer.$pixelPos.left;
+ posTop -= config.offset;
+
+ var style = this.textarea.style;
+ var h = this.lineHeight;
+ if (posTop < 0 || posTop > config.height - h) {
+ style.top = style.left = "0";
+ return;
+ }
+
+ var w = this.characterWidth;
+ if (this.$composition) {
+ var val = this.textarea.value.replace(/^\x01+/, "");
+ w *= (this.session.$getStringScreenWidth(val)[0]+2);
+ h += 2;
+ }
+ posLeft -= this.scrollLeft;
+ if (posLeft > this.$size.scrollerWidth - w)
+ posLeft = this.$size.scrollerWidth - w;
+
+ posLeft += this.gutterWidth;
+ style.height = h + "px";
+ style.width = w + "px";
+ style.left = Math.min(posLeft, this.$size.scrollerWidth - w) + "px";
+ style.top = Math.min(posTop, this.$size.height - h) + "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 config = this.layerConfig;
+ var lastRow = config.lastRow
+ var top = this.session.documentToScreenRow(lastRow, 0) * config.lineHeight;
+ if (top - this.session.getScrollTop() > config.height - config.lineHeight)
+ return lastRow - 1;
+ return lastRow;
+ };
+ 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.setScrollMargin = function(top, bottom, left, right) {
+ var sm = this.scrollMargin;
+ sm.top = top|0;
+ sm.bottom = bottom|0;
+ sm.right = right|0;
+ sm.left = left|0;
+ sm.v = sm.top + sm.bottom;
+ sm.h = sm.left + sm.right;
+ if (sm.top && this.scrollTop <= 0 && this.session)
+ this.session.setScrollTop(-sm.top);
+ this.updateFull();
+ };
+ this.getHScrollBarAlwaysVisible = function() {
+ return this.$hScrollBarAlwaysVisible;
+ };
+ this.setHScrollBarAlwaysVisible = function(alwaysVisible) {
+ this.setOption("hScrollBarAlwaysVisible", alwaysVisible);
+ };
+ this.getVScrollBarAlwaysVisible = function() {
+ return this.$vScrollBarAlwaysVisible;
+ };
+ this.setVScrollBarAlwaysVisible = function(alwaysVisible) {
+ this.setOption("vScrollBarAlwaysVisible", alwaysVisible);
+ };
+
+ this.$updateScrollBarV = function() {
+ var scrollHeight = this.layerConfig.maxHeight;
+ var scrollerHeight = this.$size.scrollerHeight;
+ if (!this.$maxLines && this.$scrollPastEnd) {
+ scrollHeight -= (scrollerHeight - this.lineHeight) * this.$scrollPastEnd;
+ if (this.scrollTop > scrollHeight - scrollerHeight) {
+ scrollHeight = this.scrollTop + scrollerHeight;
+ this.scrollBarV.scrollTop = null;
+ }
+ }
+ this.scrollBarV.setScrollHeight(scrollHeight + this.scrollMargin.v);
+ this.scrollBarV.setScrollTop(this.scrollTop + this.scrollMargin.top);
+ };
+ this.$updateScrollBarH = function() {
+ this.scrollBarH.setScrollWidth(this.layerConfig.width + 2 * this.$padding + this.scrollMargin.h);
+ this.scrollBarH.setScrollLeft(this.scrollLeft + this.scrollMargin.left);
+ };
+
+ this.$frozen = false;
+ this.freeze = function() {
+ this.$frozen = true;
+ };
+
+ this.unfreeze = function() {
+ this.$frozen = false;
+ };
+
+ this.$renderChanges = function(changes, force) {
+ if (this.$changes) {
+ changes |= this.$changes;
+ this.$changes = 0;
+ }
+ if ((!this.session || !this.container.offsetWidth || this.$frozen) || (!changes && !force)) {
+ this.$changes |= changes;
+ return;
+ }
+ if (this.$size.$dirty) {
+ this.$changes |= changes;
+ return this.onResize(true);
+ }
+ if (!this.lineHeight) {
+ this.$textLayer.checkForSizeChanges();
+ }
+
+ this._signal("beforeRender");
+ var config = this.layerConfig;
+ if (changes & this.CHANGE_FULL ||
+ changes & this.CHANGE_SIZE ||
+ changes & this.CHANGE_TEXT ||
+ changes & this.CHANGE_LINES ||
+ changes & this.CHANGE_SCROLL ||
+ changes & this.CHANGE_H_SCROLL
+ ) {
+ changes |= this.$computeLayerConfig();
+ if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) {
+ var st = this.scrollTop + (config.firstRow - this.layerConfig.firstRow) * this.lineHeight;
+ if (st > 0) {
+ this.scrollTop = st;
+ changes = changes | this.CHANGE_SCROLL;
+ changes |= this.$computeLayerConfig();
+ }
+ }
+ config = this.layerConfig;
+ this.$updateScrollBarV();
+ if (changes & this.CHANGE_H_SCROLL)
+ this.$updateScrollBarH();
+ this.$gutterLayer.element.style.marginTop = (-config.offset) + "px";
+ this.content.style.marginTop = (-config.offset) + "px";
+ this.content.style.width = config.width + 2 * this.$padding + "px";
+ this.content.style.height = config.minHeight + "px";
+ }
+ if (changes & this.CHANGE_H_SCROLL) {
+ this.content.style.marginLeft = -this.scrollLeft + "px";
+ this.scroller.className = this.scrollLeft <= 0 ? "ace_scroller" : "ace_scroller ace_scroll-left";
+ }
+ if (changes & this.CHANGE_FULL) {
+ this.$textLayer.update(config);
+ if (this.$showGutter)
+ this.$gutterLayer.update(config);
+ this.$markerBack.update(config);
+ this.$markerFront.update(config);
+ this.$cursorLayer.update(config);
+
+ this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);
+ if (this.session.$bidiHandler.getShowInvisibles() === undefined)
+ this.session.$bidiHandler.setShowInvisibles(this.getShowInvisibles());
+
+ this.$moveTextAreaToCursor();
+ this.$highlightGutterLine && this.$updateGutterLineHighlight();
+ this._signal("afterRender");
+ return;
+ }
+ if (changes & this.CHANGE_SCROLL) {
+ if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES)
+ this.$textLayer.update(config);
+ else
+ this.$textLayer.scrollLines(config);
+
+ if (this.$showGutter)
+ this.$gutterLayer.update(config);
+ this.$markerBack.update(config);
+ this.$markerFront.update(config);
+ this.$cursorLayer.update(config);
+ this.$highlightGutterLine && this.$updateGutterLineHighlight();
+ this.$moveTextAreaToCursor();
+ this._signal("afterRender");
+ return;
+ }
+
+ if (changes & this.CHANGE_TEXT) {
+ this.$textLayer.update(config);
+ if (this.$showGutter)
+ this.$gutterLayer.update(config);
+ }
+ else if (changes & this.CHANGE_LINES) {
+ if (this.$updateLines() || (changes & this.CHANGE_GUTTER) && this.$showGutter)
+ this.$gutterLayer.update(config);
+ }
+ else if (changes & this.CHANGE_TEXT || changes & this.CHANGE_GUTTER) {
+ if (this.$showGutter)
+ this.$gutterLayer.update(config);
+ }
+
+ if (changes & this.CHANGE_CURSOR) {
+ this.$cursorLayer.update(config);
+ this.$moveTextAreaToCursor();
+ this.$highlightGutterLine && this.$updateGutterLineHighlight();
+ }
+
+ if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) {
+ this.$markerFront.update(config);
+ }
+
+ if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) {
+ this.$markerBack.update(config);
+ }
+
+ this._signal("afterRender");
+ };
+
+
+ this.$autosize = function() {
+ var height = this.session.getScreenLength() * this.lineHeight;
+ var maxHeight = this.$maxLines * this.lineHeight;
+ var desiredHeight = Math.min(maxHeight,
+ Math.max((this.$minLines || 1) * this.lineHeight, height)
+ ) + this.scrollMargin.v + (this.$extraHeight || 0);
+ if (this.$horizScroll)
+ desiredHeight += this.scrollBarH.getHeight();
+ if (this.$maxPixelHeight && desiredHeight > this.$maxPixelHeight)
+ desiredHeight = this.$maxPixelHeight;
+ var vScroll = height > maxHeight;
+
+ if (desiredHeight != this.desiredHeight ||
+ this.$size.height != this.desiredHeight || vScroll != this.$vScroll) {
+ if (vScroll != this.$vScroll) {
+ this.$vScroll = vScroll;
+ this.scrollBarV.setVisible(vScroll);
+ }
+
+ var w = this.container.clientWidth;
+ this.container.style.height = desiredHeight + "px";
+ this.$updateCachedSize(true, this.$gutterWidth, w, desiredHeight);
+ this.desiredHeight = desiredHeight;
+
+ this._signal("autosize");
+ }
+ };
+
+ this.$computeLayerConfig = function() {
+ var session = this.session;
+ var size = this.$size;
+
+ var hideScrollbars = size.height <= 2 * this.lineHeight;
+ var screenLines = this.session.getScreenLength();
+ var maxHeight = screenLines * this.lineHeight;
+
+ var longestLine = this.$getLongestLine();
+
+ var horizScroll = !hideScrollbars && (this.$hScrollBarAlwaysVisible ||
+ size.scrollerWidth - longestLine - 2 * this.$padding < 0);
+
+ var hScrollChanged = this.$horizScroll !== horizScroll;
+ if (hScrollChanged) {
+ this.$horizScroll = horizScroll;
+ this.scrollBarH.setVisible(horizScroll);
+ }
+ var vScrollBefore = this.$vScroll; // autosize can change vscroll value in which case we need to update longestLine
+ if (this.$maxLines && this.lineHeight > 1)
+ this.$autosize();
+
+ var offset = this.scrollTop % this.lineHeight;
+ var minHeight = size.scrollerHeight + this.lineHeight;
+
+ var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd
+ ? (size.scrollerHeight - this.lineHeight) * this.$scrollPastEnd
+ : 0;
+ maxHeight += scrollPastEnd;
+
+ var sm = this.scrollMargin;
+ this.session.setScrollTop(Math.max(-sm.top,
+ Math.min(this.scrollTop, maxHeight - size.scrollerHeight + sm.bottom)));
+
+ this.session.setScrollLeft(Math.max(-sm.left, Math.min(this.scrollLeft,
+ longestLine + 2 * this.$padding - size.scrollerWidth + sm.right)));
+
+ var vScroll = !hideScrollbars && (this.$vScrollBarAlwaysVisible ||
+ size.scrollerHeight - maxHeight + scrollPastEnd < 0 || this.scrollTop > sm.top);
+ var vScrollChanged = vScrollBefore !== vScroll;
+ if (vScrollChanged) {
+ this.$vScroll = vScroll;
+ this.scrollBarV.setVisible(vScroll);
+ }
+
+ 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 = size.scrollerHeight + session.getRowLength(lastRow) * lineHeight +
+ firstRowHeight;
+
+ offset = this.scrollTop - firstRowScreen * lineHeight;
+
+ var changes = 0;
+ if (this.layerConfig.width != longestLine)
+ changes = this.CHANGE_H_SCROLL;
+ if (hScrollChanged || vScrollChanged) {
+ changes = this.$updateCachedSize(true, this.gutterWidth, size.width, size.height);
+ this._signal("scrollbarVisibilityChanged");
+ if (vScrollChanged)
+ longestLine = this.$getLongestLine();
+ }
+
+ this.layerConfig = {
+ width : longestLine,
+ padding : this.$padding,
+ firstRow : firstRow,
+ firstRowScreen: firstRowScreen,
+ lastRow : lastRow,
+ lineHeight : lineHeight,
+ characterWidth : this.characterWidth,
+ minHeight : minHeight,
+ maxHeight : maxHeight,
+ offset : offset,
+ gutterOffset : lineHeight ? Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)) : 0,
+ height : this.$size.scrollerHeight
+ };
+
+ return changes;
+ };
+
+ this.$updateLines = function() {
+ if (!this.$changedLines) return;
+ 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.showInvisibles && !this.session.$useWrapMode)
+ 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, $viewMargin) {
+ if (this.$size.scrollerHeight === 0)
+ return;
+
+ var pos = this.$cursorLayer.getPixelPosition(cursor);
+
+ var left = pos.left;
+ var top = pos.top;
+
+ var topMargin = $viewMargin && $viewMargin.top || 0;
+ var bottomMargin = $viewMargin && $viewMargin.bottom || 0;
+
+ var scrollTop = this.$scrollAnimation ? this.session.getScrollTop() : this.scrollTop;
+
+ if (scrollTop + topMargin > top) {
+ if (offset && scrollTop + topMargin > top + this.lineHeight)
+ top -= offset * this.$size.scrollerHeight;
+ if (top === 0)
+ top = -this.scrollMargin.top;
+ this.session.setScrollTop(top);
+ } else if (scrollTop + this.$size.scrollerHeight - bottomMargin < top + this.lineHeight) {
+ if (offset && scrollTop + this.$size.scrollerHeight - bottomMargin < top - this.lineHeight)
+ 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 = -this.scrollMargin.left;
+ this.session.setScrollLeft(left);
+ } else if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) {
+ this.session.setScrollLeft(Math.round(left + this.characterWidth - this.$size.scrollerWidth));
+ } else if (scrollLeft <= this.$padding && left - scrollLeft < this.characterWidth) {
+ this.session.setScrollLeft(0);
+ }
+ };
+ 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)
+ return;
+ var _self = this;
+
+ if (fromValue == toValue)
+ return;
+
+ if (this.$scrollAnimation) {
+ var oldSteps = this.$scrollAnimation.steps;
+ if (oldSteps.length) {
+ fromValue = oldSteps[0];
+ if (fromValue == toValue)
+ return;
+ }
+ }
+
+ var steps = _self.$calcSteps(fromValue, toValue);
+ this.$scrollAnimation = {from: fromValue, to: toValue, steps: steps};
+
+ clearInterval(this.$timer);
+
+ _self.session.setScrollTop(steps.shift());
+ _self.session.$scrollTop = toValue;
+ 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.$scrollAnimation = null;
+ 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 (this.scrollLeft !== scrollLeft)
+ this.scrollLeft = scrollLeft;
+ this.$loop.schedule(this.CHANGE_H_SCROLL);
+ };
+ this.scrollTo = function(x, y) {
+ this.session.setScrollTop(y);
+ this.session.setScrollLeft(y);
+ };
+ 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() >= 1 - this.scrollMargin.top)
+ return true;
+ if (deltaY > 0 && this.session.getScrollTop() + this.$size.scrollerHeight
+ - this.layerConfig.maxHeight < -1 + this.scrollMargin.bottom)
+ return true;
+ if (deltaX < 0 && this.session.getScrollLeft() >= 1 - this.scrollMargin.left)
+ return true;
+ if (deltaX > 0 && this.session.getScrollLeft() + this.$size.scrollerWidth
+ - this.layerConfig.width < -1 + this.scrollMargin.right)
+ return true;
+ };
+
+ this.pixelToScreenCoordinates = function(x, y) {
+ var canvasPos = this.scroller.getBoundingClientRect();
+
+ var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding;
+ var offset = offsetX / 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, offsetX: offsetX};
+ };
+
+ this.screenToTextCoordinates = function(x, y) {
+ var canvasPos = this.scroller.getBoundingClientRect();
+ var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding;
+
+ var col = Math.round(offsetX / this.characterWidth);
+
+ var row = (y + this.scrollTop - canvasPos.top) / this.lineHeight;
+
+ return this.session.screenToDocumentPosition(row, Math.max(col, 0), offsetX);
+ };
+ this.textToScreenCoordinates = function(row, column) {
+ var canvasPos = this.scroller.getBoundingClientRect();
+ var pos = this.session.documentToScreenPosition(row, column);
+
+ var x = this.$padding + (this.session.$bidiHandler.isBidiRow(pos.row, row)
+ ? this.session.$bidiHandler.getPosLeft(pos.column)
+ : 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.setTheme = function(theme, cb) {
+ var _self = this;
+ this.$themeId = theme;
+ _self._dispatchEvent('themeChange',{theme:theme});
+
+ if (!theme || typeof theme == "string") {
+ var moduleName = theme || this.$options.theme.initialValue;
+ config.loadModule(["theme", moduleName], afterLoad);
+ } else {
+ afterLoad(theme);
+ }
+
+ function afterLoad(module) {
+ if (_self.$themeId != theme)
+ return cb && cb();
+ if (!module || !module.cssClass)
+ throw new Error("couldn't load module " + theme + " or it didn't call define");
+ dom.importCssString(
+ module.cssText,
+ module.cssClass,
+ _self.container.ownerDocument
+ );
+
+ if (_self.theme)
+ dom.removeCssClass(_self.container, _self.theme.cssClass);
+
+ var padding = "padding" in module ? module.padding
+ : "padding" in (_self.theme || {}) ? 4 : _self.$padding;
+ if (_self.$padding && padding != _self.$padding)
+ _self.setPadding(padding);
+ _self.$theme = module.cssClass;
+
+ _self.theme = module;
+ dom.addCssClass(_self.container, module.cssClass);
+ dom.setCssClass(_self.container, "ace_dark", module.isDark);
+ if (_self.$size) {
+ _self.$size.width = 0;
+ _self.$updateSizeAsync();
+ }
+
+ _self._dispatchEvent('themeLoaded', {theme:module});
+ cb && cb();
+ }
+ };
+ this.getTheme = function() {
+ return this.$themeId;
+ };
+ this.setStyle = function(style, include) {
+ dom.setCssClass(this.container, style, include !== false);
+ };
+ this.unsetStyle = function(style) {
+ dom.removeCssClass(this.container, style);
+ };
+
+ this.setCursorStyle = function(style) {
+ if (this.scroller.style.cursor != style)
+ this.scroller.style.cursor = style;
+ };
+ this.setMouseCursor = function(cursorStyle) {
+ this.scroller.style.cursor = cursorStyle;
+ };
+ this.destroy = function() {
+ this.$textLayer.destroy();
+ this.$cursorLayer.destroy();
+ };
+
+}).call(VirtualRenderer.prototype);
+
+
+config.defineOptions(VirtualRenderer.prototype, "renderer", {
+ animatedScroll: {initialValue: false},
+ showInvisibles: {
+ set: function(value) {
+ if (this.$textLayer.setShowInvisibles(value))
+ this.$loop.schedule(this.CHANGE_TEXT);
+ },
+ initialValue: false
+ },
+ showPrintMargin: {
+ set: function() { this.$updatePrintMargin(); },
+ initialValue: true
+ },
+ printMarginColumn: {
+ set: function() { this.$updatePrintMargin(); },
+ initialValue: 80
+ },
+ printMargin: {
+ set: function(val) {
+ if (typeof val == "number")
+ this.$printMarginColumn = val;
+ this.$showPrintMargin = !!val;
+ this.$updatePrintMargin();
+ },
+ get: function() {
+ return this.$showPrintMargin && this.$printMarginColumn;
+ }
+ },
+ showGutter: {
+ set: function(show){
+ this.$gutter.style.display = show ? "block" : "none";
+ this.$loop.schedule(this.CHANGE_FULL);
+ this.onGutterResize();
+ },
+ initialValue: true
+ },
+ fadeFoldWidgets: {
+ set: function(show) {
+ dom.setCssClass(this.$gutter, "ace_fade-fold-widgets", show);
+ },
+ initialValue: false
+ },
+ showFoldWidgets: {
+ set: function(show) {this.$gutterLayer.setShowFoldWidgets(show)},
+ initialValue: true
+ },
+ showLineNumbers: {
+ set: function(show) {
+ this.$gutterLayer.setShowLineNumbers(show);
+ this.$loop.schedule(this.CHANGE_GUTTER);
+ },
+ initialValue: true
+ },
+ displayIndentGuides: {
+ set: function(show) {
+ if (this.$textLayer.setDisplayIndentGuides(show))
+ this.$loop.schedule(this.CHANGE_TEXT);
+ },
+ initialValue: true
+ },
+ highlightGutterLine: {
+ set: function(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();
+ },
+ initialValue: false,
+ value: true
+ },
+ hScrollBarAlwaysVisible: {
+ set: function(val) {
+ if (!this.$hScrollBarAlwaysVisible || !this.$horizScroll)
+ this.$loop.schedule(this.CHANGE_SCROLL);
+ },
+ initialValue: false
+ },
+ vScrollBarAlwaysVisible: {
+ set: function(val) {
+ if (!this.$vScrollBarAlwaysVisible || !this.$vScroll)
+ this.$loop.schedule(this.CHANGE_SCROLL);
+ },
+ initialValue: false
+ },
+ fontSize: {
+ set: function(size) {
+ if (typeof size == "number")
+ size = size + "px";
+ this.container.style.fontSize = size;
+ this.updateFontSize();
+ },
+ initialValue: 12
+ },
+ fontFamily: {
+ set: function(name) {
+ this.container.style.fontFamily = name;
+ this.updateFontSize();
+ }
+ },
+ maxLines: {
+ set: function(val) {
+ this.updateFull();
+ }
+ },
+ minLines: {
+ set: function(val) {
+ this.updateFull();
+ }
+ },
+ maxPixelHeight: {
+ set: function(val) {
+ this.updateFull();
+ },
+ initialValue: 0
+ },
+ scrollPastEnd: {
+ set: function(val) {
+ val = +val || 0;
+ if (this.$scrollPastEnd == val)
+ return;
+ this.$scrollPastEnd = val;
+ this.$loop.schedule(this.CHANGE_SCROLL);
+ },
+ initialValue: 0,
+ handlesSet: true
+ },
+ fixedWidthGutter: {
+ set: function(val) {
+ this.$gutterLayer.$fixedWidth = !!val;
+ this.$loop.schedule(this.CHANGE_GUTTER);
+ }
+ },
+ theme: {
+ set: function(val) { this.setTheme(val) },
+ get: function() { return this.$themeId || this.theme; },
+ initialValue: "./theme/textmate",
+ handlesSet: true
+ }
+});
+
+exports.VirtualRenderer = VirtualRenderer;
+});
+
+ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var net = require("../lib/net");
+var EventEmitter = require("../lib/event_emitter").EventEmitter;
+var config = require("../config");
+
+function $workerBlob(workerUrl) {
+ var script = "importScripts('" + net.qualifyURL(workerUrl) + "');";
+ try {
+ return new Blob([script], {"type": "application/javascript"});
+ } catch (e) { // Backwards-compatibility
+ var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder;
+ var blobBuilder = new BlobBuilder();
+ blobBuilder.append(script);
+ return blobBuilder.getBlob("application/javascript");
+ }
+}
+
+function createWorker(workerUrl) {
+ var blob = $workerBlob(workerUrl);
+ var URL = window.URL || window.webkitURL;
+ var blobURL = URL.createObjectURL(blob);
+ return new Worker(blobURL);
+}
+
+var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl, importScripts) {
+ this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);
+ this.changeListener = this.changeListener.bind(this);
+ this.onMessage = this.onMessage.bind(this);
+ if (require.nameToUrl && !require.toUrl)
+ require.toUrl = require.nameToUrl;
+
+ if (config.get("packaged") || !require.toUrl) {
+ workerUrl = workerUrl || config.moduleUrl(mod, "worker");
+ } else {
+ var normalizePath = this.$normalizePath;
+ workerUrl = workerUrl || normalizePath(require.toUrl("ace/worker/worker.js", null, "_"));
+
+ var tlns = {};
+ topLevelNamespaces.forEach(function(ns) {
+ tlns[ns] = normalizePath(require.toUrl(ns, null, "_").replace(/(\.js)?(\?.*)?$/, ""));
+ });
+ }
+
+ this.$worker = createWorker(workerUrl);
+ if (importScripts) {
+ this.send("importScripts", importScripts);
+ }
+ this.$worker.postMessage({
+ init : true,
+ tlns : tlns,
+ module : mod,
+ classname : classname
+ });
+
+ this.callbackId = 1;
+ this.callbacks = {};
+
+ this.$worker.onmessage = this.onMessage;
+};
+
+(function(){
+
+ oop.implement(this, EventEmitter);
+
+ this.onMessage = function(e) {
+ var msg = e.data;
+ switch (msg.type) {
+ case "event":
+ this._signal(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;
+ case "error":
+ this.reportError(msg.data);
+ break;
+ case "log":
+ window.console && console.log && console.log.apply(console, msg.data);
+ break;
+ }
+ };
+
+ this.reportError = function(err) {
+ window.console && console.error && console.error(err);
+ };
+
+ this.$normalizePath = function(path) {
+ return net.qualifyURL(path);
+ };
+
+ this.terminate = function() {
+ this._signal("terminate", {});
+ this.deltaQueue = null;
+ this.$worker.terminate();
+ this.$worker = null;
+ if (this.$doc)
+ this.$doc.off("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) {
+ console.error(ex.stack);
+ }
+ };
+
+ 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(delta) {
+ if (!this.deltaQueue) {
+ this.deltaQueue = [];
+ setTimeout(this.$sendDeltaQueue, 0);
+ }
+ if (delta.action == "insert")
+ this.deltaQueue.push(delta.start, delta.lines);
+ else
+ this.deltaQueue.push(delta.start, delta.end);
+ };
+
+ this.$sendDeltaQueue = function() {
+ var q = this.deltaQueue;
+ if (!q) return;
+ this.deltaQueue = null;
+ if (q.length > 50 && q.length > this.$doc.getLength() >> 1) {
+ this.call("setValue", [this.$doc.getValue()]);
+ } else
+ this.emit("change", {data: q});
+ };
+
+}).call(WorkerClient.prototype);
+
+
+var UIWorkerClient = function(topLevelNamespaces, mod, classname) {
+ this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this);
+ this.changeListener = this.changeListener.bind(this);
+ this.callbackId = 1;
+ this.callbacks = {};
+ this.messageBuffer = [];
+
+ var main = null;
+ var emitSync = false;
+ var sender = Object.create(EventEmitter);
+ var _self = this;
+
+ this.$worker = {};
+ this.$worker.terminate = function() {};
+ this.$worker.postMessage = function(e) {
+ _self.messageBuffer.push(e);
+ if (main) {
+ if (emitSync)
+ setTimeout(processNext);
+ else
+ processNext();
+ }
+ };
+ this.setEmitSync = function(val) { emitSync = val };
+
+ var processNext = function() {
+ var msg = _self.messageBuffer.shift();
+ if (msg.command)
+ main[msg.command].apply(main, msg.args);
+ else if (msg.event)
+ sender._signal(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});
+ };
+
+ config.loadModule(["worker", mod], function(Main) {
+ main = new Main[classname](sender);
+ while (_self.messageBuffer.length)
+ processNext();
+ });
+};
+
+UIWorkerClient.prototype = WorkerClient.prototype;
+
+exports.UIWorkerClient = UIWorkerClient;
+exports.WorkerClient = WorkerClient;
+exports.createWorker = createWorker;
+
+
+});
+
+ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"], function(require, exports, module) {
+"use strict";
+
+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;
+
+ this.selectionBefore = session.selection.toJSON();
+ if (session.selection.inMultiSelectMode)
+ session.selection.toSingleRange();
+
+ this.pos = doc.createAnchor(this.$pos.row, this.$pos.column);
+ var pos = this.pos;
+ pos.$insertRight = true;
+ pos.detach();
+ pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column + this.length), this.mainClass, null, false);
+ this.others = [];
+ this.$others.forEach(function(other) {
+ var anchor = doc.createAnchor(other.row, other.column);
+ anchor.$insertRight = true;
+ anchor.detach();
+ _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);
+ });
+ };
+ 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(delta) {
+ if (this.$updating)
+ return this.updateAnchors(delta);
+
+ var range = delta;
+ if (range.start.row !== range.end.row) return;
+ if (range.start.row !== this.pos.row) return;
+ this.$updating = true;
+ var lengthDiff = delta.action === "insert" ? range.end.column - range.start.column : range.start.column - range.end.column;
+ var inMainRange = range.start.column >= this.pos.column && range.start.column <= this.pos.column + this.length + 1;
+ var distanceFromStart = range.start.column - this.pos.column;
+
+ this.updateAnchors(delta);
+
+ if (inMainRange)
+ this.length += lengthDiff;
+
+ if (inMainRange && !this.session.$fromUndo) {
+ if (delta.action === 'insert') {
+ for (var i = this.others.length - 1; i >= 0; i--) {
+ var otherPos = this.others[i];
+ var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};
+ this.doc.insertMergedLines(newPos, delta.lines);
+ }
+ } else if (delta.action === 'remove') {
+ for (var i = this.others.length - 1; i >= 0; i--) {
+ var otherPos = this.others[i];
+ var newPos = {row: otherPos.row, column: otherPos.column + distanceFromStart};
+ this.doc.remove(new Range(newPos.row, newPos.column, newPos.row, newPos.column - lengthDiff));
+ }
+ }
+ }
+
+ this.$updating = false;
+ this.updateMarkers();
+ };
+
+ this.updateAnchors = function(delta) {
+ this.pos.onChange(delta);
+ for (var i = this.others.length; i--;)
+ this.others[i].onChange(delta);
+ this.updateMarkers();
+ };
+
+ this.updateMarkers = function() {
+ if (this.$updating)
+ return;
+ var _self = this;
+ var session = this.session;
+ var updateMarker = function(pos, className) {
+ session.removeMarker(pos.markerId);
+ pos.markerId = session.addMarker(new Range(pos.row, pos.column, pos.row, pos.column+_self.length), className, null, false);
+ };
+ updateMarker(this.pos, this.mainClass);
+ for (var i = this.others.length; i--;)
+ updateMarker(this.others[i], this.othersClass);
+ };
+
+ this.onCursorChange = function(event) {
+ if (this.$updating || !this.session) 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.pos && this.pos.markerId);
+ this.hideOtherMarkers();
+ this.doc.removeEventListener("change", this.$onUpdate);
+ this.session.selection.removeEventListener("changeCursor", this.$onCursorChange);
+ this.session.setUndoSelect(true);
+ this.session = null;
+ };
+ this.cancel = function() {
+ if (this.$undoStackDepth === -1)
+ return;
+ var undoManager = this.session.getUndoManager();
+ var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth;
+ for (var i = 0; i < undosRequired; i++) {
+ undoManager.undo(true);
+ }
+ if (this.selectionBefore)
+ this.session.selection.fromJSON(this.selectionBefore);
+ };
+}).call(PlaceHolder.prototype);
+
+
+exports.PlaceHolder = PlaceHolder;
+});
+
+ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) {
+
+var event = require("../lib/event");
+var useragent = require("../lib/useragent");
+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 = ev.ctrlKey;
+ var accel = e.getAccelKey();
+ var button = e.getButton();
+
+ if (ctrl && useragent.isMac)
+ button = ev.button;
+
+ if (e.editor.inMultiSelectMode && button == 2) {
+ e.editor.textInput.onContextMenu(e.domEvent);
+ return;
+ }
+
+ if (!ctrl && !alt && !accel) {
+ if (button === 0 && e.editor.inMultiSelectMode)
+ e.editor.exitMultiSelectMode();
+ return;
+ }
+
+ if (button !== 0)
+ 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 session = editor.session;
+ var screenAnchor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);
+ var screenCursor = screenAnchor;
+
+ var selectionMode;
+ if (editor.$mouseHandler.$enableJumpToDef) {
+ if (ctrl && alt || accel && alt)
+ selectionMode = shift ? "block" : "add";
+ else if (alt && editor.$blockSelectEnabled)
+ selectionMode = "block";
+ } else {
+ if (accel && !alt) {
+ selectionMode = "add";
+ if (!isMultiSelect && shift)
+ return;
+ } else if (alt && editor.$blockSelectEnabled) {
+ selectionMode = "block";
+ }
+ }
+
+ if (selectionMode && useragent.isMac && ev.ctrlKey) {
+ editor.$mouseHandler.cancelContextMenu();
+ }
+
+ if (selectionMode == "add") {
+ if (!isMultiSelect && inSelection)
+ return; // dragging
+
+ if (!isMultiSelect) {
+ var range = selection.toOrientedRange();
+ editor.addSelectionMarker(range);
+ }
+
+ var oldRange = selection.rangeList.rangeAtPoint(pos);
+
+
+ editor.$blockScrolling++;
+ editor.inVirtualSelectionMode = true;
+
+ if (shift) {
+ oldRange = null;
+ range = selection.ranges[0] || range;
+ editor.removeSelectionMarker(range);
+ }
+ editor.once("mouseup", function() {
+ var tmpSel = selection.toOrientedRange();
+
+ if (oldRange && tmpSel.isEmpty() && isSamePoint(oldRange.cursor, tmpSel.cursor))
+ selection.substractPoint(tmpSel.cursor);
+ else {
+ if (shift) {
+ selection.substractPoint(range.cursor);
+ } else if (range) {
+ editor.removeSelectionMarker(range);
+ selection.addRange(range);
+ }
+ selection.addRange(tmpSel);
+ }
+ editor.$blockScrolling--;
+ editor.inVirtualSelectionMode = false;
+ });
+
+ } else if (selectionMode == "block") {
+ e.stop();
+ editor.inVirtualSelectionMode = true;
+ var initialRange;
+ var rectSel = [];
+ var blockSelect = function() {
+ var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY);
+ var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column, newCursor.offsetX);
+
+ if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead))
+ return;
+ screenCursor = newCursor;
+
+ editor.$blockScrolling++;
+ editor.selection.moveToPosition(cursor);
+ editor.renderer.scrollCursorIntoView();
+
+ editor.removeSelectionMarkers(rectSel);
+ rectSel = selection.rectangularRangeBlock(screenCursor, screenAnchor);
+ if (editor.$mouseHandler.$clickSelection && rectSel.length == 1 && rectSel[0].isEmpty())
+ rectSel[0] = editor.$mouseHandler.$clickSelection.clone();
+ rectSel.forEach(editor.addSelectionMarker, editor);
+ editor.updateSelectionMarkers();
+ editor.$blockScrolling--;
+ };
+ editor.$blockScrolling++;
+ if (isMultiSelect && !accel) {
+ selection.toSingleRange();
+ } else if (!isMultiSelect && accel) {
+ initialRange = selection.toOrientedRange();
+ editor.addSelectionMarker(initialRange);
+ }
+
+ if (shift)
+ screenAnchor = session.documentToScreenPosition(selection.lead);
+ else
+ selection.moveToPosition(pos);
+ editor.$blockScrolling--;
+
+ screenCursor = {row: -1, column: -1};
+
+ var onMouseSelectionEnd = function(e) {
+ clearInterval(timerId);
+ editor.removeSelectionMarkers(rectSel);
+ if (!rectSel.length)
+ rectSel = [selection.toOrientedRange()];
+ editor.$blockScrolling++;
+ if (initialRange) {
+ editor.removeSelectionMarker(initialRange);
+ selection.toSingleRange(initialRange);
+ }
+ for (var i = 0; i < rectSel.length; i++)
+ selection.addRange(rectSel[i]);
+ editor.inVirtualSelectionMode = false;
+ editor.$mouseHandler.$clickSelection = null;
+ editor.$blockScrolling--;
+ };
+
+ 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"},
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "addCursorBelow",
+ exec: function(editor) { editor.selectMoreLines(1); },
+ bindKey: {win: "Ctrl-Alt-Down", mac: "Ctrl-Alt-Down"},
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "addCursorAboveSkipCurrent",
+ exec: function(editor) { editor.selectMoreLines(-1, true); },
+ bindKey: {win: "Ctrl-Alt-Shift-Up", mac: "Ctrl-Alt-Shift-Up"},
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "addCursorBelowSkipCurrent",
+ exec: function(editor) { editor.selectMoreLines(1, true); },
+ bindKey: {win: "Ctrl-Alt-Shift-Down", mac: "Ctrl-Alt-Shift-Down"},
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "selectMoreBefore",
+ exec: function(editor) { editor.selectMore(-1); },
+ bindKey: {win: "Ctrl-Alt-Left", mac: "Ctrl-Alt-Left"},
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "selectMoreAfter",
+ exec: function(editor) { editor.selectMore(1); },
+ bindKey: {win: "Ctrl-Alt-Right", mac: "Ctrl-Alt-Right"},
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "selectNextBefore",
+ exec: function(editor) { editor.selectMore(-1, true); },
+ bindKey: {win: "Ctrl-Alt-Shift-Left", mac: "Ctrl-Alt-Shift-Left"},
+ scrollIntoView: "cursor",
+ readOnly: true
+}, {
+ name: "selectNextAfter",
+ exec: function(editor) { editor.selectMore(1, true); },
+ bindKey: {win: "Ctrl-Alt-Shift-Right", mac: "Ctrl-Alt-Shift-Right"},
+ scrollIntoView: "cursor",
+ 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"},
+ scrollIntoView: "cursor"
+}, {
+ name: "findAll",
+ exec: function(editor) { editor.findAll(); },
+ bindKey: {win: "Ctrl-Alt-K", mac: "Ctrl-Alt-G"},
+ scrollIntoView: "cursor",
+ readOnly: true
+}];
+exports.multiSelectCommands = [{
+ name: "singleSelection",
+ bindKey: "esc",
+ exec: function(editor) { editor.exitMultiSelectMode(); },
+ scrollIntoView: "cursor",
+ 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/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","ace/config"], 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();
+ this.rangeList.add(oldRange);
+ this.rangeList.add(range);
+ if (this.rangeList.ranges.length != 2) {
+ this.rangeList.removeAll();
+ return $blockChangeEvents || this.fromOrientedRange(range);
+ }
+ this.rangeList.removeAll();
+ 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._signal("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._signal("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._signal("removeRange", {ranges: removed});
+
+ if (this.rangeCount === 0 && this.inMultiSelectMode) {
+ this.inMultiSelectMode = false;
+ this._signal("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.rangeCount ? this.rangeList.ranges.concat() : [this.getRange()];
+ };
+
+ 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;
+ var startOffsetX = screenCursor.offsetX;
+ var endOffsetX = screenAnchor.offsetX;
+ } else {
+ var startColumn = screenAnchor.column;
+ var endColumn = screenCursor.column;
+ var startOffsetX = screenAnchor.offsetX;
+ var endOffsetX = screenCursor.offsetX;
+ }
+
+ 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, startOffsetX),
+ this.session.screenToDocumentPosition(row, endColumn, endOffsetX)
+ );
+ 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.setDefaultHandler("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.removeDefaultHandler("exec", this.$onMultiSelectExec);
+ this.renderer.updateCursor();
+ this.renderer.updateBackMarkers();
+ this._emit("changeSelection");
+ };
+
+ this.$onMultiSelectExec = function(e) {
+ var command = e.command;
+ var editor = e.editor;
+ if (!editor.multiSelect)
+ return;
+ if (!command.multiSelectAction) {
+ var result = command.exec(editor, e.args || {});
+ editor.multiSelect.addRange(editor.multiSelect.toOrientedRange());
+ editor.multiSelect.mergeOverlappingRanges();
+ } else if (command.multiSelectAction == "forEach") {
+ result = editor.forEachSelection(command, e.args);
+ } else if (command.multiSelectAction == "forEachLine") {
+ result = editor.forEachSelection(command, e.args, true);
+ } else if (command.multiSelectAction == "single") {
+ editor.exitMultiSelectMode();
+ result = command.exec(editor, e.args || {});
+ } else {
+ result = command.multiSelectAction(editor, e.args || {});
+ }
+ return result;
+ };
+ this.forEachSelection = function(cmd, args, options) {
+ if (this.inVirtualSelectionMode)
+ return;
+ var keepOrder = options && options.keepOrder;
+ var $byLines = options == true || options && options.$byLines
+ var session = this.session;
+ var selection = this.selection;
+ var rangeList = selection.rangeList;
+ var ranges = (keepOrder ? selection : rangeList).ranges;
+ var result;
+
+ if (!ranges.length)
+ return cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});
+
+ var reg = selection._eventRegistry;
+ selection._eventRegistry = {};
+
+ var tmpSel = new Selection(session);
+ this.inVirtualSelectionMode = true;
+ for (var i = ranges.length; i--;) {
+ if ($byLines) {
+ while (i > 0 && ranges[i].start.row == ranges[i - 1].end.row)
+ i--;
+ }
+ tmpSel.fromOrientedRange(ranges[i]);
+ tmpSel.index = i;
+ this.selection = session.selection = tmpSel;
+ var cmdResult = cmd.exec ? cmd.exec(this, args || {}) : cmd(this, args || {});
+ if (!result && cmdResult !== undefined)
+ result = cmdResult;
+ tmpSel.toOrientedRange(ranges[i]);
+ }
+ tmpSel.detach();
+
+ this.selection = session.selection = selection;
+ this.inVirtualSelectionMode = false;
+ selection._eventRegistry = reg;
+ selection.mergeOverlappingRanges();
+
+ var anim = this.renderer.$scrollAnimation;
+ this.onCursorChange();
+ this.onSelectionChange();
+ if (anim && anim.from == anim.to)
+ this.renderer.animateScrolling(anim.from);
+
+ return result;
+ };
+ this.exitMultiSelectMode = function() {
+ if (!this.inMultiSelectMode || this.inVirtualSelectionMode)
+ return;
+ this.multiSelect.toSingleRange();
+ };
+
+ this.getSelectedText = function() {
+ var text = "";
+ if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {
+ var ranges = this.multiSelect.rangeList.ranges;
+ var buf = [];
+ for (var i = 0; i < ranges.length; i++) {
+ buf.push(this.session.getTextRange(ranges[i]));
+ }
+ var nl = this.session.getDocument().getNewLineCharacter();
+ text = buf.join(nl);
+ if (text.length == (buf.length - 1) * nl.length)
+ text = "";
+ } else if (!this.selection.isEmpty()) {
+ text = this.session.getTextRange(this.getSelectionRange());
+ }
+ return text;
+ };
+
+ this.$checkMultiselectChange = function(e, anchor) {
+ if (this.inMultiSelectMode && !this.inVirtualSelectionMode) {
+ var range = this.multiSelect.ranges[0];
+ if (this.multiSelect.isEmpty() && anchor == this.multiSelect.anchor)
+ return;
+ var pos = anchor == this.multiSelect.anchor
+ ? range.cursor == range.start ? range.end : range.start
+ : range.cursor;
+ if (pos.row != anchor.row
+ || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column)
+ this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange());
+ }
+ };
+ this.findAll = function(needle, options, additive) {
+ options = options || {};
+ options.needle = needle || options.needle;
+ if (options.needle == undefined) {
+ var range = this.selection.isEmpty()
+ ? this.selection.getWordRange()
+ : this.selection.getRange();
+ options.needle = this.session.getTextRange(range);
+ }
+ 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);
+ if (range && selection.rangeList.rangeAtPoint(range.start))
+ selection.addRange(range, 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, stopAtFirst) {
+ var session = this.session;
+ var sel = session.multiSelect;
+
+ var range = sel.toOrientedRange();
+ if (range.isEmpty()) {
+ range = session.getWordRange(range.start.row, range.start.column);
+ range.cursor = dir == -1 ? range.start : range.end;
+ this.multiSelect.addRange(range);
+ if (stopAtFirst)
+ return;
+ }
+ var needle = session.getTextRange(range);
+
+ var newRange = find(session, needle, dir);
+ if (newRange) {
+ newRange.cursor = dir == -1 ? newRange.start : newRange.end;
+ this.$blockScrolling += 1;
+ this.session.unfold(newRange);
+ this.multiSelect.addRange(newRange);
+ this.$blockScrolling -= 1;
+ this.renderer.scrollCursorIntoView(null, 0.5);
+ }
+ if (skip)
+ this.multiSelect.substractPoint(range.cursor);
+ };
+ this.alignCursors = function() {
+ var session = this.session;
+ var sel = session.multiSelect;
+ var ranges = sel.ranges;
+ var row = -1;
+ var sameRowRanges = ranges.filter(function(r) {
+ if (r.cursor.row == row)
+ return true;
+ row = r.cursor.row;
+ });
+
+ if (!ranges.length || sameRowRanges.length == ranges.length - 1) {
+ var range = this.selection.getRange();
+ var fr = range.start.row, lr = range.end.row;
+ var guessRange = fr == lr;
+ if (guessRange) {
+ var max = this.session.getLength();
+ var line;
+ do {
+ line = this.session.getLine(lr);
+ } while (/[=:]/.test(line) && ++lr < max);
+ do {
+ line = this.session.getLine(fr);
+ } while (/[=:]/.test(line) && --fr > 0);
+
+ if (fr < 0) fr = 0;
+ if (lr >= max) lr = max - 1;
+ }
+ var lines = this.session.removeFullLines(fr, lr);
+ lines = this.$reAlignText(lines, guessRange);
+ this.session.insert({row: fr, column: 0}, lines.join("\n") + "\n");
+ if (!guessRange) {
+ range.start.column = 0;
+ range.end.column = lines[lines.length - 1].length;
+ }
+ this.selection.setRange(range);
+ } else {
+ sameRowRanges.forEach(function(r) {
+ sel.substractPoint(r.cursor);
+ });
+
+ 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, forceLeft) {
+ 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(forceLeft ? alignLeft :
+ isLeftAligned ? isRightAligned ? alignRight : alignLeft : unAlign);
+
+ function spaces(n) {
+ return lang.stringRepeat(" ", n);
+ }
+
+ function alignLeft(m) {
+ return !m[2] ? m[0] : spaces(startW) + m[2]
+ + spaces(textW - m[2].length + endW)
+ + m[4].replace(/^([=:])\s+/, "$1 ");
+ }
+ function alignRight(m) {
+ return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2]
+ + spaces(endW, " ")
+ + m[4].replace(/^([=:])\s+/, "$1 ");
+ }
+ function unAlign(m) {
+ return !m[2] ? m[0] : spaces(startW) + m[2]
+ + spaces(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 && !session.multiSelect) {
+ session.$selectionMarkers = [];
+ session.selection.$initRangeList();
+ session.multiSelect = session.selection;
+ }
+ this.multiSelect = session && session.multiSelect;
+
+ var oldSession = e.oldSession;
+ if (oldSession) {
+ oldSession.multiSelect.off("addRange", this.$onAddRange);
+ oldSession.multiSelect.off("removeRange", this.$onRemoveRange);
+ oldSession.multiSelect.off("multiSelect", this.$onMultiSelect);
+ oldSession.multiSelect.off("singleSelect", this.$onSingleSelect);
+ oldSession.multiSelect.lead.off("change", this.$checkMultiselectChange);
+ oldSession.multiSelect.anchor.off("change", this.$checkMultiselectChange);
+ }
+
+ if (session) {
+ session.multiSelect.on("addRange", this.$onAddRange);
+ session.multiSelect.on("removeRange", this.$onRemoveRange);
+ session.multiSelect.on("multiSelect", this.$onMultiSelect);
+ session.multiSelect.on("singleSelect", this.$onSingleSelect);
+ session.multiSelect.lead.on("change", this.$checkMultiselectChange);
+ session.multiSelect.anchor.on("change", this.$checkMultiselectChange);
+ }
+
+ if (session && this.inMultiSelectMode != session.selection.inMultiSelectMode) {
+ if (session.selection.inMultiSelectMode)
+ this.$onMultiSelect();
+ else
+ this.$onSingleSelect();
+ }
+};
+function MultiSelect(editor) {
+ if (editor.$multiselectOnSessionChange)
+ return;
+ editor.$onAddRange = editor.$onAddRange.bind(editor);
+ editor.$onRemoveRange = editor.$onRemoveRange.bind(editor);
+ editor.$onMultiSelect = editor.$onMultiSelect.bind(editor);
+ editor.$onSingleSelect = editor.$onSingleSelect.bind(editor);
+ editor.$multiselectOnSessionChange = exports.onSessionChange.bind(editor);
+ editor.$checkMultiselectChange = editor.$checkMultiselectChange.bind(editor);
+
+ editor.$multiselectOnSessionChange(editor);
+ editor.on("changeSession", editor.$multiselectOnSessionChange);
+
+ editor.on("mousedown", onMouseDown);
+ editor.commands.addCommands(commands.defaultCommands);
+
+ addAltCursorListeners(editor);
+}
+
+function addAltCursorListeners(editor){
+ var el = editor.textInput.getElement();
+ var altCursor = false;
+ event.addListener(el, "keydown", function(e) {
+ var altDown = e.keyCode == 18 && !(e.ctrlKey || e.shiftKey || e.metaKey);
+ if (editor.$blockSelectEnabled && altDown) {
+ if (!altCursor) {
+ editor.renderer.setMouseCursor("crosshair");
+ altCursor = true;
+ }
+ } else if (altCursor) {
+ reset();
+ }
+ });
+
+ event.addListener(el, "keyup", reset);
+ event.addListener(el, "blur", reset);
+ function reset(e) {
+ if (altCursor) {
+ editor.renderer.setMouseCursor("");
+ altCursor = false;
+ }
+ }
+}
+
+exports.MultiSelect = MultiSelect;
+
+
+require("./config").defineOptions(Editor.prototype, "editor", {
+ enableMultiselect: {
+ set: function(val) {
+ MultiSelect(this);
+ if (val) {
+ this.on("changeSession", this.$multiselectOnSessionChange);
+ this.on("mousedown", onMouseDown);
+ } else {
+ this.off("changeSession", this.$multiselectOnSessionChange);
+ this.off("mousedown", onMouseDown);
+ }
+ },
+ value: true
+ },
+ enableBlockSelect: {
+ set: function(val) {
+ this.$blockSelectEnabled = val;
+ },
+ value: true
+ }
+});
+
+
+
+});
+
+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;
+ 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 = session.getFoldWidget(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);
+
+});
+
+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_gutter {\
+background: #f0f0f0;\
+color: #333;\
+}\
+.ace-tm .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8;\
+}\
+.ace-tm .ace_fold {\
+background-color: #6B72E6;\
+}\
+.ace-tm {\
+background-color: #FFFFFF;\
+color: black;\
+}\
+.ace-tm .ace_cursor {\
+color: 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_heading {\
+color: rgb(12, 7, 255);\
+}\
+.ace-tm .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;\
+}\
+.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);
+});
+
+ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var dom = require("./lib/dom");
+var Range = require("./range").Range;
+
+
+function LineWidgets(session) {
+ this.session = session;
+ this.session.widgetManager = this;
+ this.session.getRowLength = this.getRowLength;
+ this.session.$getWidgetScreenLength = this.$getWidgetScreenLength;
+ this.updateOnChange = this.updateOnChange.bind(this);
+ this.renderWidgets = this.renderWidgets.bind(this);
+ this.measureWidgets = this.measureWidgets.bind(this);
+ this.session._changedWidgets = [];
+ this.$onChangeEditor = this.$onChangeEditor.bind(this);
+
+ this.session.on("change", this.updateOnChange);
+ this.session.on("changeFold", this.updateOnFold);
+ this.session.on("changeEditor", this.$onChangeEditor);
+}
+
+(function() {
+ this.getRowLength = function(row) {
+ var h;
+ if (this.lineWidgets)
+ h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0;
+ else
+ h = 0;
+ if (!this.$useWrapMode || !this.$wrapData[row]) {
+ return 1 + h;
+ } else {
+ return this.$wrapData[row].length + 1 + h;
+ }
+ };
+
+ this.$getWidgetScreenLength = function() {
+ var screenRows = 0;
+ this.lineWidgets.forEach(function(w){
+ if (w && w.rowCount && !w.hidden)
+ screenRows += w.rowCount;
+ });
+ return screenRows;
+ };
+
+ this.$onChangeEditor = function(e) {
+ this.attach(e.editor);
+ };
+
+ this.attach = function(editor) {
+ if (editor && editor.widgetManager && editor.widgetManager != this)
+ editor.widgetManager.detach();
+
+ if (this.editor == editor)
+ return;
+
+ this.detach();
+ this.editor = editor;
+
+ if (editor) {
+ editor.widgetManager = this;
+ editor.renderer.on("beforeRender", this.measureWidgets);
+ editor.renderer.on("afterRender", this.renderWidgets);
+ }
+ };
+ this.detach = function(e) {
+ var editor = this.editor;
+ if (!editor)
+ return;
+
+ this.editor = null;
+ editor.widgetManager = null;
+
+ editor.renderer.off("beforeRender", this.measureWidgets);
+ editor.renderer.off("afterRender", this.renderWidgets);
+ var lineWidgets = this.session.lineWidgets;
+ lineWidgets && lineWidgets.forEach(function(w) {
+ if (w && w.el && w.el.parentNode) {
+ w._inDocument = false;
+ w.el.parentNode.removeChild(w.el);
+ }
+ });
+ };
+
+ this.updateOnFold = function(e, session) {
+ var lineWidgets = session.lineWidgets;
+ if (!lineWidgets || !e.action)
+ return;
+ var fold = e.data;
+ var start = fold.start.row;
+ var end = fold.end.row;
+ var hide = e.action == "add";
+ for (var i = start + 1; i < end; i++) {
+ if (lineWidgets[i])
+ lineWidgets[i].hidden = hide;
+ }
+ if (lineWidgets[end]) {
+ if (hide) {
+ if (!lineWidgets[start])
+ lineWidgets[start] = lineWidgets[end];
+ else
+ lineWidgets[end].hidden = hide;
+ } else {
+ if (lineWidgets[start] == lineWidgets[end])
+ lineWidgets[start] = undefined;
+ lineWidgets[end].hidden = hide;
+ }
+ }
+ };
+
+ this.updateOnChange = function(delta) {
+ var lineWidgets = this.session.lineWidgets;
+ if (!lineWidgets) return;
+
+ var startRow = delta.start.row;
+ var len = delta.end.row - startRow;
+
+ if (len === 0) {
+ } else if (delta.action == 'remove') {
+ var removed = lineWidgets.splice(startRow + 1, len);
+ removed.forEach(function(w) {
+ w && this.removeLineWidget(w);
+ }, this);
+ this.$updateRows();
+ } else {
+ var args = new Array(len);
+ args.unshift(startRow, 0);
+ lineWidgets.splice.apply(lineWidgets, args);
+ this.$updateRows();
+ }
+ };
+
+ this.$updateRows = function() {
+ var lineWidgets = this.session.lineWidgets;
+ if (!lineWidgets) return;
+ var noWidgets = true;
+ lineWidgets.forEach(function(w, i) {
+ if (w) {
+ noWidgets = false;
+ w.row = i;
+ while (w.$oldWidget) {
+ w.$oldWidget.row = i;
+ w = w.$oldWidget;
+ }
+ }
+ });
+ if (noWidgets)
+ this.session.lineWidgets = null;
+ };
+
+ this.addLineWidget = function(w) {
+ if (!this.session.lineWidgets)
+ this.session.lineWidgets = new Array(this.session.getLength());
+
+ var old = this.session.lineWidgets[w.row];
+ if (old) {
+ w.$oldWidget = old;
+ if (old.el && old.el.parentNode) {
+ old.el.parentNode.removeChild(old.el);
+ old._inDocument = false;
+ }
+ }
+
+ this.session.lineWidgets[w.row] = w;
+
+ w.session = this.session;
+
+ var renderer = this.editor.renderer;
+ if (w.html && !w.el) {
+ w.el = dom.createElement("div");
+ w.el.innerHTML = w.html;
+ }
+ if (w.el) {
+ dom.addCssClass(w.el, "ace_lineWidgetContainer");
+ w.el.style.position = "absolute";
+ w.el.style.zIndex = 5;
+ renderer.container.appendChild(w.el);
+ w._inDocument = true;
+ }
+
+ if (!w.coverGutter) {
+ w.el.style.zIndex = 3;
+ }
+ if (w.pixelHeight == null) {
+ w.pixelHeight = w.el.offsetHeight;
+ }
+ if (w.rowCount == null) {
+ w.rowCount = w.pixelHeight / renderer.layerConfig.lineHeight;
+ }
+
+ var fold = this.session.getFoldAt(w.row, 0);
+ w.$fold = fold;
+ if (fold) {
+ var lineWidgets = this.session.lineWidgets;
+ if (w.row == fold.end.row && !lineWidgets[fold.start.row])
+ lineWidgets[fold.start.row] = w;
+ else
+ w.hidden = true;
+ }
+
+ this.session._emit("changeFold", {data:{start:{row: w.row}}});
+
+ this.$updateRows();
+ this.renderWidgets(null, renderer);
+ this.onWidgetChanged(w);
+ return w;
+ };
+
+ this.removeLineWidget = function(w) {
+ w._inDocument = false;
+ w.session = null;
+ if (w.el && w.el.parentNode)
+ w.el.parentNode.removeChild(w.el);
+ if (w.editor && w.editor.destroy) try {
+ w.editor.destroy();
+ } catch(e){}
+ if (this.session.lineWidgets) {
+ var w1 = this.session.lineWidgets[w.row]
+ if (w1 == w) {
+ this.session.lineWidgets[w.row] = w.$oldWidget;
+ if (w.$oldWidget)
+ this.onWidgetChanged(w.$oldWidget);
+ } else {
+ while (w1) {
+ if (w1.$oldWidget == w) {
+ w1.$oldWidget = w.$oldWidget;
+ break;
+ }
+ w1 = w1.$oldWidget;
+ }
+ }
+ }
+ this.session._emit("changeFold", {data:{start:{row: w.row}}});
+ this.$updateRows();
+ };
+
+ this.getWidgetsAtRow = function(row) {
+ var lineWidgets = this.session.lineWidgets;
+ var w = lineWidgets && lineWidgets[row];
+ var list = [];
+ while (w) {
+ list.push(w);
+ w = w.$oldWidget;
+ }
+ return list;
+ };
+
+ this.onWidgetChanged = function(w) {
+ this.session._changedWidgets.push(w);
+ this.editor && this.editor.renderer.updateFull();
+ };
+
+ this.measureWidgets = function(e, renderer) {
+ var changedWidgets = this.session._changedWidgets;
+ var config = renderer.layerConfig;
+
+ if (!changedWidgets || !changedWidgets.length) return;
+ var min = Infinity;
+ for (var i = 0; i < changedWidgets.length; i++) {
+ var w = changedWidgets[i];
+ if (!w || !w.el) continue;
+ if (w.session != this.session) continue;
+ if (!w._inDocument) {
+ if (this.session.lineWidgets[w.row] != w)
+ continue;
+ w._inDocument = true;
+ renderer.container.appendChild(w.el);
+ }
+
+ w.h = w.el.offsetHeight;
+
+ if (!w.fixedWidth) {
+ w.w = w.el.offsetWidth;
+ w.screenWidth = Math.ceil(w.w / config.characterWidth);
+ }
+
+ var rowCount = w.h / config.lineHeight;
+ if (w.coverLine) {
+ rowCount -= this.session.getRowLineCount(w.row);
+ if (rowCount < 0)
+ rowCount = 0;
+ }
+ if (w.rowCount != rowCount) {
+ w.rowCount = rowCount;
+ if (w.row < min)
+ min = w.row;
+ }
+ }
+ if (min != Infinity) {
+ this.session._emit("changeFold", {data:{start:{row: min}}});
+ this.session.lineWidgetWidth = null;
+ }
+ this.session._changedWidgets = [];
+ };
+
+ this.renderWidgets = function(e, renderer) {
+ var config = renderer.layerConfig;
+ var lineWidgets = this.session.lineWidgets;
+ if (!lineWidgets)
+ return;
+ var first = Math.min(this.firstRow, config.firstRow);
+ var last = Math.max(this.lastRow, config.lastRow, lineWidgets.length);
+
+ while (first > 0 && !lineWidgets[first])
+ first--;
+
+ this.firstRow = config.firstRow;
+ this.lastRow = config.lastRow;
+
+ renderer.$cursorLayer.config = config;
+ for (var i = first; i <= last; i++) {
+ var w = lineWidgets[i];
+ if (!w || !w.el) continue;
+ if (w.hidden) {
+ w.el.style.top = -100 - (w.pixelHeight || 0) + "px";
+ continue;
+ }
+ if (!w._inDocument) {
+ w._inDocument = true;
+ renderer.container.appendChild(w.el);
+ }
+ var top = renderer.$cursorLayer.getPixelPosition({row: i, column:0}, true).top;
+ if (!w.coverLine)
+ top += config.lineHeight * this.session.getRowLineCount(w.row);
+ w.el.style.top = top - config.offset + "px";
+
+ var left = w.coverGutter ? 0 : renderer.gutterWidth;
+ if (!w.fixedWidth)
+ left -= renderer.scrollLeft;
+ w.el.style.left = left + "px";
+
+ if (w.fullWidth && w.screenWidth) {
+ w.el.style.minWidth = config.width + 2 * config.padding + "px";
+ }
+
+ if (w.fixedWidth) {
+ w.el.style.right = renderer.scrollBar.getWidth() + "px";
+ } else {
+ w.el.style.right = "";
+ }
+ }
+ };
+
+}).call(LineWidgets.prototype);
+
+
+exports.LineWidgets = LineWidgets;
+
+});
+
+ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"], function(require, exports, module) {
+"use strict";
+var LineWidgets = require("../line_widgets").LineWidgets;
+var dom = require("../lib/dom");
+var Range = require("../range").Range;
+
+function binarySearch(array, needle, comparator) {
+ var first = 0;
+ var last = array.length - 1;
+
+ while (first <= last) {
+ var mid = (first + last) >> 1;
+ var c = comparator(needle, array[mid]);
+ if (c > 0)
+ first = mid + 1;
+ else if (c < 0)
+ last = mid - 1;
+ else
+ return mid;
+ }
+ return -(first + 1);
+}
+
+function findAnnotations(session, row, dir) {
+ var annotations = session.getAnnotations().sort(Range.comparePoints);
+ if (!annotations.length)
+ return;
+
+ var i = binarySearch(annotations, {row: row, column: -1}, Range.comparePoints);
+ if (i < 0)
+ i = -i - 1;
+
+ if (i >= annotations.length)
+ i = dir > 0 ? 0 : annotations.length - 1;
+ else if (i === 0 && dir < 0)
+ i = annotations.length - 1;
+
+ var annotation = annotations[i];
+ if (!annotation || !dir)
+ return;
+
+ if (annotation.row === row) {
+ do {
+ annotation = annotations[i += dir];
+ } while (annotation && annotation.row === row);
+ if (!annotation)
+ return annotations.slice();
+ }
+
+
+ var matched = [];
+ row = annotation.row;
+ do {
+ matched[dir < 0 ? "unshift" : "push"](annotation);
+ annotation = annotations[i += dir];
+ } while (annotation && annotation.row == row);
+ return matched.length && matched;
+}
+
+exports.showErrorMarker = function(editor, dir) {
+ var session = editor.session;
+ if (!session.widgetManager) {
+ session.widgetManager = new LineWidgets(session);
+ session.widgetManager.attach(editor);
+ }
+
+ var pos = editor.getCursorPosition();
+ var row = pos.row;
+ var oldWidget = session.widgetManager.getWidgetsAtRow(row).filter(function(w) {
+ return w.type == "errorMarker";
+ })[0];
+ if (oldWidget) {
+ oldWidget.destroy();
+ } else {
+ row -= dir;
+ }
+ var annotations = findAnnotations(session, row, dir);
+ var gutterAnno;
+ if (annotations) {
+ var annotation = annotations[0];
+ pos.column = (annotation.pos && typeof annotation.column != "number"
+ ? annotation.pos.sc
+ : annotation.column) || 0;
+ pos.row = annotation.row;
+ gutterAnno = editor.renderer.$gutterLayer.$annotations[pos.row];
+ } else if (oldWidget) {
+ return;
+ } else {
+ gutterAnno = {
+ text: ["Looks good!"],
+ className: "ace_ok"
+ };
+ }
+ editor.session.unfold(pos.row);
+ editor.selection.moveToPosition(pos);
+
+ var w = {
+ row: pos.row,
+ fixedWidth: true,
+ coverGutter: true,
+ el: dom.createElement("div"),
+ type: "errorMarker"
+ };
+ var el = w.el.appendChild(dom.createElement("div"));
+ var arrow = w.el.appendChild(dom.createElement("div"));
+ arrow.className = "error_widget_arrow " + gutterAnno.className;
+
+ var left = editor.renderer.$cursorLayer
+ .getPixelPosition(pos).left;
+ arrow.style.left = left + editor.renderer.gutterWidth - 5 + "px";
+
+ w.el.className = "error_widget_wrapper";
+ el.className = "error_widget " + gutterAnno.className;
+ el.innerHTML = gutterAnno.text.join("<br>");
+
+ el.appendChild(dom.createElement("div"));
+
+ var kb = function(_, hashId, keyString) {
+ if (hashId === 0 && (keyString === "esc" || keyString === "return")) {
+ w.destroy();
+ return {command: "null"};
+ }
+ };
+
+ w.destroy = function() {
+ if (editor.$mouseHandler.isMousePressed)
+ return;
+ editor.keyBinding.removeKeyboardHandler(kb);
+ session.widgetManager.removeLineWidget(w);
+ editor.off("changeSelection", w.destroy);
+ editor.off("changeSession", w.destroy);
+ editor.off("mouseup", w.destroy);
+ editor.off("change", w.destroy);
+ };
+
+ editor.keyBinding.addKeyboardHandler(kb);
+ editor.on("changeSelection", w.destroy);
+ editor.on("changeSession", w.destroy);
+ editor.on("mouseup", w.destroy);
+ editor.on("change", w.destroy);
+
+ editor.session.widgetManager.addLineWidget(w);
+
+ w.el.onmousedown = editor.focus.bind(editor);
+
+ editor.renderer.scrollCursorIntoView(null, 0.5, {bottom: w.el.offsetHeight});
+};
+
+
+dom.importCssString("\
+ .error_widget_wrapper {\
+ background: inherit;\
+ color: inherit;\
+ border:none\
+ }\
+ .error_widget {\
+ border-top: solid 2px;\
+ border-bottom: solid 2px;\
+ margin: 5px 0;\
+ padding: 10px 40px;\
+ white-space: pre-wrap;\
+ }\
+ .error_widget.ace_error, .error_widget_arrow.ace_error{\
+ border-color: #ff5a5a\
+ }\
+ .error_widget.ace_warning, .error_widget_arrow.ace_warning{\
+ border-color: #F1D817\
+ }\
+ .error_widget.ace_info, .error_widget_arrow.ace_info{\
+ border-color: #5a5a5a\
+ }\
+ .error_widget.ace_ok, .error_widget_arrow.ace_ok{\
+ border-color: #5aaa5a\
+ }\
+ .error_widget_arrow {\
+ position: absolute;\
+ border: solid 5px;\
+ border-top-color: transparent!important;\
+ border-right-color: transparent!important;\
+ border-left-color: transparent!important;\
+ top: -5px;\
+ }\
+", "");
+
+});
+
+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/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"], 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;
+require("./worker/worker_client");
+require("./keyboard/hash_handler");
+require("./placeholder");
+require("./multi_select");
+require("./mode/folding/fold_mode");
+require("./theme/textmate");
+require("./ext/error_marker");
+
+exports.config = require("./config");
+exports.require = require;
+
+if (typeof define === "function")
+ exports.define = define;
+exports.edit = function(el) {
+ if (typeof el == "string") {
+ var _id = el;
+ el = document.getElementById(_id);
+ if (!el)
+ throw new Error("ace.edit can't find div #" + _id);
+ }
+
+ if (el && el.env && el.env.editor instanceof Editor)
+ return el.env.editor;
+
+ var value = "";
+ if (el && /input|textarea/i.test(el.tagName)) {
+ var oldNode = el;
+ value = oldNode.value;
+ el = dom.createElement("pre");
+ oldNode.parentNode.replaceChild(el, oldNode);
+ } else if (el) {
+ value = dom.getInnerText(el);
+ el.innerHTML = "";
+ }
+
+ var doc = exports.createEditSession(value);
+
+ var editor = new Editor(new Renderer(el));
+ editor.setSession(doc);
+
+ var env = {
+ document: doc,
+ editor: editor,
+ onResize: editor.resize.bind(editor, null)
+ };
+ if (oldNode) env.textarea = oldNode;
+ event.addListener(window, "resize", env.onResize);
+ editor.on("destroy", function() {
+ event.removeListener(window, "resize", env.onResize);
+ env.editor.container.env = null; // prevent memory leak on old ie
+ });
+ editor.container.env = editor.env = env;
+ return editor;
+};
+exports.createEditSession = function(text, mode) {
+ var doc = new EditSession(text, mode);
+ doc.setUndoManager(new UndoManager());
+ return doc;
+}
+exports.EditSession = EditSession;
+exports.UndoManager = UndoManager;
+exports.version = "1.2.8";
+});
+ (function() {
+ ace.require(["ace/ace"], function(a) {
+ if (a) {
+ a.config.init(true);
+ a.define = ace.define;
+ }
+ if (!window.ace)
+ window.ace = a;
+ for (var key in a) if (a.hasOwnProperty(key))
+ window.ace[key] = a[key];
+ });
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ext-beautify.js b/www/wiki/extensions/CodeEditor/modules/ace/ext-beautify.js
new file mode 100644
index 00000000..ba499b77
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ext-beautify.js
@@ -0,0 +1,334 @@
+ace.define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+var TokenIterator = require("ace/token_iterator").TokenIterator;
+exports.newLines = [{
+ type: 'support.php_tag',
+ value: '<?php'
+}, {
+ type: 'support.php_tag',
+ value: '<?'
+}, {
+ type: 'support.php_tag',
+ value: '?>'
+}, {
+ type: 'paren.lparen',
+ value: '{',
+ indent: true
+}, {
+ type: 'paren.rparen',
+ breakBefore: true,
+ value: '}',
+ indent: false
+}, {
+ type: 'paren.rparen',
+ breakBefore: true,
+ value: '})',
+ indent: false,
+ dontBreak: true
+}, {
+ type: 'comment'
+}, {
+ type: 'text',
+ value: ';'
+}, {
+ type: 'text',
+ value: ':',
+ context: 'php'
+}, {
+ type: 'keyword',
+ value: 'case',
+ indent: true,
+ dontBreak: true
+}, {
+ type: 'keyword',
+ value: 'default',
+ indent: true,
+ dontBreak: true
+}, {
+ type: 'keyword',
+ value: 'break',
+ indent: false,
+ dontBreak: true
+}, {
+ type: 'punctuation.doctype.end',
+ value: '>'
+}, {
+ type: 'meta.tag.punctuation.end',
+ value: '>'
+}, {
+ type: 'meta.tag.punctuation.begin',
+ value: '<',
+ blockTag: true,
+ indent: true,
+ dontBreak: true
+}, {
+ type: 'meta.tag.punctuation.begin',
+ value: '</',
+ indent: false,
+ breakBefore: true,
+ dontBreak: true
+}, {
+ type: 'punctuation.operator',
+ value: ';'
+}];
+
+exports.spaces = [{
+ type: 'xml-pe',
+ prepend: true
+},{
+ type: 'entity.other.attribute-name',
+ prepend: true
+}, {
+ type: 'storage.type',
+ value: 'var',
+ append: true
+}, {
+ type: 'storage.type',
+ value: 'function',
+ append: true
+}, {
+ type: 'keyword.operator',
+ value: '='
+}, {
+ type: 'keyword',
+ value: 'as',
+ prepend: true,
+ append: true
+}, {
+ type: 'keyword',
+ value: 'function',
+ append: true
+}, {
+ type: 'support.function',
+ next: /[^\(]/,
+ append: true
+}, {
+ type: 'keyword',
+ value: 'or',
+ append: true,
+ prepend: true
+}, {
+ type: 'keyword',
+ value: 'and',
+ append: true,
+ prepend: true
+}, {
+ type: 'keyword',
+ value: 'case',
+ append: true
+}, {
+ type: 'keyword.operator',
+ value: '||',
+ append: true,
+ prepend: true
+}, {
+ type: 'keyword.operator',
+ value: '&&',
+ append: true,
+ prepend: true
+}];
+exports.singleTags = ['!doctype','area','base','br','hr','input','img','link','meta'];
+
+exports.transform = function(iterator, maxPos, context) {
+ var token = iterator.getCurrentToken();
+
+ var newLines = exports.newLines;
+ var spaces = exports.spaces;
+ var singleTags = exports.singleTags;
+
+ var code = '';
+
+ var indentation = 0;
+ var dontBreak = false;
+ var tag;
+ var lastTag;
+ var lastToken = {};
+ var nextTag;
+ var nextToken = {};
+ var breakAdded = false;
+ var value = '';
+
+ while (token!==null) {
+ console.log(token);
+
+ if( !token ){
+ token = iterator.stepForward();
+ continue;
+ }
+ if( token.type == 'support.php_tag' && token.value != '?>' ){
+ context = 'php';
+ }
+ else if( token.type == 'support.php_tag' && token.value == '?>' ){
+ context = 'html';
+ }
+ else if( token.type == 'meta.tag.name.style' && context != 'css' ){
+ context = 'css';
+ }
+ else if( token.type == 'meta.tag.name.style' && context == 'css' ){
+ context = 'html';
+ }
+ else if( token.type == 'meta.tag.name.script' && context != 'js' ){
+ context = 'js';
+ }
+ else if( token.type == 'meta.tag.name.script' && context == 'js' ){
+ context = 'html';
+ }
+
+ nextToken = iterator.stepForward();
+ if (nextToken && nextToken.type.indexOf('meta.tag.name') == 0) {
+ nextTag = nextToken.value;
+ }
+ if ( lastToken.type == 'support.php_tag' && lastToken.value == '<?=') {
+ dontBreak = true;
+ }
+ if (token.type == 'meta.tag.name') {
+ token.value = token.value.toLowerCase();
+ }
+ if (token.type == 'text') {
+ token.value = token.value.trim();
+ }
+ if (!token.value) {
+ token = nextToken;
+ continue;
+ }
+ value = token.value;
+ for (var i in spaces) {
+ if (
+ token.type == spaces[i].type &&
+ (!spaces[i].value || token.value == spaces[i].value) &&
+ (
+ nextToken &&
+ (!spaces[i].next || spaces[i].next.test(nextToken.value))
+ )
+ ) {
+ if (spaces[i].prepend) {
+ value = ' ' + token.value;
+ }
+
+ if (spaces[i].append) {
+ value += ' ';
+ }
+ }
+ }
+ if (token.type.indexOf('meta.tag.name') == 0) {
+ tag = token.value;
+ }
+ breakAdded = false;
+ for (i in newLines) {
+ if (
+ token.type == newLines[i].type &&
+ (
+ !newLines[i].value ||
+ token.value == newLines[i].value
+ ) &&
+ (
+ !newLines[i].blockTag ||
+ singleTags.indexOf(nextTag) === -1
+ ) &&
+ (
+ !newLines[i].context ||
+ newLines[i].context === context
+ )
+ ) {
+ if (newLines[i].indent === false) {
+ indentation--;
+ }
+
+ if (
+ newLines[i].breakBefore &&
+ ( !newLines[i].prev || newLines[i].prev.test(lastToken.value) )
+ ) {
+ code += "\n";
+ breakAdded = true;
+ for (i = 0; i < indentation; i++) {
+ code += "\t";
+ }
+ }
+
+ break;
+ }
+ }
+
+ if (dontBreak===false) {
+ for (i in newLines) {
+ if (
+ lastToken.type == newLines[i].type &&
+ (
+ !newLines[i].value || lastToken.value == newLines[i].value
+ ) &&
+ (
+ !newLines[i].blockTag ||
+ singleTags.indexOf(tag) === -1
+ ) &&
+ (
+ !newLines[i].context ||
+ newLines[i].context === context
+ )
+ ) {
+ if (newLines[i].indent === true) {
+ indentation++;
+ }
+
+ if (!newLines[i].dontBreak && !breakAdded) {
+ code += "\n";
+ for (i = 0; i < indentation; i++) {
+ code += "\t";
+ }
+ }
+
+ break;
+ }
+ }
+ }
+
+ code += value;
+ if ( lastToken.type == 'support.php_tag' && lastToken.value == '?>' ) {
+ dontBreak = false;
+ }
+ lastTag = tag;
+
+ lastToken = token;
+
+ token = nextToken;
+
+ if (token===null) {
+ break;
+ }
+ }
+
+ return code;
+};
+
+
+
+});
+
+ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator","ace/ext/beautify/php_rules"], function(require, exports, module) {
+"use strict";
+var TokenIterator = require("ace/token_iterator").TokenIterator;
+
+var phpTransform = require("./beautify/php_rules").transform;
+
+exports.beautify = function(session) {
+ var iterator = new TokenIterator(session, 0, 0);
+ var token = iterator.getCurrentToken();
+
+ var context = session.$modeId.split("/").pop();
+
+ var code = phpTransform(iterator, context);
+ session.doc.setValue(code);
+};
+
+exports.commands = [{
+ name: "beautify",
+ exec: function(editor) {
+ exports.beautify(editor.session);
+ },
+ bindKey: "Ctrl-Shift-B"
+}]
+
+});
+ (function() {
+ ace.require(["ace/ext/beautify"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ext-elastic_tabstops_lite.js b/www/wiki/extensions/CodeEditor/modules/ace/ext-elastic_tabstops_lite.js
new file mode 100644
index 00000000..14e8855f
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ext-elastic_tabstops_lite.js
@@ -0,0 +1,274 @@
+ace.define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) {
+"use strict";
+
+var ElasticTabstopsLite = function(editor) {
+ this.$editor = editor;
+ var self = this;
+ var changedRows = [];
+ var recordChanges = false;
+ this.onAfterExec = function() {
+ recordChanges = false;
+ self.processRows(changedRows);
+ changedRows = [];
+ };
+ this.onExec = function() {
+ recordChanges = true;
+ };
+ this.onChange = function(delta) {
+ if (recordChanges) {
+ if (changedRows.indexOf(delta.start.row) == -1)
+ changedRows.push(delta.start.row);
+ if (delta.end.row != delta.start.row)
+ changedRows.push(delta.end.row);
+ }
+ };
+};
+
+(function() {
+ this.processRows = function(rows) {
+ this.$inChange = true;
+ var checkedRows = [];
+
+ for (var r = 0, rowCount = rows.length; r < rowCount; r++) {
+ var row = rows[r];
+
+ if (checkedRows.indexOf(row) > -1)
+ continue;
+
+ var cellWidthObj = this.$findCellWidthsForBlock(row);
+ var cellWidths = this.$setBlockCellWidthsToMax(cellWidthObj.cellWidths);
+ var rowIndex = cellWidthObj.firstRow;
+
+ for (var w = 0, l = cellWidths.length; w < l; w++) {
+ var widths = cellWidths[w];
+ checkedRows.push(rowIndex);
+ this.$adjustRow(rowIndex, widths);
+ rowIndex++;
+ }
+ }
+ this.$inChange = false;
+ };
+
+ this.$findCellWidthsForBlock = function(row) {
+ var cellWidths = [], widths;
+ var rowIter = row;
+ while (rowIter >= 0) {
+ widths = this.$cellWidthsForRow(rowIter);
+ if (widths.length == 0)
+ break;
+
+ cellWidths.unshift(widths);
+ rowIter--;
+ }
+ var firstRow = rowIter + 1;
+ rowIter = row;
+ var numRows = this.$editor.session.getLength();
+
+ while (rowIter < numRows - 1) {
+ rowIter++;
+
+ widths = this.$cellWidthsForRow(rowIter);
+ if (widths.length == 0)
+ break;
+
+ cellWidths.push(widths);
+ }
+
+ return { cellWidths: cellWidths, firstRow: firstRow };
+ };
+
+ this.$cellWidthsForRow = function(row) {
+ var selectionColumns = this.$selectionColumnsForRow(row);
+
+ var tabs = [-1].concat(this.$tabsForRow(row));
+ var widths = tabs.map(function(el) { return 0; } ).slice(1);
+ var line = this.$editor.session.getLine(row);
+
+ for (var i = 0, len = tabs.length - 1; i < len; i++) {
+ var leftEdge = tabs[i]+1;
+ var rightEdge = tabs[i+1];
+
+ var rightmostSelection = this.$rightmostSelectionInCell(selectionColumns, rightEdge);
+ var cell = line.substring(leftEdge, rightEdge);
+ widths[i] = Math.max(cell.replace(/\s+$/g,'').length, rightmostSelection - leftEdge);
+ }
+
+ return widths;
+ };
+
+ this.$selectionColumnsForRow = function(row) {
+ var selections = [], cursor = this.$editor.getCursorPosition();
+ if (this.$editor.session.getSelection().isEmpty()) {
+ if (row == cursor.row)
+ selections.push(cursor.column);
+ }
+
+ return selections;
+ };
+
+ this.$setBlockCellWidthsToMax = function(cellWidths) {
+ var startingNewBlock = true, blockStartRow, blockEndRow, maxWidth;
+ var columnInfo = this.$izip_longest(cellWidths);
+
+ for (var c = 0, l = columnInfo.length; c < l; c++) {
+ var column = columnInfo[c];
+ if (!column.push) {
+ console.error(column);
+ continue;
+ }
+ column.push(NaN);
+
+ for (var r = 0, s = column.length; r < s; r++) {
+ var width = column[r];
+ if (startingNewBlock) {
+ blockStartRow = r;
+ maxWidth = 0;
+ startingNewBlock = false;
+ }
+ if (isNaN(width)) {
+ blockEndRow = r;
+
+ for (var j = blockStartRow; j < blockEndRow; j++) {
+ cellWidths[j][c] = maxWidth;
+ }
+ startingNewBlock = true;
+ }
+
+ maxWidth = Math.max(maxWidth, width);
+ }
+ }
+
+ return cellWidths;
+ };
+
+ this.$rightmostSelectionInCell = function(selectionColumns, cellRightEdge) {
+ var rightmost = 0;
+
+ if (selectionColumns.length) {
+ var lengths = [];
+ for (var s = 0, length = selectionColumns.length; s < length; s++) {
+ if (selectionColumns[s] <= cellRightEdge)
+ lengths.push(s);
+ else
+ lengths.push(0);
+ }
+ rightmost = Math.max.apply(Math, lengths);
+ }
+
+ return rightmost;
+ };
+
+ this.$tabsForRow = function(row) {
+ var rowTabs = [], line = this.$editor.session.getLine(row),
+ re = /\t/g, match;
+
+ while ((match = re.exec(line)) != null) {
+ rowTabs.push(match.index);
+ }
+
+ return rowTabs;
+ };
+
+ this.$adjustRow = function(row, widths) {
+ var rowTabs = this.$tabsForRow(row);
+
+ if (rowTabs.length == 0)
+ return;
+
+ var bias = 0, location = -1;
+ var expandedSet = this.$izip(widths, rowTabs);
+
+ for (var i = 0, l = expandedSet.length; i < l; i++) {
+ var w = expandedSet[i][0], it = expandedSet[i][1];
+ location += 1 + w;
+ it += bias;
+ var difference = location - it;
+
+ if (difference == 0)
+ continue;
+
+ var partialLine = this.$editor.session.getLine(row).substr(0, it );
+ var strippedPartialLine = partialLine.replace(/\s*$/g, "");
+ var ispaces = partialLine.length - strippedPartialLine.length;
+
+ if (difference > 0) {
+ this.$editor.session.getDocument().insertInLine({row: row, column: it + 1}, Array(difference + 1).join(" ") + "\t");
+ this.$editor.session.getDocument().removeInLine(row, it, it + 1);
+
+ bias += difference;
+ }
+
+ if (difference < 0 && ispaces >= -difference) {
+ this.$editor.session.getDocument().removeInLine(row, it + difference, it);
+ bias += difference;
+ }
+ }
+ };
+ this.$izip_longest = function(iterables) {
+ if (!iterables[0])
+ return [];
+ var longest = iterables[0].length;
+ var iterablesLength = iterables.length;
+
+ for (var i = 1; i < iterablesLength; i++) {
+ var iLength = iterables[i].length;
+ if (iLength > longest)
+ longest = iLength;
+ }
+
+ var expandedSet = [];
+
+ for (var l = 0; l < longest; l++) {
+ var set = [];
+ for (var i = 0; i < iterablesLength; i++) {
+ if (iterables[i][l] === "")
+ set.push(NaN);
+ else
+ set.push(iterables[i][l]);
+ }
+
+ expandedSet.push(set);
+ }
+
+
+ return expandedSet;
+ };
+ this.$izip = function(widths, tabs) {
+ var size = widths.length >= tabs.length ? tabs.length : widths.length;
+
+ var expandedSet = [];
+ for (var i = 0; i < size; i++) {
+ var set = [ widths[i], tabs[i] ];
+ expandedSet.push(set);
+ }
+ return expandedSet;
+ };
+
+}).call(ElasticTabstopsLite.prototype);
+
+exports.ElasticTabstopsLite = ElasticTabstopsLite;
+
+var Editor = require("../editor").Editor;
+require("../config").defineOptions(Editor.prototype, "editor", {
+ useElasticTabstops: {
+ set: function(val) {
+ if (val) {
+ if (!this.elasticTabstops)
+ this.elasticTabstops = new ElasticTabstopsLite(this);
+ this.commands.on("afterExec", this.elasticTabstops.onAfterExec);
+ this.commands.on("exec", this.elasticTabstops.onExec);
+ this.on("change", this.elasticTabstops.onChange);
+ } else if (this.elasticTabstops) {
+ this.commands.removeListener("afterExec", this.elasticTabstops.onAfterExec);
+ this.commands.removeListener("exec", this.elasticTabstops.onExec);
+ this.removeListener("change", this.elasticTabstops.onChange);
+ }
+ }
+ }
+});
+
+});
+ (function() {
+ ace.require(["ace/ext/elastic_tabstops_lite"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ext-emmet.js b/www/wiki/extensions/CodeEditor/modules/ace/ext-emmet.js
new file mode 100644
index 00000000..c2f2d1a1
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ext-emmet.js
@@ -0,0 +1,1223 @@
+ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"], function(require, exports, module) {
+"use strict";
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var lang = require("./lib/lang");
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+var HashHandler = require("./keyboard/hash_handler").HashHandler;
+var Tokenizer = require("./tokenizer").Tokenizer;
+var comparePoints = Range.comparePoints;
+
+var SnippetManager = function() {
+ this.snippetMap = {};
+ this.snippetNameMap = {};
+};
+
+(function() {
+ oop.implement(this, EventEmitter);
+
+ this.getTokenizer = function() {
+ function TabstopToken(str, _, stack) {
+ str = str.substr(1);
+ if (/^\d+$/.test(str) && !stack.inFormatString)
+ return [{tabstopId: parseInt(str, 10)}];
+ return [{text: str}];
+ }
+ function escape(ch) {
+ return "(?:[^\\\\" + ch + "]|\\\\.)";
+ }
+ SnippetManager.$tokenizer = new Tokenizer({
+ start: [
+ {regex: /:/, onMatch: function(val, state, stack) {
+ if (stack.length && stack[0].expectIf) {
+ stack[0].expectIf = false;
+ stack[0].elseBranch = stack[0];
+ return [stack[0]];
+ }
+ return ":";
+ }},
+ {regex: /\\./, onMatch: function(val, state, stack) {
+ var ch = val[1];
+ if (ch == "}" && stack.length) {
+ val = ch;
+ }else if ("`$\\".indexOf(ch) != -1) {
+ val = ch;
+ } else if (stack.inFormatString) {
+ if (ch == "n")
+ val = "\n";
+ else if (ch == "t")
+ val = "\n";
+ else if ("ulULE".indexOf(ch) != -1) {
+ val = {changeCase: ch, local: ch > "a"};
+ }
+ }
+
+ return [val];
+ }},
+ {regex: /}/, onMatch: function(val, state, stack) {
+ return [stack.length ? stack.shift() : val];
+ }},
+ {regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken},
+ {regex: /\$\{[\dA-Z_a-z]+/, onMatch: function(str, state, stack) {
+ var t = TabstopToken(str.substr(1), state, stack);
+ stack.unshift(t[0]);
+ return t;
+ }, next: "snippetVar"},
+ {regex: /\n/, token: "newline", merge: false}
+ ],
+ snippetVar: [
+ {regex: "\\|" + escape("\\|") + "*\\|", onMatch: function(val, state, stack) {
+ stack[0].choices = val.slice(1, -1).split(",");
+ }, next: "start"},
+ {regex: "/(" + escape("/") + "+)/(?:(" + escape("/") + "*)/)(\\w*):?",
+ onMatch: function(val, state, stack) {
+ var ts = stack[0];
+ ts.fmtString = val;
+
+ val = this.splitRegex.exec(val);
+ ts.guard = val[1];
+ ts.fmt = val[2];
+ ts.flag = val[3];
+ return "";
+ }, next: "start"},
+ {regex: "`" + escape("`") + "*`", onMatch: function(val, state, stack) {
+ stack[0].code = val.splice(1, -1);
+ return "";
+ }, next: "start"},
+ {regex: "\\?", onMatch: function(val, state, stack) {
+ if (stack[0])
+ stack[0].expectIf = true;
+ }, next: "start"},
+ {regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start"}
+ ],
+ formatString: [
+ {regex: "/(" + escape("/") + "+)/", token: "regex"},
+ {regex: "", onMatch: function(val, state, stack) {
+ stack.inFormatString = true;
+ }, next: "start"}
+ ]
+ });
+ SnippetManager.prototype.getTokenizer = function() {
+ return SnippetManager.$tokenizer;
+ };
+ return SnippetManager.$tokenizer;
+ };
+
+ this.tokenizeTmSnippet = function(str, startState) {
+ return this.getTokenizer().getLineTokens(str, startState).tokens.map(function(x) {
+ return x.value || x;
+ });
+ };
+
+ this.$getDefaultValue = function(editor, name) {
+ if (/^[A-Z]\d+$/.test(name)) {
+ var i = name.substr(1);
+ return (this.variables[name[0] + "__"] || {})[i];
+ }
+ if (/^\d+$/.test(name)) {
+ return (this.variables.__ || {})[name];
+ }
+ name = name.replace(/^TM_/, "");
+
+ if (!editor)
+ return;
+ var s = editor.session;
+ switch(name) {
+ case "CURRENT_WORD":
+ var r = s.getWordRange();
+ case "SELECTION":
+ case "SELECTED_TEXT":
+ return s.getTextRange(r);
+ case "CURRENT_LINE":
+ return s.getLine(editor.getCursorPosition().row);
+ case "PREV_LINE": // not possible in textmate
+ return s.getLine(editor.getCursorPosition().row - 1);
+ case "LINE_INDEX":
+ return editor.getCursorPosition().column;
+ case "LINE_NUMBER":
+ return editor.getCursorPosition().row + 1;
+ case "SOFT_TABS":
+ return s.getUseSoftTabs() ? "YES" : "NO";
+ case "TAB_SIZE":
+ return s.getTabSize();
+ case "FILENAME":
+ case "FILEPATH":
+ return "";
+ case "FULLNAME":
+ return "Ace";
+ }
+ };
+ this.variables = {};
+ this.getVariableValue = function(editor, varName) {
+ if (this.variables.hasOwnProperty(varName))
+ return this.variables[varName](editor, varName) || "";
+ return this.$getDefaultValue(editor, varName) || "";
+ };
+ this.tmStrFormat = function(str, ch, editor) {
+ var flag = ch.flag || "";
+ var re = ch.guard;
+ re = new RegExp(re, flag.replace(/[^gi]/, ""));
+ var fmtTokens = this.tokenizeTmSnippet(ch.fmt, "formatString");
+ var _self = this;
+ var formatted = str.replace(re, function() {
+ _self.variables.__ = arguments;
+ var fmtParts = _self.resolveVariables(fmtTokens, editor);
+ var gChangeCase = "E";
+ for (var i = 0; i < fmtParts.length; i++) {
+ var ch = fmtParts[i];
+ if (typeof ch == "object") {
+ fmtParts[i] = "";
+ if (ch.changeCase && ch.local) {
+ var next = fmtParts[i + 1];
+ if (next && typeof next == "string") {
+ if (ch.changeCase == "u")
+ fmtParts[i] = next[0].toUpperCase();
+ else
+ fmtParts[i] = next[0].toLowerCase();
+ fmtParts[i + 1] = next.substr(1);
+ }
+ } else if (ch.changeCase) {
+ gChangeCase = ch.changeCase;
+ }
+ } else if (gChangeCase == "U") {
+ fmtParts[i] = ch.toUpperCase();
+ } else if (gChangeCase == "L") {
+ fmtParts[i] = ch.toLowerCase();
+ }
+ }
+ return fmtParts.join("");
+ });
+ this.variables.__ = null;
+ return formatted;
+ };
+
+ this.resolveVariables = function(snippet, editor) {
+ var result = [];
+ for (var i = 0; i < snippet.length; i++) {
+ var ch = snippet[i];
+ if (typeof ch == "string") {
+ result.push(ch);
+ } else if (typeof ch != "object") {
+ continue;
+ } else if (ch.skip) {
+ gotoNext(ch);
+ } else if (ch.processed < i) {
+ continue;
+ } else if (ch.text) {
+ var value = this.getVariableValue(editor, ch.text);
+ if (value && ch.fmtString)
+ value = this.tmStrFormat(value, ch);
+ ch.processed = i;
+ if (ch.expectIf == null) {
+ if (value) {
+ result.push(value);
+ gotoNext(ch);
+ }
+ } else {
+ if (value) {
+ ch.skip = ch.elseBranch;
+ } else
+ gotoNext(ch);
+ }
+ } else if (ch.tabstopId != null) {
+ result.push(ch);
+ } else if (ch.changeCase != null) {
+ result.push(ch);
+ }
+ }
+ function gotoNext(ch) {
+ var i1 = snippet.indexOf(ch, i + 1);
+ if (i1 != -1)
+ i = i1;
+ }
+ return result;
+ };
+
+ this.insertSnippetForSelection = function(editor, snippetText) {
+ var cursor = editor.getCursorPosition();
+ var line = editor.session.getLine(cursor.row);
+ var tabString = editor.session.getTabString();
+ var indentString = line.match(/^\s*/)[0];
+
+ if (cursor.column < indentString.length)
+ indentString = indentString.slice(0, cursor.column);
+
+ snippetText = snippetText.replace(/\r/g, "");
+ var tokens = this.tokenizeTmSnippet(snippetText);
+ tokens = this.resolveVariables(tokens, editor);
+ tokens = tokens.map(function(x) {
+ if (x == "\n")
+ return x + indentString;
+ if (typeof x == "string")
+ return x.replace(/\t/g, tabString);
+ return x;
+ });
+ var tabstops = [];
+ tokens.forEach(function(p, i) {
+ if (typeof p != "object")
+ return;
+ var id = p.tabstopId;
+ var ts = tabstops[id];
+ if (!ts) {
+ ts = tabstops[id] = [];
+ ts.index = id;
+ ts.value = "";
+ }
+ if (ts.indexOf(p) !== -1)
+ return;
+ ts.push(p);
+ var i1 = tokens.indexOf(p, i + 1);
+ if (i1 === -1)
+ return;
+
+ var value = tokens.slice(i + 1, i1);
+ var isNested = value.some(function(t) {return typeof t === "object"});
+ if (isNested && !ts.value) {
+ ts.value = value;
+ } else if (value.length && (!ts.value || typeof ts.value !== "string")) {
+ ts.value = value.join("");
+ }
+ });
+ tabstops.forEach(function(ts) {ts.length = 0});
+ var expanding = {};
+ function copyValue(val) {
+ var copy = [];
+ for (var i = 0; i < val.length; i++) {
+ var p = val[i];
+ if (typeof p == "object") {
+ if (expanding[p.tabstopId])
+ continue;
+ var j = val.lastIndexOf(p, i - 1);
+ p = copy[j] || {tabstopId: p.tabstopId};
+ }
+ copy[i] = p;
+ }
+ return copy;
+ }
+ for (var i = 0; i < tokens.length; i++) {
+ var p = tokens[i];
+ if (typeof p != "object")
+ continue;
+ var id = p.tabstopId;
+ var i1 = tokens.indexOf(p, i + 1);
+ if (expanding[id]) {
+ if (expanding[id] === p)
+ expanding[id] = null;
+ continue;
+ }
+
+ var ts = tabstops[id];
+ var arg = typeof ts.value == "string" ? [ts.value] : copyValue(ts.value);
+ arg.unshift(i + 1, Math.max(0, i1 - i));
+ arg.push(p);
+ expanding[id] = p;
+ tokens.splice.apply(tokens, arg);
+
+ if (ts.indexOf(p) === -1)
+ ts.push(p);
+ }
+ var row = 0, column = 0;
+ var text = "";
+ tokens.forEach(function(t) {
+ if (typeof t === "string") {
+ var lines = t.split("\n");
+ if (lines.length > 1){
+ column = lines[lines.length - 1].length;
+ row += lines.length - 1;
+ } else
+ column += t.length;
+ text += t;
+ } else {
+ if (!t.start)
+ t.start = {row: row, column: column};
+ else
+ t.end = {row: row, column: column};
+ }
+ });
+ var range = editor.getSelectionRange();
+ var end = editor.session.replace(range, text);
+
+ var tabstopManager = new TabstopManager(editor);
+ var selectionId = editor.inVirtualSelectionMode && editor.selection.index;
+ tabstopManager.addTabstops(tabstops, range.start, end, selectionId);
+ };
+
+ this.insertSnippet = function(editor, snippetText) {
+ var self = this;
+ if (editor.inVirtualSelectionMode)
+ return self.insertSnippetForSelection(editor, snippetText);
+
+ editor.forEachSelection(function() {
+ self.insertSnippetForSelection(editor, snippetText);
+ }, null, {keepOrder: true});
+
+ if (editor.tabstopManager)
+ editor.tabstopManager.tabNext();
+ };
+
+ this.$getScope = function(editor) {
+ var scope = editor.session.$mode.$id || "";
+ scope = scope.split("/").pop();
+ if (scope === "html" || scope === "php") {
+ if (scope === "php" && !editor.session.$mode.inlinePhp)
+ scope = "html";
+ var c = editor.getCursorPosition();
+ var state = editor.session.getState(c.row);
+ if (typeof state === "object") {
+ state = state[0];
+ }
+ if (state.substring) {
+ if (state.substring(0, 3) == "js-")
+ scope = "javascript";
+ else if (state.substring(0, 4) == "css-")
+ scope = "css";
+ else if (state.substring(0, 4) == "php-")
+ scope = "php";
+ }
+ }
+
+ return scope;
+ };
+
+ this.getActiveScopes = function(editor) {
+ var scope = this.$getScope(editor);
+ var scopes = [scope];
+ var snippetMap = this.snippetMap;
+ if (snippetMap[scope] && snippetMap[scope].includeScopes) {
+ scopes.push.apply(scopes, snippetMap[scope].includeScopes);
+ }
+ scopes.push("_");
+ return scopes;
+ };
+
+ this.expandWithTab = function(editor, options) {
+ var self = this;
+ var result = editor.forEachSelection(function() {
+ return self.expandSnippetForSelection(editor, options);
+ }, null, {keepOrder: true});
+ if (result && editor.tabstopManager)
+ editor.tabstopManager.tabNext();
+ return result;
+ };
+
+ this.expandSnippetForSelection = function(editor, options) {
+ var cursor = editor.getCursorPosition();
+ var line = editor.session.getLine(cursor.row);
+ var before = line.substring(0, cursor.column);
+ var after = line.substr(cursor.column);
+
+ var snippetMap = this.snippetMap;
+ var snippet;
+ this.getActiveScopes(editor).some(function(scope) {
+ var snippets = snippetMap[scope];
+ if (snippets)
+ snippet = this.findMatchingSnippet(snippets, before, after);
+ return !!snippet;
+ }, this);
+ if (!snippet)
+ return false;
+ if (options && options.dryRun)
+ return true;
+ editor.session.doc.removeInLine(cursor.row,
+ cursor.column - snippet.replaceBefore.length,
+ cursor.column + snippet.replaceAfter.length
+ );
+
+ this.variables.M__ = snippet.matchBefore;
+ this.variables.T__ = snippet.matchAfter;
+ this.insertSnippetForSelection(editor, snippet.content);
+
+ this.variables.M__ = this.variables.T__ = null;
+ return true;
+ };
+
+ this.findMatchingSnippet = function(snippetList, before, after) {
+ for (var i = snippetList.length; i--;) {
+ var s = snippetList[i];
+ if (s.startRe && !s.startRe.test(before))
+ continue;
+ if (s.endRe && !s.endRe.test(after))
+ continue;
+ if (!s.startRe && !s.endRe)
+ continue;
+
+ s.matchBefore = s.startRe ? s.startRe.exec(before) : [""];
+ s.matchAfter = s.endRe ? s.endRe.exec(after) : [""];
+ s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : "";
+ s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : "";
+ return s;
+ }
+ };
+
+ this.snippetMap = {};
+ this.snippetNameMap = {};
+ this.register = function(snippets, scope) {
+ var snippetMap = this.snippetMap;
+ var snippetNameMap = this.snippetNameMap;
+ var self = this;
+
+ if (!snippets)
+ snippets = [];
+
+ function wrapRegexp(src) {
+ if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src))
+ src = "(?:" + src + ")";
+
+ return src || "";
+ }
+ function guardedRegexp(re, guard, opening) {
+ re = wrapRegexp(re);
+ guard = wrapRegexp(guard);
+ if (opening) {
+ re = guard + re;
+ if (re && re[re.length - 1] != "$")
+ re = re + "$";
+ } else {
+ re = re + guard;
+ if (re && re[0] != "^")
+ re = "^" + re;
+ }
+ return new RegExp(re);
+ }
+
+ function addSnippet(s) {
+ if (!s.scope)
+ s.scope = scope || "_";
+ scope = s.scope;
+ if (!snippetMap[scope]) {
+ snippetMap[scope] = [];
+ snippetNameMap[scope] = {};
+ }
+
+ var map = snippetNameMap[scope];
+ if (s.name) {
+ var old = map[s.name];
+ if (old)
+ self.unregister(old);
+ map[s.name] = s;
+ }
+ snippetMap[scope].push(s);
+
+ if (s.tabTrigger && !s.trigger) {
+ if (!s.guard && /^\w/.test(s.tabTrigger))
+ s.guard = "\\b";
+ s.trigger = lang.escapeRegExp(s.tabTrigger);
+ }
+
+ if (!s.trigger && !s.guard && !s.endTrigger && !s.endGuard)
+ return;
+
+ s.startRe = guardedRegexp(s.trigger, s.guard, true);
+ s.triggerRe = new RegExp(s.trigger, "", true);
+
+ s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true);
+ s.endTriggerRe = new RegExp(s.endTrigger, "", true);
+ }
+
+ if (snippets && snippets.content)
+ addSnippet(snippets);
+ else if (Array.isArray(snippets))
+ snippets.forEach(addSnippet);
+
+ this._signal("registerSnippets", {scope: scope});
+ };
+ this.unregister = function(snippets, scope) {
+ var snippetMap = this.snippetMap;
+ var snippetNameMap = this.snippetNameMap;
+
+ function removeSnippet(s) {
+ var nameMap = snippetNameMap[s.scope||scope];
+ if (nameMap && nameMap[s.name]) {
+ delete nameMap[s.name];
+ var map = snippetMap[s.scope||scope];
+ var i = map && map.indexOf(s);
+ if (i >= 0)
+ map.splice(i, 1);
+ }
+ }
+ if (snippets.content)
+ removeSnippet(snippets);
+ else if (Array.isArray(snippets))
+ snippets.forEach(removeSnippet);
+ };
+ this.parseSnippetFile = function(str) {
+ str = str.replace(/\r/g, "");
+ var list = [], snippet = {};
+ var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;
+ var m;
+ while (m = re.exec(str)) {
+ if (m[1]) {
+ try {
+ snippet = JSON.parse(m[1]);
+ list.push(snippet);
+ } catch (e) {}
+ } if (m[4]) {
+ snippet.content = m[4].replace(/^\t/gm, "");
+ list.push(snippet);
+ snippet = {};
+ } else {
+ var key = m[2], val = m[3];
+ if (key == "regex") {
+ var guardRe = /\/((?:[^\/\\]|\\.)*)|$/g;
+ snippet.guard = guardRe.exec(val)[1];
+ snippet.trigger = guardRe.exec(val)[1];
+ snippet.endTrigger = guardRe.exec(val)[1];
+ snippet.endGuard = guardRe.exec(val)[1];
+ } else if (key == "snippet") {
+ snippet.tabTrigger = val.match(/^\S*/)[0];
+ if (!snippet.name)
+ snippet.name = val;
+ } else {
+ snippet[key] = val;
+ }
+ }
+ }
+ return list;
+ };
+ this.getSnippetByName = function(name, editor) {
+ var snippetMap = this.snippetNameMap;
+ var snippet;
+ this.getActiveScopes(editor).some(function(scope) {
+ var snippets = snippetMap[scope];
+ if (snippets)
+ snippet = snippets[name];
+ return !!snippet;
+ }, this);
+ return snippet;
+ };
+
+}).call(SnippetManager.prototype);
+
+
+var TabstopManager = function(editor) {
+ if (editor.tabstopManager)
+ return editor.tabstopManager;
+ editor.tabstopManager = this;
+ this.$onChange = this.onChange.bind(this);
+ this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule;
+ this.$onChangeSession = this.onChangeSession.bind(this);
+ this.$onAfterExec = this.onAfterExec.bind(this);
+ this.attach(editor);
+};
+(function() {
+ this.attach = function(editor) {
+ this.index = 0;
+ this.ranges = [];
+ this.tabstops = [];
+ this.$openTabstops = null;
+ this.selectedTabstop = null;
+
+ this.editor = editor;
+ this.editor.on("change", this.$onChange);
+ this.editor.on("changeSelection", this.$onChangeSelection);
+ this.editor.on("changeSession", this.$onChangeSession);
+ this.editor.commands.on("afterExec", this.$onAfterExec);
+ this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
+ };
+ this.detach = function() {
+ this.tabstops.forEach(this.removeTabstopMarkers, this);
+ this.ranges = null;
+ this.tabstops = null;
+ this.selectedTabstop = null;
+ this.editor.removeListener("change", this.$onChange);
+ this.editor.removeListener("changeSelection", this.$onChangeSelection);
+ this.editor.removeListener("changeSession", this.$onChangeSession);
+ this.editor.commands.removeListener("afterExec", this.$onAfterExec);
+ this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
+ this.editor.tabstopManager = null;
+ this.editor = null;
+ };
+
+ this.onChange = function(delta) {
+ var changeRange = delta;
+ var isRemove = delta.action[0] == "r";
+ var start = delta.start;
+ var end = delta.end;
+ var startRow = start.row;
+ var endRow = end.row;
+ var lineDif = endRow - startRow;
+ var colDiff = end.column - start.column;
+
+ if (isRemove) {
+ lineDif = -lineDif;
+ colDiff = -colDiff;
+ }
+ if (!this.$inChange && isRemove) {
+ var ts = this.selectedTabstop;
+ var changedOutside = ts && !ts.some(function(r) {
+ return comparePoints(r.start, start) <= 0 && comparePoints(r.end, end) >= 0;
+ });
+ if (changedOutside)
+ return this.detach();
+ }
+ var ranges = this.ranges;
+ for (var i = 0; i < ranges.length; i++) {
+ var r = ranges[i];
+ if (r.end.row < start.row)
+ continue;
+
+ if (isRemove && comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) {
+ this.removeRange(r);
+ i--;
+ continue;
+ }
+
+ if (r.start.row == startRow && r.start.column > start.column)
+ r.start.column += colDiff;
+ if (r.end.row == startRow && r.end.column >= start.column)
+ r.end.column += colDiff;
+ if (r.start.row >= startRow)
+ r.start.row += lineDif;
+ if (r.end.row >= startRow)
+ r.end.row += lineDif;
+
+ if (comparePoints(r.start, r.end) > 0)
+ this.removeRange(r);
+ }
+ if (!ranges.length)
+ this.detach();
+ };
+ this.updateLinkedFields = function() {
+ var ts = this.selectedTabstop;
+ if (!ts || !ts.hasLinkedRanges)
+ return;
+ this.$inChange = true;
+ var session = this.editor.session;
+ var text = session.getTextRange(ts.firstNonLinked);
+ for (var i = ts.length; i--;) {
+ var range = ts[i];
+ if (!range.linked)
+ continue;
+ var fmt = exports.snippetManager.tmStrFormat(text, range.original);
+ session.replace(range, fmt);
+ }
+ this.$inChange = false;
+ };
+ this.onAfterExec = function(e) {
+ if (e.command && !e.command.readOnly)
+ this.updateLinkedFields();
+ };
+ this.onChangeSelection = function() {
+ if (!this.editor)
+ return;
+ var lead = this.editor.selection.lead;
+ var anchor = this.editor.selection.anchor;
+ var isEmpty = this.editor.selection.isEmpty();
+ for (var i = this.ranges.length; i--;) {
+ if (this.ranges[i].linked)
+ continue;
+ var containsLead = this.ranges[i].contains(lead.row, lead.column);
+ var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column);
+ if (containsLead && containsAnchor)
+ return;
+ }
+ this.detach();
+ };
+ this.onChangeSession = function() {
+ this.detach();
+ };
+ this.tabNext = function(dir) {
+ var max = this.tabstops.length;
+ var index = this.index + (dir || 1);
+ index = Math.min(Math.max(index, 1), max);
+ if (index == max)
+ index = 0;
+ this.selectTabstop(index);
+ if (index === 0)
+ this.detach();
+ };
+ this.selectTabstop = function(index) {
+ this.$openTabstops = null;
+ var ts = this.tabstops[this.index];
+ if (ts)
+ this.addTabstopMarkers(ts);
+ this.index = index;
+ ts = this.tabstops[this.index];
+ if (!ts || !ts.length)
+ return;
+
+ this.selectedTabstop = ts;
+ if (!this.editor.inVirtualSelectionMode) {
+ var sel = this.editor.multiSelect;
+ sel.toSingleRange(ts.firstNonLinked.clone());
+ for (var i = ts.length; i--;) {
+ if (ts.hasLinkedRanges && ts[i].linked)
+ continue;
+ sel.addRange(ts[i].clone(), true);
+ }
+ if (sel.ranges[0])
+ sel.addRange(sel.ranges[0].clone());
+ } else {
+ this.editor.selection.setRange(ts.firstNonLinked);
+ }
+
+ this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
+ };
+ this.addTabstops = function(tabstops, start, end) {
+ if (!this.$openTabstops)
+ this.$openTabstops = [];
+ if (!tabstops[0]) {
+ var p = Range.fromPoints(end, end);
+ moveRelative(p.start, start);
+ moveRelative(p.end, start);
+ tabstops[0] = [p];
+ tabstops[0].index = 0;
+ }
+
+ var i = this.index;
+ var arg = [i + 1, 0];
+ var ranges = this.ranges;
+ tabstops.forEach(function(ts, index) {
+ var dest = this.$openTabstops[index] || ts;
+
+ for (var i = ts.length; i--;) {
+ var p = ts[i];
+ var range = Range.fromPoints(p.start, p.end || p.start);
+ movePoint(range.start, start);
+ movePoint(range.end, start);
+ range.original = p;
+ range.tabstop = dest;
+ ranges.push(range);
+ if (dest != ts)
+ dest.unshift(range);
+ else
+ dest[i] = range;
+ if (p.fmtString) {
+ range.linked = true;
+ dest.hasLinkedRanges = true;
+ } else if (!dest.firstNonLinked)
+ dest.firstNonLinked = range;
+ }
+ if (!dest.firstNonLinked)
+ dest.hasLinkedRanges = false;
+ if (dest === ts) {
+ arg.push(dest);
+ this.$openTabstops[index] = dest;
+ }
+ this.addTabstopMarkers(dest);
+ }, this);
+
+ if (arg.length > 2) {
+ if (this.tabstops.length)
+ arg.push(arg.splice(2, 1)[0]);
+ this.tabstops.splice.apply(this.tabstops, arg);
+ }
+ };
+
+ this.addTabstopMarkers = function(ts) {
+ var session = this.editor.session;
+ ts.forEach(function(range) {
+ if (!range.markerId)
+ range.markerId = session.addMarker(range, "ace_snippet-marker", "text");
+ });
+ };
+ this.removeTabstopMarkers = function(ts) {
+ var session = this.editor.session;
+ ts.forEach(function(range) {
+ session.removeMarker(range.markerId);
+ range.markerId = null;
+ });
+ };
+ this.removeRange = function(range) {
+ var i = range.tabstop.indexOf(range);
+ range.tabstop.splice(i, 1);
+ i = this.ranges.indexOf(range);
+ this.ranges.splice(i, 1);
+ this.editor.session.removeMarker(range.markerId);
+ if (!range.tabstop.length) {
+ i = this.tabstops.indexOf(range.tabstop);
+ if (i != -1)
+ this.tabstops.splice(i, 1);
+ if (!this.tabstops.length)
+ this.detach();
+ }
+ };
+
+ this.keyboardHandler = new HashHandler();
+ this.keyboardHandler.bindKeys({
+ "Tab": function(ed) {
+ if (exports.snippetManager && exports.snippetManager.expandWithTab(ed)) {
+ return;
+ }
+
+ ed.tabstopManager.tabNext(1);
+ },
+ "Shift-Tab": function(ed) {
+ ed.tabstopManager.tabNext(-1);
+ },
+ "Esc": function(ed) {
+ ed.tabstopManager.detach();
+ },
+ "Return": function(ed) {
+ return false;
+ }
+ });
+}).call(TabstopManager.prototype);
+
+
+
+var changeTracker = {};
+changeTracker.onChange = Anchor.prototype.onChange;
+changeTracker.setPosition = function(row, column) {
+ this.pos.row = row;
+ this.pos.column = column;
+};
+changeTracker.update = function(pos, delta, $insertRight) {
+ this.$insertRight = $insertRight;
+ this.pos = pos;
+ this.onChange(delta);
+};
+
+var movePoint = function(point, diff) {
+ if (point.row == 0)
+ point.column += diff.column;
+ point.row += diff.row;
+};
+
+var moveRelative = function(point, start) {
+ if (point.row == start.row)
+ point.column -= start.column;
+ point.row -= start.row;
+};
+
+
+require("./lib/dom").importCssString("\
+.ace_snippet-marker {\
+ -moz-box-sizing: border-box;\
+ box-sizing: border-box;\
+ background: rgba(194, 193, 208, 0.09);\
+ border: 1px dotted rgba(211, 208, 235, 0.62);\
+ position: absolute;\
+}");
+
+exports.snippetManager = new SnippetManager();
+
+
+var Editor = require("./editor").Editor;
+(function() {
+ this.insertSnippet = function(content, options) {
+ return exports.snippetManager.insertSnippet(this, content, options);
+ };
+ this.expandSnippet = function(options) {
+ return exports.snippetManager.expandWithTab(this, options);
+ };
+}).call(Editor.prototype);
+
+});
+
+ace.define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","resources","resources","tabStops","resources","utils","actions","ace/config","ace/config"], function(require, exports, module) {
+"use strict";
+var HashHandler = require("ace/keyboard/hash_handler").HashHandler;
+var Editor = require("ace/editor").Editor;
+var snippetManager = require("ace/snippets").snippetManager;
+var Range = require("ace/range").Range;
+var emmet, emmetPath;
+function AceEmmetEditor() {}
+
+AceEmmetEditor.prototype = {
+ setupContext: function(editor) {
+ this.ace = editor;
+ this.indentation = editor.session.getTabString();
+ if (!emmet)
+ emmet = window.emmet;
+ var resources = emmet.resources || emmet.require("resources");
+ resources.setVariable("indentation", this.indentation);
+ this.$syntax = null;
+ this.$syntax = this.getSyntax();
+ },
+ getSelectionRange: function() {
+ var range = this.ace.getSelectionRange();
+ var doc = this.ace.session.doc;
+ return {
+ start: doc.positionToIndex(range.start),
+ end: doc.positionToIndex(range.end)
+ };
+ },
+ createSelection: function(start, end) {
+ var doc = this.ace.session.doc;
+ this.ace.selection.setRange({
+ start: doc.indexToPosition(start),
+ end: doc.indexToPosition(end)
+ });
+ },
+ getCurrentLineRange: function() {
+ var ace = this.ace;
+ var row = ace.getCursorPosition().row;
+ var lineLength = ace.session.getLine(row).length;
+ var index = ace.session.doc.positionToIndex({row: row, column: 0});
+ return {
+ start: index,
+ end: index + lineLength
+ };
+ },
+ getCaretPos: function(){
+ var pos = this.ace.getCursorPosition();
+ return this.ace.session.doc.positionToIndex(pos);
+ },
+ setCaretPos: function(index){
+ var pos = this.ace.session.doc.indexToPosition(index);
+ this.ace.selection.moveToPosition(pos);
+ },
+ getCurrentLine: function() {
+ var row = this.ace.getCursorPosition().row;
+ return this.ace.session.getLine(row);
+ },
+ replaceContent: function(value, start, end, noIndent) {
+ if (end == null)
+ end = start == null ? this.getContent().length : start;
+ if (start == null)
+ start = 0;
+
+ var editor = this.ace;
+ var doc = editor.session.doc;
+ var range = Range.fromPoints(doc.indexToPosition(start), doc.indexToPosition(end));
+ editor.session.remove(range);
+
+ range.end = range.start;
+
+ value = this.$updateTabstops(value);
+ snippetManager.insertSnippet(editor, value);
+ },
+ getContent: function(){
+ return this.ace.getValue();
+ },
+ getSyntax: function() {
+ if (this.$syntax)
+ return this.$syntax;
+ var syntax = this.ace.session.$modeId.split("/").pop();
+ if (syntax == "html" || syntax == "php") {
+ var cursor = this.ace.getCursorPosition();
+ var state = this.ace.session.getState(cursor.row);
+ if (typeof state != "string")
+ state = state[0];
+ if (state) {
+ state = state.split("-");
+ if (state.length > 1)
+ syntax = state[0];
+ else if (syntax == "php")
+ syntax = "html";
+ }
+ }
+ return syntax;
+ },
+ getProfileName: function() {
+ var resources = emmet.resources || emmet.require("resources");
+ switch (this.getSyntax()) {
+ case "css": return "css";
+ case "xml":
+ case "xsl":
+ return "xml";
+ case "html":
+ var profile = resources.getVariable("profile");
+ if (!profile)
+ profile = this.ace.session.getLines(0,2).join("").search(/<!DOCTYPE[^>]+XHTML/i) != -1 ? "xhtml": "html";
+ return profile;
+ default:
+ var mode = this.ace.session.$mode;
+ return mode.emmetConfig && mode.emmetConfig.profile || "xhtml";
+ }
+ },
+ prompt: function(title) {
+ return prompt(title);
+ },
+ getSelection: function() {
+ return this.ace.session.getTextRange();
+ },
+ getFilePath: function() {
+ return "";
+ },
+ $updateTabstops: function(value) {
+ var base = 1000;
+ var zeroBase = 0;
+ var lastZero = null;
+ var ts = emmet.tabStops || emmet.require('tabStops');
+ var resources = emmet.resources || emmet.require("resources");
+ var settings = resources.getVocabulary("user");
+ var tabstopOptions = {
+ tabstop: function(data) {
+ var group = parseInt(data.group, 10);
+ var isZero = group === 0;
+ if (isZero)
+ group = ++zeroBase;
+ else
+ group += base;
+
+ var placeholder = data.placeholder;
+ if (placeholder) {
+ placeholder = ts.processText(placeholder, tabstopOptions);
+ }
+
+ var result = '${' + group + (placeholder ? ':' + placeholder : '') + '}';
+
+ if (isZero) {
+ lastZero = [data.start, result];
+ }
+
+ return result;
+ },
+ escape: function(ch) {
+ if (ch == '$') return '\\$';
+ if (ch == '\\') return '\\\\';
+ return ch;
+ }
+ };
+
+ value = ts.processText(value, tabstopOptions);
+
+ if (settings.variables['insert_final_tabstop'] && !/\$\{0\}$/.test(value)) {
+ value += '${0}';
+ } else if (lastZero) {
+ var common = emmet.utils ? emmet.utils.common : emmet.require('utils');
+ value = common.replaceSubstring(value, '${0}', lastZero[0], lastZero[1]);
+ }
+
+ return value;
+ }
+};
+
+
+var keymap = {
+ expand_abbreviation: {"mac": "ctrl+alt+e", "win": "alt+e"},
+ match_pair_outward: {"mac": "ctrl+d", "win": "ctrl+,"},
+ match_pair_inward: {"mac": "ctrl+j", "win": "ctrl+shift+0"},
+ matching_pair: {"mac": "ctrl+alt+j", "win": "alt+j"},
+ next_edit_point: "alt+right",
+ prev_edit_point: "alt+left",
+ toggle_comment: {"mac": "command+/", "win": "ctrl+/"},
+ split_join_tag: {"mac": "shift+command+'", "win": "shift+ctrl+`"},
+ remove_tag: {"mac": "command+'", "win": "shift+ctrl+;"},
+ evaluate_math_expression: {"mac": "shift+command+y", "win": "shift+ctrl+y"},
+ increment_number_by_1: "ctrl+up",
+ decrement_number_by_1: "ctrl+down",
+ increment_number_by_01: "alt+up",
+ decrement_number_by_01: "alt+down",
+ increment_number_by_10: {"mac": "alt+command+up", "win": "shift+alt+up"},
+ decrement_number_by_10: {"mac": "alt+command+down", "win": "shift+alt+down"},
+ select_next_item: {"mac": "shift+command+.", "win": "shift+ctrl+."},
+ select_previous_item: {"mac": "shift+command+,", "win": "shift+ctrl+,"},
+ reflect_css_value: {"mac": "shift+command+r", "win": "shift+ctrl+r"},
+
+ encode_decode_data_url: {"mac": "shift+ctrl+d", "win": "ctrl+'"},
+ expand_abbreviation_with_tab: "Tab",
+ wrap_with_abbreviation: {"mac": "shift+ctrl+a", "win": "shift+ctrl+a"}
+};
+
+var editorProxy = new AceEmmetEditor();
+exports.commands = new HashHandler();
+exports.runEmmetCommand = function runEmmetCommand(editor) {
+ try {
+ editorProxy.setupContext(editor);
+ var actions = emmet.actions || emmet.require("actions");
+
+ if (this.action == "expand_abbreviation_with_tab") {
+ if (!editor.selection.isEmpty())
+ return false;
+ var pos = editor.selection.lead;
+ var token = editor.session.getTokenAt(pos.row, pos.column);
+ if (token && /\btag\b/.test(token.type))
+ return false;
+ }
+
+ if (this.action == "wrap_with_abbreviation") {
+ return setTimeout(function() {
+ actions.run("wrap_with_abbreviation", editorProxy);
+ }, 0);
+ }
+
+ var result = actions.run(this.action, editorProxy);
+ } catch(e) {
+ if (!emmet) {
+ load(runEmmetCommand.bind(this, editor));
+ return true;
+ }
+ editor._signal("changeStatus", typeof e == "string" ? e : e.message);
+ console.log(e);
+ result = false;
+ }
+ return result;
+};
+
+for (var command in keymap) {
+ exports.commands.addCommand({
+ name: "emmet:" + command,
+ action: command,
+ bindKey: keymap[command],
+ exec: exports.runEmmetCommand,
+ multiSelectAction: "forEach"
+ });
+}
+
+exports.updateCommands = function(editor, enabled) {
+ if (enabled) {
+ editor.keyBinding.addKeyboardHandler(exports.commands);
+ } else {
+ editor.keyBinding.removeKeyboardHandler(exports.commands);
+ }
+};
+
+exports.isSupportedMode = function(mode) {
+ if (!mode) return false;
+ if (mode.emmetConfig) return true;
+ var id = mode.$id || mode;
+ return /css|less|scss|sass|stylus|html|php|twig|ejs|handlebars/.test(id);
+};
+
+exports.isAvailable = function(editor, command) {
+ if (/(evaluate_math_expression|expand_abbreviation)$/.test(command))
+ return true;
+ var mode = editor.session.$mode;
+ var isSupported = exports.isSupportedMode(mode);
+ if (isSupported && mode.$modes) {
+ try {
+ editorProxy.setupContext(editor);
+ if (/js|php/.test(editorProxy.getSyntax()))
+ isSupported = false;
+ } catch(e) {}
+ }
+ return isSupported;
+}
+
+var onChangeMode = function(e, target) {
+ var editor = target;
+ if (!editor)
+ return;
+ var enabled = exports.isSupportedMode(editor.session.$mode);
+ if (e.enableEmmet === false)
+ enabled = false;
+ if (enabled)
+ load();
+ exports.updateCommands(editor, enabled);
+};
+
+var load = function(cb) {
+ if (typeof emmetPath == "string") {
+ require("ace/config").loadModule(emmetPath, function() {
+ emmetPath = null;
+ cb && cb();
+ });
+ }
+};
+
+exports.AceEmmetEditor = AceEmmetEditor;
+require("ace/config").defineOptions(Editor.prototype, "editor", {
+ enableEmmet: {
+ set: function(val) {
+ this[val ? "on" : "removeListener"]("changeMode", onChangeMode);
+ onChangeMode({enableEmmet: !!val}, this);
+ },
+ value: true
+ }
+});
+
+exports.setCore = function(e) {
+ if (typeof e == "string")
+ emmetPath = e;
+ else
+ emmet = e;
+};
+});
+ (function() {
+ ace.require(["ace/ext/emmet"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ext-error_marker.js b/www/wiki/extensions/CodeEditor/modules/ace/ext-error_marker.js
new file mode 100644
index 00000000..d4c9eb91
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ext-error_marker.js
@@ -0,0 +1,6 @@
+
+;
+ (function() {
+ ace.require(["ace/ext/error_marker"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ext-keybinding_menu.js b/www/wiki/extensions/CodeEditor/modules/ace/ext-keybinding_menu.js
new file mode 100644
index 00000000..ede7d8db
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ext-keybinding_menu.js
@@ -0,0 +1,170 @@
+ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+'use strict';
+var dom = require("../../lib/dom");
+var cssText = "#ace_settingsmenu, #kbshortcutmenu {\
+background-color: #F7F7F7;\
+color: black;\
+box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\
+padding: 1em 0.5em 2em 1em;\
+overflow: auto;\
+position: absolute;\
+margin: 0;\
+bottom: 0;\
+right: 0;\
+top: 0;\
+z-index: 9991;\
+cursor: default;\
+}\
+.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\
+box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\
+background-color: rgba(255, 255, 255, 0.6);\
+color: black;\
+}\
+.ace_optionsMenuEntry:hover {\
+background-color: rgba(100, 100, 100, 0.1);\
+-webkit-transition: all 0.5s;\
+transition: all 0.3s\
+}\
+.ace_closeButton {\
+background: rgba(245, 146, 146, 0.5);\
+border: 1px solid #F48A8A;\
+border-radius: 50%;\
+padding: 7px;\
+position: absolute;\
+right: -8px;\
+top: -8px;\
+z-index: 1000;\
+}\
+.ace_closeButton{\
+background: rgba(245, 146, 146, 0.9);\
+}\
+.ace_optionsMenuKey {\
+color: darkslateblue;\
+font-weight: bold;\
+}\
+.ace_optionsMenuCommand {\
+color: darkcyan;\
+font-weight: normal;\
+}";
+dom.importCssString(cssText);
+module.exports.overlayPage = function overlayPage(editor, contentElement, top, right, bottom, left) {
+ top = top ? 'top: ' + top + ';' : '';
+ bottom = bottom ? 'bottom: ' + bottom + ';' : '';
+ right = right ? 'right: ' + right + ';' : '';
+ left = left ? 'left: ' + left + ';' : '';
+
+ var closer = document.createElement('div');
+ var contentContainer = document.createElement('div');
+
+ function documentEscListener(e) {
+ if (e.keyCode === 27) {
+ closer.click();
+ }
+ }
+
+ closer.style.cssText = 'margin: 0; padding: 0; ' +
+ 'position: fixed; top:0; bottom:0; left:0; right:0;' +
+ 'z-index: 9990; ' +
+ 'background-color: rgba(0, 0, 0, 0.3);';
+ closer.addEventListener('click', function() {
+ document.removeEventListener('keydown', documentEscListener);
+ closer.parentNode.removeChild(closer);
+ editor.focus();
+ closer = null;
+ });
+ document.addEventListener('keydown', documentEscListener);
+
+ contentContainer.style.cssText = top + right + bottom + left;
+ contentContainer.addEventListener('click', function(e) {
+ e.stopPropagation();
+ });
+
+ var wrapper = dom.createElement("div");
+ wrapper.style.position = "relative";
+
+ var closeButton = dom.createElement("div");
+ closeButton.className = "ace_closeButton";
+ closeButton.addEventListener('click', function() {
+ closer.click();
+ });
+
+ wrapper.appendChild(closeButton);
+ contentContainer.appendChild(wrapper);
+
+ contentContainer.appendChild(contentElement);
+ closer.appendChild(contentContainer);
+ document.body.appendChild(closer);
+ editor.blur();
+};
+
+});
+
+ace.define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"], function(require, exports, module) {
+"use strict";
+var keys = require("../../lib/keys");
+module.exports.getEditorKeybordShortcuts = function(editor) {
+ var KEY_MODS = keys.KEY_MODS;
+ var keybindings = [];
+ var commandMap = {};
+ editor.keyBinding.$handlers.forEach(function(handler) {
+ var ckb = handler.commandKeyBinding;
+ for (var i in ckb) {
+ var key = i.replace(/(^|-)\w/g, function(x) { return x.toUpperCase(); });
+ var commands = ckb[i];
+ if (!Array.isArray(commands))
+ commands = [commands];
+ commands.forEach(function(command) {
+ if (typeof command != "string")
+ command = command.name
+ if (commandMap[command]) {
+ commandMap[command].key += "|" + key;
+ } else {
+ commandMap[command] = {key: key, command: command};
+ keybindings.push(commandMap[command]);
+ }
+ });
+ }
+ });
+ return keybindings;
+};
+
+});
+
+ace.define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"], function(require, exports, module) {
+ "use strict";
+ var Editor = require("ace/editor").Editor;
+ function showKeyboardShortcuts (editor) {
+ if(!document.getElementById('kbshortcutmenu')) {
+ var overlayPage = require('./menu_tools/overlay_page').overlayPage;
+ var getEditorKeybordShortcuts = require('./menu_tools/get_editor_keyboard_shortcuts').getEditorKeybordShortcuts;
+ var kb = getEditorKeybordShortcuts(editor);
+ var el = document.createElement('div');
+ var commands = kb.reduce(function(previous, current) {
+ return previous + '<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">'
+ + current.command + '</span> : '
+ + '<span class="ace_optionsMenuKey">' + current.key + '</span></div>';
+ }, '');
+
+ el.id = 'kbshortcutmenu';
+ el.innerHTML = '<h1>Keyboard Shortcuts</h1>' + commands + '</div>';
+ overlayPage(editor, el, '0', '0', '0', null);
+ }
+ }
+ module.exports.init = function(editor) {
+ Editor.prototype.showKeyboardShortcuts = function() {
+ showKeyboardShortcuts(this);
+ };
+ editor.commands.addCommands([{
+ name: "showKeyboardShortcuts",
+ bindKey: {win: "Ctrl-Alt-h", mac: "Command-Alt-h"},
+ exec: function(editor, line) {
+ editor.showKeyboardShortcuts();
+ }
+ }]);
+ };
+
+});
+ (function() {
+ ace.require(["ace/ext/keybinding_menu"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ext-language_tools.js b/www/wiki/extensions/CodeEditor/modules/ace/ext-language_tools.js
new file mode 100644
index 00000000..13366951
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ext-language_tools.js
@@ -0,0 +1,1956 @@
+ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"], function(require, exports, module) {
+"use strict";
+var oop = require("./lib/oop");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var lang = require("./lib/lang");
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+var HashHandler = require("./keyboard/hash_handler").HashHandler;
+var Tokenizer = require("./tokenizer").Tokenizer;
+var comparePoints = Range.comparePoints;
+
+var SnippetManager = function() {
+ this.snippetMap = {};
+ this.snippetNameMap = {};
+};
+
+(function() {
+ oop.implement(this, EventEmitter);
+
+ this.getTokenizer = function() {
+ function TabstopToken(str, _, stack) {
+ str = str.substr(1);
+ if (/^\d+$/.test(str) && !stack.inFormatString)
+ return [{tabstopId: parseInt(str, 10)}];
+ return [{text: str}];
+ }
+ function escape(ch) {
+ return "(?:[^\\\\" + ch + "]|\\\\.)";
+ }
+ SnippetManager.$tokenizer = new Tokenizer({
+ start: [
+ {regex: /:/, onMatch: function(val, state, stack) {
+ if (stack.length && stack[0].expectIf) {
+ stack[0].expectIf = false;
+ stack[0].elseBranch = stack[0];
+ return [stack[0]];
+ }
+ return ":";
+ }},
+ {regex: /\\./, onMatch: function(val, state, stack) {
+ var ch = val[1];
+ if (ch == "}" && stack.length) {
+ val = ch;
+ }else if ("`$\\".indexOf(ch) != -1) {
+ val = ch;
+ } else if (stack.inFormatString) {
+ if (ch == "n")
+ val = "\n";
+ else if (ch == "t")
+ val = "\n";
+ else if ("ulULE".indexOf(ch) != -1) {
+ val = {changeCase: ch, local: ch > "a"};
+ }
+ }
+
+ return [val];
+ }},
+ {regex: /}/, onMatch: function(val, state, stack) {
+ return [stack.length ? stack.shift() : val];
+ }},
+ {regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken},
+ {regex: /\$\{[\dA-Z_a-z]+/, onMatch: function(str, state, stack) {
+ var t = TabstopToken(str.substr(1), state, stack);
+ stack.unshift(t[0]);
+ return t;
+ }, next: "snippetVar"},
+ {regex: /\n/, token: "newline", merge: false}
+ ],
+ snippetVar: [
+ {regex: "\\|" + escape("\\|") + "*\\|", onMatch: function(val, state, stack) {
+ stack[0].choices = val.slice(1, -1).split(",");
+ }, next: "start"},
+ {regex: "/(" + escape("/") + "+)/(?:(" + escape("/") + "*)/)(\\w*):?",
+ onMatch: function(val, state, stack) {
+ var ts = stack[0];
+ ts.fmtString = val;
+
+ val = this.splitRegex.exec(val);
+ ts.guard = val[1];
+ ts.fmt = val[2];
+ ts.flag = val[3];
+ return "";
+ }, next: "start"},
+ {regex: "`" + escape("`") + "*`", onMatch: function(val, state, stack) {
+ stack[0].code = val.splice(1, -1);
+ return "";
+ }, next: "start"},
+ {regex: "\\?", onMatch: function(val, state, stack) {
+ if (stack[0])
+ stack[0].expectIf = true;
+ }, next: "start"},
+ {regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start"}
+ ],
+ formatString: [
+ {regex: "/(" + escape("/") + "+)/", token: "regex"},
+ {regex: "", onMatch: function(val, state, stack) {
+ stack.inFormatString = true;
+ }, next: "start"}
+ ]
+ });
+ SnippetManager.prototype.getTokenizer = function() {
+ return SnippetManager.$tokenizer;
+ };
+ return SnippetManager.$tokenizer;
+ };
+
+ this.tokenizeTmSnippet = function(str, startState) {
+ return this.getTokenizer().getLineTokens(str, startState).tokens.map(function(x) {
+ return x.value || x;
+ });
+ };
+
+ this.$getDefaultValue = function(editor, name) {
+ if (/^[A-Z]\d+$/.test(name)) {
+ var i = name.substr(1);
+ return (this.variables[name[0] + "__"] || {})[i];
+ }
+ if (/^\d+$/.test(name)) {
+ return (this.variables.__ || {})[name];
+ }
+ name = name.replace(/^TM_/, "");
+
+ if (!editor)
+ return;
+ var s = editor.session;
+ switch(name) {
+ case "CURRENT_WORD":
+ var r = s.getWordRange();
+ case "SELECTION":
+ case "SELECTED_TEXT":
+ return s.getTextRange(r);
+ case "CURRENT_LINE":
+ return s.getLine(editor.getCursorPosition().row);
+ case "PREV_LINE": // not possible in textmate
+ return s.getLine(editor.getCursorPosition().row - 1);
+ case "LINE_INDEX":
+ return editor.getCursorPosition().column;
+ case "LINE_NUMBER":
+ return editor.getCursorPosition().row + 1;
+ case "SOFT_TABS":
+ return s.getUseSoftTabs() ? "YES" : "NO";
+ case "TAB_SIZE":
+ return s.getTabSize();
+ case "FILENAME":
+ case "FILEPATH":
+ return "";
+ case "FULLNAME":
+ return "Ace";
+ }
+ };
+ this.variables = {};
+ this.getVariableValue = function(editor, varName) {
+ if (this.variables.hasOwnProperty(varName))
+ return this.variables[varName](editor, varName) || "";
+ return this.$getDefaultValue(editor, varName) || "";
+ };
+ this.tmStrFormat = function(str, ch, editor) {
+ var flag = ch.flag || "";
+ var re = ch.guard;
+ re = new RegExp(re, flag.replace(/[^gi]/, ""));
+ var fmtTokens = this.tokenizeTmSnippet(ch.fmt, "formatString");
+ var _self = this;
+ var formatted = str.replace(re, function() {
+ _self.variables.__ = arguments;
+ var fmtParts = _self.resolveVariables(fmtTokens, editor);
+ var gChangeCase = "E";
+ for (var i = 0; i < fmtParts.length; i++) {
+ var ch = fmtParts[i];
+ if (typeof ch == "object") {
+ fmtParts[i] = "";
+ if (ch.changeCase && ch.local) {
+ var next = fmtParts[i + 1];
+ if (next && typeof next == "string") {
+ if (ch.changeCase == "u")
+ fmtParts[i] = next[0].toUpperCase();
+ else
+ fmtParts[i] = next[0].toLowerCase();
+ fmtParts[i + 1] = next.substr(1);
+ }
+ } else if (ch.changeCase) {
+ gChangeCase = ch.changeCase;
+ }
+ } else if (gChangeCase == "U") {
+ fmtParts[i] = ch.toUpperCase();
+ } else if (gChangeCase == "L") {
+ fmtParts[i] = ch.toLowerCase();
+ }
+ }
+ return fmtParts.join("");
+ });
+ this.variables.__ = null;
+ return formatted;
+ };
+
+ this.resolveVariables = function(snippet, editor) {
+ var result = [];
+ for (var i = 0; i < snippet.length; i++) {
+ var ch = snippet[i];
+ if (typeof ch == "string") {
+ result.push(ch);
+ } else if (typeof ch != "object") {
+ continue;
+ } else if (ch.skip) {
+ gotoNext(ch);
+ } else if (ch.processed < i) {
+ continue;
+ } else if (ch.text) {
+ var value = this.getVariableValue(editor, ch.text);
+ if (value && ch.fmtString)
+ value = this.tmStrFormat(value, ch);
+ ch.processed = i;
+ if (ch.expectIf == null) {
+ if (value) {
+ result.push(value);
+ gotoNext(ch);
+ }
+ } else {
+ if (value) {
+ ch.skip = ch.elseBranch;
+ } else
+ gotoNext(ch);
+ }
+ } else if (ch.tabstopId != null) {
+ result.push(ch);
+ } else if (ch.changeCase != null) {
+ result.push(ch);
+ }
+ }
+ function gotoNext(ch) {
+ var i1 = snippet.indexOf(ch, i + 1);
+ if (i1 != -1)
+ i = i1;
+ }
+ return result;
+ };
+
+ this.insertSnippetForSelection = function(editor, snippetText) {
+ var cursor = editor.getCursorPosition();
+ var line = editor.session.getLine(cursor.row);
+ var tabString = editor.session.getTabString();
+ var indentString = line.match(/^\s*/)[0];
+
+ if (cursor.column < indentString.length)
+ indentString = indentString.slice(0, cursor.column);
+
+ snippetText = snippetText.replace(/\r/g, "");
+ var tokens = this.tokenizeTmSnippet(snippetText);
+ tokens = this.resolveVariables(tokens, editor);
+ tokens = tokens.map(function(x) {
+ if (x == "\n")
+ return x + indentString;
+ if (typeof x == "string")
+ return x.replace(/\t/g, tabString);
+ return x;
+ });
+ var tabstops = [];
+ tokens.forEach(function(p, i) {
+ if (typeof p != "object")
+ return;
+ var id = p.tabstopId;
+ var ts = tabstops[id];
+ if (!ts) {
+ ts = tabstops[id] = [];
+ ts.index = id;
+ ts.value = "";
+ }
+ if (ts.indexOf(p) !== -1)
+ return;
+ ts.push(p);
+ var i1 = tokens.indexOf(p, i + 1);
+ if (i1 === -1)
+ return;
+
+ var value = tokens.slice(i + 1, i1);
+ var isNested = value.some(function(t) {return typeof t === "object"});
+ if (isNested && !ts.value) {
+ ts.value = value;
+ } else if (value.length && (!ts.value || typeof ts.value !== "string")) {
+ ts.value = value.join("");
+ }
+ });
+ tabstops.forEach(function(ts) {ts.length = 0});
+ var expanding = {};
+ function copyValue(val) {
+ var copy = [];
+ for (var i = 0; i < val.length; i++) {
+ var p = val[i];
+ if (typeof p == "object") {
+ if (expanding[p.tabstopId])
+ continue;
+ var j = val.lastIndexOf(p, i - 1);
+ p = copy[j] || {tabstopId: p.tabstopId};
+ }
+ copy[i] = p;
+ }
+ return copy;
+ }
+ for (var i = 0; i < tokens.length; i++) {
+ var p = tokens[i];
+ if (typeof p != "object")
+ continue;
+ var id = p.tabstopId;
+ var i1 = tokens.indexOf(p, i + 1);
+ if (expanding[id]) {
+ if (expanding[id] === p)
+ expanding[id] = null;
+ continue;
+ }
+
+ var ts = tabstops[id];
+ var arg = typeof ts.value == "string" ? [ts.value] : copyValue(ts.value);
+ arg.unshift(i + 1, Math.max(0, i1 - i));
+ arg.push(p);
+ expanding[id] = p;
+ tokens.splice.apply(tokens, arg);
+
+ if (ts.indexOf(p) === -1)
+ ts.push(p);
+ }
+ var row = 0, column = 0;
+ var text = "";
+ tokens.forEach(function(t) {
+ if (typeof t === "string") {
+ var lines = t.split("\n");
+ if (lines.length > 1){
+ column = lines[lines.length - 1].length;
+ row += lines.length - 1;
+ } else
+ column += t.length;
+ text += t;
+ } else {
+ if (!t.start)
+ t.start = {row: row, column: column};
+ else
+ t.end = {row: row, column: column};
+ }
+ });
+ var range = editor.getSelectionRange();
+ var end = editor.session.replace(range, text);
+
+ var tabstopManager = new TabstopManager(editor);
+ var selectionId = editor.inVirtualSelectionMode && editor.selection.index;
+ tabstopManager.addTabstops(tabstops, range.start, end, selectionId);
+ };
+
+ this.insertSnippet = function(editor, snippetText) {
+ var self = this;
+ if (editor.inVirtualSelectionMode)
+ return self.insertSnippetForSelection(editor, snippetText);
+
+ editor.forEachSelection(function() {
+ self.insertSnippetForSelection(editor, snippetText);
+ }, null, {keepOrder: true});
+
+ if (editor.tabstopManager)
+ editor.tabstopManager.tabNext();
+ };
+
+ this.$getScope = function(editor) {
+ var scope = editor.session.$mode.$id || "";
+ scope = scope.split("/").pop();
+ if (scope === "html" || scope === "php") {
+ if (scope === "php" && !editor.session.$mode.inlinePhp)
+ scope = "html";
+ var c = editor.getCursorPosition();
+ var state = editor.session.getState(c.row);
+ if (typeof state === "object") {
+ state = state[0];
+ }
+ if (state.substring) {
+ if (state.substring(0, 3) == "js-")
+ scope = "javascript";
+ else if (state.substring(0, 4) == "css-")
+ scope = "css";
+ else if (state.substring(0, 4) == "php-")
+ scope = "php";
+ }
+ }
+
+ return scope;
+ };
+
+ this.getActiveScopes = function(editor) {
+ var scope = this.$getScope(editor);
+ var scopes = [scope];
+ var snippetMap = this.snippetMap;
+ if (snippetMap[scope] && snippetMap[scope].includeScopes) {
+ scopes.push.apply(scopes, snippetMap[scope].includeScopes);
+ }
+ scopes.push("_");
+ return scopes;
+ };
+
+ this.expandWithTab = function(editor, options) {
+ var self = this;
+ var result = editor.forEachSelection(function() {
+ return self.expandSnippetForSelection(editor, options);
+ }, null, {keepOrder: true});
+ if (result && editor.tabstopManager)
+ editor.tabstopManager.tabNext();
+ return result;
+ };
+
+ this.expandSnippetForSelection = function(editor, options) {
+ var cursor = editor.getCursorPosition();
+ var line = editor.session.getLine(cursor.row);
+ var before = line.substring(0, cursor.column);
+ var after = line.substr(cursor.column);
+
+ var snippetMap = this.snippetMap;
+ var snippet;
+ this.getActiveScopes(editor).some(function(scope) {
+ var snippets = snippetMap[scope];
+ if (snippets)
+ snippet = this.findMatchingSnippet(snippets, before, after);
+ return !!snippet;
+ }, this);
+ if (!snippet)
+ return false;
+ if (options && options.dryRun)
+ return true;
+ editor.session.doc.removeInLine(cursor.row,
+ cursor.column - snippet.replaceBefore.length,
+ cursor.column + snippet.replaceAfter.length
+ );
+
+ this.variables.M__ = snippet.matchBefore;
+ this.variables.T__ = snippet.matchAfter;
+ this.insertSnippetForSelection(editor, snippet.content);
+
+ this.variables.M__ = this.variables.T__ = null;
+ return true;
+ };
+
+ this.findMatchingSnippet = function(snippetList, before, after) {
+ for (var i = snippetList.length; i--;) {
+ var s = snippetList[i];
+ if (s.startRe && !s.startRe.test(before))
+ continue;
+ if (s.endRe && !s.endRe.test(after))
+ continue;
+ if (!s.startRe && !s.endRe)
+ continue;
+
+ s.matchBefore = s.startRe ? s.startRe.exec(before) : [""];
+ s.matchAfter = s.endRe ? s.endRe.exec(after) : [""];
+ s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : "";
+ s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : "";
+ return s;
+ }
+ };
+
+ this.snippetMap = {};
+ this.snippetNameMap = {};
+ this.register = function(snippets, scope) {
+ var snippetMap = this.snippetMap;
+ var snippetNameMap = this.snippetNameMap;
+ var self = this;
+
+ if (!snippets)
+ snippets = [];
+
+ function wrapRegexp(src) {
+ if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src))
+ src = "(?:" + src + ")";
+
+ return src || "";
+ }
+ function guardedRegexp(re, guard, opening) {
+ re = wrapRegexp(re);
+ guard = wrapRegexp(guard);
+ if (opening) {
+ re = guard + re;
+ if (re && re[re.length - 1] != "$")
+ re = re + "$";
+ } else {
+ re = re + guard;
+ if (re && re[0] != "^")
+ re = "^" + re;
+ }
+ return new RegExp(re);
+ }
+
+ function addSnippet(s) {
+ if (!s.scope)
+ s.scope = scope || "_";
+ scope = s.scope;
+ if (!snippetMap[scope]) {
+ snippetMap[scope] = [];
+ snippetNameMap[scope] = {};
+ }
+
+ var map = snippetNameMap[scope];
+ if (s.name) {
+ var old = map[s.name];
+ if (old)
+ self.unregister(old);
+ map[s.name] = s;
+ }
+ snippetMap[scope].push(s);
+
+ if (s.tabTrigger && !s.trigger) {
+ if (!s.guard && /^\w/.test(s.tabTrigger))
+ s.guard = "\\b";
+ s.trigger = lang.escapeRegExp(s.tabTrigger);
+ }
+
+ if (!s.trigger && !s.guard && !s.endTrigger && !s.endGuard)
+ return;
+
+ s.startRe = guardedRegexp(s.trigger, s.guard, true);
+ s.triggerRe = new RegExp(s.trigger, "", true);
+
+ s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true);
+ s.endTriggerRe = new RegExp(s.endTrigger, "", true);
+ }
+
+ if (snippets && snippets.content)
+ addSnippet(snippets);
+ else if (Array.isArray(snippets))
+ snippets.forEach(addSnippet);
+
+ this._signal("registerSnippets", {scope: scope});
+ };
+ this.unregister = function(snippets, scope) {
+ var snippetMap = this.snippetMap;
+ var snippetNameMap = this.snippetNameMap;
+
+ function removeSnippet(s) {
+ var nameMap = snippetNameMap[s.scope||scope];
+ if (nameMap && nameMap[s.name]) {
+ delete nameMap[s.name];
+ var map = snippetMap[s.scope||scope];
+ var i = map && map.indexOf(s);
+ if (i >= 0)
+ map.splice(i, 1);
+ }
+ }
+ if (snippets.content)
+ removeSnippet(snippets);
+ else if (Array.isArray(snippets))
+ snippets.forEach(removeSnippet);
+ };
+ this.parseSnippetFile = function(str) {
+ str = str.replace(/\r/g, "");
+ var list = [], snippet = {};
+ var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;
+ var m;
+ while (m = re.exec(str)) {
+ if (m[1]) {
+ try {
+ snippet = JSON.parse(m[1]);
+ list.push(snippet);
+ } catch (e) {}
+ } if (m[4]) {
+ snippet.content = m[4].replace(/^\t/gm, "");
+ list.push(snippet);
+ snippet = {};
+ } else {
+ var key = m[2], val = m[3];
+ if (key == "regex") {
+ var guardRe = /\/((?:[^\/\\]|\\.)*)|$/g;
+ snippet.guard = guardRe.exec(val)[1];
+ snippet.trigger = guardRe.exec(val)[1];
+ snippet.endTrigger = guardRe.exec(val)[1];
+ snippet.endGuard = guardRe.exec(val)[1];
+ } else if (key == "snippet") {
+ snippet.tabTrigger = val.match(/^\S*/)[0];
+ if (!snippet.name)
+ snippet.name = val;
+ } else {
+ snippet[key] = val;
+ }
+ }
+ }
+ return list;
+ };
+ this.getSnippetByName = function(name, editor) {
+ var snippetMap = this.snippetNameMap;
+ var snippet;
+ this.getActiveScopes(editor).some(function(scope) {
+ var snippets = snippetMap[scope];
+ if (snippets)
+ snippet = snippets[name];
+ return !!snippet;
+ }, this);
+ return snippet;
+ };
+
+}).call(SnippetManager.prototype);
+
+
+var TabstopManager = function(editor) {
+ if (editor.tabstopManager)
+ return editor.tabstopManager;
+ editor.tabstopManager = this;
+ this.$onChange = this.onChange.bind(this);
+ this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule;
+ this.$onChangeSession = this.onChangeSession.bind(this);
+ this.$onAfterExec = this.onAfterExec.bind(this);
+ this.attach(editor);
+};
+(function() {
+ this.attach = function(editor) {
+ this.index = 0;
+ this.ranges = [];
+ this.tabstops = [];
+ this.$openTabstops = null;
+ this.selectedTabstop = null;
+
+ this.editor = editor;
+ this.editor.on("change", this.$onChange);
+ this.editor.on("changeSelection", this.$onChangeSelection);
+ this.editor.on("changeSession", this.$onChangeSession);
+ this.editor.commands.on("afterExec", this.$onAfterExec);
+ this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
+ };
+ this.detach = function() {
+ this.tabstops.forEach(this.removeTabstopMarkers, this);
+ this.ranges = null;
+ this.tabstops = null;
+ this.selectedTabstop = null;
+ this.editor.removeListener("change", this.$onChange);
+ this.editor.removeListener("changeSelection", this.$onChangeSelection);
+ this.editor.removeListener("changeSession", this.$onChangeSession);
+ this.editor.commands.removeListener("afterExec", this.$onAfterExec);
+ this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
+ this.editor.tabstopManager = null;
+ this.editor = null;
+ };
+
+ this.onChange = function(delta) {
+ var changeRange = delta;
+ var isRemove = delta.action[0] == "r";
+ var start = delta.start;
+ var end = delta.end;
+ var startRow = start.row;
+ var endRow = end.row;
+ var lineDif = endRow - startRow;
+ var colDiff = end.column - start.column;
+
+ if (isRemove) {
+ lineDif = -lineDif;
+ colDiff = -colDiff;
+ }
+ if (!this.$inChange && isRemove) {
+ var ts = this.selectedTabstop;
+ var changedOutside = ts && !ts.some(function(r) {
+ return comparePoints(r.start, start) <= 0 && comparePoints(r.end, end) >= 0;
+ });
+ if (changedOutside)
+ return this.detach();
+ }
+ var ranges = this.ranges;
+ for (var i = 0; i < ranges.length; i++) {
+ var r = ranges[i];
+ if (r.end.row < start.row)
+ continue;
+
+ if (isRemove && comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) {
+ this.removeRange(r);
+ i--;
+ continue;
+ }
+
+ if (r.start.row == startRow && r.start.column > start.column)
+ r.start.column += colDiff;
+ if (r.end.row == startRow && r.end.column >= start.column)
+ r.end.column += colDiff;
+ if (r.start.row >= startRow)
+ r.start.row += lineDif;
+ if (r.end.row >= startRow)
+ r.end.row += lineDif;
+
+ if (comparePoints(r.start, r.end) > 0)
+ this.removeRange(r);
+ }
+ if (!ranges.length)
+ this.detach();
+ };
+ this.updateLinkedFields = function() {
+ var ts = this.selectedTabstop;
+ if (!ts || !ts.hasLinkedRanges)
+ return;
+ this.$inChange = true;
+ var session = this.editor.session;
+ var text = session.getTextRange(ts.firstNonLinked);
+ for (var i = ts.length; i--;) {
+ var range = ts[i];
+ if (!range.linked)
+ continue;
+ var fmt = exports.snippetManager.tmStrFormat(text, range.original);
+ session.replace(range, fmt);
+ }
+ this.$inChange = false;
+ };
+ this.onAfterExec = function(e) {
+ if (e.command && !e.command.readOnly)
+ this.updateLinkedFields();
+ };
+ this.onChangeSelection = function() {
+ if (!this.editor)
+ return;
+ var lead = this.editor.selection.lead;
+ var anchor = this.editor.selection.anchor;
+ var isEmpty = this.editor.selection.isEmpty();
+ for (var i = this.ranges.length; i--;) {
+ if (this.ranges[i].linked)
+ continue;
+ var containsLead = this.ranges[i].contains(lead.row, lead.column);
+ var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column);
+ if (containsLead && containsAnchor)
+ return;
+ }
+ this.detach();
+ };
+ this.onChangeSession = function() {
+ this.detach();
+ };
+ this.tabNext = function(dir) {
+ var max = this.tabstops.length;
+ var index = this.index + (dir || 1);
+ index = Math.min(Math.max(index, 1), max);
+ if (index == max)
+ index = 0;
+ this.selectTabstop(index);
+ if (index === 0)
+ this.detach();
+ };
+ this.selectTabstop = function(index) {
+ this.$openTabstops = null;
+ var ts = this.tabstops[this.index];
+ if (ts)
+ this.addTabstopMarkers(ts);
+ this.index = index;
+ ts = this.tabstops[this.index];
+ if (!ts || !ts.length)
+ return;
+
+ this.selectedTabstop = ts;
+ if (!this.editor.inVirtualSelectionMode) {
+ var sel = this.editor.multiSelect;
+ sel.toSingleRange(ts.firstNonLinked.clone());
+ for (var i = ts.length; i--;) {
+ if (ts.hasLinkedRanges && ts[i].linked)
+ continue;
+ sel.addRange(ts[i].clone(), true);
+ }
+ if (sel.ranges[0])
+ sel.addRange(sel.ranges[0].clone());
+ } else {
+ this.editor.selection.setRange(ts.firstNonLinked);
+ }
+
+ this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
+ };
+ this.addTabstops = function(tabstops, start, end) {
+ if (!this.$openTabstops)
+ this.$openTabstops = [];
+ if (!tabstops[0]) {
+ var p = Range.fromPoints(end, end);
+ moveRelative(p.start, start);
+ moveRelative(p.end, start);
+ tabstops[0] = [p];
+ tabstops[0].index = 0;
+ }
+
+ var i = this.index;
+ var arg = [i + 1, 0];
+ var ranges = this.ranges;
+ tabstops.forEach(function(ts, index) {
+ var dest = this.$openTabstops[index] || ts;
+
+ for (var i = ts.length; i--;) {
+ var p = ts[i];
+ var range = Range.fromPoints(p.start, p.end || p.start);
+ movePoint(range.start, start);
+ movePoint(range.end, start);
+ range.original = p;
+ range.tabstop = dest;
+ ranges.push(range);
+ if (dest != ts)
+ dest.unshift(range);
+ else
+ dest[i] = range;
+ if (p.fmtString) {
+ range.linked = true;
+ dest.hasLinkedRanges = true;
+ } else if (!dest.firstNonLinked)
+ dest.firstNonLinked = range;
+ }
+ if (!dest.firstNonLinked)
+ dest.hasLinkedRanges = false;
+ if (dest === ts) {
+ arg.push(dest);
+ this.$openTabstops[index] = dest;
+ }
+ this.addTabstopMarkers(dest);
+ }, this);
+
+ if (arg.length > 2) {
+ if (this.tabstops.length)
+ arg.push(arg.splice(2, 1)[0]);
+ this.tabstops.splice.apply(this.tabstops, arg);
+ }
+ };
+
+ this.addTabstopMarkers = function(ts) {
+ var session = this.editor.session;
+ ts.forEach(function(range) {
+ if (!range.markerId)
+ range.markerId = session.addMarker(range, "ace_snippet-marker", "text");
+ });
+ };
+ this.removeTabstopMarkers = function(ts) {
+ var session = this.editor.session;
+ ts.forEach(function(range) {
+ session.removeMarker(range.markerId);
+ range.markerId = null;
+ });
+ };
+ this.removeRange = function(range) {
+ var i = range.tabstop.indexOf(range);
+ range.tabstop.splice(i, 1);
+ i = this.ranges.indexOf(range);
+ this.ranges.splice(i, 1);
+ this.editor.session.removeMarker(range.markerId);
+ if (!range.tabstop.length) {
+ i = this.tabstops.indexOf(range.tabstop);
+ if (i != -1)
+ this.tabstops.splice(i, 1);
+ if (!this.tabstops.length)
+ this.detach();
+ }
+ };
+
+ this.keyboardHandler = new HashHandler();
+ this.keyboardHandler.bindKeys({
+ "Tab": function(ed) {
+ if (exports.snippetManager && exports.snippetManager.expandWithTab(ed)) {
+ return;
+ }
+
+ ed.tabstopManager.tabNext(1);
+ },
+ "Shift-Tab": function(ed) {
+ ed.tabstopManager.tabNext(-1);
+ },
+ "Esc": function(ed) {
+ ed.tabstopManager.detach();
+ },
+ "Return": function(ed) {
+ return false;
+ }
+ });
+}).call(TabstopManager.prototype);
+
+
+
+var changeTracker = {};
+changeTracker.onChange = Anchor.prototype.onChange;
+changeTracker.setPosition = function(row, column) {
+ this.pos.row = row;
+ this.pos.column = column;
+};
+changeTracker.update = function(pos, delta, $insertRight) {
+ this.$insertRight = $insertRight;
+ this.pos = pos;
+ this.onChange(delta);
+};
+
+var movePoint = function(point, diff) {
+ if (point.row == 0)
+ point.column += diff.column;
+ point.row += diff.row;
+};
+
+var moveRelative = function(point, start) {
+ if (point.row == start.row)
+ point.column -= start.column;
+ point.row -= start.row;
+};
+
+
+require("./lib/dom").importCssString("\
+.ace_snippet-marker {\
+ -moz-box-sizing: border-box;\
+ box-sizing: border-box;\
+ background: rgba(194, 193, 208, 0.09);\
+ border: 1px dotted rgba(211, 208, 235, 0.62);\
+ position: absolute;\
+}");
+
+exports.snippetManager = new SnippetManager();
+
+
+var Editor = require("./editor").Editor;
+(function() {
+ this.insertSnippet = function(content, options) {
+ return exports.snippetManager.insertSnippet(this, content, options);
+ };
+ this.expandSnippet = function(options) {
+ return exports.snippetManager.expandWithTab(this, options);
+ };
+}).call(Editor.prototype);
+
+});
+
+ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"], function(require, exports, module) {
+"use strict";
+
+var Renderer = require("../virtual_renderer").VirtualRenderer;
+var Editor = require("../editor").Editor;
+var Range = require("../range").Range;
+var event = require("../lib/event");
+var lang = require("../lib/lang");
+var dom = require("../lib/dom");
+
+var $singleLineEditor = function(el) {
+ var renderer = new Renderer(el);
+
+ renderer.$maxLines = 4;
+
+ var editor = new Editor(renderer);
+
+ editor.setHighlightActiveLine(false);
+ editor.setShowPrintMargin(false);
+ editor.renderer.setShowGutter(false);
+ editor.renderer.setHighlightGutterLine(false);
+
+ editor.$mouseHandler.$focusWaitTimout = 0;
+ editor.$highlightTagPending = true;
+
+ return editor;
+};
+
+var AcePopup = function(parentNode) {
+ var el = dom.createElement("div");
+ var popup = new $singleLineEditor(el);
+
+ if (parentNode)
+ parentNode.appendChild(el);
+ el.style.display = "none";
+ popup.renderer.content.style.cursor = "default";
+ popup.renderer.setStyle("ace_autocomplete");
+
+ popup.setOption("displayIndentGuides", false);
+ popup.setOption("dragDelay", 150);
+
+ var noop = function(){};
+
+ popup.focus = noop;
+ popup.$isFocused = true;
+
+ popup.renderer.$cursorLayer.restartTimer = noop;
+ popup.renderer.$cursorLayer.element.style.opacity = 0;
+
+ popup.renderer.$maxLines = 8;
+ popup.renderer.$keepTextAreaAtCursor = false;
+
+ popup.setHighlightActiveLine(false);
+ popup.session.highlight("");
+ popup.session.$searchHighlight.clazz = "ace_highlight-marker";
+
+ popup.on("mousedown", function(e) {
+ var pos = e.getDocumentPosition();
+ popup.selection.moveToPosition(pos);
+ selectionMarker.start.row = selectionMarker.end.row = pos.row;
+ e.stop();
+ });
+
+ var lastMouseEvent;
+ var hoverMarker = new Range(-1,0,-1,Infinity);
+ var selectionMarker = new Range(-1,0,-1,Infinity);
+ selectionMarker.id = popup.session.addMarker(selectionMarker, "ace_active-line", "fullLine");
+ popup.setSelectOnHover = function(val) {
+ if (!val) {
+ hoverMarker.id = popup.session.addMarker(hoverMarker, "ace_line-hover", "fullLine");
+ } else if (hoverMarker.id) {
+ popup.session.removeMarker(hoverMarker.id);
+ hoverMarker.id = null;
+ }
+ };
+ popup.setSelectOnHover(false);
+ popup.on("mousemove", function(e) {
+ if (!lastMouseEvent) {
+ lastMouseEvent = e;
+ return;
+ }
+ if (lastMouseEvent.x == e.x && lastMouseEvent.y == e.y) {
+ return;
+ }
+ lastMouseEvent = e;
+ lastMouseEvent.scrollTop = popup.renderer.scrollTop;
+ var row = lastMouseEvent.getDocumentPosition().row;
+ if (hoverMarker.start.row != row) {
+ if (!hoverMarker.id)
+ popup.setRow(row);
+ setHoverMarker(row);
+ }
+ });
+ popup.renderer.on("beforeRender", function() {
+ if (lastMouseEvent && hoverMarker.start.row != -1) {
+ lastMouseEvent.$pos = null;
+ var row = lastMouseEvent.getDocumentPosition().row;
+ if (!hoverMarker.id)
+ popup.setRow(row);
+ setHoverMarker(row, true);
+ }
+ });
+ popup.renderer.on("afterRender", function() {
+ var row = popup.getRow();
+ var t = popup.renderer.$textLayer;
+ var selected = t.element.childNodes[row - t.config.firstRow];
+ if (selected == t.selectedNode)
+ return;
+ if (t.selectedNode)
+ dom.removeCssClass(t.selectedNode, "ace_selected");
+ t.selectedNode = selected;
+ if (selected)
+ dom.addCssClass(selected, "ace_selected");
+ });
+ var hideHoverMarker = function() { setHoverMarker(-1) };
+ var setHoverMarker = function(row, suppressRedraw) {
+ if (row !== hoverMarker.start.row) {
+ hoverMarker.start.row = hoverMarker.end.row = row;
+ if (!suppressRedraw)
+ popup.session._emit("changeBackMarker");
+ popup._emit("changeHoverMarker");
+ }
+ };
+ popup.getHoveredRow = function() {
+ return hoverMarker.start.row;
+ };
+
+ event.addListener(popup.container, "mouseout", hideHoverMarker);
+ popup.on("hide", hideHoverMarker);
+ popup.on("changeSelection", hideHoverMarker);
+
+ popup.session.doc.getLength = function() {
+ return popup.data.length;
+ };
+ popup.session.doc.getLine = function(i) {
+ var data = popup.data[i];
+ if (typeof data == "string")
+ return data;
+ return (data && data.value) || "";
+ };
+
+ var bgTokenizer = popup.session.bgTokenizer;
+ bgTokenizer.$tokenizeRow = function(row) {
+ var data = popup.data[row];
+ var tokens = [];
+ if (!data)
+ return tokens;
+ if (typeof data == "string")
+ data = {value: data};
+ if (!data.caption)
+ data.caption = data.value || data.name;
+
+ var last = -1;
+ var flag, c;
+ for (var i = 0; i < data.caption.length; i++) {
+ c = data.caption[i];
+ flag = data.matchMask & (1 << i) ? 1 : 0;
+ if (last !== flag) {
+ tokens.push({type: data.className || "" + ( flag ? "completion-highlight" : ""), value: c});
+ last = flag;
+ } else {
+ tokens[tokens.length - 1].value += c;
+ }
+ }
+
+ if (data.meta) {
+ var maxW = popup.renderer.$size.scrollerWidth / popup.renderer.layerConfig.characterWidth;
+ var metaData = data.meta;
+ if (metaData.length + data.caption.length > maxW - 2) {
+ metaData = metaData.substr(0, maxW - data.caption.length - 3) + "\u2026"
+ }
+ tokens.push({type: "rightAlignedText", value: metaData});
+ }
+ return tokens;
+ };
+ bgTokenizer.$updateOnChange = noop;
+ bgTokenizer.start = noop;
+
+ popup.session.$computeWidth = function() {
+ return this.screenWidth = 0;
+ };
+
+ popup.$blockScrolling = Infinity;
+ popup.isOpen = false;
+ popup.isTopdown = false;
+ popup.autoSelect = true;
+
+ popup.data = [];
+ popup.setData = function(list) {
+ popup.setValue(lang.stringRepeat("\n", list.length), -1);
+ popup.data = list || [];
+ popup.setRow(0);
+ };
+ popup.getData = function(row) {
+ return popup.data[row];
+ };
+
+ popup.getRow = function() {
+ return selectionMarker.start.row;
+ };
+ popup.setRow = function(line) {
+ line = Math.max(this.autoSelect ? 0 : -1, Math.min(this.data.length, line));
+ if (selectionMarker.start.row != line) {
+ popup.selection.clearSelection();
+ selectionMarker.start.row = selectionMarker.end.row = line || 0;
+ popup.session._emit("changeBackMarker");
+ popup.moveCursorTo(line || 0, 0);
+ if (popup.isOpen)
+ popup._signal("select");
+ }
+ };
+
+ popup.on("changeSelection", function() {
+ if (popup.isOpen)
+ popup.setRow(popup.selection.lead.row);
+ popup.renderer.scrollCursorIntoView();
+ });
+
+ popup.hide = function() {
+ this.container.style.display = "none";
+ this._signal("hide");
+ popup.isOpen = false;
+ };
+ popup.show = function(pos, lineHeight, topdownOnly) {
+ var el = this.container;
+ var screenHeight = window.innerHeight;
+ var screenWidth = window.innerWidth;
+ var renderer = this.renderer;
+ var maxH = renderer.$maxLines * lineHeight * 1.4;
+ var top = pos.top + this.$borderSize;
+ var allowTopdown = top > screenHeight / 2 && !topdownOnly;
+ if (allowTopdown && top + lineHeight + maxH > screenHeight) {
+ renderer.$maxPixelHeight = top - 2 * this.$borderSize;
+ el.style.top = "";
+ el.style.bottom = screenHeight - top + "px";
+ popup.isTopdown = false;
+ } else {
+ top += lineHeight;
+ renderer.$maxPixelHeight = screenHeight - top - 0.2 * lineHeight;
+ el.style.top = top + "px";
+ el.style.bottom = "";
+ popup.isTopdown = true;
+ }
+
+ el.style.display = "";
+ this.renderer.$textLayer.checkForSizeChanges();
+
+ var left = pos.left;
+ if (left + el.offsetWidth > screenWidth)
+ left = screenWidth - el.offsetWidth;
+
+ el.style.left = left + "px";
+
+ this._signal("show");
+ lastMouseEvent = null;
+ popup.isOpen = true;
+ };
+
+ popup.getTextLeftOffset = function() {
+ return this.$borderSize + this.renderer.$padding + this.$imageSize;
+ };
+
+ popup.$imageSize = 0;
+ popup.$borderSize = 1;
+
+ return popup;
+};
+
+dom.importCssString("\
+.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\
+ background-color: #CAD6FA;\
+ z-index: 1;\
+}\
+.ace_editor.ace_autocomplete .ace_line-hover {\
+ border: 1px solid #abbffe;\
+ margin-top: -1px;\
+ background: rgba(233,233,253,0.4);\
+}\
+.ace_editor.ace_autocomplete .ace_line-hover {\
+ position: absolute;\
+ z-index: 2;\
+}\
+.ace_editor.ace_autocomplete .ace_scroller {\
+ background: none;\
+ border: none;\
+ box-shadow: none;\
+}\
+.ace_rightAlignedText {\
+ color: gray;\
+ display: inline-block;\
+ position: absolute;\
+ right: 4px;\
+ text-align: right;\
+ z-index: -1;\
+}\
+.ace_editor.ace_autocomplete .ace_completion-highlight{\
+ color: #000;\
+ text-shadow: 0 0 0.01em;\
+}\
+.ace_editor.ace_autocomplete {\
+ width: 280px;\
+ z-index: 200000;\
+ background: #fbfbfb;\
+ color: #444;\
+ border: 1px lightgray solid;\
+ position: fixed;\
+ box-shadow: 2px 3px 5px rgba(0,0,0,.2);\
+ line-height: 1.4;\
+}");
+
+exports.AcePopup = AcePopup;
+
+});
+
+ace.define("ace/autocomplete/util",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.parForEach = function(array, fn, callback) {
+ var completed = 0;
+ var arLength = array.length;
+ if (arLength === 0)
+ callback();
+ for (var i = 0; i < arLength; i++) {
+ fn(array[i], function(result, err) {
+ completed++;
+ if (completed === arLength)
+ callback(result, err);
+ });
+ }
+};
+
+var ID_REGEX = /[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/;
+
+exports.retrievePrecedingIdentifier = function(text, pos, regex) {
+ regex = regex || ID_REGEX;
+ var buf = [];
+ for (var i = pos-1; i >= 0; i--) {
+ if (regex.test(text[i]))
+ buf.push(text[i]);
+ else
+ break;
+ }
+ return buf.reverse().join("");
+};
+
+exports.retrieveFollowingIdentifier = function(text, pos, regex) {
+ regex = regex || ID_REGEX;
+ var buf = [];
+ for (var i = pos; i < text.length; i++) {
+ if (regex.test(text[i]))
+ buf.push(text[i]);
+ else
+ break;
+ }
+ return buf;
+};
+
+exports.getCompletionPrefix = function (editor) {
+ var pos = editor.getCursorPosition();
+ var line = editor.session.getLine(pos.row);
+ var prefix;
+ editor.completers.forEach(function(completer) {
+ if (completer.identifierRegexps) {
+ completer.identifierRegexps.forEach(function(identifierRegex) {
+ if (!prefix && identifierRegex)
+ prefix = this.retrievePrecedingIdentifier(line, pos.column, identifierRegex);
+ }.bind(this));
+ }
+ }.bind(this));
+ return prefix || this.retrievePrecedingIdentifier(line, pos.column);
+};
+
+});
+
+ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/snippets"], function(require, exports, module) {
+"use strict";
+
+var HashHandler = require("./keyboard/hash_handler").HashHandler;
+var AcePopup = require("./autocomplete/popup").AcePopup;
+var util = require("./autocomplete/util");
+var event = require("./lib/event");
+var lang = require("./lib/lang");
+var dom = require("./lib/dom");
+var snippetManager = require("./snippets").snippetManager;
+
+var Autocomplete = function() {
+ this.autoInsert = false;
+ this.autoSelect = true;
+ this.exactMatch = false;
+ this.gatherCompletionsId = 0;
+ this.keyboardHandler = new HashHandler();
+ this.keyboardHandler.bindKeys(this.commands);
+
+ this.blurListener = this.blurListener.bind(this);
+ this.changeListener = this.changeListener.bind(this);
+ this.mousedownListener = this.mousedownListener.bind(this);
+ this.mousewheelListener = this.mousewheelListener.bind(this);
+
+ this.changeTimer = lang.delayedCall(function() {
+ this.updateCompletions(true);
+ }.bind(this));
+
+ this.tooltipTimer = lang.delayedCall(this.updateDocTooltip.bind(this), 50);
+};
+
+(function() {
+
+ this.$init = function() {
+ this.popup = new AcePopup(document.body || document.documentElement);
+ this.popup.on("click", function(e) {
+ this.insertMatch();
+ e.stop();
+ }.bind(this));
+ this.popup.focus = this.editor.focus.bind(this.editor);
+ this.popup.on("show", this.tooltipTimer.bind(null, null));
+ this.popup.on("select", this.tooltipTimer.bind(null, null));
+ this.popup.on("changeHoverMarker", this.tooltipTimer.bind(null, null));
+ return this.popup;
+ };
+
+ this.getPopup = function() {
+ return this.popup || this.$init();
+ };
+
+ this.openPopup = function(editor, prefix, keepPopupPosition) {
+ if (!this.popup)
+ this.$init();
+
+ this.popup.autoSelect = this.autoSelect;
+
+ this.popup.setData(this.completions.filtered);
+
+ editor.keyBinding.addKeyboardHandler(this.keyboardHandler);
+
+ var renderer = editor.renderer;
+ this.popup.setRow(this.autoSelect ? 0 : -1);
+ if (!keepPopupPosition) {
+ this.popup.setTheme(editor.getTheme());
+ this.popup.setFontSize(editor.getFontSize());
+
+ var lineHeight = renderer.layerConfig.lineHeight;
+
+ var pos = renderer.$cursorLayer.getPixelPosition(this.base, true);
+ pos.left -= this.popup.getTextLeftOffset();
+
+ var rect = editor.container.getBoundingClientRect();
+ pos.top += rect.top - renderer.layerConfig.offset;
+ pos.left += rect.left - editor.renderer.scrollLeft;
+ pos.left += renderer.gutterWidth;
+
+ this.popup.show(pos, lineHeight);
+ } else if (keepPopupPosition && !prefix) {
+ this.detach();
+ }
+ };
+
+ this.detach = function() {
+ this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler);
+ this.editor.off("changeSelection", this.changeListener);
+ this.editor.off("blur", this.blurListener);
+ this.editor.off("mousedown", this.mousedownListener);
+ this.editor.off("mousewheel", this.mousewheelListener);
+ this.changeTimer.cancel();
+ this.hideDocTooltip();
+
+ this.gatherCompletionsId += 1;
+ if (this.popup && this.popup.isOpen)
+ this.popup.hide();
+
+ if (this.base)
+ this.base.detach();
+ this.activated = false;
+ this.completions = this.base = null;
+ };
+
+ this.changeListener = function(e) {
+ var cursor = this.editor.selection.lead;
+ if (cursor.row != this.base.row || cursor.column < this.base.column) {
+ this.detach();
+ }
+ if (this.activated)
+ this.changeTimer.schedule();
+ else
+ this.detach();
+ };
+
+ this.blurListener = function(e) {
+ var el = document.activeElement;
+ var text = this.editor.textInput.getElement();
+ var fromTooltip = e.relatedTarget && this.tooltipNode && this.tooltipNode.contains(e.relatedTarget);
+ var container = this.popup && this.popup.container;
+ if (el != text && el.parentNode != container && !fromTooltip
+ && el != this.tooltipNode && e.relatedTarget != text
+ ) {
+ this.detach();
+ }
+ };
+
+ this.mousedownListener = function(e) {
+ this.detach();
+ };
+
+ this.mousewheelListener = function(e) {
+ this.detach();
+ };
+
+ this.goTo = function(where) {
+ var row = this.popup.getRow();
+ var max = this.popup.session.getLength() - 1;
+
+ switch(where) {
+ case "up": row = row <= 0 ? max : row - 1; break;
+ case "down": row = row >= max ? -1 : row + 1; break;
+ case "start": row = 0; break;
+ case "end": row = max; break;
+ }
+
+ this.popup.setRow(row);
+ };
+
+ this.insertMatch = function(data, options) {
+ if (!data)
+ data = this.popup.getData(this.popup.getRow());
+ if (!data)
+ return false;
+
+ if (data.completer && data.completer.insertMatch) {
+ data.completer.insertMatch(this.editor, data);
+ } else {
+ if (this.completions.filterText) {
+ var ranges = this.editor.selection.getAllRanges();
+ for (var i = 0, range; range = ranges[i]; i++) {
+ range.start.column -= this.completions.filterText.length;
+ this.editor.session.remove(range);
+ }
+ }
+ if (data.snippet)
+ snippetManager.insertSnippet(this.editor, data.snippet);
+ else
+ this.editor.execCommand("insertstring", data.value || data);
+ }
+ this.detach();
+ };
+
+
+ this.commands = {
+ "Up": function(editor) { editor.completer.goTo("up"); },
+ "Down": function(editor) { editor.completer.goTo("down"); },
+ "Ctrl-Up|Ctrl-Home": function(editor) { editor.completer.goTo("start"); },
+ "Ctrl-Down|Ctrl-End": function(editor) { editor.completer.goTo("end"); },
+
+ "Esc": function(editor) { editor.completer.detach(); },
+ "Return": function(editor) { return editor.completer.insertMatch(); },
+ "Shift-Return": function(editor) { editor.completer.insertMatch(null, {deleteSuffix: true}); },
+ "Tab": function(editor) {
+ var result = editor.completer.insertMatch();
+ if (!result && !editor.tabstopManager)
+ editor.completer.goTo("down");
+ else
+ return result;
+ },
+
+ "PageUp": function(editor) { editor.completer.popup.gotoPageUp(); },
+ "PageDown": function(editor) { editor.completer.popup.gotoPageDown(); }
+ };
+
+ this.gatherCompletions = function(editor, callback) {
+ var session = editor.getSession();
+ var pos = editor.getCursorPosition();
+
+ var prefix = util.getCompletionPrefix(editor);
+
+ this.base = session.doc.createAnchor(pos.row, pos.column - prefix.length);
+ this.base.$insertRight = true;
+
+ var matches = [];
+ var total = editor.completers.length;
+ editor.completers.forEach(function(completer, i) {
+ completer.getCompletions(editor, session, pos, prefix, function(err, results) {
+ if (!err && results)
+ matches = matches.concat(results);
+ callback(null, {
+ prefix: util.getCompletionPrefix(editor),
+ matches: matches,
+ finished: (--total === 0)
+ });
+ });
+ });
+ return true;
+ };
+
+ this.showPopup = function(editor) {
+ if (this.editor)
+ this.detach();
+
+ this.activated = true;
+
+ this.editor = editor;
+ if (editor.completer != this) {
+ if (editor.completer)
+ editor.completer.detach();
+ editor.completer = this;
+ }
+
+ editor.on("changeSelection", this.changeListener);
+ editor.on("blur", this.blurListener);
+ editor.on("mousedown", this.mousedownListener);
+ editor.on("mousewheel", this.mousewheelListener);
+
+ this.updateCompletions();
+ };
+
+ this.updateCompletions = function(keepPopupPosition) {
+ if (keepPopupPosition && this.base && this.completions) {
+ var pos = this.editor.getCursorPosition();
+ var prefix = this.editor.session.getTextRange({start: this.base, end: pos});
+ if (prefix == this.completions.filterText)
+ return;
+ this.completions.setFilter(prefix);
+ if (!this.completions.filtered.length)
+ return this.detach();
+ if (this.completions.filtered.length == 1
+ && this.completions.filtered[0].value == prefix
+ && !this.completions.filtered[0].snippet)
+ return this.detach();
+ this.openPopup(this.editor, prefix, keepPopupPosition);
+ return;
+ }
+ var _id = this.gatherCompletionsId;
+ this.gatherCompletions(this.editor, function(err, results) {
+ var detachIfFinished = function() {
+ if (!results.finished) return;
+ return this.detach();
+ }.bind(this);
+
+ var prefix = results.prefix;
+ var matches = results && results.matches;
+
+ if (!matches || !matches.length)
+ return detachIfFinished();
+ if (prefix.indexOf(results.prefix) !== 0 || _id != this.gatherCompletionsId)
+ return;
+
+ this.completions = new FilteredList(matches);
+
+ if (this.exactMatch)
+ this.completions.exactMatch = true;
+
+ this.completions.setFilter(prefix);
+ var filtered = this.completions.filtered;
+ if (!filtered.length)
+ return detachIfFinished();
+ if (filtered.length == 1 && filtered[0].value == prefix && !filtered[0].snippet)
+ return detachIfFinished();
+ if (this.autoInsert && filtered.length == 1 && results.finished)
+ return this.insertMatch(filtered[0]);
+
+ this.openPopup(this.editor, prefix, keepPopupPosition);
+ }.bind(this));
+ };
+
+ this.cancelContextMenu = function() {
+ this.editor.$mouseHandler.cancelContextMenu();
+ };
+
+ this.updateDocTooltip = function() {
+ var popup = this.popup;
+ var all = popup.data;
+ var selected = all && (all[popup.getHoveredRow()] || all[popup.getRow()]);
+ var doc = null;
+ if (!selected || !this.editor || !this.popup.isOpen)
+ return this.hideDocTooltip();
+ this.editor.completers.some(function(completer) {
+ if (completer.getDocTooltip)
+ doc = completer.getDocTooltip(selected);
+ return doc;
+ });
+ if (!doc)
+ doc = selected;
+
+ if (typeof doc == "string")
+ doc = {docText: doc};
+ if (!doc || !(doc.docHTML || doc.docText))
+ return this.hideDocTooltip();
+ this.showDocTooltip(doc);
+ };
+
+ this.showDocTooltip = function(item) {
+ if (!this.tooltipNode) {
+ this.tooltipNode = dom.createElement("div");
+ this.tooltipNode.className = "ace_tooltip ace_doc-tooltip";
+ this.tooltipNode.style.margin = 0;
+ this.tooltipNode.style.pointerEvents = "auto";
+ this.tooltipNode.tabIndex = -1;
+ this.tooltipNode.onblur = this.blurListener.bind(this);
+ this.tooltipNode.onclick = this.onTooltipClick.bind(this);
+ }
+
+ var tooltipNode = this.tooltipNode;
+ if (item.docHTML) {
+ tooltipNode.innerHTML = item.docHTML;
+ } else if (item.docText) {
+ tooltipNode.textContent = item.docText;
+ }
+
+ if (!tooltipNode.parentNode)
+ document.body.appendChild(tooltipNode);
+ var popup = this.popup;
+ var rect = popup.container.getBoundingClientRect();
+ tooltipNode.style.top = popup.container.style.top;
+ tooltipNode.style.bottom = popup.container.style.bottom;
+
+ if (window.innerWidth - rect.right < 320) {
+ tooltipNode.style.right = window.innerWidth - rect.left + "px";
+ tooltipNode.style.left = "";
+ } else {
+ tooltipNode.style.left = (rect.right + 1) + "px";
+ tooltipNode.style.right = "";
+ }
+ tooltipNode.style.display = "block";
+ };
+
+ this.hideDocTooltip = function() {
+ this.tooltipTimer.cancel();
+ if (!this.tooltipNode) return;
+ var el = this.tooltipNode;
+ if (!this.editor.isFocused() && document.activeElement == el)
+ this.editor.focus();
+ this.tooltipNode = null;
+ if (el.parentNode)
+ el.parentNode.removeChild(el);
+ };
+
+ this.onTooltipClick = function(e) {
+ var a = e.target;
+ while (a && a != this.tooltipNode) {
+ if (a.nodeName == "A" && a.href) {
+ a.rel = "noreferrer";
+ a.target = "_blank";
+ break;
+ }
+ a = a.parentNode;
+ }
+ }
+
+}).call(Autocomplete.prototype);
+
+Autocomplete.startCommand = {
+ name: "startAutocomplete",
+ exec: function(editor) {
+ if (!editor.completer)
+ editor.completer = new Autocomplete();
+ editor.completer.autoInsert = false;
+ editor.completer.autoSelect = true;
+ editor.completer.showPopup(editor);
+ editor.completer.cancelContextMenu();
+ },
+ bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space"
+};
+
+var FilteredList = function(array, filterText) {
+ this.all = array;
+ this.filtered = array;
+ this.filterText = filterText || "";
+ this.exactMatch = false;
+};
+(function(){
+ this.setFilter = function(str) {
+ if (str.length > this.filterText && str.lastIndexOf(this.filterText, 0) === 0)
+ var matches = this.filtered;
+ else
+ var matches = this.all;
+
+ this.filterText = str;
+ matches = this.filterCompletions(matches, this.filterText);
+ matches = matches.sort(function(a, b) {
+ return b.exactMatch - a.exactMatch || b.score - a.score;
+ });
+ var prev = null;
+ matches = matches.filter(function(item){
+ var caption = item.snippet || item.caption || item.value;
+ if (caption === prev) return false;
+ prev = caption;
+ return true;
+ });
+
+ this.filtered = matches;
+ };
+ this.filterCompletions = function(items, needle) {
+ var results = [];
+ var upper = needle.toUpperCase();
+ var lower = needle.toLowerCase();
+ loop: for (var i = 0, item; item = items[i]; i++) {
+ var caption = item.value || item.caption || item.snippet;
+ if (!caption) continue;
+ var lastIndex = -1;
+ var matchMask = 0;
+ var penalty = 0;
+ var index, distance;
+
+ if (this.exactMatch) {
+ if (needle !== caption.substr(0, needle.length))
+ continue loop;
+ }else{
+ for (var j = 0; j < needle.length; j++) {
+ var i1 = caption.indexOf(lower[j], lastIndex + 1);
+ var i2 = caption.indexOf(upper[j], lastIndex + 1);
+ index = (i1 >= 0) ? ((i2 < 0 || i1 < i2) ? i1 : i2) : i2;
+ if (index < 0)
+ continue loop;
+ distance = index - lastIndex - 1;
+ if (distance > 0) {
+ if (lastIndex === -1)
+ penalty += 10;
+ penalty += distance;
+ }
+ matchMask = matchMask | (1 << index);
+ lastIndex = index;
+ }
+ }
+ item.matchMask = matchMask;
+ item.exactMatch = penalty ? 0 : 1;
+ item.score = (item.score || 0) - penalty;
+ results.push(item);
+ }
+ return results;
+ };
+}).call(FilteredList.prototype);
+
+exports.Autocomplete = Autocomplete;
+exports.FilteredList = FilteredList;
+
+});
+
+ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"], function(require, exports, module) {
+ var Range = require("../range").Range;
+
+ var splitRegex = /[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;
+
+ function getWordIndex(doc, pos) {
+ var textBefore = doc.getTextRange(Range.fromPoints({row: 0, column:0}, pos));
+ return textBefore.split(splitRegex).length - 1;
+ }
+ function wordDistance(doc, pos) {
+ var prefixPos = getWordIndex(doc, pos);
+ var words = doc.getValue().split(splitRegex);
+ var wordScores = Object.create(null);
+
+ var currentWord = words[prefixPos];
+
+ words.forEach(function(word, idx) {
+ if (!word || word === currentWord) return;
+
+ var distance = Math.abs(prefixPos - idx);
+ var score = words.length - distance;
+ if (wordScores[word]) {
+ wordScores[word] = Math.max(score, wordScores[word]);
+ } else {
+ wordScores[word] = score;
+ }
+ });
+ return wordScores;
+ }
+
+ exports.getCompletions = function(editor, session, pos, prefix, callback) {
+ var wordScore = wordDistance(session, pos, prefix);
+ var wordList = Object.keys(wordScore);
+ callback(null, wordList.map(function(word) {
+ return {
+ caption: word,
+ value: word,
+ score: wordScore[word],
+ meta: "local"
+ };
+ }));
+ };
+});
+
+ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"], function(require, exports, module) {
+"use strict";
+
+var snippetManager = require("../snippets").snippetManager;
+var Autocomplete = require("../autocomplete").Autocomplete;
+var config = require("../config");
+var lang = require("../lib/lang");
+var util = require("../autocomplete/util");
+
+var textCompleter = require("../autocomplete/text_completer");
+var keyWordCompleter = {
+ getCompletions: function(editor, session, pos, prefix, callback) {
+ if (session.$mode.completer) {
+ return session.$mode.completer.getCompletions(editor, session, pos, prefix, callback);
+ }
+ var state = editor.session.getState(pos.row);
+ var completions = session.$mode.getCompletions(state, session, pos, prefix);
+ callback(null, completions);
+ }
+};
+
+var snippetCompleter = {
+ getCompletions: function(editor, session, pos, prefix, callback) {
+ var snippetMap = snippetManager.snippetMap;
+ var completions = [];
+ snippetManager.getActiveScopes(editor).forEach(function(scope) {
+ var snippets = snippetMap[scope] || [];
+ for (var i = snippets.length; i--;) {
+ var s = snippets[i];
+ var caption = s.name || s.tabTrigger;
+ if (!caption)
+ continue;
+ completions.push({
+ caption: caption,
+ snippet: s.content,
+ meta: s.tabTrigger && !s.name ? s.tabTrigger + "\u21E5 " : "snippet",
+ type: "snippet"
+ });
+ }
+ }, this);
+ callback(null, completions);
+ },
+ getDocTooltip: function(item) {
+ if (item.type == "snippet" && !item.docHTML) {
+ item.docHTML = [
+ "<b>", lang.escapeHTML(item.caption), "</b>", "<hr></hr>",
+ lang.escapeHTML(item.snippet)
+ ].join("");
+ }
+ }
+};
+
+var completers = [snippetCompleter, textCompleter, keyWordCompleter];
+exports.setCompleters = function(val) {
+ completers.length = 0;
+ if (val) completers.push.apply(completers, val);
+};
+exports.addCompleter = function(completer) {
+ completers.push(completer);
+};
+exports.textCompleter = textCompleter;
+exports.keyWordCompleter = keyWordCompleter;
+exports.snippetCompleter = snippetCompleter;
+
+var expandSnippet = {
+ name: "expandSnippet",
+ exec: function(editor) {
+ return snippetManager.expandWithTab(editor);
+ },
+ bindKey: "Tab"
+};
+
+var onChangeMode = function(e, editor) {
+ loadSnippetsForMode(editor.session.$mode);
+};
+
+var loadSnippetsForMode = function(mode) {
+ var id = mode.$id;
+ if (!snippetManager.files)
+ snippetManager.files = {};
+ loadSnippetFile(id);
+ if (mode.modes)
+ mode.modes.forEach(loadSnippetsForMode);
+};
+
+var loadSnippetFile = function(id) {
+ if (!id || snippetManager.files[id])
+ return;
+ var snippetFilePath = id.replace("mode", "snippets");
+ snippetManager.files[id] = {};
+ config.loadModule(snippetFilePath, function(m) {
+ if (m) {
+ snippetManager.files[id] = m;
+ if (!m.snippets && m.snippetText)
+ m.snippets = snippetManager.parseSnippetFile(m.snippetText);
+ snippetManager.register(m.snippets || [], m.scope);
+ if (m.includeScopes) {
+ snippetManager.snippetMap[m.scope].includeScopes = m.includeScopes;
+ m.includeScopes.forEach(function(x) {
+ loadSnippetFile("ace/mode/" + x);
+ });
+ }
+ }
+ });
+};
+
+var doLiveAutocomplete = function(e) {
+ var editor = e.editor;
+ var hasCompleter = editor.completer && editor.completer.activated;
+ if (e.command.name === "backspace") {
+ if (hasCompleter && !util.getCompletionPrefix(editor))
+ editor.completer.detach();
+ }
+ else if (e.command.name === "insertstring") {
+ var prefix = util.getCompletionPrefix(editor);
+ if (prefix && !hasCompleter) {
+ if (!editor.completer) {
+ editor.completer = new Autocomplete();
+ }
+ editor.completer.autoInsert = false;
+ editor.completer.showPopup(editor);
+ }
+ }
+};
+
+var Editor = require("../editor").Editor;
+require("../config").defineOptions(Editor.prototype, "editor", {
+ enableBasicAutocompletion: {
+ set: function(val) {
+ if (val) {
+ if (!this.completers)
+ this.completers = Array.isArray(val)? val: completers;
+ this.commands.addCommand(Autocomplete.startCommand);
+ } else {
+ this.commands.removeCommand(Autocomplete.startCommand);
+ }
+ },
+ value: false
+ },
+ enableLiveAutocompletion: {
+ set: function(val) {
+ if (val) {
+ if (!this.completers)
+ this.completers = Array.isArray(val)? val: completers;
+ this.commands.on('afterExec', doLiveAutocomplete);
+ } else {
+ this.commands.removeListener('afterExec', doLiveAutocomplete);
+ }
+ },
+ value: false
+ },
+ enableSnippets: {
+ set: function(val) {
+ if (val) {
+ this.commands.addCommand(expandSnippet);
+ this.on("changeMode", onChangeMode);
+ onChangeMode(null, this);
+ } else {
+ this.commands.removeCommand(expandSnippet);
+ this.off("changeMode", onChangeMode);
+ }
+ },
+ value: false
+ }
+});
+});
+ (function() {
+ ace.require(["ace/ext/language_tools"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ext-linking.js b/www/wiki/extensions/CodeEditor/modules/ace/ext-linking.js
new file mode 100644
index 00000000..baa75702
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ext-linking.js
@@ -0,0 +1,61 @@
+ace.define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) {
+
+var Editor = require("ace/editor").Editor;
+
+require("../config").defineOptions(Editor.prototype, "editor", {
+ enableLinking: {
+ set: function(val) {
+ if (val) {
+ this.on("click", onClick);
+ this.on("mousemove", onMouseMove);
+ } else {
+ this.off("click", onClick);
+ this.off("mousemove", onMouseMove);
+ }
+ },
+ value: false
+ }
+})
+
+exports.previousLinkingHover = false;
+
+function onMouseMove(e) {
+ var editor = e.editor;
+ var ctrl = e.getAccelKey();
+
+ if (ctrl) {
+ var editor = e.editor;
+ var docPos = e.getDocumentPosition();
+ var session = editor.session;
+ var token = session.getTokenAt(docPos.row, docPos.column);
+
+ if (exports.previousLinkingHover && exports.previousLinkingHover != token) {
+ editor._emit("linkHoverOut");
+ }
+ editor._emit("linkHover", {position: docPos, token: token});
+ exports.previousLinkingHover = token;
+ } else if (exports.previousLinkingHover) {
+ editor._emit("linkHoverOut");
+ exports.previousLinkingHover = false;
+ }
+}
+
+function onClick(e) {
+ var ctrl = e.getAccelKey();
+ var button = e.getButton();
+
+ if (button == 0 && ctrl) {
+ var editor = e.editor;
+ var docPos = e.getDocumentPosition();
+ var session = editor.session;
+ var token = session.getTokenAt(docPos.row, docPos.column);
+
+ editor._emit("linkClick", {position: docPos, token: token});
+ }
+}
+
+});
+ (function() {
+ ace.require(["ace/ext/linking"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ext-modelist.js b/www/wiki/extensions/CodeEditor/modules/ace/ext-modelist.js
new file mode 100644
index 00000000..b0c7fd0d
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ext-modelist.js
@@ -0,0 +1,209 @@
+ace.define("ace/ext/modelist",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var modes = [];
+function getModeForPath(path) {
+ var mode = modesByName.text;
+ var fileName = path.split(/[\/\\]/).pop();
+ for (var i = 0; i < modes.length; i++) {
+ if (modes[i].supportsFile(fileName)) {
+ mode = modes[i];
+ break;
+ }
+ }
+ return mode;
+}
+
+var Mode = function(name, caption, extensions) {
+ this.name = name;
+ this.caption = caption;
+ this.mode = "ace/mode/" + name;
+ this.extensions = extensions;
+ var re;
+ if (/\^/.test(extensions)) {
+ re = extensions.replace(/\|(\^)?/g, function(a, b){
+ return "$|" + (b ? "^" : "^.*\\.");
+ }) + "$";
+ } else {
+ re = "^.*\\.(" + extensions + ")$";
+ }
+
+ this.extRe = new RegExp(re, "gi");
+};
+
+Mode.prototype.supportsFile = function(filename) {
+ return filename.match(this.extRe);
+};
+var supportedModes = {
+ ABAP: ["abap"],
+ ABC: ["abc"],
+ ActionScript:["as"],
+ ADA: ["ada|adb"],
+ Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],
+ AsciiDoc: ["asciidoc|adoc"],
+ Assembly_x86:["asm|a"],
+ AutoHotKey: ["ahk"],
+ BatchFile: ["bat|cmd"],
+ Bro: ["bro"],
+ C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"],
+ C9Search: ["c9search_results"],
+ Cirru: ["cirru|cr"],
+ Clojure: ["clj|cljs"],
+ Cobol: ["CBL|COB"],
+ coffee: ["coffee|cf|cson|^Cakefile"],
+ ColdFusion: ["cfm"],
+ CSharp: ["cs"],
+ CSS: ["css"],
+ Curly: ["curly"],
+ D: ["d|di"],
+ Dart: ["dart"],
+ Diff: ["diff|patch"],
+ Dockerfile: ["^Dockerfile"],
+ Dot: ["dot"],
+ Drools: ["drl"],
+ Dummy: ["dummy"],
+ DummySyntax: ["dummy"],
+ Eiffel: ["e|ge"],
+ EJS: ["ejs"],
+ Elixir: ["ex|exs"],
+ Elm: ["elm"],
+ Erlang: ["erl|hrl"],
+ Forth: ["frt|fs|ldr|fth|4th"],
+ Fortran: ["f|f90"],
+ FTL: ["ftl"],
+ Gcode: ["gcode"],
+ Gherkin: ["feature"],
+ Gitignore: ["^.gitignore"],
+ Glsl: ["glsl|frag|vert"],
+ Gobstones: ["gbs"],
+ golang: ["go"],
+ GraphQLSchema: ["gql"],
+ Groovy: ["groovy"],
+ HAML: ["haml"],
+ Handlebars: ["hbs|handlebars|tpl|mustache"],
+ Haskell: ["hs"],
+ Haskell_Cabal: ["cabal"],
+ haXe: ["hx"],
+ Hjson: ["hjson"],
+ HTML: ["html|htm|xhtml"],
+ HTML_Elixir: ["eex|html.eex"],
+ HTML_Ruby: ["erb|rhtml|html.erb"],
+ INI: ["ini|conf|cfg|prefs"],
+ Io: ["io"],
+ Jack: ["jack"],
+ Jade: ["jade|pug"],
+ Java: ["java"],
+ JavaScript: ["js|jsm|jsx"],
+ JSON: ["json"],
+ JSONiq: ["jq"],
+ JSP: ["jsp"],
+ JSX: ["jsx"],
+ Julia: ["jl"],
+ Kotlin: ["kt|kts"],
+ LaTeX: ["tex|latex|ltx|bib"],
+ LESS: ["less"],
+ Liquid: ["liquid"],
+ Lisp: ["lisp"],
+ LiveScript: ["ls"],
+ LogiQL: ["logic|lql"],
+ LSL: ["lsl"],
+ Lua: ["lua"],
+ LuaPage: ["lp"],
+ Lucene: ["lucene"],
+ Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],
+ Markdown: ["md|markdown"],
+ Mask: ["mask"],
+ MATLAB: ["matlab"],
+ Maze: ["mz"],
+ MEL: ["mel"],
+ MUSHCode: ["mc|mush"],
+ MySQL: ["mysql"],
+ Nix: ["nix"],
+ NSIS: ["nsi|nsh"],
+ ObjectiveC: ["m|mm"],
+ OCaml: ["ml|mli"],
+ Pascal: ["pas|p"],
+ Perl: ["pl|pm"],
+ pgSQL: ["pgsql"],
+ PHP: ["php|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
+ Pig: ["pig"],
+ Powershell: ["ps1"],
+ Praat: ["praat|praatscript|psc|proc"],
+ Prolog: ["plg|prolog"],
+ Properties: ["properties"],
+ Protobuf: ["proto"],
+ Python: ["py"],
+ R: ["r"],
+ Razor: ["cshtml|asp"],
+ RDoc: ["Rd"],
+ RHTML: ["Rhtml"],
+ RST: ["rst"],
+ Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],
+ Rust: ["rs"],
+ SASS: ["sass"],
+ SCAD: ["scad"],
+ Scala: ["scala"],
+ Scheme: ["scm|sm|rkt|oak|scheme"],
+ SCSS: ["scss"],
+ SH: ["sh|bash|^.bashrc"],
+ SJS: ["sjs"],
+ Smarty: ["smarty|tpl"],
+ snippets: ["snippets"],
+ Soy_Template:["soy"],
+ Space: ["space"],
+ SQL: ["sql"],
+ SQLServer: ["sqlserver"],
+ Stylus: ["styl|stylus"],
+ SVG: ["svg"],
+ Swift: ["swift"],
+ Tcl: ["tcl"],
+ Tex: ["tex"],
+ Text: ["txt"],
+ Textile: ["textile"],
+ Toml: ["toml"],
+ TSX: ["tsx"],
+ Twig: ["twig|swig"],
+ Typescript: ["ts|typescript|str"],
+ Vala: ["vala"],
+ VBScript: ["vbs|vb"],
+ Velocity: ["vm"],
+ Verilog: ["v|vh|sv|svh"],
+ VHDL: ["vhd|vhdl"],
+ Wollok: ["wlk|wpgm|wtest"],
+ XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],
+ XQuery: ["xq"],
+ YAML: ["yaml|yml"],
+ Django: ["html"]
+};
+
+var nameOverrides = {
+ ObjectiveC: "Objective-C",
+ CSharp: "C#",
+ golang: "Go",
+ C_Cpp: "C and C++",
+ coffee: "CoffeeScript",
+ HTML_Ruby: "HTML (Ruby)",
+ HTML_Elixir: "HTML (Elixir)",
+ FTL: "FreeMarker"
+};
+var modesByName = {};
+for (var name in supportedModes) {
+ var data = supportedModes[name];
+ var displayName = (nameOverrides[name] || name).replace(/_/g, " ");
+ var filename = name.toLowerCase();
+ var mode = new Mode(filename, displayName, data[0]);
+ modesByName[filename] = mode;
+ modes.push(mode);
+}
+
+module.exports = {
+ getModeForPath: getModeForPath,
+ modes: modes,
+ modesByName: modesByName
+};
+
+});
+ (function() {
+ ace.require(["ace/ext/modelist"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ext-searchbox.js b/www/wiki/extensions/CodeEditor/modules/ace/ext-searchbox.js
new file mode 100644
index 00000000..41eabb15
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ext-searchbox.js
@@ -0,0 +1,508 @@
+ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module) {
+"use strict";
+
+var dom = require("../lib/dom");
+var lang = require("../lib/lang");
+var event = require("../lib/event");
+var searchboxCss = "\
+.ace_search {\
+background-color: #ddd;\
+color: #666;\
+border: 1px solid #cbcbcb;\
+border-top: 0 none;\
+overflow: hidden;\
+margin: 0;\
+padding: 4px 6px 0 4px;\
+position: absolute;\
+top: 0;\
+z-index: 99;\
+white-space: normal;\
+}\
+.ace_search.left {\
+border-left: 0 none;\
+border-radius: 0px 0px 5px 0px;\
+left: 0;\
+}\
+.ace_search.right {\
+border-radius: 0px 0px 0px 5px;\
+border-right: 0 none;\
+right: 0;\
+}\
+.ace_search_form, .ace_replace_form {\
+margin: 0 20px 4px 0;\
+overflow: hidden;\
+line-height: 1.9;\
+}\
+.ace_replace_form {\
+margin-right: 0;\
+}\
+.ace_search_form.ace_nomatch {\
+outline: 1px solid red;\
+}\
+.ace_search_field {\
+border-radius: 3px 0 0 3px;\
+background-color: white;\
+color: black;\
+border: 1px solid #cbcbcb;\
+border-right: 0 none;\
+box-sizing: border-box!important;\
+outline: 0;\
+padding: 0;\
+font-size: inherit;\
+margin: 0;\
+line-height: inherit;\
+padding: 0 6px;\
+min-width: 17em;\
+vertical-align: top;\
+}\
+.ace_searchbtn {\
+border: 1px solid #cbcbcb;\
+line-height: inherit;\
+display: inline-block;\
+padding: 0 6px;\
+background: #fff;\
+border-right: 0 none;\
+border-left: 1px solid #dcdcdc;\
+cursor: pointer;\
+margin: 0;\
+position: relative;\
+box-sizing: content-box!important;\
+color: #666;\
+}\
+.ace_searchbtn:last-child {\
+border-radius: 0 3px 3px 0;\
+border-right: 1px solid #cbcbcb;\
+}\
+.ace_searchbtn:disabled {\
+background: none;\
+cursor: default;\
+}\
+.ace_searchbtn:hover {\
+background-color: #eef1f6;\
+}\
+.ace_searchbtn.prev, .ace_searchbtn.next {\
+padding: 0px 0.7em\
+}\
+.ace_searchbtn.prev:after, .ace_searchbtn.next:after {\
+content: \"\";\
+border: solid 2px #888;\
+width: 0.5em;\
+height: 0.5em;\
+border-width: 2px 0 0 2px;\
+display:inline-block;\
+transform: rotate(-45deg);\
+}\
+.ace_searchbtn.next:after {\
+border-width: 0 2px 2px 0 ;\
+}\
+.ace_searchbtn_close {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\
+border-radius: 50%;\
+border: 0 none;\
+color: #656565;\
+cursor: pointer;\
+font: 16px/16px Arial;\
+padding: 0;\
+height: 14px;\
+width: 14px;\
+top: 9px;\
+right: 7px;\
+position: absolute;\
+}\
+.ace_searchbtn_close:hover {\
+background-color: #656565;\
+background-position: 50% 100%;\
+color: white;\
+}\
+.ace_button {\
+margin-left: 2px;\
+cursor: pointer;\
+-webkit-user-select: none;\
+-moz-user-select: none;\
+-o-user-select: none;\
+-ms-user-select: none;\
+user-select: none;\
+overflow: hidden;\
+opacity: 0.7;\
+border: 1px solid rgba(100,100,100,0.23);\
+padding: 1px;\
+box-sizing: border-box!important;\
+color: black;\
+}\
+.ace_button:hover {\
+background-color: #eee;\
+opacity:1;\
+}\
+.ace_button:active {\
+background-color: #ddd;\
+}\
+.ace_button.checked {\
+border-color: #3399ff;\
+opacity:1;\
+}\
+.ace_search_options{\
+margin-bottom: 3px;\
+text-align: right;\
+-webkit-user-select: none;\
+-moz-user-select: none;\
+-o-user-select: none;\
+-ms-user-select: none;\
+user-select: none;\
+clear: both;\
+}\
+.ace_search_counter {\
+float: left;\
+font-family: arial;\
+padding: 0 8px;\
+}";
+var HashHandler = require("../keyboard/hash_handler").HashHandler;
+var keyUtil = require("../lib/keys");
+
+var MAX_COUNT = 999;
+
+dom.importCssString(searchboxCss, "ace_searchbox");
+
+var html = '<div class="ace_search right">\
+ <span action="hide" class="ace_searchbtn_close"></span>\
+ <div class="ace_search_form">\
+ <input class="ace_search_field" placeholder="Search for" spellcheck="false"></input>\
+ <span action="findPrev" class="ace_searchbtn prev"></span>\
+ <span action="findNext" class="ace_searchbtn next"></span>\
+ <span action="findAll" class="ace_searchbtn" title="Alt-Enter">All</span>\
+ </div>\
+ <div class="ace_replace_form">\
+ <input class="ace_search_field" placeholder="Replace with" spellcheck="false"></input>\
+ <span action="replaceAndFindNext" class="ace_searchbtn">Replace</span>\
+ <span action="replaceAll" class="ace_searchbtn">All</span>\
+ </div>\
+ <div class="ace_search_options">\
+ <span action="toggleReplace" class="ace_button" title="Toggel Replace mode"\
+ style="float:left;margin-top:-2px;padding:0 5px;">+</span>\
+ <span class="ace_search_counter"></span>\
+ <span action="toggleRegexpMode" class="ace_button" title="RegExp Search">.*</span>\
+ <span action="toggleCaseSensitive" class="ace_button" title="CaseSensitive Search">Aa</span>\
+ <span action="toggleWholeWords" class="ace_button" title="Whole Word Search">\\b</span>\
+ <span action="searchInSelection" class="ace_button" title="Search In Selection">S</span>\
+ </div>\
+</div>'.replace(/> +/g, ">");
+
+var SearchBox = function(editor, range, showReplaceForm) {
+ var div = dom.createElement("div");
+ div.innerHTML = html;
+ this.element = div.firstChild;
+
+ this.setSession = this.setSession.bind(this);
+
+ this.$init();
+ this.setEditor(editor);
+};
+
+(function() {
+ this.setEditor = function(editor) {
+ editor.searchBox = this;
+ editor.renderer.scroller.appendChild(this.element);
+ this.editor = editor;
+ };
+
+ this.setSession = function(e) {
+ this.searchRange = null;
+ this.$syncOptions(true);
+ }
+
+ this.$initElements = function(sb) {
+ this.searchBox = sb.querySelector(".ace_search_form");
+ this.replaceBox = sb.querySelector(".ace_replace_form");
+ this.searchOption = sb.querySelector("[action=searchInSelection]");
+ this.replaceOption = sb.querySelector("[action=toggleReplace]");
+ this.regExpOption = sb.querySelector("[action=toggleRegexpMode]");
+ this.caseSensitiveOption = sb.querySelector("[action=toggleCaseSensitive]");
+ this.wholeWordOption = sb.querySelector("[action=toggleWholeWords]");
+ this.searchInput = this.searchBox.querySelector(".ace_search_field");
+ this.replaceInput = this.replaceBox.querySelector(".ace_search_field");
+ this.searchCounter = sb.querySelector(".ace_search_counter");
+ };
+
+ this.$init = function() {
+ var sb = this.element;
+
+ this.$initElements(sb);
+
+ var _this = this;
+ event.addListener(sb, "mousedown", function(e) {
+ setTimeout(function(){
+ _this.activeInput.focus();
+ }, 0);
+ event.stopPropagation(e);
+ });
+ event.addListener(sb, "click", function(e) {
+ var t = e.target || e.srcElement;
+ var action = t.getAttribute("action");
+ if (action && _this[action])
+ _this[action]();
+ else if (_this.$searchBarKb.commands[action])
+ _this.$searchBarKb.commands[action].exec(_this);
+ event.stopPropagation(e);
+ });
+
+ event.addCommandKeyListener(sb, function(e, hashId, keyCode) {
+ var keyString = keyUtil.keyCodeToString(keyCode);
+ var command = _this.$searchBarKb.findKeyCommand(hashId, keyString);
+ if (command && command.exec) {
+ command.exec(_this);
+ event.stopEvent(e);
+ }
+ });
+
+ this.$onChange = lang.delayedCall(function() {
+ _this.find(false, false);
+ });
+
+ event.addListener(this.searchInput, "input", function() {
+ _this.$onChange.schedule(20);
+ });
+ event.addListener(this.searchInput, "focus", function() {
+ _this.activeInput = _this.searchInput;
+ _this.searchInput.value && _this.highlight();
+ });
+ event.addListener(this.replaceInput, "focus", function() {
+ _this.activeInput = _this.replaceInput;
+ _this.searchInput.value && _this.highlight();
+ });
+ };
+ this.$closeSearchBarKb = new HashHandler([{
+ bindKey: "Esc",
+ name: "closeSearchBar",
+ exec: function(editor) {
+ editor.searchBox.hide();
+ }
+ }]);
+ this.$searchBarKb = new HashHandler();
+ this.$searchBarKb.bindKeys({
+ "Ctrl-f|Command-f": function(sb) {
+ var isReplace = sb.isReplace = !sb.isReplace;
+ sb.replaceBox.style.display = isReplace ? "" : "none";
+ sb.replaceOption.checked = false;
+ sb.$syncOptions();
+ sb.searchInput.focus();
+ },
+ "Ctrl-H|Command-Option-F": function(sb) {
+ sb.replaceOption.checked = true;
+ sb.$syncOptions();
+ sb.replaceInput.focus();
+ },
+ "Ctrl-G|Command-G": function(sb) {
+ sb.findNext();
+ },
+ "Ctrl-Shift-G|Command-Shift-G": function(sb) {
+ sb.findPrev();
+ },
+ "esc": function(sb) {
+ setTimeout(function() { sb.hide();});
+ },
+ "Return": function(sb) {
+ if (sb.activeInput == sb.replaceInput)
+ sb.replace();
+ sb.findNext();
+ },
+ "Shift-Return": function(sb) {
+ if (sb.activeInput == sb.replaceInput)
+ sb.replace();
+ sb.findPrev();
+ },
+ "Alt-Return": function(sb) {
+ if (sb.activeInput == sb.replaceInput)
+ sb.replaceAll();
+ sb.findAll();
+ },
+ "Tab": function(sb) {
+ (sb.activeInput == sb.replaceInput ? sb.searchInput : sb.replaceInput).focus();
+ }
+ });
+
+ this.$searchBarKb.addCommands([{
+ name: "toggleRegexpMode",
+ bindKey: {win: "Alt-R|Alt-/", mac: "Ctrl-Alt-R|Ctrl-Alt-/"},
+ exec: function(sb) {
+ sb.regExpOption.checked = !sb.regExpOption.checked;
+ sb.$syncOptions();
+ }
+ }, {
+ name: "toggleCaseSensitive",
+ bindKey: {win: "Alt-C|Alt-I", mac: "Ctrl-Alt-R|Ctrl-Alt-I"},
+ exec: function(sb) {
+ sb.caseSensitiveOption.checked = !sb.caseSensitiveOption.checked;
+ sb.$syncOptions();
+ }
+ }, {
+ name: "toggleWholeWords",
+ bindKey: {win: "Alt-B|Alt-W", mac: "Ctrl-Alt-B|Ctrl-Alt-W"},
+ exec: function(sb) {
+ sb.wholeWordOption.checked = !sb.wholeWordOption.checked;
+ sb.$syncOptions();
+ }
+ }, {
+ name: "toggleReplace",
+ exec: function(sb) {
+ sb.replaceOption.checked = !sb.replaceOption.checked;
+ sb.$syncOptions();
+ }
+ }, {
+ name: "searchInSelection",
+ exec: function(sb) {
+ sb.searchOption.checked = !sb.searchRange;
+ sb.setSearchRange(sb.searchOption.checked && sb.editor.getSelectionRange());
+ sb.$syncOptions();
+ }
+ }]);
+
+ this.setSearchRange = function(range) {
+ this.searchRange = range;
+ if (range) {
+ this.searchRangeMarker = this.editor.session.addMarker(range, "ace_active-line");
+ } else if (this.searchRangeMarker) {
+ this.editor.session.removeMarker(this.searchRangeMarker);
+ this.searchRangeMarker = null;
+ }
+ }
+
+ this.$syncOptions = function(preventScroll) {
+ dom.setCssClass(this.replaceOption, "checked", this.searchRange);
+ dom.setCssClass(this.searchOption, "checked", this.searchOption.checked);
+ this.replaceOption.textContent = this.replaceOption.checked ? "-" : "+";
+ dom.setCssClass(this.regExpOption, "checked", this.regExpOption.checked);
+ dom.setCssClass(this.wholeWordOption, "checked", this.wholeWordOption.checked);
+ dom.setCssClass(this.caseSensitiveOption, "checked", this.caseSensitiveOption.checked);
+ this.replaceBox.style.display = this.replaceOption.checked ? "" : "none";
+ this.find(false, false, preventScroll);
+ };
+
+ this.highlight = function(re) {
+ this.editor.session.highlight(re || this.editor.$search.$options.re);
+ this.editor.renderer.updateBackMarkers()
+ };
+ this.find = function(skipCurrent, backwards, preventScroll) {
+ var range = this.editor.find(this.searchInput.value, {
+ skipCurrent: skipCurrent,
+ backwards: backwards,
+ wrap: true,
+ regExp: this.regExpOption.checked,
+ caseSensitive: this.caseSensitiveOption.checked,
+ wholeWord: this.wholeWordOption.checked,
+ preventScroll: preventScroll,
+ range: this.searchRange
+ });
+ var noMatch = !range && this.searchInput.value;
+ dom.setCssClass(this.searchBox, "ace_nomatch", noMatch);
+ this.editor._emit("findSearchBox", { match: !noMatch });
+ this.highlight();
+ this.updateCounter();
+ };
+ this.updateCounter = function() {
+ var editor = this.editor;
+ var regex = editor.$search.$options.re;
+ var all = 0;
+ var before = 0
+ if (regex) {
+ var value = this.searchRange
+ ? editor.session.getTextRange(this.searchRange)
+ : editor.getValue();
+
+ var offset = editor.session.doc.positionToIndex(editor.selection.anchor);
+ if (this.searchRange)
+ offset -= editor.session.doc.positionToIndex(this.searchRange.start);
+
+ var last = regex.lastIndex = 0;
+ var m;
+ while ((m = regex.exec(value))) {
+ all++;
+ last = m.index;
+ if (last <= offset)
+ before++;
+ if (all > MAX_COUNT)
+ break
+ if (!m[0]) {
+ regex.lastIndex = last += 1;
+ if (last >= value.length)
+ break;
+ }
+ }
+ }
+ this.searchCounter.textContent = before + " of " + (all > MAX_COUNT ? MAX_COUNT + "+" : all);
+ };
+ this.findNext = function() {
+ this.find(true, false);
+ };
+ this.findPrev = function() {
+ this.find(true, true);
+ };
+ this.findAll = function(){
+ var range = this.editor.findAll(this.searchInput.value, {
+ regExp: this.regExpOption.checked,
+ caseSensitive: this.caseSensitiveOption.checked,
+ wholeWord: this.wholeWordOption.checked
+ });
+ var noMatch = !range && this.searchInput.value;
+ dom.setCssClass(this.searchBox, "ace_nomatch", noMatch);
+ this.editor._emit("findSearchBox", { match: !noMatch });
+ this.highlight();
+ this.hide();
+ };
+ this.replace = function() {
+ if (!this.editor.getReadOnly())
+ this.editor.replace(this.replaceInput.value);
+ };
+ this.replaceAndFindNext = function() {
+ if (!this.editor.getReadOnly()) {
+ this.editor.replace(this.replaceInput.value);
+ this.findNext()
+ }
+ };
+ this.replaceAll = function() {
+ if (!this.editor.getReadOnly())
+ this.editor.replaceAll(this.replaceInput.value);
+ };
+
+ this.hide = function() {
+ this.active = false;
+ this.setSearchRange(null)
+ this.editor.off("changeSession", this.setSession);
+
+ this.element.style.display = "none";
+ this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb);
+ this.editor.focus();
+ };
+ this.show = function(value, isReplace) {
+ this.active = true;
+ this.editor.on("changeSession", this.setSession);
+ this.element.style.display = "";
+ this.replaceOption.checked = isReplace;
+
+ if (value)
+ this.searchInput.value = value;
+
+ this.searchInput.focus();
+ this.searchInput.select();
+
+ this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb);
+
+ this.$syncOptions(true);
+ };
+
+ this.isFocused = function() {
+ var el = document.activeElement;
+ return el == this.searchInput || el == this.replaceInput;
+ }
+}).call(SearchBox.prototype);
+
+exports.SearchBox = SearchBox;
+
+exports.Search = function(editor, isReplace) {
+ var sb = editor.searchBox || new SearchBox(editor);
+ sb.show(editor.session.getTextRange(), isReplace);
+};
+
+});
+ (function() {
+ ace.require(["ace/ext/searchbox"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ext-settings_menu.js b/www/wiki/extensions/CodeEditor/modules/ace/ext-settings_menu.js
new file mode 100644
index 00000000..a00b28f8
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ext-settings_menu.js
@@ -0,0 +1,663 @@
+ace.define("ace/ext/menu_tools/element_generator",["require","exports","module"], function(require, exports, module) {
+'use strict';
+module.exports.createOption = function createOption (obj) {
+ var attribute;
+ var el = document.createElement('option');
+ for(attribute in obj) {
+ if(obj.hasOwnProperty(attribute)) {
+ if(attribute === 'selected') {
+ el.setAttribute(attribute, obj[attribute]);
+ } else {
+ el[attribute] = obj[attribute];
+ }
+ }
+ }
+ return el;
+};
+module.exports.createCheckbox = function createCheckbox (id, checked, clss) {
+ var el = document.createElement('input');
+ el.setAttribute('type', 'checkbox');
+ el.setAttribute('id', id);
+ el.setAttribute('name', id);
+ el.setAttribute('value', checked);
+ el.setAttribute('class', clss);
+ if(checked) {
+ el.setAttribute('checked', 'checked');
+ }
+ return el;
+};
+module.exports.createInput = function createInput (id, value, clss) {
+ var el = document.createElement('input');
+ el.setAttribute('type', 'text');
+ el.setAttribute('id', id);
+ el.setAttribute('name', id);
+ el.setAttribute('value', value);
+ el.setAttribute('class', clss);
+ return el;
+};
+module.exports.createLabel = function createLabel (text, labelFor) {
+ var el = document.createElement('label');
+ el.setAttribute('for', labelFor);
+ el.textContent = text;
+ return el;
+};
+module.exports.createSelection = function createSelection (id, values, clss) {
+ var el = document.createElement('select');
+ el.setAttribute('id', id);
+ el.setAttribute('name', id);
+ el.setAttribute('class', clss);
+ values.forEach(function(item) {
+ el.appendChild(module.exports.createOption(item));
+ });
+ return el;
+};
+
+});
+
+ace.define("ace/ext/modelist",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var modes = [];
+function getModeForPath(path) {
+ var mode = modesByName.text;
+ var fileName = path.split(/[\/\\]/).pop();
+ for (var i = 0; i < modes.length; i++) {
+ if (modes[i].supportsFile(fileName)) {
+ mode = modes[i];
+ break;
+ }
+ }
+ return mode;
+}
+
+var Mode = function(name, caption, extensions) {
+ this.name = name;
+ this.caption = caption;
+ this.mode = "ace/mode/" + name;
+ this.extensions = extensions;
+ var re;
+ if (/\^/.test(extensions)) {
+ re = extensions.replace(/\|(\^)?/g, function(a, b){
+ return "$|" + (b ? "^" : "^.*\\.");
+ }) + "$";
+ } else {
+ re = "^.*\\.(" + extensions + ")$";
+ }
+
+ this.extRe = new RegExp(re, "gi");
+};
+
+Mode.prototype.supportsFile = function(filename) {
+ return filename.match(this.extRe);
+};
+var supportedModes = {
+ ABAP: ["abap"],
+ ABC: ["abc"],
+ ActionScript:["as"],
+ ADA: ["ada|adb"],
+ Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],
+ AsciiDoc: ["asciidoc|adoc"],
+ Assembly_x86:["asm|a"],
+ AutoHotKey: ["ahk"],
+ BatchFile: ["bat|cmd"],
+ Bro: ["bro"],
+ C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"],
+ C9Search: ["c9search_results"],
+ Cirru: ["cirru|cr"],
+ Clojure: ["clj|cljs"],
+ Cobol: ["CBL|COB"],
+ coffee: ["coffee|cf|cson|^Cakefile"],
+ ColdFusion: ["cfm"],
+ CSharp: ["cs"],
+ CSS: ["css"],
+ Curly: ["curly"],
+ D: ["d|di"],
+ Dart: ["dart"],
+ Diff: ["diff|patch"],
+ Dockerfile: ["^Dockerfile"],
+ Dot: ["dot"],
+ Drools: ["drl"],
+ Dummy: ["dummy"],
+ DummySyntax: ["dummy"],
+ Eiffel: ["e|ge"],
+ EJS: ["ejs"],
+ Elixir: ["ex|exs"],
+ Elm: ["elm"],
+ Erlang: ["erl|hrl"],
+ Forth: ["frt|fs|ldr|fth|4th"],
+ Fortran: ["f|f90"],
+ FTL: ["ftl"],
+ Gcode: ["gcode"],
+ Gherkin: ["feature"],
+ Gitignore: ["^.gitignore"],
+ Glsl: ["glsl|frag|vert"],
+ Gobstones: ["gbs"],
+ golang: ["go"],
+ GraphQLSchema: ["gql"],
+ Groovy: ["groovy"],
+ HAML: ["haml"],
+ Handlebars: ["hbs|handlebars|tpl|mustache"],
+ Haskell: ["hs"],
+ Haskell_Cabal: ["cabal"],
+ haXe: ["hx"],
+ Hjson: ["hjson"],
+ HTML: ["html|htm|xhtml"],
+ HTML_Elixir: ["eex|html.eex"],
+ HTML_Ruby: ["erb|rhtml|html.erb"],
+ INI: ["ini|conf|cfg|prefs"],
+ Io: ["io"],
+ Jack: ["jack"],
+ Jade: ["jade|pug"],
+ Java: ["java"],
+ JavaScript: ["js|jsm|jsx"],
+ JSON: ["json"],
+ JSONiq: ["jq"],
+ JSP: ["jsp"],
+ JSX: ["jsx"],
+ Julia: ["jl"],
+ Kotlin: ["kt|kts"],
+ LaTeX: ["tex|latex|ltx|bib"],
+ LESS: ["less"],
+ Liquid: ["liquid"],
+ Lisp: ["lisp"],
+ LiveScript: ["ls"],
+ LogiQL: ["logic|lql"],
+ LSL: ["lsl"],
+ Lua: ["lua"],
+ LuaPage: ["lp"],
+ Lucene: ["lucene"],
+ Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],
+ Markdown: ["md|markdown"],
+ Mask: ["mask"],
+ MATLAB: ["matlab"],
+ Maze: ["mz"],
+ MEL: ["mel"],
+ MUSHCode: ["mc|mush"],
+ MySQL: ["mysql"],
+ Nix: ["nix"],
+ NSIS: ["nsi|nsh"],
+ ObjectiveC: ["m|mm"],
+ OCaml: ["ml|mli"],
+ Pascal: ["pas|p"],
+ Perl: ["pl|pm"],
+ pgSQL: ["pgsql"],
+ PHP: ["php|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],
+ Pig: ["pig"],
+ Powershell: ["ps1"],
+ Praat: ["praat|praatscript|psc|proc"],
+ Prolog: ["plg|prolog"],
+ Properties: ["properties"],
+ Protobuf: ["proto"],
+ Python: ["py"],
+ R: ["r"],
+ Razor: ["cshtml|asp"],
+ RDoc: ["Rd"],
+ RHTML: ["Rhtml"],
+ RST: ["rst"],
+ Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],
+ Rust: ["rs"],
+ SASS: ["sass"],
+ SCAD: ["scad"],
+ Scala: ["scala"],
+ Scheme: ["scm|sm|rkt|oak|scheme"],
+ SCSS: ["scss"],
+ SH: ["sh|bash|^.bashrc"],
+ SJS: ["sjs"],
+ Smarty: ["smarty|tpl"],
+ snippets: ["snippets"],
+ Soy_Template:["soy"],
+ Space: ["space"],
+ SQL: ["sql"],
+ SQLServer: ["sqlserver"],
+ Stylus: ["styl|stylus"],
+ SVG: ["svg"],
+ Swift: ["swift"],
+ Tcl: ["tcl"],
+ Tex: ["tex"],
+ Text: ["txt"],
+ Textile: ["textile"],
+ Toml: ["toml"],
+ TSX: ["tsx"],
+ Twig: ["twig|swig"],
+ Typescript: ["ts|typescript|str"],
+ Vala: ["vala"],
+ VBScript: ["vbs|vb"],
+ Velocity: ["vm"],
+ Verilog: ["v|vh|sv|svh"],
+ VHDL: ["vhd|vhdl"],
+ Wollok: ["wlk|wpgm|wtest"],
+ XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],
+ XQuery: ["xq"],
+ YAML: ["yaml|yml"],
+ Django: ["html"]
+};
+
+var nameOverrides = {
+ ObjectiveC: "Objective-C",
+ CSharp: "C#",
+ golang: "Go",
+ C_Cpp: "C and C++",
+ coffee: "CoffeeScript",
+ HTML_Ruby: "HTML (Ruby)",
+ HTML_Elixir: "HTML (Elixir)",
+ FTL: "FreeMarker"
+};
+var modesByName = {};
+for (var name in supportedModes) {
+ var data = supportedModes[name];
+ var displayName = (nameOverrides[name] || name).replace(/_/g, " ");
+ var filename = name.toLowerCase();
+ var mode = new Mode(filename, displayName, data[0]);
+ modesByName[filename] = mode;
+ modes.push(mode);
+}
+
+module.exports = {
+ getModeForPath: getModeForPath,
+ modes: modes,
+ modesByName: modesByName
+};
+
+});
+
+ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"], function(require, exports, module) {
+"use strict";
+require("ace/lib/fixoldbrowsers");
+
+var themeData = [
+ ["Chrome" ],
+ ["Clouds" ],
+ ["Crimson Editor" ],
+ ["Dawn" ],
+ ["Dreamweaver" ],
+ ["Eclipse" ],
+ ["GitHub" ],
+ ["IPlastic" ],
+ ["Solarized Light"],
+ ["TextMate" ],
+ ["Tomorrow" ],
+ ["XCode" ],
+ ["Kuroir"],
+ ["KatzenMilch"],
+ ["SQL Server" ,"sqlserver" , "light"],
+ ["Ambiance" ,"ambiance" , "dark"],
+ ["Chaos" ,"chaos" , "dark"],
+ ["Clouds Midnight" ,"clouds_midnight" , "dark"],
+ ["Cobalt" ,"cobalt" , "dark"],
+ ["Gruvbox" ,"gruvbox" , "dark"],
+ ["Green on Black" ,"gob" , "dark"],
+ ["idle Fingers" ,"idle_fingers" , "dark"],
+ ["krTheme" ,"kr_theme" , "dark"],
+ ["Merbivore" ,"merbivore" , "dark"],
+ ["Merbivore Soft" ,"merbivore_soft" , "dark"],
+ ["Mono Industrial" ,"mono_industrial" , "dark"],
+ ["Monokai" ,"monokai" , "dark"],
+ ["Pastel on dark" ,"pastel_on_dark" , "dark"],
+ ["Solarized Dark" ,"solarized_dark" , "dark"],
+ ["Terminal" ,"terminal" , "dark"],
+ ["Tomorrow Night" ,"tomorrow_night" , "dark"],
+ ["Tomorrow Night Blue" ,"tomorrow_night_blue" , "dark"],
+ ["Tomorrow Night Bright","tomorrow_night_bright" , "dark"],
+ ["Tomorrow Night 80s" ,"tomorrow_night_eighties" , "dark"],
+ ["Twilight" ,"twilight" , "dark"],
+ ["Vibrant Ink" ,"vibrant_ink" , "dark"]
+];
+
+
+exports.themesByName = {};
+exports.themes = themeData.map(function(data) {
+ var name = data[1] || data[0].replace(/ /g, "_").toLowerCase();
+ var theme = {
+ caption: data[0],
+ theme: "ace/theme/" + name,
+ isDark: data[2] == "dark",
+ name: name
+ };
+ exports.themesByName[name] = theme;
+ return theme;
+});
+
+});
+
+ace.define("ace/ext/menu_tools/add_editor_menu_options",["require","exports","module","ace/ext/modelist","ace/ext/themelist"], function(require, exports, module) {
+'use strict';
+module.exports.addEditorMenuOptions = function addEditorMenuOptions (editor) {
+ var modelist = require('../modelist');
+ var themelist = require('../themelist');
+ editor.menuOptions = {
+ setNewLineMode: [{
+ textContent: "unix",
+ value: "unix"
+ }, {
+ textContent: "windows",
+ value: "windows"
+ }, {
+ textContent: "auto",
+ value: "auto"
+ }],
+ setTheme: [],
+ setMode: [],
+ setKeyboardHandler: [{
+ textContent: "ace",
+ value: ""
+ }, {
+ textContent: "vim",
+ value: "ace/keyboard/vim"
+ }, {
+ textContent: "emacs",
+ value: "ace/keyboard/emacs"
+ }, {
+ textContent: "textarea",
+ value: "ace/keyboard/textarea"
+ }, {
+ textContent: "sublime",
+ value: "ace/keyboard/sublime"
+ }]
+ };
+
+ editor.menuOptions.setTheme = themelist.themes.map(function(theme) {
+ return {
+ textContent: theme.caption,
+ value: theme.theme
+ };
+ });
+
+ editor.menuOptions.setMode = modelist.modes.map(function(mode) {
+ return {
+ textContent: mode.name,
+ value: mode.mode
+ };
+ });
+};
+
+
+});
+
+ace.define("ace/ext/menu_tools/get_set_functions",["require","exports","module"], function(require, exports, module) {
+'use strict';
+module.exports.getSetFunctions = function getSetFunctions (editor) {
+ var out = [];
+ var my = {
+ 'editor' : editor,
+ 'session' : editor.session,
+ 'renderer' : editor.renderer
+ };
+ var opts = [];
+ var skip = [
+ 'setOption',
+ 'setUndoManager',
+ 'setDocument',
+ 'setValue',
+ 'setBreakpoints',
+ 'setScrollTop',
+ 'setScrollLeft',
+ 'setSelectionStyle',
+ 'setWrapLimitRange'
+ ];
+ ['renderer', 'session', 'editor'].forEach(function(esra) {
+ var esr = my[esra];
+ var clss = esra;
+ for(var fn in esr) {
+ if(skip.indexOf(fn) === -1) {
+ if(/^set/.test(fn) && opts.indexOf(fn) === -1) {
+ opts.push(fn);
+ out.push({
+ 'functionName' : fn,
+ 'parentObj' : esr,
+ 'parentName' : clss
+ });
+ }
+ }
+ }
+ });
+ return out;
+};
+
+});
+
+ace.define("ace/ext/menu_tools/generate_settings_menu",["require","exports","module","ace/ext/menu_tools/element_generator","ace/ext/menu_tools/add_editor_menu_options","ace/ext/menu_tools/get_set_functions","ace/ace"], function(require, exports, module) {
+'use strict';
+var egen = require('./element_generator');
+var addEditorMenuOptions = require('./add_editor_menu_options').addEditorMenuOptions;
+var getSetFunctions = require('./get_set_functions').getSetFunctions;
+module.exports.generateSettingsMenu = function generateSettingsMenu (editor) {
+ var elements = [];
+ function cleanupElementsList() {
+ elements.sort(function(a, b) {
+ var x = a.getAttribute('contains');
+ var y = b.getAttribute('contains');
+ return x.localeCompare(y);
+ });
+ }
+ function wrapElements() {
+ var topmenu = document.createElement('div');
+ topmenu.setAttribute('id', 'ace_settingsmenu');
+ elements.forEach(function(element) {
+ topmenu.appendChild(element);
+ });
+
+ var el = topmenu.appendChild(document.createElement('div'));
+ var version = require("../../ace").version;
+ el.style.padding = "1em";
+ el.textContent = "Ace version " + version;
+
+ return topmenu;
+ }
+ function createNewEntry(obj, clss, item, val) {
+ var el;
+ var div = document.createElement('div');
+ div.setAttribute('contains', item);
+ div.setAttribute('class', 'ace_optionsMenuEntry');
+ div.setAttribute('style', 'clear: both;');
+
+ div.appendChild(egen.createLabel(
+ item.replace(/^set/, '').replace(/([A-Z])/g, ' $1').trim(),
+ item
+ ));
+
+ if (Array.isArray(val)) {
+ el = egen.createSelection(item, val, clss);
+ el.addEventListener('change', function(e) {
+ try{
+ editor.menuOptions[e.target.id].forEach(function(x) {
+ if(x.textContent !== e.target.textContent) {
+ delete x.selected;
+ }
+ });
+ obj[e.target.id](e.target.value);
+ } catch (err) {
+ throw new Error(err);
+ }
+ });
+ } else if(typeof val === 'boolean') {
+ el = egen.createCheckbox(item, val, clss);
+ el.addEventListener('change', function(e) {
+ try{
+ obj[e.target.id](!!e.target.checked);
+ } catch (err) {
+ throw new Error(err);
+ }
+ });
+ } else {
+ el = egen.createInput(item, val, clss);
+ el.addEventListener('change', function(e) {
+ try{
+ if(e.target.value === 'true') {
+ obj[e.target.id](true);
+ } else if(e.target.value === 'false') {
+ obj[e.target.id](false);
+ } else {
+ obj[e.target.id](e.target.value);
+ }
+ } catch (err) {
+ throw new Error(err);
+ }
+ });
+ }
+ el.style.cssText = 'float:right;';
+ div.appendChild(el);
+ return div;
+ }
+ function makeDropdown(item, esr, clss, fn) {
+ var val = editor.menuOptions[item];
+ var currentVal = esr[fn]();
+ if (typeof currentVal == 'object')
+ currentVal = currentVal.$id;
+ val.forEach(function(valuex) {
+ if (valuex.value === currentVal)
+ valuex.selected = 'selected';
+ });
+ return createNewEntry(esr, clss, item, val);
+ }
+ function handleSet(setObj) {
+ var item = setObj.functionName;
+ var esr = setObj.parentObj;
+ var clss = setObj.parentName;
+ var val;
+ var fn = item.replace(/^set/, 'get');
+ if(editor.menuOptions[item] !== undefined) {
+ elements.push(makeDropdown(item, esr, clss, fn));
+ } else if(typeof esr[fn] === 'function') {
+ try {
+ val = esr[fn]();
+ if(typeof val === 'object') {
+ val = val.$id;
+ }
+ elements.push(
+ createNewEntry(esr, clss, item, val)
+ );
+ } catch (e) {
+ }
+ }
+ }
+ addEditorMenuOptions(editor);
+ getSetFunctions(editor).forEach(function(setObj) {
+ handleSet(setObj);
+ });
+ cleanupElementsList();
+ return wrapElements();
+};
+
+});
+
+ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+'use strict';
+var dom = require("../../lib/dom");
+var cssText = "#ace_settingsmenu, #kbshortcutmenu {\
+background-color: #F7F7F7;\
+color: black;\
+box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\
+padding: 1em 0.5em 2em 1em;\
+overflow: auto;\
+position: absolute;\
+margin: 0;\
+bottom: 0;\
+right: 0;\
+top: 0;\
+z-index: 9991;\
+cursor: default;\
+}\
+.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\
+box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\
+background-color: rgba(255, 255, 255, 0.6);\
+color: black;\
+}\
+.ace_optionsMenuEntry:hover {\
+background-color: rgba(100, 100, 100, 0.1);\
+-webkit-transition: all 0.5s;\
+transition: all 0.3s\
+}\
+.ace_closeButton {\
+background: rgba(245, 146, 146, 0.5);\
+border: 1px solid #F48A8A;\
+border-radius: 50%;\
+padding: 7px;\
+position: absolute;\
+right: -8px;\
+top: -8px;\
+z-index: 1000;\
+}\
+.ace_closeButton{\
+background: rgba(245, 146, 146, 0.9);\
+}\
+.ace_optionsMenuKey {\
+color: darkslateblue;\
+font-weight: bold;\
+}\
+.ace_optionsMenuCommand {\
+color: darkcyan;\
+font-weight: normal;\
+}";
+dom.importCssString(cssText);
+module.exports.overlayPage = function overlayPage(editor, contentElement, top, right, bottom, left) {
+ top = top ? 'top: ' + top + ';' : '';
+ bottom = bottom ? 'bottom: ' + bottom + ';' : '';
+ right = right ? 'right: ' + right + ';' : '';
+ left = left ? 'left: ' + left + ';' : '';
+
+ var closer = document.createElement('div');
+ var contentContainer = document.createElement('div');
+
+ function documentEscListener(e) {
+ if (e.keyCode === 27) {
+ closer.click();
+ }
+ }
+
+ closer.style.cssText = 'margin: 0; padding: 0; ' +
+ 'position: fixed; top:0; bottom:0; left:0; right:0;' +
+ 'z-index: 9990; ' +
+ 'background-color: rgba(0, 0, 0, 0.3);';
+ closer.addEventListener('click', function() {
+ document.removeEventListener('keydown', documentEscListener);
+ closer.parentNode.removeChild(closer);
+ editor.focus();
+ closer = null;
+ });
+ document.addEventListener('keydown', documentEscListener);
+
+ contentContainer.style.cssText = top + right + bottom + left;
+ contentContainer.addEventListener('click', function(e) {
+ e.stopPropagation();
+ });
+
+ var wrapper = dom.createElement("div");
+ wrapper.style.position = "relative";
+
+ var closeButton = dom.createElement("div");
+ closeButton.className = "ace_closeButton";
+ closeButton.addEventListener('click', function() {
+ closer.click();
+ });
+
+ wrapper.appendChild(closeButton);
+ contentContainer.appendChild(wrapper);
+
+ contentContainer.appendChild(contentElement);
+ closer.appendChild(contentContainer);
+ document.body.appendChild(closer);
+ editor.blur();
+};
+
+});
+
+ace.define("ace/ext/settings_menu",["require","exports","module","ace/ext/menu_tools/generate_settings_menu","ace/ext/menu_tools/overlay_page","ace/editor"], function(require, exports, module) {
+"use strict";
+var generateSettingsMenu = require('./menu_tools/generate_settings_menu').generateSettingsMenu;
+var overlayPage = require('./menu_tools/overlay_page').overlayPage;
+function showSettingsMenu(editor) {
+ var sm = document.getElementById('ace_settingsmenu');
+ if (!sm)
+ overlayPage(editor, generateSettingsMenu(editor), '0', '0', '0');
+}
+module.exports.init = function(editor) {
+ var Editor = require("ace/editor").Editor;
+ Editor.prototype.showSettingsMenu = function() {
+ showSettingsMenu(this);
+ };
+};
+});
+ (function() {
+ ace.require(["ace/ext/settings_menu"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ext-spellcheck.js b/www/wiki/extensions/CodeEditor/modules/ace/ext-spellcheck.js
new file mode 100644
index 00000000..8d3b5f6c
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ext-spellcheck.js
@@ -0,0 +1,71 @@
+ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"], function(require, exports, module) {
+"use strict";
+var event = require("../lib/event");
+
+exports.contextMenuHandler = function(e){
+ var host = e.target;
+ var text = host.textInput.getElement();
+ if (!host.selection.isEmpty())
+ return;
+ var c = host.getCursorPosition();
+ var r = host.session.getWordRange(c.row, c.column);
+ var w = host.session.getTextRange(r);
+
+ host.session.tokenRe.lastIndex = 0;
+ if (!host.session.tokenRe.test(w))
+ return;
+ var PLACEHOLDER = "\x01\x01";
+ var value = w + " " + PLACEHOLDER;
+ text.value = value;
+ text.setSelectionRange(w.length, w.length + 1);
+ text.setSelectionRange(0, 0);
+ text.setSelectionRange(0, w.length);
+
+ var afterKeydown = false;
+ event.addListener(text, "keydown", function onKeydown() {
+ event.removeListener(text, "keydown", onKeydown);
+ afterKeydown = true;
+ });
+
+ host.textInput.setInputHandler(function(newVal) {
+ console.log(newVal , value, text.selectionStart, text.selectionEnd)
+ if (newVal == value)
+ return '';
+ if (newVal.lastIndexOf(value, 0) === 0)
+ return newVal.slice(value.length);
+ if (newVal.substr(text.selectionEnd) == value)
+ return newVal.slice(0, -value.length);
+ if (newVal.slice(-2) == PLACEHOLDER) {
+ var val = newVal.slice(0, -2);
+ if (val.slice(-1) == " ") {
+ if (afterKeydown)
+ return val.substring(0, text.selectionEnd);
+ val = val.slice(0, -1);
+ host.session.replace(r, val);
+ return "";
+ }
+ }
+
+ return newVal;
+ });
+};
+var Editor = require("../editor").Editor;
+require("../config").defineOptions(Editor.prototype, "editor", {
+ spellcheck: {
+ set: function(val) {
+ var text = this.textInput.getElement();
+ text.spellcheck = !!val;
+ if (!val)
+ this.removeListener("nativecontextmenu", exports.contextMenuHandler);
+ else
+ this.on("nativecontextmenu", exports.contextMenuHandler);
+ },
+ value: true
+ }
+});
+
+});
+ (function() {
+ ace.require(["ace/ext/spellcheck"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ext-split.js b/www/wiki/extensions/CodeEditor/modules/ace/ext-split.js
new file mode 100644
index 00000000..29dd20ef
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ext-split.js
@@ -0,0 +1,246 @@
+ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var lang = require("./lib/lang");
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+
+var Editor = require("./editor").Editor;
+var Renderer = require("./virtual_renderer").VirtualRenderer;
+var EditSession = require("./edit_session").EditSession;
+
+
+var Split = function(container, theme, splits) {
+ this.BELOW = 1;
+ this.BESIDE = 0;
+
+ this.$container = container;
+ this.$theme = theme;
+ this.$splits = 0;
+ this.$editorCSS = "";
+ this.$editors = [];
+ this.$orientation = this.BESIDE;
+
+ this.setSplits(splits || 1);
+ this.$cEditor = this.$editors[0];
+
+
+ this.on("focus", function(editor) {
+ this.$cEditor = editor;
+ }.bind(this));
+};
+
+(function(){
+
+ oop.implement(this, EventEmitter);
+
+ this.$createEditor = function() {
+ var el = document.createElement("div");
+ el.className = this.$editorCSS;
+ el.style.cssText = "position: absolute; top:0px; bottom:0px";
+ this.$container.appendChild(el);
+ var editor = new Editor(new Renderer(el, this.$theme));
+
+ editor.on("focus", function() {
+ this._emit("focus", editor);
+ }.bind(this));
+
+ this.$editors.push(editor);
+ editor.setFontSize(this.$fontSize);
+ return editor;
+ };
+
+ this.setSplits = function(splits) {
+ var editor;
+ if (splits < 1) {
+ throw "The number of splits have to be > 0!";
+ }
+
+ if (splits == this.$splits) {
+ return;
+ } else if (splits > this.$splits) {
+ while (this.$splits < this.$editors.length && this.$splits < splits) {
+ editor = this.$editors[this.$splits];
+ this.$container.appendChild(editor.container);
+ editor.setFontSize(this.$fontSize);
+ this.$splits ++;
+ }
+ while (this.$splits < splits) {
+ this.$createEditor();
+ this.$splits ++;
+ }
+ } else {
+ while (this.$splits > splits) {
+ editor = this.$editors[this.$splits - 1];
+ this.$container.removeChild(editor.container);
+ this.$splits --;
+ }
+ }
+ this.resize();
+ };
+ this.getSplits = function() {
+ return this.$splits;
+ };
+ this.getEditor = function(idx) {
+ return this.$editors[idx];
+ };
+ this.getCurrentEditor = function() {
+ return this.$cEditor;
+ };
+ this.focus = function() {
+ this.$cEditor.focus();
+ };
+ this.blur = function() {
+ this.$cEditor.blur();
+ };
+ this.setTheme = function(theme) {
+ this.$editors.forEach(function(editor) {
+ editor.setTheme(theme);
+ });
+ };
+ this.setKeyboardHandler = function(keybinding) {
+ this.$editors.forEach(function(editor) {
+ editor.setKeyboardHandler(keybinding);
+ });
+ };
+ this.forEach = function(callback, scope) {
+ this.$editors.forEach(callback, scope);
+ };
+
+
+ this.$fontSize = "";
+ this.setFontSize = function(size) {
+ this.$fontSize = size;
+ this.forEach(function(editor) {
+ editor.setFontSize(size);
+ });
+ };
+
+ this.$cloneSession = function(session) {
+ var s = new EditSession(session.getDocument(), session.getMode());
+
+ var undoManager = session.getUndoManager();
+ if (undoManager) {
+ var undoManagerProxy = new UndoManagerProxy(undoManager, s);
+ s.setUndoManager(undoManagerProxy);
+ }
+ s.$informUndoManager = lang.delayedCall(function() { s.$deltas = []; });
+ s.setTabSize(session.getTabSize());
+ s.setUseSoftTabs(session.getUseSoftTabs());
+ s.setOverwrite(session.getOverwrite());
+ s.setBreakpoints(session.getBreakpoints());
+ s.setUseWrapMode(session.getUseWrapMode());
+ s.setUseWorker(session.getUseWorker());
+ s.setWrapLimitRange(session.$wrapLimitRange.min,
+ session.$wrapLimitRange.max);
+ s.$foldData = session.$cloneFoldData();
+
+ return s;
+ };
+ this.setSession = function(session, idx) {
+ var editor;
+ if (idx == null) {
+ editor = this.$cEditor;
+ } else {
+ editor = this.$editors[idx];
+ }
+ var isUsed = this.$editors.some(function(editor) {
+ return editor.session === session;
+ });
+
+ if (isUsed) {
+ session = this.$cloneSession(session);
+ }
+ editor.setSession(session);
+ return session;
+ };
+ this.getOrientation = function() {
+ return this.$orientation;
+ };
+ this.setOrientation = function(orientation) {
+ if (this.$orientation == orientation) {
+ return;
+ }
+ this.$orientation = orientation;
+ this.resize();
+ };
+ this.resize = function() {
+ var width = this.$container.clientWidth;
+ var height = this.$container.clientHeight;
+ var editor;
+
+ if (this.$orientation == this.BESIDE) {
+ var editorWidth = width / this.$splits;
+ for (var i = 0; i < this.$splits; i++) {
+ editor = this.$editors[i];
+ editor.container.style.width = editorWidth + "px";
+ editor.container.style.top = "0px";
+ editor.container.style.left = i * editorWidth + "px";
+ editor.container.style.height = height + "px";
+ editor.resize();
+ }
+ } else {
+ var editorHeight = height / this.$splits;
+ for (var i = 0; i < this.$splits; i++) {
+ editor = this.$editors[i];
+ editor.container.style.width = width + "px";
+ editor.container.style.top = i * editorHeight + "px";
+ editor.container.style.left = "0px";
+ editor.container.style.height = editorHeight + "px";
+ editor.resize();
+ }
+ }
+ };
+
+}).call(Split.prototype);
+
+
+function UndoManagerProxy(undoManager, session) {
+ this.$u = undoManager;
+ this.$doc = session;
+}
+
+(function() {
+ this.execute = function(options) {
+ this.$u.execute(options);
+ };
+
+ this.undo = function() {
+ var selectionRange = this.$u.undo(true);
+ if (selectionRange) {
+ this.$doc.selection.setSelectionRange(selectionRange);
+ }
+ };
+
+ this.redo = function() {
+ var selectionRange = this.$u.redo(true);
+ if (selectionRange) {
+ this.$doc.selection.setSelectionRange(selectionRange);
+ }
+ };
+
+ this.reset = function() {
+ this.$u.reset();
+ };
+
+ this.hasUndo = function() {
+ return this.$u.hasUndo();
+ };
+
+ this.hasRedo = function() {
+ return this.$u.hasRedo();
+ };
+}).call(UndoManagerProxy.prototype);
+
+exports.Split = Split;
+});
+
+ace.define("ace/ext/split",["require","exports","module","ace/split"], function(require, exports, module) {
+"use strict";
+module.exports = require("../split");
+
+});
+ (function() {
+ ace.require(["ace/ext/split"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ext-static_highlight.js b/www/wiki/extensions/CodeEditor/modules/ace/ext-static_highlight.js
new file mode 100644
index 00000000..a875f9d7
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ext-static_highlight.js
@@ -0,0 +1,161 @@
+ace.define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom"], function(require, exports, module) {
+"use strict";
+
+var EditSession = require("../edit_session").EditSession;
+var TextLayer = require("../layer/text").Text;
+var baseStyles = ".ace_static_highlight {\
+font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', 'Droid Sans Mono', monospace;\
+font-size: 12px;\
+white-space: pre-wrap\
+}\
+.ace_static_highlight .ace_gutter {\
+width: 2em;\
+text-align: right;\
+padding: 0 3px 0 0;\
+margin-right: 3px;\
+}\
+.ace_static_highlight.ace_show_gutter .ace_line {\
+padding-left: 2.6em;\
+}\
+.ace_static_highlight .ace_line { position: relative; }\
+.ace_static_highlight .ace_gutter-cell {\
+-moz-user-select: -moz-none;\
+-khtml-user-select: none;\
+-webkit-user-select: none;\
+user-select: none;\
+top: 0;\
+bottom: 0;\
+left: 0;\
+position: absolute;\
+}\
+.ace_static_highlight .ace_gutter-cell:before {\
+content: counter(ace_line, decimal);\
+counter-increment: ace_line;\
+}\
+.ace_static_highlight {\
+counter-reset: ace_line;\
+}\
+";
+var config = require("../config");
+var dom = require("../lib/dom");
+
+var SimpleTextLayer = function() {
+ this.config = {};
+};
+SimpleTextLayer.prototype = TextLayer.prototype;
+
+var highlight = function(el, opts, callback) {
+ var m = el.className.match(/lang-(\w+)/);
+ var mode = opts.mode || m && ("ace/mode/" + m[1]);
+ if (!mode)
+ return false;
+ var theme = opts.theme || "ace/theme/textmate";
+
+ var data = "";
+ var nodes = [];
+
+ if (el.firstElementChild) {
+ var textLen = 0;
+ for (var i = 0; i < el.childNodes.length; i++) {
+ var ch = el.childNodes[i];
+ if (ch.nodeType == 3) {
+ textLen += ch.data.length;
+ data += ch.data;
+ } else {
+ nodes.push(textLen, ch);
+ }
+ }
+ } else {
+ data = dom.getInnerText(el);
+ if (opts.trim)
+ data = data.trim();
+ }
+
+ highlight.render(data, mode, theme, opts.firstLineNumber, !opts.showGutter, function (highlighted) {
+ dom.importCssString(highlighted.css, "ace_highlight");
+ el.innerHTML = highlighted.html;
+ var container = el.firstChild.firstChild;
+ for (var i = 0; i < nodes.length; i += 2) {
+ var pos = highlighted.session.doc.indexToPosition(nodes[i]);
+ var node = nodes[i + 1];
+ var lineEl = container.children[pos.row];
+ lineEl && lineEl.appendChild(node);
+ }
+ callback && callback();
+ });
+};
+highlight.render = function(input, mode, theme, lineStart, disableGutter, callback) {
+ var waiting = 1;
+ var modeCache = EditSession.prototype.$modes;
+ if (typeof theme == "string") {
+ waiting++;
+ config.loadModule(['theme', theme], function(m) {
+ theme = m;
+ --waiting || done();
+ });
+ }
+ var modeOptions;
+ if (mode && typeof mode === "object" && !mode.getTokenizer) {
+ modeOptions = mode;
+ mode = modeOptions.path;
+ }
+ if (typeof mode == "string") {
+ waiting++;
+ config.loadModule(['mode', mode], function(m) {
+ if (!modeCache[mode] || modeOptions)
+ modeCache[mode] = new m.Mode(modeOptions);
+ mode = modeCache[mode];
+ --waiting || done();
+ });
+ }
+ function done() {
+ var result = highlight.renderSync(input, mode, theme, lineStart, disableGutter);
+ return callback ? callback(result) : result;
+ }
+ return --waiting || done();
+};
+highlight.renderSync = function(input, mode, theme, lineStart, disableGutter) {
+ lineStart = parseInt(lineStart || 1, 10);
+
+ var session = new EditSession("");
+ session.setUseWorker(false);
+ session.setMode(mode);
+
+ var textLayer = new SimpleTextLayer();
+ textLayer.setSession(session);
+
+ 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("\n</div>");
+ }
+ var html = "<div class='" + theme.cssClass + "'>" +
+ "<div class='ace_static_highlight" + (disableGutter ? "" : " ace_show_gutter") +
+ "' style='counter-reset:ace_line " + (lineStart - 1) + "'>" +
+ stringBuilder.join("") +
+ "</div>" +
+ "</div>";
+
+ textLayer.destroy();
+
+ return {
+ css: baseStyles + theme.cssText,
+ html: html,
+ session: session
+ };
+};
+
+module.exports = highlight;
+module.exports.highlight = highlight;
+});
+ (function() {
+ ace.require(["ace/ext/static_highlight"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ext-statusbar.js b/www/wiki/extensions/CodeEditor/modules/ace/ext-statusbar.js
new file mode 100644
index 00000000..0c46b381
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ext-statusbar.js
@@ -0,0 +1,53 @@
+ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+var dom = require("ace/lib/dom");
+var lang = require("ace/lib/lang");
+
+var StatusBar = function(editor, parentNode) {
+ this.element = dom.createElement("div");
+ this.element.className = "ace_status-indicator";
+ this.element.style.cssText = "display: inline-block;";
+ parentNode.appendChild(this.element);
+
+ var statusUpdate = lang.delayedCall(function(){
+ this.updateStatus(editor)
+ }.bind(this)).schedule.bind(null, 100);
+
+ editor.on("changeStatus", statusUpdate);
+ editor.on("changeSelection", statusUpdate);
+ editor.on("keyboardActivity", statusUpdate);
+};
+
+(function(){
+ this.updateStatus = function(editor) {
+ var status = [];
+ function add(str, separator) {
+ str && status.push(str, separator || "|");
+ }
+
+ add(editor.keyBinding.getStatusText(editor));
+ if (editor.commands.recording)
+ add("REC");
+
+ var sel = editor.selection;
+ var c = sel.lead;
+
+ if (!sel.isEmpty()) {
+ var r = editor.getSelectionRange();
+ add("(" + (r.end.row - r.start.row) + ":" +(r.end.column - r.start.column) + ")", " ");
+ }
+ add(c.row + ":" + c.column, " ");
+ if (sel.rangeCount)
+ add("[" + sel.rangeCount + "]", " ");
+ status.pop();
+ this.element.textContent = status.join("");
+ };
+}).call(StatusBar.prototype);
+
+exports.StatusBar = StatusBar;
+
+});
+ (function() {
+ ace.require(["ace/ext/statusbar"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ext-textarea.js b/www/wiki/extensions/CodeEditor/modules/ace/ext-textarea.js
new file mode 100644
index 00000000..f3bc70af
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ext-textarea.js
@@ -0,0 +1,560 @@
+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_gutter {\
+background: #f0f0f0;\
+color: #333;\
+}\
+.ace-tm .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8;\
+}\
+.ace-tm .ace_fold {\
+background-color: #6B72E6;\
+}\
+.ace-tm {\
+background-color: #FFFFFF;\
+color: black;\
+}\
+.ace-tm .ace_cursor {\
+color: 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_heading {\
+color: rgb(12, 7, 255);\
+}\
+.ace-tm .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;\
+}\
+.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);
+});
+
+ace.define("ace/ext/textarea",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/net","ace/ace","ace/theme/textmate"], function(require, exports, module) {
+"use strict";
+
+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 new Error("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();
+ parentNode.insertBefore(container, element.nextSibling);
+ while (parentNode !== document) {
+ if (parentNode.tagName.toUpperCase() === 'FORM') {
+ var oldSumit = parentNode.onsubmit;
+ parentNode.onsubmit = function(evt) {
+ element.value = getValue();
+ if (oldSumit) {
+ oldSumit.call(this, evt);
+ }
+ };
+ break;
+ }
+ parentNode = parentNode.parentNode;
+ }
+ return container;
+}
+
+exports.transformTextarea = function(element, options) {
+ 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",
+ position: "absolute"
+ });
+ 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: "20%",
+ right: "0px",
+ bottom: "0px",
+ position: "absolute",
+ padding: "5px",
+ zIndex: 100,
+ color: "white",
+ display: "none",
+ overflow: "auto",
+ fontSize: "14px",
+ boxShadow: "-5px 2px 3px gray"
+ };
+ if (!UA.isOldIE) {
+ settingDivStyles.backgroundColor = "rgba(0, 0, 0, 0.6)";
+ } else {
+ settingDivStyles.backgroundColor = "#333";
+ }
+
+ applyStyles(settingDiv, settingDivStyles);
+ container.appendChild(settingDiv);
+
+ options = options || exports.defaultOptions;
+ var editor = ace.edit(editorDiv);
+ session = editor.getSession();
+
+ session.setValue(element.value || element.innerHTML);
+ editor.focus();
+ container.appendChild(settingOpener);
+ setupApi(editor, editorDiv, settingDiv, ace, options, load);
+ setupSettingPanel(settingDiv, settingOpener, editor);
+
+ 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" || value == true;
+ }
+
+ editor.setDisplaySettings = function(display) {
+ if (display == null)
+ display = settingDiv.style.display == "none";
+ if (display) {
+ settingDiv.style.display = "block";
+ settingDiv.hideButton.focus();
+ editor.on("focus", function onFocus() {
+ editor.removeListener("focus", onFocus);
+ settingDiv.style.display = "none";
+ });
+ } else {
+ editor.focus();
+ }
+ };
+
+ editor.$setOption = editor.setOption;
+ editor.$getOption = editor.getOption;
+ editor.setOption = function(key, value) {
+ switch (key) {
+ case "mode":
+ editor.$setOption("mode", "ace/mode/" + value)
+ break;
+ case "theme":
+ editor.$setOption("theme", "ace/theme/" + value)
+ break;
+ case "keybindings":
+ switch (value) {
+ case "vim":
+ editor.setKeyboardHandler("ace/keyboard/vim");
+ break;
+ case "emacs":
+ editor.setKeyboardHandler("ace/keyboard/emacs");
+ break;
+ default:
+ editor.setKeyboardHandler(null);
+ }
+ break;
+
+ case "softWrap":
+ case "fontSize":
+ editor.$setOption(key, value);
+ break;
+
+ default:
+ editor.$setOption(key, toBool(value));
+ }
+ };
+
+ editor.getOption = function(key) {
+ switch (key) {
+ case "mode":
+ return editor.$getOption("mode").substr("ace/mode/".length)
+ break;
+
+ case "theme":
+ return editor.$getOption("theme").substr("ace/theme/".length)
+ break;
+
+ case "keybindings":
+ var value = editor.getKeyboardHandler()
+ switch (value && value.$id) {
+ case "ace/keyboard/vim":
+ return "vim";
+ case "ace/keyboard/emacs":
+ return "emacs";
+ default:
+ return "ace";
+ }
+ break;
+
+ default:
+ return editor.$getOption(key);
+ }
+ };
+
+ editor.setOptions(options);
+ return editor;
+}
+
+function setupSettingPanel(settingDiv, settingOpener, editor) {
+ var BOOL = null;
+
+ var desc = {
+ mode: "Mode:",
+ wrap: "Soft Wrap:",
+ theme: "Theme:",
+ fontSize: "Font Size:",
+ showGutter: "Display Gutter:",
+ keybindings: "Keyboard",
+ 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",
+ gob: "Green on Black",
+ 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"
+ },
+ showGutter: BOOL,
+ fontSize: {
+ "10px": "10px",
+ "11px": "11px",
+ "12px": "12px",
+ "14px": "14px",
+ "16px": "16px"
+ },
+ wrap: {
+ off: "Off",
+ 40: "40",
+ 80: "80",
+ free: "Free"
+ },
+ keybindings: {
+ ace: "ace",
+ vim: "vim",
+ emacs: "emacs"
+ },
+ 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) {
+ if (!obj) {
+ builder.push(
+ "<input type='checkbox' title='", option, "' ",
+ cValue + "" == "true" ? "checked='true'" : "",
+ "'></input>"
+ );
+ return;
+ }
+ 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 exports.defaultOptions) {
+ table.push("<tr><td>", desc[option], "</td>");
+ table.push("<td>");
+ renderOption(table, option, optionValues[option], editor.getOption(option));
+ table.push("</td></tr>");
+ }
+ table.push("</table>");
+ settingDiv.innerHTML = table.join("");
+
+ var onChange = function(e) {
+ var select = e.currentTarget;
+ editor.setOption(select.title, select.value);
+ };
+ var onClick = function(e) {
+ var cb = e.currentTarget;
+ editor.setOption(cb.title, cb.checked);
+ };
+ var selects = settingDiv.getElementsByTagName("select");
+ for (var i = 0; i < selects.length; i++)
+ selects[i].onchange = onChange;
+ var cbs = settingDiv.getElementsByTagName("input");
+ for (var i = 0; i < cbs.length; i++)
+ cbs[i].onclick = onClick;
+
+
+ var button = document.createElement("input");
+ button.type = "button";
+ button.value = "Hide";
+ event.addListener(button, "click", function() {
+ editor.setDisplaySettings(false);
+ });
+ settingDiv.appendChild(button);
+ settingDiv.hideButton = button;
+}
+exports.defaultOptions = {
+ mode: "javascript",
+ theme: "textmate",
+ wrap: "off",
+ fontSize: "12px",
+ showGutter: "false",
+ keybindings: "ace",
+ showPrintMargin: "false",
+ useSoftTabs: "true",
+ showInvisibles: "false"
+};
+
+});
+ (function() {
+ ace.require(["ace/ext/textarea"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ext-themelist.js b/www/wiki/extensions/CodeEditor/modules/ace/ext-themelist.js
new file mode 100644
index 00000000..53225ada
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ext-themelist.js
@@ -0,0 +1,62 @@
+ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"], function(require, exports, module) {
+"use strict";
+require("ace/lib/fixoldbrowsers");
+
+var themeData = [
+ ["Chrome" ],
+ ["Clouds" ],
+ ["Crimson Editor" ],
+ ["Dawn" ],
+ ["Dreamweaver" ],
+ ["Eclipse" ],
+ ["GitHub" ],
+ ["IPlastic" ],
+ ["Solarized Light"],
+ ["TextMate" ],
+ ["Tomorrow" ],
+ ["XCode" ],
+ ["Kuroir"],
+ ["KatzenMilch"],
+ ["SQL Server" ,"sqlserver" , "light"],
+ ["Ambiance" ,"ambiance" , "dark"],
+ ["Chaos" ,"chaos" , "dark"],
+ ["Clouds Midnight" ,"clouds_midnight" , "dark"],
+ ["Cobalt" ,"cobalt" , "dark"],
+ ["Gruvbox" ,"gruvbox" , "dark"],
+ ["Green on Black" ,"gob" , "dark"],
+ ["idle Fingers" ,"idle_fingers" , "dark"],
+ ["krTheme" ,"kr_theme" , "dark"],
+ ["Merbivore" ,"merbivore" , "dark"],
+ ["Merbivore Soft" ,"merbivore_soft" , "dark"],
+ ["Mono Industrial" ,"mono_industrial" , "dark"],
+ ["Monokai" ,"monokai" , "dark"],
+ ["Pastel on dark" ,"pastel_on_dark" , "dark"],
+ ["Solarized Dark" ,"solarized_dark" , "dark"],
+ ["Terminal" ,"terminal" , "dark"],
+ ["Tomorrow Night" ,"tomorrow_night" , "dark"],
+ ["Tomorrow Night Blue" ,"tomorrow_night_blue" , "dark"],
+ ["Tomorrow Night Bright","tomorrow_night_bright" , "dark"],
+ ["Tomorrow Night 80s" ,"tomorrow_night_eighties" , "dark"],
+ ["Twilight" ,"twilight" , "dark"],
+ ["Vibrant Ink" ,"vibrant_ink" , "dark"]
+];
+
+
+exports.themesByName = {};
+exports.themes = themeData.map(function(data) {
+ var name = data[1] || data[0].replace(/ /g, "_").toLowerCase();
+ var theme = {
+ caption: data[0],
+ theme: "ace/theme/" + name,
+ isDark: data[2] == "dark",
+ name: name
+ };
+ exports.themesByName[name] = theme;
+ return theme;
+});
+
+});
+ (function() {
+ ace.require(["ace/ext/themelist"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/ext-whitespace.js b/www/wiki/extensions/CodeEditor/modules/ace/ext-whitespace.js
new file mode 100644
index 00000000..8f4af96c
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/ext-whitespace.js
@@ -0,0 +1,206 @@
+ace.define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var lang = require("../lib/lang");
+exports.$detectIndentation = function(lines, fallback) {
+ var stats = [];
+ var changes = [];
+ var tabIndents = 0;
+ var prevSpaces = 0;
+ var max = Math.min(lines.length, 1000);
+ for (var i = 0; i < max; i++) {
+ var line = lines[i];
+ if (!/^\s*[^*+\-\s]/.test(line))
+ continue;
+
+ if (line[0] == "\t") {
+ tabIndents++;
+ prevSpaces = -Number.MAX_VALUE;
+ } else {
+ var spaces = line.match(/^ */)[0].length;
+ if (spaces && line[spaces] != "\t") {
+ var diff = spaces - prevSpaces;
+ if (diff > 0 && !(prevSpaces%diff) && !(spaces%diff))
+ changes[diff] = (changes[diff] || 0) + 1;
+
+ stats[spaces] = (stats[spaces] || 0) + 1;
+ }
+ prevSpaces = spaces;
+ }
+ while (i < max && line[line.length - 1] == "\\")
+ line = lines[i++];
+ }
+
+ function getScore(indent) {
+ var score = 0;
+ for (var i = indent; i < stats.length; i += indent)
+ score += stats[i] || 0;
+ return score;
+ }
+
+ var changesTotal = changes.reduce(function(a,b){return a+b}, 0);
+
+ var first = {score: 0, length: 0};
+ var spaceIndents = 0;
+ for (var i = 1; i < 12; i++) {
+ var score = getScore(i);
+ if (i == 1) {
+ spaceIndents = score;
+ score = stats[1] ? 0.9 : 0.8;
+ if (!stats.length)
+ score = 0;
+ } else
+ score /= spaceIndents;
+
+ if (changes[i])
+ score += changes[i] / changesTotal;
+
+ if (score > first.score)
+ first = {score: score, length: i};
+ }
+
+ if (first.score && first.score > 1.4)
+ var tabLength = first.length;
+
+ if (tabIndents > spaceIndents + 1) {
+ if (tabLength == 1 || spaceIndents < tabIndents / 4 || first.score < 1.8)
+ tabLength = undefined;
+ return {ch: "\t", length: tabLength};
+ }
+ if (spaceIndents > tabIndents + 1)
+ return {ch: " ", length: tabLength};
+};
+
+exports.detectIndentation = function(session) {
+ var lines = session.getLines(0, 1000);
+ var indent = exports.$detectIndentation(lines) || {};
+
+ if (indent.ch)
+ session.setUseSoftTabs(indent.ch == " ");
+
+ if (indent.length)
+ session.setTabSize(indent.length);
+ return indent;
+};
+exports.trimTrailingSpace = function(session, options) {
+ var doc = session.getDocument();
+ var lines = doc.getAllLines();
+
+ var min = options && options.trimEmpty ? -1 : 0;
+ var cursors = [], ci = -1;
+ if (options && options.keepCursorPosition) {
+ if (session.selection.rangeCount) {
+ session.selection.rangeList.ranges.forEach(function(x, i, ranges) {
+ var next = ranges[i + 1];
+ if (next && next.cursor.row == x.cursor.row)
+ return;
+ cursors.push(x.cursor);
+ });
+ } else {
+ cursors.push(session.selection.getCursor());
+ }
+ ci = 0;
+ }
+ var cursorRow = cursors[ci] && cursors[ci].row;
+
+ for (var i = 0, l=lines.length; i < l; i++) {
+ var line = lines[i];
+ var index = line.search(/\s+$/);
+
+ if (i == cursorRow) {
+ if (index < cursors[ci].column && index > min)
+ index = cursors[ci].column;
+ ci++;
+ cursorRow = cursors[ci] ? cursors[ci].row : -1;
+ }
+
+ if (index > min)
+ doc.removeInLine(i, index, line.length);
+ }
+};
+
+exports.convertIndentation = function(session, ch, len) {
+ var oldCh = session.getTabString()[0];
+ var oldLen = session.getTabSize();
+ if (!len) len = oldLen;
+ if (!ch) ch = oldCh;
+
+ var tab = ch == "\t" ? ch: lang.stringRepeat(ch, len);
+
+ var doc = session.doc;
+ var lines = doc.getAllLines();
+
+ var cache = {};
+ var spaceCache = {};
+ for (var i = 0, l=lines.length; i < l; i++) {
+ var line = lines[i];
+ var match = line.match(/^\s*/)[0];
+ if (match) {
+ var w = session.$getStringScreenWidth(match)[0];
+ var tabCount = Math.floor(w/oldLen);
+ var reminder = w%oldLen;
+ var toInsert = cache[tabCount] || (cache[tabCount] = lang.stringRepeat(tab, tabCount));
+ toInsert += spaceCache[reminder] || (spaceCache[reminder] = lang.stringRepeat(" ", reminder));
+
+ if (toInsert != match) {
+ doc.removeInLine(i, 0, match.length);
+ doc.insertInLine({row: i, column: 0}, toInsert);
+ }
+ }
+ }
+ session.setTabSize(len);
+ session.setUseSoftTabs(ch == " ");
+};
+
+exports.$parseStringArg = function(text) {
+ var indent = {};
+ if (/t/.test(text))
+ indent.ch = "\t";
+ else if (/s/.test(text))
+ indent.ch = " ";
+ var m = text.match(/\d+/);
+ if (m)
+ indent.length = parseInt(m[0], 10);
+ return indent;
+};
+
+exports.$parseArg = function(arg) {
+ if (!arg)
+ return {};
+ if (typeof arg == "string")
+ return exports.$parseStringArg(arg);
+ if (typeof arg.text == "string")
+ return exports.$parseStringArg(arg.text);
+ return arg;
+};
+
+exports.commands = [{
+ name: "detectIndentation",
+ exec: function(editor) {
+ exports.detectIndentation(editor.session);
+ }
+}, {
+ name: "trimTrailingSpace",
+ exec: function(editor) {
+ exports.trimTrailingSpace(editor.session);
+ }
+}, {
+ name: "convertIndentation",
+ exec: function(editor, arg) {
+ var indent = exports.$parseArg(arg);
+ exports.convertIndentation(editor.session, indent.ch, indent.length);
+ }
+}, {
+ name: "setIndentation",
+ exec: function(editor, arg) {
+ var indent = exports.$parseArg(arg);
+ indent.length && editor.session.setTabSize(indent.length);
+ indent.ch && editor.session.setUseSoftTabs(indent.ch == " ");
+ }
+}];
+
+});
+ (function() {
+ ace.require(["ace/ext/whitespace"], function() {});
+ })();
+ \ No newline at end of file
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/keybinding-emacs.js b/www/wiki/extensions/CodeEditor/modules/ace/keybinding-emacs.js
new file mode 100644
index 00000000..8816abad
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/keybinding-emacs.js
@@ -0,0 +1,1181 @@
+ace.define("ace/occur",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/edit_session","ace/search_highlight","ace/lib/dom"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var Range = require("./range").Range;
+var Search = require("./search").Search;
+var EditSession = require("./edit_session").EditSession;
+var SearchHighlight = require("./search_highlight").SearchHighlight;
+function Occur() {}
+
+oop.inherits(Occur, Search);
+
+(function() {
+ this.enter = function(editor, options) {
+ if (!options.needle) return false;
+ var pos = editor.getCursorPosition();
+ this.displayOccurContent(editor, options);
+ var translatedPos = this.originalToOccurPosition(editor.session, pos);
+ editor.moveCursorToPosition(translatedPos);
+ return true;
+ }
+ this.exit = function(editor, options) {
+ var pos = options.translatePosition && editor.getCursorPosition();
+ var translatedPos = pos && this.occurToOriginalPosition(editor.session, pos);
+ this.displayOriginalContent(editor);
+ if (translatedPos)
+ editor.moveCursorToPosition(translatedPos);
+ return true;
+ }
+
+ this.highlight = function(sess, regexp) {
+ var hl = sess.$occurHighlight = sess.$occurHighlight || sess.addDynamicMarker(
+ new SearchHighlight(null, "ace_occur-highlight", "text"));
+ hl.setRegexp(regexp);
+ sess._emit("changeBackMarker"); // force highlight layer redraw
+ }
+
+ this.displayOccurContent = function(editor, options) {
+ this.$originalSession = editor.session;
+ var found = this.matchingLines(editor.session, options);
+ var lines = found.map(function(foundLine) { return foundLine.content; });
+ var occurSession = new EditSession(lines.join('\n'));
+ occurSession.$occur = this;
+ occurSession.$occurMatchingLines = found;
+ editor.setSession(occurSession);
+ this.$useEmacsStyleLineStart = this.$originalSession.$useEmacsStyleLineStart;
+ occurSession.$useEmacsStyleLineStart = this.$useEmacsStyleLineStart;
+ this.highlight(occurSession, options.re);
+ occurSession._emit('changeBackMarker');
+ }
+
+ this.displayOriginalContent = function(editor) {
+ editor.setSession(this.$originalSession);
+ this.$originalSession.$useEmacsStyleLineStart = this.$useEmacsStyleLineStart;
+ }
+ this.originalToOccurPosition = function(session, pos) {
+ var lines = session.$occurMatchingLines;
+ var nullPos = {row: 0, column: 0};
+ if (!lines) return nullPos;
+ for (var i = 0; i < lines.length; i++) {
+ if (lines[i].row === pos.row)
+ return {row: i, column: pos.column};
+ }
+ return nullPos;
+ }
+ this.occurToOriginalPosition = function(session, pos) {
+ var lines = session.$occurMatchingLines;
+ if (!lines || !lines[pos.row])
+ return pos;
+ return {row: lines[pos.row].row, column: pos.column};
+ }
+
+ this.matchingLines = function(session, options) {
+ options = oop.mixin({}, options);
+ if (!session || !options.needle) return [];
+ var search = new Search();
+ search.set(options);
+ return search.findAll(session).reduce(function(lines, range) {
+ var row = range.start.row;
+ var last = lines[lines.length-1];
+ return last && last.row === row ?
+ lines :
+ lines.concat({row: row, content: session.getLine(row)});
+ }, []);
+ }
+
+}).call(Occur.prototype);
+
+var dom = require('./lib/dom');
+dom.importCssString(".ace_occur-highlight {\n\
+ border-radius: 4px;\n\
+ background-color: rgba(87, 255, 8, 0.25);\n\
+ position: absolute;\n\
+ z-index: 4;\n\
+ -moz-box-sizing: border-box;\n\
+ -webkit-box-sizing: border-box;\n\
+ box-sizing: border-box;\n\
+ box-shadow: 0 0 4px rgb(91, 255, 50);\n\
+}\n\
+.ace_dark .ace_occur-highlight {\n\
+ background-color: rgb(80, 140, 85);\n\
+ box-shadow: 0 0 4px rgb(60, 120, 70);\n\
+}\n", "incremental-occur-highlighting");
+
+exports.Occur = Occur;
+
+});
+
+ace.define("ace/commands/occur_commands",["require","exports","module","ace/config","ace/occur","ace/keyboard/hash_handler","ace/lib/oop"], function(require, exports, module) {
+
+var config = require("../config"),
+ Occur = require("../occur").Occur;
+var occurStartCommand = {
+ name: "occur",
+ exec: function(editor, options) {
+ var alreadyInOccur = !!editor.session.$occur;
+ var occurSessionActive = new Occur().enter(editor, options);
+ if (occurSessionActive && !alreadyInOccur)
+ OccurKeyboardHandler.installIn(editor);
+ },
+ readOnly: true
+};
+
+var occurCommands = [{
+ name: "occurexit",
+ bindKey: 'esc|Ctrl-G',
+ exec: function(editor) {
+ var occur = editor.session.$occur;
+ if (!occur) return;
+ occur.exit(editor, {});
+ if (!editor.session.$occur) OccurKeyboardHandler.uninstallFrom(editor);
+ },
+ readOnly: true
+}, {
+ name: "occuraccept",
+ bindKey: 'enter',
+ exec: function(editor) {
+ var occur = editor.session.$occur;
+ if (!occur) return;
+ occur.exit(editor, {translatePosition: true});
+ if (!editor.session.$occur) OccurKeyboardHandler.uninstallFrom(editor);
+ },
+ readOnly: true
+}];
+
+var HashHandler = require("../keyboard/hash_handler").HashHandler;
+var oop = require("../lib/oop");
+
+
+function OccurKeyboardHandler() {}
+
+oop.inherits(OccurKeyboardHandler, HashHandler);
+
+(function() {
+
+ this.isOccurHandler = true;
+
+ this.attach = function(editor) {
+ HashHandler.call(this, occurCommands, editor.commands.platform);
+ this.$editor = editor;
+ }
+
+ var handleKeyboard$super = this.handleKeyboard;
+ this.handleKeyboard = function(data, hashId, key, keyCode) {
+ var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode);
+ return (cmd && cmd.command) ? cmd : undefined;
+ }
+
+}).call(OccurKeyboardHandler.prototype);
+
+OccurKeyboardHandler.installIn = function(editor) {
+ var handler = new this();
+ editor.keyBinding.addKeyboardHandler(handler);
+ editor.commands.addCommands(occurCommands);
+}
+
+OccurKeyboardHandler.uninstallFrom = function(editor) {
+ editor.commands.removeCommands(occurCommands);
+ var handler = editor.getKeyboardHandler();
+ if (handler.isOccurHandler)
+ editor.keyBinding.removeKeyboardHandler(handler);
+}
+
+exports.occurStartCommand = occurStartCommand;
+
+});
+
+ace.define("ace/commands/incremental_search_commands",["require","exports","module","ace/config","ace/lib/oop","ace/keyboard/hash_handler","ace/commands/occur_commands"], function(require, exports, module) {
+
+var config = require("../config");
+var oop = require("../lib/oop");
+var HashHandler = require("../keyboard/hash_handler").HashHandler;
+var occurStartCommand = require("./occur_commands").occurStartCommand;
+exports.iSearchStartCommands = [{
+ name: "iSearch",
+ bindKey: {win: "Ctrl-F", mac: "Command-F"},
+ exec: function(editor, options) {
+ config.loadModule(["core", "ace/incremental_search"], function(e) {
+ var iSearch = e.iSearch = e.iSearch || new e.IncrementalSearch();
+ iSearch.activate(editor, options.backwards);
+ if (options.jumpToFirstMatch) iSearch.next(options);
+ });
+ },
+ readOnly: true
+}, {
+ name: "iSearchBackwards",
+ exec: function(editor, jumpToNext) { editor.execCommand('iSearch', {backwards: true}); },
+ readOnly: true
+}, {
+ name: "iSearchAndGo",
+ bindKey: {win: "Ctrl-K", mac: "Command-G"},
+ exec: function(editor, jumpToNext) { editor.execCommand('iSearch', {jumpToFirstMatch: true, useCurrentOrPrevSearch: true}); },
+ readOnly: true
+}, {
+ name: "iSearchBackwardsAndGo",
+ bindKey: {win: "Ctrl-Shift-K", mac: "Command-Shift-G"},
+ exec: function(editor) { editor.execCommand('iSearch', {jumpToFirstMatch: true, backwards: true, useCurrentOrPrevSearch: true}); },
+ readOnly: true
+}];
+exports.iSearchCommands = [{
+ name: "restartSearch",
+ bindKey: {win: "Ctrl-F", mac: "Command-F"},
+ exec: function(iSearch) {
+ iSearch.cancelSearch(true);
+ }
+}, {
+ name: "searchForward",
+ bindKey: {win: "Ctrl-S|Ctrl-K", mac: "Ctrl-S|Command-G"},
+ exec: function(iSearch, options) {
+ options.useCurrentOrPrevSearch = true;
+ iSearch.next(options);
+ }
+}, {
+ name: "searchBackward",
+ bindKey: {win: "Ctrl-R|Ctrl-Shift-K", mac: "Ctrl-R|Command-Shift-G"},
+ exec: function(iSearch, options) {
+ options.useCurrentOrPrevSearch = true;
+ options.backwards = true;
+ iSearch.next(options);
+ }
+}, {
+ name: "extendSearchTerm",
+ exec: function(iSearch, string) {
+ iSearch.addString(string);
+ }
+}, {
+ name: "extendSearchTermSpace",
+ bindKey: "space",
+ exec: function(iSearch) { iSearch.addString(' '); }
+}, {
+ name: "shrinkSearchTerm",
+ bindKey: "backspace",
+ exec: function(iSearch) {
+ iSearch.removeChar();
+ }
+}, {
+ name: 'confirmSearch',
+ bindKey: 'return',
+ exec: function(iSearch) { iSearch.deactivate(); }
+}, {
+ name: 'cancelSearch',
+ bindKey: 'esc|Ctrl-G',
+ exec: function(iSearch) { iSearch.deactivate(true); }
+}, {
+ name: 'occurisearch',
+ bindKey: 'Ctrl-O',
+ exec: function(iSearch) {
+ var options = oop.mixin({}, iSearch.$options);
+ iSearch.deactivate();
+ occurStartCommand.exec(iSearch.$editor, options);
+ }
+}, {
+ name: "yankNextWord",
+ bindKey: "Ctrl-w",
+ exec: function(iSearch) {
+ var ed = iSearch.$editor,
+ range = ed.selection.getRangeOfMovements(function(sel) { sel.moveCursorWordRight(); }),
+ string = ed.session.getTextRange(range);
+ iSearch.addString(string);
+ }
+}, {
+ name: "yankNextChar",
+ bindKey: "Ctrl-Alt-y",
+ exec: function(iSearch) {
+ var ed = iSearch.$editor,
+ range = ed.selection.getRangeOfMovements(function(sel) { sel.moveCursorRight(); }),
+ string = ed.session.getTextRange(range);
+ iSearch.addString(string);
+ }
+}, {
+ name: 'recenterTopBottom',
+ bindKey: 'Ctrl-l',
+ exec: function(iSearch) { iSearch.$editor.execCommand('recenterTopBottom'); }
+}, {
+ name: 'selectAllMatches',
+ bindKey: 'Ctrl-space',
+ exec: function(iSearch) {
+ var ed = iSearch.$editor,
+ hl = ed.session.$isearchHighlight,
+ ranges = hl && hl.cache ? hl.cache
+ .reduce(function(ranges, ea) {
+ return ranges.concat(ea ? ea : []); }, []) : [];
+ iSearch.deactivate(false);
+ ranges.forEach(ed.selection.addRange.bind(ed.selection));
+ }
+}, {
+ name: 'searchAsRegExp',
+ bindKey: 'Alt-r',
+ exec: function(iSearch) {
+ iSearch.convertNeedleToRegExp();
+ }
+}].map(function(cmd) {
+ cmd.readOnly = true;
+ cmd.isIncrementalSearchCommand = true;
+ cmd.scrollIntoView = "animate-cursor";
+ return cmd;
+});
+
+function IncrementalSearchKeyboardHandler(iSearch) {
+ this.$iSearch = iSearch;
+}
+
+oop.inherits(IncrementalSearchKeyboardHandler, HashHandler);
+
+(function() {
+
+ this.attach = function(editor) {
+ var iSearch = this.$iSearch;
+ HashHandler.call(this, exports.iSearchCommands, editor.commands.platform);
+ this.$commandExecHandler = editor.commands.addEventListener('exec', function(e) {
+ if (!e.command.isIncrementalSearchCommand)
+ return iSearch.deactivate();
+ e.stopPropagation();
+ e.preventDefault();
+ var scrollTop = editor.session.getScrollTop();
+ var result = e.command.exec(iSearch, e.args || {});
+ editor.renderer.scrollCursorIntoView(null, 0.5);
+ editor.renderer.animateScrolling(scrollTop);
+ return result;
+ });
+ };
+
+ this.detach = function(editor) {
+ if (!this.$commandExecHandler) return;
+ editor.commands.removeEventListener('exec', this.$commandExecHandler);
+ delete this.$commandExecHandler;
+ };
+
+ var handleKeyboard$super = this.handleKeyboard;
+ this.handleKeyboard = function(data, hashId, key, keyCode) {
+ if (((hashId === 1/*ctrl*/ || hashId === 8/*command*/) && key === 'v')
+ || (hashId === 1/*ctrl*/ && key === 'y')) return null;
+ var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode);
+ if (cmd.command) { return cmd; }
+ if (hashId == -1) {
+ var extendCmd = this.commands.extendSearchTerm;
+ if (extendCmd) { return {command: extendCmd, args: key}; }
+ }
+ return false;
+ };
+
+}).call(IncrementalSearchKeyboardHandler.prototype);
+
+
+exports.IncrementalSearchKeyboardHandler = IncrementalSearchKeyboardHandler;
+
+});
+
+ace.define("ace/incremental_search",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/search_highlight","ace/commands/incremental_search_commands","ace/lib/dom","ace/commands/command_manager","ace/editor","ace/config"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var Range = require("./range").Range;
+var Search = require("./search").Search;
+var SearchHighlight = require("./search_highlight").SearchHighlight;
+var iSearchCommandModule = require("./commands/incremental_search_commands");
+var ISearchKbd = iSearchCommandModule.IncrementalSearchKeyboardHandler;
+function IncrementalSearch() {
+ this.$options = {wrap: false, skipCurrent: false};
+ this.$keyboardHandler = new ISearchKbd(this);
+}
+
+oop.inherits(IncrementalSearch, Search);
+
+function isRegExp(obj) {
+ return obj instanceof RegExp;
+}
+
+function regExpToObject(re) {
+ var string = String(re),
+ start = string.indexOf('/'),
+ flagStart = string.lastIndexOf('/');
+ return {
+ expression: string.slice(start+1, flagStart),
+ flags: string.slice(flagStart+1)
+ }
+}
+
+function stringToRegExp(string, flags) {
+ try {
+ return new RegExp(string, flags);
+ } catch (e) { return string; }
+}
+
+function objectToRegExp(obj) {
+ return stringToRegExp(obj.expression, obj.flags);
+}
+
+(function() {
+
+ this.activate = function(ed, backwards) {
+ this.$editor = ed;
+ this.$startPos = this.$currentPos = ed.getCursorPosition();
+ this.$options.needle = '';
+ this.$options.backwards = backwards;
+ ed.keyBinding.addKeyboardHandler(this.$keyboardHandler);
+ this.$originalEditorOnPaste = ed.onPaste; ed.onPaste = this.onPaste.bind(this);
+ this.$mousedownHandler = ed.addEventListener('mousedown', this.onMouseDown.bind(this));
+ this.selectionFix(ed);
+ this.statusMessage(true);
+ };
+
+ this.deactivate = function(reset) {
+ this.cancelSearch(reset);
+ var ed = this.$editor;
+ ed.keyBinding.removeKeyboardHandler(this.$keyboardHandler);
+ if (this.$mousedownHandler) {
+ ed.removeEventListener('mousedown', this.$mousedownHandler);
+ delete this.$mousedownHandler;
+ }
+ ed.onPaste = this.$originalEditorOnPaste;
+ this.message('');
+ };
+
+ this.selectionFix = function(editor) {
+ if (editor.selection.isEmpty() && !editor.session.$emacsMark) {
+ editor.clearSelection();
+ }
+ };
+
+ this.highlight = function(regexp) {
+ var sess = this.$editor.session,
+ hl = sess.$isearchHighlight = sess.$isearchHighlight || sess.addDynamicMarker(
+ new SearchHighlight(null, "ace_isearch-result", "text"));
+ hl.setRegexp(regexp);
+ sess._emit("changeBackMarker"); // force highlight layer redraw
+ };
+
+ this.cancelSearch = function(reset) {
+ var e = this.$editor;
+ this.$prevNeedle = this.$options.needle;
+ this.$options.needle = '';
+ if (reset) {
+ e.moveCursorToPosition(this.$startPos);
+ this.$currentPos = this.$startPos;
+ } else {
+ e.pushEmacsMark && e.pushEmacsMark(this.$startPos, false);
+ }
+ this.highlight(null);
+ return Range.fromPoints(this.$currentPos, this.$currentPos);
+ };
+
+ this.highlightAndFindWithNeedle = function(moveToNext, needleUpdateFunc) {
+ if (!this.$editor) return null;
+ var options = this.$options;
+ if (needleUpdateFunc) {
+ options.needle = needleUpdateFunc.call(this, options.needle || '') || '';
+ }
+ if (options.needle.length === 0) {
+ this.statusMessage(true);
+ return this.cancelSearch(true);
+ }
+ options.start = this.$currentPos;
+ var session = this.$editor.session,
+ found = this.find(session),
+ shouldSelect = this.$editor.emacsMark ?
+ !!this.$editor.emacsMark() : !this.$editor.selection.isEmpty();
+ if (found) {
+ if (options.backwards) found = Range.fromPoints(found.end, found.start);
+ this.$editor.selection.setRange(Range.fromPoints(shouldSelect ? this.$startPos : found.end, found.end));
+ if (moveToNext) this.$currentPos = found.end;
+ this.highlight(options.re);
+ }
+
+ this.statusMessage(found);
+
+ return found;
+ };
+
+ this.addString = function(s) {
+ return this.highlightAndFindWithNeedle(false, function(needle) {
+ if (!isRegExp(needle))
+ return needle + s;
+ var reObj = regExpToObject(needle);
+ reObj.expression += s;
+ return objectToRegExp(reObj);
+ });
+ };
+
+ this.removeChar = function(c) {
+ return this.highlightAndFindWithNeedle(false, function(needle) {
+ if (!isRegExp(needle))
+ return needle.substring(0, needle.length-1);
+ var reObj = regExpToObject(needle);
+ reObj.expression = reObj.expression.substring(0, reObj.expression.length-1);
+ return objectToRegExp(reObj);
+ });
+ };
+
+ this.next = function(options) {
+ options = options || {};
+ this.$options.backwards = !!options.backwards;
+ this.$currentPos = this.$editor.getCursorPosition();
+ return this.highlightAndFindWithNeedle(true, function(needle) {
+ return options.useCurrentOrPrevSearch && needle.length === 0 ?
+ this.$prevNeedle || '' : needle;
+ });
+ };
+
+ this.onMouseDown = function(evt) {
+ this.deactivate();
+ return true;
+ };
+
+ this.onPaste = function(text) {
+ this.addString(text);
+ };
+
+ this.convertNeedleToRegExp = function() {
+ return this.highlightAndFindWithNeedle(false, function(needle) {
+ return isRegExp(needle) ? needle : stringToRegExp(needle, 'ig');
+ });
+ };
+
+ this.convertNeedleToString = function() {
+ return this.highlightAndFindWithNeedle(false, function(needle) {
+ return isRegExp(needle) ? regExpToObject(needle).expression : needle;
+ });
+ };
+
+ this.statusMessage = function(found) {
+ var options = this.$options, msg = '';
+ msg += options.backwards ? 'reverse-' : '';
+ msg += 'isearch: ' + options.needle;
+ msg += found ? '' : ' (not found)';
+ this.message(msg);
+ };
+
+ this.message = function(msg) {
+ if (this.$editor.showCommandLine) {
+ this.$editor.showCommandLine(msg);
+ this.$editor.focus();
+ } else {
+ console.log(msg);
+ }
+ };
+
+}).call(IncrementalSearch.prototype);
+
+
+exports.IncrementalSearch = IncrementalSearch;
+
+var dom = require('./lib/dom');
+dom.importCssString && dom.importCssString("\
+.ace_marker-layer .ace_isearch-result {\
+ position: absolute;\
+ z-index: 6;\
+ -moz-box-sizing: border-box;\
+ -webkit-box-sizing: border-box;\
+ box-sizing: border-box;\
+}\
+div.ace_isearch-result {\
+ border-radius: 4px;\
+ background-color: rgba(255, 200, 0, 0.5);\
+ box-shadow: 0 0 4px rgb(255, 200, 0);\
+}\
+.ace_dark div.ace_isearch-result {\
+ background-color: rgb(100, 110, 160);\
+ box-shadow: 0 0 4px rgb(80, 90, 140);\
+}", "incremental-search-highlighting");
+var commands = require("./commands/command_manager");
+(function() {
+ this.setupIncrementalSearch = function(editor, val) {
+ if (this.usesIncrementalSearch == val) return;
+ this.usesIncrementalSearch = val;
+ var iSearchCommands = iSearchCommandModule.iSearchStartCommands;
+ var method = val ? 'addCommands' : 'removeCommands';
+ this[method](iSearchCommands);
+ };
+}).call(commands.CommandManager.prototype);
+var Editor = require("./editor").Editor;
+require("./config").defineOptions(Editor.prototype, "editor", {
+ useIncrementalSearch: {
+ set: function(val) {
+ this.keyBinding.$handlers.forEach(function(handler) {
+ if (handler.setupIncrementalSearch) {
+ handler.setupIncrementalSearch(this, val);
+ }
+ });
+ this._emit('incrementalSearchSettingChanged', {isEnabled: val});
+ }
+ }
+});
+
+});
+
+ace.define("ace/keyboard/emacs",["require","exports","module","ace/lib/dom","ace/incremental_search","ace/commands/incremental_search_commands","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module) {
+"use strict";
+
+var dom = require("../lib/dom");
+require("../incremental_search");
+var iSearchCommandModule = require("../commands/incremental_search_commands");
+
+
+var screenToTextBlockCoordinates = function(x, y) {
+ var canvasPos = this.scroller.getBoundingClientRect();
+ var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding;
+
+ var col = Math.floor(offsetX / this.characterWidth);
+
+ var row = Math.floor(
+ (y + this.scrollTop - canvasPos.top) / this.lineHeight
+ );
+
+ return this.session.screenToDocumentPosition(row, col, offsetX);
+};
+
+var HashHandler = require("./hash_handler").HashHandler;
+exports.handler = new HashHandler();
+
+exports.handler.isEmacs = true;
+exports.handler.$id = "ace/keyboard/emacs";
+
+var initialized = false;
+var $formerLongWords;
+var $formerLineStart;
+
+exports.handler.attach = function(editor) {
+ if (!initialized) {
+ initialized = true;
+ dom.importCssString('\
+ .emacs-mode .ace_cursor{\
+ border: 1px 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_hidden-cursors .ace_cursor{\
+ 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'
+ );
+ }
+ $formerLongWords = editor.session.$selectLongWords;
+ editor.session.$selectLongWords = true;
+ $formerLineStart = editor.session.$useEmacsStyleLineStart;
+ editor.session.$useEmacsStyleLineStart = true;
+
+ editor.session.$emacsMark = null; // the active mark
+ editor.session.$emacsMarkRing = editor.session.$emacsMarkRing || [];
+
+ editor.emacsMark = function() {
+ return this.session.$emacsMark;
+ };
+
+ editor.setEmacsMark = function(p) {
+ this.session.$emacsMark = p;
+ };
+
+ editor.pushEmacsMark = function(p, activate) {
+ var prevMark = this.session.$emacsMark;
+ if (prevMark)
+ this.session.$emacsMarkRing.push(prevMark);
+ if (!p || activate) this.setEmacsMark(p);
+ else this.session.$emacsMarkRing.push(p);
+ };
+
+ editor.popEmacsMark = function() {
+ var mark = this.emacsMark();
+ if (mark) { this.setEmacsMark(null); return mark; }
+ return this.session.$emacsMarkRing.pop();
+ };
+
+ editor.getLastEmacsMark = function(p) {
+ return this.session.$emacsMark || this.session.$emacsMarkRing.slice(-1)[0];
+ };
+
+ editor.emacsMarkForSelection = function(replacement) {
+ var sel = this.selection,
+ multiRangeLength = this.multiSelect ?
+ this.multiSelect.getAllRanges().length : 1,
+ selIndex = sel.index || 0,
+ markRing = this.session.$emacsMarkRing,
+ markIndex = markRing.length - (multiRangeLength - selIndex),
+ lastMark = markRing[markIndex] || sel.anchor;
+ if (replacement) {
+ markRing.splice(markIndex, 1,
+ "row" in replacement && "column" in replacement ?
+ replacement : undefined);
+ }
+ return lastMark;
+ }
+
+ editor.on("click", $resetMarkMode);
+ editor.on("changeSession", $kbSessionChange);
+ editor.renderer.screenToTextCoordinates = screenToTextBlockCoordinates;
+ editor.setStyle("emacs-mode");
+ editor.commands.addCommands(commands);
+ exports.handler.platform = editor.commands.platform;
+ editor.$emacsModeHandler = this;
+ editor.addEventListener('copy', this.onCopy);
+ editor.addEventListener('paste', this.onPaste);
+};
+
+exports.handler.detach = function(editor) {
+ delete editor.renderer.screenToTextCoordinates;
+ editor.session.$selectLongWords = $formerLongWords;
+ editor.session.$useEmacsStyleLineStart = $formerLineStart;
+ editor.removeEventListener("click", $resetMarkMode);
+ editor.removeEventListener("changeSession", $kbSessionChange);
+ editor.unsetStyle("emacs-mode");
+ editor.commands.removeCommands(commands);
+ editor.removeEventListener('copy', this.onCopy);
+ editor.removeEventListener('paste', this.onPaste);
+ editor.$emacsModeHandler = null;
+};
+
+var $kbSessionChange = function(e) {
+ if (e.oldSession) {
+ e.oldSession.$selectLongWords = $formerLongWords;
+ e.oldSession.$useEmacsStyleLineStart = $formerLineStart;
+ }
+
+ $formerLongWords = e.session.$selectLongWords;
+ e.session.$selectLongWords = true;
+ $formerLineStart = e.session.$useEmacsStyleLineStart;
+ e.session.$useEmacsStyleLineStart = true;
+
+ if (!e.session.hasOwnProperty('$emacsMark'))
+ e.session.$emacsMark = null;
+ if (!e.session.hasOwnProperty('$emacsMarkRing'))
+ e.session.$emacsMarkRing = [];
+};
+
+var $resetMarkMode = function(e) {
+ e.editor.session.$emacsMark = null;
+};
+
+var keys = require("../lib/keys").KEY_MODS;
+var eMods = {C: "ctrl", S: "shift", M: "alt", CMD: "command"};
+var combinations = ["C-S-M-CMD",
+ "S-M-CMD", "C-M-CMD", "C-S-CMD", "C-S-M",
+ "M-CMD", "S-CMD", "S-M", "C-CMD", "C-M", "C-S",
+ "CMD", "M", "S", "C"];
+combinations.forEach(function(c) {
+ var hashId = 0;
+ c.split("-").forEach(function(c) {
+ hashId = hashId | keys[eMods[c]];
+ });
+ eMods[hashId] = c.toLowerCase() + "-";
+});
+
+exports.handler.onCopy = function(e, editor) {
+ if (editor.$handlesEmacsOnCopy) return;
+ editor.$handlesEmacsOnCopy = true;
+ exports.handler.commands.killRingSave.exec(editor);
+ editor.$handlesEmacsOnCopy = false;
+};
+
+exports.handler.onPaste = function(e, editor) {
+ editor.pushEmacsMark(editor.getCursorPosition());
+};
+
+exports.handler.bindKey = function(key, command) {
+ if (typeof key == "object")
+ key = key[this.platform];
+ if (!key)
+ return;
+
+ var ckb = this.commandKeyBinding;
+ key.split("|").forEach(function(keyPart) {
+ keyPart = keyPart.toLowerCase();
+ ckb[keyPart] = command;
+ var keyParts = keyPart.split(" ").slice(0,-1);
+ keyParts.reduce(function(keyMapKeys, keyPart, i) {
+ var prefix = keyMapKeys[i-1] ? keyMapKeys[i-1] + ' ' : '';
+ return keyMapKeys.concat([prefix + keyPart]);
+ }, []).forEach(function(keyPart) {
+ if (!ckb[keyPart]) ckb[keyPart] = "null";
+ });
+ }, this);
+};
+
+exports.handler.getStatusText = function(editor, data) {
+ var str = "";
+ if (data.count)
+ str += data.count;
+ if (data.keyChain)
+ str += " " + data.keyChain
+ return str;
+};
+
+exports.handler.handleKeyboard = function(data, hashId, key, keyCode) {
+ if (keyCode === -1) return undefined;
+
+ var editor = data.editor;
+ editor._signal("changeStatus");
+ if (hashId == -1) {
+ editor.pushEmacsMark();
+ if (data.count) {
+ var str = new Array(data.count + 1).join(key);
+ data.count = null;
+ return {command: "insertstring", args: str};
+ }
+ }
+
+ var modifier = eMods[hashId];
+ if (modifier == "c-" || data.count) {
+ var count = parseInt(key[key.length - 1]);
+ if (typeof count === 'number' && !isNaN(count)) {
+ data.count = Math.max(data.count, 0) || 0;
+ data.count = 10 * data.count + count;
+ return {command: "null"};
+ }
+ }
+ if (modifier) key = modifier + key;
+ if (data.keyChain) key = data.keyChain += " " + key;
+ var command = this.commandKeyBinding[key];
+ data.keyChain = command == "null" ? key : "";
+ if (!command) return undefined;
+ if (command === "null") return {command: "null"};
+
+ if (command === "universalArgument") {
+ data.count = -4;
+ return {command: "null"};
+ }
+ var args;
+ if (typeof command !== "string") {
+ args = command.args;
+ if (command.command) command = command.command;
+ if (command === "goorselect") {
+ command = editor.emacsMark() ? args[1] : args[0];
+ args = null;
+ }
+ }
+
+ if (typeof command === "string") {
+ if (command === "insertstring" ||
+ command === "splitline" ||
+ command === "togglecomment") {
+ editor.pushEmacsMark();
+ }
+ command = this.commands[command] || editor.commands.commands[command];
+ if (!command) return undefined;
+ }
+
+ if (!command.readOnly && !command.isYank)
+ data.lastCommand = null;
+
+ if (!command.readOnly && editor.emacsMark())
+ editor.setEmacsMark(null)
+
+ if (data.count) {
+ var count = data.count;
+ data.count = 0;
+ if (!command || !command.handlesCount) {
+ return {
+ args: args,
+ command: {
+ exec: function(editor, args) {
+ for (var i = 0; i < count; i++)
+ command.exec(editor, args);
+ },
+ multiSelectAction: command.multiSelectAction
+ }
+ };
+ } else {
+ if (!args) args = {};
+ if (typeof args === 'object') args.count = count;
+ }
+ }
+
+ return {command: command, args: args};
+};
+
+exports.emacsKeys = {
+ "Up|C-p" : {command: "goorselect", args: ["golineup","selectup"]},
+ "Down|C-n" : {command: "goorselect", args: ["golinedown","selectdown"]},
+ "Left|C-b" : {command: "goorselect", args: ["gotoleft","selectleft"]},
+ "Right|C-f" : {command: "goorselect", args: ["gotoright","selectright"]},
+ "C-Left|M-b" : {command: "goorselect", args: ["gotowordleft","selectwordleft"]},
+ "C-Right|M-f" : {command: "goorselect", args: ["gotowordright","selectwordright"]},
+ "Home|C-a" : {command: "goorselect", args: ["gotolinestart","selecttolinestart"]},
+ "End|C-e" : {command: "goorselect", args: ["gotolineend","selecttolineend"]},
+ "C-Home|S-M-,": {command: "goorselect", args: ["gotostart","selecttostart"]},
+ "C-End|S-M-." : {command: "goorselect", args: ["gotoend","selecttoend"]},
+ "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": {command: "goorselect", args: ["gotopagedown","selectpagedown"]},
+ "C-Up": {command: "goorselect", args: ["gotopageup","selectpageup"]},
+ "PageDown|C-v": {command: "goorselect", args: ["gotopagedown","selectpagedown"]},
+ "PageUp|M-v": {command: "goorselect", args: ["gotopageup","selectpageup"]},
+ "S-C-Down": "selectpagedown",
+ "S-C-Up": "selectpageup",
+
+ "C-s": "iSearch",
+ "C-r": "iSearchBackwards",
+
+ "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|C-S-W": "killRegion",
+ "M-w": "killRingSave",
+ "C-Space": "setMark",
+ "C-x C-x": "exchangePointAndMark",
+
+ "C-t": "transposeletters",
+ "M-u": "touppercase", // Doesn't work
+ "M-l": "tolowercase",
+ "M-/": "autocomplete", // Doesn't work
+ "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",
+ "M-x": {command: "focusCommandLine", args: "M-x "}
+};
+
+
+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: {
+ exec: function(editor, args) {
+
+ if (args && args.count) {
+ if (editor.inMultiSelectMode) editor.forEachSelection(moveToMark);
+ else moveToMark();
+ moveToMark();
+ return;
+ }
+
+ var mark = editor.emacsMark(),
+ ranges = editor.selection.getAllRanges(),
+ rangePositions = ranges.map(function(r) { return {row: r.start.row, column: r.start.column}; }),
+ transientMarkModeActive = true,
+ hasNoSelection = ranges.every(function(range) { return range.isEmpty(); });
+ if (transientMarkModeActive && (mark || !hasNoSelection)) {
+ if (editor.inMultiSelectMode) editor.forEachSelection({exec: editor.clearSelection.bind(editor)});
+ else editor.clearSelection();
+ if (mark) editor.pushEmacsMark(null);
+ return;
+ }
+
+ if (!mark) {
+ rangePositions.forEach(function(pos) { editor.pushEmacsMark(pos); });
+ editor.setEmacsMark(rangePositions[rangePositions.length-1]);
+ return;
+ }
+
+ function moveToMark() {
+ var mark = editor.popEmacsMark();
+ mark && editor.moveCursorToPosition(mark);
+ }
+
+ },
+ readOnly: true,
+ handlesCount: true
+ },
+ exchangePointAndMark: {
+ exec: function exchangePointAndMark$exec(editor, args) {
+ var sel = editor.selection;
+ if (!args.count && !sel.isEmpty()) { // just invert selection
+ sel.setSelectionRange(sel.getRange(), !sel.isBackwards());
+ return;
+ }
+
+ if (args.count) { // replace mark and point
+ var pos = {row: sel.lead.row, column: sel.lead.column};
+ sel.clearSelection();
+ sel.moveCursorToPosition(editor.emacsMarkForSelection(pos));
+ } else { // create selection to last mark
+ sel.selectToPosition(editor.emacsMarkForSelection());
+ }
+ },
+ readOnly: true,
+ handlesCount: 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.pushEmacsMark(null);
+ editor.clearSelection();
+ var range = editor.getSelectionRange();
+ var line = editor.session.getLine(range.start.row);
+ range.end.column = line.length;
+ line = line.substr(range.start.column)
+
+ var foldLine = editor.session.getFoldLine(range.start.row);
+ if (foldLine && range.end.row != foldLine.end.row) {
+ range.end.row = foldLine.end.row;
+ line = "x";
+ }
+ if (/^\s*$/.test(line)) {
+ range.end.row++;
+ line = editor.session.getLine(range.end.row);
+ range.end.column = /^\s*$/.test(line) ? line.length : 0;
+ }
+ var text = editor.session.getTextRange(range);
+ if (editor.prevOp.command == this)
+ exports.killRing.append(text);
+ else
+ 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.session.$emacsMarkRing.pop(); // also undo recording mark
+ editor.onPaste(exports.killRing.rotate());
+ editor.keyBinding.$data.lastCommand = "yank";
+ },
+ killRegion: {
+ exec: function(editor) {
+ exports.killRing.add(editor.getCopyText());
+ editor.commands.byName.cut.exec(editor);
+ editor.setEmacsMark(null);
+ },
+ readOnly: true,
+ multiSelectAction: "forEach"
+ },
+ killRingSave: {
+ exec: function(editor) {
+
+ editor.$handlesEmacsOnCopy = true;
+ var marks = editor.session.$emacsMarkRing.slice(),
+ deselectedMarks = [];
+ exports.killRing.add(editor.getCopyText());
+
+ setTimeout(function() {
+ function deselect() {
+ var sel = editor.selection, range = sel.getRange(),
+ pos = sel.isBackwards() ? range.end : range.start;
+ deselectedMarks.push({row: pos.row, column: pos.column});
+ sel.clearSelection();
+ }
+ editor.$handlesEmacsOnCopy = false;
+ if (editor.inMultiSelectMode) editor.forEachSelection({exec: deselect});
+ else deselect();
+ editor.session.$emacsMarkRing = marks.concat(deselectedMarks.reverse());
+ }, 0);
+ },
+ readOnly: true
+ },
+ keyboardQuit: function(editor) {
+ editor.selection.clearSelection();
+ editor.setEmacsMark(null);
+ editor.keyBinding.$data.count = null;
+ },
+ focusCommandLine: function(editor, arg) {
+ if (editor.showCommandLine)
+ editor.showCommandLine(arg);
+ }
+});
+
+exports.handler.addCommands(iSearchCommandModule.iSearchStartCommands);
+
+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();
+ },
+ append: function(str) {
+ var idx = this.$data.length - 1;
+ var text = this.$data[idx] || "";
+ if (str) text += str;
+ if (text) this.$data[idx] = text;
+ },
+ get: function(n) {
+ n = n || 1;
+ return this.$data.slice(this.$data.length-n, this.$data.length).reverse().join('\n');
+ },
+ 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/www/wiki/extensions/CodeEditor/modules/ace/keybinding-vim.js b/www/wiki/extensions/CodeEditor/modules/ace/keybinding-vim.js
new file mode 100644
index 00000000..5b0f378e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/keybinding-vim.js
@@ -0,0 +1,5598 @@
+ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/multi_select"], function(require, exports, module) {
+ 'use strict';
+
+ function log() {
+ var d = "";
+ function format(p) {
+ if (typeof p != "object")
+ return p + "";
+ if ("line" in p) {
+ return p.line + ":" + p.ch;
+ }
+ if ("anchor" in p) {
+ return format(p.anchor) + "->" + format(p.head);
+ }
+ if (Array.isArray(p))
+ return "[" + p.map(function(x) {
+ return format(x);
+ }) + "]";
+ return JSON.stringify(p);
+ }
+ for (var i = 0; i < arguments.length; i++) {
+ var p = arguments[i];
+ var f = format(p);
+ d += f + " ";
+ }
+ console.log(d);
+ }
+ var Range = require("../range").Range;
+ var EventEmitter = require("../lib/event_emitter").EventEmitter;
+ var dom = require("../lib/dom");
+ var oop = require("../lib/oop");
+ var KEYS = require("../lib/keys");
+ var event = require("../lib/event");
+ var Search = require("../search").Search;
+ var useragent = require("../lib/useragent");
+ var SearchHighlight = require("../search_highlight").SearchHighlight;
+ var multiSelectCommands = require("../commands/multi_select_commands");
+ var TextModeTokenRe = require("../mode/text").Mode.prototype.tokenRe;
+ require("../multi_select");
+
+ var CodeMirror = function(ace) {
+ this.ace = ace;
+ this.state = {};
+ this.marks = {};
+ this.$uid = 0;
+ this.onChange = this.onChange.bind(this);
+ this.onSelectionChange = this.onSelectionChange.bind(this);
+ this.onBeforeEndOperation = this.onBeforeEndOperation.bind(this);
+ this.ace.on('change', this.onChange);
+ this.ace.on('changeSelection', this.onSelectionChange);
+ this.ace.on('beforeEndOperation', this.onBeforeEndOperation);
+ };
+ CodeMirror.Pos = function(line, ch) {
+ if (!(this instanceof Pos)) return new Pos(line, ch);
+ this.line = line; this.ch = ch;
+ };
+ CodeMirror.defineOption = function(name, val, setter) {};
+ CodeMirror.commands = {
+ redo: function(cm) { cm.ace.redo(); },
+ undo: function(cm) { cm.ace.undo(); },
+ newlineAndIndent: function(cm) { cm.ace.insert("\n"); }
+ };
+ CodeMirror.keyMap = {};
+ CodeMirror.addClass = CodeMirror.rmClass =
+ CodeMirror.e_stop = function() {};
+ CodeMirror.keyName = function(e) {
+ if (e.key) return e.key;
+ var key = (KEYS[e.keyCode] || "");
+ if (key.length == 1) key = key.toUpperCase();
+ key = event.getModifierString(e).replace(/(^|-)\w/g, function(m) {
+ return m.toUpperCase();
+ }) + key;
+ return key;
+ };
+ CodeMirror.keyMap['default'] = function(key) {
+ return function(cm) {
+ var cmd = cm.ace.commands.commandKeyBinding[key.toLowerCase()];
+ return cmd && cm.ace.execCommand(cmd) !== false;
+ };
+ };
+ CodeMirror.lookupKey = function lookupKey(key, map, handle) {
+ if (typeof map == "string")
+ map = CodeMirror.keyMap[map];
+ var found = typeof map == "function" ? map(key) : map[key];
+ if (found === false) return "nothing";
+ if (found === "...") return "multi";
+ if (found != null && handle(found)) return "handled";
+
+ if (map.fallthrough) {
+ if (!Array.isArray(map.fallthrough))
+ return lookupKey(key, map.fallthrough, handle);
+ for (var i = 0; i < map.fallthrough.length; i++) {
+ var result = lookupKey(key, map.fallthrough[i], handle);
+ if (result) return result;
+ }
+ }
+ };
+
+ CodeMirror.signal = function(o, name, e) { return o._signal(name, e) };
+ CodeMirror.on = event.addListener;
+ CodeMirror.off = event.removeListener;
+ CodeMirror.isWordChar = function(ch) {
+ if (ch < "\x7f") return /^\w$/.test(ch);
+ TextModeTokenRe.lastIndex = 0;
+ return TextModeTokenRe.test(ch);
+ };
+
+(function() {
+ oop.implement(CodeMirror.prototype, EventEmitter);
+
+ this.destroy = function() {
+ this.ace.off('change', this.onChange);
+ this.ace.off('changeSelection', this.onSelectionChange);
+ this.ace.off('beforeEndOperation', this.onBeforeEndOperation);
+ this.removeOverlay();
+ };
+ this.virtualSelectionMode = function() {
+ return this.ace.inVirtualSelectionMode && this.ace.selection.index;
+ };
+ this.onChange = function(delta) {
+ var change = { text: delta.action[0] == 'i' ? delta.lines : [] };
+ var curOp = this.curOp = this.curOp || {};
+ if (!curOp.changeHandlers)
+ curOp.changeHandlers = this._eventRegistry["change"] && this._eventRegistry["change"].slice();
+ if (this.virtualSelectionMode()) return;
+ if (!curOp.lastChange) {
+ curOp.lastChange = curOp.change = change;
+ } else {
+ curOp.lastChange.next = curOp.lastChange = change;
+ }
+ this.$updateMarkers(delta);
+ };
+ this.onSelectionChange = function() {
+ var curOp = this.curOp = this.curOp || {};
+ if (!curOp.cursorActivityHandlers)
+ curOp.cursorActivityHandlers = this._eventRegistry["cursorActivity"] && this._eventRegistry["cursorActivity"].slice();
+ this.curOp.cursorActivity = true;
+ if (this.ace.inMultiSelectMode) {
+ this.ace.keyBinding.removeKeyboardHandler(multiSelectCommands.keyboardHandler);
+ }
+ };
+ this.operation = function(fn, force) {
+ if (!force && this.curOp || force && this.curOp && this.curOp.force) {
+ return fn();
+ }
+ if (force || !this.ace.curOp) {
+ if (this.curOp)
+ this.onBeforeEndOperation();
+ }
+ if (!this.ace.curOp) {
+ var prevOp = this.ace.prevOp;
+ this.ace.startOperation({
+ command: { name: "vim", scrollIntoView: "cursor" }
+ });
+ }
+ var curOp = this.curOp = this.curOp || {};
+ this.curOp.force = force;
+ var result = fn();
+ if (this.ace.curOp && this.ace.curOp.command.name == "vim") {
+ this.ace.endOperation();
+ if (!curOp.cursorActivity && !curOp.lastChange && prevOp)
+ this.ace.prevOp = prevOp;
+ }
+ if (force || !this.ace.curOp) {
+ if (this.curOp)
+ this.onBeforeEndOperation();
+ }
+ return result;
+ };
+ this.onBeforeEndOperation = function() {
+ var op = this.curOp;
+ if (op) {
+ if (op.change) { this.signal("change", op.change, op); }
+ if (op && op.cursorActivity) { this.signal("cursorActivity", null, op); }
+ this.curOp = null;
+ }
+ };
+
+ this.signal = function(eventName, e, handlers) {
+ var listeners = handlers ? handlers[eventName + "Handlers"]
+ : (this._eventRegistry || {})[eventName];
+ if (!listeners)
+ return;
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++)
+ listeners[i](this, e);
+ };
+ this.firstLine = function() { return 0; };
+ this.lastLine = function() { return this.ace.session.getLength() - 1; };
+ this.lineCount = function() { return this.ace.session.getLength(); };
+ this.setCursor = function(line, ch) {
+ if (typeof line === 'object') {
+ ch = line.ch;
+ line = line.line;
+ }
+ if (!this.ace.inVirtualSelectionMode)
+ this.ace.exitMultiSelectMode();
+ this.ace.session.unfold({row: line, column: ch});
+ this.ace.selection.moveTo(line, ch);
+ };
+ this.getCursor = function(p) {
+ var sel = this.ace.selection;
+ var pos = p == 'anchor' ? (sel.isEmpty() ? sel.lead : sel.anchor) :
+ p == 'head' || !p ? sel.lead : sel.getRange()[p];
+ return toCmPos(pos);
+ };
+ this.listSelections = function(p) {
+ var ranges = this.ace.multiSelect.rangeList.ranges;
+ if (!ranges.length || this.ace.inVirtualSelectionMode)
+ return [{anchor: this.getCursor('anchor'), head: this.getCursor('head')}];
+ return ranges.map(function(r) {
+ return {
+ anchor: this.clipPos(toCmPos(r.cursor == r.end ? r.start : r.end)),
+ head: this.clipPos(toCmPos(r.cursor))
+ };
+ }, this);
+ };
+ this.setSelections = function(p, primIndex) {
+ var sel = this.ace.multiSelect;
+ var ranges = p.map(function(x) {
+ var anchor = toAcePos(x.anchor);
+ var head = toAcePos(x.head);
+ var r = Range.comparePoints(anchor, head) < 0
+ ? new Range.fromPoints(anchor, head)
+ : new Range.fromPoints(head, anchor);
+ r.cursor = Range.comparePoints(r.start, head) ? r.end : r.start;
+ return r;
+ });
+
+ if (this.ace.inVirtualSelectionMode) {
+ this.ace.selection.fromOrientedRange(ranges[0]);
+ return;
+ }
+ if (!primIndex) {
+ ranges = ranges.reverse();
+ } else if (ranges[primIndex]) {
+ ranges.push(ranges.splice(primIndex, 1)[0]);
+ }
+ sel.toSingleRange(ranges[0].clone());
+ var session = this.ace.session;
+ for (var i = 0; i < ranges.length; i++) {
+ var range = session.$clipRangeToDocument(ranges[i]); // todo why ace doesn't do this?
+ sel.addRange(range);
+ }
+ };
+ this.setSelection = function(a, h, options) {
+ var sel = this.ace.selection;
+ sel.moveTo(a.line, a.ch);
+ sel.selectTo(h.line, h.ch);
+ if (options && options.origin == '*mouse') {
+ this.onBeforeEndOperation();
+ }
+ };
+ this.somethingSelected = function(p) {
+ return !this.ace.selection.isEmpty();
+ };
+ this.clipPos = function(p) {
+ var pos = this.ace.session.$clipPositionToDocument(p.line, p.ch);
+ return toCmPos(pos);
+ };
+ this.markText = function(cursor) {
+ return {clear: function() {}, find: function() {}};
+ };
+ this.$updateMarkers = function(delta) {
+ var isInsert = delta.action == "insert";
+ var start = delta.start;
+ var end = delta.end;
+ var rowShift = (end.row - start.row) * (isInsert ? 1 : -1);
+ var colShift = (end.column - start.column) * (isInsert ? 1 : -1);
+ if (isInsert) end = start;
+
+ for (var i in this.marks) {
+ var point = this.marks[i];
+ var cmp = Range.comparePoints(point, start);
+ if (cmp < 0) {
+ continue; // delta starts after the range
+ }
+ if (cmp === 0) {
+ if (isInsert) {
+ if (point.bias == 1) {
+ cmp = 1;
+ } else {
+ point.bias == -1;
+ continue;
+ }
+ }
+ }
+ var cmp2 = isInsert ? cmp : Range.comparePoints(point, end);
+ if (cmp2 > 0) {
+ point.row += rowShift;
+ point.column += point.row == end.row ? colShift : 0;
+ continue;
+ }
+ if (!isInsert && cmp2 <= 0) {
+ point.row = start.row;
+ point.column = start.column;
+ if (cmp2 === 0)
+ point.bias = 1;
+ }
+ }
+ };
+ var Marker = function(cm, id, row, column) {
+ this.cm = cm;
+ this.id = id;
+ this.row = row;
+ this.column = column;
+ cm.marks[this.id] = this;
+ };
+ Marker.prototype.clear = function() { delete this.cm.marks[this.id] };
+ Marker.prototype.find = function() { return toCmPos(this) };
+ this.setBookmark = function(cursor, options) {
+ var bm = new Marker(this, this.$uid++, cursor.line, cursor.ch);
+ if (!options || !options.insertLeft)
+ bm.$insertRight = true;
+ this.marks[bm.id] = bm;
+ return bm;
+ };
+ this.moveH = function(increment, unit) {
+ if (unit == 'char') {
+ var sel = this.ace.selection;
+ sel.clearSelection();
+ sel.moveCursorBy(0, increment);
+ }
+ };
+ this.findPosV = function(start, amount, unit, goalColumn) {
+ if (unit == 'page') {
+ var renderer = this.ace.renderer;
+ var config = renderer.layerConfig;
+ amount = amount * Math.floor(config.height / config.lineHeight);
+ unit = 'line';
+ }
+ if (unit == 'line') {
+ var screenPos = this.ace.session.documentToScreenPosition(start.line, start.ch);
+ if (goalColumn != null)
+ screenPos.column = goalColumn;
+ screenPos.row += amount;
+ screenPos.row = Math.min(Math.max(0, screenPos.row), this.ace.session.getScreenLength() - 1);
+ var pos = this.ace.session.screenToDocumentPosition(screenPos.row, screenPos.column);
+ return toCmPos(pos);
+ } else {
+ debugger;
+ }
+ };
+ this.charCoords = function(pos, mode) {
+ if (mode == 'div' || !mode) {
+ var sc = this.ace.session.documentToScreenPosition(pos.line, pos.ch);
+ return {left: sc.column, top: sc.row};
+ }if (mode == 'local') {
+ var renderer = this.ace.renderer;
+ var sc = this.ace.session.documentToScreenPosition(pos.line, pos.ch);
+ var lh = renderer.layerConfig.lineHeight;
+ var cw = renderer.layerConfig.characterWidth;
+ var top = lh * sc.row;
+ return {left: sc.column * cw, top: top, bottom: top + lh};
+ }
+ };
+ this.coordsChar = function(pos, mode) {
+ var renderer = this.ace.renderer;
+ if (mode == 'local') {
+ var row = Math.max(0, Math.floor(pos.top / renderer.lineHeight));
+ var col = Math.max(0, Math.floor(pos.left / renderer.characterWidth));
+ var ch = renderer.session.screenToDocumentPosition(row, col);
+ return toCmPos(ch);
+ } else if (mode == 'div') {
+ throw "not implemented";
+ }
+ };
+ this.getSearchCursor = function(query, pos, caseFold) {
+ var caseSensitive = false;
+ var isRegexp = false;
+ if (query instanceof RegExp && !query.global) {
+ caseSensitive = !query.ignoreCase;
+ query = query.source;
+ isRegexp = true;
+ }
+ var search = new Search();
+ if (pos.ch == undefined) pos.ch = Number.MAX_VALUE;
+ var acePos = {row: pos.line, column: pos.ch};
+ var cm = this;
+ var last = null;
+ return {
+ findNext: function() { return this.find(false) },
+ findPrevious: function() {return this.find(true) },
+ find: function(back) {
+ search.setOptions({
+ needle: query,
+ caseSensitive: caseSensitive,
+ wrap: false,
+ backwards: back,
+ regExp: isRegexp,
+ start: last || acePos
+ });
+ var range = search.find(cm.ace.session);
+ if (range && range.isEmpty()) {
+ if (cm.getLine(range.start.row).length == range.start.column) {
+ search.$options.start = range;
+ range = search.find(cm.ace.session);
+ }
+ }
+ last = range;
+ return last;
+ },
+ from: function() { return last && toCmPos(last.start) },
+ to: function() { return last && toCmPos(last.end) },
+ replace: function(text) {
+ if (last) {
+ last.end = cm.ace.session.doc.replace(last, text);
+ }
+ }
+ };
+ };
+ this.scrollTo = function(x, y) {
+ var renderer = this.ace.renderer;
+ var config = renderer.layerConfig;
+ var maxHeight = config.maxHeight;
+ maxHeight -= (renderer.$size.scrollerHeight - renderer.lineHeight) * renderer.$scrollPastEnd;
+ if (y != null) this.ace.session.setScrollTop(Math.max(0, Math.min(y, maxHeight)));
+ if (x != null) this.ace.session.setScrollLeft(Math.max(0, Math.min(x, config.width)));
+ };
+ this.scrollInfo = function() { return 0; };
+ this.scrollIntoView = function(pos, margin) {
+ if (pos) {
+ var renderer = this.ace.renderer;
+ var viewMargin = { "top": 0, "bottom": margin };
+ renderer.scrollCursorIntoView(toAcePos(pos),
+ (renderer.lineHeight * 2) / renderer.$size.scrollerHeight, viewMargin);
+ }
+ };
+ this.getLine = function(row) { return this.ace.session.getLine(row) };
+ this.getRange = function(s, e) {
+ return this.ace.session.getTextRange(new Range(s.line, s.ch, e.line, e.ch));
+ };
+ this.replaceRange = function(text, s, e) {
+ if (!e) e = s;
+ return this.ace.session.replace(new Range(s.line, s.ch, e.line, e.ch), text);
+ };
+ this.replaceSelections = function(p) {
+ var sel = this.ace.selection;
+ if (this.ace.inVirtualSelectionMode) {
+ this.ace.session.replace(sel.getRange(), p[0] || "");
+ return;
+ }
+ sel.inVirtualSelectionMode = true;
+ var ranges = sel.rangeList.ranges;
+ if (!ranges.length) ranges = [this.ace.multiSelect.getRange()];
+ for (var i = ranges.length; i--;)
+ this.ace.session.replace(ranges[i], p[i] || "");
+ sel.inVirtualSelectionMode = false;
+ };
+ this.getSelection = function() {
+ return this.ace.getSelectedText();
+ };
+ this.getSelections = function() {
+ return this.listSelections().map(function(x) {
+ return this.getRange(x.anchor, x.head);
+ }, this);
+ };
+ this.getInputField = function() {
+ return this.ace.textInput.getElement();
+ };
+ this.getWrapperElement = function() {
+ return this.ace.containter;
+ };
+ var optMap = {
+ indentWithTabs: "useSoftTabs",
+ indentUnit: "tabSize",
+ tabSize: "tabSize",
+ firstLineNumber: "firstLineNumber",
+ readOnly: "readOnly"
+ };
+ this.setOption = function(name, val) {
+ this.state[name] = val;
+ switch (name) {
+ case 'indentWithTabs':
+ name = optMap[name];
+ val = !val;
+ break;
+ default:
+ name = optMap[name];
+ }
+ if (name)
+ this.ace.setOption(name, val);
+ };
+ this.getOption = function(name, val) {
+ var aceOpt = optMap[name];
+ if (aceOpt)
+ val = this.ace.getOption(aceOpt);
+ switch (name) {
+ case 'indentWithTabs':
+ name = optMap[name];
+ return !val;
+ }
+ return aceOpt ? val : this.state[name];
+ };
+ this.toggleOverwrite = function(on) {
+ this.state.overwrite = on;
+ return this.ace.setOverwrite(on);
+ };
+ this.addOverlay = function(o) {
+ if (!this.$searchHighlight || !this.$searchHighlight.session) {
+ var highlight = new SearchHighlight(null, "ace_highlight-marker", "text");
+ var marker = this.ace.session.addDynamicMarker(highlight);
+ highlight.id = marker.id;
+ highlight.session = this.ace.session;
+ highlight.destroy = function(o) {
+ highlight.session.off("change", highlight.updateOnChange);
+ highlight.session.off("changeEditor", highlight.destroy);
+ highlight.session.removeMarker(highlight.id);
+ highlight.session = null;
+ };
+ highlight.updateOnChange = function(delta) {
+ var row = delta.start.row;
+ if (row == delta.end.row) highlight.cache[row] = undefined;
+ else highlight.cache.splice(row, highlight.cache.length);
+ };
+ highlight.session.on("changeEditor", highlight.destroy);
+ highlight.session.on("change", highlight.updateOnChange);
+ }
+ var re = new RegExp(o.query.source, "gmi");
+ this.$searchHighlight = o.highlight = highlight;
+ this.$searchHighlight.setRegexp(re);
+ this.ace.renderer.updateBackMarkers();
+ };
+ this.removeOverlay = function(o) {
+ if (this.$searchHighlight && this.$searchHighlight.session) {
+ this.$searchHighlight.destroy();
+ }
+ };
+ this.getScrollInfo = function() {
+ var renderer = this.ace.renderer;
+ var config = renderer.layerConfig;
+ return {
+ left: renderer.scrollLeft,
+ top: renderer.scrollTop,
+ height: config.maxHeight,
+ width: config.width,
+ clientHeight: config.height,
+ clientWidth: config.width
+ };
+ };
+ this.getValue = function() {
+ return this.ace.getValue();
+ };
+ this.setValue = function(v) {
+ return this.ace.setValue(v);
+ };
+ this.getTokenTypeAt = function(pos) {
+ var token = this.ace.session.getTokenAt(pos.line, pos.ch);
+ return token && /comment|string/.test(token.type) ? "string" : "";
+ };
+ this.findMatchingBracket = function(pos) {
+ var m = this.ace.session.findMatchingBracket(toAcePos(pos));
+ return {to: m && toCmPos(m)};
+ };
+ this.indentLine = function(line, method) {
+ if (method === true)
+ this.ace.session.indentRows(line, line, "\t");
+ else if (method === false)
+ this.ace.session.outdentRows(new Range(line, 0, line, 0));
+ };
+ this.indexFromPos = function(pos) {
+ return this.ace.session.doc.positionToIndex(toAcePos(pos));
+ };
+ this.posFromIndex = function(index) {
+ return toCmPos(this.ace.session.doc.indexToPosition(index));
+ };
+ this.focus = function(index) {
+ return this.ace.focus();
+ };
+ this.blur = function(index) {
+ return this.ace.blur();
+ };
+ this.defaultTextHeight = function(index) {
+ return this.ace.renderer.layerConfig.lineHeight;
+ };
+ this.scanForBracket = function(pos, dir, _, options) {
+ var re = options.bracketRegex.source;
+ if (dir == 1) {
+ var m = this.ace.session.$findClosingBracket(re.slice(1, 2), toAcePos(pos), /paren|text/);
+ } else {
+ var m = this.ace.session.$findOpeningBracket(re.slice(-2, -1), {row: pos.line, column: pos.ch + 1}, /paren|text/);
+ }
+ return m && {pos: toCmPos(m)};
+ };
+ this.refresh = function() {
+ return this.ace.resize(true);
+ };
+ this.getMode = function() {
+ return { name : this.getOption("mode") };
+ }
+}).call(CodeMirror.prototype);
+ function toAcePos(cmPos) {
+ return {row: cmPos.line, column: cmPos.ch};
+ }
+ function toCmPos(acePos) {
+ return new Pos(acePos.row, acePos.column);
+ }
+
+ var StringStream = CodeMirror.StringStream = function(string, tabSize) {
+ this.pos = this.start = 0;
+ this.string = string;
+ this.tabSize = tabSize || 8;
+ this.lastColumnPos = this.lastColumnValue = 0;
+ this.lineStart = 0;
+ };
+
+ StringStream.prototype = {
+ eol: function() {return this.pos >= this.string.length;},
+ sol: function() {return this.pos == this.lineStart;},
+ peek: function() {return this.string.charAt(this.pos) || undefined;},
+ next: function() {
+ if (this.pos < this.string.length)
+ return this.string.charAt(this.pos++);
+ },
+ eat: function(match) {
+ var ch = this.string.charAt(this.pos);
+ if (typeof match == "string") var ok = ch == match;
+ else var ok = ch && (match.test ? match.test(ch) : match(ch));
+ if (ok) {++this.pos; return ch;}
+ },
+ eatWhile: function(match) {
+ var start = this.pos;
+ while (this.eat(match)){}
+ return this.pos > start;
+ },
+ eatSpace: function() {
+ var start = this.pos;
+ while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos;
+ return this.pos > start;
+ },
+ skipToEnd: function() {this.pos = this.string.length;},
+ skipTo: function(ch) {
+ var found = this.string.indexOf(ch, this.pos);
+ if (found > -1) {this.pos = found; return true;}
+ },
+ backUp: function(n) {this.pos -= n;},
+ column: function() {
+ throw "not implemented";
+ },
+ indentation: function() {
+ throw "not implemented";
+ },
+ match: function(pattern, consume, caseInsensitive) {
+ if (typeof pattern == "string") {
+ var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;};
+ var substr = this.string.substr(this.pos, pattern.length);
+ if (cased(substr) == cased(pattern)) {
+ if (consume !== false) this.pos += pattern.length;
+ return true;
+ }
+ } else {
+ var match = this.string.slice(this.pos).match(pattern);
+ if (match && match.index > 0) return null;
+ if (match && consume !== false) this.pos += match[0].length;
+ return match;
+ }
+ },
+ current: function(){return this.string.slice(this.start, this.pos);},
+ hideFirstChars: function(n, inner) {
+ this.lineStart += n;
+ try { return inner(); }
+ finally { this.lineStart -= n; }
+ }
+ };
+CodeMirror.defineExtension = function(name, fn) {
+ CodeMirror.prototype[name] = fn;
+};
+dom.importCssString(".normal-mode .ace_cursor{\
+ border: 1px solid red;\
+ background-color: red;\
+ opacity: 0.5;\
+}\
+.normal-mode .ace_hidden-cursors .ace_cursor{\
+ background-color: transparent;\
+}\
+.ace_dialog {\
+ position: absolute;\
+ left: 0; right: 0;\
+ background: white;\
+ z-index: 15;\
+ padding: .1em .8em;\
+ overflow: hidden;\
+ color: #333;\
+}\
+.ace_dialog-top {\
+ border-bottom: 1px solid #eee;\
+ top: 0;\
+}\
+.ace_dialog-bottom {\
+ border-top: 1px solid #eee;\
+ bottom: 0;\
+}\
+.ace_dialog input {\
+ border: none;\
+ outline: none;\
+ background: transparent;\
+ width: 20em;\
+ color: inherit;\
+ font-family: monospace;\
+}", "vimMode");
+(function() {
+ function dialogDiv(cm, template, bottom) {
+ var wrap = cm.ace.container;
+ var dialog;
+ dialog = wrap.appendChild(document.createElement("div"));
+ if (bottom)
+ dialog.className = "ace_dialog ace_dialog-bottom";
+ else
+ dialog.className = "ace_dialog ace_dialog-top";
+
+ if (typeof template == "string") {
+ dialog.innerHTML = template;
+ } else { // Assuming it's a detached DOM element.
+ dialog.appendChild(template);
+ }
+ return dialog;
+ }
+
+ function closeNotification(cm, newVal) {
+ if (cm.state.currentNotificationClose)
+ cm.state.currentNotificationClose();
+ cm.state.currentNotificationClose = newVal;
+ }
+
+ CodeMirror.defineExtension("openDialog", function(template, callback, options) {
+ if (this.virtualSelectionMode()) return;
+ if (!options) options = {};
+
+ closeNotification(this, null);
+
+ var dialog = dialogDiv(this, template, options.bottom);
+ var closed = false, me = this;
+ function close(newVal) {
+ if (typeof newVal == 'string') {
+ inp.value = newVal;
+ } else {
+ if (closed) return;
+ closed = true;
+ dialog.parentNode.removeChild(dialog);
+ me.focus();
+
+ if (options.onClose) options.onClose(dialog);
+ }
+ }
+
+ var inp = dialog.getElementsByTagName("input")[0], button;
+ if (inp) {
+ if (options.value) {
+ inp.value = options.value;
+ if (options.select !== false) inp.select();
+ }
+
+ if (options.onInput)
+ CodeMirror.on(inp, "input", function(e) { options.onInput(e, inp.value, close);});
+ if (options.onKeyUp)
+ CodeMirror.on(inp, "keyup", function(e) {options.onKeyUp(e, inp.value, close);});
+
+ CodeMirror.on(inp, "keydown", function(e) {
+ if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; }
+ if (e.keyCode == 27 || (options.closeOnEnter !== false && e.keyCode == 13)) {
+ inp.blur();
+ CodeMirror.e_stop(e);
+ close();
+ }
+ if (e.keyCode == 13) callback(inp.value);
+ });
+
+ if (options.closeOnBlur !== false) CodeMirror.on(inp, "blur", close);
+
+ inp.focus();
+ } else if (button = dialog.getElementsByTagName("button")[0]) {
+ CodeMirror.on(button, "click", function() {
+ close();
+ me.focus();
+ });
+
+ if (options.closeOnBlur !== false) CodeMirror.on(button, "blur", close);
+
+ button.focus();
+ }
+ return close;
+ });
+
+ CodeMirror.defineExtension("openNotification", function(template, options) {
+ if (this.virtualSelectionMode()) return;
+ closeNotification(this, close);
+ var dialog = dialogDiv(this, template, options && options.bottom);
+ var closed = false, doneTimer;
+ var duration = options && typeof options.duration !== "undefined" ? options.duration : 5000;
+
+ function close() {
+ if (closed) return;
+ closed = true;
+ clearTimeout(doneTimer);
+ dialog.parentNode.removeChild(dialog);
+ }
+
+ CodeMirror.on(dialog, 'click', function(e) {
+ CodeMirror.e_preventDefault(e);
+ close();
+ });
+
+ if (duration)
+ doneTimer = setTimeout(close, duration);
+
+ return close;
+ });
+})();
+
+
+ var defaultKeymap = [
+ { keys: '<Left>', type: 'keyToKey', toKeys: 'h' },
+ { keys: '<Right>', type: 'keyToKey', toKeys: 'l' },
+ { keys: '<Up>', type: 'keyToKey', toKeys: 'k' },
+ { keys: '<Down>', type: 'keyToKey', toKeys: 'j' },
+ { keys: '<Space>', type: 'keyToKey', toKeys: 'l' },
+ { keys: '<BS>', type: 'keyToKey', toKeys: 'h', context: 'normal'},
+ { keys: '<C-Space>', type: 'keyToKey', toKeys: 'W' },
+ { keys: '<C-BS>', type: 'keyToKey', toKeys: 'B', context: 'normal' },
+ { keys: '<S-Space>', type: 'keyToKey', toKeys: 'w' },
+ { keys: '<S-BS>', type: 'keyToKey', toKeys: 'b', context: 'normal' },
+ { keys: '<C-n>', type: 'keyToKey', toKeys: 'j' },
+ { keys: '<C-p>', type: 'keyToKey', toKeys: 'k' },
+ { keys: '<C-[>', type: 'keyToKey', toKeys: '<Esc>' },
+ { keys: '<C-c>', type: 'keyToKey', toKeys: '<Esc>' },
+ { keys: '<C-[>', type: 'keyToKey', toKeys: '<Esc>', context: 'insert' },
+ { keys: '<C-c>', type: 'keyToKey', toKeys: '<Esc>', context: 'insert' },
+ { keys: 's', type: 'keyToKey', toKeys: 'cl', context: 'normal' },
+ { keys: 's', type: 'keyToKey', toKeys: 'c', context: 'visual'},
+ { keys: 'S', type: 'keyToKey', toKeys: 'cc', context: 'normal' },
+ { keys: 'S', type: 'keyToKey', toKeys: 'VdO', context: 'visual' },
+ { keys: '<Home>', type: 'keyToKey', toKeys: '0' },
+ { keys: '<End>', type: 'keyToKey', toKeys: '$' },
+ { keys: '<PageUp>', type: 'keyToKey', toKeys: '<C-b>' },
+ { keys: '<PageDown>', type: 'keyToKey', toKeys: '<C-f>' },
+ { keys: '<CR>', type: 'keyToKey', toKeys: 'j^', context: 'normal' },
+ { keys: 'H', type: 'motion', motion: 'moveToTopLine', motionArgs: { linewise: true, toJumplist: true }},
+ { keys: 'M', type: 'motion', motion: 'moveToMiddleLine', motionArgs: { linewise: true, toJumplist: true }},
+ { keys: 'L', type: 'motion', motion: 'moveToBottomLine', motionArgs: { linewise: true, toJumplist: true }},
+ { keys: 'h', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: false }},
+ { keys: 'l', type: 'motion', motion: 'moveByCharacters', motionArgs: { forward: true }},
+ { keys: 'j', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, linewise: true }},
+ { keys: 'k', type: 'motion', motion: 'moveByLines', motionArgs: { forward: false, linewise: true }},
+ { keys: 'gj', type: 'motion', motion: 'moveByDisplayLines', motionArgs: { forward: true }},
+ { keys: 'gk', type: 'motion', motion: 'moveByDisplayLines', motionArgs: { forward: false }},
+ { keys: 'w', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: false }},
+ { keys: 'W', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: false, bigWord: true }},
+ { keys: 'e', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: true, inclusive: true }},
+ { keys: 'E', type: 'motion', motion: 'moveByWords', motionArgs: { forward: true, wordEnd: true, bigWord: true, inclusive: true }},
+ { keys: 'b', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false }},
+ { keys: 'B', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false, bigWord: true }},
+ { keys: 'ge', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, inclusive: true }},
+ { keys: 'gE', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, bigWord: true, inclusive: true }},
+ { keys: '{', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: false, toJumplist: true }},
+ { keys: '}', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: true, toJumplist: true }},
+ { keys: '<C-f>', type: 'motion', motion: 'moveByPage', motionArgs: { forward: true }},
+ { keys: '<C-b>', type: 'motion', motion: 'moveByPage', motionArgs: { forward: false }},
+ { keys: '<C-d>', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: true, explicitRepeat: true }},
+ { keys: '<C-u>', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: false, explicitRepeat: true }},
+ { keys: 'gg', type: 'motion', motion: 'moveToLineOrEdgeOfDocument', motionArgs: { forward: false, explicitRepeat: true, linewise: true, toJumplist: true }},
+ { keys: 'G', type: 'motion', motion: 'moveToLineOrEdgeOfDocument', motionArgs: { forward: true, explicitRepeat: true, linewise: true, toJumplist: true }},
+ { keys: '0', type: 'motion', motion: 'moveToStartOfLine' },
+ { keys: '^', type: 'motion', motion: 'moveToFirstNonWhiteSpaceCharacter' },
+ { keys: '+', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, toFirstChar:true }},
+ { keys: '-', type: 'motion', motion: 'moveByLines', motionArgs: { forward: false, toFirstChar:true }},
+ { keys: '_', type: 'motion', motion: 'moveByLines', motionArgs: { forward: true, toFirstChar:true, repeatOffset:-1 }},
+ { keys: '$', type: 'motion', motion: 'moveToEol', motionArgs: { inclusive: true }},
+ { keys: '%', type: 'motion', motion: 'moveToMatchedSymbol', motionArgs: { inclusive: true, toJumplist: true }},
+ { keys: 'f<character>', type: 'motion', motion: 'moveToCharacter', motionArgs: { forward: true , inclusive: true }},
+ { keys: 'F<character>', type: 'motion', motion: 'moveToCharacter', motionArgs: { forward: false }},
+ { keys: 't<character>', type: 'motion', motion: 'moveTillCharacter', motionArgs: { forward: true, inclusive: true }},
+ { keys: 'T<character>', type: 'motion', motion: 'moveTillCharacter', motionArgs: { forward: false }},
+ { keys: ';', type: 'motion', motion: 'repeatLastCharacterSearch', motionArgs: { forward: true }},
+ { keys: ',', type: 'motion', motion: 'repeatLastCharacterSearch', motionArgs: { forward: false }},
+ { keys: '\'<character>', type: 'motion', motion: 'goToMark', motionArgs: {toJumplist: true, linewise: true}},
+ { keys: '`<character>', type: 'motion', motion: 'goToMark', motionArgs: {toJumplist: true}},
+ { keys: ']`', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true } },
+ { keys: '[`', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false } },
+ { keys: ']\'', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true, linewise: true } },
+ { keys: '[\'', type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false, linewise: true } },
+ { keys: ']p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true, matchIndent: true}},
+ { keys: '[p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true, matchIndent: true}},
+ { keys: ']<character>', type: 'motion', motion: 'moveToSymbol', motionArgs: { forward: true, toJumplist: true}},
+ { keys: '[<character>', type: 'motion', motion: 'moveToSymbol', motionArgs: { forward: false, toJumplist: true}},
+ { keys: '|', type: 'motion', motion: 'moveToColumn'},
+ { keys: 'o', type: 'motion', motion: 'moveToOtherHighlightedEnd', context:'visual'},
+ { keys: 'O', type: 'motion', motion: 'moveToOtherHighlightedEnd', motionArgs: {sameLine: true}, context:'visual'},
+ { keys: 'd', type: 'operator', operator: 'delete' },
+ { keys: 'y', type: 'operator', operator: 'yank' },
+ { keys: 'c', type: 'operator', operator: 'change' },
+ { keys: '>', type: 'operator', operator: 'indent', operatorArgs: { indentRight: true }},
+ { keys: '<', type: 'operator', operator: 'indent', operatorArgs: { indentRight: false }},
+ { keys: 'g~', type: 'operator', operator: 'changeCase' },
+ { keys: 'gu', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: true}, isEdit: true },
+ { keys: 'gU', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: false}, isEdit: true },
+ { keys: 'n', type: 'motion', motion: 'findNext', motionArgs: { forward: true, toJumplist: true }},
+ { keys: 'N', type: 'motion', motion: 'findNext', motionArgs: { forward: false, toJumplist: true }},
+ { keys: 'x', type: 'operatorMotion', operator: 'delete', motion: 'moveByCharacters', motionArgs: { forward: true }, operatorMotionArgs: { visualLine: false }},
+ { keys: 'X', type: 'operatorMotion', operator: 'delete', motion: 'moveByCharacters', motionArgs: { forward: false }, operatorMotionArgs: { visualLine: true }},
+ { keys: 'D', type: 'operatorMotion', operator: 'delete', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'},
+ { keys: 'D', type: 'operator', operator: 'delete', operatorArgs: { linewise: true }, context: 'visual'},
+ { keys: 'Y', type: 'operatorMotion', operator: 'yank', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'},
+ { keys: 'Y', type: 'operator', operator: 'yank', operatorArgs: { linewise: true }, context: 'visual'},
+ { keys: 'C', type: 'operatorMotion', operator: 'change', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'},
+ { keys: 'C', type: 'operator', operator: 'change', operatorArgs: { linewise: true }, context: 'visual'},
+ { keys: '~', type: 'operatorMotion', operator: 'changeCase', motion: 'moveByCharacters', motionArgs: { forward: true }, operatorArgs: { shouldMoveCursor: true }, context: 'normal'},
+ { keys: '~', type: 'operator', operator: 'changeCase', context: 'visual'},
+ { keys: '<C-w>', type: 'operatorMotion', operator: 'delete', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false }, context: 'insert' },
+ { keys: '<C-i>', type: 'action', action: 'jumpListWalk', actionArgs: { forward: true }},
+ { keys: '<C-o>', type: 'action', action: 'jumpListWalk', actionArgs: { forward: false }},
+ { keys: '<C-e>', type: 'action', action: 'scroll', actionArgs: { forward: true, linewise: true }},
+ { keys: '<C-y>', type: 'action', action: 'scroll', actionArgs: { forward: false, linewise: true }},
+ { keys: 'a', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'charAfter' }, context: 'normal' },
+ { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'eol' }, context: 'normal' },
+ { keys: 'A', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'endOfSelectedArea' }, context: 'visual' },
+ { keys: 'i', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'inplace' }, context: 'normal' },
+ { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'firstNonBlank'}, context: 'normal' },
+ { keys: 'I', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { insertAt: 'startOfSelectedArea' }, context: 'visual' },
+ { keys: 'o', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: true }, context: 'normal' },
+ { keys: 'O', type: 'action', action: 'newLineAndEnterInsertMode', isEdit: true, interlaceInsertRepeat: true, actionArgs: { after: false }, context: 'normal' },
+ { keys: 'v', type: 'action', action: 'toggleVisualMode' },
+ { keys: 'V', type: 'action', action: 'toggleVisualMode', actionArgs: { linewise: true }},
+ { keys: '<C-v>', type: 'action', action: 'toggleVisualMode', actionArgs: { blockwise: true }},
+ { keys: '<C-q>', type: 'action', action: 'toggleVisualMode', actionArgs: { blockwise: true }},
+ { keys: 'gv', type: 'action', action: 'reselectLastSelection' },
+ { keys: 'J', type: 'action', action: 'joinLines', isEdit: true },
+ { keys: 'p', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: true, isEdit: true }},
+ { keys: 'P', type: 'action', action: 'paste', isEdit: true, actionArgs: { after: false, isEdit: true }},
+ { keys: 'r<character>', type: 'action', action: 'replace', isEdit: true },
+ { keys: '@<character>', type: 'action', action: 'replayMacro' },
+ { keys: 'q<character>', type: 'action', action: 'enterMacroRecordMode' },
+ { keys: 'R', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { replace: true }},
+ { keys: 'u', type: 'action', action: 'undo', context: 'normal' },
+ { keys: 'u', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: true}, context: 'visual', isEdit: true },
+ { keys: 'U', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: false}, context: 'visual', isEdit: true },
+ { keys: '<C-r>', type: 'action', action: 'redo' },
+ { keys: 'm<character>', type: 'action', action: 'setMark' },
+ { keys: '"<character>', type: 'action', action: 'setRegister' },
+ { keys: 'zz', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' }},
+ { keys: 'z.', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'center' }, motion: 'moveToFirstNonWhiteSpaceCharacter' },
+ { keys: 'zt', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'top' }},
+ { keys: 'z<CR>', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'top' }, motion: 'moveToFirstNonWhiteSpaceCharacter' },
+ { keys: 'z-', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'bottom' }},
+ { keys: 'zb', type: 'action', action: 'scrollToCursor', actionArgs: { position: 'bottom' }, motion: 'moveToFirstNonWhiteSpaceCharacter' },
+ { keys: '.', type: 'action', action: 'repeatLastEdit' },
+ { keys: '<C-a>', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: {increase: true, backtrack: false}},
+ { keys: '<C-x>', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: {increase: false, backtrack: false}},
+ { keys: 'a<character>', type: 'motion', motion: 'textObjectManipulation' },
+ { keys: 'i<character>', type: 'motion', motion: 'textObjectManipulation', motionArgs: { textObjectInner: true }},
+ { keys: '/', type: 'search', searchArgs: { forward: true, querySrc: 'prompt', toJumplist: true }},
+ { keys: '?', type: 'search', searchArgs: { forward: false, querySrc: 'prompt', toJumplist: true }},
+ { keys: '*', type: 'search', searchArgs: { forward: true, querySrc: 'wordUnderCursor', wholeWordOnly: true, toJumplist: true }},
+ { keys: '#', type: 'search', searchArgs: { forward: false, querySrc: 'wordUnderCursor', wholeWordOnly: true, toJumplist: true }},
+ { keys: 'g*', type: 'search', searchArgs: { forward: true, querySrc: 'wordUnderCursor', toJumplist: true }},
+ { keys: 'g#', type: 'search', searchArgs: { forward: false, querySrc: 'wordUnderCursor', toJumplist: true }},
+ { keys: ':', type: 'ex' }
+ ];
+ var defaultExCommandMap = [
+ { name: 'colorscheme', shortName: 'colo' },
+ { name: 'map' },
+ { name: 'imap', shortName: 'im' },
+ { name: 'nmap', shortName: 'nm' },
+ { name: 'vmap', shortName: 'vm' },
+ { name: 'unmap' },
+ { name: 'write', shortName: 'w' },
+ { name: 'undo', shortName: 'u' },
+ { name: 'redo', shortName: 'red' },
+ { name: 'set', shortName: 'se' },
+ { name: 'set', shortName: 'se' },
+ { name: 'setlocal', shortName: 'setl' },
+ { name: 'setglobal', shortName: 'setg' },
+ { name: 'sort', shortName: 'sor' },
+ { name: 'substitute', shortName: 's', possiblyAsync: true },
+ { name: 'nohlsearch', shortName: 'noh' },
+ { name: 'delmarks', shortName: 'delm' },
+ { name: 'registers', shortName: 'reg', excludeFromCommandHistory: true },
+ { name: 'global', shortName: 'g' }
+ ];
+
+ var Pos = CodeMirror.Pos;
+
+ var Vim = function() { return vimApi; } //{
+ function enterVimMode(cm) {
+ cm.setOption('disableInput', true);
+ cm.setOption('showCursorWhenSelecting', false);
+ CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"});
+ cm.on('cursorActivity', onCursorActivity);
+ maybeInitVimState(cm);
+ CodeMirror.on(cm.getInputField(), 'paste', getOnPasteFn(cm));
+ }
+
+ function leaveVimMode(cm) {
+ cm.setOption('disableInput', false);
+ cm.off('cursorActivity', onCursorActivity);
+ CodeMirror.off(cm.getInputField(), 'paste', getOnPasteFn(cm));
+ cm.state.vim = null;
+ }
+
+ function detachVimMap(cm, next) {
+ if (this == CodeMirror.keyMap.vim)
+ CodeMirror.rmClass(cm.getWrapperElement(), "cm-fat-cursor");
+
+ if (!next || next.attach != attachVimMap)
+ leaveVimMode(cm, false);
+ }
+ function attachVimMap(cm, prev) {
+ if (this == CodeMirror.keyMap.vim)
+ CodeMirror.addClass(cm.getWrapperElement(), "cm-fat-cursor");
+
+ if (!prev || prev.attach != attachVimMap)
+ enterVimMode(cm);
+ }
+ CodeMirror.defineOption('vimMode', false, function(cm, val, prev) {
+ if (val && cm.getOption("keyMap") != "vim")
+ cm.setOption("keyMap", "vim");
+ else if (!val && prev != CodeMirror.Init && /^vim/.test(cm.getOption("keyMap")))
+ cm.setOption("keyMap", "default");
+ });
+
+ function cmKey(key, cm) {
+ if (!cm) { return undefined; }
+ var vimKey = cmKeyToVimKey(key);
+ if (!vimKey) {
+ return false;
+ }
+ var cmd = CodeMirror.Vim.findKey(cm, vimKey);
+ if (typeof cmd == 'function') {
+ CodeMirror.signal(cm, 'vim-keypress', vimKey);
+ }
+ return cmd;
+ }
+
+ var modifiers = {'Shift': 'S', 'Ctrl': 'C', 'Alt': 'A', 'Cmd': 'D', 'Mod': 'A'};
+ var specialKeys = {Enter:'CR',Backspace:'BS',Delete:'Del'};
+ function cmKeyToVimKey(key) {
+ if (key.charAt(0) == '\'') {
+ return key.charAt(1);
+ }
+ var pieces = key.split(/-(?!$)/);
+ var lastPiece = pieces[pieces.length - 1];
+ if (pieces.length == 1 && pieces[0].length == 1) {
+ return false;
+ } else if (pieces.length == 2 && pieces[0] == 'Shift' && lastPiece.length == 1) {
+ return false;
+ }
+ var hasCharacter = false;
+ for (var i = 0; i < pieces.length; i++) {
+ var piece = pieces[i];
+ if (piece in modifiers) { pieces[i] = modifiers[piece]; }
+ else { hasCharacter = true; }
+ if (piece in specialKeys) { pieces[i] = specialKeys[piece]; }
+ }
+ if (!hasCharacter) {
+ return false;
+ }
+ if (isUpperCase(lastPiece)) {
+ pieces[pieces.length - 1] = lastPiece.toLowerCase();
+ }
+ return '<' + pieces.join('-') + '>';
+ }
+
+ function getOnPasteFn(cm) {
+ var vim = cm.state.vim;
+ if (!vim.onPasteFn) {
+ vim.onPasteFn = function() {
+ if (!vim.insertMode) {
+ cm.setCursor(offsetCursor(cm.getCursor(), 0, 1));
+ actions.enterInsertMode(cm, {}, vim);
+ }
+ };
+ }
+ return vim.onPasteFn;
+ }
+
+ var numberRegex = /[\d]/;
+ var wordCharTest = [CodeMirror.isWordChar, function(ch) {
+ return ch && !CodeMirror.isWordChar(ch) && !/\s/.test(ch);
+ }], bigWordCharTest = [function(ch) {
+ return /\S/.test(ch);
+ }];
+ function makeKeyRange(start, size) {
+ var keys = [];
+ for (var i = start; i < start + size; i++) {
+ keys.push(String.fromCharCode(i));
+ }
+ return keys;
+ }
+ var upperCaseAlphabet = makeKeyRange(65, 26);
+ var lowerCaseAlphabet = makeKeyRange(97, 26);
+ var numbers = makeKeyRange(48, 10);
+ var validMarks = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['<', '>']);
+ var validRegisters = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['-', '"', '.', ':', '/']);
+
+ function isLine(cm, line) {
+ return line >= cm.firstLine() && line <= cm.lastLine();
+ }
+ function isLowerCase(k) {
+ return (/^[a-z]$/).test(k);
+ }
+ function isMatchableSymbol(k) {
+ return '()[]{}'.indexOf(k) != -1;
+ }
+ function isNumber(k) {
+ return numberRegex.test(k);
+ }
+ function isUpperCase(k) {
+ return (/^[A-Z]$/).test(k);
+ }
+ function isWhiteSpaceString(k) {
+ return (/^\s*$/).test(k);
+ }
+ function inArray(val, arr) {
+ for (var i = 0; i < arr.length; i++) {
+ if (arr[i] == val) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ var options = {};
+ function defineOption(name, defaultValue, type, aliases, callback) {
+ if (defaultValue === undefined && !callback) {
+ throw Error('defaultValue is required unless callback is provided');
+ }
+ if (!type) { type = 'string'; }
+ options[name] = {
+ type: type,
+ defaultValue: defaultValue,
+ callback: callback
+ };
+ if (aliases) {
+ for (var i = 0; i < aliases.length; i++) {
+ options[aliases[i]] = options[name];
+ }
+ }
+ if (defaultValue) {
+ setOption(name, defaultValue);
+ }
+ }
+
+ function setOption(name, value, cm, cfg) {
+ var option = options[name];
+ cfg = cfg || {};
+ var scope = cfg.scope;
+ if (!option) {
+ throw Error('Unknown option: ' + name);
+ }
+ if (option.type == 'boolean') {
+ if (value && value !== true) {
+ throw Error('Invalid argument: ' + name + '=' + value);
+ } else if (value !== false) {
+ value = true;
+ }
+ }
+ if (option.callback) {
+ if (scope !== 'local') {
+ option.callback(value, undefined);
+ }
+ if (scope !== 'global' && cm) {
+ option.callback(value, cm);
+ }
+ } else {
+ if (scope !== 'local') {
+ option.value = option.type == 'boolean' ? !!value : value;
+ }
+ if (scope !== 'global' && cm) {
+ cm.state.vim.options[name] = {value: value};
+ }
+ }
+ }
+
+ function getOption(name, cm, cfg) {
+ var option = options[name];
+ cfg = cfg || {};
+ var scope = cfg.scope;
+ if (!option) {
+ throw Error('Unknown option: ' + name);
+ }
+ if (option.callback) {
+ var local = cm && option.callback(undefined, cm);
+ if (scope !== 'global' && local !== undefined) {
+ return local;
+ }
+ if (scope !== 'local') {
+ return option.callback();
+ }
+ return;
+ } else {
+ var local = (scope !== 'global') && (cm && cm.state.vim.options[name]);
+ return (local || (scope !== 'local') && option || {}).value;
+ }
+ }
+
+ defineOption('filetype', undefined, 'string', ['ft'], function(name, cm) {
+ if (cm === undefined) {
+ return;
+ }
+ if (name === undefined) {
+ var mode = cm.getOption('mode');
+ return mode == 'null' ? '' : mode;
+ } else {
+ var mode = name == '' ? 'null' : name;
+ cm.setOption('mode', mode);
+ }
+ });
+
+ var createCircularJumpList = function() {
+ var size = 100;
+ var pointer = -1;
+ var head = 0;
+ var tail = 0;
+ var buffer = new Array(size);
+ function add(cm, oldCur, newCur) {
+ var current = pointer % size;
+ var curMark = buffer[current];
+ function useNextSlot(cursor) {
+ var next = ++pointer % size;
+ var trashMark = buffer[next];
+ if (trashMark) {
+ trashMark.clear();
+ }
+ buffer[next] = cm.setBookmark(cursor);
+ }
+ if (curMark) {
+ var markPos = curMark.find();
+ if (markPos && !cursorEqual(markPos, oldCur)) {
+ useNextSlot(oldCur);
+ }
+ } else {
+ useNextSlot(oldCur);
+ }
+ useNextSlot(newCur);
+ head = pointer;
+ tail = pointer - size + 1;
+ if (tail < 0) {
+ tail = 0;
+ }
+ }
+ function move(cm, offset) {
+ pointer += offset;
+ if (pointer > head) {
+ pointer = head;
+ } else if (pointer < tail) {
+ pointer = tail;
+ }
+ var mark = buffer[(size + pointer) % size];
+ if (mark && !mark.find()) {
+ var inc = offset > 0 ? 1 : -1;
+ var newCur;
+ var oldCur = cm.getCursor();
+ do {
+ pointer += inc;
+ mark = buffer[(size + pointer) % size];
+ if (mark &&
+ (newCur = mark.find()) &&
+ !cursorEqual(oldCur, newCur)) {
+ break;
+ }
+ } while (pointer < head && pointer > tail);
+ }
+ return mark;
+ }
+ return {
+ cachedCursor: undefined, //used for # and * jumps
+ add: add,
+ move: move
+ };
+ };
+ var createInsertModeChanges = function(c) {
+ if (c) {
+ return {
+ changes: c.changes,
+ expectCursorActivityForChange: c.expectCursorActivityForChange
+ };
+ }
+ return {
+ changes: [],
+ expectCursorActivityForChange: false
+ };
+ };
+
+ function MacroModeState() {
+ this.latestRegister = undefined;
+ this.isPlaying = false;
+ this.isRecording = false;
+ this.replaySearchQueries = [];
+ this.onRecordingDone = undefined;
+ this.lastInsertModeChanges = createInsertModeChanges();
+ }
+ MacroModeState.prototype = {
+ exitMacroRecordMode: function() {
+ var macroModeState = vimGlobalState.macroModeState;
+ if (macroModeState.onRecordingDone) {
+ macroModeState.onRecordingDone(); // close dialog
+ }
+ macroModeState.onRecordingDone = undefined;
+ macroModeState.isRecording = false;
+ },
+ enterMacroRecordMode: function(cm, registerName) {
+ var register =
+ vimGlobalState.registerController.getRegister(registerName);
+ if (register) {
+ register.clear();
+ this.latestRegister = registerName;
+ if (cm.openDialog) {
+ this.onRecordingDone = cm.openDialog(
+ '(recording)['+registerName+']', null, {bottom:true});
+ }
+ this.isRecording = true;
+ }
+ }
+ };
+
+ function maybeInitVimState(cm) {
+ if (!cm.state.vim) {
+ cm.state.vim = {
+ inputState: new InputState(),
+ lastEditInputState: undefined,
+ lastEditActionCommand: undefined,
+ lastHPos: -1,
+ lastHSPos: -1,
+ lastMotion: null,
+ marks: {},
+ fakeCursor: null,
+ insertMode: false,
+ insertModeRepeat: undefined,
+ visualMode: false,
+ visualLine: false,
+ visualBlock: false,
+ lastSelection: null,
+ lastPastedText: null,
+ sel: {},
+ options: {}
+ };
+ }
+ return cm.state.vim;
+ }
+ var vimGlobalState;
+ function resetVimGlobalState() {
+ vimGlobalState = {
+ searchQuery: null,
+ searchIsReversed: false,
+ lastSubstituteReplacePart: undefined,
+ jumpList: createCircularJumpList(),
+ macroModeState: new MacroModeState,
+ lastChararacterSearch: {increment:0, forward:true, selectedCharacter:''},
+ registerController: new RegisterController({}),
+ searchHistoryController: new HistoryController({}),
+ exCommandHistoryController : new HistoryController({})
+ };
+ for (var optionName in options) {
+ var option = options[optionName];
+ option.value = option.defaultValue;
+ }
+ }
+
+ var lastInsertModeKeyTimer;
+ var vimApi= {
+ buildKeyMap: function() {
+ },
+ getRegisterController: function() {
+ return vimGlobalState.registerController;
+ },
+ resetVimGlobalState_: resetVimGlobalState,
+ getVimGlobalState_: function() {
+ return vimGlobalState;
+ },
+ maybeInitVimState_: maybeInitVimState,
+
+ suppressErrorLogging: false,
+
+ InsertModeKey: InsertModeKey,
+ map: function(lhs, rhs, ctx) {
+ exCommandDispatcher.map(lhs, rhs, ctx);
+ },
+ unmap: function(lhs, ctx) {
+ exCommandDispatcher.unmap(lhs, ctx);
+ },
+ setOption: setOption,
+ getOption: getOption,
+ defineOption: defineOption,
+ defineEx: function(name, prefix, func){
+ if (!prefix) {
+ prefix = name;
+ } else if (name.indexOf(prefix) !== 0) {
+ throw new Error('(Vim.defineEx) "'+prefix+'" is not a prefix of "'+name+'", command not registered');
+ }
+ exCommands[name]=func;
+ exCommandDispatcher.commandMap_[prefix]={name:name, shortName:prefix, type:'api'};
+ },
+ handleKey: function (cm, key, origin) {
+ var command = this.findKey(cm, key, origin);
+ if (typeof command === 'function') {
+ return command();
+ }
+ },
+ findKey: function(cm, key, origin) {
+ var vim = maybeInitVimState(cm);
+ function handleMacroRecording() {
+ var macroModeState = vimGlobalState.macroModeState;
+ if (macroModeState.isRecording) {
+ if (key == 'q') {
+ macroModeState.exitMacroRecordMode();
+ clearInputState(cm);
+ return true;
+ }
+ if (origin != 'mapping') {
+ logKey(macroModeState, key);
+ }
+ }
+ }
+ function handleEsc() {
+ if (key == '<Esc>') {
+ clearInputState(cm);
+ if (vim.visualMode) {
+ exitVisualMode(cm);
+ } else if (vim.insertMode) {
+ exitInsertMode(cm);
+ }
+ return true;
+ }
+ }
+ function doKeyToKey(keys) {
+ var match;
+ while (keys) {
+ match = (/<\w+-.+?>|<\w+>|./).exec(keys);
+ key = match[0];
+ keys = keys.substring(match.index + key.length);
+ CodeMirror.Vim.handleKey(cm, key, 'mapping');
+ }
+ }
+
+ function handleKeyInsertMode() {
+ if (handleEsc()) { return true; }
+ var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key;
+ var keysAreChars = key.length == 1;
+ var match = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert');
+ while (keys.length > 1 && match.type != 'full') {
+ var keys = vim.inputState.keyBuffer = keys.slice(1);
+ var thisMatch = commandDispatcher.matchCommand(keys, defaultKeymap, vim.inputState, 'insert');
+ if (thisMatch.type != 'none') { match = thisMatch; }
+ }
+ if (match.type == 'none') { clearInputState(cm); return false; }
+ else if (match.type == 'partial') {
+ if (lastInsertModeKeyTimer) { window.clearTimeout(lastInsertModeKeyTimer); }
+ lastInsertModeKeyTimer = window.setTimeout(
+ function() { if (vim.insertMode && vim.inputState.keyBuffer) { clearInputState(cm); } },
+ getOption('insertModeEscKeysTimeout'));
+ return !keysAreChars;
+ }
+
+ if (lastInsertModeKeyTimer) { window.clearTimeout(lastInsertModeKeyTimer); }
+ if (keysAreChars) {
+ var selections = cm.listSelections();
+ for (var i = 0; i < selections.length; i++) {
+ var here = selections[i].head;
+ cm.replaceRange('', offsetCursor(here, 0, -(keys.length - 1)), here, '+input');
+ }
+ vimGlobalState.macroModeState.lastInsertModeChanges.changes.pop();
+ }
+ clearInputState(cm);
+ return match.command;
+ }
+
+ function handleKeyNonInsertMode() {
+ if (handleMacroRecording() || handleEsc()) { return true; }
+
+ var keys = vim.inputState.keyBuffer = vim.inputState.keyBuffer + key;
+ if (/^[1-9]\d*$/.test(keys)) { return true; }
+
+ var keysMatcher = /^(\d*)(.*)$/.exec(keys);
+ if (!keysMatcher) { clearInputState(cm); return false; }
+ var context = vim.visualMode ? 'visual' :
+ 'normal';
+ var match = commandDispatcher.matchCommand(keysMatcher[2] || keysMatcher[1], defaultKeymap, vim.inputState, context);
+ if (match.type == 'none') { clearInputState(cm); return false; }
+ else if (match.type == 'partial') { return true; }
+
+ vim.inputState.keyBuffer = '';
+ var keysMatcher = /^(\d*)(.*)$/.exec(keys);
+ if (keysMatcher[1] && keysMatcher[1] != '0') {
+ vim.inputState.pushRepeatDigit(keysMatcher[1]);
+ }
+ return match.command;
+ }
+
+ var command;
+ if (vim.insertMode) { command = handleKeyInsertMode(); }
+ else { command = handleKeyNonInsertMode(); }
+ if (command === false) {
+ return undefined;
+ } else if (command === true) {
+ return function() { return true; };
+ } else {
+ return function() {
+ if ((command.operator || command.isEdit) && cm.getOption('readOnly'))
+ return; // ace_patch
+ return cm.operation(function() {
+ cm.curOp.isVimOp = true;
+ try {
+ if (command.type == 'keyToKey') {
+ doKeyToKey(command.toKeys);
+ } else {
+ commandDispatcher.processCommand(cm, vim, command);
+ }
+ } catch (e) {
+ cm.state.vim = undefined;
+ maybeInitVimState(cm);
+ if (!CodeMirror.Vim.suppressErrorLogging) {
+ console['log'](e);
+ }
+ throw e;
+ }
+ return true;
+ });
+ };
+ }
+ },
+ handleEx: function(cm, input) {
+ exCommandDispatcher.processCommand(cm, input);
+ },
+
+ defineMotion: defineMotion,
+ defineAction: defineAction,
+ defineOperator: defineOperator,
+ mapCommand: mapCommand,
+ _mapCommand: _mapCommand,
+
+ defineRegister: defineRegister,
+
+ exitVisualMode: exitVisualMode,
+ exitInsertMode: exitInsertMode
+ };
+ function InputState() {
+ this.prefixRepeat = [];
+ this.motionRepeat = [];
+
+ this.operator = null;
+ this.operatorArgs = null;
+ this.motion = null;
+ this.motionArgs = null;
+ this.keyBuffer = []; // For matching multi-key commands.
+ this.registerName = null; // Defaults to the unnamed register.
+ }
+ InputState.prototype.pushRepeatDigit = function(n) {
+ if (!this.operator) {
+ this.prefixRepeat = this.prefixRepeat.concat(n);
+ } else {
+ this.motionRepeat = this.motionRepeat.concat(n);
+ }
+ };
+ InputState.prototype.getRepeat = function() {
+ var repeat = 0;
+ if (this.prefixRepeat.length > 0 || this.motionRepeat.length > 0) {
+ repeat = 1;
+ if (this.prefixRepeat.length > 0) {
+ repeat *= parseInt(this.prefixRepeat.join(''), 10);
+ }
+ if (this.motionRepeat.length > 0) {
+ repeat *= parseInt(this.motionRepeat.join(''), 10);
+ }
+ }
+ return repeat;
+ };
+
+ function clearInputState(cm, reason) {
+ cm.state.vim.inputState = new InputState();
+ CodeMirror.signal(cm, 'vim-command-done', reason);
+ }
+ function Register(text, linewise, blockwise) {
+ this.clear();
+ this.keyBuffer = [text || ''];
+ this.insertModeChanges = [];
+ this.searchQueries = [];
+ this.linewise = !!linewise;
+ this.blockwise = !!blockwise;
+ }
+ Register.prototype = {
+ setText: function(text, linewise, blockwise) {
+ this.keyBuffer = [text || ''];
+ this.linewise = !!linewise;
+ this.blockwise = !!blockwise;
+ },
+ pushText: function(text, linewise) {
+ if (linewise) {
+ if (!this.linewise) {
+ this.keyBuffer.push('\n');
+ }
+ this.linewise = true;
+ }
+ this.keyBuffer.push(text);
+ },
+ pushInsertModeChanges: function(changes) {
+ this.insertModeChanges.push(createInsertModeChanges(changes));
+ },
+ pushSearchQuery: function(query) {
+ this.searchQueries.push(query);
+ },
+ clear: function() {
+ this.keyBuffer = [];
+ this.insertModeChanges = [];
+ this.searchQueries = [];
+ this.linewise = false;
+ },
+ toString: function() {
+ return this.keyBuffer.join('');
+ }
+ };
+ function defineRegister(name, register) {
+ var registers = vimGlobalState.registerController.registers[name];
+ if (!name || name.length != 1) {
+ throw Error('Register name must be 1 character');
+ }
+ registers[name] = register;
+ validRegisters.push(name);
+ }
+ function RegisterController(registers) {
+ this.registers = registers;
+ this.unnamedRegister = registers['"'] = new Register();
+ registers['.'] = new Register();
+ registers[':'] = new Register();
+ registers['/'] = new Register();
+ }
+ RegisterController.prototype = {
+ pushText: function(registerName, operator, text, linewise, blockwise) {
+ if (linewise && text.charAt(0) == '\n') {
+ text = text.slice(1) + '\n';
+ }
+ if (linewise && text.charAt(text.length - 1) !== '\n'){
+ text += '\n';
+ }
+ var register = this.isValidRegister(registerName) ?
+ this.getRegister(registerName) : null;
+ if (!register) {
+ switch (operator) {
+ case 'yank':
+ this.registers['0'] = new Register(text, linewise, blockwise);
+ break;
+ case 'delete':
+ case 'change':
+ if (text.indexOf('\n') == -1) {
+ this.registers['-'] = new Register(text, linewise);
+ } else {
+ this.shiftNumericRegisters_();
+ this.registers['1'] = new Register(text, linewise);
+ }
+ break;
+ }
+ this.unnamedRegister.setText(text, linewise, blockwise);
+ return;
+ }
+ var append = isUpperCase(registerName);
+ if (append) {
+ register.pushText(text, linewise);
+ } else {
+ register.setText(text, linewise, blockwise);
+ }
+ this.unnamedRegister.setText(register.toString(), linewise);
+ },
+ getRegister: function(name) {
+ if (!this.isValidRegister(name)) {
+ return this.unnamedRegister;
+ }
+ name = name.toLowerCase();
+ if (!this.registers[name]) {
+ this.registers[name] = new Register();
+ }
+ return this.registers[name];
+ },
+ isValidRegister: function(name) {
+ return name && inArray(name, validRegisters);
+ },
+ shiftNumericRegisters_: function() {
+ for (var i = 9; i >= 2; i--) {
+ this.registers[i] = this.getRegister('' + (i - 1));
+ }
+ }
+ };
+ function HistoryController() {
+ this.historyBuffer = [];
+ this.iterator;
+ this.initialPrefix = null;
+ }
+ HistoryController.prototype = {
+ nextMatch: function (input, up) {
+ var historyBuffer = this.historyBuffer;
+ var dir = up ? -1 : 1;
+ if (this.initialPrefix === null) this.initialPrefix = input;
+ for (var i = this.iterator + dir; up ? i >= 0 : i < historyBuffer.length; i+= dir) {
+ var element = historyBuffer[i];
+ for (var j = 0; j <= element.length; j++) {
+ if (this.initialPrefix == element.substring(0, j)) {
+ this.iterator = i;
+ return element;
+ }
+ }
+ }
+ if (i >= historyBuffer.length) {
+ this.iterator = historyBuffer.length;
+ return this.initialPrefix;
+ }
+ if (i < 0 ) return input;
+ },
+ pushInput: function(input) {
+ var index = this.historyBuffer.indexOf(input);
+ if (index > -1) this.historyBuffer.splice(index, 1);
+ if (input.length) this.historyBuffer.push(input);
+ },
+ reset: function() {
+ this.initialPrefix = null;
+ this.iterator = this.historyBuffer.length;
+ }
+ };
+ var commandDispatcher = {
+ matchCommand: function(keys, keyMap, inputState, context) {
+ var matches = commandMatches(keys, keyMap, context, inputState);
+ if (!matches.full && !matches.partial) {
+ return {type: 'none'};
+ } else if (!matches.full && matches.partial) {
+ return {type: 'partial'};
+ }
+
+ var bestMatch;
+ for (var i = 0; i < matches.full.length; i++) {
+ var match = matches.full[i];
+ if (!bestMatch) {
+ bestMatch = match;
+ }
+ }
+ if (bestMatch.keys.slice(-11) == '<character>') {
+ var character = lastChar(keys);
+ if (/<C-.>/.test(character)) return {type: 'none'};
+ inputState.selectedCharacter = character;
+ }
+ return {type: 'full', command: bestMatch};
+ },
+ processCommand: function(cm, vim, command) {
+ vim.inputState.repeatOverride = command.repeatOverride;
+ switch (command.type) {
+ case 'motion':
+ this.processMotion(cm, vim, command);
+ break;
+ case 'operator':
+ this.processOperator(cm, vim, command);
+ break;
+ case 'operatorMotion':
+ this.processOperatorMotion(cm, vim, command);
+ break;
+ case 'action':
+ this.processAction(cm, vim, command);
+ break;
+ case 'search':
+ this.processSearch(cm, vim, command);
+ break;
+ case 'ex':
+ case 'keyToEx':
+ this.processEx(cm, vim, command);
+ break;
+ default:
+ break;
+ }
+ },
+ processMotion: function(cm, vim, command) {
+ vim.inputState.motion = command.motion;
+ vim.inputState.motionArgs = copyArgs(command.motionArgs);
+ this.evalInput(cm, vim);
+ },
+ processOperator: function(cm, vim, command) {
+ var inputState = vim.inputState;
+ if (inputState.operator) {
+ if (inputState.operator == command.operator) {
+ inputState.motion = 'expandToLine';
+ inputState.motionArgs = { linewise: true };
+ this.evalInput(cm, vim);
+ return;
+ } else {
+ clearInputState(cm);
+ }
+ }
+ inputState.operator = command.operator;
+ inputState.operatorArgs = copyArgs(command.operatorArgs);
+ if (vim.visualMode) {
+ this.evalInput(cm, vim);
+ }
+ },
+ processOperatorMotion: function(cm, vim, command) {
+ var visualMode = vim.visualMode;
+ var operatorMotionArgs = copyArgs(command.operatorMotionArgs);
+ if (operatorMotionArgs) {
+ if (visualMode && operatorMotionArgs.visualLine) {
+ vim.visualLine = true;
+ }
+ }
+ this.processOperator(cm, vim, command);
+ if (!visualMode) {
+ this.processMotion(cm, vim, command);
+ }
+ },
+ processAction: function(cm, vim, command) {
+ var inputState = vim.inputState;
+ var repeat = inputState.getRepeat();
+ var repeatIsExplicit = !!repeat;
+ var actionArgs = copyArgs(command.actionArgs) || {};
+ if (inputState.selectedCharacter) {
+ actionArgs.selectedCharacter = inputState.selectedCharacter;
+ }
+ if (command.operator) {
+ this.processOperator(cm, vim, command);
+ }
+ if (command.motion) {
+ this.processMotion(cm, vim, command);
+ }
+ if (command.motion || command.operator) {
+ this.evalInput(cm, vim);
+ }
+ actionArgs.repeat = repeat || 1;
+ actionArgs.repeatIsExplicit = repeatIsExplicit;
+ actionArgs.registerName = inputState.registerName;
+ clearInputState(cm);
+ vim.lastMotion = null;
+ if (command.isEdit) {
+ this.recordLastEdit(vim, inputState, command);
+ }
+ actions[command.action](cm, actionArgs, vim);
+ },
+ processSearch: function(cm, vim, command) {
+ if (!cm.getSearchCursor) {
+ return;
+ }
+ var forward = command.searchArgs.forward;
+ var wholeWordOnly = command.searchArgs.wholeWordOnly;
+ getSearchState(cm).setReversed(!forward);
+ var promptPrefix = (forward) ? '/' : '?';
+ var originalQuery = getSearchState(cm).getQuery();
+ var originalScrollPos = cm.getScrollInfo();
+ function handleQuery(query, ignoreCase, smartCase) {
+ vimGlobalState.searchHistoryController.pushInput(query);
+ vimGlobalState.searchHistoryController.reset();
+ try {
+ updateSearchQuery(cm, query, ignoreCase, smartCase);
+ } catch (e) {
+ showConfirm(cm, 'Invalid regex: ' + query);
+ clearInputState(cm);
+ return;
+ }
+ commandDispatcher.processMotion(cm, vim, {
+ type: 'motion',
+ motion: 'findNext',
+ motionArgs: { forward: true, toJumplist: command.searchArgs.toJumplist }
+ });
+ }
+ function onPromptClose(query) {
+ cm.scrollTo(originalScrollPos.left, originalScrollPos.top);
+ handleQuery(query, true /** ignoreCase */, true /** smartCase */);
+ var macroModeState = vimGlobalState.macroModeState;
+ if (macroModeState.isRecording) {
+ logSearchQuery(macroModeState, query);
+ }
+ }
+ function onPromptKeyUp(e, query, close) {
+ var keyName = CodeMirror.keyName(e), up;
+ if (keyName == 'Up' || keyName == 'Down') {
+ up = keyName == 'Up' ? true : false;
+ query = vimGlobalState.searchHistoryController.nextMatch(query, up) || '';
+ close(query);
+ } else {
+ if ( keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift')
+ vimGlobalState.searchHistoryController.reset();
+ }
+ var parsedQuery;
+ try {
+ parsedQuery = updateSearchQuery(cm, query,
+ true /** ignoreCase */, true /** smartCase */);
+ } catch (e) {
+ }
+ if (parsedQuery) {
+ cm.scrollIntoView(findNext(cm, !forward, parsedQuery), 30);
+ } else {
+ clearSearchHighlight(cm);
+ cm.scrollTo(originalScrollPos.left, originalScrollPos.top);
+ }
+ }
+ function onPromptKeyDown(e, query, close) {
+ var keyName = CodeMirror.keyName(e);
+ if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[' ||
+ (keyName == 'Backspace' && query == '')) {
+ vimGlobalState.searchHistoryController.pushInput(query);
+ vimGlobalState.searchHistoryController.reset();
+ updateSearchQuery(cm, originalQuery);
+ clearSearchHighlight(cm);
+ cm.scrollTo(originalScrollPos.left, originalScrollPos.top);
+ CodeMirror.e_stop(e);
+ clearInputState(cm);
+ close();
+ cm.focus();
+ } else if (keyName == 'Ctrl-U') {
+ CodeMirror.e_stop(e);
+ close('');
+ }
+ }
+ switch (command.searchArgs.querySrc) {
+ case 'prompt':
+ var macroModeState = vimGlobalState.macroModeState;
+ if (macroModeState.isPlaying) {
+ var query = macroModeState.replaySearchQueries.shift();
+ handleQuery(query, true /** ignoreCase */, false /** smartCase */);
+ } else {
+ showPrompt(cm, {
+ onClose: onPromptClose,
+ prefix: promptPrefix,
+ desc: searchPromptDesc,
+ onKeyUp: onPromptKeyUp,
+ onKeyDown: onPromptKeyDown
+ });
+ }
+ break;
+ case 'wordUnderCursor':
+ var word = expandWordUnderCursor(cm, false /** inclusive */,
+ true /** forward */, false /** bigWord */,
+ true /** noSymbol */);
+ var isKeyword = true;
+ if (!word) {
+ word = expandWordUnderCursor(cm, false /** inclusive */,
+ true /** forward */, false /** bigWord */,
+ false /** noSymbol */);
+ isKeyword = false;
+ }
+ if (!word) {
+ return;
+ }
+ var query = cm.getLine(word.start.line).substring(word.start.ch,
+ word.end.ch);
+ if (isKeyword && wholeWordOnly) {
+ query = '\\b' + query + '\\b';
+ } else {
+ query = escapeRegex(query);
+ }
+ vimGlobalState.jumpList.cachedCursor = cm.getCursor();
+ cm.setCursor(word.start);
+
+ handleQuery(query, true /** ignoreCase */, false /** smartCase */);
+ break;
+ }
+ },
+ processEx: function(cm, vim, command) {
+ function onPromptClose(input) {
+ vimGlobalState.exCommandHistoryController.pushInput(input);
+ vimGlobalState.exCommandHistoryController.reset();
+ exCommandDispatcher.processCommand(cm, input);
+ }
+ function onPromptKeyDown(e, input, close) {
+ var keyName = CodeMirror.keyName(e), up;
+ if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[' ||
+ (keyName == 'Backspace' && input == '')) {
+ vimGlobalState.exCommandHistoryController.pushInput(input);
+ vimGlobalState.exCommandHistoryController.reset();
+ CodeMirror.e_stop(e);
+ clearInputState(cm);
+ close();
+ cm.focus();
+ }
+ if (keyName == 'Up' || keyName == 'Down') {
+ up = keyName == 'Up' ? true : false;
+ input = vimGlobalState.exCommandHistoryController.nextMatch(input, up) || '';
+ close(input);
+ } else if (keyName == 'Ctrl-U') {
+ CodeMirror.e_stop(e);
+ close('');
+ } else {
+ if ( keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift')
+ vimGlobalState.exCommandHistoryController.reset();
+ }
+ }
+ if (command.type == 'keyToEx') {
+ exCommandDispatcher.processCommand(cm, command.exArgs.input);
+ } else {
+ if (vim.visualMode) {
+ showPrompt(cm, { onClose: onPromptClose, prefix: ':', value: '\'<,\'>',
+ onKeyDown: onPromptKeyDown});
+ } else {
+ showPrompt(cm, { onClose: onPromptClose, prefix: ':',
+ onKeyDown: onPromptKeyDown});
+ }
+ }
+ },
+ evalInput: function(cm, vim) {
+ var inputState = vim.inputState;
+ var motion = inputState.motion;
+ var motionArgs = inputState.motionArgs || {};
+ var operator = inputState.operator;
+ var operatorArgs = inputState.operatorArgs || {};
+ var registerName = inputState.registerName;
+ var sel = vim.sel;
+ var origHead = copyCursor(vim.visualMode ? clipCursorToContent(cm, sel.head): cm.getCursor('head'));
+ var origAnchor = copyCursor(vim.visualMode ? clipCursorToContent(cm, sel.anchor) : cm.getCursor('anchor'));
+ var oldHead = copyCursor(origHead);
+ var oldAnchor = copyCursor(origAnchor);
+ var newHead, newAnchor;
+ var repeat;
+ if (operator) {
+ this.recordLastEdit(vim, inputState);
+ }
+ if (inputState.repeatOverride !== undefined) {
+ repeat = inputState.repeatOverride;
+ } else {
+ repeat = inputState.getRepeat();
+ }
+ if (repeat > 0 && motionArgs.explicitRepeat) {
+ motionArgs.repeatIsExplicit = true;
+ } else if (motionArgs.noRepeat ||
+ (!motionArgs.explicitRepeat && repeat === 0)) {
+ repeat = 1;
+ motionArgs.repeatIsExplicit = false;
+ }
+ if (inputState.selectedCharacter) {
+ motionArgs.selectedCharacter = operatorArgs.selectedCharacter =
+ inputState.selectedCharacter;
+ }
+ motionArgs.repeat = repeat;
+ clearInputState(cm);
+ if (motion) {
+ var motionResult = motions[motion](cm, origHead, motionArgs, vim);
+ vim.lastMotion = motions[motion];
+ if (!motionResult) {
+ return;
+ }
+ if (motionArgs.toJumplist) {
+ if (!operator && cm.ace.curOp != null)
+ cm.ace.curOp.command.scrollIntoView = "center-animate"; // ace_patch
+ var jumpList = vimGlobalState.jumpList;
+ var cachedCursor = jumpList.cachedCursor;
+ if (cachedCursor) {
+ recordJumpPosition(cm, cachedCursor, motionResult);
+ delete jumpList.cachedCursor;
+ } else {
+ recordJumpPosition(cm, origHead, motionResult);
+ }
+ }
+ if (motionResult instanceof Array) {
+ newAnchor = motionResult[0];
+ newHead = motionResult[1];
+ } else {
+ newHead = motionResult;
+ }
+ if (!newHead) {
+ newHead = copyCursor(origHead);
+ }
+ if (vim.visualMode) {
+ if (!(vim.visualBlock && newHead.ch === Infinity)) {
+ newHead = clipCursorToContent(cm, newHead, vim.visualBlock);
+ }
+ if (newAnchor) {
+ newAnchor = clipCursorToContent(cm, newAnchor, true);
+ }
+ newAnchor = newAnchor || oldAnchor;
+ sel.anchor = newAnchor;
+ sel.head = newHead;
+ updateCmSelection(cm);
+ updateMark(cm, vim, '<',
+ cursorIsBefore(newAnchor, newHead) ? newAnchor
+ : newHead);
+ updateMark(cm, vim, '>',
+ cursorIsBefore(newAnchor, newHead) ? newHead
+ : newAnchor);
+ } else if (!operator) {
+ newHead = clipCursorToContent(cm, newHead);
+ cm.setCursor(newHead.line, newHead.ch);
+ }
+ }
+ if (operator) {
+ if (operatorArgs.lastSel) {
+ newAnchor = oldAnchor;
+ var lastSel = operatorArgs.lastSel;
+ var lineOffset = Math.abs(lastSel.head.line - lastSel.anchor.line);
+ var chOffset = Math.abs(lastSel.head.ch - lastSel.anchor.ch);
+ if (lastSel.visualLine) {
+ newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch);
+ } else if (lastSel.visualBlock) {
+ newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch + chOffset);
+ } else if (lastSel.head.line == lastSel.anchor.line) {
+ newHead = Pos(oldAnchor.line, oldAnchor.ch + chOffset);
+ } else {
+ newHead = Pos(oldAnchor.line + lineOffset, oldAnchor.ch);
+ }
+ vim.visualMode = true;
+ vim.visualLine = lastSel.visualLine;
+ vim.visualBlock = lastSel.visualBlock;
+ sel = vim.sel = {
+ anchor: newAnchor,
+ head: newHead
+ };
+ updateCmSelection(cm);
+ } else if (vim.visualMode) {
+ operatorArgs.lastSel = {
+ anchor: copyCursor(sel.anchor),
+ head: copyCursor(sel.head),
+ visualBlock: vim.visualBlock,
+ visualLine: vim.visualLine
+ };
+ }
+ var curStart, curEnd, linewise, mode;
+ var cmSel;
+ if (vim.visualMode) {
+ curStart = cursorMin(sel.head, sel.anchor);
+ curEnd = cursorMax(sel.head, sel.anchor);
+ linewise = vim.visualLine || operatorArgs.linewise;
+ mode = vim.visualBlock ? 'block' :
+ linewise ? 'line' :
+ 'char';
+ cmSel = makeCmSelection(cm, {
+ anchor: curStart,
+ head: curEnd
+ }, mode);
+ if (linewise) {
+ var ranges = cmSel.ranges;
+ if (mode == 'block') {
+ for (var i = 0; i < ranges.length; i++) {
+ ranges[i].head.ch = lineLength(cm, ranges[i].head.line);
+ }
+ } else if (mode == 'line') {
+ ranges[0].head = Pos(ranges[0].head.line + 1, 0);
+ }
+ }
+ } else {
+ curStart = copyCursor(newAnchor || oldAnchor);
+ curEnd = copyCursor(newHead || oldHead);
+ if (cursorIsBefore(curEnd, curStart)) {
+ var tmp = curStart;
+ curStart = curEnd;
+ curEnd = tmp;
+ }
+ linewise = motionArgs.linewise || operatorArgs.linewise;
+ if (linewise) {
+ expandSelectionToLine(cm, curStart, curEnd);
+ } else if (motionArgs.forward) {
+ clipToLine(cm, curStart, curEnd);
+ }
+ mode = 'char';
+ var exclusive = !motionArgs.inclusive || linewise;
+ cmSel = makeCmSelection(cm, {
+ anchor: curStart,
+ head: curEnd
+ }, mode, exclusive);
+ }
+ cm.setSelections(cmSel.ranges, cmSel.primary);
+ vim.lastMotion = null;
+ operatorArgs.repeat = repeat; // For indent in visual mode.
+ operatorArgs.registerName = registerName;
+ operatorArgs.linewise = linewise;
+ var operatorMoveTo = operators[operator](
+ cm, operatorArgs, cmSel.ranges, oldAnchor, newHead);
+ if (vim.visualMode) {
+ exitVisualMode(cm, operatorMoveTo != null);
+ }
+ if (operatorMoveTo) {
+ cm.setCursor(operatorMoveTo);
+ }
+ }
+ },
+ recordLastEdit: function(vim, inputState, actionCommand) {
+ var macroModeState = vimGlobalState.macroModeState;
+ if (macroModeState.isPlaying) { return; }
+ vim.lastEditInputState = inputState;
+ vim.lastEditActionCommand = actionCommand;
+ macroModeState.lastInsertModeChanges.changes = [];
+ macroModeState.lastInsertModeChanges.expectCursorActivityForChange = false;
+ }
+ };
+ var motions = {
+ moveToTopLine: function(cm, _head, motionArgs) {
+ var line = getUserVisibleLines(cm).top + motionArgs.repeat -1;
+ return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line)));
+ },
+ moveToMiddleLine: function(cm) {
+ var range = getUserVisibleLines(cm);
+ var line = Math.floor((range.top + range.bottom) * 0.5);
+ return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line)));
+ },
+ moveToBottomLine: function(cm, _head, motionArgs) {
+ var line = getUserVisibleLines(cm).bottom - motionArgs.repeat +1;
+ return Pos(line, findFirstNonWhiteSpaceCharacter(cm.getLine(line)));
+ },
+ expandToLine: function(_cm, head, motionArgs) {
+ var cur = head;
+ return Pos(cur.line + motionArgs.repeat - 1, Infinity);
+ },
+ findNext: function(cm, _head, motionArgs) {
+ var state = getSearchState(cm);
+ var query = state.getQuery();
+ if (!query) {
+ return;
+ }
+ var prev = !motionArgs.forward;
+ prev = (state.isReversed()) ? !prev : prev;
+ highlightSearchMatches(cm, query);
+ return findNext(cm, prev/** prev */, query, motionArgs.repeat);
+ },
+ goToMark: function(cm, _head, motionArgs, vim) {
+ var mark = vim.marks[motionArgs.selectedCharacter];
+ if (mark) {
+ var pos = mark.find();
+ return motionArgs.linewise ? { line: pos.line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(pos.line)) } : pos;
+ }
+ return null;
+ },
+ moveToOtherHighlightedEnd: function(cm, _head, motionArgs, vim) {
+ if (vim.visualBlock && motionArgs.sameLine) {
+ var sel = vim.sel;
+ return [
+ clipCursorToContent(cm, Pos(sel.anchor.line, sel.head.ch)),
+ clipCursorToContent(cm, Pos(sel.head.line, sel.anchor.ch))
+ ];
+ } else {
+ return ([vim.sel.head, vim.sel.anchor]);
+ }
+ },
+ jumpToMark: function(cm, head, motionArgs, vim) {
+ var best = head;
+ for (var i = 0; i < motionArgs.repeat; i++) {
+ var cursor = best;
+ for (var key in vim.marks) {
+ if (!isLowerCase(key)) {
+ continue;
+ }
+ var mark = vim.marks[key].find();
+ var isWrongDirection = (motionArgs.forward) ?
+ cursorIsBefore(mark, cursor) : cursorIsBefore(cursor, mark);
+
+ if (isWrongDirection) {
+ continue;
+ }
+ if (motionArgs.linewise && (mark.line == cursor.line)) {
+ continue;
+ }
+
+ var equal = cursorEqual(cursor, best);
+ var between = (motionArgs.forward) ?
+ cursorIsBetween(cursor, mark, best) :
+ cursorIsBetween(best, mark, cursor);
+
+ if (equal || between) {
+ best = mark;
+ }
+ }
+ }
+
+ if (motionArgs.linewise) {
+ best = Pos(best.line, findFirstNonWhiteSpaceCharacter(cm.getLine(best.line)));
+ }
+ return best;
+ },
+ moveByCharacters: function(_cm, head, motionArgs) {
+ var cur = head;
+ var repeat = motionArgs.repeat;
+ var ch = motionArgs.forward ? cur.ch + repeat : cur.ch - repeat;
+ return Pos(cur.line, ch);
+ },
+ moveByLines: function(cm, head, motionArgs, vim) {
+ var cur = head;
+ var endCh = cur.ch;
+ switch (vim.lastMotion) {
+ case this.moveByLines:
+ case this.moveByDisplayLines:
+ case this.moveByScroll:
+ case this.moveToColumn:
+ case this.moveToEol:
+ endCh = vim.lastHPos;
+ break;
+ default:
+ vim.lastHPos = endCh;
+ }
+ var repeat = motionArgs.repeat+(motionArgs.repeatOffset||0);
+ var line = motionArgs.forward ? cur.line + repeat : cur.line - repeat;
+ var first = cm.firstLine();
+ var last = cm.lastLine();
+ if ((line < first && cur.line == first) ||
+ (line > last && cur.line == last)) {
+ return;
+ }
+ var fold = cm.ace.session.getFoldLine(line);
+ if (fold) {
+ if (motionArgs.forward) {
+ if (line > fold.start.row)
+ line = fold.end.row + 1;
+ } else {
+ line = fold.start.row;
+ }
+ }
+ if (motionArgs.toFirstChar){
+ endCh=findFirstNonWhiteSpaceCharacter(cm.getLine(line));
+ vim.lastHPos = endCh;
+ }
+ vim.lastHSPos = cm.charCoords(Pos(line, endCh),'div').left;
+ return Pos(line, endCh);
+ },
+ moveByDisplayLines: function(cm, head, motionArgs, vim) {
+ var cur = head;
+ switch (vim.lastMotion) {
+ case this.moveByDisplayLines:
+ case this.moveByScroll:
+ case this.moveByLines:
+ case this.moveToColumn:
+ case this.moveToEol:
+ break;
+ default:
+ vim.lastHSPos = cm.charCoords(cur,'div').left;
+ }
+ var repeat = motionArgs.repeat;
+ var res=cm.findPosV(cur,(motionArgs.forward ? repeat : -repeat),'line',vim.lastHSPos);
+ if (res.hitSide) {
+ if (motionArgs.forward) {
+ var lastCharCoords = cm.charCoords(res, 'div');
+ var goalCoords = { top: lastCharCoords.top + 8, left: vim.lastHSPos };
+ var res = cm.coordsChar(goalCoords, 'div');
+ } else {
+ var resCoords = cm.charCoords(Pos(cm.firstLine(), 0), 'div');
+ resCoords.left = vim.lastHSPos;
+ res = cm.coordsChar(resCoords, 'div');
+ }
+ }
+ vim.lastHPos = res.ch;
+ return res;
+ },
+ moveByPage: function(cm, head, motionArgs) {
+ var curStart = head;
+ var repeat = motionArgs.repeat;
+ return cm.findPosV(curStart, (motionArgs.forward ? repeat : -repeat), 'page');
+ },
+ moveByParagraph: function(cm, head, motionArgs) {
+ var dir = motionArgs.forward ? 1 : -1;
+ return findParagraph(cm, head, motionArgs.repeat, dir);
+ },
+ moveByScroll: function(cm, head, motionArgs, vim) {
+ var scrollbox = cm.getScrollInfo();
+ var curEnd = null;
+ var repeat = motionArgs.repeat;
+ if (!repeat) {
+ repeat = scrollbox.clientHeight / (2 * cm.defaultTextHeight());
+ }
+ var orig = cm.charCoords(head, 'local');
+ motionArgs.repeat = repeat;
+ var curEnd = motions.moveByDisplayLines(cm, head, motionArgs, vim);
+ if (!curEnd) {
+ return null;
+ }
+ var dest = cm.charCoords(curEnd, 'local');
+ cm.scrollTo(null, scrollbox.top + dest.top - orig.top);
+ return curEnd;
+ },
+ moveByWords: function(cm, head, motionArgs) {
+ return moveToWord(cm, head, motionArgs.repeat, !!motionArgs.forward,
+ !!motionArgs.wordEnd, !!motionArgs.bigWord);
+ },
+ moveTillCharacter: function(cm, _head, motionArgs) {
+ var repeat = motionArgs.repeat;
+ var curEnd = moveToCharacter(cm, repeat, motionArgs.forward,
+ motionArgs.selectedCharacter);
+ var increment = motionArgs.forward ? -1 : 1;
+ recordLastCharacterSearch(increment, motionArgs);
+ if (!curEnd) return null;
+ curEnd.ch += increment;
+ return curEnd;
+ },
+ moveToCharacter: function(cm, head, motionArgs) {
+ var repeat = motionArgs.repeat;
+ recordLastCharacterSearch(0, motionArgs);
+ return moveToCharacter(cm, repeat, motionArgs.forward,
+ motionArgs.selectedCharacter) || head;
+ },
+ moveToSymbol: function(cm, head, motionArgs) {
+ var repeat = motionArgs.repeat;
+ return findSymbol(cm, repeat, motionArgs.forward,
+ motionArgs.selectedCharacter) || head;
+ },
+ moveToColumn: function(cm, head, motionArgs, vim) {
+ var repeat = motionArgs.repeat;
+ vim.lastHPos = repeat - 1;
+ vim.lastHSPos = cm.charCoords(head,'div').left;
+ return moveToColumn(cm, repeat);
+ },
+ moveToEol: function(cm, head, motionArgs, vim) {
+ var cur = head;
+ vim.lastHPos = Infinity;
+ var retval= Pos(cur.line + motionArgs.repeat - 1, Infinity);
+ var end=cm.clipPos(retval);
+ end.ch--;
+ vim.lastHSPos = cm.charCoords(end,'div').left;
+ return retval;
+ },
+ moveToFirstNonWhiteSpaceCharacter: function(cm, head) {
+ var cursor = head;
+ return Pos(cursor.line,
+ findFirstNonWhiteSpaceCharacter(cm.getLine(cursor.line)));
+ },
+ moveToMatchedSymbol: function(cm, head) {
+ var cursor = head;
+ var line = cursor.line;
+ var ch = cursor.ch;
+ var lineText = cm.getLine(line);
+ var symbol;
+ do {
+ symbol = lineText.charAt(ch++);
+ if (symbol && isMatchableSymbol(symbol)) {
+ var style = cm.getTokenTypeAt(Pos(line, ch));
+ if (style !== "string" && style !== "comment") {
+ break;
+ }
+ }
+ } while (symbol);
+ if (symbol) {
+ var matched = cm.findMatchingBracket(Pos(line, ch));
+ return matched.to;
+ } else {
+ return cursor;
+ }
+ },
+ moveToStartOfLine: function(_cm, head) {
+ return Pos(head.line, 0);
+ },
+ moveToLineOrEdgeOfDocument: function(cm, _head, motionArgs) {
+ var lineNum = motionArgs.forward ? cm.lastLine() : cm.firstLine();
+ if (motionArgs.repeatIsExplicit) {
+ lineNum = motionArgs.repeat - cm.getOption('firstLineNumber');
+ }
+ return Pos(lineNum,
+ findFirstNonWhiteSpaceCharacter(cm.getLine(lineNum)));
+ },
+ textObjectManipulation: function(cm, head, motionArgs, vim) {
+ var mirroredPairs = {'(': ')', ')': '(',
+ '{': '}', '}': '{',
+ '[': ']', ']': '['};
+ var selfPaired = {'\'': true, '"': true};
+
+ var character = motionArgs.selectedCharacter;
+ if (character == 'b') {
+ character = '(';
+ } else if (character == 'B') {
+ character = '{';
+ }
+ var inclusive = !motionArgs.textObjectInner;
+
+ var tmp;
+ if (mirroredPairs[character]) {
+ tmp = selectCompanionObject(cm, head, character, inclusive);
+ } else if (selfPaired[character]) {
+ tmp = findBeginningAndEnd(cm, head, character, inclusive);
+ } else if (character === 'W') {
+ tmp = expandWordUnderCursor(cm, inclusive, true /** forward */,
+ true /** bigWord */);
+ } else if (character === 'w') {
+ tmp = expandWordUnderCursor(cm, inclusive, true /** forward */,
+ false /** bigWord */);
+ } else if (character === 'p') {
+ tmp = findParagraph(cm, head, motionArgs.repeat, 0, inclusive);
+ motionArgs.linewise = true;
+ if (vim.visualMode) {
+ if (!vim.visualLine) { vim.visualLine = true; }
+ } else {
+ var operatorArgs = vim.inputState.operatorArgs;
+ if (operatorArgs) { operatorArgs.linewise = true; }
+ tmp.end.line--;
+ }
+ } else {
+ return null;
+ }
+
+ if (!cm.state.vim.visualMode) {
+ return [tmp.start, tmp.end];
+ } else {
+ return expandSelection(cm, tmp.start, tmp.end);
+ }
+ },
+
+ repeatLastCharacterSearch: function(cm, head, motionArgs) {
+ var lastSearch = vimGlobalState.lastChararacterSearch;
+ var repeat = motionArgs.repeat;
+ var forward = motionArgs.forward === lastSearch.forward;
+ var increment = (lastSearch.increment ? 1 : 0) * (forward ? -1 : 1);
+ cm.moveH(-increment, 'char');
+ motionArgs.inclusive = forward ? true : false;
+ var curEnd = moveToCharacter(cm, repeat, forward, lastSearch.selectedCharacter);
+ if (!curEnd) {
+ cm.moveH(increment, 'char');
+ return head;
+ }
+ curEnd.ch += increment;
+ return curEnd;
+ }
+ };
+
+ function defineMotion(name, fn) {
+ motions[name] = fn;
+ }
+
+ function fillArray(val, times) {
+ var arr = [];
+ for (var i = 0; i < times; i++) {
+ arr.push(val);
+ }
+ return arr;
+ }
+ var operators = {
+ change: function(cm, args, ranges) {
+ var finalHead, text;
+ var vim = cm.state.vim;
+ vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock = vim.visualBlock;
+ if (!vim.visualMode) {
+ var anchor = ranges[0].anchor,
+ head = ranges[0].head;
+ text = cm.getRange(anchor, head);
+ var lastState = vim.lastEditInputState || {};
+ if (lastState.motion == "moveByWords" && !isWhiteSpaceString(text)) {
+ var match = (/\s+$/).exec(text);
+ if (match && lastState.motionArgs && lastState.motionArgs.forward) {
+ head = offsetCursor(head, 0, - match[0].length);
+ text = text.slice(0, - match[0].length);
+ }
+ }
+ var prevLineEnd = new Pos(anchor.line - 1, Number.MAX_VALUE);
+ var wasLastLine = cm.firstLine() == cm.lastLine();
+ if (head.line > cm.lastLine() && args.linewise && !wasLastLine) {
+ cm.replaceRange('', prevLineEnd, head);
+ } else {
+ cm.replaceRange('', anchor, head);
+ }
+ if (args.linewise) {
+ if (!wasLastLine) {
+ cm.setCursor(prevLineEnd);
+ CodeMirror.commands.newlineAndIndent(cm);
+ }
+ anchor.ch = Number.MAX_VALUE;
+ }
+ finalHead = anchor;
+ } else {
+ text = cm.getSelection();
+ var replacement = fillArray('', ranges.length);
+ cm.replaceSelections(replacement);
+ finalHead = cursorMin(ranges[0].head, ranges[0].anchor);
+ }
+ vimGlobalState.registerController.pushText(
+ args.registerName, 'change', text,
+ args.linewise, ranges.length > 1);
+ actions.enterInsertMode(cm, {head: finalHead}, cm.state.vim);
+ },
+ 'delete': function(cm, args, ranges) {
+ var finalHead, text;
+ var vim = cm.state.vim;
+ if (!vim.visualBlock) {
+ var anchor = ranges[0].anchor,
+ head = ranges[0].head;
+ if (args.linewise &&
+ head.line != cm.firstLine() &&
+ anchor.line == cm.lastLine() &&
+ anchor.line == head.line - 1) {
+ if (anchor.line == cm.firstLine()) {
+ anchor.ch = 0;
+ } else {
+ anchor = Pos(anchor.line - 1, lineLength(cm, anchor.line - 1));
+ }
+ }
+ text = cm.getRange(anchor, head);
+ cm.replaceRange('', anchor, head);
+ finalHead = anchor;
+ if (args.linewise) {
+ finalHead = motions.moveToFirstNonWhiteSpaceCharacter(cm, anchor);
+ }
+ } else {
+ text = cm.getSelection();
+ var replacement = fillArray('', ranges.length);
+ cm.replaceSelections(replacement);
+ finalHead = ranges[0].anchor;
+ }
+ vimGlobalState.registerController.pushText(
+ args.registerName, 'delete', text,
+ args.linewise, vim.visualBlock);
+ return clipCursorToContent(cm, finalHead);
+ },
+ indent: function(cm, args, ranges) {
+ var vim = cm.state.vim;
+ var startLine = ranges[0].anchor.line;
+ var endLine = vim.visualBlock ?
+ ranges[ranges.length - 1].anchor.line :
+ ranges[0].head.line;
+ var repeat = (vim.visualMode) ? args.repeat : 1;
+ if (args.linewise) {
+ endLine--;
+ }
+ for (var i = startLine; i <= endLine; i++) {
+ for (var j = 0; j < repeat; j++) {
+ cm.indentLine(i, args.indentRight);
+ }
+ }
+ return motions.moveToFirstNonWhiteSpaceCharacter(cm, ranges[0].anchor);
+ },
+ changeCase: function(cm, args, ranges, oldAnchor, newHead) {
+ var selections = cm.getSelections();
+ var swapped = [];
+ var toLower = args.toLower;
+ for (var j = 0; j < selections.length; j++) {
+ var toSwap = selections[j];
+ var text = '';
+ if (toLower === true) {
+ text = toSwap.toLowerCase();
+ } else if (toLower === false) {
+ text = toSwap.toUpperCase();
+ } else {
+ for (var i = 0; i < toSwap.length; i++) {
+ var character = toSwap.charAt(i);
+ text += isUpperCase(character) ? character.toLowerCase() :
+ character.toUpperCase();
+ }
+ }
+ swapped.push(text);
+ }
+ cm.replaceSelections(swapped);
+ if (args.shouldMoveCursor){
+ return newHead;
+ } else if (!cm.state.vim.visualMode && args.linewise && ranges[0].anchor.line + 1 == ranges[0].head.line) {
+ return motions.moveToFirstNonWhiteSpaceCharacter(cm, oldAnchor);
+ } else if (args.linewise){
+ return oldAnchor;
+ } else {
+ return cursorMin(ranges[0].anchor, ranges[0].head);
+ }
+ },
+ yank: function(cm, args, ranges, oldAnchor) {
+ var vim = cm.state.vim;
+ var text = cm.getSelection();
+ var endPos = vim.visualMode
+ ? cursorMin(vim.sel.anchor, vim.sel.head, ranges[0].head, ranges[0].anchor)
+ : oldAnchor;
+ vimGlobalState.registerController.pushText(
+ args.registerName, 'yank',
+ text, args.linewise, vim.visualBlock);
+ return endPos;
+ }
+ };
+
+ function defineOperator(name, fn) {
+ operators[name] = fn;
+ }
+
+ var actions = {
+ jumpListWalk: function(cm, actionArgs, vim) {
+ if (vim.visualMode) {
+ return;
+ }
+ var repeat = actionArgs.repeat;
+ var forward = actionArgs.forward;
+ var jumpList = vimGlobalState.jumpList;
+
+ var mark = jumpList.move(cm, forward ? repeat : -repeat);
+ var markPos = mark ? mark.find() : undefined;
+ markPos = markPos ? markPos : cm.getCursor();
+ cm.setCursor(markPos);
+ cm.ace.curOp.command.scrollIntoView = "center-animate"; // ace_patch
+ },
+ scroll: function(cm, actionArgs, vim) {
+ if (vim.visualMode) {
+ return;
+ }
+ var repeat = actionArgs.repeat || 1;
+ var lineHeight = cm.defaultTextHeight();
+ var top = cm.getScrollInfo().top;
+ var delta = lineHeight * repeat;
+ var newPos = actionArgs.forward ? top + delta : top - delta;
+ var cursor = copyCursor(cm.getCursor());
+ var cursorCoords = cm.charCoords(cursor, 'local');
+ if (actionArgs.forward) {
+ if (newPos > cursorCoords.top) {
+ cursor.line += (newPos - cursorCoords.top) / lineHeight;
+ cursor.line = Math.ceil(cursor.line);
+ cm.setCursor(cursor);
+ cursorCoords = cm.charCoords(cursor, 'local');
+ cm.scrollTo(null, cursorCoords.top);
+ } else {
+ cm.scrollTo(null, newPos);
+ }
+ } else {
+ var newBottom = newPos + cm.getScrollInfo().clientHeight;
+ if (newBottom < cursorCoords.bottom) {
+ cursor.line -= (cursorCoords.bottom - newBottom) / lineHeight;
+ cursor.line = Math.floor(cursor.line);
+ cm.setCursor(cursor);
+ cursorCoords = cm.charCoords(cursor, 'local');
+ cm.scrollTo(
+ null, cursorCoords.bottom - cm.getScrollInfo().clientHeight);
+ } else {
+ cm.scrollTo(null, newPos);
+ }
+ }
+ },
+ scrollToCursor: function(cm, actionArgs) {
+ var lineNum = cm.getCursor().line;
+ var charCoords = cm.charCoords(Pos(lineNum, 0), 'local');
+ var height = cm.getScrollInfo().clientHeight;
+ var y = charCoords.top;
+ var lineHeight = charCoords.bottom - y;
+ switch (actionArgs.position) {
+ case 'center': y = y - (height / 2) + lineHeight;
+ break;
+ case 'bottom': y = y - height + lineHeight*1.4;
+ break;
+ case 'top': y = y + lineHeight*0.4;
+ break;
+ }
+ cm.scrollTo(null, y);
+ },
+ replayMacro: function(cm, actionArgs, vim) {
+ var registerName = actionArgs.selectedCharacter;
+ var repeat = actionArgs.repeat;
+ var macroModeState = vimGlobalState.macroModeState;
+ if (registerName == '@') {
+ registerName = macroModeState.latestRegister;
+ }
+ while(repeat--){
+ executeMacroRegister(cm, vim, macroModeState, registerName);
+ }
+ },
+ enterMacroRecordMode: function(cm, actionArgs) {
+ var macroModeState = vimGlobalState.macroModeState;
+ var registerName = actionArgs.selectedCharacter;
+ macroModeState.enterMacroRecordMode(cm, registerName);
+ },
+ enterInsertMode: function(cm, actionArgs, vim) {
+ if (cm.getOption('readOnly')) { return; }
+ vim.insertMode = true;
+ vim.insertModeRepeat = actionArgs && actionArgs.repeat || 1;
+ var insertAt = (actionArgs) ? actionArgs.insertAt : null;
+ var sel = vim.sel;
+ var head = actionArgs.head || cm.getCursor('head');
+ var height = cm.listSelections().length;
+ if (insertAt == 'eol') {
+ head = Pos(head.line, lineLength(cm, head.line));
+ } else if (insertAt == 'charAfter') {
+ head = offsetCursor(head, 0, 1);
+ } else if (insertAt == 'firstNonBlank') {
+ head = motions.moveToFirstNonWhiteSpaceCharacter(cm, head);
+ } else if (insertAt == 'startOfSelectedArea') {
+ if (!vim.visualBlock) {
+ if (sel.head.line < sel.anchor.line) {
+ head = sel.head;
+ } else {
+ head = Pos(sel.anchor.line, 0);
+ }
+ } else {
+ head = Pos(
+ Math.min(sel.head.line, sel.anchor.line),
+ Math.min(sel.head.ch, sel.anchor.ch));
+ height = Math.abs(sel.head.line - sel.anchor.line) + 1;
+ }
+ } else if (insertAt == 'endOfSelectedArea') {
+ if (!vim.visualBlock) {
+ if (sel.head.line >= sel.anchor.line) {
+ head = offsetCursor(sel.head, 0, 1);
+ } else {
+ head = Pos(sel.anchor.line, 0);
+ }
+ } else {
+ head = Pos(
+ Math.min(sel.head.line, sel.anchor.line),
+ Math.max(sel.head.ch + 1, sel.anchor.ch));
+ height = Math.abs(sel.head.line - sel.anchor.line) + 1;
+ }
+ } else if (insertAt == 'inplace') {
+ if (vim.visualMode){
+ return;
+ }
+ }
+ cm.setOption('keyMap', 'vim-insert');
+ cm.setOption('disableInput', false);
+ if (actionArgs && actionArgs.replace) {
+ cm.toggleOverwrite(true);
+ cm.setOption('keyMap', 'vim-replace');
+ CodeMirror.signal(cm, "vim-mode-change", {mode: "replace"});
+ } else {
+ cm.setOption('keyMap', 'vim-insert');
+ CodeMirror.signal(cm, "vim-mode-change", {mode: "insert"});
+ }
+ if (!vimGlobalState.macroModeState.isPlaying) {
+ cm.on('change', onChange);
+ CodeMirror.on(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown);
+ }
+ if (vim.visualMode) {
+ exitVisualMode(cm);
+ }
+ selectForInsert(cm, head, height);
+ },
+ toggleVisualMode: function(cm, actionArgs, vim) {
+ var repeat = actionArgs.repeat;
+ var anchor = cm.getCursor();
+ var head;
+ if (!vim.visualMode) {
+ vim.visualMode = true;
+ vim.visualLine = !!actionArgs.linewise;
+ vim.visualBlock = !!actionArgs.blockwise;
+ head = clipCursorToContent(
+ cm, Pos(anchor.line, anchor.ch + repeat - 1),
+ true /** includeLineBreak */);
+ vim.sel = {
+ anchor: anchor,
+ head: head
+ };
+ CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: vim.visualLine ? "linewise" : vim.visualBlock ? "blockwise" : ""});
+ updateCmSelection(cm);
+ updateMark(cm, vim, '<', cursorMin(anchor, head));
+ updateMark(cm, vim, '>', cursorMax(anchor, head));
+ } else if (vim.visualLine ^ actionArgs.linewise ||
+ vim.visualBlock ^ actionArgs.blockwise) {
+ vim.visualLine = !!actionArgs.linewise;
+ vim.visualBlock = !!actionArgs.blockwise;
+ CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: vim.visualLine ? "linewise" : vim.visualBlock ? "blockwise" : ""});
+ updateCmSelection(cm);
+ } else {
+ exitVisualMode(cm);
+ }
+ },
+ reselectLastSelection: function(cm, _actionArgs, vim) {
+ var lastSelection = vim.lastSelection;
+ if (vim.visualMode) {
+ updateLastSelection(cm, vim);
+ }
+ if (lastSelection) {
+ var anchor = lastSelection.anchorMark.find();
+ var head = lastSelection.headMark.find();
+ if (!anchor || !head) {
+ return;
+ }
+ vim.sel = {
+ anchor: anchor,
+ head: head
+ };
+ vim.visualMode = true;
+ vim.visualLine = lastSelection.visualLine;
+ vim.visualBlock = lastSelection.visualBlock;
+ updateCmSelection(cm);
+ updateMark(cm, vim, '<', cursorMin(anchor, head));
+ updateMark(cm, vim, '>', cursorMax(anchor, head));
+ CodeMirror.signal(cm, 'vim-mode-change', {
+ mode: 'visual',
+ subMode: vim.visualLine ? 'linewise' :
+ vim.visualBlock ? 'blockwise' : ''});
+ }
+ },
+ joinLines: function(cm, actionArgs, vim) {
+ var curStart, curEnd;
+ if (vim.visualMode) {
+ curStart = cm.getCursor('anchor');
+ curEnd = cm.getCursor('head');
+ if (cursorIsBefore(curEnd, curStart)) {
+ var tmp = curEnd;
+ curEnd = curStart;
+ curStart = tmp;
+ }
+ curEnd.ch = lineLength(cm, curEnd.line) - 1;
+ } else {
+ var repeat = Math.max(actionArgs.repeat, 2);
+ curStart = cm.getCursor();
+ curEnd = clipCursorToContent(cm, Pos(curStart.line + repeat - 1,
+ Infinity));
+ }
+ var finalCh = 0;
+ for (var i = curStart.line; i < curEnd.line; i++) {
+ finalCh = lineLength(cm, curStart.line);
+ var tmp = Pos(curStart.line + 1,
+ lineLength(cm, curStart.line + 1));
+ var text = cm.getRange(curStart, tmp);
+ text = text.replace(/\n\s*/g, ' ');
+ cm.replaceRange(text, curStart, tmp);
+ }
+ var curFinalPos = Pos(curStart.line, finalCh);
+ if (vim.visualMode) {
+ exitVisualMode(cm, false);
+ }
+ cm.setCursor(curFinalPos);
+ },
+ newLineAndEnterInsertMode: function(cm, actionArgs, vim) {
+ vim.insertMode = true;
+ var insertAt = copyCursor(cm.getCursor());
+ if (insertAt.line === cm.firstLine() && !actionArgs.after) {
+ cm.replaceRange('\n', Pos(cm.firstLine(), 0));
+ cm.setCursor(cm.firstLine(), 0);
+ } else {
+ insertAt.line = (actionArgs.after) ? insertAt.line :
+ insertAt.line - 1;
+ insertAt.ch = lineLength(cm, insertAt.line);
+ cm.setCursor(insertAt);
+ var newlineFn = CodeMirror.commands.newlineAndIndentContinueComment ||
+ CodeMirror.commands.newlineAndIndent;
+ newlineFn(cm);
+ }
+ this.enterInsertMode(cm, { repeat: actionArgs.repeat }, vim);
+ },
+ paste: function(cm, actionArgs, vim) {
+ var cur = copyCursor(cm.getCursor());
+ var register = vimGlobalState.registerController.getRegister(
+ actionArgs.registerName);
+ var text = register.toString();
+ if (!text) {
+ return;
+ }
+ if (actionArgs.matchIndent) {
+ var tabSize = cm.getOption("tabSize");
+ var whitespaceLength = function(str) {
+ var tabs = (str.split("\t").length - 1);
+ var spaces = (str.split(" ").length - 1);
+ return tabs * tabSize + spaces * 1;
+ };
+ var currentLine = cm.getLine(cm.getCursor().line);
+ var indent = whitespaceLength(currentLine.match(/^\s*/)[0]);
+ var chompedText = text.replace(/\n$/, '');
+ var wasChomped = text !== chompedText;
+ var firstIndent = whitespaceLength(text.match(/^\s*/)[0]);
+ var text = chompedText.replace(/^\s*/gm, function(wspace) {
+ var newIndent = indent + (whitespaceLength(wspace) - firstIndent);
+ if (newIndent < 0) {
+ return "";
+ }
+ else if (cm.getOption("indentWithTabs")) {
+ var quotient = Math.floor(newIndent / tabSize);
+ return Array(quotient + 1).join('\t');
+ }
+ else {
+ return Array(newIndent + 1).join(' ');
+ }
+ });
+ text += wasChomped ? "\n" : "";
+ }
+ if (actionArgs.repeat > 1) {
+ var text = Array(actionArgs.repeat + 1).join(text);
+ }
+ var linewise = register.linewise;
+ var blockwise = register.blockwise;
+ if (linewise && !blockwise) {
+ if(vim.visualMode) {
+ text = vim.visualLine ? text.slice(0, -1) : '\n' + text.slice(0, text.length - 1) + '\n';
+ } else if (actionArgs.after) {
+ text = '\n' + text.slice(0, text.length - 1);
+ cur.ch = lineLength(cm, cur.line);
+ } else {
+ cur.ch = 0;
+ }
+ } else {
+ if (blockwise) {
+ text = text.split('\n');
+ for (var i = 0; i < text.length; i++) {
+ text[i] = (text[i] == '') ? ' ' : text[i];
+ }
+ }
+ cur.ch += actionArgs.after ? 1 : 0;
+ }
+ var curPosFinal;
+ var idx;
+ if (vim.visualMode) {
+ vim.lastPastedText = text;
+ var lastSelectionCurEnd;
+ var selectedArea = getSelectedAreaRange(cm, vim);
+ var selectionStart = selectedArea[0];
+ var selectionEnd = selectedArea[1];
+ var selectedText = cm.getSelection();
+ var selections = cm.listSelections();
+ var emptyStrings = new Array(selections.length).join('1').split('1');
+ if (vim.lastSelection) {
+ lastSelectionCurEnd = vim.lastSelection.headMark.find();
+ }
+ vimGlobalState.registerController.unnamedRegister.setText(selectedText);
+ if (blockwise) {
+ cm.replaceSelections(emptyStrings);
+ selectionEnd = Pos(selectionStart.line + text.length-1, selectionStart.ch);
+ cm.setCursor(selectionStart);
+ selectBlock(cm, selectionEnd);
+ cm.replaceSelections(text);
+ curPosFinal = selectionStart;
+ } else if (vim.visualBlock) {
+ cm.replaceSelections(emptyStrings);
+ cm.setCursor(selectionStart);
+ cm.replaceRange(text, selectionStart, selectionStart);
+ curPosFinal = selectionStart;
+ } else {
+ cm.replaceRange(text, selectionStart, selectionEnd);
+ curPosFinal = cm.posFromIndex(cm.indexFromPos(selectionStart) + text.length - 1);
+ }
+ if(lastSelectionCurEnd) {
+ vim.lastSelection.headMark = cm.setBookmark(lastSelectionCurEnd);
+ }
+ if (linewise) {
+ curPosFinal.ch=0;
+ }
+ } else {
+ if (blockwise) {
+ cm.setCursor(cur);
+ for (var i = 0; i < text.length; i++) {
+ var line = cur.line+i;
+ if (line > cm.lastLine()) {
+ cm.replaceRange('\n', Pos(line, 0));
+ }
+ var lastCh = lineLength(cm, line);
+ if (lastCh < cur.ch) {
+ extendLineToColumn(cm, line, cur.ch);
+ }
+ }
+ cm.setCursor(cur);
+ selectBlock(cm, Pos(cur.line + text.length-1, cur.ch));
+ cm.replaceSelections(text);
+ curPosFinal = cur;
+ } else {
+ cm.replaceRange(text, cur);
+ if (linewise && actionArgs.after) {
+ curPosFinal = Pos(
+ cur.line + 1,
+ findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line + 1)));
+ } else if (linewise && !actionArgs.after) {
+ curPosFinal = Pos(
+ cur.line,
+ findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line)));
+ } else if (!linewise && actionArgs.after) {
+ idx = cm.indexFromPos(cur);
+ curPosFinal = cm.posFromIndex(idx + text.length - 1);
+ } else {
+ idx = cm.indexFromPos(cur);
+ curPosFinal = cm.posFromIndex(idx + text.length);
+ }
+ }
+ }
+ if (vim.visualMode) {
+ exitVisualMode(cm, false);
+ }
+ cm.setCursor(curPosFinal);
+ },
+ undo: function(cm, actionArgs) {
+ cm.operation(function() {
+ repeatFn(cm, CodeMirror.commands.undo, actionArgs.repeat)();
+ cm.setCursor(cm.getCursor('anchor'));
+ });
+ },
+ redo: function(cm, actionArgs) {
+ repeatFn(cm, CodeMirror.commands.redo, actionArgs.repeat)();
+ },
+ setRegister: function(_cm, actionArgs, vim) {
+ vim.inputState.registerName = actionArgs.selectedCharacter;
+ },
+ setMark: function(cm, actionArgs, vim) {
+ var markName = actionArgs.selectedCharacter;
+ updateMark(cm, vim, markName, cm.getCursor());
+ },
+ replace: function(cm, actionArgs, vim) {
+ var replaceWith = actionArgs.selectedCharacter;
+ var curStart = cm.getCursor();
+ var replaceTo;
+ var curEnd;
+ var selections = cm.listSelections();
+ if (vim.visualMode) {
+ curStart = cm.getCursor('start');
+ curEnd = cm.getCursor('end');
+ } else {
+ var line = cm.getLine(curStart.line);
+ replaceTo = curStart.ch + actionArgs.repeat;
+ if (replaceTo > line.length) {
+ replaceTo=line.length;
+ }
+ curEnd = Pos(curStart.line, replaceTo);
+ }
+ if (replaceWith=='\n') {
+ if (!vim.visualMode) cm.replaceRange('', curStart, curEnd);
+ (CodeMirror.commands.newlineAndIndentContinueComment || CodeMirror.commands.newlineAndIndent)(cm);
+ } else {
+ var replaceWithStr = cm.getRange(curStart, curEnd);
+ replaceWithStr = replaceWithStr.replace(/[^\n]/g, replaceWith);
+ if (vim.visualBlock) {
+ var spaces = new Array(cm.getOption("tabSize")+1).join(' ');
+ replaceWithStr = cm.getSelection();
+ replaceWithStr = replaceWithStr.replace(/\t/g, spaces).replace(/[^\n]/g, replaceWith).split('\n');
+ cm.replaceSelections(replaceWithStr);
+ } else {
+ cm.replaceRange(replaceWithStr, curStart, curEnd);
+ }
+ if (vim.visualMode) {
+ curStart = cursorIsBefore(selections[0].anchor, selections[0].head) ?
+ selections[0].anchor : selections[0].head;
+ cm.setCursor(curStart);
+ exitVisualMode(cm, false);
+ } else {
+ cm.setCursor(offsetCursor(curEnd, 0, -1));
+ }
+ }
+ },
+ incrementNumberToken: function(cm, actionArgs) {
+ var cur = cm.getCursor();
+ var lineStr = cm.getLine(cur.line);
+ var re = /-?\d+/g;
+ var match;
+ var start;
+ var end;
+ var numberStr;
+ var token;
+ while ((match = re.exec(lineStr)) !== null) {
+ token = match[0];
+ start = match.index;
+ end = start + token.length;
+ if (cur.ch < end)break;
+ }
+ if (!actionArgs.backtrack && (end <= cur.ch))return;
+ if (token) {
+ var increment = actionArgs.increase ? 1 : -1;
+ var number = parseInt(token) + (increment * actionArgs.repeat);
+ var from = Pos(cur.line, start);
+ var to = Pos(cur.line, end);
+ numberStr = number.toString();
+ cm.replaceRange(numberStr, from, to);
+ } else {
+ return;
+ }
+ cm.setCursor(Pos(cur.line, start + numberStr.length - 1));
+ },
+ repeatLastEdit: function(cm, actionArgs, vim) {
+ var lastEditInputState = vim.lastEditInputState;
+ if (!lastEditInputState) { return; }
+ var repeat = actionArgs.repeat;
+ if (repeat && actionArgs.repeatIsExplicit) {
+ vim.lastEditInputState.repeatOverride = repeat;
+ } else {
+ repeat = vim.lastEditInputState.repeatOverride || repeat;
+ }
+ repeatLastEdit(cm, vim, repeat, false /** repeatForInsert */);
+ },
+ exitInsertMode: exitInsertMode
+ };
+
+ function defineAction(name, fn) {
+ actions[name] = fn;
+ }
+ function clipCursorToContent(cm, cur, includeLineBreak) {
+ var line = Math.min(Math.max(cm.firstLine(), cur.line), cm.lastLine() );
+ var maxCh = lineLength(cm, line) - 1;
+ maxCh = (includeLineBreak) ? maxCh + 1 : maxCh;
+ var ch = Math.min(Math.max(0, cur.ch), maxCh);
+ return Pos(line, ch);
+ }
+ function copyArgs(args) {
+ var ret = {};
+ for (var prop in args) {
+ if (args.hasOwnProperty(prop)) {
+ ret[prop] = args[prop];
+ }
+ }
+ return ret;
+ }
+ function offsetCursor(cur, offsetLine, offsetCh) {
+ if (typeof offsetLine === 'object') {
+ offsetCh = offsetLine.ch;
+ offsetLine = offsetLine.line;
+ }
+ return Pos(cur.line + offsetLine, cur.ch + offsetCh);
+ }
+ function getOffset(anchor, head) {
+ return {
+ line: head.line - anchor.line,
+ ch: head.line - anchor.line
+ };
+ }
+ function commandMatches(keys, keyMap, context, inputState) {
+ var match, partial = [], full = [];
+ for (var i = 0; i < keyMap.length; i++) {
+ var command = keyMap[i];
+ if (context == 'insert' && command.context != 'insert' ||
+ command.context && command.context != context ||
+ inputState.operator && command.type == 'action' ||
+ !(match = commandMatch(keys, command.keys))) { continue; }
+ if (match == 'partial') { partial.push(command); }
+ if (match == 'full') { full.push(command); }
+ }
+ return {
+ partial: partial.length && partial,
+ full: full.length && full
+ };
+ }
+ function commandMatch(pressed, mapped) {
+ if (mapped.slice(-11) == '<character>') {
+ var prefixLen = mapped.length - 11;
+ var pressedPrefix = pressed.slice(0, prefixLen);
+ var mappedPrefix = mapped.slice(0, prefixLen);
+ return pressedPrefix == mappedPrefix && pressed.length > prefixLen ? 'full' :
+ mappedPrefix.indexOf(pressedPrefix) == 0 ? 'partial' : false;
+ } else {
+ return pressed == mapped ? 'full' :
+ mapped.indexOf(pressed) == 0 ? 'partial' : false;
+ }
+ }
+ function lastChar(keys) {
+ var match = /^.*(<[\w\-]+>)$/.exec(keys);
+ var selectedCharacter = match ? match[1] : keys.slice(-1);
+ if (selectedCharacter.length > 1){
+ switch(selectedCharacter){
+ case '<CR>':
+ selectedCharacter='\n';
+ break;
+ case '<Space>':
+ selectedCharacter=' ';
+ break;
+ default:
+ break;
+ }
+ }
+ return selectedCharacter;
+ }
+ function repeatFn(cm, fn, repeat) {
+ return function() {
+ for (var i = 0; i < repeat; i++) {
+ fn(cm);
+ }
+ };
+ }
+ function copyCursor(cur) {
+ return Pos(cur.line, cur.ch);
+ }
+ function cursorEqual(cur1, cur2) {
+ return cur1.ch == cur2.ch && cur1.line == cur2.line;
+ }
+ function cursorIsBefore(cur1, cur2) {
+ if (cur1.line < cur2.line) {
+ return true;
+ }
+ if (cur1.line == cur2.line && cur1.ch < cur2.ch) {
+ return true;
+ }
+ return false;
+ }
+ function cursorMin(cur1, cur2) {
+ if (arguments.length > 2) {
+ cur2 = cursorMin.apply(undefined, Array.prototype.slice.call(arguments, 1));
+ }
+ return cursorIsBefore(cur1, cur2) ? cur1 : cur2;
+ }
+ function cursorMax(cur1, cur2) {
+ if (arguments.length > 2) {
+ cur2 = cursorMax.apply(undefined, Array.prototype.slice.call(arguments, 1));
+ }
+ return cursorIsBefore(cur1, cur2) ? cur2 : cur1;
+ }
+ function cursorIsBetween(cur1, cur2, cur3) {
+ var cur1before2 = cursorIsBefore(cur1, cur2);
+ var cur2before3 = cursorIsBefore(cur2, cur3);
+ return cur1before2 && cur2before3;
+ }
+ function lineLength(cm, lineNum) {
+ return cm.getLine(lineNum).length;
+ }
+ function trim(s) {
+ if (s.trim) {
+ return s.trim();
+ }
+ return s.replace(/^\s+|\s+$/g, '');
+ }
+ function escapeRegex(s) {
+ return s.replace(/([.?*+$\[\]\/\\(){}|\-])/g, '\\$1');
+ }
+ function extendLineToColumn(cm, lineNum, column) {
+ var endCh = lineLength(cm, lineNum);
+ var spaces = new Array(column-endCh+1).join(' ');
+ cm.setCursor(Pos(lineNum, endCh));
+ cm.replaceRange(spaces, cm.getCursor());
+ }
+ function selectBlock(cm, selectionEnd) {
+ var selections = [], ranges = cm.listSelections();
+ var head = copyCursor(cm.clipPos(selectionEnd));
+ var isClipped = !cursorEqual(selectionEnd, head);
+ var curHead = cm.getCursor('head');
+ var primIndex = getIndex(ranges, curHead);
+ var wasClipped = cursorEqual(ranges[primIndex].head, ranges[primIndex].anchor);
+ var max = ranges.length - 1;
+ var index = max - primIndex > primIndex ? max : 0;
+ var base = ranges[index].anchor;
+
+ var firstLine = Math.min(base.line, head.line);
+ var lastLine = Math.max(base.line, head.line);
+ var baseCh = base.ch, headCh = head.ch;
+
+ var dir = ranges[index].head.ch - baseCh;
+ var newDir = headCh - baseCh;
+ if (dir > 0 && newDir <= 0) {
+ baseCh++;
+ if (!isClipped) { headCh--; }
+ } else if (dir < 0 && newDir >= 0) {
+ baseCh--;
+ if (!wasClipped) { headCh++; }
+ } else if (dir < 0 && newDir == -1) {
+ baseCh--;
+ headCh++;
+ }
+ for (var line = firstLine; line <= lastLine; line++) {
+ var range = {anchor: new Pos(line, baseCh), head: new Pos(line, headCh)};
+ selections.push(range);
+ }
+ primIndex = head.line == lastLine ? selections.length - 1 : 0;
+ cm.setSelections(selections);
+ selectionEnd.ch = headCh;
+ base.ch = baseCh;
+ return base;
+ }
+ function selectForInsert(cm, head, height) {
+ var sel = [];
+ for (var i = 0; i < height; i++) {
+ var lineHead = offsetCursor(head, i, 0);
+ sel.push({anchor: lineHead, head: lineHead});
+ }
+ cm.setSelections(sel, 0);
+ }
+ function getIndex(ranges, cursor, end) {
+ for (var i = 0; i < ranges.length; i++) {
+ var atAnchor = end != 'head' && cursorEqual(ranges[i].anchor, cursor);
+ var atHead = end != 'anchor' && cursorEqual(ranges[i].head, cursor);
+ if (atAnchor || atHead) {
+ return i;
+ }
+ }
+ return -1;
+ }
+ function getSelectedAreaRange(cm, vim) {
+ var lastSelection = vim.lastSelection;
+ var getCurrentSelectedAreaRange = function() {
+ var selections = cm.listSelections();
+ var start = selections[0];
+ var end = selections[selections.length-1];
+ var selectionStart = cursorIsBefore(start.anchor, start.head) ? start.anchor : start.head;
+ var selectionEnd = cursorIsBefore(end.anchor, end.head) ? end.head : end.anchor;
+ return [selectionStart, selectionEnd];
+ };
+ var getLastSelectedAreaRange = function() {
+ var selectionStart = cm.getCursor();
+ var selectionEnd = cm.getCursor();
+ var block = lastSelection.visualBlock;
+ if (block) {
+ var width = block.width;
+ var height = block.height;
+ selectionEnd = Pos(selectionStart.line + height, selectionStart.ch + width);
+ var selections = [];
+ for (var i = selectionStart.line; i < selectionEnd.line; i++) {
+ var anchor = Pos(i, selectionStart.ch);
+ var head = Pos(i, selectionEnd.ch);
+ var range = {anchor: anchor, head: head};
+ selections.push(range);
+ }
+ cm.setSelections(selections);
+ } else {
+ var start = lastSelection.anchorMark.find();
+ var end = lastSelection.headMark.find();
+ var line = end.line - start.line;
+ var ch = end.ch - start.ch;
+ selectionEnd = {line: selectionEnd.line + line, ch: line ? selectionEnd.ch : ch + selectionEnd.ch};
+ if (lastSelection.visualLine) {
+ selectionStart = Pos(selectionStart.line, 0);
+ selectionEnd = Pos(selectionEnd.line, lineLength(cm, selectionEnd.line));
+ }
+ cm.setSelection(selectionStart, selectionEnd);
+ }
+ return [selectionStart, selectionEnd];
+ };
+ if (!vim.visualMode) {
+ return getLastSelectedAreaRange();
+ } else {
+ return getCurrentSelectedAreaRange();
+ }
+ }
+ function updateLastSelection(cm, vim) {
+ var anchor = vim.sel.anchor;
+ var head = vim.sel.head;
+ if (vim.lastPastedText) {
+ head = cm.posFromIndex(cm.indexFromPos(anchor) + vim.lastPastedText.length);
+ vim.lastPastedText = null;
+ }
+ vim.lastSelection = {'anchorMark': cm.setBookmark(anchor),
+ 'headMark': cm.setBookmark(head),
+ 'anchor': copyCursor(anchor),
+ 'head': copyCursor(head),
+ 'visualMode': vim.visualMode,
+ 'visualLine': vim.visualLine,
+ 'visualBlock': vim.visualBlock};
+ }
+ function expandSelection(cm, start, end) {
+ var sel = cm.state.vim.sel;
+ var head = sel.head;
+ var anchor = sel.anchor;
+ var tmp;
+ if (cursorIsBefore(end, start)) {
+ tmp = end;
+ end = start;
+ start = tmp;
+ }
+ if (cursorIsBefore(head, anchor)) {
+ head = cursorMin(start, head);
+ anchor = cursorMax(anchor, end);
+ } else {
+ anchor = cursorMin(start, anchor);
+ head = cursorMax(head, end);
+ head = offsetCursor(head, 0, -1);
+ if (head.ch == -1 && head.line != cm.firstLine()) {
+ head = Pos(head.line - 1, lineLength(cm, head.line - 1));
+ }
+ }
+ return [anchor, head];
+ }
+ function updateCmSelection(cm, sel, mode) {
+ var vim = cm.state.vim;
+ sel = sel || vim.sel;
+ var mode = mode ||
+ vim.visualLine ? 'line' : vim.visualBlock ? 'block' : 'char';
+ var cmSel = makeCmSelection(cm, sel, mode);
+ cm.setSelections(cmSel.ranges, cmSel.primary);
+ updateFakeCursor(cm);
+ }
+ function makeCmSelection(cm, sel, mode, exclusive) {
+ var head = copyCursor(sel.head);
+ var anchor = copyCursor(sel.anchor);
+ if (mode == 'char') {
+ var headOffset = !exclusive && !cursorIsBefore(sel.head, sel.anchor) ? 1 : 0;
+ var anchorOffset = cursorIsBefore(sel.head, sel.anchor) ? 1 : 0;
+ head = offsetCursor(sel.head, 0, headOffset);
+ anchor = offsetCursor(sel.anchor, 0, anchorOffset);
+ return {
+ ranges: [{anchor: anchor, head: head}],
+ primary: 0
+ };
+ } else if (mode == 'line') {
+ if (!cursorIsBefore(sel.head, sel.anchor)) {
+ anchor.ch = 0;
+
+ var lastLine = cm.lastLine();
+ if (head.line > lastLine) {
+ head.line = lastLine;
+ }
+ head.ch = lineLength(cm, head.line);
+ } else {
+ head.ch = 0;
+ anchor.ch = lineLength(cm, anchor.line);
+ }
+ return {
+ ranges: [{anchor: anchor, head: head}],
+ primary: 0
+ };
+ } else if (mode == 'block') {
+ var top = Math.min(anchor.line, head.line),
+ left = Math.min(anchor.ch, head.ch),
+ bottom = Math.max(anchor.line, head.line),
+ right = Math.max(anchor.ch, head.ch) + 1;
+ var height = bottom - top + 1;
+ var primary = head.line == top ? 0 : height - 1;
+ var ranges = [];
+ for (var i = 0; i < height; i++) {
+ ranges.push({
+ anchor: Pos(top + i, left),
+ head: Pos(top + i, right)
+ });
+ }
+ return {
+ ranges: ranges,
+ primary: primary
+ };
+ }
+ }
+ function getHead(cm) {
+ var cur = cm.getCursor('head');
+ if (cm.getSelection().length == 1) {
+ cur = cursorMin(cur, cm.getCursor('anchor'));
+ }
+ return cur;
+ }
+ function exitVisualMode(cm, moveHead) {
+ var vim = cm.state.vim;
+ if (moveHead !== false) {
+ cm.setCursor(clipCursorToContent(cm, vim.sel.head));
+ }
+ updateLastSelection(cm, vim);
+ vim.visualMode = false;
+ vim.visualLine = false;
+ vim.visualBlock = false;
+ CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"});
+ if (vim.fakeCursor) {
+ vim.fakeCursor.clear();
+ }
+ }
+ function clipToLine(cm, curStart, curEnd) {
+ var selection = cm.getRange(curStart, curEnd);
+ if (/\n\s*$/.test(selection)) {
+ var lines = selection.split('\n');
+ lines.pop();
+ var line;
+ for (var line = lines.pop(); lines.length > 0 && line && isWhiteSpaceString(line); line = lines.pop()) {
+ curEnd.line--;
+ curEnd.ch = 0;
+ }
+ if (line) {
+ curEnd.line--;
+ curEnd.ch = lineLength(cm, curEnd.line);
+ } else {
+ curEnd.ch = 0;
+ }
+ }
+ }
+ function expandSelectionToLine(_cm, curStart, curEnd) {
+ curStart.ch = 0;
+ curEnd.ch = 0;
+ curEnd.line++;
+ }
+
+ function findFirstNonWhiteSpaceCharacter(text) {
+ if (!text) {
+ return 0;
+ }
+ var firstNonWS = text.search(/\S/);
+ return firstNonWS == -1 ? text.length : firstNonWS;
+ }
+
+ function expandWordUnderCursor(cm, inclusive, _forward, bigWord, noSymbol) {
+ var cur = getHead(cm);
+ var line = cm.getLine(cur.line);
+ var idx = cur.ch;
+ var test = noSymbol ? wordCharTest[0] : bigWordCharTest [0];
+ while (!test(line.charAt(idx))) {
+ idx++;
+ if (idx >= line.length) { return null; }
+ }
+
+ if (bigWord) {
+ test = bigWordCharTest[0];
+ } else {
+ test = wordCharTest[0];
+ if (!test(line.charAt(idx))) {
+ test = wordCharTest[1];
+ }
+ }
+
+ var end = idx, start = idx;
+ while (test(line.charAt(end)) && end < line.length) { end++; }
+ while (test(line.charAt(start)) && start >= 0) { start--; }
+ start++;
+
+ if (inclusive) {
+ var wordEnd = end;
+ while (/\s/.test(line.charAt(end)) && end < line.length) { end++; }
+ if (wordEnd == end) {
+ var wordStart = start;
+ while (/\s/.test(line.charAt(start - 1)) && start > 0) { start--; }
+ if (!start) { start = wordStart; }
+ }
+ }
+ return { start: Pos(cur.line, start), end: Pos(cur.line, end) };
+ }
+
+ function recordJumpPosition(cm, oldCur, newCur) {
+ if (!cursorEqual(oldCur, newCur)) {
+ vimGlobalState.jumpList.add(cm, oldCur, newCur);
+ }
+ }
+
+ function recordLastCharacterSearch(increment, args) {
+ vimGlobalState.lastChararacterSearch.increment = increment;
+ vimGlobalState.lastChararacterSearch.forward = args.forward;
+ vimGlobalState.lastChararacterSearch.selectedCharacter = args.selectedCharacter;
+ }
+
+ var symbolToMode = {
+ '(': 'bracket', ')': 'bracket', '{': 'bracket', '}': 'bracket',
+ '[': 'section', ']': 'section',
+ '*': 'comment', '/': 'comment',
+ 'm': 'method', 'M': 'method',
+ '#': 'preprocess'
+ };
+ var findSymbolModes = {
+ bracket: {
+ isComplete: function(state) {
+ if (state.nextCh === state.symb) {
+ state.depth++;
+ if (state.depth >= 1)return true;
+ } else if (state.nextCh === state.reverseSymb) {
+ state.depth--;
+ }
+ return false;
+ }
+ },
+ section: {
+ init: function(state) {
+ state.curMoveThrough = true;
+ state.symb = (state.forward ? ']' : '[') === state.symb ? '{' : '}';
+ },
+ isComplete: function(state) {
+ return state.index === 0 && state.nextCh === state.symb;
+ }
+ },
+ comment: {
+ isComplete: function(state) {
+ var found = state.lastCh === '*' && state.nextCh === '/';
+ state.lastCh = state.nextCh;
+ return found;
+ }
+ },
+ method: {
+ init: function(state) {
+ state.symb = (state.symb === 'm' ? '{' : '}');
+ state.reverseSymb = state.symb === '{' ? '}' : '{';
+ },
+ isComplete: function(state) {
+ if (state.nextCh === state.symb)return true;
+ return false;
+ }
+ },
+ preprocess: {
+ init: function(state) {
+ state.index = 0;
+ },
+ isComplete: function(state) {
+ if (state.nextCh === '#') {
+ var token = state.lineText.match(/#(\w+)/)[1];
+ if (token === 'endif') {
+ if (state.forward && state.depth === 0) {
+ return true;
+ }
+ state.depth++;
+ } else if (token === 'if') {
+ if (!state.forward && state.depth === 0) {
+ return true;
+ }
+ state.depth--;
+ }
+ if (token === 'else' && state.depth === 0)return true;
+ }
+ return false;
+ }
+ }
+ };
+ function findSymbol(cm, repeat, forward, symb) {
+ var cur = copyCursor(cm.getCursor());
+ var increment = forward ? 1 : -1;
+ var endLine = forward ? cm.lineCount() : -1;
+ var curCh = cur.ch;
+ var line = cur.line;
+ var lineText = cm.getLine(line);
+ var state = {
+ lineText: lineText,
+ nextCh: lineText.charAt(curCh),
+ lastCh: null,
+ index: curCh,
+ symb: symb,
+ reverseSymb: (forward ? { ')': '(', '}': '{' } : { '(': ')', '{': '}' })[symb],
+ forward: forward,
+ depth: 0,
+ curMoveThrough: false
+ };
+ var mode = symbolToMode[symb];
+ if (!mode)return cur;
+ var init = findSymbolModes[mode].init;
+ var isComplete = findSymbolModes[mode].isComplete;
+ if (init) { init(state); }
+ while (line !== endLine && repeat) {
+ state.index += increment;
+ state.nextCh = state.lineText.charAt(state.index);
+ if (!state.nextCh) {
+ line += increment;
+ state.lineText = cm.getLine(line) || '';
+ if (increment > 0) {
+ state.index = 0;
+ } else {
+ var lineLen = state.lineText.length;
+ state.index = (lineLen > 0) ? (lineLen-1) : 0;
+ }
+ state.nextCh = state.lineText.charAt(state.index);
+ }
+ if (isComplete(state)) {
+ cur.line = line;
+ cur.ch = state.index;
+ repeat--;
+ }
+ }
+ if (state.nextCh || state.curMoveThrough) {
+ return Pos(line, state.index);
+ }
+ return cur;
+ }
+ function findWord(cm, cur, forward, bigWord, emptyLineIsWord) {
+ var lineNum = cur.line;
+ var pos = cur.ch;
+ var line = cm.getLine(lineNum);
+ var dir = forward ? 1 : -1;
+ var charTests = bigWord ? bigWordCharTest: wordCharTest;
+
+ if (emptyLineIsWord && line == '') {
+ lineNum += dir;
+ line = cm.getLine(lineNum);
+ if (!isLine(cm, lineNum)) {
+ return null;
+ }
+ pos = (forward) ? 0 : line.length;
+ }
+
+ while (true) {
+ if (emptyLineIsWord && line == '') {
+ return { from: 0, to: 0, line: lineNum };
+ }
+ var stop = (dir > 0) ? line.length : -1;
+ var wordStart = stop, wordEnd = stop;
+ while (pos != stop) {
+ var foundWord = false;
+ for (var i = 0; i < charTests.length && !foundWord; ++i) {
+ if (charTests[i](line.charAt(pos))) {
+ wordStart = pos;
+ while (pos != stop && charTests[i](line.charAt(pos))) {
+ pos += dir;
+ }
+ wordEnd = pos;
+ foundWord = wordStart != wordEnd;
+ if (wordStart == cur.ch && lineNum == cur.line &&
+ wordEnd == wordStart + dir) {
+ continue;
+ } else {
+ return {
+ from: Math.min(wordStart, wordEnd + 1),
+ to: Math.max(wordStart, wordEnd),
+ line: lineNum };
+ }
+ }
+ }
+ if (!foundWord) {
+ pos += dir;
+ }
+ }
+ lineNum += dir;
+ if (!isLine(cm, lineNum)) {
+ return null;
+ }
+ line = cm.getLine(lineNum);
+ pos = (dir > 0) ? 0 : line.length;
+ }
+ throw new Error('The impossible happened.');
+ }
+ function moveToWord(cm, cur, repeat, forward, wordEnd, bigWord) {
+ var curStart = copyCursor(cur);
+ var words = [];
+ if (forward && !wordEnd || !forward && wordEnd) {
+ repeat++;
+ }
+ var emptyLineIsWord = !(forward && wordEnd);
+ for (var i = 0; i < repeat; i++) {
+ var word = findWord(cm, cur, forward, bigWord, emptyLineIsWord);
+ if (!word) {
+ var eodCh = lineLength(cm, cm.lastLine());
+ words.push(forward
+ ? {line: cm.lastLine(), from: eodCh, to: eodCh}
+ : {line: 0, from: 0, to: 0});
+ break;
+ }
+ words.push(word);
+ cur = Pos(word.line, forward ? (word.to - 1) : word.from);
+ }
+ var shortCircuit = words.length != repeat;
+ var firstWord = words[0];
+ var lastWord = words.pop();
+ if (forward && !wordEnd) {
+ if (!shortCircuit && (firstWord.from != curStart.ch || firstWord.line != curStart.line)) {
+ lastWord = words.pop();
+ }
+ return Pos(lastWord.line, lastWord.from);
+ } else if (forward && wordEnd) {
+ return Pos(lastWord.line, lastWord.to - 1);
+ } else if (!forward && wordEnd) {
+ if (!shortCircuit && (firstWord.to != curStart.ch || firstWord.line != curStart.line)) {
+ lastWord = words.pop();
+ }
+ return Pos(lastWord.line, lastWord.to);
+ } else {
+ return Pos(lastWord.line, lastWord.from);
+ }
+ }
+
+ function moveToCharacter(cm, repeat, forward, character) {
+ var cur = cm.getCursor();
+ var start = cur.ch;
+ var idx;
+ for (var i = 0; i < repeat; i ++) {
+ var line = cm.getLine(cur.line);
+ idx = charIdxInLine(start, line, character, forward, true);
+ if (idx == -1) {
+ return null;
+ }
+ start = idx;
+ }
+ return Pos(cm.getCursor().line, idx);
+ }
+
+ function moveToColumn(cm, repeat) {
+ var line = cm.getCursor().line;
+ return clipCursorToContent(cm, Pos(line, repeat - 1));
+ }
+
+ function updateMark(cm, vim, markName, pos) {
+ if (!inArray(markName, validMarks)) {
+ return;
+ }
+ if (vim.marks[markName]) {
+ vim.marks[markName].clear();
+ }
+ vim.marks[markName] = cm.setBookmark(pos);
+ }
+
+ function charIdxInLine(start, line, character, forward, includeChar) {
+ var idx;
+ if (forward) {
+ idx = line.indexOf(character, start + 1);
+ if (idx != -1 && !includeChar) {
+ idx -= 1;
+ }
+ } else {
+ idx = line.lastIndexOf(character, start - 1);
+ if (idx != -1 && !includeChar) {
+ idx += 1;
+ }
+ }
+ return idx;
+ }
+
+ function findParagraph(cm, head, repeat, dir, inclusive) {
+ var line = head.line;
+ var min = cm.firstLine();
+ var max = cm.lastLine();
+ var start, end, i = line;
+ function isEmpty(i) { return !/\S/.test(cm.getLine(i)); } // ace_patch
+ function isBoundary(i, dir, any) {
+ if (any) { return isEmpty(i) != isEmpty(i + dir); }
+ return !isEmpty(i) && isEmpty(i + dir);
+ }
+ function skipFold(i) {
+ dir = dir > 0 ? 1 : -1;
+ var foldLine = cm.ace.session.getFoldLine(i);
+ if (foldLine) {
+ if (i + dir > foldLine.start.row && i + dir < foldLine.end.row)
+ dir = (dir > 0 ? foldLine.end.row : foldLine.start.row) - i;
+ }
+ }
+ if (dir) {
+ while (min <= i && i <= max && repeat > 0) {
+ skipFold(i);
+ if (isBoundary(i, dir)) { repeat--; }
+ i += dir;
+ }
+ return new Pos(i, 0);
+ }
+
+ var vim = cm.state.vim;
+ if (vim.visualLine && isBoundary(line, 1, true)) {
+ var anchor = vim.sel.anchor;
+ if (isBoundary(anchor.line, -1, true)) {
+ if (!inclusive || anchor.line != line) {
+ line += 1;
+ }
+ }
+ }
+ var startState = isEmpty(line);
+ for (i = line; i <= max && repeat; i++) {
+ if (isBoundary(i, 1, true)) {
+ if (!inclusive || isEmpty(i) != startState) {
+ repeat--;
+ }
+ }
+ }
+ end = new Pos(i, 0);
+ if (i > max && !startState) { startState = true; }
+ else { inclusive = false; }
+ for (i = line; i > min; i--) {
+ if (!inclusive || isEmpty(i) == startState || i == line) {
+ if (isBoundary(i, -1, true)) { break; }
+ }
+ }
+ start = new Pos(i, 0);
+ return { start: start, end: end };
+ }
+ function selectCompanionObject(cm, head, symb, inclusive) {
+ var cur = head, start, end;
+
+ var bracketRegexp = ({
+ '(': /[()]/, ')': /[()]/,
+ '[': /[[\]]/, ']': /[[\]]/,
+ '{': /[{}]/, '}': /[{}]/})[symb];
+ var openSym = ({
+ '(': '(', ')': '(',
+ '[': '[', ']': '[',
+ '{': '{', '}': '{'})[symb];
+ var curChar = cm.getLine(cur.line).charAt(cur.ch);
+ var offset = curChar === openSym ? 1 : 0;
+
+ start = cm.scanForBracket(Pos(cur.line, cur.ch + offset), -1, null, {'bracketRegex': bracketRegexp});
+ end = cm.scanForBracket(Pos(cur.line, cur.ch + offset), 1, null, {'bracketRegex': bracketRegexp});
+
+ if (!start || !end) {
+ return { start: cur, end: cur };
+ }
+
+ start = start.pos;
+ end = end.pos;
+
+ if ((start.line == end.line && start.ch > end.ch)
+ || (start.line > end.line)) {
+ var tmp = start;
+ start = end;
+ end = tmp;
+ }
+
+ if (inclusive) {
+ end.ch += 1;
+ } else {
+ start.ch += 1;
+ }
+
+ return { start: start, end: end };
+ }
+ function findBeginningAndEnd(cm, head, symb, inclusive) {
+ var cur = copyCursor(head);
+ var line = cm.getLine(cur.line);
+ var chars = line.split('');
+ var start, end, i, len;
+ var firstIndex = chars.indexOf(symb);
+ if (cur.ch < firstIndex) {
+ cur.ch = firstIndex;
+ }
+ else if (firstIndex < cur.ch && chars[cur.ch] == symb) {
+ end = cur.ch; // assign end to the current cursor
+ --cur.ch; // make sure to look backwards
+ }
+ if (chars[cur.ch] == symb && !end) {
+ start = cur.ch + 1; // assign start to ahead of the cursor
+ } else {
+ for (i = cur.ch; i > -1 && !start; i--) {
+ if (chars[i] == symb) {
+ start = i + 1;
+ }
+ }
+ }
+ if (start && !end) {
+ for (i = start, len = chars.length; i < len && !end; i++) {
+ if (chars[i] == symb) {
+ end = i;
+ }
+ }
+ }
+ if (!start || !end) {
+ return { start: cur, end: cur };
+ }
+ if (inclusive) {
+ --start; ++end;
+ }
+
+ return {
+ start: Pos(cur.line, start),
+ end: Pos(cur.line, end)
+ };
+ }
+ defineOption('pcre', true, 'boolean');
+ function SearchState() {}
+ SearchState.prototype = {
+ getQuery: function() {
+ return vimGlobalState.query;
+ },
+ setQuery: function(query) {
+ vimGlobalState.query = query;
+ },
+ getOverlay: function() {
+ return this.searchOverlay;
+ },
+ setOverlay: function(overlay) {
+ this.searchOverlay = overlay;
+ },
+ isReversed: function() {
+ return vimGlobalState.isReversed;
+ },
+ setReversed: function(reversed) {
+ vimGlobalState.isReversed = reversed;
+ },
+ getScrollbarAnnotate: function() {
+ return this.annotate;
+ },
+ setScrollbarAnnotate: function(annotate) {
+ this.annotate = annotate;
+ }
+ };
+ function getSearchState(cm) {
+ var vim = cm.state.vim;
+ return vim.searchState_ || (vim.searchState_ = new SearchState());
+ }
+ function dialog(cm, template, shortText, onClose, options) {
+ if (cm.openDialog) {
+ cm.openDialog(template, onClose, { bottom: true, value: options.value,
+ onKeyDown: options.onKeyDown, onKeyUp: options.onKeyUp,
+ selectValueOnOpen: false});
+ }
+ else {
+ onClose(prompt(shortText, ''));
+ }
+ }
+ function splitBySlash(argString) {
+ var slashes = findUnescapedSlashes(argString) || [];
+ if (!slashes.length) return [];
+ var tokens = [];
+ if (slashes[0] !== 0) return;
+ for (var i = 0; i < slashes.length; i++) {
+ if (typeof slashes[i] == 'number')
+ tokens.push(argString.substring(slashes[i] + 1, slashes[i+1]));
+ }
+ return tokens;
+ }
+
+ function findUnescapedSlashes(str) {
+ var escapeNextChar = false;
+ var slashes = [];
+ for (var i = 0; i < str.length; i++) {
+ var c = str.charAt(i);
+ if (!escapeNextChar && c == '/') {
+ slashes.push(i);
+ }
+ escapeNextChar = !escapeNextChar && (c == '\\');
+ }
+ return slashes;
+ }
+ function translateRegex(str) {
+ var specials = '|(){';
+ var unescape = '}';
+ var escapeNextChar = false;
+ var out = [];
+ for (var i = -1; i < str.length; i++) {
+ var c = str.charAt(i) || '';
+ var n = str.charAt(i+1) || '';
+ var specialComesNext = (n && specials.indexOf(n) != -1);
+ if (escapeNextChar) {
+ if (c !== '\\' || !specialComesNext) {
+ out.push(c);
+ }
+ escapeNextChar = false;
+ } else {
+ if (c === '\\') {
+ escapeNextChar = true;
+ if (n && unescape.indexOf(n) != -1) {
+ specialComesNext = true;
+ }
+ if (!specialComesNext || n === '\\') {
+ out.push(c);
+ }
+ } else {
+ out.push(c);
+ if (specialComesNext && n !== '\\') {
+ out.push('\\');
+ }
+ }
+ }
+ }
+ return out.join('');
+ }
+ var charUnescapes = {'\\n': '\n', '\\r': '\r', '\\t': '\t'};
+ function translateRegexReplace(str) {
+ var escapeNextChar = false;
+ var out = [];
+ for (var i = -1; i < str.length; i++) {
+ var c = str.charAt(i) || '';
+ var n = str.charAt(i+1) || '';
+ if (charUnescapes[c + n]) {
+ out.push(charUnescapes[c+n]);
+ i++;
+ } else if (escapeNextChar) {
+ out.push(c);
+ escapeNextChar = false;
+ } else {
+ if (c === '\\') {
+ escapeNextChar = true;
+ if ((isNumber(n) || n === '$')) {
+ out.push('$');
+ } else if (n !== '/' && n !== '\\') {
+ out.push('\\');
+ }
+ } else {
+ if (c === '$') {
+ out.push('$');
+ }
+ out.push(c);
+ if (n === '/') {
+ out.push('\\');
+ }
+ }
+ }
+ }
+ return out.join('');
+ }
+ var unescapes = {'\\/': '/', '\\\\': '\\', '\\n': '\n', '\\r': '\r', '\\t': '\t'};
+ function unescapeRegexReplace(str) {
+ var stream = new CodeMirror.StringStream(str);
+ var output = [];
+ while (!stream.eol()) {
+ while (stream.peek() && stream.peek() != '\\') {
+ output.push(stream.next());
+ }
+ var matched = false;
+ for (var matcher in unescapes) {
+ if (stream.match(matcher, true)) {
+ matched = true;
+ output.push(unescapes[matcher]);
+ break;
+ }
+ }
+ if (!matched) {
+ output.push(stream.next());
+ }
+ }
+ return output.join('');
+ }
+ function parseQuery(query, ignoreCase, smartCase) {
+ var lastSearchRegister = vimGlobalState.registerController.getRegister('/');
+ lastSearchRegister.setText(query);
+ if (query instanceof RegExp) { return query; }
+ var slashes = findUnescapedSlashes(query);
+ var regexPart;
+ var forceIgnoreCase;
+ if (!slashes.length) {
+ regexPart = query;
+ } else {
+ regexPart = query.substring(0, slashes[0]);
+ var flagsPart = query.substring(slashes[0]);
+ forceIgnoreCase = (flagsPart.indexOf('i') != -1);
+ }
+ if (!regexPart) {
+ return null;
+ }
+ if (!getOption('pcre')) {
+ regexPart = translateRegex(regexPart);
+ }
+ if (smartCase) {
+ ignoreCase = (/^[^A-Z]*$/).test(regexPart);
+ }
+ var regexp = new RegExp(regexPart,
+ (ignoreCase || forceIgnoreCase) ? 'i' : undefined);
+ return regexp;
+ }
+ function showConfirm(cm, text) {
+ if (cm.openNotification) {
+ cm.openNotification('<span style="color: red">' + text + '</span>',
+ {bottom: true, duration: 5000});
+ } else {
+ alert(text);
+ }
+ }
+ function makePrompt(prefix, desc) {
+ var raw = '';
+ if (prefix) {
+ raw += '<span style="font-family: monospace">' + prefix + '</span>';
+ }
+ raw += '<input type="text"/> ' +
+ '<span style="color: #888">';
+ if (desc) {
+ raw += '<span style="color: #888">';
+ raw += desc;
+ raw += '</span>';
+ }
+ return raw;
+ }
+ var searchPromptDesc = '(Javascript regexp)';
+ function showPrompt(cm, options) {
+ var shortText = (options.prefix || '') + ' ' + (options.desc || '');
+ var prompt = makePrompt(options.prefix, options.desc);
+ dialog(cm, prompt, shortText, options.onClose, options);
+ }
+ function regexEqual(r1, r2) {
+ if (r1 instanceof RegExp && r2 instanceof RegExp) {
+ var props = ['global', 'multiline', 'ignoreCase', 'source'];
+ for (var i = 0; i < props.length; i++) {
+ var prop = props[i];
+ if (r1[prop] !== r2[prop]) {
+ return false;
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+ function updateSearchQuery(cm, rawQuery, ignoreCase, smartCase) {
+ if (!rawQuery) {
+ return;
+ }
+ var state = getSearchState(cm);
+ var query = parseQuery(rawQuery, !!ignoreCase, !!smartCase);
+ if (!query) {
+ return;
+ }
+ highlightSearchMatches(cm, query);
+ if (regexEqual(query, state.getQuery())) {
+ return query;
+ }
+ state.setQuery(query);
+ return query;
+ }
+ function searchOverlay(query) {
+ if (query.source.charAt(0) == '^') {
+ var matchSol = true;
+ }
+ return {
+ token: function(stream) {
+ if (matchSol && !stream.sol()) {
+ stream.skipToEnd();
+ return;
+ }
+ var match = stream.match(query, false);
+ if (match) {
+ if (match[0].length == 0) {
+ stream.next();
+ return 'searching';
+ }
+ if (!stream.sol()) {
+ stream.backUp(1);
+ if (!query.exec(stream.next() + match[0])) {
+ stream.next();
+ return null;
+ }
+ }
+ stream.match(query);
+ return 'searching';
+ }
+ while (!stream.eol()) {
+ stream.next();
+ if (stream.match(query, false)) break;
+ }
+ },
+ query: query
+ };
+ }
+ function highlightSearchMatches(cm, query) {
+ var searchState = getSearchState(cm);
+ var overlay = searchState.getOverlay();
+ if (!overlay || query != overlay.query) {
+ if (overlay) {
+ cm.removeOverlay(overlay);
+ }
+ overlay = searchOverlay(query);
+ cm.addOverlay(overlay);
+ if (cm.showMatchesOnScrollbar) {
+ if (searchState.getScrollbarAnnotate()) {
+ searchState.getScrollbarAnnotate().clear();
+ }
+ searchState.setScrollbarAnnotate(cm.showMatchesOnScrollbar(query));
+ }
+ searchState.setOverlay(overlay);
+ }
+ }
+ function findNext(cm, prev, query, repeat) {
+ if (repeat === undefined) { repeat = 1; }
+ return cm.operation(function() {
+ var pos = cm.getCursor();
+ var cursor = cm.getSearchCursor(query, pos);
+ for (var i = 0; i < repeat; i++) {
+ var found = cursor.find(prev);
+ if (i == 0 && found && cursorEqual(cursor.from(), pos)) { found = cursor.find(prev); }
+ if (!found) {
+ cursor = cm.getSearchCursor(query,
+ (prev) ? Pos(cm.lastLine()) : Pos(cm.firstLine(), 0) );
+ if (!cursor.find(prev)) {
+ return;
+ }
+ }
+ }
+ return cursor.from();
+ });
+ }
+ function clearSearchHighlight(cm) {
+ var state = getSearchState(cm);
+ cm.removeOverlay(getSearchState(cm).getOverlay());
+ state.setOverlay(null);
+ if (state.getScrollbarAnnotate()) {
+ state.getScrollbarAnnotate().clear();
+ state.setScrollbarAnnotate(null);
+ }
+ }
+ function isInRange(pos, start, end) {
+ if (typeof pos != 'number') {
+ pos = pos.line;
+ }
+ if (start instanceof Array) {
+ return inArray(pos, start);
+ } else {
+ if (end) {
+ return (pos >= start && pos <= end);
+ } else {
+ return pos == start;
+ }
+ }
+ }
+ function getUserVisibleLines(cm) {
+ var renderer = cm.ace.renderer;
+ return {
+ top: renderer.getFirstFullyVisibleRow(),
+ bottom: renderer.getLastFullyVisibleRow()
+ }
+ }
+
+ var ExCommandDispatcher = function() {
+ this.buildCommandMap_();
+ };
+ ExCommandDispatcher.prototype = {
+ processCommand: function(cm, input, opt_params) {
+ var that = this;
+ cm.operation(function () {
+ cm.curOp.isVimOp = true;
+ that._processCommand(cm, input, opt_params);
+ });
+ },
+ _processCommand: function(cm, input, opt_params) {
+ var vim = cm.state.vim;
+ var commandHistoryRegister = vimGlobalState.registerController.getRegister(':');
+ var previousCommand = commandHistoryRegister.toString();
+ if (vim.visualMode) {
+ exitVisualMode(cm);
+ }
+ var inputStream = new CodeMirror.StringStream(input);
+ commandHistoryRegister.setText(input);
+ var params = opt_params || {};
+ params.input = input;
+ try {
+ this.parseInput_(cm, inputStream, params);
+ } catch(e) {
+ showConfirm(cm, e);
+ throw e;
+ }
+ var command;
+ var commandName;
+ if (!params.commandName) {
+ if (params.line !== undefined) {
+ commandName = 'move';
+ }
+ } else {
+ command = this.matchCommand_(params.commandName);
+ if (command) {
+ commandName = command.name;
+ if (command.excludeFromCommandHistory) {
+ commandHistoryRegister.setText(previousCommand);
+ }
+ this.parseCommandArgs_(inputStream, params, command);
+ if (command.type == 'exToKey') {
+ for (var i = 0; i < command.toKeys.length; i++) {
+ CodeMirror.Vim.handleKey(cm, command.toKeys[i], 'mapping');
+ }
+ return;
+ } else if (command.type == 'exToEx') {
+ this.processCommand(cm, command.toInput);
+ return;
+ }
+ }
+ }
+ if (!commandName) {
+ showConfirm(cm, 'Not an editor command ":' + input + '"');
+ return;
+ }
+ try {
+ exCommands[commandName](cm, params);
+ if ((!command || !command.possiblyAsync) && params.callback) {
+ params.callback();
+ }
+ } catch(e) {
+ showConfirm(cm, e);
+ throw e;
+ }
+ },
+ parseInput_: function(cm, inputStream, result) {
+ inputStream.eatWhile(':');
+ if (inputStream.eat('%')) {
+ result.line = cm.firstLine();
+ result.lineEnd = cm.lastLine();
+ } else {
+ result.line = this.parseLineSpec_(cm, inputStream);
+ if (result.line !== undefined && inputStream.eat(',')) {
+ result.lineEnd = this.parseLineSpec_(cm, inputStream);
+ }
+ }
+ var commandMatch = inputStream.match(/^(\w+)/);
+ if (commandMatch) {
+ result.commandName = commandMatch[1];
+ } else {
+ result.commandName = inputStream.match(/.*/)[0];
+ }
+
+ return result;
+ },
+ parseLineSpec_: function(cm, inputStream) {
+ var numberMatch = inputStream.match(/^(\d+)/);
+ if (numberMatch) {
+ return parseInt(numberMatch[1], 10) - 1;
+ }
+ switch (inputStream.next()) {
+ case '.':
+ return cm.getCursor().line;
+ case '$':
+ return cm.lastLine();
+ case '\'':
+ var mark = cm.state.vim.marks[inputStream.next()];
+ if (mark && mark.find()) {
+ return mark.find().line;
+ }
+ throw new Error('Mark not set');
+ default:
+ inputStream.backUp(1);
+ return undefined;
+ }
+ },
+ parseCommandArgs_: function(inputStream, params, command) {
+ if (inputStream.eol()) {
+ return;
+ }
+ params.argString = inputStream.match(/.*/)[0];
+ var delim = command.argDelimiter || /\s+/;
+ var args = trim(params.argString).split(delim);
+ if (args.length && args[0]) {
+ params.args = args;
+ }
+ },
+ matchCommand_: function(commandName) {
+ for (var i = commandName.length; i > 0; i--) {
+ var prefix = commandName.substring(0, i);
+ if (this.commandMap_[prefix]) {
+ var command = this.commandMap_[prefix];
+ if (command.name.indexOf(commandName) === 0) {
+ return command;
+ }
+ }
+ }
+ return null;
+ },
+ buildCommandMap_: function() {
+ this.commandMap_ = {};
+ for (var i = 0; i < defaultExCommandMap.length; i++) {
+ var command = defaultExCommandMap[i];
+ var key = command.shortName || command.name;
+ this.commandMap_[key] = command;
+ }
+ },
+ map: function(lhs, rhs, ctx) {
+ if (lhs != ':' && lhs.charAt(0) == ':') {
+ if (ctx) { throw Error('Mode not supported for ex mappings'); }
+ var commandName = lhs.substring(1);
+ if (rhs != ':' && rhs.charAt(0) == ':') {
+ this.commandMap_[commandName] = {
+ name: commandName,
+ type: 'exToEx',
+ toInput: rhs.substring(1),
+ user: true
+ };
+ } else {
+ this.commandMap_[commandName] = {
+ name: commandName,
+ type: 'exToKey',
+ toKeys: rhs,
+ user: true
+ };
+ }
+ } else {
+ if (rhs != ':' && rhs.charAt(0) == ':') {
+ var mapping = {
+ keys: lhs,
+ type: 'keyToEx',
+ exArgs: { input: rhs.substring(1) },
+ user: true};
+ if (ctx) { mapping.context = ctx; }
+ defaultKeymap.unshift(mapping);
+ } else {
+ var mapping = {
+ keys: lhs,
+ type: 'keyToKey',
+ toKeys: rhs,
+ user: true
+ };
+ if (ctx) { mapping.context = ctx; }
+ defaultKeymap.unshift(mapping);
+ }
+ }
+ },
+ unmap: function(lhs, ctx) {
+ if (lhs != ':' && lhs.charAt(0) == ':') {
+ if (ctx) { throw Error('Mode not supported for ex mappings'); }
+ var commandName = lhs.substring(1);
+ if (this.commandMap_[commandName] && this.commandMap_[commandName].user) {
+ delete this.commandMap_[commandName];
+ return;
+ }
+ } else {
+ var keys = lhs;
+ for (var i = 0; i < defaultKeymap.length; i++) {
+ if (keys == defaultKeymap[i].keys
+ && defaultKeymap[i].context === ctx
+ && defaultKeymap[i].user) {
+ defaultKeymap.splice(i, 1);
+ return;
+ }
+ }
+ }
+ }
+ };
+
+ var exCommands = {
+ colorscheme: function(cm, params) {
+ if (!params.args || params.args.length < 1) {
+ showConfirm(cm, cm.getOption('theme'));
+ return;
+ }
+ cm.setOption('theme', params.args[0]);
+ },
+ map: function(cm, params, ctx) {
+ var mapArgs = params.args;
+ if (!mapArgs || mapArgs.length < 2) {
+ if (cm) {
+ showConfirm(cm, 'Invalid mapping: ' + params.input);
+ }
+ return;
+ }
+ exCommandDispatcher.map(mapArgs[0], mapArgs[1], ctx);
+ },
+ imap: function(cm, params) { this.map(cm, params, 'insert'); },
+ nmap: function(cm, params) { this.map(cm, params, 'normal'); },
+ vmap: function(cm, params) { this.map(cm, params, 'visual'); },
+ unmap: function(cm, params, ctx) {
+ var mapArgs = params.args;
+ if (!mapArgs || mapArgs.length < 1) {
+ if (cm) {
+ showConfirm(cm, 'No such mapping: ' + params.input);
+ }
+ return;
+ }
+ exCommandDispatcher.unmap(mapArgs[0], ctx);
+ },
+ move: function(cm, params) {
+ commandDispatcher.processCommand(cm, cm.state.vim, {
+ type: 'motion',
+ motion: 'moveToLineOrEdgeOfDocument',
+ motionArgs: { forward: false, explicitRepeat: true,
+ linewise: true },
+ repeatOverride: params.line+1});
+ },
+ set: function(cm, params) {
+ var setArgs = params.args;
+ var setCfg = params.setCfg || {};
+ if (!setArgs || setArgs.length < 1) {
+ if (cm) {
+ showConfirm(cm, 'Invalid mapping: ' + params.input);
+ }
+ return;
+ }
+ var expr = setArgs[0].split('=');
+ var optionName = expr[0];
+ var value = expr[1];
+ var forceGet = false;
+
+ if (optionName.charAt(optionName.length - 1) == '?') {
+ if (value) { throw Error('Trailing characters: ' + params.argString); }
+ optionName = optionName.substring(0, optionName.length - 1);
+ forceGet = true;
+ }
+ if (value === undefined && optionName.substring(0, 2) == 'no') {
+ optionName = optionName.substring(2);
+ value = false;
+ }
+
+ var optionIsBoolean = options[optionName] && options[optionName].type == 'boolean';
+ if (optionIsBoolean && value == undefined) {
+ value = true;
+ }
+ if (!optionIsBoolean && value === undefined || forceGet) {
+ var oldValue = getOption(optionName, cm, setCfg);
+ if (oldValue === true || oldValue === false) {
+ showConfirm(cm, ' ' + (oldValue ? '' : 'no') + optionName);
+ } else {
+ showConfirm(cm, ' ' + optionName + '=' + oldValue);
+ }
+ } else {
+ setOption(optionName, value, cm, setCfg);
+ }
+ },
+ setlocal: function (cm, params) {
+ params.setCfg = {scope: 'local'};
+ this.set(cm, params);
+ },
+ setglobal: function (cm, params) {
+ params.setCfg = {scope: 'global'};
+ this.set(cm, params);
+ },
+ registers: function(cm, params) {
+ var regArgs = params.args;
+ var registers = vimGlobalState.registerController.registers;
+ var regInfo = '----------Registers----------<br><br>';
+ if (!regArgs) {
+ for (var registerName in registers) {
+ var text = registers[registerName].toString();
+ if (text.length) {
+ regInfo += '"' + registerName + ' ' + text + '<br>';
+ }
+ }
+ } else {
+ var registerName;
+ regArgs = regArgs.join('');
+ for (var i = 0; i < regArgs.length; i++) {
+ registerName = regArgs.charAt(i);
+ if (!vimGlobalState.registerController.isValidRegister(registerName)) {
+ continue;
+ }
+ var register = registers[registerName] || new Register();
+ regInfo += '"' + registerName + ' ' + register.toString() + '<br>';
+ }
+ }
+ showConfirm(cm, regInfo);
+ },
+ sort: function(cm, params) {
+ var reverse, ignoreCase, unique, number;
+ function parseArgs() {
+ if (params.argString) {
+ var args = new CodeMirror.StringStream(params.argString);
+ if (args.eat('!')) { reverse = true; }
+ if (args.eol()) { return; }
+ if (!args.eatSpace()) { return 'Invalid arguments'; }
+ var opts = args.match(/[a-z]+/);
+ if (opts) {
+ opts = opts[0];
+ ignoreCase = opts.indexOf('i') != -1;
+ unique = opts.indexOf('u') != -1;
+ var decimal = opts.indexOf('d') != -1 && 1;
+ var hex = opts.indexOf('x') != -1 && 1;
+ var octal = opts.indexOf('o') != -1 && 1;
+ if (decimal + hex + octal > 1) { return 'Invalid arguments'; }
+ number = decimal && 'decimal' || hex && 'hex' || octal && 'octal';
+ }
+ if (args.match(/\/.*\//)) { return 'patterns not supported'; }
+ }
+ }
+ var err = parseArgs();
+ if (err) {
+ showConfirm(cm, err + ': ' + params.argString);
+ return;
+ }
+ var lineStart = params.line || cm.firstLine();
+ var lineEnd = params.lineEnd || params.line || cm.lastLine();
+ if (lineStart == lineEnd) { return; }
+ var curStart = Pos(lineStart, 0);
+ var curEnd = Pos(lineEnd, lineLength(cm, lineEnd));
+ var text = cm.getRange(curStart, curEnd).split('\n');
+ var numberRegex = (number == 'decimal') ? /(-?)([\d]+)/ :
+ (number == 'hex') ? /(-?)(?:0x)?([0-9a-f]+)/i :
+ (number == 'octal') ? /([0-7]+)/ : null;
+ var radix = (number == 'decimal') ? 10 : (number == 'hex') ? 16 : (number == 'octal') ? 8 : null;
+ var numPart = [], textPart = [];
+ if (number) {
+ for (var i = 0; i < text.length; i++) {
+ if (numberRegex.exec(text[i])) {
+ numPart.push(text[i]);
+ } else {
+ textPart.push(text[i]);
+ }
+ }
+ } else {
+ textPart = text;
+ }
+ function compareFn(a, b) {
+ if (reverse) { var tmp; tmp = a; a = b; b = tmp; }
+ if (ignoreCase) { a = a.toLowerCase(); b = b.toLowerCase(); }
+ var anum = number && numberRegex.exec(a);
+ var bnum = number && numberRegex.exec(b);
+ if (!anum) { return a < b ? -1 : 1; }
+ anum = parseInt((anum[1] + anum[2]).toLowerCase(), radix);
+ bnum = parseInt((bnum[1] + bnum[2]).toLowerCase(), radix);
+ return anum - bnum;
+ }
+ numPart.sort(compareFn);
+ textPart.sort(compareFn);
+ text = (!reverse) ? textPart.concat(numPart) : numPart.concat(textPart);
+ if (unique) { // Remove duplicate lines
+ var textOld = text;
+ var lastLine;
+ text = [];
+ for (var i = 0; i < textOld.length; i++) {
+ if (textOld[i] != lastLine) {
+ text.push(textOld[i]);
+ }
+ lastLine = textOld[i];
+ }
+ }
+ cm.replaceRange(text.join('\n'), curStart, curEnd);
+ },
+ global: function(cm, params) {
+ var argString = params.argString;
+ if (!argString) {
+ showConfirm(cm, 'Regular Expression missing from global');
+ return;
+ }
+ var lineStart = (params.line !== undefined) ? params.line : cm.firstLine();
+ var lineEnd = params.lineEnd || params.line || cm.lastLine();
+ var tokens = splitBySlash(argString);
+ var regexPart = argString, cmd;
+ if (tokens.length) {
+ regexPart = tokens[0];
+ cmd = tokens.slice(1, tokens.length).join('/');
+ }
+ if (regexPart) {
+ try {
+ updateSearchQuery(cm, regexPart, true /** ignoreCase */,
+ true /** smartCase */);
+ } catch (e) {
+ showConfirm(cm, 'Invalid regex: ' + regexPart);
+ return;
+ }
+ }
+ var query = getSearchState(cm).getQuery();
+ var matchedLines = [], content = '';
+ for (var i = lineStart; i <= lineEnd; i++) {
+ var matched = query.test(cm.getLine(i));
+ if (matched) {
+ matchedLines.push(i+1);
+ content+= cm.getLine(i) + '<br>';
+ }
+ }
+ if (!cmd) {
+ showConfirm(cm, content);
+ return;
+ }
+ var index = 0;
+ var nextCommand = function() {
+ if (index < matchedLines.length) {
+ var command = matchedLines[index] + cmd;
+ exCommandDispatcher.processCommand(cm, command, {
+ callback: nextCommand
+ });
+ }
+ index++;
+ };
+ nextCommand();
+ },
+ substitute: function(cm, params) {
+ if (!cm.getSearchCursor) {
+ throw new Error('Search feature not available. Requires searchcursor.js or ' +
+ 'any other getSearchCursor implementation.');
+ }
+ var argString = params.argString;
+ var tokens = argString ? splitBySlash(argString) : [];
+ var regexPart, replacePart = '', trailing, flagsPart, count;
+ var confirm = false; // Whether to confirm each replace.
+ var global = false; // True to replace all instances on a line, false to replace only 1.
+ if (tokens.length) {
+ regexPart = tokens[0];
+ replacePart = tokens[1];
+ if (replacePart !== undefined) {
+ if (getOption('pcre')) {
+ replacePart = unescapeRegexReplace(replacePart);
+ } else {
+ replacePart = translateRegexReplace(replacePart);
+ }
+ vimGlobalState.lastSubstituteReplacePart = replacePart;
+ }
+ trailing = tokens[2] ? tokens[2].split(' ') : [];
+ } else {
+ if (argString && argString.length) {
+ showConfirm(cm, 'Substitutions should be of the form ' +
+ ':s/pattern/replace/');
+ return;
+ }
+ }
+ if (trailing) {
+ flagsPart = trailing[0];
+ count = parseInt(trailing[1]);
+ if (flagsPart) {
+ if (flagsPart.indexOf('c') != -1) {
+ confirm = true;
+ flagsPart.replace('c', '');
+ }
+ if (flagsPart.indexOf('g') != -1) {
+ global = true;
+ flagsPart.replace('g', '');
+ }
+ regexPart = regexPart + '/' + flagsPart;
+ }
+ }
+ if (regexPart) {
+ try {
+ updateSearchQuery(cm, regexPart, true /** ignoreCase */,
+ true /** smartCase */);
+ } catch (e) {
+ showConfirm(cm, 'Invalid regex: ' + regexPart);
+ return;
+ }
+ }
+ replacePart = replacePart || vimGlobalState.lastSubstituteReplacePart;
+ if (replacePart === undefined) {
+ showConfirm(cm, 'No previous substitute regular expression');
+ return;
+ }
+ var state = getSearchState(cm);
+ var query = state.getQuery();
+ var lineStart = (params.line !== undefined) ? params.line : cm.getCursor().line;
+ var lineEnd = params.lineEnd || lineStart;
+ if (lineStart == cm.firstLine() && lineEnd == cm.lastLine()) {
+ lineEnd = Infinity;
+ }
+ if (count) {
+ lineStart = lineEnd;
+ lineEnd = lineStart + count - 1;
+ }
+ var startPos = clipCursorToContent(cm, Pos(lineStart, 0));
+ var cursor = cm.getSearchCursor(query, startPos);
+ doReplace(cm, confirm, global, lineStart, lineEnd, cursor, query, replacePart, params.callback);
+ },
+ redo: CodeMirror.commands.redo,
+ undo: CodeMirror.commands.undo,
+ write: function(cm) {
+ if (CodeMirror.commands.save) {
+ CodeMirror.commands.save(cm);
+ } else {
+ cm.save();
+ }
+ },
+ nohlsearch: function(cm) {
+ clearSearchHighlight(cm);
+ },
+ delmarks: function(cm, params) {
+ if (!params.argString || !trim(params.argString)) {
+ showConfirm(cm, 'Argument required');
+ return;
+ }
+
+ var state = cm.state.vim;
+ var stream = new CodeMirror.StringStream(trim(params.argString));
+ while (!stream.eol()) {
+ stream.eatSpace();
+ var count = stream.pos;
+
+ if (!stream.match(/[a-zA-Z]/, false)) {
+ showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));
+ return;
+ }
+
+ var sym = stream.next();
+ if (stream.match('-', true)) {
+ if (!stream.match(/[a-zA-Z]/, false)) {
+ showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));
+ return;
+ }
+
+ var startMark = sym;
+ var finishMark = stream.next();
+ if (isLowerCase(startMark) && isLowerCase(finishMark) ||
+ isUpperCase(startMark) && isUpperCase(finishMark)) {
+ var start = startMark.charCodeAt(0);
+ var finish = finishMark.charCodeAt(0);
+ if (start >= finish) {
+ showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count));
+ return;
+ }
+ for (var j = 0; j <= finish - start; j++) {
+ var mark = String.fromCharCode(start + j);
+ delete state.marks[mark];
+ }
+ } else {
+ showConfirm(cm, 'Invalid argument: ' + startMark + '-');
+ return;
+ }
+ } else {
+ delete state.marks[sym];
+ }
+ }
+ }
+ };
+
+ var exCommandDispatcher = new ExCommandDispatcher();
+ function doReplace(cm, confirm, global, lineStart, lineEnd, searchCursor, query,
+ replaceWith, callback) {
+ cm.state.vim.exMode = true;
+ var done = false;
+ var lastPos = searchCursor.from();
+ function replaceAll() {
+ cm.operation(function() {
+ while (!done) {
+ replace();
+ next();
+ }
+ stop();
+ });
+ }
+ function replace() {
+ var text = cm.getRange(searchCursor.from(), searchCursor.to());
+ var newText = text.replace(query, replaceWith);
+ searchCursor.replace(newText);
+ }
+ function next() {
+ while(searchCursor.findNext() &&
+ isInRange(searchCursor.from(), lineStart, lineEnd)) {
+ if (!global && lastPos && searchCursor.from().line == lastPos.line) {
+ continue;
+ }
+ cm.scrollIntoView(searchCursor.from(), 30);
+ cm.setSelection(searchCursor.from(), searchCursor.to());
+ lastPos = searchCursor.from();
+ done = false;
+ return;
+ }
+ done = true;
+ }
+ function stop(close) {
+ if (close) { close(); }
+ cm.focus();
+ if (lastPos) {
+ cm.setCursor(lastPos);
+ var vim = cm.state.vim;
+ vim.exMode = false;
+ vim.lastHPos = vim.lastHSPos = lastPos.ch;
+ }
+ if (callback) { callback(); }
+ }
+ function onPromptKeyDown(e, _value, close) {
+ CodeMirror.e_stop(e);
+ var keyName = CodeMirror.keyName(e);
+ switch (keyName) {
+ case 'Y':
+ replace(); next(); break;
+ case 'N':
+ next(); break;
+ case 'A':
+ var savedCallback = callback;
+ callback = undefined;
+ cm.operation(replaceAll);
+ callback = savedCallback;
+ break;
+ case 'L':
+ replace();
+ case 'Q':
+ case 'Esc':
+ case 'Ctrl-C':
+ case 'Ctrl-[':
+ stop(close);
+ break;
+ }
+ if (done) { stop(close); }
+ return true;
+ }
+ next();
+ if (done) {
+ showConfirm(cm, 'No matches for ' + query.source);
+ return;
+ }
+ if (!confirm) {
+ replaceAll();
+ if (callback) { callback(); }
+ return;
+ }
+ showPrompt(cm, {
+ prefix: 'replace with <strong>' + replaceWith + '</strong> (y/n/a/q/l)',
+ onKeyDown: onPromptKeyDown
+ });
+ }
+
+ CodeMirror.keyMap.vim = {
+ attach: attachVimMap,
+ detach: detachVimMap,
+ call: cmKey
+ };
+
+ function exitInsertMode(cm) {
+ var vim = cm.state.vim;
+ var macroModeState = vimGlobalState.macroModeState;
+ var insertModeChangeRegister = vimGlobalState.registerController.getRegister('.');
+ var isPlaying = macroModeState.isPlaying;
+ var lastChange = macroModeState.lastInsertModeChanges;
+ var text = [];
+ if (!isPlaying) {
+ var selLength = lastChange.inVisualBlock ? vim.lastSelection.visualBlock.height : 1;
+ var changes = lastChange.changes;
+ var text = [];
+ var i = 0;
+ while (i < changes.length) {
+ text.push(changes[i]);
+ if (changes[i] instanceof InsertModeKey) {
+ i++;
+ } else {
+ i+= selLength;
+ }
+ }
+ lastChange.changes = text;
+ cm.off('change', onChange);
+ CodeMirror.off(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown);
+ }
+ if (!isPlaying && vim.insertModeRepeat > 1) {
+ repeatLastEdit(cm, vim, vim.insertModeRepeat - 1,
+ true /** repeatForInsert */);
+ vim.lastEditInputState.repeatOverride = vim.insertModeRepeat;
+ }
+ delete vim.insertModeRepeat;
+ vim.insertMode = false;
+ cm.setCursor(cm.getCursor().line, cm.getCursor().ch-1);
+ cm.setOption('keyMap', 'vim');
+ cm.setOption('disableInput', true);
+
+ lastChange.overwrite = cm.state.overwrite;
+ cm.toggleOverwrite(false); // exit replace mode if we were in it.
+ insertModeChangeRegister.setText(lastChange.changes.join(''));
+ CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"});
+ if (macroModeState.isRecording) {
+ logInsertModeChange(macroModeState);
+ }
+ }
+
+ function _mapCommand(command) {
+ defaultKeymap.unshift(command);
+ }
+
+ function mapCommand(keys, type, name, args, extra) {
+ var command = {keys: keys, type: type};
+ command[type] = name;
+ command[type + "Args"] = args;
+ for (var key in extra)
+ command[key] = extra[key];
+ _mapCommand(command);
+ }
+ defineOption('insertModeEscKeysTimeout', 200, 'number');
+
+ CodeMirror.keyMap['vim-insert'] = {
+ 'Ctrl-N': 'autocomplete',
+ 'Ctrl-P': 'autocomplete',
+ 'Enter': function(cm) {
+ var fn = CodeMirror.commands.newlineAndIndentContinueComment ||
+ CodeMirror.commands.newlineAndIndent;
+ fn(cm);
+ },
+ fallthrough: ['default'],
+ attach: attachVimMap,
+ detach: detachVimMap,
+ call: cmKey
+ };
+
+ CodeMirror.keyMap['vim-replace'] = {
+ 'Backspace': 'goCharLeft',
+ fallthrough: ['vim-insert'],
+ attach: attachVimMap,
+ detach: detachVimMap,
+ call: cmKey
+ };
+
+ function executeMacroRegister(cm, vim, macroModeState, registerName) {
+ var register = vimGlobalState.registerController.getRegister(registerName);
+ if (registerName == ':') {
+ if (register.keyBuffer[0]) {
+ exCommandDispatcher.processCommand(cm, register.keyBuffer[0]);
+ }
+ macroModeState.isPlaying = false;
+ return;
+ }
+ var keyBuffer = register.keyBuffer;
+ var imc = 0;
+ macroModeState.isPlaying = true;
+ macroModeState.replaySearchQueries = register.searchQueries.slice(0);
+ for (var i = 0; i < keyBuffer.length; i++) {
+ var text = keyBuffer[i];
+ var match, key;
+ while (text) {
+ match = (/<\w+-.+?>|<\w+>|./).exec(text);
+ key = match[0];
+ text = text.substring(match.index + key.length);
+ CodeMirror.Vim.handleKey(cm, key, 'macro');
+ if (vim.insertMode) {
+ var changes = register.insertModeChanges[imc++].changes;
+ vimGlobalState.macroModeState.lastInsertModeChanges.changes =
+ changes;
+ repeatInsertModeChanges(cm, changes, 1);
+ exitInsertMode(cm);
+ }
+ }
+ }
+ macroModeState.isPlaying = false;
+ }
+
+ function logKey(macroModeState, key) {
+ if (macroModeState.isPlaying) { return; }
+ var registerName = macroModeState.latestRegister;
+ var register = vimGlobalState.registerController.getRegister(registerName);
+ if (register) {
+ register.pushText(key);
+ }
+ }
+
+ function logInsertModeChange(macroModeState) {
+ if (macroModeState.isPlaying) { return; }
+ var registerName = macroModeState.latestRegister;
+ var register = vimGlobalState.registerController.getRegister(registerName);
+ if (register && register.pushInsertModeChanges) {
+ register.pushInsertModeChanges(macroModeState.lastInsertModeChanges);
+ }
+ }
+
+ function logSearchQuery(macroModeState, query) {
+ if (macroModeState.isPlaying) { return; }
+ var registerName = macroModeState.latestRegister;
+ var register = vimGlobalState.registerController.getRegister(registerName);
+ if (register && register.pushSearchQuery) {
+ register.pushSearchQuery(query);
+ }
+ }
+ function onChange(_cm, changeObj) {
+ var macroModeState = vimGlobalState.macroModeState;
+ var lastChange = macroModeState.lastInsertModeChanges;
+ if (!macroModeState.isPlaying) {
+ while(changeObj) {
+ lastChange.expectCursorActivityForChange = true;
+ if (changeObj.origin == '+input' || changeObj.origin == 'paste'
+ || changeObj.origin === undefined /* only in testing */) {
+ var text = changeObj.text.join('\n');
+ if (lastChange.maybeReset) {
+ lastChange.changes = [];
+ lastChange.maybeReset = false;
+ }
+ lastChange.changes.push(text);
+ }
+ changeObj = changeObj.next;
+ }
+ }
+ }
+ function onCursorActivity(cm) {
+ var vim = cm.state.vim;
+ if (vim.insertMode) {
+ var macroModeState = vimGlobalState.macroModeState;
+ if (macroModeState.isPlaying) { return; }
+ var lastChange = macroModeState.lastInsertModeChanges;
+ if (lastChange.expectCursorActivityForChange) {
+ lastChange.expectCursorActivityForChange = false;
+ } else {
+ lastChange.maybeReset = true;
+ }
+ } else if (!cm.curOp.isVimOp) {
+ handleExternalSelection(cm, vim);
+ }
+ if (vim.visualMode) {
+ updateFakeCursor(cm);
+ }
+ }
+ function updateFakeCursor(cm) {
+ var vim = cm.state.vim;
+ var from = clipCursorToContent(cm, copyCursor(vim.sel.head));
+ var to = offsetCursor(from, 0, 1);
+ if (vim.fakeCursor) {
+ vim.fakeCursor.clear();
+ }
+ vim.fakeCursor = cm.markText(from, to, {className: 'cm-animate-fat-cursor'});
+ }
+ function handleExternalSelection(cm, vim) {
+ var anchor = cm.getCursor('anchor');
+ var head = cm.getCursor('head');
+ if (vim.visualMode && !cm.somethingSelected()) {
+ exitVisualMode(cm, false);
+ } else if (!vim.visualMode && !vim.insertMode && cm.somethingSelected()) {
+ vim.visualMode = true;
+ vim.visualLine = false;
+ CodeMirror.signal(cm, "vim-mode-change", {mode: "visual"});
+ }
+ if (vim.visualMode) {
+ var headOffset = !cursorIsBefore(head, anchor) ? -1 : 0;
+ var anchorOffset = cursorIsBefore(head, anchor) ? -1 : 0;
+ head = offsetCursor(head, 0, headOffset);
+ anchor = offsetCursor(anchor, 0, anchorOffset);
+ vim.sel = {
+ anchor: anchor,
+ head: head
+ };
+ updateMark(cm, vim, '<', cursorMin(head, anchor));
+ updateMark(cm, vim, '>', cursorMax(head, anchor));
+ } else if (!vim.insertMode) {
+ vim.lastHPos = cm.getCursor().ch;
+ }
+ }
+ function InsertModeKey(keyName) {
+ this.keyName = keyName;
+ }
+ function onKeyEventTargetKeyDown(e) {
+ var macroModeState = vimGlobalState.macroModeState;
+ var lastChange = macroModeState.lastInsertModeChanges;
+ var keyName = CodeMirror.keyName(e);
+ if (!keyName) { return; }
+ function onKeyFound() {
+ if (lastChange.maybeReset) {
+ lastChange.changes = [];
+ lastChange.maybeReset = false;
+ }
+ lastChange.changes.push(new InsertModeKey(keyName));
+ return true;
+ }
+ if (keyName.indexOf('Delete') != -1 || keyName.indexOf('Backspace') != -1) {
+ CodeMirror.lookupKey(keyName, 'vim-insert', onKeyFound);
+ }
+ }
+ function repeatLastEdit(cm, vim, repeat, repeatForInsert) {
+ var macroModeState = vimGlobalState.macroModeState;
+ macroModeState.isPlaying = true;
+ var isAction = !!vim.lastEditActionCommand;
+ var cachedInputState = vim.inputState;
+ function repeatCommand() {
+ if (isAction) {
+ commandDispatcher.processAction(cm, vim, vim.lastEditActionCommand);
+ } else {
+ commandDispatcher.evalInput(cm, vim);
+ }
+ }
+ function repeatInsert(repeat) {
+ if (macroModeState.lastInsertModeChanges.changes.length > 0) {
+ repeat = !vim.lastEditActionCommand ? 1 : repeat;
+ var changeObject = macroModeState.lastInsertModeChanges;
+ repeatInsertModeChanges(cm, changeObject.changes, repeat, changeObject.overwrite);
+ }
+ }
+ vim.inputState = vim.lastEditInputState;
+ if (isAction && vim.lastEditActionCommand.interlaceInsertRepeat) {
+ for (var i = 0; i < repeat; i++) {
+ repeatCommand();
+ repeatInsert(1);
+ }
+ } else {
+ if (!repeatForInsert) {
+ repeatCommand();
+ }
+ repeatInsert(repeat);
+ }
+ vim.inputState = cachedInputState;
+ if (vim.insertMode && !repeatForInsert) {
+ exitInsertMode(cm);
+ }
+ macroModeState.isPlaying = false;
+ }
+
+ function repeatInsertModeChanges(cm, changes, repeat, overwrite) {
+ function keyHandler(binding) {
+ if (typeof binding == 'string') {
+ CodeMirror.commands[binding](cm);
+ } else {
+ binding(cm);
+ }
+ return true;
+ }
+ var head = cm.getCursor('head');
+ var inVisualBlock = vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock;
+ if (inVisualBlock) {
+ var vim = cm.state.vim;
+ var lastSel = vim.lastSelection;
+ var offset = getOffset(lastSel.anchor, lastSel.head);
+ selectForInsert(cm, head, offset.line + 1);
+ repeat = cm.listSelections().length;
+ cm.setCursor(head);
+ }
+ for (var i = 0; i < repeat; i++) {
+ if (inVisualBlock) {
+ cm.setCursor(offsetCursor(head, i, 0));
+ }
+ for (var j = 0; j < changes.length; j++) {
+ var change = changes[j];
+ if (change instanceof InsertModeKey) {
+ CodeMirror.lookupKey(change.keyName, 'vim-insert', keyHandler);
+ } else {
+ var cur = cm.getCursor();
+ var end = cur;
+ if (overwrite && !/\n/.test(change)) {
+ end = offsetCursor(cur, 0, change.length);
+ }
+ cm.replaceRange(change, cur, end);
+ }
+ }
+ }
+ if (inVisualBlock) {
+ cm.setCursor(offsetCursor(head, 0, 1));
+ }
+ }
+
+ resetVimGlobalState();
+ CodeMirror.Vim = Vim();
+
+ Vim = CodeMirror.Vim;
+
+ var specialKey = {'return':'CR',backspace:'BS','delete':'Del',esc:'Esc',
+ left:'Left',right:'Right',up:'Up',down:'Down',space: 'Space',
+ home:'Home',end:'End',pageup:'PageUp',pagedown:'PageDown', enter: 'CR'
+ };
+ function lookupKey(hashId, key, e) {
+ if (key.length > 1 && key[0] == "n") {
+ key = key.replace("numpad", "");
+ }
+ key = specialKey[key] || key;
+ var name = '';
+ if (e.ctrlKey) { name += 'C-'; }
+ if (e.altKey) { name += 'A-'; }
+ if (e.shiftKey) { name += 'S-'; }
+
+ name += key;
+ if (name.length > 1) { name = '<' + name + '>'; }
+ return name;
+ }
+ var handleKey = Vim.handleKey.bind(Vim);
+ Vim.handleKey = function(cm, key, origin) {
+ return cm.operation(function() {
+ return handleKey(cm, key, origin);
+ }, true);
+ }
+ function cloneVimState(state) {
+ var n = new state.constructor();
+ Object.keys(state).forEach(function(key) {
+ var o = state[key];
+ if (Array.isArray(o))
+ o = o.slice();
+ else if (o && typeof o == "object" && o.constructor != Object)
+ o = cloneVimState(o);
+ n[key] = o;
+ });
+ if (state.sel) {
+ n.sel = {
+ head: state.sel.head && copyCursor(state.sel.head),
+ anchor: state.sel.anchor && copyCursor(state.sel.anchor)
+ };
+ }
+ return n;
+ }
+ function multiSelectHandleKey(cm, key, origin) {
+ var isHandled = false;
+ var vim = Vim.maybeInitVimState_(cm);
+ var visualBlock = vim.visualBlock || vim.wasInVisualBlock;
+ if (vim.wasInVisualBlock && !cm.ace.inMultiSelectMode) {
+ vim.wasInVisualBlock = false;
+ } else if (cm.ace.inMultiSelectMode && vim.visualBlock) {
+ vim.wasInVisualBlock = true;
+ }
+
+ if (key == '<Esc>' && !vim.insertMode && !vim.visualMode && cm.ace.inMultiSelectMode) {
+ cm.ace.exitMultiSelectMode();
+ } else if (visualBlock || !cm.ace.inMultiSelectMode || cm.ace.inVirtualSelectionMode) {
+ isHandled = Vim.handleKey(cm, key, origin);
+ } else {
+ var old = cloneVimState(vim);
+ cm.operation(function() {
+ cm.ace.forEachSelection(function() {
+ var sel = cm.ace.selection;
+ cm.state.vim.lastHPos = sel.$desiredColumn == null ? sel.lead.column : sel.$desiredColumn;
+ var head = cm.getCursor("head");
+ var anchor = cm.getCursor("anchor");
+ var headOffset = !cursorIsBefore(head, anchor) ? -1 : 0;
+ var anchorOffset = cursorIsBefore(head, anchor) ? -1 : 0;
+ head = offsetCursor(head, 0, headOffset);
+ anchor = offsetCursor(anchor, 0, anchorOffset);
+ cm.state.vim.sel.head = head;
+ cm.state.vim.sel.anchor = anchor;
+
+ isHandled = handleKey(cm, key, origin);
+ sel.$desiredColumn = cm.state.vim.lastHPos == -1 ? null : cm.state.vim.lastHPos;
+ if (cm.virtualSelectionMode()) {
+ cm.state.vim = cloneVimState(old);
+ }
+ });
+ if (cm.curOp.cursorActivity && !isHandled)
+ cm.curOp.cursorActivity = false;
+ }, true);
+ }
+ return isHandled;
+ }
+ exports.CodeMirror = CodeMirror;
+ var getVim = Vim.maybeInitVimState_;
+ exports.handler = {
+ $id: "ace/keyboard/vim",
+ drawCursor: function(style, pixelPos, config, sel, session) {
+ var vim = this.state.vim || {};
+ var w = config.characterWidth;
+ var h = config.lineHeight;
+ var top = pixelPos.top;
+ var left = pixelPos.left;
+ if (!vim.insertMode) {
+ var isbackwards = !sel.cursor
+ ? session.selection.isBackwards() || session.selection.isEmpty()
+ : Range.comparePoints(sel.cursor, sel.start) <= 0;
+ if (!isbackwards && left > w)
+ left -= w;
+ }
+ if (!vim.insertMode && vim.status) {
+ h = h / 2;
+ top += h;
+ }
+ style.left = left + "px";
+ style.top = top + "px";
+ style.width = w + "px";
+ style.height = h + "px";
+ },
+ handleKeyboard: function(data, hashId, key, keyCode, e) {
+ var editor = data.editor;
+ var cm = editor.state.cm;
+ var vim = getVim(cm);
+ if (keyCode == -1) return;
+
+ if (key == "c" && hashId == 1) { // key == "ctrl-c"
+ if (!useragent.isMac && editor.getCopyText()) {
+ editor.once("copy", function() {
+ editor.selection.clearSelection();
+ });
+ return {command: "null", passEvent: true};
+ }
+ } else if (!vim.insertMode) {
+ if (useragent.isMac && this.handleMacRepeat(data, hashId, key)) {
+ hashId = -1;
+ key = data.inputChar;
+ }
+ }
+
+ if (hashId == -1 || hashId & 1 || hashId === 0 && key.length > 1) {
+ var insertMode = vim.insertMode;
+ var name = lookupKey(hashId, key, e || {});
+ if (vim.status == null)
+ vim.status = "";
+ var isHandled = multiSelectHandleKey(cm, name, 'user');
+ vim = getVim(cm); // may be changed by multiSelectHandleKey
+ if (isHandled && vim.status != null)
+ vim.status += name;
+ else if (vim.status == null)
+ vim.status = "";
+ cm._signal("changeStatus");
+ if (!isHandled && (hashId != -1 || insertMode))
+ return;
+ return {command: "null", passEvent: !isHandled};
+ }
+ },
+ attach: function(editor) {
+ if (!editor.state) editor.state = {};
+ var cm = new CodeMirror(editor);
+ editor.state.cm = cm;
+ editor.$vimModeHandler = this;
+ CodeMirror.keyMap.vim.attach(cm);
+ getVim(cm).status = null;
+ cm.on('vim-command-done', function() {
+ if (cm.virtualSelectionMode()) return;
+ getVim(cm).status = null;
+ cm.ace._signal("changeStatus");
+ cm.ace.session.markUndoGroup();
+ });
+ cm.on("changeStatus", function() {
+ cm.ace.renderer.updateCursor();
+ cm.ace._signal("changeStatus");
+ });
+ cm.on("vim-mode-change", function() {
+ if (cm.virtualSelectionMode()) return;
+ cm.ace.renderer.setStyle("normal-mode", !getVim(cm).insertMode);
+ cm._signal("changeStatus");
+ });
+ cm.ace.renderer.setStyle("normal-mode", !getVim(cm).insertMode);
+ editor.renderer.$cursorLayer.drawCursor = this.drawCursor.bind(cm);
+ this.updateMacCompositionHandlers(editor, true);
+ },
+ detach: function(editor) {
+ var cm = editor.state.cm;
+ CodeMirror.keyMap.vim.detach(cm);
+ cm.destroy();
+ editor.state.cm = null;
+ editor.$vimModeHandler = null;
+ editor.renderer.$cursorLayer.drawCursor = null;
+ editor.renderer.setStyle("normal-mode", false);
+ this.updateMacCompositionHandlers(editor, false);
+ },
+ getStatusText: function(editor) {
+ var cm = editor.state.cm;
+ var vim = getVim(cm);
+ if (vim.insertMode)
+ return "INSERT";
+ var status = "";
+ if (vim.visualMode) {
+ status += "VISUAL";
+ if (vim.visualLine)
+ status += " LINE";
+ if (vim.visualBlock)
+ status += " BLOCK";
+ }
+ if (vim.status)
+ status += (status ? " " : "") + vim.status;
+ return status;
+ },
+ 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";
+ }
+ },
+ updateMacCompositionHandlers: function(editor, enable) {
+ var onCompositionUpdateOverride = function(text) {
+ var cm = editor.state.cm;
+ var vim = getVim(cm);
+ if (!vim.insertMode) {
+ var el = this.textInput.getElement();
+ el.blur();
+ el.focus();
+ el.value = text;
+ } else {
+ this.onCompositionUpdateOrig(text);
+ }
+ };
+ var onCompositionStartOverride = function(text) {
+ var cm = editor.state.cm;
+ var vim = getVim(cm);
+ if (!vim.insertMode) {
+ this.onCompositionStartOrig(text);
+ }
+ };
+ if (enable) {
+ if (!editor.onCompositionUpdateOrig) {
+ editor.onCompositionUpdateOrig = editor.onCompositionUpdate;
+ editor.onCompositionUpdate = onCompositionUpdateOverride;
+ editor.onCompositionStartOrig = editor.onCompositionStart;
+ editor.onCompositionStart = onCompositionStartOverride;
+ }
+ } else {
+ if (editor.onCompositionUpdateOrig) {
+ editor.onCompositionUpdate = editor.onCompositionUpdateOrig;
+ editor.onCompositionUpdateOrig = null;
+ editor.onCompositionStart = editor.onCompositionStartOrig;
+ editor.onCompositionStartOrig = null;
+ }
+ }
+ }
+ };
+ var renderVirtualNumbers = {
+ getText: function(session, row) {
+ return (Math.abs(session.selection.lead.row - row) || (row + 1 + (row < 9? "\xb7" : "" ))) + "";
+ },
+ getWidth: function(session, lastLineNumber, config) {
+ return session.getLength().toString().length * config.characterWidth;
+ },
+ update: function(e, editor) {
+ editor.renderer.$loop.schedule(editor.renderer.CHANGE_GUTTER);
+ },
+ attach: function(editor) {
+ editor.renderer.$gutterLayer.$renderer = this;
+ editor.on("changeSelection", this.update);
+ },
+ detach: function(editor) {
+ editor.renderer.$gutterLayer.$renderer = null;
+ editor.off("changeSelection", this.update);
+ }
+ };
+ Vim.defineOption({
+ name: "wrap",
+ set: function(value, cm) {
+ if (cm) {cm.ace.setOption("wrap", value)}
+ },
+ type: "boolean"
+ }, false);
+ Vim.defineEx('write', 'w', function() {
+ console.log(':write is not implemented')
+ });
+ defaultKeymap.push(
+ { keys: 'zc', type: 'action', action: 'fold', actionArgs: { open: false } },
+ { keys: 'zC', type: 'action', action: 'fold', actionArgs: { open: false, all: true } },
+ { keys: 'zo', type: 'action', action: 'fold', actionArgs: { open: true } },
+ { keys: 'zO', type: 'action', action: 'fold', actionArgs: { open: true, all: true } },
+ { keys: 'za', type: 'action', action: 'fold', actionArgs: { toggle: true } },
+ { keys: 'zA', type: 'action', action: 'fold', actionArgs: { toggle: true, all: true } },
+ { keys: 'zf', type: 'action', action: 'fold', actionArgs: { open: true, all: true } },
+ { keys: 'zd', type: 'action', action: 'fold', actionArgs: { open: true, all: true } },
+
+ { keys: '<C-A-k>', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorAbove" } },
+ { keys: '<C-A-j>', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorBelow" } },
+ { keys: '<C-A-S-k>', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorAboveSkipCurrent" } },
+ { keys: '<C-A-S-j>', type: 'action', action: 'aceCommand', actionArgs: { name: "addCursorBelowSkipCurrent" } },
+ { keys: '<C-A-h>', type: 'action', action: 'aceCommand', actionArgs: { name: "selectMoreBefore" } },
+ { keys: '<C-A-l>', type: 'action', action: 'aceCommand', actionArgs: { name: "selectMoreAfter" } },
+ { keys: '<C-A-S-h>', type: 'action', action: 'aceCommand', actionArgs: { name: "selectNextBefore" } },
+ { keys: '<C-A-S-l>', type: 'action', action: 'aceCommand', actionArgs: { name: "selectNextAfter" } }
+ );
+ actions.aceCommand = function(cm, actionArgs, vim) {
+ cm.vimCmd = actionArgs;
+ if (cm.ace.inVirtualSelectionMode)
+ cm.ace.on("beforeEndOperation", delayedExecAceCommand);
+ else
+ delayedExecAceCommand(null, cm.ace);
+ };
+ function delayedExecAceCommand(op, ace) {
+ ace.off("beforeEndOperation", delayedExecAceCommand);
+ var cmd = ace.state.cm.vimCmd;
+ if (cmd) {
+ ace.execCommand(cmd.exec ? cmd : cmd.name, cmd.args);
+ }
+ ace.curOp = ace.prevOp;
+ }
+ actions.fold = function(cm, actionArgs, vim) {
+ cm.ace.execCommand(['toggleFoldWidget', 'toggleFoldWidget', 'foldOther', 'unfoldall'
+ ][(actionArgs.all ? 2 : 0) + (actionArgs.open ? 1 : 0)]);
+ };
+
+ exports.handler.defaultKeymap = defaultKeymap;
+ exports.handler.actions = actions;
+ exports.Vim = Vim;
+
+ Vim.map("Y", "yy", "normal");
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-abap.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-abap.js
new file mode 100644
index 00000000..343481fe
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-abap.js
@@ -0,0 +1,214 @@
+ace.define("ace/mode/abap_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 AbapHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "this",
+ "keyword":
+ "ADD ALIAS ALIASES ASCENDING 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 DESCENDING 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 RETURN 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 : "\\b\\w+\\b"},
+ {caseInsensitive: true}
+ ],
+ "qstring" : [
+ {token : "constant.language.escape", regex : "''"},
+ {token : "string", regex : "'", next : "start"},
+ {defaultToken : "string"}
+ ],
+ "string" : [
+ {token : "constant.language.escape", regex : "``"},
+ {token : "string", regex : "`", next : "start"},
+ {defaultToken : "string"}
+ ]
+ };
+};
+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) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/abap",["require","exports","module","ace/mode/abap_highlight_rules","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/lib/oop"], function(require, exports, module) {
+"use strict";
+
+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.HighlightRules = Rules;
+ this.foldingRules = new FoldMode();
+}
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = '"'
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ return indent;
+ };
+
+ this.$id = "ace/mode/abap";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-abc.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-abc.js
new file mode 100644
index 00000000..c03859db
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-abc.js
@@ -0,0 +1,261 @@
+ace.define("ace/mode/abc_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 ABCHighlightRules = function () {
+
+ this.$rules = {
+ start: [
+ {
+ token: ['zupfnoter.information.comment.line.percentage', 'information.keyword', 'in formation.keyword.embedded'],
+ regex: '(%%%%)(hn\\.[a-z]*)(.*)',
+ comment: 'Instruction Comment'
+ },
+ {
+ token: ['information.comment.line.percentage', 'information.keyword.embedded'],
+ regex: '(%%)(.*)',
+ comment: 'Instruction Comment'
+ },
+
+ {
+ token: 'comment.line.percentage',
+ regex: '%.*',
+ comment: 'Comments'
+ },
+
+ {
+ token: 'barline.keyword.operator',
+ regex: '[\\[:]*[|:][|\\]:]*(?:\\[?[0-9]+)?|\\[[0-9]+',
+ comment: 'Bar lines'
+ },
+ {
+ token: ['information.keyword.embedded', 'information.argument.string.unquoted'],
+ regex: '(\\[[A-Za-z]:)([^\\]]*\\])',
+ comment: 'embedded Header lines'
+ },
+ {
+ token: ['information.keyword', 'information.argument.string.unquoted'],
+ regex: '^([A-Za-z]:)([^%\\\\]*)',
+ comment: 'Header lines'
+ },
+ {
+ token: ['text', 'entity.name.function', 'string.unquoted', 'text'],
+ regex: '(\\[)([A-Z]:)(.*?)(\\])',
+ comment: 'Inline fields'
+ },
+ {
+ token: ['accent.constant.language', 'pitch.constant.numeric', 'duration.constant.numeric'],
+ regex: '([\\^=_]*)([A-Ga-gz][,\']*)([0-9]*/*[><0-9]*)',
+ comment: 'Notes'
+ },
+ {
+ token: 'zupfnoter.jumptarget.string.quoted',
+ regex: '[\\"!]\\^\\:.*?[\\"!]',
+ comment: 'Zupfnoter jumptarget'
+ }, {
+ token: 'zupfnoter.goto.string.quoted',
+ regex: '[\\"!]\\^\\@.*?[\\"!]',
+ comment: 'Zupfnoter goto'
+ },
+ {
+ token: 'zupfnoter.annotation.string.quoted',
+ regex: '[\\"!]\\^\\!.*?[\\"!]',
+ comment: 'Zupfnoter annoation'
+ },
+ {
+ token: 'zupfnoter.annotationref.string.quoted',
+ regex: '[\\"!]\\^\\#.*?[\\"!]',
+ comment: 'Zupfnoter annotation reference'
+ },
+ {
+ token: 'chordname.string.quoted',
+ regex: '[\\"!]\\^.*?[\\"!]',
+ comment: 'abc chord'
+ },
+ {
+ token: 'string.quoted',
+ regex: '[\\"!].*?[\\"!]',
+ comment: 'abc annotation'
+ }
+
+ ]
+ };
+
+ this.normalizeRules();
+ };
+
+ ABCHighlightRules.metaData = {
+ fileTypes: ['abc'],
+ name: 'ABC',
+ scopeName: 'text.abcnotation'
+ };
+
+
+ oop.inherits(ABCHighlightRules, TextHighlightRules);
+
+ exports.ABCHighlightRules = ABCHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/abc_highlight_rules","ace/mode/folding/cstyle"], function (require, exports, module) {
+ "use strict";
+
+ var oop = require("../lib/oop");
+ var TextMode = require("./text").Mode;
+ var ABCHighlightRules = require("./abc_highlight_rules").ABCHighlightRules;
+ var FoldMode = require("./folding/cstyle").FoldMode;
+
+ var Mode = function () {
+ this.HighlightRules = ABCHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+ };
+ oop.inherits(Mode, TextMode);
+
+ (function () {
+ this.$id = "ace/mode/abc"
+ }).call(Mode.prototype);
+
+ exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-actionscript.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-actionscript.js
new file mode 100644
index 00000000..c1af1637
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-actionscript.js
@@ -0,0 +1,267 @@
+ace.define("ace/mode/actionscript_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 ActionScriptHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { token: 'support.class.actionscript.2',
+ regex: '\\b(?:R(?:ecordset|DBMSResolver|adioButton(?:Group)?)|X(?:ML(?:Socket|Node|Connector)?|UpdateResolverDataHolder)|M(?:M(?:Save|Execute)|icrophoneMicrophone|o(?:use|vieClip(?:Loader)?)|e(?:nu(?:Bar)?|dia(?:Controller|Display|Playback))|ath)|B(?:yName|inding|utton)|S(?:haredObject|ystem|crollPane|t(?:yleSheet|age|ream)|ound|e(?:ndEvent|rviceObject)|OAPCall|lide)|N(?:umericStepper|et(?:stream|S(?:tream|ervices)|Connection|Debug(?:Config)?))|C(?:heckBox|o(?:ntextMenu(?:Item)?|okie|lor|m(?:ponentMixins|boBox))|ustomActions|lient|amera)|T(?:ypedValue|ext(?:Snapshot|Input|F(?:ield|ormat)|Area)|ree|AB)|Object|D(?:ownload|elta(?:Item|Packet)?|at(?:e(?:Chooser|Field)?|a(?:G(?:lue|rid)|Set|Type)))|U(?:RL|TC|IScrollBar)|P(?:opUpManager|endingCall|r(?:intJob|o(?:duct|gressBar)))|E(?:ndPoint|rror)|Video|Key|F(?:RadioButton|GridColumn|MessageBox|BarChart|S(?:croll(?:Bar|Pane)|tyleFormat|plitView)|orm|C(?:heckbox|omboBox|alendar)|unction|T(?:icker|ooltip(?:Lite)?|ree(?:Node)?)|IconButton|D(?:ataGrid|raggablePane)|P(?:ieChart|ushButton|ro(?:gressBar|mptBox))|L(?:i(?:stBox|neChart)|oadingBox)|AdvancedMessageBox)|W(?:indow|SDLURL|ebService(?:Connector)?)|L(?:ist|o(?:calConnection|ad(?:er|Vars)|g)|a(?:unch|bel))|A(?:sBroadcaster|cc(?:ordion|essibility)|S(?:Set(?:Native|PropFlags)|N(?:ew|ative)|C(?:onstructor|lamp(?:2)?)|InstanceOf)|pplication|lert|rray))\\b' },
+ { token: 'support.function.actionscript.2',
+ regex: '\\b(?:s(?:h(?:ift|ow(?:GridLines|Menu|Border|Settings|Headers|ColumnHeaders|Today|Preferences)?|ad(?:ow|ePane))|c(?:hema|ale(?:X|Mode|Y|Content)|r(?:oll(?:Track|Drag)?|een(?:Resolution|Color|DPI)))|t(?:yleSheet|op(?:Drag|A(?:nimation|llSounds|gent))?|epSize|a(?:tus|rt(?:Drag|A(?:nimation|gent))?))|i(?:n|ze|lence(?:TimeOut|Level))|o(?:ngname|urce|rt(?:Items(?:By)?|On(?:HeaderRelease)?|able(?:Columns)?)?)|u(?:ppressInvalidCalls|bstr(?:ing)?)|p(?:li(?:ce|t)|aceCol(?:umnsEqually|lumnsEqually))|e(?:nd(?:DefaultPushButtonEvent|AndLoad)?|curity|t(?:R(?:GB|o(?:otNode|w(?:Height|Count))|esizable(?:Columns)?|a(?:nge|te))|G(?:ain|roupName)|X(?:AxisTitle)?|M(?:i(?:n(?:imum|utes)|lliseconds)|o(?:nth(?:Names)?|tionLevel|de)|ultilineMode|e(?:ssage|nu(?:ItemEnabled(?:At)?|EnabledAt)|dia)|a(?:sk|ximum))|B(?:u(?:tton(?:s|Width)|fferTime)|a(?:seTabIndex|ndwidthLimit|ckground))|S(?:howAsDisabled|croll(?:ing|Speed|Content|Target|P(?:osition|roperties)|barState|Location)|t(?:yle(?:Property)?|opOnFocus|at(?:us|e))|i(?:ze|lenceLevel)|ort(?:able(?:Columns)?|Function)|p(?:litterBarPosition|acing)|e(?:conds|lect(?:Multiple|ion(?:Required|Type)?|Style|Color|ed(?:Node(?:s)?|Cell|I(?:nd(?:ices|ex)|tem(?:s)?))?|able))|kin|m(?:oothness|allScroll))|H(?:ighlight(?:s|Color)|Scroll|o(?:urs|rizontal)|eader(?:Symbol|Height|Text|Property|Format|Width|Location)?|as(?:Shader|CloseBox))|Y(?:ear|AxisTitle)?|N(?:ode(?:Properties|ExpansionHandler)|ewTextFormat)|C(?:h(?:ildNodes|a(?:ngeHandler|rt(?:Title|EventHandler)))|o(?:ntent(?:Size)?|okie|lumns)|ell(?:Symbol|Data)|l(?:i(?:ckHandler|pboard)|oseHandler)|redentials)|T(?:ype(?:dVaule)?|i(?:tle(?:barHeight)?|p(?:Target|Offset)?|me(?:out(?:Handler)?)?)|oggle|extFormat|ransform)|I(?:s(?:Branch|Open)|n(?:terval|putProperty)|con(?:SymbolName)?|te(?:rator|m(?:ByKey|Symbol)))|Orientation|D(?:i(?:splay(?:Range|Graphics|Mode|Clip|Text|edMonth)|rection)|uration|e(?:pth(?:Below|To|Above)|fault(?:GatewayURL|Mappings|NodeIconSymbolName)|l(?:iveryMode|ay)|bug(?:ID)?)|a(?:yOfWeekNames|t(?:e(?:Filter)?|a(?:Mapping(?:s)?|Item(?:Text|Property|Format)|Provider|All(?:Height|Property|Format|Width))?))|ra(?:wConnectors|gContent))|U(?:se(?:Shadow|HandCursor|EchoSuppression|rInput|Fade)|TC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear))|P(?:osition|ercentComplete|an(?:e(?:M(?:inimumSize|aximumSize)|Size|Title))?|ro(?:pert(?:y(?:Data)?|iesAt)|gress))|E(?:nabled|dit(?:Handler|able)|xpand(?:NodeTrigger|erSymbolName))|V(?:Scroll|olume|alue(?:Source)?)|KeyFrameInterval|Quality|F(?:i(?:eld|rst(?:DayOfWeek|VisibleNode))|ocus|ullYear|ps|ade(?:InLength|OutLength)|rame(?:Color|Width))|Width|L(?:ine(?:Color|Weight)|o(?:opback|adTarget)|a(?:rgeScroll|bel(?:Source|Placement)?))|A(?:s(?:Boolean|String|Number)|n(?:yTypedValue|imation)|ctiv(?:e(?:State(?:Handler)?|Handler)|ateHandler)|utoH(?:ideScrollBar|eight)))?|paratorBefore|ek|lect(?:ion(?:Disabled|Unfocused)?|ed(?:Node(?:s)?|Child|I(?:nd(?:ices|ex)|tem(?:s)?)|Dat(?:e|a))?|able(?:Ranges)?)|rver(?:String)?)|kip|qrt|wapDepths|lice|aveToSharedObj|moothing)|h(?:scroll(?:Policy)?|tml(?:Text)?|i(?:t(?:Test(?:TextNearPos)?|Area)|de(?:BuiltInItems|Child)?|ghlight(?:2D|3D)?)|orizontal|e(?:ight|ader(?:Re(?:nderer|lease)|Height|Text))|P(?:osition|ageScrollSize)|a(?:s(?:childNodes|MP3|S(?:creen(?:Broadcast|Playback)|treaming(?:Video|Audio)|ort)|Next|OwnProperty|Pr(?:inting|evious)|EmbeddedVideo|VideoEncoder|A(?:ccesibility|udio(?:Encoder)?))|ndlerName)|LineScrollSize)|ye(?:sLabel|ar)|n(?:o(?:t|de(?:Name|Close|Type|Open|Value)|Label)|u(?:llValue|mChild(?:S(?:creens|lides)|ren|Forms))|e(?:w(?:Item|line|Value|LocationDialog)|xt(?:S(?:cene|ibling|lide)|TabIndex|Value|Frame)?)?|ame(?:s)?)|c(?:h(?:ildNodes|eck|a(?:nge(?:sPending)?|r(?:CodeAt|At))|r)|o(?:s|n(?:st(?:ant|ructor)|nect|c(?:urrency|at)|t(?:ent(?:Type|Path)?|ains|rol(?:Placement|lerPolicy))|denseWhite|version)|py|l(?:or|umn(?:Stretch|Name(?:s)?|Count))|m(?:p(?:onent|lete)|ment))|u(?:stomItems|ePoint(?:s)?|r(?:veTo|Value|rent(?:Slide|ChildSlide|Item|F(?:ocused(?:S(?:creen|lide)|Form)|ps))))|e(?:il|ll(?:Renderer|Press|Edit|Focus(?:In|Out)))|l(?:i(?:ck|ents)|o(?:se(?:Button|Pane)?|ne(?:Node)?)|ear(?:S(?:haredObjects|treams)|Timeout|Interval)?)|a(?:ncelLabel|tch|p(?:tion|abilities)|l(?:cFields|l(?:e(?:e|r))?))|reate(?:GatewayConnection|Menu|Se(?:rver|gment)|C(?:hild(?:AtDepth)?|l(?:ient|ass(?:ChildAtDepth|Object(?:AtDepth)?))|all)|Text(?:Node|Field)|Item|Object(?:AtDepth)?|PopUp|E(?:lement|mptyMovieClip)))|t(?:h(?:is|row)|ype(?:of|Name)?|i(?:tle(?:StyleDeclaration)?|me(?:out)?)|o(?:talTime|String|olTipText|p|UpperCase|ggle(?:HighQuality)?|Lo(?:caleString|werCase))|e(?:st|llTarget|xt(?:RightMargin|Bold|S(?:ize|elected)|Height|Color|I(?:ndent|talic)|Disabled|Underline|F(?:ield|ont)|Width|LeftMargin|Align)?)|a(?:n|rget(?:Path)?|b(?:Stops|Children|Index|Enabled|leName))|r(?:y|igger|ac(?:e|k(?:AsMenu)?)))|i(?:s(?:Running|Branch|NaN|Con(?:soleOpen|nected)|Toggled|Installed|Open|D(?:own|ebugger)|P(?:urchased|ro(?:totypeOf|pertyEnumerable))|Empty|F(?:inite|ullyPopulated)|Local|Active)|n(?:s(?:tall|ertBefore)|cludeDeltaPacketInfo|t|it(?:ialize|Component|Pod|A(?:pplication|gent))?|de(?:nt|terminate|x(?:InParent(?:Slide|Form)?|Of)?)|put|validate|finity|LocalInternetCache)?|con(?:F(?:ield|unction))?|t(?:e(?:ratorScrolled|m(?:s|RollO(?:ut|ver)|ClassName))|alic)|d3|p|fFrameLoaded|gnore(?:Case|White))|o(?:s|n(?:R(?:ollO(?:ut|ver)|e(?:s(?:ize|ult)|l(?:ease(?:Outside)?|aseOutside)))|XML|Mouse(?:Move|Down|Up|Wheel)|S(?:ync|croller|tatus|oundComplete|e(?:tFocus|lect(?:edItem)?))|N(?:oticeEvent|etworkChange)|C(?:hanged|onnect|l(?:ipEvent|ose))|ID3|D(?:isconnect|eactivate|ata|ragO(?:ut|ver))|Un(?:install|load)|P(?:aymentResult|ress)|EnterFrame|K(?:illFocus|ey(?:Down|Up))|Fault|Lo(?:ad|g)|A(?:ctiv(?:ity|ate)|ppSt(?:op|art)))?|pe(?:n|ration)|verLayChildren|kLabel|ldValue|r(?:d)?)|d(?:i(?:s(?:connect|play(?:Normal|ed(?:Month|Year)|Full)|able(?:Shader|d(?:Ranges|Days)|CloseBox|Events))|rection)|o(?:cTypeDecl|tall|Decoding|main|LazyDecoding)|u(?:plicateMovieClip|ration)|e(?:stroy(?:ChildAt|Object)|code|fault(?:PushButton(?:Enabled)?|KeydownHandler)?|l(?:ta(?:Packet(?:Changed)?)?|ete(?:PopUp|All)?)|blocking)|a(?:shBoardSave|yNames|ta(?:Provider)?|rkshadow)|r(?:opdown(?:Width)?|a(?:w|gO(?:ut|ver))))|u(?:se(?:Sort|HandCursor|Codepage|EchoSuppression)|n(?:shift|install|derline|escape|format|watch|lo(?:ck|ad(?:Movie(?:Num)?)?))|pdate(?:Results|Mode|I(?:nputProperties|tem(?:ByIndex)?)|P(?:acket|roperties)|View|AfterEvent)|rl)|join|p(?:ixelAspectRatio|o(?:sition|p|w)|u(?:sh|rge|blish)|ercen(?:tComplete|Loaded)|lay(?:head(?:Change|Time)|ing|Hidden|erType)?|a(?:ssword|use|r(?:se(?:XML|CSS|Int|Float)|ent(?:Node|Is(?:S(?:creen|lide)|Form))|ams))|r(?:int(?:Num|AsBitmap(?:Num)?)?|o(?:to(?:type)?|pert(?:y|ies)|gress)|e(?:ss|v(?:ious(?:S(?:ibling|lide)|Value)?|Scene|Frame)|ferred(?:Height|Width))))|e(?:scape|n(?:code(?:r)?|ter(?:Frame)?|dFill|able(?:Shader|d|CloseBox|Events))|dit(?:able|Field|LocationDialog)|v(?:ent|al(?:uate)?)|q|x(?:tended|p|ec(?:ute)?|actSettings)|m(?:phasized(?:StyleDeclaration)?|bedFonts))|v(?:i(?:sible|ewPod)|ScrollPolicy|o(?:id|lume)|ersion|P(?:osition|ageScrollSize)|a(?:l(?:idat(?:ionError|e(?:Property|ActivationKey)?)|ue(?:Of)?)|riable)|LineScrollSize)|k(?:ind|ey(?:Down|Up|Press|FrameInterval))|q(?:sort|uality)|f(?:scommand|i(?:n(?:d(?:Text|First|Last)?|ally)|eldInfo|lter(?:ed|Func)?|rst(?:Slide|Child|DayOfWeek|VisibleNode)?)|o(?:nt|cus(?:In|edCell|Out|Enabled)|r(?:egroundDisabled|mat(?:ter)?))|unctionName|ps|l(?:oor|ush)|ace|romCharCode)|w(?:i(?:th|dth)|ordWrap|atch|riteAccess)|l(?:t|i(?:st(?:Owner)?|ne(?:Style|To))|o(?:c(?:k|a(?:t(?:ion|eByld)|l(?:ToGlobal|FileReadDisable)))|opback|ad(?:Movie(?:Num)?|S(?:crollContent|ound)|ed|Variables(?:Num)?|Application)?|g(?:Changes)?)|e(?:ngth|ft(?:Margin)?|ading)?|a(?:st(?:Slide|Child|Index(?:Of)?)?|nguage|b(?:el(?:Placement|F(?:ield|unction))?|leField)))|a(?:s(?:scociate(?:Controller|Display)|in|pectRatio|function)|nd|c(?:ceptConnection|tiv(?:ityLevel|ePlayControl)|os)|t(?:t(?:ach(?:Movie|Sound|Video|Audio)|ributes)|an(?:2)?)|dd(?:header|RequestHeader|Menu(?:Item(?:At)?|At)?|Sort|Header|No(?:tice|de(?:At)?)|C(?:olumn(?:At)?|uePoint)|T(?:oLocalInternetCache|reeNode(?:At)?)|I(?:con|tem(?:s(?:At)?|At)?)|DeltaItem|P(?:od|age|roperty)|EventListener|View|FieldInfo|Listener|Animation)?|uto(?:Size|Play|KeyNav|Load)|pp(?:endChild|ly(?:Changes|Updates)?)|vHardwareDisable|fterLoaded|l(?:ternateRowColors|ign|l(?:ow(?:InsecureDomain|Domain)|Transitions(?:InDone|OutDone))|bum)|r(?:tist|row|g(?:uments|List))|gent|bs)|r(?:ight(?:Margin)?|o(?:ot(?:S(?:creen|lide)|Form)|und|w(?:Height|Count)|llO(?:ut|ver))|e(?:s(?:yncDepth|t(?:orePane|artAnimation|rict)|iz(?:e|able(?:Columns)?)|olveDelta|ult(?:s)?|ponse)|c(?:o(?:ncile(?:Results|Updates)|rd)|eive(?:Video|Audio))|draw|jectConnection|place(?:Sel|ItemAt|AllItems)?|ve(?:al(?:Child)?|rse)|quest(?:SizeChange|Payment)?|f(?:errer|resh(?:ScrollContent|Destinations|Pane|FromSources)?)|lease(?:Outside)?|ad(?:Only|Access)|gister(?:SkinElement|C(?:olor(?:Style|Name)|lass)|InheritingStyle|Proxy)|move(?:Range|M(?:ovieClip|enu(?:Item(?:At)?|At))|Background|Sort|No(?:tice|de(?:sAt|At)?)|C(?:olum(?:nAt|At)|uePoints)|T(?:extField|reeNode(?:At)?)|Item(?:At)?|Pod|EventListener|FromLocalInternetCache|Listener|All(?:C(?:olumns|uePoints)|Items)?))|a(?:ndom|te|dioDot))|g(?:t|oto(?:Slide|NextSlide|PreviousSlide|FirstSlide|LastSlide|And(?:Stop|Play))|e(?:nre|t(?:R(?:GB|o(?:otNode|wCount)|e(?:sizable|mote))|X(?:AxisTitle)?|M(?:i(?:n(?:imum(?:Size)?|utes)|lliseconds)|onth(?:Names)?|ultilineMode|e(?:ssage|nu(?:ItemAt|EnabledAt|At))|aximum(?:Size)?)|B(?:ytes(?:Total|Loaded)|ounds|utton(?:s|Width)|eginIndex|a(?:ndwidthLimit|ckground))|S(?:howAsDisabled|croll(?:ing|Speed|Content|Position|barState|Location)|t(?:yle(?:Names)?|opOnFocus|ate)|ize|o(?:urce|rtState)|p(?:litterBarPosition|acing)|e(?:conds|lect(?:Multiple|ion(?:Required|Type)|Style|ed(?:Node(?:s)?|Cell|Text|I(?:nd(?:ices|ex)|tem(?:s)?))?)|rvice)|moothness|WFVersion)|H(?:ighlight(?:s|Color)|ours|e(?:ight|ader(?:Height|Text|Property|Format|Width|Location)?)|as(?:Shader|CloseBox))|Y(?:ear|AxisTitle)?|N(?:o(?:tices|de(?:DisplayedAt|At))|um(?:Children|berAvailable)|e(?:wTextFormat|xtHighestDepth))|C(?:h(?:ild(?:S(?:creen|lide)|Nodes|Form|At)|artTitle)|o(?:n(?:tent|figInfo)|okie|de|unt|lumn(?:Names|Count|Index|At))|uePoint|ellIndex|loseHandler|a(?:ll|retIndex))|T(?:ypedValue|i(?:tle(?:barHeight)?|p(?:Target|Offset)?|me(?:stamp|zoneOffset|out(?:State|Handler)|r)?)|oggle|ext(?:Extent|Format)?|r(?:ee(?:NodeAt|Length)|ans(?:form|actionId)))|I(?:s(?:Branch|Open)|n(?:stanceAtDepth|d(?:icesByKey|exByKey))|con(?:SymbolName)?|te(?:rator|m(?:sByKey|By(?:Name|Key)|id|ID|At))|d)|O(?:utput(?:Parameter(?:s|ByName)?|Value(?:s)?)|peration|ri(?:entation|ginalCellData))|D(?:i(?:s(?:play(?:Range|Mode|Clip|Index|edMonth)|kUsage)|rection)|uration|e(?:pth|faultNodeIconSymbolName|l(?:taPacket|ay)|bug(?:Config|ID)?)|a(?:y(?:OfWeekNames)?|t(?:e|a(?:Mapping(?:s)?|Item(?:Text|Property|Format)|Label|All(?:Height|Property|Format|Width))?))|rawConnectors)|U(?:se(?:Shadow|HandCursor|rInput|Fade)|RL|TC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear))|P(?:o(?:sition|ds)|ercentComplete|a(?:n(?:e(?:M(?:inimums|aximums)|Height|Title|Width))?|rentNode)|r(?:operty(?:Name|Data)?|efer(?:ences|red(?:Height|Width))))|E(?:n(?:dIndex|abled)|ditingData|x(?:panderSymbolName|andNodeTrigger))|V(?:iewed(?:Pods|Applications)|olume|ersion|alue(?:Source)?)|F(?:i(?:eld|rst(?:DayOfWeek|VisibleNode))|o(?:ntList|cus)|ullYear|ade(?:InLength|OutLength)|rame(?:Color|Width))|Width|L(?:ine(?:Color|Weight)|o(?:cal|adTarget)|ength|a(?:stTabIndex|bel(?:Source)?))|A(?:s(?:cii|Boolean|String|Number)|n(?:yTypedValue|imation)|ctiv(?:eState(?:Handler)?|ateHandler)|utoH(?:ideScrollBar|eight)|llItems|gent))?)?|lobal(?:StyleFormat|ToLocal)?|ain|roupName)|x(?:updatePackety|mlDecl)?|m(?:y(?:MethodName|Call)|in(?:imum)?|o(?:nthNames|tion(?:TimeOut|Level)|de(?:lChanged)?|use(?:Move|O(?:ut|ver)|Down(?:Somewhere|Outside)?|Up(?:Somewhere)?|WheelEnabled)|ve(?:To)?)|u(?:ted|lti(?:pleS(?:imultaneousAllowed|elections)|line))|e(?:ssage|nu(?:Show|Hide)?|th(?:od)?|diaType)|a(?:nufacturer|tch|x(?:scroll|hscroll|imum|HPosition|Chars|VPosition)?)|b(?:substring|chr|ord|length))|b(?:ytes(?:Total|Loaded)|indFormat(?:Strings|Function)|o(?:ttom(?:Scroll)?|ld|rder(?:Color)?)|u(?:tton(?:Height|Width)|iltInItems|ffer(?:Time|Length)|llet)|e(?:foreApplyUpdates|gin(?:GradientFill|Fill))|lockIndent|a(?:ndwidth|ckground(?:Style|Color|Disabled)?)|roadcastMessage)|onHTTPStatus)\\b' },
+ { token: 'support.constant.actionscript.2',
+ regex: '\\b(?:__proto__|__resolve|_accProps|_alpha|_changed|_currentframe|_droptarget|_flash|_focusrect|_framesloaded|_global|_height|_highquality|_level|_listeners|_lockroot|_name|_parent|_quality|_root|_rotation|_soundbuftime|_target|_totalframes|_url|_visible|_width|_x|_xmouse|_xscale|_y|_ymouse|_yscale)\\b' },
+ { token: 'keyword.control.actionscript.2',
+ regex: '\\b(?:dynamic|extends|import|implements|interface|public|private|new|static|super|var|for|in|break|continue|while|do|return|if|else|case|switch)\\b' },
+ { token: 'storage.type.actionscript.2',
+ regex: '\\b(?:Boolean|Number|String|Void)\\b' },
+ { token: 'constant.language.actionscript.2',
+ regex: '\\b(?:null|undefined|true|false)\\b' },
+ { token: 'constant.numeric.actionscript.2',
+ 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: 'punctuation.definition.string.begin.actionscript.2',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.actionscript.2',
+ regex: '"',
+ next: 'pop' },
+ { token: 'constant.character.escape.actionscript.2',
+ regex: '\\\\.' },
+ { defaultToken: 'string.quoted.double.actionscript.2' } ] },
+ { token: 'punctuation.definition.string.begin.actionscript.2',
+ regex: '\'',
+ push:
+ [ { token: 'punctuation.definition.string.end.actionscript.2',
+ regex: '\'',
+ next: 'pop' },
+ { token: 'constant.character.escape.actionscript.2',
+ regex: '\\\\.' },
+ { defaultToken: 'string.quoted.single.actionscript.2' } ] },
+ { token: 'support.constant.actionscript.2',
+ regex: '\\b(?:BACKSPACE|CAPSLOCK|CONTROL|DELETEKEY|DOWN|END|ENTER|HOME|INSERT|LEFT|LN10|LN2|LOG10E|LOG2E|MAX_VALUE|MIN_VALUE|NEGATIVE_INFINITY|NaN|PGDN|PGUP|PI|POSITIVE_INFINITY|RIGHT|SPACE|SQRT1_2|SQRT2|UP)\\b' },
+ { token: 'punctuation.definition.comment.actionscript.2',
+ regex: '/\\*',
+ push:
+ [ { token: 'punctuation.definition.comment.actionscript.2',
+ regex: '\\*/',
+ next: 'pop' },
+ { defaultToken: 'comment.block.actionscript.2' } ] },
+ { token: 'punctuation.definition.comment.actionscript.2',
+ regex: '//.*$',
+ push_:
+ [ { token: 'comment.line.double-slash.actionscript.2',
+ regex: '$',
+ next: 'pop' },
+ { defaultToken: 'comment.line.double-slash.actionscript.2' } ] },
+ { token: 'keyword.operator.actionscript.2',
+ regex: '\\binstanceof\\b' },
+ { token: 'keyword.operator.symbolic.actionscript.2',
+ regex: '[-!%&*+=/?:]' },
+ { token:
+ [ 'meta.preprocessor.actionscript.2',
+ 'punctuation.definition.preprocessor.actionscript.2',
+ 'meta.preprocessor.actionscript.2' ],
+ regex: '^([ \\t]*)(#)([a-zA-Z]+)' },
+ { token:
+ [ 'storage.type.function.actionscript.2',
+ 'meta.function.actionscript.2',
+ 'entity.name.function.actionscript.2',
+ 'meta.function.actionscript.2',
+ 'punctuation.definition.parameters.begin.actionscript.2' ],
+ regex: '\\b(function)(\\s+)([a-zA-Z_]\\w*)(\\s*)(\\()',
+ push:
+ [ { token: 'punctuation.definition.parameters.end.actionscript.2',
+ regex: '\\)',
+ next: 'pop' },
+ { token: 'variable.parameter.function.actionscript.2',
+ regex: '[^,)$]+' },
+ { defaultToken: 'meta.function.actionscript.2' } ] },
+ { token:
+ [ 'storage.type.class.actionscript.2',
+ 'meta.class.actionscript.2',
+ 'entity.name.type.class.actionscript.2',
+ 'meta.class.actionscript.2',
+ 'storage.modifier.extends.actionscript.2',
+ 'meta.class.actionscript.2',
+ 'entity.other.inherited-class.actionscript.2' ],
+ regex: '\\b(class)(\\s+)([a-zA-Z_](?:\\w|\\.)*)(?:(\\s+)(extends)(\\s+)([a-zA-Z_](?:\\w|\\.)*))?' } ] }
+
+ this.normalizeRules();
+};
+
+ActionScriptHighlightRules.metaData = { fileTypes: [ 'as' ],
+ keyEquivalent: '^~A',
+ name: 'ActionScript',
+ scopeName: 'source.actionscript.2' }
+
+
+oop.inherits(ActionScriptHighlightRules, TextHighlightRules);
+
+exports.ActionScriptHighlightRules = ActionScriptHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/actionscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/actionscript_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ActionScriptHighlightRules = require("./actionscript_highlight_rules").ActionScriptHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ActionScriptHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/actionscript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-ada.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-ada.js
new file mode 100644
index 00000000..da059886
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-ada.js
@@ -0,0 +1,87 @@
+ace.define("ace/mode/ada_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 AdaHighlightRules = function() {
+var keywords = "abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|accept|entry|select|" +
+"access|exception|of|separate|aliased|exit|or|some|all|others|subtype|and|for|out|synchronized|" +
+"array|function|overriding|at|tagged|generic|package|task|begin|goto|pragma|terminate|" +
+"body|private|then|if|procedure|type|case|in|protected|constant|interface|until|" +
+"|is|raise|use|declare|range|delay|limited|record|when|delta|loop|rem|while|digits|renames|with|do|mod|requeue|xor";
+
+ var builtinConstants = (
+ "true|false|null"
+ );
+
+ var builtinFunctions = (
+ "count|min|max|avg|sum|rank|now|coalesce|main"
+ );
+
+ 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(AdaHighlightRules, TextHighlightRules);
+
+exports.AdaHighlightRules = AdaHighlightRules;
+});
+
+ace.define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var AdaHighlightRules = require("./ada_highlight_rules").AdaHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = AdaHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+
+ this.$id = "ace/mode/ada";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-apache_conf.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-apache_conf.js
new file mode 100644
index 00000000..bb6566a9
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-apache_conf.js
@@ -0,0 +1,356 @@
+ace.define("ace/mode/apache_conf_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 ApacheConfHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { token:
+ [ 'punctuation.definition.comment.apacheconf',
+ 'comment.line.hash.ini',
+ 'comment.line.hash.ini' ],
+ regex: '^((?:\\s)*)(#)(.*$)' },
+ { token:
+ [ 'punctuation.definition.tag.apacheconf',
+ 'entity.tag.apacheconf',
+ 'text',
+ 'string.value.apacheconf',
+ 'punctuation.definition.tag.apacheconf' ],
+ regex: '(<)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost)(?:(\\s)(.+?))?(>)' },
+ { token:
+ [ 'punctuation.definition.tag.apacheconf',
+ 'entity.tag.apacheconf',
+ 'punctuation.definition.tag.apacheconf' ],
+ regex: '(</)(Proxy|ProxyMatch|IfVersion|Directory|DirectoryMatch|Files|FilesMatch|IfDefine|IfModule|Limit|LimitExcept|Location|LocationMatch|VirtualHost)(>)' },
+ { token:
+ [ 'keyword.alias.apacheconf', 'text',
+ 'string.regexp.apacheconf', 'text',
+ 'string.replacement.apacheconf', 'text' ],
+ regex: '(Rewrite(?:Rule|Cond))(\\s+)(.+?)(\\s+)(.+?)($|\\s)' },
+ { token:
+ [ 'keyword.alias.apacheconf', 'text',
+ 'entity.status.apacheconf', 'text',
+ 'string.regexp.apacheconf', 'text',
+ 'string.path.apacheconf', 'text' ],
+ regex: '(RedirectMatch)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' },
+ { token:
+ [ 'keyword.alias.apacheconf', 'text',
+ 'entity.status.apacheconf', 'text',
+ 'string.path.apacheconf', 'text',
+ 'string.path.apacheconf', 'text' ],
+ regex: '(Redirect)(?:(\\s+)(\\d\\d\\d|permanent|temp|seeother|gone))?(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' },
+ { token:
+ [ 'keyword.alias.apacheconf', 'text',
+ 'string.regexp.apacheconf', 'text',
+ 'string.path.apacheconf', 'text' ],
+ regex: '(ScriptAliasMatch|AliasMatch)(\\s+)(.+?)(\\s+)(?:(.+?)(\\s))?' },
+ { token:
+ [ 'keyword.alias.apacheconf', 'text',
+ 'string.path.apacheconf', 'text',
+ 'string.path.apacheconf', 'text' ],
+ regex: '(RedirectPermanent|RedirectTemp|ScriptAlias|Alias)(\\s+)(.+?)(\\s+)(?:(.+?)($|\\s))?' },
+ { token: 'keyword.core.apacheconf',
+ regex: '\\b(?:AcceptPathInfo|AccessFileName|AddDefaultCharset|AddOutputFilterByType|AllowEncodedSlashes|AllowOverride|AuthName|AuthType|CGIMapExtension|ContentDigest|DefaultType|DocumentRoot|EnableMMAP|EnableSendfile|ErrorDocument|ErrorLog|FileETag|ForceType|HostnameLookups|IdentityCheck|Include|KeepAlive|KeepAliveTimeout|LimitInternalRecursion|LimitRequestBody|LimitRequestFields|LimitRequestFieldSize|LimitRequestLine|LimitXMLRequestBody|LogLevel|MaxKeepAliveRequests|NameVirtualHost|Options|Require|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScriptInterpreterSource|ServerAdmin|ServerAlias|ServerName|ServerPath|ServerRoot|ServerSignature|ServerTokens|SetHandler|SetInputFilter|SetOutputFilter|TimeOut|TraceEnable|UseCanonicalName)\\b' },
+ { token: 'keyword.mpm.apacheconf',
+ regex: '\\b(?:AcceptMutex|AssignUserID|BS2000Account|ChildPerUserID|CoreDumpDirectory|EnableExceptionHook|Group|Listen|ListenBacklog|LockFile|MaxClients|MaxMemFree|MaxRequestsPerChild|MaxRequestsPerThread|MaxSpareServers|MaxSpareThreads|MaxThreads|MaxThreadsPerChild|MinSpareServers|MinSpareThreads|NumServers|PidFile|ReceiveBufferSize|ScoreBoardFile|SendBufferSize|ServerLimit|StartServers|StartThreads|ThreadLimit|ThreadsPerChild|ThreadStackSize|User|Win32DisableAcceptEx)\\b' },
+ { token: 'keyword.access.apacheconf',
+ regex: '\\b(?:Allow|Deny|Order)\\b' },
+ { token: 'keyword.actions.apacheconf',
+ regex: '\\b(?:Action|Script)\\b' },
+ { token: 'keyword.alias.apacheconf',
+ regex: '\\b(?:Alias|AliasMatch|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ScriptAlias|ScriptAliasMatch)\\b' },
+ { token: 'keyword.auth.apacheconf',
+ regex: '\\b(?:AuthAuthoritative|AuthGroupFile|AuthUserFile)\\b' },
+ { token: 'keyword.auth_anon.apacheconf',
+ regex: '\\b(?:Anonymous|Anonymous_Authoritative|Anonymous_LogEmail|Anonymous_MustGiveEmail|Anonymous_NoUserID|Anonymous_VerifyEmail)\\b' },
+ { token: 'keyword.auth_dbm.apacheconf',
+ regex: '\\b(?:AuthDBMAuthoritative|AuthDBMGroupFile|AuthDBMType|AuthDBMUserFile)\\b' },
+ { token: 'keyword.auth_digest.apacheconf',
+ regex: '\\b(?:AuthDigestAlgorithm|AuthDigestDomain|AuthDigestFile|AuthDigestGroupFile|AuthDigestNcCheck|AuthDigestNonceFormat|AuthDigestNonceLifetime|AuthDigestQop|AuthDigestShmemSize)\\b' },
+ { token: 'keyword.auth_ldap.apacheconf',
+ regex: '\\b(?:AuthLDAPAuthoritative|AuthLDAPBindDN|AuthLDAPBindPassword|AuthLDAPCharsetConfig|AuthLDAPCompareDNOnServer|AuthLDAPDereferenceAliases|AuthLDAPEnabled|AuthLDAPFrontPageHack|AuthLDAPGroupAttribute|AuthLDAPGroupAttributeIsDN|AuthLDAPRemoteUserIsDN|AuthLDAPUrl)\\b' },
+ { token: 'keyword.autoindex.apacheconf',
+ regex: '\\b(?:AddAlt|AddAltByEncoding|AddAltByType|AddDescription|AddIcon|AddIconByEncoding|AddIconByType|DefaultIcon|HeaderName|IndexIgnore|IndexOptions|IndexOrderDefault|ReadmeName)\\b' },
+ { token: 'keyword.cache.apacheconf',
+ regex: '\\b(?:CacheDefaultExpire|CacheDisable|CacheEnable|CacheForceCompletion|CacheIgnoreCacheControl|CacheIgnoreHeaders|CacheIgnoreNoLastMod|CacheLastModifiedFactor|CacheMaxExpire)\\b' },
+ { token: 'keyword.cern_meta.apacheconf',
+ regex: '\\b(?:MetaDir|MetaFiles|MetaSuffix)\\b' },
+ { token: 'keyword.cgi.apacheconf',
+ regex: '\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength)\\b' },
+ { token: 'keyword.cgid.apacheconf',
+ regex: '\\b(?:ScriptLog|ScriptLogBuffer|ScriptLogLength|ScriptSock)\\b' },
+ { token: 'keyword.charset_lite.apacheconf',
+ regex: '\\b(?:CharsetDefault|CharsetOptions|CharsetSourceEnc)\\b' },
+ { token: 'keyword.dav.apacheconf',
+ regex: '\\b(?:Dav|DavDepthInfinity|DavMinTimeout|DavLockDB)\\b' },
+ { token: 'keyword.deflate.apacheconf',
+ regex: '\\b(?:DeflateBufferSize|DeflateCompressionLevel|DeflateFilterNote|DeflateMemLevel|DeflateWindowSize)\\b' },
+ { token: 'keyword.dir.apacheconf',
+ regex: '\\b(?:DirectoryIndex|DirectorySlash)\\b' },
+ { token: 'keyword.disk_cache.apacheconf',
+ regex: '\\b(?:CacheDirLength|CacheDirLevels|CacheExpiryCheck|CacheGcClean|CacheGcDaily|CacheGcInterval|CacheGcMemUsage|CacheGcUnused|CacheMaxFileSize|CacheMinFileSize|CacheRoot|CacheSize|CacheTimeMargin)\\b' },
+ { token: 'keyword.dumpio.apacheconf',
+ regex: '\\b(?:DumpIOInput|DumpIOOutput)\\b' },
+ { token: 'keyword.env.apacheconf',
+ regex: '\\b(?:PassEnv|SetEnv|UnsetEnv)\\b' },
+ { token: 'keyword.expires.apacheconf',
+ regex: '\\b(?:ExpiresActive|ExpiresByType|ExpiresDefault)\\b' },
+ { token: 'keyword.ext_filter.apacheconf',
+ regex: '\\b(?:ExtFilterDefine|ExtFilterOptions)\\b' },
+ { token: 'keyword.file_cache.apacheconf',
+ regex: '\\b(?:CacheFile|MMapFile)\\b' },
+ { token: 'keyword.headers.apacheconf',
+ regex: '\\b(?:Header|RequestHeader)\\b' },
+ { token: 'keyword.imap.apacheconf',
+ regex: '\\b(?:ImapBase|ImapDefault|ImapMenu)\\b' },
+ { token: 'keyword.include.apacheconf',
+ regex: '\\b(?:SSIEndTag|SSIErrorMsg|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|XBitHack)\\b' },
+ { token: 'keyword.isapi.apacheconf',
+ regex: '\\b(?:ISAPIAppendLogToErrors|ISAPIAppendLogToQuery|ISAPICacheFile|ISAPIFakeAsync|ISAPILogNotSupported|ISAPIReadAheadBuffer)\\b' },
+ { token: 'keyword.ldap.apacheconf',
+ regex: '\\b(?:LDAPCacheEntries|LDAPCacheTTL|LDAPConnectionTimeout|LDAPOpCacheEntries|LDAPOpCacheTTL|LDAPSharedCacheFile|LDAPSharedCacheSize|LDAPTrustedCA|LDAPTrustedCAType)\\b' },
+ { token: 'keyword.log.apacheconf',
+ regex: '\\b(?:BufferedLogs|CookieLog|CustomLog|LogFormat|TransferLog|ForensicLog)\\b' },
+ { token: 'keyword.mem_cache.apacheconf',
+ regex: '\\b(?:MCacheMaxObjectCount|MCacheMaxObjectSize|MCacheMaxStreamingBuffer|MCacheMinObjectSize|MCacheRemovalAlgorithm|MCacheSize)\\b' },
+ { token: 'keyword.mime.apacheconf',
+ regex: '\\b(?:AddCharset|AddEncoding|AddHandler|AddInputFilter|AddLanguage|AddOutputFilter|AddType|DefaultLanguage|ModMimeUsePathInfo|MultiviewsMatch|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|TypesConfig)\\b' },
+ { token: 'keyword.misc.apacheconf',
+ regex: '\\b(?:ProtocolEcho|Example|AddModuleInfo|MimeMagicFile|CheckSpelling|ExtendedStatus|SuexecUserGroup|UserDir)\\b' },
+ { token: 'keyword.negotiation.apacheconf',
+ regex: '\\b(?:CacheNegotiatedDocs|ForceLanguagePriority|LanguagePriority)\\b' },
+ { token: 'keyword.nw_ssl.apacheconf',
+ regex: '\\b(?:NWSSLTrustedCerts|NWSSLUpgradeable|SecureListen)\\b' },
+ { token: 'keyword.proxy.apacheconf',
+ regex: '\\b(?:AllowCONNECT|NoProxy|ProxyBadHeader|ProxyBlock|ProxyDomain|ProxyErrorOverride|ProxyFtpDirCharset|ProxyIOBufferSize|ProxyMaxForwards|ProxyPass|ProxyPassReverse|ProxyPreserveHost|ProxyReceiveBufferSize|ProxyRemote|ProxyRemoteMatch|ProxyRequests|ProxyTimeout|ProxyVia)\\b' },
+ { token: 'keyword.rewrite.apacheconf',
+ regex: '\\b(?:RewriteBase|RewriteCond|RewriteEngine|RewriteLock|RewriteLog|RewriteLogLevel|RewriteMap|RewriteOptions|RewriteRule)\\b' },
+ { token: 'keyword.setenvif.apacheconf',
+ regex: '\\b(?:BrowserMatch|BrowserMatchNoCase|SetEnvIf|SetEnvIfNoCase)\\b' },
+ { token: 'keyword.so.apacheconf',
+ regex: '\\b(?:LoadFile|LoadModule)\\b' },
+ { token: 'keyword.ssl.apacheconf',
+ regex: '\\b(?:SSLCACertificateFile|SSLCACertificatePath|SSLCARevocationFile|SSLCARevocationPath|SSLCertificateChainFile|SSLCertificateFile|SSLCertificateKeyFile|SSLCipherSuite|SSLEngine|SSLMutex|SSLOptions|SSLPassPhraseDialog|SSLProtocol|SSLProxyCACertificateFile|SSLProxyCACertificatePath|SSLProxyCARevocationFile|SSLProxyCARevocationPath|SSLProxyCipherSuite|SSLProxyEngine|SSLProxyMachineCertificateFile|SSLProxyMachineCertificatePath|SSLProxyProtocol|SSLProxyVerify|SSLProxyVerifyDepth|SSLRandomSeed|SSLRequire|SSLRequireSSL|SSLSessionCache|SSLSessionCacheTimeout|SSLUserName|SSLVerifyClient|SSLVerifyDepth)\\b' },
+ { token: 'keyword.usertrack.apacheconf',
+ regex: '\\b(?:CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking)\\b' },
+ { token: 'keyword.vhost_alias.apacheconf',
+ regex: '\\b(?:VirtualDocumentRoot|VirtualDocumentRootIP|VirtualScriptAlias|VirtualScriptAliasIP)\\b' },
+ { token:
+ [ 'keyword.php.apacheconf',
+ 'text',
+ 'entity.property.apacheconf',
+ 'text',
+ 'string.value.apacheconf',
+ 'text' ],
+ regex: '\\b(php_value|php_flag)\\b(?:(\\s+)(.+?)(?:(\\s+)(.+?))?)?(\\s)' },
+ { token:
+ [ 'punctuation.variable.apacheconf',
+ 'variable.env.apacheconf',
+ 'variable.misc.apacheconf',
+ 'punctuation.variable.apacheconf' ],
+ regex: '(%\\{)(?:(HTTP_USER_AGENT|HTTP_REFERER|HTTP_COOKIE|HTTP_FORWARDED|HTTP_HOST|HTTP_PROXY_CONNECTION|HTTP_ACCEPT|REMOTE_ADDR|REMOTE_HOST|REMOTE_PORT|REMOTE_USER|REMOTE_IDENT|REQUEST_METHOD|SCRIPT_FILENAME|PATH_INFO|QUERY_STRING|AUTH_TYPE|DOCUMENT_ROOT|SERVER_ADMIN|SERVER_NAME|SERVER_ADDR|SERVER_PORT|SERVER_PROTOCOL|SERVER_SOFTWARE|TIME_YEAR|TIME_MON|TIME_DAY|TIME_HOUR|TIME_MIN|TIME_SEC|TIME_WDAY|TIME|API_VERSION|THE_REQUEST|REQUEST_URI|REQUEST_FILENAME|IS_SUBREQ|HTTPS)|(.*?))(\\})' },
+ { token: [ 'entity.mime-type.apacheconf', 'text' ],
+ regex: '\\b((?:text|image|application|video|audio)/.+?)(\\s)' },
+ { token: 'entity.helper.apacheconf',
+ regex: '\\b(?:from|unset|set|on|off)\\b',
+ caseInsensitive: true },
+ { token: 'constant.integer.apacheconf', regex: '\\b\\d+\\b' },
+ { token:
+ [ 'text',
+ 'punctuation.definition.flag.apacheconf',
+ 'string.flag.apacheconf',
+ 'punctuation.definition.flag.apacheconf',
+ 'text' ],
+ regex: '(\\s)(\\[)(.*?)(\\])(\\s)' } ] }
+
+ this.normalizeRules();
+};
+
+ApacheConfHighlightRules.metaData = { fileTypes:
+ [ 'conf',
+ 'CONF',
+ 'htaccess',
+ 'HTACCESS',
+ 'htgroups',
+ 'HTGROUPS',
+ 'htpasswd',
+ 'HTPASSWD',
+ '.htaccess',
+ '.HTACCESS',
+ '.htgroups',
+ '.HTGROUPS',
+ '.htpasswd',
+ '.HTPASSWD' ],
+ name: 'Apache Conf',
+ scopeName: 'source.apacheconf' }
+
+
+oop.inherits(ApacheConfHighlightRules, TextHighlightRules);
+
+exports.ApacheConfHighlightRules = ApacheConfHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/apache_conf",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apache_conf_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ApacheConfHighlightRules = require("./apache_conf_highlight_rules").ApacheConfHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ApacheConfHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/apache_conf";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-applescript.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-applescript.js
new file mode 100644
index 00000000..936ce2f7
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-applescript.js
@@ -0,0 +1,271 @@
+ace.define("ace/mode/applescript_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 AppleScriptHighlightRules = function() {
+ var keywords = (
+ "about|above|after|against|and|around|as|at|back|before|beginning|" +
+ "behind|below|beneath|beside|between|but|by|considering|" +
+ "contain|contains|continue|copy|div|does|eighth|else|end|equal|" +
+ "equals|error|every|exit|fifth|first|for|fourth|from|front|" +
+ "get|given|global|if|ignoring|in|into|is|it|its|last|local|me|" +
+ "middle|mod|my|ninth|not|of|on|onto|or|over|prop|property|put|ref|" +
+ "reference|repeat|returning|script|second|set|seventh|since|" +
+ "sixth|some|tell|tenth|that|the|then|third|through|thru|" +
+ "timeout|times|to|transaction|try|until|where|while|whose|with|without"
+ );
+
+ var builtinConstants = (
+ "AppleScript|false|linefeed|return|pi|quote|result|space|tab|true"
+ );
+
+ var builtinFunctions = (
+ "activate|beep|count|delay|launch|log|offset|read|round|run|say|" +
+ "summarize|write"
+ );
+
+ var builtinTypes = (
+ "alias|application|boolean|class|constant|date|file|integer|list|" +
+ "number|real|record|string|text|character|characters|contents|day|" +
+ "frontmost|id|item|length|month|name|paragraph|paragraphs|rest|" +
+ "reverse|running|time|version|weekday|word|words|year"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtinFunctions,
+ "constant.language": builtinConstants,
+ "support.type": builtinTypes,
+ "keyword": keywords
+ }, "identifier");
+
+ this.$rules = {
+ "start": [
+ {
+ token: "comment",
+ regex: "--.*$"
+ },
+ {
+ token : "comment", // multi line comment
+ regex : "\\(\\*",
+ next : "comment"
+ },
+ {
+ token: "string", // " string
+ regex: '".*?"'
+ },
+ {
+ token: "support.type",
+ regex: '\\b(POSIX file|POSIX path|(date|time) string|quoted form)\\b'
+ },
+ {
+ token: "support.function",
+ regex: '\\b(clipboard info|the clipboard|info for|list (disks|folder)|' +
+ 'mount volume|path to|(close|open for) access|(get|set) eof|' +
+ 'current date|do shell script|get volume settings|random number|' +
+ 'set volume|system attribute|system info|time to GMT|' +
+ '(load|run|store) script|scripting components|' +
+ 'ASCII (character|number)|localized string|' +
+ 'choose (application|color|file|file name|' +
+ 'folder|from list|remote application|URL)|' +
+ 'display (alert|dialog))\\b|^\\s*return\\b'
+ },
+ {
+ token: "constant.language",
+ regex: '\\b(text item delimiters|current application|missing value)\\b'
+ },
+ {
+ token: "keyword",
+ regex: '\\b(apart from|aside from|instead of|out of|greater than|' +
+ "isn't|(doesn't|does not) (equal|come before|come after|contain)|" +
+ '(greater|less) than( or equal)?|(starts?|ends|begins?) with|' +
+ 'contained by|comes (before|after)|a (ref|reference))\\b'
+ },
+ {
+ token: keywordMapper,
+ regex: "[a-zA-Z][a-zA-Z0-9_]*\\b"
+ }
+ ],
+ "comment": [
+ {
+ token: "comment", // closing comment
+ regex: "\\*\\)",
+ next: "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ]
+ }
+
+ this.normalizeRules();
+};
+
+oop.inherits(AppleScriptHighlightRules, TextHighlightRules);
+
+exports.AppleScriptHighlightRules = AppleScriptHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/applescript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/applescript_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var AppleScriptHighlightRules = require("./applescript_highlight_rules").AppleScriptHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = AppleScriptHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "(*", end: "*)"};
+ this.$id = "ace/mode/applescript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-asciidoc.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-asciidoc.js
new file mode 100644
index 00000000..f112cec3
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-asciidoc.js
@@ -0,0 +1,342 @@
+ace.define("ace/mode/asciidoc_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 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) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/asciidoc_highlight_rules","ace/mode/folding/asciidoc"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var AsciidocHighlightRules = require("./asciidoc_highlight_rules").AsciidocHighlightRules;
+var AsciidocFoldMode = require("./folding/asciidoc").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = AsciidocHighlightRules;
+
+ this.foldingRules = new AsciidocFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.type = "text";
+ 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);
+ }
+ };
+ this.$id = "ace/mode/asciidoc";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-assembly_x86.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-assembly_x86.js
new file mode 100644
index 00000000..f6a56f1b
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-assembly_x86.js
@@ -0,0 +1,186 @@
+ace.define("ace/mode/assembly_x86_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 AssemblyX86HighlightRules = function() {
+
+ this.$rules = { start:
+ [ { token: 'keyword.control.assembly',
+ regex: '\\b(?:aaa|aad|aam|aas|adc|add|addpd|addps|addsd|addss|addsubpd|addsubps|aesdec|aesdeclast|aesenc|aesenclast|aesimc|aeskeygenassist|and|andpd|andps|andnpd|andnps|arpl|blendpd|blendps|blendvpd|blendvps|bound|bsf|bsr|bswap|bt|btc|btr|bts|cbw|cwde|cdqe|clc|cld|cflush|clts|cmc|cmov(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|cmp|cmppd|cmpps|cmps|cnpsb|cmpsw|cmpsd|cmpsq|cmpss|cmpxchg|cmpxchg8b|cmpxchg16b|comisd|comiss|cpuid|crc32|cvtdq2pd|cvtdq2ps|cvtpd2dq|cvtpd2pi|cvtpd2ps|cvtpi2pd|cvtpi2ps|cvtps2dq|cvtps2pd|cvtps2pi|cvtsd2si|cvtsd2ss|cvts2sd|cvtsi2ss|cvtss2sd|cvtss2si|cvttpd2dq|cvtpd2pi|cvttps2dq|cvttps2pi|cvttps2dq|cvttps2pi|cvttsd2si|cvttss2si|cwd|cdq|cqo|daa|das|dec|div|divpd|divps|divsd|divss|dppd|dpps|emms|enter|extractps|f2xm1|fabs|fadd|faddp|fiadd|fbld|fbstp|fchs|fclex|fnclex|fcmov(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|fcom|fcmop|fcompp|fcomi|fcomip|fucomi|fucomip|fcos|fdecstp|fdiv|fdivp|fidiv|fdivr|fdivrp|fidivr|ffree|ficom|ficomp|fild|fincstp|finit|fnint|fist|fistp|fisttp|fld|fld1|fldl2t|fldl2e|fldpi|fldlg2|fldln2|fldz|fldcw|fldenv|fmul|fmulp|fimul|fnop|fpatan|fprem|fprem1|fptan|frndint|frstor|fsave|fnsave|fscale|fsin|fsincos|fsqrt|fst|fstp|fstcw|fnstcw|fstenv|fnstenv|fsts|fnstsw|fsub|fsubp|fisub|fsubr|fsubrp|fisubr|ftst|fucom|fucomp|fucompp|fxam|fxch|fxrstor|fxsave|fxtract|fyl2x|fyl2xp1|haddpd|haddps|husbpd|hsubps|idiv|imul|in|inc|ins|insb|insw|insd|insertps|int|into|invd|invplg|invpcid|iret|iretd|iretq|lahf|lar|lddqu|ldmxcsr|lds|les|lfs|lgs|lss|lea|leave|lfence|lgdt|lidt|llgdt|lmsw|lock|lods|lodsb|lodsw|lodsd|lodsq|lsl|ltr|maskmovdqu|maskmovq|maxpd|maxps|maxsd|maxss|mfence|minpd|minps|minsd|minss|monitor|mov|movapd|movaps|movbe|movd|movq|movddup|movdqa|movdqu|movq2q|movhlps|movhpd|movhps|movlhps|movlpd|movlps|movmskpd|movmskps|movntdqa|movntdq|movnti|movntpd|movntps|movntq|movq|movq2dq|movs|movsb|movsw|movsd|movsq|movsd|movshdup|movsldup|movss|movsx|movsxd|movupd|movups|movzx|mpsadbw|mul|mulpd|mulps|mulsd|mulss|mwait|neg|not|or|orpd|orps|out|outs|outsb|outsw|outsd|pabsb|pabsw|pabsd|packsswb|packssdw|packusdw|packuswbpaddb|paddw|paddd|paddq|paddsb|paddsw|paddusb|paddusw|palignr|pand|pandn|pause|pavgb|pavgw|pblendvb|pblendw|pclmulqdq|pcmpeqb|pcmpeqw|pcmpeqd|pcmpeqq|pcmpestri|pcmpestrm|pcmptb|pcmptgw|pcmpgtd|pcmpgtq|pcmpistri|pcmpisrm|pextrb|pextrd|pextrq|pextrw|phaddw|phaddd|phaddsw|phinposuw|phsubw|phsubd|phsubsw|pinsrb|pinsrd|pinsrq|pinsrw|pmaddubsw|pmadddwd|pmaxsb|pmaxsd|pmaxsw|pmaxsw|pmaxub|pmaxud|pmaxuw|pminsb|pminsd|pminsw|pminub|pminud|pminuw|pmovmskb|pmovsx|pmovzx|pmuldq|pmulhrsw|pmulhuw|pmulhw|pmulld|pmullw|pmuludw|pop|popa|popad|popcnt|popf|popfd|popfq|por|prefetch|psadbw|pshufb|pshufd|pshufhw|pshuflw|pshufw|psignb|psignw|psignd|pslldq|psllw|pslld|psllq|psraw|psrad|psrldq|psrlw|psrld|psrlq|psubb|psubw|psubd|psubq|psubsb|psubsw|psubusb|psubusw|test|ptest|punpckhbw|punpckhwd|punpckhdq|punpckhddq|punpcklbw|punpcklwd|punpckldq|punpckldqd|push|pusha|pushad|pushf|pushfd|pxor|prcl|rcr|rol|ror|rcpps|rcpss|rdfsbase|rdgsbase|rdmsr|rdpmc|rdrand|rdtsc|rdtscp|rep|repe|repz|repne|repnz|roundpd|roundps|roundsd|roundss|rsm|rsqrps|rsqrtss|sahf|sal|sar|shl|shr|sbb|scas|scasb|scasw|scasd|set(?:n?e|ge?|ae?|le?|be?|n?o|n?z)|sfence|sgdt|shld|shrd|shufpd|shufps|sidt|sldt|smsw|sqrtpd|sqrtps|sqrtsd|sqrtss|stc|std|stmxcsr|stos|stosb|stosw|stosd|stosq|str|sub|subpd|subps|subsd|subss|swapgs|syscall|sysenter|sysexit|sysret|teset|ucomisd|ucomiss|ud2|unpckhpd|unpckhps|unpcklpd|unpcklps|vbroadcast|vcvtph2ps|vcvtp2sph|verr|verw|vextractf128|vinsertf128|vmaskmov|vpermilpd|vpermilps|vperm2f128|vtestpd|vtestps|vzeroall|vzeroupper|wait|fwait|wbinvd|wrfsbase|wrgsbase|wrmsr|xadd|xchg|xgetbv|xlat|xlatb|xor|xorpd|xorps|xrstor|xsave|xsaveopt|xsetbv|lzcnt|extrq|insertq|movntsd|movntss|vfmaddpd|vfmaddps|vfmaddsd|vfmaddss|vfmaddsubbpd|vfmaddsubps|vfmsubaddpd|vfmsubaddps|vfmsubpd|vfmsubps|vfmsubsd|vfnmaddpd|vfnmaddps|vfnmaddsd|vfnmaddss|vfnmsubpd|vfnmusbps|vfnmusbsd|vfnmusbss|cvt|xor|cli|sti|hlt|nop|lock|wait|enter|leave|ret|loop(?:n?e|n?z)?|call|j(?:mp|n?e|ge?|ae?|le?|be?|n?o|n?z))\\b',
+ caseInsensitive: true },
+ { token: 'variable.parameter.register.assembly',
+ regex: '\\b(?:CS|DS|ES|FS|GS|SS|RAX|EAX|RBX|EBX|RCX|ECX|RDX|EDX|RCX|RIP|EIP|IP|RSP|ESP|SP|RSI|ESI|SI|RDI|EDI|DI|RFLAGS|EFLAGS|FLAGS|R8-15|(?:Y|X)MM(?:[0-9]|10|11|12|13|14|15)|(?:A|B|C|D)(?:X|H|L)|CR(?:[0-4]|DR(?:[0-7]|TR6|TR7|EFER)))\\b',
+ caseInsensitive: true },
+ { token: 'constant.character.decimal.assembly',
+ regex: '\\b[0-9]+\\b' },
+ { token: 'constant.character.hexadecimal.assembly',
+ regex: '\\b0x[A-F0-9]+\\b',
+ caseInsensitive: true },
+ { token: 'constant.character.hexadecimal.assembly',
+ regex: '\\b[A-F0-9]+h\\b',
+ caseInsensitive: true },
+ { token: 'string.assembly', regex: /'([^\\']|\\.)*'/ },
+ { token: 'string.assembly', regex: /"([^\\"]|\\.)*"/ },
+ { token: 'support.function.directive.assembly',
+ regex: '^\\[',
+ push:
+ [ { token: 'support.function.directive.assembly',
+ regex: '\\]$',
+ next: 'pop' },
+ { defaultToken: 'support.function.directive.assembly' } ] },
+ { token:
+ [ 'support.function.directive.assembly',
+ 'support.function.directive.assembly',
+ 'entity.name.function.assembly' ],
+ regex: '(^struc)( )([_a-zA-Z][_a-zA-Z0-9]*)' },
+ { token: 'support.function.directive.assembly',
+ regex: '^endstruc\\b' },
+ { token:
+ [ 'support.function.directive.assembly',
+ 'entity.name.function.assembly',
+ 'support.function.directive.assembly',
+ 'constant.character.assembly' ],
+ regex: '^(%macro )([_a-zA-Z][_a-zA-Z0-9]*)( )([0-9]+)' },
+ { token: 'support.function.directive.assembly',
+ regex: '^%endmacro' },
+ { token:
+ [ 'text',
+ 'support.function.directive.assembly',
+ 'text',
+ 'entity.name.function.assembly' ],
+ regex: '(\\s*)(%define|%xdefine|%idefine|%undef|%assign|%defstr|%strcat|%strlen|%substr|%00|%0|%rotate|%rep|%endrep|%include|\\$\\$|\\$|%unmacro|%if|%elif|%else|%endif|%(?:el)?ifdef|%(?:el)?ifmacro|%(?:el)?ifctx|%(?:el)?ifidn|%(?:el)?ifidni|%(?:el)?ifid|%(?:el)?ifnum|%(?:el)?ifstr|%(?:el)?iftoken|%(?:el)?ifempty|%(?:el)?ifenv|%pathsearch|%depend|%use|%push|%pop|%repl|%arg|%stacksize|%local|%error|%warning|%fatal|%line|%!|%comment|%endcomment|__NASM_VERSION_ID__|__NASM_VER__|__FILE__|__LINE__|__BITS__|__OUTPUT_FORMAT__|__DATE__|__TIME__|__DATE_NUM__|_TIME__NUM__|__UTC_DATE__|__UTC_TIME__|__UTC_DATE_NUM__|__UTC_TIME_NUM__|__POSIX_TIME__|__PASS__|ISTRUC|AT|IEND|BITS 16|BITS 32|BITS 64|USE16|USE32|__SECT__|ABSOLUTE|EXTERN|GLOBAL|COMMON|CPU|FLOAT)\\b( ?)((?:[_a-zA-Z][_a-zA-Z0-9]*)?)',
+ caseInsensitive: true },
+ { token: 'support.function.directive.assembly',
+ regex: '\\b(?:d[bwdqtoy]|res[bwdqto]|equ|times|align|alignb|sectalign|section|ptr|byte|word|dword|qword|incbin)\\b',
+ caseInsensitive: true },
+ { token: 'entity.name.function.assembly', regex: '^\\s*%%[\\w.]+?:$' },
+ { token: 'entity.name.function.assembly', regex: '^\\s*%\\$[\\w.]+?:$' },
+ { token: 'entity.name.function.assembly', regex: '^[\\w.]+?:' },
+ { token: 'entity.name.function.assembly', regex: '^[\\w.]+?\\b' },
+ { token: 'comment.assembly', regex: ';.*$' } ]
+ }
+
+ this.normalizeRules();
+};
+
+AssemblyX86HighlightRules.metaData = { fileTypes: [ 'asm' ],
+ name: 'Assembly x86',
+ scopeName: 'source.assembly' }
+
+
+oop.inherits(AssemblyX86HighlightRules, TextHighlightRules);
+
+exports.AssemblyX86HighlightRules = AssemblyX86HighlightRules;
+});
+
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/assembly_x86",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/assembly_x86_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var AssemblyX86HighlightRules = require("./assembly_x86_highlight_rules").AssemblyX86HighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = AssemblyX86HighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = ";";
+ this.$id = "ace/mode/assembly_x86";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-autohotkey.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-autohotkey.js
new file mode 100644
index 00000000..538e6fd7
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-autohotkey.js
@@ -0,0 +1,235 @@
+ace.define("ace/mode/autohotkey_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 AutoHotKeyHighlightRules = function() {
+ var autoItKeywords = 'And|ByRef|Case|Const|ContinueCase|ContinueLoop|Default|Dim|Do|Else|ElseIf|EndFunc|EndIf|EndSelect|EndSwitch|EndWith|Enum|Exit|ExitLoop|False|For|Func|Global|If|In|Local|Next|Not|Or|ReDim|Return|Select|Step|Switch|Then|To|True|Until|WEnd|While|With|' +
+ 'Abs|ACos|AdlibDisable|AdlibEnable|Asc|AscW|ASin|Assign|ATan|AutoItSetOption|AutoItWinGetTitle|AutoItWinSetTitle|Beep|Binary|BinaryLen|BinaryMid|BinaryToString|BitAND|BitNOT|BitOR|BitRotate|BitShift|BitXOR|BlockInput|Break|Call|CDTray|Ceiling|Chr|ChrW|ClipGet|ClipPut|ConsoleRead|ConsoleWrite|ConsoleWriteError|ControlClick|ControlCommand|ControlDisable|ControlEnable|ControlFocus|ControlGetFocus|ControlGetHandle|ControlGetPos|ControlGetText|ControlHide|ControlListView|ControlMove|ControlSend|ControlSetText|ControlShow|ControlTreeView|Cos|Dec|DirCopy|DirCreate|DirGetSize|DirMove|DirRemove|DllCall|DllCallbackFree|DllCallbackGetPtr|DllCallbackRegister|DllClose|DllOpen|DllStructCreate|DllStructGetData|DllStructGetPtr|DllStructGetSize|DllStructSetData|DriveGetDrive|DriveGetFileSystem|DriveGetLabel|DriveGetSerial|DriveGetType|DriveMapAdd|DriveMapDel|DriveMapGet|DriveSetLabel|DriveSpaceFree|DriveSpaceTotal|DriveStatus|EnvGet|EnvSet|EnvUpdate|Eval|Execute|Exp|FileChangeDir|FileClose|FileCopy|FileCreateNTFSLink|FileCreateShortcut|FileDelete|FileExists|FileFindFirstFile|FileFindNextFile|FileGetAttrib|FileGetLongName|FileGetShortcut|FileGetShortName|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileOpen|FileOpenDialog|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileSaveDialog|FileSelectFolder|FileSetAttrib|FileSetTime|FileWrite|FileWriteLine|Floor|FtpSetProxy|GUICreate|GUICtrlCreateAvi|GUICtrlCreateButton|GUICtrlCreateCheckbox|GUICtrlCreateCombo|GUICtrlCreateContextMenu|GUICtrlCreateDate|GUICtrlCreateDummy|GUICtrlCreateEdit|GUICtrlCreateGraphic|GUICtrlCreateGroup|GUICtrlCreateIcon|GUICtrlCreateInput|GUICtrlCreateLabel|GUICtrlCreateList|GUICtrlCreateListView|GUICtrlCreateListViewItem|GUICtrlCreateMenu|GUICtrlCreateMenuItem|GUICtrlCreateMonthCal|GUICtrlCreateObj|GUICtrlCreatePic|GUICtrlCreateProgress|GUICtrlCreateRadio|GUICtrlCreateSlider|GUICtrlCreateTab|GUICtrlCreateTabItem|GUICtrlCreateTreeView|GUICtrlCreateTreeViewItem|GUICtrlCreateUpdown|GUICtrlDelete|GUICtrlGetHandle|GUICtrlGetState|GUICtrlRead|GUICtrlRecvMsg|GUICtrlRegisterListViewSort|GUICtrlSendMsg|GUICtrlSendToDummy|GUICtrlSetBkColor|GUICtrlSetColor|GUICtrlSetCursor|GUICtrlSetData|GUICtrlSetFont|GUICtrlSetDefColor|GUICtrlSetDefBkColor|GUICtrlSetGraphic|GUICtrlSetImage|GUICtrlSetLimit|GUICtrlSetOnEvent|GUICtrlSetPos|GUICtrlSetResizing|GUICtrlSetState|GUICtrlSetStyle|GUICtrlSetTip|GUIDelete|GUIGetCursorInfo|GUIGetMsg|GUIGetStyle|GUIRegisterMsg|GUISetAccelerators()|GUISetBkColor|GUISetCoord|GUISetCursor|GUISetFont|GUISetHelp|GUISetIcon|GUISetOnEvent|GUISetState|GUISetStyle|GUIStartGroup|GUISwitch|Hex|HotKeySet|HttpSetProxy|HWnd|InetGet|InetGetSize|IniDelete|IniRead|IniReadSection|IniReadSectionNames|IniRenameSection|IniWrite|IniWriteSection|InputBox|Int|IsAdmin|IsArray|IsBinary|IsBool|IsDeclared|IsDllStruct|IsFloat|IsHWnd|IsInt|IsKeyword|IsNumber|IsObj|IsPtr|IsString|Log|MemGetStats|Mod|MouseClick|MouseClickDrag|MouseDown|MouseGetCursor|MouseGetPos|MouseMove|MouseUp|MouseWheel|MsgBox|Number|ObjCreate|ObjEvent|ObjGet|ObjName|Opt|Ping|PixelChecksum|PixelGetColor|PixelSearch|PluginClose|PluginOpen|ProcessClose|ProcessExists|ProcessGetStats|ProcessList|ProcessSetPriority|ProcessWait|ProcessWaitClose|ProgressOff|ProgressOn|ProgressSet|Ptr|Random|RegDelete|RegEnumKey|RegEnumVal|RegRead|RegWrite|Round|Run|RunAs|RunAsWait|RunWait|Send|SendKeepActive|SetError|SetExtended|ShellExecute|ShellExecuteWait|Shutdown|Sin|Sleep|SoundPlay|SoundSetWaveVolume|SplashImageOn|SplashOff|SplashTextOn|Sqrt|SRandom|StatusbarGetText|StderrRead|StdinWrite|StdioClose|StdoutRead|String|StringAddCR|StringCompare|StringFormat|StringInStr|StringIsAlNum|StringIsAlpha|StringIsASCII|StringIsDigit|StringIsFloat|StringIsInt|StringIsLower|StringIsSpace|StringIsUpper|StringIsXDigit|StringLeft|StringLen|StringLower|StringMid|StringRegExp|StringRegExpReplace|StringReplace|StringRight|StringSplit|StringStripCR|StringStripWS|StringToBinary|StringTrimLeft|StringTrimRight|StringUpper|Tan|TCPAccept|TCPCloseSocket|TCPConnect|TCPListen|TCPNameToIP|TCPRecv|TCPSend|TCPShutdown|TCPStartup|TimerDiff|TimerInit|ToolTip|TrayCreateItem|TrayCreateMenu|TrayGetMsg|TrayItemDelete|TrayItemGetHandle|TrayItemGetState|TrayItemGetText|TrayItemSetOnEvent|TrayItemSetState|TrayItemSetText|TraySetClick|TraySetIcon|TraySetOnEvent|TraySetPauseIcon|TraySetState|TraySetToolTip|TrayTip|UBound|UDPBind|UDPCloseSocket|UDPOpen|UDPRecv|UDPSend|UDPShutdown|UDPStartup|VarGetType|WinActivate|WinActive|WinClose|WinExists|WinFlash|WinGetCaretPos|WinGetClassList|WinGetClientSize|WinGetHandle|WinGetPos|WinGetProcess|WinGetState|WinGetText|WinGetTitle|WinKill|WinList|WinMenuSelectItem|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinSetOnTop|WinSetState|WinSetTitle|WinSetTrans|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive|' +
+ 'ArrayAdd|ArrayBinarySearch|ArrayConcatenate|ArrayDelete|ArrayDisplay|ArrayFindAll|ArrayInsert|ArrayMax|ArrayMaxIndex|ArrayMin|ArrayMinIndex|ArrayPop|ArrayPush|ArrayReverse|ArraySearch|ArraySort|ArraySwap|ArrayToClip|ArrayToString|ArrayTrim|ChooseColor|ChooseFont|ClipBoard_ChangeChain|ClipBoard_Close|ClipBoard_CountFormats|ClipBoard_Empty|ClipBoard_EnumFormats|ClipBoard_FormatStr|ClipBoard_GetData|ClipBoard_GetDataEx|ClipBoard_GetFormatName|ClipBoard_GetOpenWindow|ClipBoard_GetOwner|ClipBoard_GetPriorityFormat|ClipBoard_GetSequenceNumber|ClipBoard_GetViewer|ClipBoard_IsFormatAvailable|ClipBoard_Open|ClipBoard_RegisterFormat|ClipBoard_SetData|ClipBoard_SetDataEx|ClipBoard_SetViewer|ClipPutFile|ColorConvertHSLtoRGB|ColorConvertRGBtoHSL|ColorGetBlue|ColorGetGreen|ColorGetRed|Date_Time_CompareFileTime|Date_Time_DOSDateTimeToArray|Date_Time_DOSDateTimeToFileTime|Date_Time_DOSDateTimeToStr|Date_Time_DOSDateToArray|Date_Time_DOSDateToStr|Date_Time_DOSTimeToArray|Date_Time_DOSTimeToStr|Date_Time_EncodeFileTime|Date_Time_EncodeSystemTime|Date_Time_FileTimeToArray|Date_Time_FileTimeToDOSDateTime|Date_Time_FileTimeToLocalFileTime|Date_Time_FileTimeToStr|Date_Time_FileTimeToSystemTime|Date_Time_GetFileTime|Date_Time_GetLocalTime|Date_Time_GetSystemTime|Date_Time_GetSystemTimeAdjustment|Date_Time_GetSystemTimeAsFileTime|Date_Time_GetSystemTimes|Date_Time_GetTickCount|Date_Time_GetTimeZoneInformation|Date_Time_LocalFileTimeToFileTime|Date_Time_SetFileTime|Date_Time_SetLocalTime|Date_Time_SetSystemTime|Date_Time_SetSystemTimeAdjustment|Date_Time_SetTimeZoneInformation|Date_Time_SystemTimeToArray|Date_Time_SystemTimeToDateStr|Date_Time_SystemTimeToDateTimeStr|Date_Time_SystemTimeToFileTime|Date_Time_SystemTimeToTimeStr|Date_Time_SystemTimeToTzSpecificLocalTime|Date_Time_TzSpecificLocalTimeToSystemTime|DateAdd|DateDayOfWeek|DateDaysInMonth|DateDiff|DateIsLeapYear|DateIsValid|DateTimeFormat|DateTimeSplit|DateToDayOfWeek|DateToDayOfWeekISO|DateToDayValue|DateToMonth|DayValueToDate|DebugBugReportEnv|DebugOut|DebugSetup|Degree|EventLog__Backup|EventLog__Clear|EventLog__Close|EventLog__Count|EventLog__DeregisterSource|EventLog__Full|EventLog__Notify|EventLog__Oldest|EventLog__Open|EventLog__OpenBackup|EventLog__Read|EventLog__RegisterSource|EventLog__Report|FileCountLines|FileCreate|FileListToArray|FilePrint|FileReadToArray|FileWriteFromArray|FileWriteLog|FileWriteToLine|GDIPlus_ArrowCapCreate|GDIPlus_ArrowCapDispose|GDIPlus_ArrowCapGetFillState|GDIPlus_ArrowCapGetHeight|GDIPlus_ArrowCapGetMiddleInset|GDIPlus_ArrowCapGetWidth|GDIPlus_ArrowCapSetFillState|GDIPlus_ArrowCapSetHeight|GDIPlus_ArrowCapSetMiddleInset|GDIPlus_ArrowCapSetWidth|GDIPlus_BitmapCloneArea|GDIPlus_BitmapCreateFromFile|GDIPlus_BitmapCreateFromGraphics|GDIPlus_BitmapCreateFromHBITMAP|GDIPlus_BitmapCreateHBITMAPFromBitmap|GDIPlus_BitmapDispose|GDIPlus_BitmapLockBits|GDIPlus_BitmapUnlockBits|GDIPlus_BrushClone|GDIPlus_BrushCreateSolid|GDIPlus_BrushDispose|GDIPlus_BrushGetType|GDIPlus_CustomLineCapDispose|GDIPlus_Decoders|GDIPlus_DecodersGetCount|GDIPlus_DecodersGetSize|GDIPlus_Encoders|GDIPlus_EncodersGetCLSID|GDIPlus_EncodersGetCount|GDIPlus_EncodersGetParamList|GDIPlus_EncodersGetParamListSize|GDIPlus_EncodersGetSize|GDIPlus_FontCreate|GDIPlus_FontDispose|GDIPlus_FontFamilyCreate|GDIPlus_FontFamilyDispose|GDIPlus_GraphicsClear|GDIPlus_GraphicsCreateFromHDC|GDIPlus_GraphicsCreateFromHWND|GDIPlus_GraphicsDispose|GDIPlus_GraphicsDrawArc|GDIPlus_GraphicsDrawBezier|GDIPlus_GraphicsDrawClosedCurve|GDIPlus_GraphicsDrawCurve|GDIPlus_GraphicsDrawEllipse|GDIPlus_GraphicsDrawImage|GDIPlus_GraphicsDrawImageRect|GDIPlus_GraphicsDrawImageRectRect|GDIPlus_GraphicsDrawLine|GDIPlus_GraphicsDrawPie|GDIPlus_GraphicsDrawPolygon|GDIPlus_GraphicsDrawRect|GDIPlus_GraphicsDrawString|GDIPlus_GraphicsDrawStringEx|GDIPlus_GraphicsFillClosedCurve|GDIPlus_GraphicsFillEllipse|GDIPlus_GraphicsFillPie|GDIPlus_GraphicsFillRect|GDIPlus_GraphicsGetDC|GDIPlus_GraphicsGetSmoothingMode|GDIPlus_GraphicsMeasureString|GDIPlus_GraphicsReleaseDC|GDIPlus_GraphicsSetSmoothingMode|GDIPlus_GraphicsSetTransform|GDIPlus_ImageDispose|GDIPlus_ImageGetGraphicsContext|GDIPlus_ImageGetHeight|GDIPlus_ImageGetWidth|GDIPlus_ImageLoadFromFile|GDIPlus_ImageSaveToFile|GDIPlus_ImageSaveToFileEx|GDIPlus_MatrixCreate|GDIPlus_MatrixDispose|GDIPlus_MatrixRotate|GDIPlus_ParamAdd|GDIPlus_ParamInit|GDIPlus_PenCreate|GDIPlus_PenDispose|GDIPlus_PenGetAlignment|GDIPlus_PenGetColor|GDIPlus_PenGetCustomEndCap|GDIPlus_PenGetDashCap|GDIPlus_PenGetDashStyle|GDIPlus_PenGetEndCap|GDIPlus_PenGetWidth|GDIPlus_PenSetAlignment|GDIPlus_PenSetColor|GDIPlus_PenSetCustomEndCap|GDIPlus_PenSetDashCap|GDIPlus_PenSetDashStyle|GDIPlus_PenSetEndCap|GDIPlus_PenSetWidth|GDIPlus_RectFCreate|GDIPlus_Shutdown|GDIPlus_Startup|GDIPlus_StringFormatCreate|GDIPlus_StringFormatDispose|GetIP|GUICtrlAVI_Close|GUICtrlAVI_Create|GUICtrlAVI_Destroy|GUICtrlAVI_Open|GUICtrlAVI_OpenEx|GUICtrlAVI_Play|GUICtrlAVI_Seek|GUICtrlAVI_Show|GUICtrlAVI_Stop|GUICtrlButton_Click|GUICtrlButton_Create|GUICtrlButton_Destroy|GUICtrlButton_Enable|GUICtrlButton_GetCheck|GUICtrlButton_GetFocus|GUICtrlButton_GetIdealSize|GUICtrlButton_GetImage|GUICtrlButton_GetImageList|GUICtrlButton_GetState|GUICtrlButton_GetText|GUICtrlButton_GetTextMargin|GUICtrlButton_SetCheck|GUICtrlButton_SetFocus|GUICtrlButton_SetImage|GUICtrlButton_SetImageList|GUICtrlButton_SetSize|GUICtrlButton_SetState|GUICtrlButton_SetStyle|GUICtrlButton_SetText|GUICtrlButton_SetTextMargin|GUICtrlButton_Show|GUICtrlComboBox_AddDir|GUICtrlComboBox_AddString|GUICtrlComboBox_AutoComplete|GUICtrlComboBox_BeginUpdate|GUICtrlComboBox_Create|GUICtrlComboBox_DeleteString|GUICtrlComboBox_Destroy|GUICtrlComboBox_EndUpdate|GUICtrlComboBox_FindString|GUICtrlComboBox_FindStringExact|GUICtrlComboBox_GetComboBoxInfo|GUICtrlComboBox_GetCount|GUICtrlComboBox_GetCurSel|GUICtrlComboBox_GetDroppedControlRect|GUICtrlComboBox_GetDroppedControlRectEx|GUICtrlComboBox_GetDroppedState|GUICtrlComboBox_GetDroppedWidth|GUICtrlComboBox_GetEditSel|GUICtrlComboBox_GetEditText|GUICtrlComboBox_GetExtendedUI|GUICtrlComboBox_GetHorizontalExtent|GUICtrlComboBox_GetItemHeight|GUICtrlComboBox_GetLBText|GUICtrlComboBox_GetLBTextLen|GUICtrlComboBox_GetList|GUICtrlComboBox_GetListArray|GUICtrlComboBox_GetLocale|GUICtrlComboBox_GetLocaleCountry|GUICtrlComboBox_GetLocaleLang|GUICtrlComboBox_GetLocalePrimLang|GUICtrlComboBox_GetLocaleSubLang|GUICtrlComboBox_GetMinVisible|GUICtrlComboBox_GetTopIndex|GUICtrlComboBox_InitStorage|GUICtrlComboBox_InsertString|GUICtrlComboBox_LimitText|GUICtrlComboBox_ReplaceEditSel|GUICtrlComboBox_ResetContent|GUICtrlComboBox_SelectString|GUICtrlComboBox_SetCurSel|GUICtrlComboBox_SetDroppedWidth|GUICtrlComboBox_SetEditSel|GUICtrlComboBox_SetEditText|GUICtrlComboBox_SetExtendedUI|GUICtrlComboBox_SetHorizontalExtent|GUICtrlComboBox_SetItemHeight|GUICtrlComboBox_SetMinVisible|GUICtrlComboBox_SetTopIndex|GUICtrlComboBox_ShowDropDown|GUICtrlComboBoxEx_AddDir|GUICtrlComboBoxEx_AddString|GUICtrlComboBoxEx_BeginUpdate|GUICtrlComboBoxEx_Create|GUICtrlComboBoxEx_CreateSolidBitMap|GUICtrlComboBoxEx_DeleteString|GUICtrlComboBoxEx_Destroy|GUICtrlComboBoxEx_EndUpdate|GUICtrlComboBoxEx_FindStringExact|GUICtrlComboBoxEx_GetComboBoxInfo|GUICtrlComboBoxEx_GetComboControl|GUICtrlComboBoxEx_GetCount|GUICtrlComboBoxEx_GetCurSel|GUICtrlComboBoxEx_GetDroppedControlRect|GUICtrlComboBoxEx_GetDroppedControlRectEx|GUICtrlComboBoxEx_GetDroppedState|GUICtrlComboBoxEx_GetDroppedWidth|GUICtrlComboBoxEx_GetEditControl|GUICtrlComboBoxEx_GetEditSel|GUICtrlComboBoxEx_GetEditText|GUICtrlComboBoxEx_GetExtendedStyle|GUICtrlComboBoxEx_GetExtendedUI|GUICtrlComboBoxEx_GetImageList|GUICtrlComboBoxEx_GetItem|GUICtrlComboBoxEx_GetItemEx|GUICtrlComboBoxEx_GetItemHeight|GUICtrlComboBoxEx_GetItemImage|GUICtrlComboBoxEx_GetItemIndent|GUICtrlComboBoxEx_GetItemOverlayImage|GUICtrlComboBoxEx_GetItemParam|GUICtrlComboBoxEx_GetItemSelectedImage|GUICtrlComboBoxEx_GetItemText|GUICtrlComboBoxEx_GetItemTextLen|GUICtrlComboBoxEx_GetList|GUICtrlComboBoxEx_GetListArray|GUICtrlComboBoxEx_GetLocale|GUICtrlComboBoxEx_GetLocaleCountry|GUICtrlComboBoxEx_GetLocaleLang|GUICtrlComboBoxEx_GetLocalePrimLang|GUICtrlComboBoxEx_GetLocaleSubLang|GUICtrlComboBoxEx_GetMinVisible|GUICtrlComboBoxEx_GetTopIndex|GUICtrlComboBoxEx_InitStorage|GUICtrlComboBoxEx_InsertString|GUICtrlComboBoxEx_LimitText|GUICtrlComboBoxEx_ReplaceEditSel|GUICtrlComboBoxEx_ResetContent|GUICtrlComboBoxEx_SetCurSel|GUICtrlComboBoxEx_SetDroppedWidth|GUICtrlComboBoxEx_SetEditSel|GUICtrlComboBoxEx_SetEditText|GUICtrlComboBoxEx_SetExtendedStyle|GUICtrlComboBoxEx_SetExtendedUI|GUICtrlComboBoxEx_SetImageList|GUICtrlComboBoxEx_SetItem|GUICtrlComboBoxEx_SetItemEx|GUICtrlComboBoxEx_SetItemHeight|GUICtrlComboBoxEx_SetItemImage|GUICtrlComboBoxEx_SetItemIndent|GUICtrlComboBoxEx_SetItemOverlayImage|GUICtrlComboBoxEx_SetItemParam|GUICtrlComboBoxEx_SetItemSelectedImage|GUICtrlComboBoxEx_SetMinVisible|GUICtrlComboBoxEx_SetTopIndex|GUICtrlComboBoxEx_ShowDropDown|GUICtrlDTP_Create|GUICtrlDTP_Destroy|GUICtrlDTP_GetMCColor|GUICtrlDTP_GetMCFont|GUICtrlDTP_GetMonthCal|GUICtrlDTP_GetRange|GUICtrlDTP_GetRangeEx|GUICtrlDTP_GetSystemTime|GUICtrlDTP_GetSystemTimeEx|GUICtrlDTP_SetFormat|GUICtrlDTP_SetMCColor|GUICtrlDTP_SetMCFont|GUICtrlDTP_SetRange|GUICtrlDTP_SetRangeEx|GUICtrlDTP_SetSystemTime|GUICtrlDTP_SetSystemTimeEx|GUICtrlEdit_AppendText|GUICtrlEdit_BeginUpdate|GUICtrlEdit_CanUndo|GUICtrlEdit_CharFromPos|GUICtrlEdit_Create|GUICtrlEdit_Destroy|GUICtrlEdit_EmptyUndoBuffer|GUICtrlEdit_EndUpdate|GUICtrlEdit_Find|GUICtrlEdit_FmtLines|GUICtrlEdit_GetFirstVisibleLine|GUICtrlEdit_GetLimitText|GUICtrlEdit_GetLine|GUICtrlEdit_GetLineCount|GUICtrlEdit_GetMargins|GUICtrlEdit_GetModify|GUICtrlEdit_GetPasswordChar|GUICtrlEdit_GetRECT|GUICtrlEdit_GetRECTEx|GUICtrlEdit_GetSel|GUICtrlEdit_GetText|GUICtrlEdit_GetTextLen|GUICtrlEdit_HideBalloonTip|GUICtrlEdit_InsertText|GUICtrlEdit_LineFromChar|GUICtrlEdit_LineIndex|GUICtrlEdit_LineLength|GUICtrlEdit_LineScroll|GUICtrlEdit_PosFromChar|GUICtrlEdit_ReplaceSel|GUICtrlEdit_Scroll|GUICtrlEdit_SetLimitText|GUICtrlEdit_SetMargins|GUICtrlEdit_SetModify|GUICtrlEdit_SetPasswordChar|GUICtrlEdit_SetReadOnly|GUICtrlEdit_SetRECT|GUICtrlEdit_SetRECTEx|GUICtrlEdit_SetRECTNP|GUICtrlEdit_SetRectNPEx|GUICtrlEdit_SetSel|GUICtrlEdit_SetTabStops|GUICtrlEdit_SetText|GUICtrlEdit_ShowBalloonTip|GUICtrlEdit_Undo|GUICtrlHeader_AddItem|GUICtrlHeader_ClearFilter|GUICtrlHeader_ClearFilterAll|GUICtrlHeader_Create|GUICtrlHeader_CreateDragImage|GUICtrlHeader_DeleteItem|GUICtrlHeader_Destroy|GUICtrlHeader_EditFilter|GUICtrlHeader_GetBitmapMargin|GUICtrlHeader_GetImageList|GUICtrlHeader_GetItem|GUICtrlHeader_GetItemAlign|GUICtrlHeader_GetItemBitmap|GUICtrlHeader_GetItemCount|GUICtrlHeader_GetItemDisplay|GUICtrlHeader_GetItemFlags|GUICtrlHeader_GetItemFormat|GUICtrlHeader_GetItemImage|GUICtrlHeader_GetItemOrder|GUICtrlHeader_GetItemParam|GUICtrlHeader_GetItemRect|GUICtrlHeader_GetItemRectEx|GUICtrlHeader_GetItemText|GUICtrlHeader_GetItemWidth|GUICtrlHeader_GetOrderArray|GUICtrlHeader_GetUnicodeFormat|GUICtrlHeader_HitTest|GUICtrlHeader_InsertItem|GUICtrlHeader_Layout|GUICtrlHeader_OrderToIndex|GUICtrlHeader_SetBitmapMargin|GUICtrlHeader_SetFilterChangeTimeout|GUICtrlHeader_SetHotDivider|GUICtrlHeader_SetImageList|GUICtrlHeader_SetItem|GUICtrlHeader_SetItemAlign|GUICtrlHeader_SetItemBitmap|GUICtrlHeader_SetItemDisplay|GUICtrlHeader_SetItemFlags|GUICtrlHeader_SetItemFormat|GUICtrlHeader_SetItemImage|GUICtrlHeader_SetItemOrder|GUICtrlHeader_SetItemParam|GUICtrlHeader_SetItemText|GUICtrlHeader_SetItemWidth|GUICtrlHeader_SetOrderArray|GUICtrlHeader_SetUnicodeFormat|GUICtrlIpAddress_ClearAddress|GUICtrlIpAddress_Create|GUICtrlIpAddress_Destroy|GUICtrlIpAddress_Get|GUICtrlIpAddress_GetArray|GUICtrlIpAddress_GetEx|GUICtrlIpAddress_IsBlank|GUICtrlIpAddress_Set|GUICtrlIpAddress_SetArray|GUICtrlIpAddress_SetEx|GUICtrlIpAddress_SetFocus|GUICtrlIpAddress_SetFont|GUICtrlIpAddress_SetRange|GUICtrlIpAddress_ShowHide|GUICtrlListBox_AddFile|GUICtrlListBox_AddString|GUICtrlListBox_BeginUpdate|GUICtrlListBox_Create|GUICtrlListBox_DeleteString|GUICtrlListBox_Destroy|GUICtrlListBox_Dir|GUICtrlListBox_EndUpdate|GUICtrlListBox_FindInText|GUICtrlListBox_FindString|GUICtrlListBox_GetAnchorIndex|GUICtrlListBox_GetCaretIndex|GUICtrlListBox_GetCount|GUICtrlListBox_GetCurSel|GUICtrlListBox_GetHorizontalExtent|GUICtrlListBox_GetItemData|GUICtrlListBox_GetItemHeight|GUICtrlListBox_GetItemRect|GUICtrlListBox_GetItemRectEx|GUICtrlListBox_GetListBoxInfo|GUICtrlListBox_GetLocale|GUICtrlListBox_GetLocaleCountry|GUICtrlListBox_GetLocaleLang|GUICtrlListBox_GetLocalePrimLang|GUICtrlListBox_GetLocaleSubLang|GUICtrlListBox_GetSel|GUICtrlListBox_GetSelCount|GUICtrlListBox_GetSelItems|GUICtrlListBox_GetSelItemsText|GUICtrlListBox_GetText|GUICtrlListBox_GetTextLen|GUICtrlListBox_GetTopIndex|GUICtrlListBox_InitStorage|GUICtrlListBox_InsertString|GUICtrlListBox_ItemFromPoint|GUICtrlListBox_ReplaceString|GUICtrlListBox_ResetContent|GUICtrlListBox_SelectString|GUICtrlListBox_SelItemRange|GUICtrlListBox_SelItemRangeEx|GUICtrlListBox_SetAnchorIndex|GUICtrlListBox_SetCaretIndex|GUICtrlListBox_SetColumnWidth|GUICtrlListBox_SetCurSel|GUICtrlListBox_SetHorizontalExtent|GUICtrlListBox_SetItemData|GUICtrlListBox_SetItemHeight|GUICtrlListBox_SetLocale|GUICtrlListBox_SetSel|GUICtrlListBox_SetTabStops|GUICtrlListBox_SetTopIndex|GUICtrlListBox_Sort|GUICtrlListBox_SwapString|GUICtrlListBox_UpdateHScroll|GUICtrlListView_AddArray|GUICtrlListView_AddColumn|GUICtrlListView_AddItem|GUICtrlListView_AddSubItem|GUICtrlListView_ApproximateViewHeight|GUICtrlListView_ApproximateViewRect|GUICtrlListView_ApproximateViewWidth|GUICtrlListView_Arrange|GUICtrlListView_BeginUpdate|GUICtrlListView_CancelEditLabel|GUICtrlListView_ClickItem|GUICtrlListView_CopyItems|GUICtrlListView_Create|GUICtrlListView_CreateDragImage|GUICtrlListView_CreateSolidBitMap|GUICtrlListView_DeleteAllItems|GUICtrlListView_DeleteColumn|GUICtrlListView_DeleteItem|GUICtrlListView_DeleteItemsSelected|GUICtrlListView_Destroy|GUICtrlListView_DrawDragImage|GUICtrlListView_EditLabel|GUICtrlListView_EnableGroupView|GUICtrlListView_EndUpdate|GUICtrlListView_EnsureVisible|GUICtrlListView_FindInText|GUICtrlListView_FindItem|GUICtrlListView_FindNearest|GUICtrlListView_FindParam|GUICtrlListView_FindText|GUICtrlListView_GetBkColor|GUICtrlListView_GetBkImage|GUICtrlListView_GetCallbackMask|GUICtrlListView_GetColumn|GUICtrlListView_GetColumnCount|GUICtrlListView_GetColumnOrder|GUICtrlListView_GetColumnOrderArray|GUICtrlListView_GetColumnWidth|GUICtrlListView_GetCounterPage|GUICtrlListView_GetEditControl|GUICtrlListView_GetExtendedListViewStyle|GUICtrlListView_GetGroupInfo|GUICtrlListView_GetGroupViewEnabled|GUICtrlListView_GetHeader|GUICtrlListView_GetHotCursor|GUICtrlListView_GetHotItem|GUICtrlListView_GetHoverTime|GUICtrlListView_GetImageList|GUICtrlListView_GetISearchString|GUICtrlListView_GetItem|GUICtrlListView_GetItemChecked|GUICtrlListView_GetItemCount|GUICtrlListView_GetItemCut|GUICtrlListView_GetItemDropHilited|GUICtrlListView_GetItemEx|GUICtrlListView_GetItemFocused|GUICtrlListView_GetItemGroupID|GUICtrlListView_GetItemImage|GUICtrlListView_GetItemIndent|GUICtrlListView_GetItemParam|GUICtrlListView_GetItemPosition|GUICtrlListView_GetItemPositionX|GUICtrlListView_GetItemPositionY|GUICtrlListView_GetItemRect|GUICtrlListView_GetItemRectEx|GUICtrlListView_GetItemSelected|GUICtrlListView_GetItemSpacing|GUICtrlListView_GetItemSpacingX|GUICtrlListView_GetItemSpacingY|GUICtrlListView_GetItemState|GUICtrlListView_GetItemStateImage|GUICtrlListView_GetItemText|GUICtrlListView_GetItemTextArray|GUICtrlListView_GetItemTextString|GUICtrlListView_GetNextItem|GUICtrlListView_GetNumberOfWorkAreas|GUICtrlListView_GetOrigin|GUICtrlListView_GetOriginX|GUICtrlListView_GetOriginY|GUICtrlListView_GetOutlineColor|GUICtrlListView_GetSelectedColumn|GUICtrlListView_GetSelectedCount|GUICtrlListView_GetSelectedIndices|GUICtrlListView_GetSelectionMark|GUICtrlListView_GetStringWidth|GUICtrlListView_GetSubItemRect|GUICtrlListView_GetTextBkColor|GUICtrlListView_GetTextColor|GUICtrlListView_GetToolTips|GUICtrlListView_GetTopIndex|GUICtrlListView_GetUnicodeFormat|GUICtrlListView_GetView|GUICtrlListView_GetViewDetails|GUICtrlListView_GetViewLarge|GUICtrlListView_GetViewList|GUICtrlListView_GetViewRect|GUICtrlListView_GetViewSmall|GUICtrlListView_GetViewTile|GUICtrlListView_HideColumn|GUICtrlListView_HitTest|GUICtrlListView_InsertColumn|GUICtrlListView_InsertGroup|GUICtrlListView_InsertItem|GUICtrlListView_JustifyColumn|GUICtrlListView_MapIDToIndex|GUICtrlListView_MapIndexToID|GUICtrlListView_RedrawItems|GUICtrlListView_RegisterSortCallBack|GUICtrlListView_RemoveAllGroups|GUICtrlListView_RemoveGroup|GUICtrlListView_Scroll|GUICtrlListView_SetBkColor|GUICtrlListView_SetBkImage|GUICtrlListView_SetCallBackMask|GUICtrlListView_SetColumn|GUICtrlListView_SetColumnOrder|GUICtrlListView_SetColumnOrderArray|GUICtrlListView_SetColumnWidth|GUICtrlListView_SetExtendedListViewStyle|GUICtrlListView_SetGroupInfo|GUICtrlListView_SetHotItem|GUICtrlListView_SetHoverTime|GUICtrlListView_SetIconSpacing|GUICtrlListView_SetImageList|GUICtrlListView_SetItem|GUICtrlListView_SetItemChecked|GUICtrlListView_SetItemCount|GUICtrlListView_SetItemCut|GUICtrlListView_SetItemDropHilited|GUICtrlListView_SetItemEx|GUICtrlListView_SetItemFocused|GUICtrlListView_SetItemGroupID|GUICtrlListView_SetItemImage|GUICtrlListView_SetItemIndent|GUICtrlListView_SetItemParam|GUICtrlListView_SetItemPosition|GUICtrlListView_SetItemPosition32|GUICtrlListView_SetItemSelected|GUICtrlListView_SetItemState|GUICtrlListView_SetItemStateImage|GUICtrlListView_SetItemText|GUICtrlListView_SetOutlineColor|GUICtrlListView_SetSelectedColumn|GUICtrlListView_SetSelectionMark|GUICtrlListView_SetTextBkColor|GUICtrlListView_SetTextColor|GUICtrlListView_SetToolTips|GUICtrlListView_SetUnicodeFormat|GUICtrlListView_SetView|GUICtrlListView_SetWorkAreas|GUICtrlListView_SimpleSort|GUICtrlListView_SortItems|GUICtrlListView_SubItemHitTest|GUICtrlListView_UnRegisterSortCallBack|GUICtrlMenu_AddMenuItem|GUICtrlMenu_AppendMenu|GUICtrlMenu_CheckMenuItem|GUICtrlMenu_CheckRadioItem|GUICtrlMenu_CreateMenu|GUICtrlMenu_CreatePopup|GUICtrlMenu_DeleteMenu|GUICtrlMenu_DestroyMenu|GUICtrlMenu_DrawMenuBar|GUICtrlMenu_EnableMenuItem|GUICtrlMenu_FindItem|GUICtrlMenu_FindParent|GUICtrlMenu_GetItemBmp|GUICtrlMenu_GetItemBmpChecked|GUICtrlMenu_GetItemBmpUnchecked|GUICtrlMenu_GetItemChecked|GUICtrlMenu_GetItemCount|GUICtrlMenu_GetItemData|GUICtrlMenu_GetItemDefault|GUICtrlMenu_GetItemDisabled|GUICtrlMenu_GetItemEnabled|GUICtrlMenu_GetItemGrayed|GUICtrlMenu_GetItemHighlighted|GUICtrlMenu_GetItemID|GUICtrlMenu_GetItemInfo|GUICtrlMenu_GetItemRect|GUICtrlMenu_GetItemRectEx|GUICtrlMenu_GetItemState|GUICtrlMenu_GetItemStateEx|GUICtrlMenu_GetItemSubMenu|GUICtrlMenu_GetItemText|GUICtrlMenu_GetItemType|GUICtrlMenu_GetMenu|GUICtrlMenu_GetMenuBackground|GUICtrlMenu_GetMenuBarInfo|GUICtrlMenu_GetMenuContextHelpID|GUICtrlMenu_GetMenuData|GUICtrlMenu_GetMenuDefaultItem|GUICtrlMenu_GetMenuHeight|GUICtrlMenu_GetMenuInfo|GUICtrlMenu_GetMenuStyle|GUICtrlMenu_GetSystemMenu|GUICtrlMenu_InsertMenuItem|GUICtrlMenu_InsertMenuItemEx|GUICtrlMenu_IsMenu|GUICtrlMenu_LoadMenu|GUICtrlMenu_MapAccelerator|GUICtrlMenu_MenuItemFromPoint|GUICtrlMenu_RemoveMenu|GUICtrlMenu_SetItemBitmaps|GUICtrlMenu_SetItemBmp|GUICtrlMenu_SetItemBmpChecked|GUICtrlMenu_SetItemBmpUnchecked|GUICtrlMenu_SetItemChecked|GUICtrlMenu_SetItemData|GUICtrlMenu_SetItemDefault|GUICtrlMenu_SetItemDisabled|GUICtrlMenu_SetItemEnabled|GUICtrlMenu_SetItemGrayed|GUICtrlMenu_SetItemHighlighted|GUICtrlMenu_SetItemID|GUICtrlMenu_SetItemInfo|GUICtrlMenu_SetItemState|GUICtrlMenu_SetItemSubMenu|GUICtrlMenu_SetItemText|GUICtrlMenu_SetItemType|GUICtrlMenu_SetMenu|GUICtrlMenu_SetMenuBackground|GUICtrlMenu_SetMenuContextHelpID|GUICtrlMenu_SetMenuData|GUICtrlMenu_SetMenuDefaultItem|GUICtrlMenu_SetMenuHeight|GUICtrlMenu_SetMenuInfo|GUICtrlMenu_SetMenuStyle|GUICtrlMenu_TrackPopupMenu|GUICtrlMonthCal_Create|GUICtrlMonthCal_Destroy|GUICtrlMonthCal_GetColor|GUICtrlMonthCal_GetColorArray|GUICtrlMonthCal_GetCurSel|GUICtrlMonthCal_GetCurSelStr|GUICtrlMonthCal_GetFirstDOW|GUICtrlMonthCal_GetFirstDOWStr|GUICtrlMonthCal_GetMaxSelCount|GUICtrlMonthCal_GetMaxTodayWidth|GUICtrlMonthCal_GetMinReqHeight|GUICtrlMonthCal_GetMinReqRect|GUICtrlMonthCal_GetMinReqRectArray|GUICtrlMonthCal_GetMinReqWidth|GUICtrlMonthCal_GetMonthDelta|GUICtrlMonthCal_GetMonthRange|GUICtrlMonthCal_GetMonthRangeMax|GUICtrlMonthCal_GetMonthRangeMaxStr|GUICtrlMonthCal_GetMonthRangeMin|GUICtrlMonthCal_GetMonthRangeMinStr|GUICtrlMonthCal_GetMonthRangeSpan|GUICtrlMonthCal_GetRange|GUICtrlMonthCal_GetRangeMax|GUICtrlMonthCal_GetRangeMaxStr|GUICtrlMonthCal_GetRangeMin|GUICtrlMonthCal_GetRangeMinStr|GUICtrlMonthCal_GetSelRange|GUICtrlMonthCal_GetSelRangeMax|GUICtrlMonthCal_GetSelRangeMaxStr|GUICtrlMonthCal_GetSelRangeMin|GUICtrlMonthCal_GetSelRangeMinStr|GUICtrlMonthCal_GetToday|GUICtrlMonthCal_GetTodayStr|GUICtrlMonthCal_GetUnicodeFormat|GUICtrlMonthCal_HitTest|GUICtrlMonthCal_SetColor|GUICtrlMonthCal_SetCurSel|GUICtrlMonthCal_SetDayState|GUICtrlMonthCal_SetFirstDOW|GUICtrlMonthCal_SetMaxSelCount|GUICtrlMonthCal_SetMonthDelta|GUICtrlMonthCal_SetRange|GUICtrlMonthCal_SetSelRange|GUICtrlMonthCal_SetToday|GUICtrlMonthCal_SetUnicodeFormat|GUICtrlRebar_AddBand|GUICtrlRebar_AddToolBarBand|GUICtrlRebar_BeginDrag|GUICtrlRebar_Create|GUICtrlRebar_DeleteBand|GUICtrlRebar_Destroy|GUICtrlRebar_DragMove|GUICtrlRebar_EndDrag|GUICtrlRebar_GetBandBackColor|GUICtrlRebar_GetBandBorders|GUICtrlRebar_GetBandBordersEx|GUICtrlRebar_GetBandChildHandle|GUICtrlRebar_GetBandChildSize|GUICtrlRebar_GetBandCount|GUICtrlRebar_GetBandForeColor|GUICtrlRebar_GetBandHeaderSize|GUICtrlRebar_GetBandID|GUICtrlRebar_GetBandIdealSize|GUICtrlRebar_GetBandLength|GUICtrlRebar_GetBandLParam|GUICtrlRebar_GetBandMargins|GUICtrlRebar_GetBandMarginsEx|GUICtrlRebar_GetBandRect|GUICtrlRebar_GetBandRectEx|GUICtrlRebar_GetBandStyle|GUICtrlRebar_GetBandStyleBreak|GUICtrlRebar_GetBandStyleChildEdge|GUICtrlRebar_GetBandStyleFixedBMP|GUICtrlRebar_GetBandStyleFixedSize|GUICtrlRebar_GetBandStyleGripperAlways|GUICtrlRebar_GetBandStyleHidden|GUICtrlRebar_GetBandStyleHideTitle|GUICtrlRebar_GetBandStyleNoGripper|GUICtrlRebar_GetBandStyleTopAlign|GUICtrlRebar_GetBandStyleUseChevron|GUICtrlRebar_GetBandStyleVariableHeight|GUICtrlRebar_GetBandText|GUICtrlRebar_GetBarHeight|GUICtrlRebar_GetBKColor|GUICtrlRebar_GetColorScheme|GUICtrlRebar_GetRowCount|GUICtrlRebar_GetRowHeight|GUICtrlRebar_GetTextColor|GUICtrlRebar_GetToolTips|GUICtrlRebar_GetUnicodeFormat|GUICtrlRebar_HitTest|GUICtrlRebar_IDToIndex|GUICtrlRebar_MaximizeBand|GUICtrlRebar_MinimizeBand|GUICtrlRebar_MoveBand|GUICtrlRebar_SetBandBackColor|GUICtrlRebar_SetBandForeColor|GUICtrlRebar_SetBandHeaderSize|GUICtrlRebar_SetBandID|GUICtrlRebar_SetBandIdealSize|GUICtrlRebar_SetBandLength|GUICtrlRebar_SetBandLParam|GUICtrlRebar_SetBandStyle|GUICtrlRebar_SetBandStyleBreak|GUICtrlRebar_SetBandStyleChildEdge|GUICtrlRebar_SetBandStyleFixedBMP|GUICtrlRebar_SetBandStyleFixedSize|GUICtrlRebar_SetBandStyleGripperAlways|GUICtrlRebar_SetBandStyleHidden|GUICtrlRebar_SetBandStyleHideTitle|GUICtrlRebar_SetBandStyleNoGripper|GUICtrlRebar_SetBandStyleTopAlign|GUICtrlRebar_SetBandStyleUseChevron|GUICtrlRebar_SetBandStyleVariableHeight|GUICtrlRebar_SetBandText|GUICtrlRebar_SetBKColor|GUICtrlRebar_SetColorScheme|GUICtrlRebar_SetTextColor|GUICtrlRebar_SetToolTips|GUICtrlRebar_SetUnicodeFormat|GUICtrlRebar_ShowBand|GUICtrlSlider_ClearSel|GUICtrlSlider_ClearTics|GUICtrlSlider_Create|GUICtrlSlider_Destroy|GUICtrlSlider_GetBuddy|GUICtrlSlider_GetChannelRect|GUICtrlSlider_GetLineSize|GUICtrlSlider_GetNumTics|GUICtrlSlider_GetPageSize|GUICtrlSlider_GetPos|GUICtrlSlider_GetPTics|GUICtrlSlider_GetRange|GUICtrlSlider_GetRangeMax|GUICtrlSlider_GetRangeMin|GUICtrlSlider_GetSel|GUICtrlSlider_GetSelEnd|GUICtrlSlider_GetSelStart|GUICtrlSlider_GetThumbLength|GUICtrlSlider_GetThumbRect|GUICtrlSlider_GetThumbRectEx|GUICtrlSlider_GetTic|GUICtrlSlider_GetTicPos|GUICtrlSlider_GetToolTips|GUICtrlSlider_GetUnicodeFormat|GUICtrlSlider_SetBuddy|GUICtrlSlider_SetLineSize|GUICtrlSlider_SetPageSize|GUICtrlSlider_SetPos|GUICtrlSlider_SetRange|GUICtrlSlider_SetRangeMax|GUICtrlSlider_SetRangeMin|GUICtrlSlider_SetSel|GUICtrlSlider_SetSelEnd|GUICtrlSlider_SetSelStart|GUICtrlSlider_SetThumbLength|GUICtrlSlider_SetTic|GUICtrlSlider_SetTicFreq|GUICtrlSlider_SetTipSide|GUICtrlSlider_SetToolTips|GUICtrlSlider_SetUnicodeFormat|GUICtrlStatusBar_Create|GUICtrlStatusBar_Destroy|GUICtrlStatusBar_EmbedControl|GUICtrlStatusBar_GetBorders|GUICtrlStatusBar_GetBordersHorz|GUICtrlStatusBar_GetBordersRect|GUICtrlStatusBar_GetBordersVert|GUICtrlStatusBar_GetCount|GUICtrlStatusBar_GetHeight|GUICtrlStatusBar_GetIcon|GUICtrlStatusBar_GetParts|GUICtrlStatusBar_GetRect|GUICtrlStatusBar_GetRectEx|GUICtrlStatusBar_GetText|GUICtrlStatusBar_GetTextFlags|GUICtrlStatusBar_GetTextLength|GUICtrlStatusBar_GetTextLengthEx|GUICtrlStatusBar_GetTipText|GUICtrlStatusBar_GetUnicodeFormat|GUICtrlStatusBar_GetWidth|GUICtrlStatusBar_IsSimple|GUICtrlStatusBar_Resize|GUICtrlStatusBar_SetBkColor|GUICtrlStatusBar_SetIcon|GUICtrlStatusBar_SetMinHeight|GUICtrlStatusBar_SetParts|GUICtrlStatusBar_SetSimple|GUICtrlStatusBar_SetText|GUICtrlStatusBar_SetTipText|GUICtrlStatusBar_SetUnicodeFormat|GUICtrlStatusBar_ShowHide|GUICtrlTab_Create|GUICtrlTab_DeleteAllItems|GUICtrlTab_DeleteItem|GUICtrlTab_DeselectAll|GUICtrlTab_Destroy|GUICtrlTab_FindTab|GUICtrlTab_GetCurFocus|GUICtrlTab_GetCurSel|GUICtrlTab_GetDisplayRect|GUICtrlTab_GetDisplayRectEx|GUICtrlTab_GetExtendedStyle|GUICtrlTab_GetImageList|GUICtrlTab_GetItem|GUICtrlTab_GetItemCount|GUICtrlTab_GetItemImage|GUICtrlTab_GetItemParam|GUICtrlTab_GetItemRect|GUICtrlTab_GetItemRectEx|GUICtrlTab_GetItemState|GUICtrlTab_GetItemText|GUICtrlTab_GetRowCount|GUICtrlTab_GetToolTips|GUICtrlTab_GetUnicodeFormat|GUICtrlTab_HighlightItem|GUICtrlTab_HitTest|GUICtrlTab_InsertItem|GUICtrlTab_RemoveImage|GUICtrlTab_SetCurFocus|GUICtrlTab_SetCurSel|GUICtrlTab_SetExtendedStyle|GUICtrlTab_SetImageList|GUICtrlTab_SetItem|GUICtrlTab_SetItemImage|GUICtrlTab_SetItemParam|GUICtrlTab_SetItemSize|GUICtrlTab_SetItemState|GUICtrlTab_SetItemText|GUICtrlTab_SetMinTabWidth|GUICtrlTab_SetPadding|GUICtrlTab_SetToolTips|GUICtrlTab_SetUnicodeFormat|GUICtrlToolbar_AddBitmap|GUICtrlToolbar_AddButton|GUICtrlToolbar_AddButtonSep|GUICtrlToolbar_AddString|GUICtrlToolbar_ButtonCount|GUICtrlToolbar_CheckButton|GUICtrlToolbar_ClickAccel|GUICtrlToolbar_ClickButton|GUICtrlToolbar_ClickIndex|GUICtrlToolbar_CommandToIndex|GUICtrlToolbar_Create|GUICtrlToolbar_Customize|GUICtrlToolbar_DeleteButton|GUICtrlToolbar_Destroy|GUICtrlToolbar_EnableButton|GUICtrlToolbar_FindToolbar|GUICtrlToolbar_GetAnchorHighlight|GUICtrlToolbar_GetBitmapFlags|GUICtrlToolbar_GetButtonBitmap|GUICtrlToolbar_GetButtonInfo|GUICtrlToolbar_GetButtonInfoEx|GUICtrlToolbar_GetButtonParam|GUICtrlToolbar_GetButtonRect|GUICtrlToolbar_GetButtonRectEx|GUICtrlToolbar_GetButtonSize|GUICtrlToolbar_GetButtonState|GUICtrlToolbar_GetButtonStyle|GUICtrlToolbar_GetButtonText|GUICtrlToolbar_GetColorScheme|GUICtrlToolbar_GetDisabledImageList|GUICtrlToolbar_GetExtendedStyle|GUICtrlToolbar_GetHotImageList|GUICtrlToolbar_GetHotItem|GUICtrlToolbar_GetImageList|GUICtrlToolbar_GetInsertMark|GUICtrlToolbar_GetInsertMarkColor|GUICtrlToolbar_GetMaxSize|GUICtrlToolbar_GetMetrics|GUICtrlToolbar_GetPadding|GUICtrlToolbar_GetRows|GUICtrlToolbar_GetString|GUICtrlToolbar_GetStyle|GUICtrlToolbar_GetStyleAltDrag|GUICtrlToolbar_GetStyleCustomErase|GUICtrlToolbar_GetStyleFlat|GUICtrlToolbar_GetStyleList|GUICtrlToolbar_GetStyleRegisterDrop|GUICtrlToolbar_GetStyleToolTips|GUICtrlToolbar_GetStyleTransparent|GUICtrlToolbar_GetStyleWrapable|GUICtrlToolbar_GetTextRows|GUICtrlToolbar_GetToolTips|GUICtrlToolbar_GetUnicodeFormat|GUICtrlToolbar_HideButton|GUICtrlToolbar_HighlightButton|GUICtrlToolbar_HitTest|GUICtrlToolbar_IndexToCommand|GUICtrlToolbar_InsertButton|GUICtrlToolbar_InsertMarkHitTest|GUICtrlToolbar_IsButtonChecked|GUICtrlToolbar_IsButtonEnabled|GUICtrlToolbar_IsButtonHidden|GUICtrlToolbar_IsButtonHighlighted|GUICtrlToolbar_IsButtonIndeterminate|GUICtrlToolbar_IsButtonPressed|GUICtrlToolbar_LoadBitmap|GUICtrlToolbar_LoadImages|GUICtrlToolbar_MapAccelerator|GUICtrlToolbar_MoveButton|GUICtrlToolbar_PressButton|GUICtrlToolbar_SetAnchorHighlight|GUICtrlToolbar_SetBitmapSize|GUICtrlToolbar_SetButtonBitMap|GUICtrlToolbar_SetButtonInfo|GUICtrlToolbar_SetButtonInfoEx|GUICtrlToolbar_SetButtonParam|GUICtrlToolbar_SetButtonSize|GUICtrlToolbar_SetButtonState|GUICtrlToolbar_SetButtonStyle|GUICtrlToolbar_SetButtonText|GUICtrlToolbar_SetButtonWidth|GUICtrlToolbar_SetCmdID|GUICtrlToolbar_SetColorScheme|GUICtrlToolbar_SetDisabledImageList|GUICtrlToolbar_SetDrawTextFlags|GUICtrlToolbar_SetExtendedStyle|GUICtrlToolbar_SetHotImageList|GUICtrlToolbar_SetHotItem|GUICtrlToolbar_SetImageList|GUICtrlToolbar_SetIndent|GUICtrlToolbar_SetIndeterminate|GUICtrlToolbar_SetInsertMark|GUICtrlToolbar_SetInsertMarkColor|GUICtrlToolbar_SetMaxTextRows|GUICtrlToolbar_SetMetrics|GUICtrlToolbar_SetPadding|GUICtrlToolbar_SetParent|GUICtrlToolbar_SetRows|GUICtrlToolbar_SetStyle|GUICtrlToolbar_SetStyleAltDrag|GUICtrlToolbar_SetStyleCustomErase|GUICtrlToolbar_SetStyleFlat|GUICtrlToolbar_SetStyleList|GUICtrlToolbar_SetStyleRegisterDrop|GUICtrlToolbar_SetStyleToolTips|GUICtrlToolbar_SetStyleTransparent|GUICtrlToolbar_SetStyleWrapable|GUICtrlToolbar_SetToolTips|GUICtrlToolbar_SetUnicodeFormat|GUICtrlToolbar_SetWindowTheme|GUICtrlTreeView_Add|GUICtrlTreeView_AddChild|GUICtrlTreeView_AddChildFirst|GUICtrlTreeView_AddFirst|GUICtrlTreeView_BeginUpdate|GUICtrlTreeView_ClickItem|GUICtrlTreeView_Create|GUICtrlTreeView_CreateDragImage|GUICtrlTreeView_CreateSolidBitMap|GUICtrlTreeView_Delete|GUICtrlTreeView_DeleteAll|GUICtrlTreeView_DeleteChildren|GUICtrlTreeView_Destroy|GUICtrlTreeView_DisplayRect|GUICtrlTreeView_DisplayRectEx|GUICtrlTreeView_EditText|GUICtrlTreeView_EndEdit|GUICtrlTreeView_EndUpdate|GUICtrlTreeView_EnsureVisible|GUICtrlTreeView_Expand|GUICtrlTreeView_ExpandedOnce|GUICtrlTreeView_FindItem|GUICtrlTreeView_FindItemEx|GUICtrlTreeView_GetBkColor|GUICtrlTreeView_GetBold|GUICtrlTreeView_GetChecked|GUICtrlTreeView_GetChildCount|GUICtrlTreeView_GetChildren|GUICtrlTreeView_GetCount|GUICtrlTreeView_GetCut|GUICtrlTreeView_GetDropTarget|GUICtrlTreeView_GetEditControl|GUICtrlTreeView_GetExpanded|GUICtrlTreeView_GetFirstChild|GUICtrlTreeView_GetFirstItem|GUICtrlTreeView_GetFirstVisible|GUICtrlTreeView_GetFocused|GUICtrlTreeView_GetHeight|GUICtrlTreeView_GetImageIndex|GUICtrlTreeView_GetImageListIconHandle|GUICtrlTreeView_GetIndent|GUICtrlTreeView_GetInsertMarkColor|GUICtrlTreeView_GetISearchString|GUICtrlTreeView_GetItemByIndex|GUICtrlTreeView_GetItemHandle|GUICtrlTreeView_GetItemParam|GUICtrlTreeView_GetLastChild|GUICtrlTreeView_GetLineColor|GUICtrlTreeView_GetNext|GUICtrlTreeView_GetNextChild|GUICtrlTreeView_GetNextSibling|GUICtrlTreeView_GetNextVisible|GUICtrlTreeView_GetNormalImageList|GUICtrlTreeView_GetParentHandle|GUICtrlTreeView_GetParentParam|GUICtrlTreeView_GetPrev|GUICtrlTreeView_GetPrevChild|GUICtrlTreeView_GetPrevSibling|GUICtrlTreeView_GetPrevVisible|GUICtrlTreeView_GetScrollTime|GUICtrlTreeView_GetSelected|GUICtrlTreeView_GetSelectedImageIndex|GUICtrlTreeView_GetSelection|GUICtrlTreeView_GetSiblingCount|GUICtrlTreeView_GetState|GUICtrlTreeView_GetStateImageIndex|GUICtrlTreeView_GetStateImageList|GUICtrlTreeView_GetText|GUICtrlTreeView_GetTextColor|GUICtrlTreeView_GetToolTips|GUICtrlTreeView_GetTree|GUICtrlTreeView_GetUnicodeFormat|GUICtrlTreeView_GetVisible|GUICtrlTreeView_GetVisibleCount|GUICtrlTreeView_HitTest|GUICtrlTreeView_HitTestEx|GUICtrlTreeView_HitTestItem|GUICtrlTreeView_Index|GUICtrlTreeView_InsertItem|GUICtrlTreeView_IsFirstItem|GUICtrlTreeView_IsParent|GUICtrlTreeView_Level|GUICtrlTreeView_SelectItem|GUICtrlTreeView_SelectItemByIndex|GUICtrlTreeView_SetBkColor|GUICtrlTreeView_SetBold|GUICtrlTreeView_SetChecked|GUICtrlTreeView_SetCheckedByIndex|GUICtrlTreeView_SetChildren|GUICtrlTreeView_SetCut|GUICtrlTreeView_SetDropTarget|GUICtrlTreeView_SetFocused|GUICtrlTreeView_SetHeight|GUICtrlTreeView_SetIcon|GUICtrlTreeView_SetImageIndex|GUICtrlTreeView_SetIndent|GUICtrlTreeView_SetInsertMark|GUICtrlTreeView_SetInsertMarkColor|GUICtrlTreeView_SetItemHeight|GUICtrlTreeView_SetItemParam|GUICtrlTreeView_SetLineColor|GUICtrlTreeView_SetNormalImageList|GUICtrlTreeView_SetScrollTime|GUICtrlTreeView_SetSelected|GUICtrlTreeView_SetSelectedImageIndex|GUICtrlTreeView_SetState|GUICtrlTreeView_SetStateImageIndex|GUICtrlTreeView_SetStateImageList|GUICtrlTreeView_SetText|GUICtrlTreeView_SetTextColor|GUICtrlTreeView_SetToolTips|GUICtrlTreeView_SetUnicodeFormat|GUICtrlTreeView_Sort|GUIImageList_Add|GUIImageList_AddBitmap|GUIImageList_AddIcon|GUIImageList_AddMasked|GUIImageList_BeginDrag|GUIImageList_Copy|GUIImageList_Create|GUIImageList_Destroy|GUIImageList_DestroyIcon|GUIImageList_DragEnter|GUIImageList_DragLeave|GUIImageList_DragMove|GUIImageList_Draw|GUIImageList_DrawEx|GUIImageList_Duplicate|GUIImageList_EndDrag|GUIImageList_GetBkColor|GUIImageList_GetIcon|GUIImageList_GetIconHeight|GUIImageList_GetIconSize|GUIImageList_GetIconSizeEx|GUIImageList_GetIconWidth|GUIImageList_GetImageCount|GUIImageList_GetImageInfoEx|GUIImageList_Remove|GUIImageList_ReplaceIcon|GUIImageList_SetBkColor|GUIImageList_SetIconSize|GUIImageList_SetImageCount|GUIImageList_Swap|GUIScrollBars_EnableScrollBar|GUIScrollBars_GetScrollBarInfoEx|GUIScrollBars_GetScrollBarRect|GUIScrollBars_GetScrollBarRGState|GUIScrollBars_GetScrollBarXYLineButton|GUIScrollBars_GetScrollBarXYThumbBottom|GUIScrollBars_GetScrollBarXYThumbTop|GUIScrollBars_GetScrollInfo|GUIScrollBars_GetScrollInfoEx|GUIScrollBars_GetScrollInfoMax|GUIScrollBars_GetScrollInfoMin|GUIScrollBars_GetScrollInfoPage|GUIScrollBars_GetScrollInfoPos|GUIScrollBars_GetScrollInfoTrackPos|GUIScrollBars_GetScrollPos|GUIScrollBars_GetScrollRange|GUIScrollBars_Init|GUIScrollBars_ScrollWindow|GUIScrollBars_SetScrollInfo|GUIScrollBars_SetScrollInfoMax|GUIScrollBars_SetScrollInfoMin|GUIScrollBars_SetScrollInfoPage|GUIScrollBars_SetScrollInfoPos|GUIScrollBars_SetScrollRange|GUIScrollBars_ShowScrollBar|GUIToolTip_Activate|GUIToolTip_AddTool|GUIToolTip_AdjustRect|GUIToolTip_BitsToTTF|GUIToolTip_Create|GUIToolTip_DelTool|GUIToolTip_Destroy|GUIToolTip_EnumTools|GUIToolTip_GetBubbleHeight|GUIToolTip_GetBubbleSize|GUIToolTip_GetBubbleWidth|GUIToolTip_GetCurrentTool|GUIToolTip_GetDelayTime|GUIToolTip_GetMargin|GUIToolTip_GetMarginEx|GUIToolTip_GetMaxTipWidth|GUIToolTip_GetText|GUIToolTip_GetTipBkColor|GUIToolTip_GetTipTextColor|GUIToolTip_GetTitleBitMap|GUIToolTip_GetTitleText|GUIToolTip_GetToolCount|GUIToolTip_GetToolInfo|GUIToolTip_HitTest|GUIToolTip_NewToolRect|GUIToolTip_Pop|GUIToolTip_PopUp|GUIToolTip_SetDelayTime|GUIToolTip_SetMargin|GUIToolTip_SetMaxTipWidth|GUIToolTip_SetTipBkColor|GUIToolTip_SetTipTextColor|GUIToolTip_SetTitle|GUIToolTip_SetToolInfo|GUIToolTip_SetWindowTheme|GUIToolTip_ToolExists|GUIToolTip_ToolToArray|GUIToolTip_TrackActivate|GUIToolTip_TrackPosition|GUIToolTip_TTFToBits|GUIToolTip_Update|GUIToolTip_UpdateTipText|HexToString|IE_Example|IE_Introduction|IE_VersionInfo|IEAction|IEAttach|IEBodyReadHTML|IEBodyReadText|IEBodyWriteHTML|IECreate|IECreateEmbedded|IEDocGetObj|IEDocInsertHTML|IEDocInsertText|IEDocReadHTML|IEDocWriteHTML|IEErrorHandlerDeRegister|IEErrorHandlerRegister|IEErrorNotify|IEFormElementCheckBoxSelect|IEFormElementGetCollection|IEFormElementGetObjByName|IEFormElementGetValue|IEFormElementOptionSelect|IEFormElementRadioSelect|IEFormElementSetValue|IEFormGetCollection|IEFormGetObjByName|IEFormImageClick|IEFormReset|IEFormSubmit|IEFrameGetCollection|IEFrameGetObjByName|IEGetObjById|IEGetObjByName|IEHeadInsertEventScript|IEImgClick|IEImgGetCollection|IEIsFrameSet|IELinkClickByIndex|IELinkClickByText|IELinkGetCollection|IELoadWait|IELoadWaitTimeout|IENavigate|IEPropertyGet|IEPropertySet|IEQuit|IETableGetCollection|IETableWriteToArray|IETagNameAllGetCollection|IETagNameGetCollection|Iif|INetExplorerCapable|INetGetSource|INetMail|INetSmtpMail|IsPressed|MathCheckDiv|Max|MemGlobalAlloc|MemGlobalFree|MemGlobalLock|MemGlobalSize|MemGlobalUnlock|MemMoveMemory|MemMsgBox|MemShowError|MemVirtualAlloc|MemVirtualAllocEx|MemVirtualFree|MemVirtualFreeEx|Min|MouseTrap|NamedPipes_CallNamedPipe|NamedPipes_ConnectNamedPipe|NamedPipes_CreateNamedPipe|NamedPipes_CreatePipe|NamedPipes_DisconnectNamedPipe|NamedPipes_GetNamedPipeHandleState|NamedPipes_GetNamedPipeInfo|NamedPipes_PeekNamedPipe|NamedPipes_SetNamedPipeHandleState|NamedPipes_TransactNamedPipe|NamedPipes_WaitNamedPipe|Net_Share_ConnectionEnum|Net_Share_FileClose|Net_Share_FileEnum|Net_Share_FileGetInfo|Net_Share_PermStr|Net_Share_ResourceStr|Net_Share_SessionDel|Net_Share_SessionEnum|Net_Share_SessionGetInfo|Net_Share_ShareAdd|Net_Share_ShareCheck|Net_Share_ShareDel|Net_Share_ShareEnum|Net_Share_ShareGetInfo|Net_Share_ShareSetInfo|Net_Share_StatisticsGetSvr|Net_Share_StatisticsGetWrk|Now|NowCalc|NowCalcDate|NowDate|NowTime|PathFull|PathMake|PathSplit|ProcessGetName|ProcessGetPriority|Radian|ReplaceStringInFile|RunDOS|ScreenCapture_Capture|ScreenCapture_CaptureWnd|ScreenCapture_SaveImage|ScreenCapture_SetBMPFormat|ScreenCapture_SetJPGQuality|ScreenCapture_SetTIFColorDepth|ScreenCapture_SetTIFCompression|Security__AdjustTokenPrivileges|Security__GetAccountSid|Security__GetLengthSid|Security__GetTokenInformation|Security__ImpersonateSelf|Security__IsValidSid|Security__LookupAccountName|Security__LookupAccountSid|Security__LookupPrivilegeValue|Security__OpenProcessToken|Security__OpenThreadToken|Security__OpenThreadTokenEx|Security__SetPrivilege|Security__SidToStringSid|Security__SidTypeStr|Security__StringSidToSid|SendMessage|SendMessageA|SetDate|SetTime|Singleton|SoundClose|SoundLength|SoundOpen|SoundPause|SoundPlay|SoundPos|SoundResume|SoundSeek|SoundStatus|SoundStop|SQLite_Changes|SQLite_Close|SQLite_Display2DResult|SQLite_Encode|SQLite_ErrCode|SQLite_ErrMsg|SQLite_Escape|SQLite_Exec|SQLite_FetchData|SQLite_FetchNames|SQLite_GetTable|SQLite_GetTable2d|SQLite_LastInsertRowID|SQLite_LibVersion|SQLite_Open|SQLite_Query|SQLite_QueryFinalize|SQLite_QueryReset|SQLite_QuerySingleRow|SQLite_SaveMode|SQLite_SetTimeout|SQLite_Shutdown|SQLite_SQLiteExe|SQLite_Startup|SQLite_TotalChanges|StringAddComma|StringBetween|StringEncrypt|StringInsert|StringProper|StringRepeat|StringReverse|StringSplit|StringToHex|TCPIpToName|TempFile|TicksToTime|Timer_Diff|Timer_GetTimerID|Timer_Init|Timer_KillAllTimers|Timer_KillTimer|Timer_SetTimer|TimeToTicks|VersionCompare|viClose|viExecCommand|viFindGpib|viGpibBusReset|viGTL|viOpen|viSetAttribute|viSetTimeout|WeekNumberISO|WinAPI_AttachConsole|WinAPI_AttachThreadInput|WinAPI_Beep|WinAPI_BitBlt|WinAPI_CallNextHookEx|WinAPI_Check|WinAPI_ClientToScreen|WinAPI_CloseHandle|WinAPI_CommDlgExtendedError|WinAPI_CopyIcon|WinAPI_CreateBitmap|WinAPI_CreateCompatibleBitmap|WinAPI_CreateCompatibleDC|WinAPI_CreateEvent|WinAPI_CreateFile|WinAPI_CreateFont|WinAPI_CreateFontIndirect|WinAPI_CreateProcess|WinAPI_CreateSolidBitmap|WinAPI_CreateSolidBrush|WinAPI_CreateWindowEx|WinAPI_DefWindowProc|WinAPI_DeleteDC|WinAPI_DeleteObject|WinAPI_DestroyIcon|WinAPI_DestroyWindow|WinAPI_DrawEdge|WinAPI_DrawFrameControl|WinAPI_DrawIcon|WinAPI_DrawIconEx|WinAPI_DrawText|WinAPI_EnableWindow|WinAPI_EnumDisplayDevices|WinAPI_EnumWindows|WinAPI_EnumWindowsPopup|WinAPI_EnumWindowsTop|WinAPI_ExpandEnvironmentStrings|WinAPI_ExtractIconEx|WinAPI_FatalAppExit|WinAPI_FillRect|WinAPI_FindExecutable|WinAPI_FindWindow|WinAPI_FlashWindow|WinAPI_FlashWindowEx|WinAPI_FloatToInt|WinAPI_FlushFileBuffers|WinAPI_FormatMessage|WinAPI_FrameRect|WinAPI_FreeLibrary|WinAPI_GetAncestor|WinAPI_GetAsyncKeyState|WinAPI_GetClassName|WinAPI_GetClientHeight|WinAPI_GetClientRect|WinAPI_GetClientWidth|WinAPI_GetCurrentProcess|WinAPI_GetCurrentProcessID|WinAPI_GetCurrentThread|WinAPI_GetCurrentThreadId|WinAPI_GetCursorInfo|WinAPI_GetDC|WinAPI_GetDesktopWindow|WinAPI_GetDeviceCaps|WinAPI_GetDIBits|WinAPI_GetDlgCtrlID|WinAPI_GetDlgItem|WinAPI_GetFileSizeEx|WinAPI_GetFocus|WinAPI_GetForegroundWindow|WinAPI_GetIconInfo|WinAPI_GetLastError|WinAPI_GetLastErrorMessage|WinAPI_GetModuleHandle|WinAPI_GetMousePos|WinAPI_GetMousePosX|WinAPI_GetMousePosY|WinAPI_GetObject|WinAPI_GetOpenFileName|WinAPI_GetOverlappedResult|WinAPI_GetParent|WinAPI_GetProcessAffinityMask|WinAPI_GetSaveFileName|WinAPI_GetStdHandle|WinAPI_GetStockObject|WinAPI_GetSysColor|WinAPI_GetSysColorBrush|WinAPI_GetSystemMetrics|WinAPI_GetTextExtentPoint32|WinAPI_GetWindow|WinAPI_GetWindowDC|WinAPI_GetWindowHeight|WinAPI_GetWindowLong|WinAPI_GetWindowRect|WinAPI_GetWindowText|WinAPI_GetWindowThreadProcessId|WinAPI_GetWindowWidth|WinAPI_GetXYFromPoint|WinAPI_GlobalMemStatus|WinAPI_GUIDFromString|WinAPI_GUIDFromStringEx|WinAPI_HiWord|WinAPI_InProcess|WinAPI_IntToFloat|WinAPI_InvalidateRect|WinAPI_IsClassName|WinAPI_IsWindow|WinAPI_IsWindowVisible|WinAPI_LoadBitmap|WinAPI_LoadImage|WinAPI_LoadLibrary|WinAPI_LoadLibraryEx|WinAPI_LoadShell32Icon|WinAPI_LoadString|WinAPI_LocalFree|WinAPI_LoWord|WinAPI_MakeDWord|WinAPI_MAKELANGID|WinAPI_MAKELCID|WinAPI_MakeLong|WinAPI_MessageBeep|WinAPI_Mouse_Event|WinAPI_MoveWindow|WinAPI_MsgBox|WinAPI_MulDiv|WinAPI_MultiByteToWideChar|WinAPI_MultiByteToWideCharEx|WinAPI_OpenProcess|WinAPI_PointFromRect|WinAPI_PostMessage|WinAPI_PrimaryLangId|WinAPI_PtInRect|WinAPI_ReadFile|WinAPI_ReadProcessMemory|WinAPI_RectIsEmpty|WinAPI_RedrawWindow|WinAPI_RegisterWindowMessage|WinAPI_ReleaseCapture|WinAPI_ReleaseDC|WinAPI_ScreenToClient|WinAPI_SelectObject|WinAPI_SetBkColor|WinAPI_SetCapture|WinAPI_SetCursor|WinAPI_SetDefaultPrinter|WinAPI_SetDIBits|WinAPI_SetEvent|WinAPI_SetFocus|WinAPI_SetFont|WinAPI_SetHandleInformation|WinAPI_SetLastError|WinAPI_SetParent|WinAPI_SetProcessAffinityMask|WinAPI_SetSysColors|WinAPI_SetTextColor|WinAPI_SetWindowLong|WinAPI_SetWindowPos|WinAPI_SetWindowsHookEx|WinAPI_SetWindowText|WinAPI_ShowCursor|WinAPI_ShowError|WinAPI_ShowMsg|WinAPI_ShowWindow|WinAPI_StringFromGUID|WinAPI_SubLangId|WinAPI_SystemParametersInfo|WinAPI_TwipsPerPixelX|WinAPI_TwipsPerPixelY|WinAPI_UnhookWindowsHookEx|WinAPI_UpdateLayeredWindow|WinAPI_UpdateWindow|WinAPI_ValidateClassName|WinAPI_WaitForInputIdle|WinAPI_WaitForMultipleObjects|WinAPI_WaitForSingleObject|WinAPI_WideCharToMultiByte|WinAPI_WindowFromPoint|WinAPI_WriteConsole|WinAPI_WriteFile|WinAPI_WriteProcessMemory|WinNet_AddConnection|WinNet_AddConnection2|WinNet_AddConnection3|WinNet_CancelConnection|WinNet_CancelConnection2|WinNet_CloseEnum|WinNet_ConnectionDialog|WinNet_ConnectionDialog1|WinNet_DisconnectDialog|WinNet_DisconnectDialog1|WinNet_EnumResource|WinNet_GetConnection|WinNet_GetConnectionPerformance|WinNet_GetLastError|WinNet_GetNetworkInformation|WinNet_GetProviderName|WinNet_GetResourceInformation|WinNet_GetResourceParent|WinNet_GetUniversalName|WinNet_GetUser|WinNet_OpenEnum|WinNet_RestoreConnection|WinNet_UseConnection|Word_VersionInfo|WordAttach|WordCreate|WordDocAdd|WordDocAddLink|WordDocAddPicture|WordDocClose|WordDocFindReplace|WordDocGetCollection|WordDocLinkGetCollection|WordDocOpen|WordDocPrint|WordDocPropertyGet|WordDocPropertySet|WordDocSave|WordDocSaveAs|WordErrorHandlerDeRegister|WordErrorHandlerRegister|WordErrorNotify|WordMacroRun|WordPropertyGet|WordPropertySet|WordQuit|' +
+ 'ce|comments-end|comments-start|cs|include|include-once|NoTrayIcon|RequireAdmin|' +
+ 'AutoIt3Wrapper_Au3Check_Parameters|AutoIt3Wrapper_Au3Check_Stop_OnWarning|AutoIt3Wrapper_Change2CUI|AutoIt3Wrapper_Compression|AutoIt3Wrapper_cvsWrapper_Parameters|AutoIt3Wrapper_Icon|AutoIt3Wrapper_Outfile|AutoIt3Wrapper_Outfile_Type|AutoIt3Wrapper_Plugin_Funcs|AutoIt3Wrapper_Res_Comment|AutoIt3Wrapper_Res_Description|AutoIt3Wrapper_Res_Field|AutoIt3Wrapper_Res_File_Add|AutoIt3Wrapper_Res_Fileversion|AutoIt3Wrapper_Res_FileVersion_AutoIncrement|AutoIt3Wrapper_Res_Icon_Add|AutoIt3Wrapper_Res_Language|AutoIt3Wrapper_Res_LegalCopyright|AutoIt3Wrapper_res_requestedExecutionLevel|AutoIt3Wrapper_Res_SaveSource|AutoIt3Wrapper_Run_After|AutoIt3Wrapper_Run_Au3check|AutoIt3Wrapper_Run_Before|AutoIt3Wrapper_Run_cvsWrapper|AutoIt3Wrapper_Run_Debug_Mode|AutoIt3Wrapper_Run_Obfuscator|AutoIt3Wrapper_Run_Tidy|AutoIt3Wrapper_Tidy_Stop_OnError|AutoIt3Wrapper_UseAnsi|AutoIt3Wrapper_UseUpx|AutoIt3Wrapper_UseX64|AutoIt3Wrapper_Version|EndRegion|forceref|Obfuscator_Ignore_Funcs|Obfuscator_Ignore_Variables|Obfuscator_Parameters|Region|Tidy_Parameters'
+ var atKeywords = 'AppDataCommonDir|AppDataDir|AutoItExe|AutoItPID|AutoItUnicode|AutoItVersion|AutoItX64|COM_EventObj|CommonFilesDir|Compiled|ComputerName|ComSpec|CR|CRLF|DesktopCommonDir|DesktopDepth|DesktopDir|DesktopHeight|DesktopRefresh|DesktopWidth|DocumentsCommonDir|error|exitCode|exitMethod|extended|FavoritesCommonDir|FavoritesDir|GUI_CtrlHandle|GUI_CtrlId|GUI_DragFile|GUI_DragId|GUI_DropId|GUI_WinHandle|HomeDrive|HomePath|HomeShare|HotKeyPressed|HOUR|InetGetActive|InetGetBytesRead|IPAddress1|IPAddress2|IPAddress3|IPAddress4|KBLayout|LF|LogonDNSDomain|LogonDomain|LogonServer|MDAY|MIN|MON|MyDocumentsDir|NumParams|OSBuild|OSLang|OSServicePack|OSTYPE|OSVersion|ProcessorArch|ProgramFilesDir|ProgramsCommonDir|ProgramsDir|ScriptDir|ScriptFullPath|ScriptLineNumber|ScriptName|SEC|StartMenuCommonDir|StartMenuDir|StartupCommonDir|StartupDir|SW_DISABLE|SW_ENABLE|SW_HIDE|SW_LOCK|SW_MAXIMIZE|SW_MINIMIZE|SW_RESTORE|SW_SHOW|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWMINNOACTIVE|SW_SHOWNA|SW_SHOWNOACTIVATE|SW_SHOWNORMAL|SW_UNLOCK|SystemDir|TAB|TempDir|TRAY_ID|TrayIconFlashing|TrayIconVisible|UserName|UserProfileDir|WDAY|WindowsDir|WorkingDir|YDAY|YEAR'
+
+ this.$rules = { start:
+ [ { token: 'comment.line.ahk', regex: '(?:^| );.*$' },
+ { token: 'comment.block.ahk',
+ regex: '/\\*', push:
+ [ { token: 'comment.block.ahk', regex: '\\*/', next: 'pop' },
+ { defaultToken: 'comment.block.ahk' } ] },
+ { token: 'doc.comment.ahk',
+ regex: '#cs', push:
+ [ { token: 'doc.comment.ahk', regex: '#ce', next: 'pop' },
+ { defaultToken: 'doc.comment.ahk' } ] },
+ { token: 'keyword.command.ahk',
+ regex: '(?:\\b|^)(?:allowsamelinecomments|clipboardtimeout|commentflag|errorstdout|escapechar|hotkeyinterval|hotkeymodifiertimeout|hotstring|include|includeagain|installkeybdhook|installmousehook|keyhistory|ltrim|maxhotkeysperinterval|maxmem|maxthreads|maxthreadsbuffer|maxthreadsperhotkey|noenv|notrayicon|persistent|singleinstance|usehook|winactivateforce|autotrim|blockinput|click|clipwait|continue|control|controlclick|controlfocus|controlget|controlgetfocus|controlgetpos|controlgettext|controlmove|controlsend|controlsendraw|controlsettext|coordmode|critical|detecthiddentext|detecthiddenwindows|drive|driveget|drivespacefree|edit|endrepeat|envadd|envdiv|envget|envmult|envset|envsub|envupdate|exit|exitapp|fileappend|filecopy|filecopydir|filecreatedir|filecreateshortcut|filedelete|filegetattrib|filegetshortcut|filegetsize|filegettime|filegetversion|fileinstall|filemove|filemovedir|fileread|filereadline|filerecycle|filerecycleempty|fileremovedir|fileselectfile|fileselectfolder|filesetattrib|filesettime|formattime|getkeystate|gosub|goto|groupactivate|groupadd|groupclose|groupdeactivate|gui|guicontrol|guicontrolget|hideautoitwin|hotkey|ifequal|ifexist|ifgreater|ifgreaterorequal|ifinstring|ifless|iflessorequal|ifmsgbox|ifnotequal|ifnotexist|ifnotinstring|ifwinactive|ifwinexist|ifwinnotactive|ifwinnotexist|imagesearch|inidelete|iniread|iniwrite|input|inputbox|keyhistory|keywait|listhotkeys|listlines|listvars|menu|mouseclick|mouseclickdrag|mousegetpos|mousemove|msgbox|onexit|outputdebug|pause|pixelgetcolor|pixelsearch|postmessage|process|progress|random|regdelete|regread|regwrite|reload|repeat|run|runas|runwait|send|sendevent|sendinput|sendmode|sendplay|sendmessage|sendraw|setbatchlines|setcapslockstate|setcontroldelay|setdefaultmousespeed|setenv|setformat|setkeydelay|setmousedelay|setnumlockstate|setscrolllockstate|setstorecapslockmode|settimer|settitlematchmode|setwindelay|setworkingdir|shutdown|sleep|sort|soundbeep|soundget|soundgetwavevolume|soundplay|soundset|soundsetwavevolume|splashimage|splashtextoff|splashtexton|splitpath|statusbargettext|statusbarwait|stringcasesense|stringgetpos|stringleft|stringlen|stringlower|stringmid|stringreplace|stringright|stringsplit|stringtrimleft|stringtrimright|stringupper|suspend|sysget|thread|tooltip|transform|traytip|urldownloadtofile|while|winactivate|winactivatebottom|winclose|winget|wingetactivestats|wingetactivetitle|wingetclass|wingetpos|wingettext|wingettitle|winhide|winkill|winmaximize|winmenuselectitem|winminimize|winminimizeall|winminimizeallundo|winmove|winrestore|winset|winsettitle|winshow|winwait|winwaitactive|winwaitclose|winwaitnotactive)\\b',
+ caseInsensitive: true },
+ { token: 'keyword.control.ahk',
+ regex: '(?:\\b|^)(?:if|else|return|loop|break|for|while|global|local|byref)\\b',
+ caseInsensitive: true },
+ { token: 'support.function.ahk',
+ regex: '(?:\\b|^)(?:abs|acos|asc|asin|atan|ceil|chr|cos|dllcall|exp|fileexist|floor|getkeystate|il_add|il_create|il_destroy|instr|substr|isfunc|islabel|ln|log|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|onmessage|numget|numput|registercallback|regexmatch|regexreplace|round|sin|tan|sqrt|strlen|sb_seticon|sb_setparts|sb_settext|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist)\\b',
+ caseInsensitive: true },
+ { token: 'variable.predefined.ahk',
+ regex: '(?:\\b|^)(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|programfiles|a_programfiles|a_programs|a_programscommon|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel)\\b',
+ caseInsensitive: true },
+ { token: 'support.constant.ahk',
+ regex: '(?:\\b|^)(?:shift|lshift|rshift|alt|lalt|ralt|control|lcontrol|rcontrol|ctrl|lctrl|rctrl|lwin|rwin|appskey|altdown|altup|shiftdown|shiftup|ctrldown|ctrlup|lwindown|lwinup|rwindown|rwinup|lbutton|rbutton|mbutton|wheelup|wheelleft|wheelright|wheeldown|xbutton1|xbutton2|joy1|joy2|joy3|joy4|joy5|joy6|joy7|joy8|joy9|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy30|joy31|joy32|joyx|joyy|joyz|joyr|joyu|joyv|joypov|joyname|joybuttons|joyaxes|joyinfo|space|tab|enter|escape|esc|backspace|bs|delete|del|insert|ins|pgup|pgdn|home|end|up|down|left|right|printscreen|ctrlbreak|pause|scrolllock|capslock|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadmult|numpadadd|numpadsub|numpaddiv|numpaddot|numpaddel|numpadins|numpadclear|numpadup|numpaddown|numpadleft|numpadright|numpadhome|numpadend|numpadpgup|numpadpgdn|numpadenter|f1|f2|f3|f4|f5|f6|f7|f8|f9|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f20|f21|f22|f23|f24|browser_back|browser_forward|browser_refresh|browser_stop|browser_search|browser_favorites|browser_home|volume_mute|volume_down|volume_up|media_next|media_prev|media_stop|media_play_pause|launch_mail|launch_media|launch_app1|launch_app2)\\b',
+ caseInsensitive: true },
+ { token: 'variable.parameter',
+ regex: '(?:\\b|^)(?:pixel|mouse|screen|relative|rgb|ltrim|rtrim|join|low|belownormal|normal|abovenormal|high|realtime|ahk_id|ahk_pid|ahk_class|ahk_group|between|contains|in|is|integer|float|integerfast|floatfast|number|digit|xdigit|alpha|upper|lower|alnum|time|date|not|or|and|alwaysontop|topmost|top|bottom|transparent|transcolor|redraw|region|id|idlast|processname|minmax|controllist|count|list|capacity|statuscd|eject|lock|unlock|label|filesystem|label|setlabel|serial|type|status|static|seconds|minutes|hours|days|read|parse|logoff|close|error|single|tray|add|rename|check|uncheck|togglecheck|enable|disable|toggleenable|default|nodefault|standard|nostandard|color|delete|deleteall|icon|noicon|tip|click|show|mainwindow|nomainwindow|useerrorlevel|text|picture|pic|groupbox|button|checkbox|radio|dropdownlist|ddl|combobox|listbox|listview|datetime|monthcal|updown|slider|tab|tab2|statusbar|treeview|iconsmall|tile|report|sortdesc|nosort|nosorthdr|grid|hdr|autosize|range|xm|ym|ys|xs|xp|yp|font|resize|owner|submit|nohide|minimize|maximize|restore|noactivate|na|cancel|destroy|center|margin|maxsize|minsize|owndialogs|guiescape|guiclose|guisize|guicontextmenu|guidropfiles|tabstop|section|altsubmit|wrap|hscroll|vscroll|border|top|bottom|buttons|expand|first|imagelist|lines|wantctrla|wantf2|vis|visfirst|number|uppercase|lowercase|limit|password|multi|wantreturn|group|background|bold|italic|strike|underline|norm|backgroundtrans|theme|caption|delimiter|minimizebox|maximizebox|sysmenu|toolwindow|flash|style|exstyle|check3|checked|checkedgray|readonly|password|hidden|left|right|center|notab|section|move|focus|hide|choose|choosestring|text|pos|enabled|disabled|visible|lastfound|lastfoundexist|alttab|shiftalttab|alttabmenu|alttabandmenu|alttabmenudismiss|notimers|interrupt|priority|waitclose|blind|raw|unicode|deref|pow|bitnot|bitand|bitor|bitxor|bitshiftleft|bitshiftright|yes|no|ok|cancel|abort|retry|ignore|tryagain|on|off|all|hkey_local_machine|hkey_users|hkey_current_user|hkey_classes_root|hkey_current_config|hklm|hku|hkcu|hkcr|hkcc|reg_sz|reg_expand_sz|reg_multi_sz|reg_dword|reg_qword|reg_binary|reg_link|reg_resource_list|reg_full_resource_descriptor|reg_resource_requirements_list|reg_dword_big_endian)\\b',
+ caseInsensitive: true },
+ { keywordMap: {"constant.language": autoItKeywords}, regex: '\\w+\\b'},
+ { keywordMap: {"variable.function": atKeywords}, regex: '@\\w+\\b'},
+ { token : "constant.numeric", regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},
+ { token: 'keyword.operator.ahk',
+ regex: '=|==|<>|:=|<|>|\\*|\\/|\\+|:|\\?|\\-' },
+ { token: 'punctuation.ahk',
+ regex: '#|`|::|,|\\{|\\}|\\(|\\)|\\%' },
+ { token:
+ [ 'punctuation.quote.double',
+ 'string.quoted.ahk',
+ 'punctuation.quote.double' ],
+ regex: '(")((?:[^"]|"")*)(")' },
+ { token: [ 'label.ahk', 'punctuation.definition.label.ahk' ],
+ regex: '^([^: ]+)(:)(?!:)' } ] }
+
+ this.normalizeRules();
+};
+
+AutoHotKeyHighlightRules.metaData = { name: 'AutoHotKey',
+ scopeName: 'source.ahk',
+ fileTypes: [ 'ahk' ],
+ foldingStartMarker: '^\\s*/\\*|^(?![^{]*?;|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|;|/\\*(?!.*?\\*/.*\\S))',
+ foldingStopMarker: '^\\s*\\*/|^\\s*\\}' }
+
+
+oop.inherits(AutoHotKeyHighlightRules, TextHighlightRules);
+
+exports.AutoHotKeyHighlightRules = AutoHotKeyHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/autohotkey",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/autohotkey_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var AutoHotKeyHighlightRules = require("./autohotkey_highlight_rules").AutoHotKeyHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = AutoHotKeyHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = ";";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/autohotkey";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-batchfile.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-batchfile.js
new file mode 100644
index 00000000..3f31ce12
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-batchfile.js
@@ -0,0 +1,223 @@
+ace.define("ace/mode/batchfile_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 BatchFileHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { token: 'keyword.command.dosbatch',
+ regex: '\\b(?:append|assoc|at|attrib|break|cacls|cd|chcp|chdir|chkdsk|chkntfs|cls|cmd|color|comp|compact|convert|copy|date|del|dir|diskcomp|diskcopy|doskey|echo|endlocal|erase|fc|find|findstr|format|ftype|graftabl|help|keyb|label|md|mkdir|mode|more|move|path|pause|popd|print|prompt|pushd|rd|recover|ren|rename|replace|restore|rmdir|set|setlocal|shift|sort|start|subst|time|title|tree|type|ver|verify|vol|xcopy)\\b',
+ caseInsensitive: true },
+ { token: 'keyword.control.statement.dosbatch',
+ regex: '\\b(?:goto|call|exit)\\b',
+ caseInsensitive: true },
+ { token: 'keyword.control.conditional.if.dosbatch',
+ regex: '\\bif\\s+not\\s+(?:exist|defined|errorlevel|cmdextversion)\\b',
+ caseInsensitive: true },
+ { token: 'keyword.control.conditional.dosbatch',
+ regex: '\\b(?:if|else)\\b',
+ caseInsensitive: true },
+ { token: 'keyword.control.repeat.dosbatch',
+ regex: '\\bfor\\b',
+ caseInsensitive: true },
+ { token: 'keyword.operator.dosbatch',
+ regex: '\\b(?:EQU|NEQ|LSS|LEQ|GTR|GEQ)\\b' },
+ { token: ['doc.comment', 'comment'],
+ regex: '(?:^|\\b)(rem)($|\\s.*$)',
+ caseInsensitive: true },
+ { token: 'comment.line.colons.dosbatch',
+ regex: '::.*$' },
+ { include: 'variable' },
+ { token: 'punctuation.definition.string.begin.shell',
+ regex: '"',
+ push: [
+ { token: 'punctuation.definition.string.end.shell', regex: '"', next: 'pop' },
+ { include: 'variable' },
+ { defaultToken: 'string.quoted.double.dosbatch' } ] },
+ { token: 'keyword.operator.pipe.dosbatch', regex: '[|]' },
+ { token: 'keyword.operator.redirect.shell',
+ regex: '&>|\\d*>&\\d*|\\d*(?:>>|>|<)|\\d*<&|\\d*<>' } ],
+ variable: [
+ { token: 'constant.numeric', regex: '%%\\w+|%[*\\d]|%\\w+%'},
+ { token: 'constant.numeric', regex: '%~\\d+'},
+ { token: ['markup.list', 'constant.other', 'markup.list'],
+ regex: '(%)(\\w+)(%?)' }]}
+
+ this.normalizeRules();
+};
+
+BatchFileHighlightRules.metaData = { name: 'Batch File',
+ scopeName: 'source.dosbatch',
+ fileTypes: [ 'bat' ] }
+
+
+oop.inherits(BatchFileHighlightRules, TextHighlightRules);
+
+exports.BatchFileHighlightRules = BatchFileHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var BatchFileHighlightRules = require("./batchfile_highlight_rules").BatchFileHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = BatchFileHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "::";
+ this.blockComment = "";
+ this.$id = "ace/mode/batchfile";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-bro.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-bro.js
new file mode 100644
index 00000000..dd259ebe
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-bro.js
@@ -0,0 +1,327 @@
+ace.define("ace/mode/bro_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 BroHighlightRules = function() {
+
+ this.$rules = {
+ start: [{
+ token: "punctuation.definition.comment.bro",
+ regex: /#/,
+ push: [{
+ token: "comment.line.number-sign.bro",
+ regex: /$/,
+ next: "pop"
+ }, {
+ defaultToken: "comment.line.number-sign.bro"
+ }]
+ }, {
+ token: "keyword.control.bro",
+ regex: /\b(?:break|case|continue|else|for|if|return|switch|next|when|timeout|schedule)\b/
+ }, {
+ token: [
+ "meta.function.bro",
+ "meta.function.bro",
+ "storage.type.bro",
+ "meta.function.bro",
+ "entity.name.function.bro",
+ "meta.function.bro"
+ ],
+ regex: /^(\s*)(?:function|hook|event)(\s*)(.*)(\s*\()(.*)(\).*$)/
+ }, {
+ token: "storage.type.bro",
+ regex: /\b(?:bool|enum|double|int|count|port|addr|subnet|any|file|interval|time|string|table|vector|set|record|pattern|hook)\b/
+ }, {
+ token: "storage.modifier.bro",
+ regex: /\b(?:global|const|redef|local|&(?:optional|rotate_interval|rotate_size|add_func|del_func|expire_func|expire_create|expire_read|expire_write|persistent|synchronized|encrypt|mergeable|priority|group|type_column|log|error_handler))\b/
+ }, {
+ token: "keyword.operator.bro",
+ regex: /\s*(?:\||&&|(?:>|<|!)=?|==)\s*|\b!?in\b/
+ }, {
+ token: "constant.language.bro",
+ regex: /\b(?:T|F)\b/
+ }, {
+ token: "constant.numeric.bro",
+ regex: /\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:(?:e|E)(?:\+|-)?[0-9]+)?)(?:\/(?:tcp|udp|icmp)|\s*(?:u?sec|min|hr|day)s?)?\b/
+ }, {
+ token: "punctuation.definition.string.begin.bro",
+ regex: /"/,
+ push: [{
+ token: "punctuation.definition.string.end.bro",
+ regex: /"/,
+ next: "pop"
+ }, {
+ include: "#string_escaped_char"
+ }, {
+ include: "#string_placeholder"
+ }, {
+ defaultToken: "string.quoted.double.bro"
+ }]
+ }, {
+ token: "punctuation.definition.string.begin.bro",
+ regex: /\//,
+ push: [{
+ token: "punctuation.definition.string.end.bro",
+ regex: /\//,
+ next: "pop"
+ }, {
+ include: "#string_escaped_char"
+ }, {
+ include: "#string_placeholder"
+ }, {
+ defaultToken: "string.quoted.regex.bro"
+ }]
+ }, {
+ token: [
+ "meta.preprocessor.bro.load",
+ "keyword.other.special-method.bro"
+ ],
+ regex: /^(\s*)(\@load(?:-sigs)?)\b/,
+ push: [{
+ token: [],
+ regex: /(?=\#)|$/,
+ next: "pop"
+ }, {
+ defaultToken: "meta.preprocessor.bro.load"
+ }]
+ }, {
+ token: [
+ "meta.preprocessor.bro.if",
+ "keyword.other.special-method.bro",
+ "meta.preprocessor.bro.if"
+ ],
+ regex: /^(\s*)(\@endif|\@if(?:n?def)?)(.*$)/,
+ push: [{
+ token: [],
+ regex: /$/,
+ next: "pop"
+ }, {
+ defaultToken: "meta.preprocessor.bro.if"
+ }]
+ }],
+ "#disabled": [{
+ token: "text",
+ regex: /^\s*\@if(?:n?def)?\b.*$/,
+ push: [{
+ token: "text",
+ regex: /^\s*\@endif\b.*$/,
+ next: "pop"
+ }, {
+ include: "#disabled"
+ }, {
+ include: "#pragma-mark"
+ }],
+ comment: "eat nested preprocessor ifdefs"
+ }],
+ "#preprocessor-rule-other": [{
+ token: [
+ "text",
+ "meta.preprocessor.bro",
+ "meta.preprocessor.bro",
+ "text"
+ ],
+ regex: /^(\s*)(@if)((?:n?def)?)\b(.*?)(?:(?=)|$)/,
+ push: [{
+ token: ["text", "meta.preprocessor.bro", "text"],
+ regex: /^(\s*)(@endif)\b(.*$)/,
+ next: "pop"
+ }, {
+ include: "$base"
+ }]
+ }],
+ "#string_escaped_char": [{
+ token: "constant.character.escape.bro",
+ regex: /\\(?:\\|[abefnprtv'"?]|[0-3]\d{,2}|[4-7]\d?|x[a-fA-F0-9]{,2})/
+ }, {
+ token: "invalid.illegal.unknown-escape.bro",
+ regex: /\\./
+ }],
+ "#string_placeholder": [{
+ token: "constant.other.placeholder.bro",
+ regex: /%(?:\d+\$)?[#0\- +']*[,;:_]?(?:-?\d+|\*(?:-?\d+\$)?)?(?:\.(?:-?\d+|\*(?:-?\d+\$)?)?)?(?:hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?[diouxXDOUeEfFgGaACcSspn%]/
+ }, {
+ token: "invalid.illegal.placeholder.bro",
+ regex: /%/
+ }]
+ }
+
+ this.normalizeRules();
+};
+
+BroHighlightRules.metaData = {
+ fileTypes: ["bro"],
+ foldingStartMarker: "^(\\@if(n?def)?)",
+ foldingStopMarker: "^\\@endif",
+ keyEquivalent: "@B",
+ name: "Bro",
+ scopeName: "source.bro"
+}
+
+
+oop.inherits(BroHighlightRules, TextHighlightRules);
+
+exports.BroHighlightRules = BroHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/bro",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/bro_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var BroHighlightRules = require("./bro_highlight_rules").BroHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = BroHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.$id = "ace/mode/bro"
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-c9search.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-c9search.js
new file mode 100644
index 00000000..aad3dc19
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-c9search.js
@@ -0,0 +1,287 @@
+ace.define("ace/mode/c9search_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;
+
+function safeCreateRegexp(source, flag) {
+ try {
+ return new RegExp(source, flag);
+ } catch(e) {}
+}
+
+var C9SearchHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {
+ tokenNames : ["c9searchresults.constant.numeric", "c9searchresults.text", "c9searchresults.text", "c9searchresults.keyword"],
+ regex : /(^\s+[0-9]+)(:)(\d*\s?)([^\r\n]+)/,
+ onMatch : function(val, state, stack) {
+ var values = this.splitRegex.exec(val);
+ var types = this.tokenNames;
+ var tokens = [{
+ type: types[0],
+ value: values[1]
+ }, {
+ type: types[1],
+ value: values[2]
+ }];
+
+ if (values[3]) {
+ if (values[3] == " ")
+ tokens[1] = { type: types[1], value: values[2] + " " };
+ else
+ tokens.push({ type: types[1], value: values[3] });
+ }
+ var regex = stack[1];
+ var str = values[4];
+
+ var m;
+ var last = 0;
+ if (regex && regex.exec) {
+ regex.lastIndex = 0;
+ while (m = regex.exec(str)) {
+ var skipped = str.substring(last, m.index);
+ last = regex.lastIndex;
+ if (skipped)
+ tokens.push({type: types[2], value: skipped});
+ if (m[0])
+ tokens.push({type: types[3], value: m[0]});
+ else if (!skipped)
+ break;
+ }
+ }
+ if (last < str.length)
+ tokens.push({type: types[2], value: str.substr(last)});
+ return tokens;
+ }
+ },
+ {
+ regex : "^Searching for [^\\r\\n]*$",
+ onMatch: function(val, state, stack) {
+ var parts = val.split("\x01");
+ if (parts.length < 3)
+ return "text";
+
+ var options, search, replace;
+
+ var i = 0;
+ var tokens = [{
+ value: parts[i++] + "'",
+ type: "text"
+ }, {
+ value: search = parts[i++],
+ type: "text" // "c9searchresults.keyword"
+ }, {
+ value: "'" + parts[i++],
+ type: "text"
+ }];
+ if (parts[2] !== " in") {
+ replace = parts[i];
+ tokens.push({
+ value: "'" + parts[i++] + "'",
+ type: "text"
+ }, {
+ value: parts[i++],
+ type: "text"
+ });
+ }
+ tokens.push({
+ value: " " + parts[i++] + " ",
+ type: "text"
+ });
+ if (parts[i+1]) {
+ options = parts[i+1];
+ tokens.push({
+ value: "(" + parts[i+1] + ")",
+ type: "text"
+ });
+ i += 1;
+ } else {
+ i -= 1;
+ }
+ while (i++ < parts.length) {
+ parts[i] && tokens.push({
+ value: parts[i],
+ type: "text"
+ });
+ }
+
+ if (search) {
+ if (!/regex/.test(options))
+ search = lang.escapeRegExp(search);
+ if (/whole/.test(options))
+ search = "\\b" + search + "\\b";
+ }
+
+ var regex = search && safeCreateRegexp(
+ "(" + search + ")",
+ / sensitive/.test(options) ? "g" : "ig"
+ );
+ if (regex) {
+ stack[0] = state;
+ stack[1] = regex;
+ }
+
+ return tokens;
+ }
+ },
+ {
+ regex : "^(?=Found \\d+ matches)",
+ token : "text",
+ next : "numbers"
+ },
+ {
+ token : "string", // single line
+ regex : "^\\S:?[^:]+",
+ next : "numbers"
+ }
+ ],
+ numbers:[{
+ regex : "\\d+",
+ token : "constant.numeric"
+ }, {
+ regex : "$",
+ token : "text",
+ next : "start"
+ }]
+ };
+ this.normalizeRules();
+};
+
+oop.inherits(C9SearchHighlightRules, TextHighlightRules);
+
+exports.C9SearchHighlightRules = C9SearchHighlightRules;
+
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"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.*:|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;
+
+ var startRow = row;
+ var endRow = row;
+
+ if (this.foldingStartMarker.test(line)) {
+ for (var i = row + 1, l = session.getLength(); i < l; i++) {
+ if (re.test(lines[i]))
+ break;
+ }
+ endRow = i;
+ }
+ else if (this.foldingStopMarker.test(line)) {
+ for (var i = row - 1; i >= 0; i--) {
+ line = lines[i];
+ if (re.test(line))
+ break;
+ }
+ startRow = i;
+ }
+ if (startRow != endRow) {
+ var col = line.length;
+ if (re === level1)
+ col = line.search(/\(Found[^)]+\)$|$/);
+ return new Range(startRow, col, endRow, 0);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/c9search",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c9search_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/c9search"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var C9SearchHighlightRules = require("./c9search_highlight_rules").C9SearchHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var C9StyleFoldMode = require("./folding/c9search").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = C9SearchHighlightRules;
+ 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);
+ };
+
+ this.$id = "ace/mode/c9search";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-c_cpp.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-c_cpp.js
new file mode 100644
index 00000000..ea6d2229
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-c_cpp.js
@@ -0,0 +1,487 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var cFunctions = exports.cFunctions = "\\b(?:hypot(?: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|char16_t|char32_t"
+ );
+
+ var storageModifiers = (
+ "const|extern|register|restrict|static|volatile|inline|private|" +
+ "protected|public|friend|explicit|virtual|export|mutable|typename|" +
+ "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"
+ );
+
+ 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|nullptr"
+ );
+
+ 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";
+ var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source;
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "//$",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : "//",
+ next : "singleLineComment"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // character
+ regex : "'(?:" + escapeRe + "|.)?'"
+ }, {
+ token : "string.start",
+ regex : '"',
+ stateName: "qqstring",
+ next: [
+ { token: "string", regex: /\\\s*$/, next: "qqstring" },
+ { token: "constant.language.escape", regex: escapeRe },
+ { token: "constant.language.escape", regex: /%[^'"\\]/ },
+ { token: "string.end", regex: '"|$', next: "start" },
+ { defaultToken: "string"}
+ ]
+ }, {
+ token : "string.start",
+ regex : 'R"\\(',
+ stateName: "rawString",
+ next: [
+ { token: "string.end", regex: '\\)"', next: "start" },
+ { defaultToken: "string"}
+ ]
+ }, {
+ 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 : "keyword", // pre-compiler directives
+ regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b",
+ next : "directive"
+ }, {
+ token : "keyword", // special case pre-compiler directive
+ regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"
+ }, {
+ token : "support.function.C99.c",
+ regex : cFunctions
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*"
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "singleLineComment" : [
+ {
+ token : "comment",
+ regex : /\\$/,
+ next : "singleLineComment"
+ }, {
+ token : "comment",
+ regex : /$/,
+ next : "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ],
+ "directive" : [
+ {
+ token : "constant.other.multiline",
+ regex : /\\/
+ },
+ {
+ 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",
+ regex : /[^\\\/]+/,
+ next : "start"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+ this.normalizeRules();
+};
+
+oop.inherits(c_cppHighlightRules, TextHighlightRules);
+
+exports.c_cppHighlightRules = c_cppHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","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 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.HighlightRules = c_cppHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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);
+ };
+
+ this.$id = "ace/mode/c_cpp";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-cirru.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-cirru.js
new file mode 100644
index 00000000..9d3bab85
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-cirru.js
@@ -0,0 +1,203 @@
+ace.define("ace/mode/cirru_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 CirruHighlightRules = function() {
+ this.$rules = {
+ start: [{
+ token: 'constant.numeric',
+ regex: /[\d\.]+/
+ }, {
+ token: 'comment.line.double-dash',
+ regex: /--/,
+ next: 'comment'
+ }, {
+ token: 'storage.modifier',
+ regex: /\(/
+ }, {
+ token: 'storage.modifier',
+ regex: /,/,
+ next: 'line'
+ }, {
+ token: 'support.function',
+ regex: /[^\(\)"\s]+/,
+ next: 'line'
+ }, {
+ token: 'string.quoted.double',
+ regex: /"/,
+ next: 'string'
+ }, {
+ token: 'storage.modifier',
+ regex: /\)/
+ }],
+ comment: [{
+ token: 'comment.line.double-dash',
+ regex: / +[^\n]+/,
+ next: 'start'
+ }],
+ string: [{
+ token: 'string.quoted.double',
+ regex: /"/,
+ next: 'line'
+ }, {
+ token: 'constant.character.escape',
+ regex: /\\/,
+ next: 'escape'
+ }, {
+ token: 'string.quoted.double',
+ regex: /[^\\"]+/
+ }],
+ escape: [{
+ token: 'constant.character.escape',
+ regex: /./,
+ next: 'string'
+ }],
+ line: [{
+ token: 'constant.numeric',
+ regex: /[\d\.]+/
+ }, {
+ token: 'markup.raw',
+ regex: /^\s*/,
+ next: 'start'
+ }, {
+ token: 'storage.modifier',
+ regex: /\$/,
+ next: 'start'
+ }, {
+ token: 'variable.parameter',
+ regex: /[^\(\)"\s]+/
+ }, {
+ token: 'storage.modifier',
+ regex: /\(/,
+ next: 'start'
+ }, {
+ token: 'storage.modifier',
+ regex: /\)/
+ }, {
+ token: 'markup.raw',
+ regex: /^ */,
+ next: 'start'
+ }, {
+ token: 'string.quoted.double',
+ regex: /"/,
+ next: 'string'
+ }]
+ }
+
+};
+
+oop.inherits(CirruHighlightRules, TextHighlightRules);
+
+exports.CirruHighlightRules = CirruHighlightRules;
+});
+
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/cirru",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cirru_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CirruHighlightRules = require("./cirru_highlight_rules").CirruHighlightRules;
+var CoffeeFoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CirruHighlightRules;
+ this.foldingRules = new CoffeeFoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.$id = "ace/mode/cirru";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-clojure.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-clojure.js
new file mode 100644
index 00000000..c8f7a0d5
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-clojure.js
@@ -0,0 +1,307 @@
+ace.define("ace/mode/clojure_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 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 : "constant", // symbol
+ regex : /:[^()\[\]{}'"\^%`,;\s]+/
+ }, {
+ 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) {
+"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;
+});
+
+ace.define("ace/mode/clojure",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/clojure_highlight_rules","ace/mode/matching_parens_outdent"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ClojureHighlightRules = require("./clojure_highlight_rules").ClojureHighlightRules;
+var MatchingParensOutdent = require("./matching_parens_outdent").MatchingParensOutdent;
+
+var Mode = function() {
+ this.HighlightRules = ClojureHighlightRules;
+ this.$outdent = new MatchingParensOutdent();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ";";
+ this.minorIndentFunctions = ["defn", "defn-", "defmacro", "def", "deftest", "testing"];
+
+ this.$toIndent = function(str) {
+ return str.split('').map(function(ch) {
+ if (/\s/.exec(ch)) {
+ return ch;
+ } else {
+ return ' ';
+ }
+ }).join('');
+ };
+
+ this.$calculateIndent = function(line, tab) {
+ var baseIndent = this.$getIndent(line);
+ var delta = 0;
+ var isParen, ch;
+ for (var i = line.length - 1; i >= 0; i--) {
+ ch = line[i];
+ if (ch === '(') {
+ delta--;
+ isParen = true;
+ } else if (ch === '(' || ch === '[' || ch === '{') {
+ delta--;
+ isParen = false;
+ } else if (ch === ')' || ch === ']' || ch === '}') {
+ delta++;
+ }
+ if (delta < 0) {
+ break;
+ }
+ }
+ if (delta < 0 && isParen) {
+ i += 1;
+ var iBefore = i;
+ var fn = '';
+ while (true) {
+ ch = line[i];
+ if (ch === ' ' || ch === '\t') {
+ if(this.minorIndentFunctions.indexOf(fn) !== -1) {
+ return this.$toIndent(line.substring(0, iBefore - 1) + tab);
+ } else {
+ return this.$toIndent(line.substring(0, i + 1));
+ }
+ } else if (ch === undefined) {
+ return this.$toIndent(line.substring(0, iBefore - 1) + tab);
+ }
+ fn += line[i];
+ i++;
+ }
+ } else if(delta < 0 && !isParen) {
+ return this.$toIndent(line.substring(0, i+1));
+ } else if(delta > 0) {
+ baseIndent = baseIndent.substring(0, baseIndent.length - tab.length);
+ return baseIndent;
+ } else {
+ return baseIndent;
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$calculateIndent(line, tab);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/clojure";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-cobol.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-cobol.js
new file mode 100644
index 00000000..89367e00
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-cobol.js
@@ -0,0 +1,94 @@
+ace.define("ace/mode/cobol_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 CobolHighlightRules = function() {
+var keywords = "ACCEPT|MERGE|SUM|ADD||MESSAGE|TABLE|ADVANCING|MODE|TAPE|" +
+"AFTER|MULTIPLY|TEST|ALL|NEGATIVE|TEXT|ALPHABET|NEXT|THAN|" +
+"ALSO|NO|THEN|ALTERNATE|NOT|THROUGH|AND|NUMBER|THRU|ANY|OCCURS|" +
+"TIME|ARE|OF|TO|AREA|OFF|TOP||ASCENDING|OMITTED|TRUE|ASSIGN|ON|TYPE|AT|OPEN|" +
+"UNIT|AUTHOR|OR|UNTIL|BEFORE|OTHER|UP|BLANK|OUTPUT|USE|BLOCK|PAGE|USING|BOTTOM|" +
+"PERFORM|VALUE|BY|PIC|VALUES|CALL|PICTURE|WHEN|CANCEL|PLUS|WITH|CD|POINTER|WRITE|" +
+"CHARACTER|POSITION||ZERO|CLOSE|POSITIVE|ZEROS|COLUMN|PROCEDURE|ZEROES|COMMA|PROGRAM|" +
+"COMMON|PROGRAM-ID|COMMUNICATION|QUOTE|COMP|RANDOM|COMPUTE|READ|CONTAINS|RECEIVE|CONFIGURATION|" +
+"RECORD|CONTINUE|REDEFINES|CONTROL|REFERENCE|COPY|REMAINDER|COUNT|REPLACE|DATA|REPORT|DATE|RESERVE|" +
+"DAY|RESET|DELETE|RETURN|DESTINATION|REWIND|DISABLE|REWRITE|DISPLAY|RIGHT|DIVIDE|RUN|DOWN|SAME|" +
+"ELSE|SEARCH|ENABLE|SECTION|END|SELECT|ENVIRONMENT|SENTENCE|EQUAL|SET|ERROR|SIGN|EXIT|SEQUENTIAL|" +
+"EXTERNAL|SIZE|FLASE|SORT|FILE|SOURCE|LENGTH|SPACE|LESS|STANDARD|LIMIT|START|LINE|STOP|LOCK|STRING|LOW-VALUE|SUBTRACT";
+
+ var builtinConstants = (
+ "true|false|null"
+ );
+
+ var builtinFunctions = (
+ "count|min|max|avg|sum|rank|now|coalesce|main"
+ );
+
+ 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(CobolHighlightRules, TextHighlightRules);
+
+exports.CobolHighlightRules = CobolHighlightRules;
+});
+
+ace.define("ace/mode/cobol",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cobol_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CobolHighlightRules = require("./cobol_highlight_rules").CobolHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = CobolHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "*";
+
+ this.$id = "ace/mode/cobol";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-coffee.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-coffee.js
new file mode 100644
index 00000000..5ba85894
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-coffee.js
@@ -0,0 +1,392 @@
+ace.define("ace/mode/coffee_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;
+
+ oop.inherits(CoffeeHighlightRules, TextHighlightRules);
+
+ function CoffeeHighlightRules() {
+ var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*";
+
+ var keywords = (
+ "this|throw|then|try|typeof|super|switch|return|break|by|continue|" +
+ "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" +
+ "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"
+ );
+
+ 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 functionRule = {
+ token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"],
+ regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source
+ };
+
+ var stringEscape = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;
+
+ this.$rules = {
+ start : [
+ {
+ token : "constant.numeric",
+ regex : "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"
+ }, {
+ stateName: "qdoc",
+ token : "string", regex : "'''", next : [
+ {token : "string", regex : "'''", next : "start"},
+ {token : "constant.language.escape", regex : stringEscape},
+ {defaultToken: "string"}
+ ]
+ }, {
+ stateName: "qqdoc",
+ token : "string",
+ regex : '"""',
+ next : [
+ {token : "string", regex : '"""', next : "start"},
+ {token : "paren.string", regex : '#{', push : "start"},
+ {token : "constant.language.escape", regex : stringEscape},
+ {defaultToken: "string"}
+ ]
+ }, {
+ stateName: "qstring",
+ token : "string", regex : "'", next : [
+ {token : "string", regex : "'", next : "start"},
+ {token : "constant.language.escape", regex : stringEscape},
+ {defaultToken: "string"}
+ ]
+ }, {
+ stateName: "qqstring",
+ token : "string.start", regex : '"', next : [
+ {token : "string.end", regex : '"', next : "start"},
+ {token : "paren.string", regex : '#{', push : "start"},
+ {token : "constant.language.escape", regex : stringEscape},
+ {defaultToken: "string"}
+ ]
+ }, {
+ stateName: "js",
+ token : "string", regex : "`", next : [
+ {token : "string", regex : "`", next : "start"},
+ {token : "constant.language.escape", regex : stringEscape},
+ {defaultToken: "string"}
+ ]
+ }, {
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift() || "";
+ if (this.next.indexOf("string") != -1)
+ return "paren.string";
+ }
+ return "paren";
+ }
+ }, {
+ 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", "text", "identifier"],
+ regex : "(\\.)(\\s*)(" + illegal + ")"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\.{1,3}"
+ }, {
+ token : ["keyword", "text", "language.support.class",
+ "text", "keyword", "text", "language.support.class"],
+ regex : "(class)(\\s+)(" + identifier + ")(?:(\\s+)(extends)(\\s+)(" + identifier + "))?"
+ }, {
+ token : ["entity.name.function", "text", "keyword.operator", "text"].concat(functionRule.token),
+ regex : "(" + identifier + ")(\\s*)([=:])(\\s*)" + functionRule.regex
+ },
+ functionRule,
+ {
+ 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+"
+ }],
+
+
+ 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"
+ }, {
+ defaultToken : "comment"
+ }]
+ };
+ this.normalizeRules();
+ }
+
+ exports.CoffeeHighlightRules = CoffeeHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/coffee",["require","exports","module","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) {
+"use strict";
+
+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.HighlightRules = Rules;
+ this.$outdent = new Outdent();
+ this.foldingRules = new FoldMode();
+}
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+ var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|(?:swi|ca)tch(?:\s+[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/;
+
+ this.lineCommentStart = "#";
+ this.blockComment = {start: "###", end: "###"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/coffee_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/coffee";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-coldfusion.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-coldfusion.js
new file mode 100644
index 00000000..edbdb5b4
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-coldfusion.js
@@ -0,0 +1,2567 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+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(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": {"manifest": 1},
+ "head": {},
+ "title": {},
+ "base": {"href": 1, "target": 1},
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
+ "noscript": {"href": 1},
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
+ "section": {},
+ "nav": {},
+ "article": {"pubdate": 1},
+ "aside": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "header": {},
+ "footer": {},
+ "address": {},
+ "main": {},
+ "p": {},
+ "hr": {},
+ "pre": {},
+ "blockquote": {"cite": 1},
+ "ol": {"start": 1, "reversed": 1},
+ "ul": {},
+ "li": {"value": 1},
+ "dl": {},
+ "dt": {},
+ "dd": {},
+ "figure": {},
+ "figcaption": {},
+ "div": {},
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
+ "em": {},
+ "strong": {},
+ "small": {},
+ "s": {},
+ "cite": {},
+ "q": {"cite": 1},
+ "dfn": {},
+ "abbr": {},
+ "data": {},
+ "time": {"datetime": 1},
+ "code": {},
+ "var": {},
+ "samp": {},
+ "kbd": {},
+ "sub": {},
+ "sup": {},
+ "i": {},
+ "b": {},
+ "u": {},
+ "mark": {},
+ "ruby": {},
+ "rt": {},
+ "rp": {},
+ "bdi": {},
+ "bdo": {},
+ "span": {},
+ "br": {},
+ "wbr": {},
+ "ins": {"cite": 1, "datetime": 1},
+ "del": {"cite": 1, "datetime": 1},
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
+ "param": {"name": 1, "value": 1},
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
+ "source": {"src": 1, "type": 1, "media": 1},
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
+ "canvas": {"width": 1, "height": 1},
+ "map": {"name": 1},
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
+ "svg": {},
+ "math": {},
+ "table": {"summary": 1},
+ "caption": {},
+ "colgroup": {"span": 1},
+ "col": {"span": 1},
+ "tbody": {},
+ "thead": {},
+ "tfoot": {},
+ "tr": {},
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
+ "legend": {},
+ "label": {"form": 1, "for": 1},
+ "input": {
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
+ "datalist": {},
+ "optgroup": {"disabled": 1, "label": 1},
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
+ "output": {"for": 1, "form": 1, "name": 1},
+ "progress": {"value": 1, "max": 1},
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
+ "details": {"open": 1},
+ "summary": {},
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
+ "menu": {"type": 1, "label": 1},
+ "dialog": {"open": 1}
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+function findAttributeName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "attribute-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompletions(state, session, pos, prefix);
+ if (is(token, "attribute-value"))
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/&[a-z]*$/i.test(line))
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ var attributeName = findAttributeName(session, pos);
+
+ if (!tagName)
+ return [];
+ var values = [];
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
+ values = Object.keys(attributeMap[tagName][attributeName]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "attribute value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
+
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "html entity",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/coldfusion_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var ColdfusionHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+ this.$rules.tag[2].token = function (start, tag) {
+ var group = tag.slice(0,2) == "cf" ? "keyword" : "meta.tag";
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ group + ".tag-name.xml"];
+ }
+
+ var jsAndCss = Object.keys(this.$rules).filter(function(x) {
+ return /^(js|css)-/.test(x);
+ });
+ this.embedRules({
+ cfmlComment: [
+ { regex: "<!---", token: "comment.start", push: "cfmlComment"},
+ { regex: "--->", token: "comment.end", next: "pop"},
+ { defaultToken: "comment"}
+ ]
+ }, "", [
+ { regex: "<!---", token: "comment.start", push: "cfmlComment"}
+ ], [
+ "comment", "start", "tag_whitespace", "cdata"
+ ].concat(jsAndCss));
+
+
+ this.$rules.cfTag = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "pop"}
+ ];
+ var cfTag = {
+ token : function(start, tag) {
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "keyword.tag-name.xml"];
+ },
+ regex : "(</?)(cf[-_a-zA-Z0-9:.]+)",
+ push: "cfTag"
+ };
+ jsAndCss.forEach(function(s) {
+ this.$rules[s].unshift(cfTag);
+ }, this);
+
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "cfjs-", "cfscript");
+
+ this.normalizeRules();
+};
+
+oop.inherits(ColdfusionHighlightRules, HtmlHighlightRules);
+
+exports.ColdfusionHighlightRules = ColdfusionHighlightRules;
+});
+
+ace.define("ace/mode/coldfusion",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/html","ace/mode/coldfusion_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var HtmlMode = require("./html").Mode;
+var ColdfusionHighlightRules = require("./coldfusion_highlight_rules").ColdfusionHighlightRules;
+
+var voidElements = "cfabort|cfapplication|cfargument|cfassociate|cfbreak|cfcache|cfcollection|cfcookie|cfdbinfo|cfdirectory|cfdump|cfelse|cfelseif|cferror|cfexchangecalendar|cfexchangeconnection|cfexchangecontact|cfexchangefilter|cfexchangetask|cfexit|cffeed|cffile|cfflush|cfftp|cfheader|cfhtmlhead|cfhttpparam|cfimage|cfimport|cfinclude|cfindex|cfinsert|cfinvokeargument|cflocation|cflog|cfmailparam|cfNTauthenticate|cfobject|cfobjectcache|cfparam|cfpdfformparam|cfprint|cfprocparam|cfprocresult|cfproperty|cfqueryparam|cfregistry|cfreportparam|cfrethrow|cfreturn|cfschedule|cfsearch|cfset|cfsetting|cfthrow|cfzipparam)".split("|");
+
+var Mode = function() {
+ HtmlMode.call(this);
+
+ this.HighlightRules = ColdfusionHighlightRules;
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.voidElements = oop.mixin(lang.arrayToMap(voidElements), this.voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.$id = "ace/mode/coldfusion";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-csharp.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-csharp.js
new file mode 100644
index 00000000..d91e9985
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-csharp.js
@@ -0,0 +1,495 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/csharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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", // character
+ regex : /'(?:.|\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n]))?'/
+ }, {
+ token : "string", start : '"', end : '"|$', next: [
+ {token: "constant.language.escape", regex: /\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n])/},
+ {token: "invalid", regex: /\\./}
+ ]
+ }, {
+ token : "string", start : '@"', end : '"', next:[
+ {token: "constant.language.escape", regex: '""'}
+ ]
+ }, {
+ token : "string", start : /\$"/, end : '"|$', next: [
+ {token: "constant.language.escape", regex: /\\(:?$)|{{/},
+ {token: "constant.language.escape", regex: /\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n])/},
+ {token: "invalid", 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 : "keyword",
+ regex : "^\\s*#(if|else|elif|endif|define|undef|warning|error|line|region|endregion|pragma)"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+ this.normalizeRules();
+};
+
+oop.inherits(CSharpHighlightRules, TextHighlightRules);
+
+exports.CSharpHighlightRules = CSharpHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/folding/csharp",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var CFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, CFoldMode);
+
+(function() {
+ this.usingRe = /^\s*using \S/;
+
+ this.getFoldWidgetRangeBase = this.getFoldWidgetRange;
+ this.getFoldWidgetBase = this.getFoldWidget;
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var fw = this.getFoldWidgetBase(session, foldStyle, row);
+ if (!fw) {
+ var line = session.getLine(row);
+ if (/^\s*#region\b/.test(line))
+ return "start";
+ var usingRe = this.usingRe;
+ if (usingRe.test(line)) {
+ var prev = session.getLine(row - 1);
+ var next = session.getLine(row + 1);
+ if (!usingRe.test(prev) && usingRe.test(next))
+ return "start"
+ }
+ }
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var range = this.getFoldWidgetRangeBase(session, foldStyle, row);
+ if (range)
+ return range;
+
+ var line = session.getLine(row);
+ if (this.usingRe.test(line))
+ return this.getUsingStatementBlock(session, line, row);
+
+ if (/^\s*#region\b/.test(line))
+ return this.getRegionBlock(session, line, row);
+ };
+
+ this.getUsingStatementBlock = function(session, line, row) {
+ var startColumn = line.match(this.usingRe)[0].length - 1;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ if (/^\s*$/.test(line))
+ continue;
+ if (!this.usingRe.test(line))
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+
+ this.getRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*#(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m)
+ continue;
+ if (m[1])
+ depth--;
+ else
+ depth++;
+
+ if (!depth)
+ break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/csharp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csharp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/csharp"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CSharpHighlightRules = require("./csharp_highlight_rules").CSharpHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/csharp").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CSharpHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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;
+ };
+
+ this.$id = "ace/mode/csharp";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-css.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-css.js
new file mode 100644
index 00000000..b7a41850
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-css.js
@@ -0,0 +1,699 @@
+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 supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-curly.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-curly.js
new file mode 100644
index 00000000..d6d9d1cb
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-curly.js
@@ -0,0 +1,2535 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+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(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": {"manifest": 1},
+ "head": {},
+ "title": {},
+ "base": {"href": 1, "target": 1},
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
+ "noscript": {"href": 1},
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
+ "section": {},
+ "nav": {},
+ "article": {"pubdate": 1},
+ "aside": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "header": {},
+ "footer": {},
+ "address": {},
+ "main": {},
+ "p": {},
+ "hr": {},
+ "pre": {},
+ "blockquote": {"cite": 1},
+ "ol": {"start": 1, "reversed": 1},
+ "ul": {},
+ "li": {"value": 1},
+ "dl": {},
+ "dt": {},
+ "dd": {},
+ "figure": {},
+ "figcaption": {},
+ "div": {},
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
+ "em": {},
+ "strong": {},
+ "small": {},
+ "s": {},
+ "cite": {},
+ "q": {"cite": 1},
+ "dfn": {},
+ "abbr": {},
+ "data": {},
+ "time": {"datetime": 1},
+ "code": {},
+ "var": {},
+ "samp": {},
+ "kbd": {},
+ "sub": {},
+ "sup": {},
+ "i": {},
+ "b": {},
+ "u": {},
+ "mark": {},
+ "ruby": {},
+ "rt": {},
+ "rp": {},
+ "bdi": {},
+ "bdo": {},
+ "span": {},
+ "br": {},
+ "wbr": {},
+ "ins": {"cite": 1, "datetime": 1},
+ "del": {"cite": 1, "datetime": 1},
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
+ "param": {"name": 1, "value": 1},
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
+ "source": {"src": 1, "type": 1, "media": 1},
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
+ "canvas": {"width": 1, "height": 1},
+ "map": {"name": 1},
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
+ "svg": {},
+ "math": {},
+ "table": {"summary": 1},
+ "caption": {},
+ "colgroup": {"span": 1},
+ "col": {"span": 1},
+ "tbody": {},
+ "thead": {},
+ "tfoot": {},
+ "tr": {},
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
+ "legend": {},
+ "label": {"form": 1, "for": 1},
+ "input": {
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
+ "datalist": {},
+ "optgroup": {"disabled": 1, "label": 1},
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
+ "output": {"for": 1, "form": 1, "name": 1},
+ "progress": {"value": 1, "max": 1},
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
+ "details": {"open": 1},
+ "summary": {},
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
+ "menu": {"type": 1, "label": 1},
+ "dialog": {"open": 1}
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+function findAttributeName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "attribute-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompletions(state, session, pos, prefix);
+ if (is(token, "attribute-value"))
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/&[a-z]*$/i.test(line))
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ var attributeName = findAttributeName(session, pos);
+
+ if (!tagName)
+ return [];
+ var values = [];
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
+ values = Object.keys(attributeMap[tagName][attributeName]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "attribute value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
+
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "html entity",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/curly_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+
+var CurlyHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ this.$rules["start"].unshift({
+ token: "variable",
+ regex: "{{",
+ push: "curly-start"
+ });
+
+ this.$rules["curly-start"] = [{
+ token: "variable",
+ regex: "}}",
+ next: "pop"
+ }];
+
+ this.normalizeRules();
+};
+
+oop.inherits(CurlyHighlightRules, HtmlHighlightRules);
+
+exports.CurlyHighlightRules = CurlyHighlightRules;
+
+});
+
+ace.define("ace/mode/curly",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/matching_brace_outdent","ace/mode/folding/html","ace/mode/curly_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var CurlyHighlightRules = require("./curly_highlight_rules").CurlyHighlightRules;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = CurlyHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new HtmlFoldMode();
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.$id = "ace/mode/curly";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-d.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-d.js
new file mode 100644
index 00000000..672411a0
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-d.js
@@ -0,0 +1,513 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/d_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DHighlightRules = function() {
+
+ var keywords = (
+ "this|super|import|module|body|mixin|__traits|invariant|alias|asm|delete|"+
+ "typeof|typeid|sizeof|cast|new|in|is|typedef|__vector|__parameters"
+ );
+
+ var keywordControls = (
+ "break|case|continue|default|do|else|for|foreach|foreach_reverse|goto|if|" +
+ "return|switch|while|catch|try|throw|finally|version|assert|unittest|with"
+ );
+
+ var types = (
+ "auto|bool|char|dchar|wchar|byte|ubyte|float|double|real|" +
+ "cfloat|creal|cdouble|cent|ifloat|ireal|idouble|" +
+ "int|long|short|void|uint|ulong|ushort|ucent|" +
+ "function|delegate|string|wstring|dstring|size_t|ptrdiff_t|hash_t|Object"
+ );
+
+ var modifiers = (
+ "abstract|align|debug|deprecated|export|extern|const|final|in|inout|out|" +
+ "ref|immutable|lazy|nothrow|override|package|pragma|private|protected|" +
+ "public|pure|scope|shared|__gshared|synchronized|static|volatile"
+ );
+
+ var storages = (
+ "class|struct|union|template|interface|enum|macro"
+ );
+
+ var stringEscapesSeq = {
+ token: "constant.language.escape",
+ regex: "\\\\(?:(?:x[0-9A-F]{2})|(?:[0-7]{1,3})|(?:['\"\\?0abfnrtv\\\\])|" +
+ "(?:u[0-9a-fA-F]{4})|(?:U[0-9a-fA-F]{8}))"
+ };
+
+ var builtinConstants = (
+ "null|true|false|"+
+ "__DATE__|__EOF__|__TIME__|__TIMESTAMP__|__VENDOR__|__VERSION__|"+
+ "__FILE__|__MODULE__|__LINE__|__FUNCTION__|__PRETTY_FUNCTION__"
+ );
+
+ var operators = (
+ "/|/\\=|&|&\\=|&&|\\|\\|\\=|\\|\\||\\-|\\-\\=|\\-\\-|\\+|" +
+ "\\+\\=|\\+\\+|\\<|\\<\\=|\\<\\<|\\<\\<\\=|\\<\\>|\\<\\>\\=|\\>|\\>\\=|\\>\\>\\=|" +
+ "\\>\\>\\>\\=|\\>\\>|\\>\\>\\>|\\!|\\!\\=|\\!\\<\\>|\\!\\<\\>\\=|\\!\\<|\\!\\<\\=|" +
+ "\\!\\>|\\!\\>\\=|\\?|\\$|\\=|\\=\\=|\\*|\\*\\=|%|%\\=|" +
+ "\\^|\\^\\=|\\^\\^|\\^\\^\\=|~|~\\=|\\=\\>|#"
+ );
+
+ var keywordMapper = this.$keywords = this.createKeywordMapper({
+ "keyword.modifier" : modifiers,
+ "keyword.control" : keywordControls,
+ "keyword.type" : types,
+ "keyword": keywords,
+ "keyword.storage": storages,
+ "punctation": "\\.|\\,|;|\\.\\.|\\.\\.\\.",
+ "keyword.operator" : operators,
+ "constant.language": builtinConstants
+ }, "identifier");
+
+ var identifierRe = "[a-zA-Z_\u00a1-\uffff][a-zA-Z\\d_\u00a1-\uffff]*\\b";
+
+ this.$rules = {
+ "start" : [
+ { //-------------------------------------------------------- COMMENTS
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "star-comment"
+ }, {
+ token: "comment.shebang",
+ regex: "^\\s*#!.*"
+ }, {
+ token : "comment",
+ regex : "\\/\\+",
+ next: "plus-comment"
+ }, { //-------------------------------------------------------- STRINGS
+ onMatch: function(value, currentState, state) {
+ state.unshift(this.next, value.substr(2));
+ return "string";
+ },
+ regex: 'q"(?:[\\[\\(\\{\\<]+)',
+ next: 'operator-heredoc-string'
+ }, {
+ onMatch: function(value, currentState, state) {
+ state.unshift(this.next, value.substr(2));
+ return "string";
+ },
+ regex: 'q"(?:[a-zA-Z_]+)$',
+ next: 'identifier-heredoc-string'
+ }, {
+ token : "string", // multi line string start
+ regex : '[xr]?"',
+ next : "quote-string"
+ }, {
+ token : "string", // multi line string start
+ regex : '[xr]?`',
+ next : "backtick-string"
+ }, {
+ token : "string", // single line
+ regex : "[xr]?['](?:(?:\\\\.)|(?:[^'\\\\]))*?['][cdw]?"
+ }, { //-------------------------------------------------------- RULES
+ token: ["keyword", "text", "paren.lparen"],
+ regex: /(asm)(\s*)({)/,
+ next: "d-asm"
+ }, {
+ token: ["keyword", "text", "paren.lparen", "constant.language"],
+ regex: "(__traits)(\\s*)(\\()("+identifierRe+")"
+ }, { // import|module abc
+ token: ["keyword", "text", "variable.module"],
+ regex: "(import|module)(\\s+)((?:"+identifierRe+"\\.?)*)"
+ }, { // storage Name
+ token: ["keyword.storage", "text", "entity.name.type"],
+ regex: "("+storages+")(\\s*)("+identifierRe+")"
+ }, { // alias|typedef foo bar;
+ token: ["keyword", "text", "variable.storage", "text"],
+ regex: "(alias|typedef)(\\s*)("+identifierRe+")(\\s*)"
+ }, { //-------------------------------------------------------- OTHERS
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F_]+(l|ul|u|f|F|L|U|UL)?\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d[\\d_]*(?:(?:\\.[\\d_]*)?(?:[eE][+-]?[\\d_]+)?)?(l|ul|u|f|F|L|U|UL)?\\b"
+ }, {
+ token: "entity.other.attribute-name",
+ regex: "@"+identifierRe
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : operators
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\.|\\:"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "star-comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken: 'comment'
+ }
+ ],
+ "plus-comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\+\\/",
+ next : "start"
+ }, {
+ defaultToken: 'comment'
+ }
+ ],
+
+ "quote-string" : [
+ stringEscapesSeq,
+ {
+ token : "string",
+ regex : '"[cdw]?',
+ next : "start"
+ }, {
+ defaultToken: 'string'
+ }
+ ],
+
+ "backtick-string" : [
+ stringEscapesSeq,
+ {
+ token : "string",
+ regex : '`[cdw]?',
+ next : "start"
+ }, {
+ defaultToken: 'string'
+ }
+ ],
+
+ "operator-heredoc-string": [
+ {
+ onMatch: function(value, currentState, state) {
+ value = value.substring(value.length-2, value.length-1);
+ var map = {'>':'<',']':'[',')':'(','}':'{'};
+ if(Object.keys(map).indexOf(value) != -1)
+ value = map[value];
+ if(value != state[1]) return "string";
+ state.shift();
+ state.shift();
+
+ return "string";
+ },
+ regex: '(?:[\\]\\)}>]+)"',
+ next: 'start'
+ }, {
+ token: 'string',
+ regex: '[^\\]\\)}>]+'
+ }
+ ],
+
+ "identifier-heredoc-string": [
+ {
+ onMatch: function(value, currentState, state) {
+ value = value.substring(0, value.length-1);
+ if(value != state[1]) return "string";
+ state.shift();
+ state.shift();
+
+ return "string";
+ },
+ regex: '^(?:[A-Za-z_][a-zA-Z0-9]+)"',
+ next: 'start'
+ }, {
+ token: 'string',
+ regex: '[^\\]\\)}>]+'
+ }
+ ],
+
+ "d-asm": [
+ {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: 'keyword.instruction',
+ regex: '[a-zA-Z]+',
+ next: 'd-asm-instruction'
+ }, {
+ token: "text",
+ regex: "\\s+"
+ }
+ ],
+ 'd-asm-instruction': [
+ {
+ token: 'constant.language',
+ regex: /AL|AH|AX|EAX|BL|BH|BX|EBX|CL|CH|CX|ECX|DL|DH|DX|EDX|BP|EBP|SP|ESP|DI|EDI|SI|ESI/i
+ }, {
+ token: 'identifier',
+ regex: '[a-zA-Z]+'
+ }, {
+ token: 'string',
+ regex: '".*"'
+ }, {
+ token: 'comment',
+ regex: '//.*$'
+ }, {
+ token: 'constant.numeric',
+ regex: '[0-9.xA-F]+'
+ }, {
+ token: 'punctuation.operator',
+ regex: '\\,'
+ }, {
+ token: 'punctuation.operator',
+ regex: ';',
+ next: 'd-asm'
+ }, {
+ token: 'text',
+ regex: '\\s+'
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+DHighlightRules.metaData = {
+ comment: 'D language',
+ fileTypes: [ 'd', 'di' ],
+ firstLineMatch: '^#!.*\\b[glr]?dmd\\b.',
+ foldingStartMarker: '(?x)/\\*\\*(?!\\*)|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))',
+ foldingStopMarker: '(?<!\\*)\\*\\*/|^\\s*\\}',
+ keyEquivalent: '^~D',
+ name: 'D',
+ scopeName: 'source.d'
+};
+oop.inherits(DHighlightRules, TextHighlightRules);
+
+exports.DHighlightRules = DHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/d",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/d_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var DHighlightRules = require("./d_highlight_rules").DHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = DHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/d";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-dart.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-dart.js
new file mode 100644
index 00000000..c7042342
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-dart.js
@@ -0,0 +1,689 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var cFunctions = exports.cFunctions = "\\b(?:hypot(?: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|char16_t|char32_t"
+ );
+
+ var storageModifiers = (
+ "const|extern|register|restrict|static|volatile|inline|private|" +
+ "protected|public|friend|explicit|virtual|export|mutable|typename|" +
+ "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"
+ );
+
+ 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|nullptr"
+ );
+
+ 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";
+ var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source;
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "//$",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : "//",
+ next : "singleLineComment"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // character
+ regex : "'(?:" + escapeRe + "|.)?'"
+ }, {
+ token : "string.start",
+ regex : '"',
+ stateName: "qqstring",
+ next: [
+ { token: "string", regex: /\\\s*$/, next: "qqstring" },
+ { token: "constant.language.escape", regex: escapeRe },
+ { token: "constant.language.escape", regex: /%[^'"\\]/ },
+ { token: "string.end", regex: '"|$', next: "start" },
+ { defaultToken: "string"}
+ ]
+ }, {
+ token : "string.start",
+ regex : 'R"\\(',
+ stateName: "rawString",
+ next: [
+ { token: "string.end", regex: '\\)"', next: "start" },
+ { defaultToken: "string"}
+ ]
+ }, {
+ 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 : "keyword", // pre-compiler directives
+ regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b",
+ next : "directive"
+ }, {
+ token : "keyword", // special case pre-compiler directive
+ regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"
+ }, {
+ token : "support.function.C99.c",
+ regex : cFunctions
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*"
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "singleLineComment" : [
+ {
+ token : "comment",
+ regex : /\\$/,
+ next : "singleLineComment"
+ }, {
+ token : "comment",
+ regex : /$/,
+ next : "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ],
+ "directive" : [
+ {
+ token : "constant.other.multiline",
+ regex : /\\/
+ },
+ {
+ 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",
+ regex : /[^\\\/]+/,
+ next : "start"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+ this.normalizeRules();
+};
+
+oop.inherits(c_cppHighlightRules, TextHighlightRules);
+
+exports.c_cppHighlightRules = c_cppHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","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 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.HighlightRules = c_cppHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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);
+ };
+
+ this.$id = "ace/mode/c_cpp";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/dart_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+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|rethrow|assert|break|case|continue|default|do|else|for|if|in|return|switch|while|new|deferred|async|await";
+ var keywordDeclaration = "abstract|class|extends|external|factory|implements|get|native|operator|set|typedef|with|enum";
+ 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 = {
+ defaultToken : "string"
+ };
+
+ this.$rules =
+ {
+ "start": [
+ {
+ token : "comment",
+ regex : /\/\/.*$/
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ },
+ {
+ token: ["meta.preprocessor.script.dart"],
+ regex: "^(#!.*)$"
+ },
+ {
+ token: "keyword.other.import.dart",
+ regex: "(?:\\b)(?:library|import|export|part|of|show|hide)(?:\\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"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "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]
+}
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(DartHighlightRules, TextHighlightRules);
+
+exports.DartHighlightRules = DartHighlightRules;
+});
+
+ace.define("ace/mode/dart",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/dart_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var CMode = require("./c_cpp").Mode;
+var DartHighlightRules = require("./dart_highlight_rules").DartHighlightRules;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ CMode.call(this);
+ this.HighlightRules = DartHighlightRules;
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, CMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/dart";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-diff.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-diff.js
new file mode 100644
index 00000000..ae878dbe
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-diff.js
@@ -0,0 +1,139 @@
+ace.define("ace/mode/diff_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 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: "text"
+ }, {
+ regex: "\\s*$",
+ token: "invalid"
+ }, {
+ defaultToken: "invisible",
+ caseInsensitive: true
+ }
+ ]
+ };
+};
+
+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) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/diff",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/diff_highlight_rules","ace/mode/folding/diff"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var HighlightRules = require("./diff_highlight_rules").DiffHighlightRules;
+var FoldMode = require("./folding/diff").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HighlightRules;
+ this.foldingRules = new FoldMode(["diff", "index", "\\+{3}", "@@|\\*{5}"], "i");
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.$id = "ace/mode/diff";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-django.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-django.js
new file mode 100644
index 00000000..b681d992
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-django.js
@@ -0,0 +1,2565 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+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(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": {"manifest": 1},
+ "head": {},
+ "title": {},
+ "base": {"href": 1, "target": 1},
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
+ "noscript": {"href": 1},
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
+ "section": {},
+ "nav": {},
+ "article": {"pubdate": 1},
+ "aside": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "header": {},
+ "footer": {},
+ "address": {},
+ "main": {},
+ "p": {},
+ "hr": {},
+ "pre": {},
+ "blockquote": {"cite": 1},
+ "ol": {"start": 1, "reversed": 1},
+ "ul": {},
+ "li": {"value": 1},
+ "dl": {},
+ "dt": {},
+ "dd": {},
+ "figure": {},
+ "figcaption": {},
+ "div": {},
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
+ "em": {},
+ "strong": {},
+ "small": {},
+ "s": {},
+ "cite": {},
+ "q": {"cite": 1},
+ "dfn": {},
+ "abbr": {},
+ "data": {},
+ "time": {"datetime": 1},
+ "code": {},
+ "var": {},
+ "samp": {},
+ "kbd": {},
+ "sub": {},
+ "sup": {},
+ "i": {},
+ "b": {},
+ "u": {},
+ "mark": {},
+ "ruby": {},
+ "rt": {},
+ "rp": {},
+ "bdi": {},
+ "bdo": {},
+ "span": {},
+ "br": {},
+ "wbr": {},
+ "ins": {"cite": 1, "datetime": 1},
+ "del": {"cite": 1, "datetime": 1},
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
+ "param": {"name": 1, "value": 1},
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
+ "source": {"src": 1, "type": 1, "media": 1},
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
+ "canvas": {"width": 1, "height": 1},
+ "map": {"name": 1},
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
+ "svg": {},
+ "math": {},
+ "table": {"summary": 1},
+ "caption": {},
+ "colgroup": {"span": 1},
+ "col": {"span": 1},
+ "tbody": {},
+ "thead": {},
+ "tfoot": {},
+ "tr": {},
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
+ "legend": {},
+ "label": {"form": 1, "for": 1},
+ "input": {
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
+ "datalist": {},
+ "optgroup": {"disabled": 1, "label": 1},
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
+ "output": {"for": 1, "form": 1, "name": 1},
+ "progress": {"value": 1, "max": 1},
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
+ "details": {"open": 1},
+ "summary": {},
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
+ "menu": {"type": 1, "label": 1},
+ "dialog": {"open": 1}
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+function findAttributeName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "attribute-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompletions(state, session, pos, prefix);
+ if (is(token, "attribute-value"))
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/&[a-z]*$/i.test(line))
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ var attributeName = findAttributeName(session, pos);
+
+ if (!tagName)
+ return [];
+ var values = [];
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
+ values = Object.keys(attributeMap[tagName][attributeName]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "attribute value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
+
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "html entity",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/django",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var DjangoHighlightRules = function(){
+ this.$rules = {
+ 'start': [{
+ token: "string",
+ regex: '".*?"'
+ }, {
+ token: "string",
+ regex: "'.*?'"
+ }, {
+ token: "constant",
+ regex: '[0-9]+'
+ }, {
+ token: "variable",
+ regex: "[-_a-zA-Z0-9:]+"
+ }],
+ 'tag': [{
+ token: "entity.name.function",
+ regex: "[a-zA-Z][_a-zA-Z0-9]*",
+ next: "start"
+ }]
+ };
+};
+
+oop.inherits(DjangoHighlightRules, TextHighlightRules)
+
+var DjangoHtmlHighlightRules = function() {
+ this.$rules = new HtmlHighlightRules().getRules();
+
+ for (var i in this.$rules) {
+ this.$rules[i].unshift({
+ token: "comment.line",
+ regex: "\\{#.*?#\\}"
+ }, {
+ token: "comment.block",
+ regex: "\\{\\%\\s*comment\\s*\\%\\}",
+ merge: true,
+ next: "django-comment"
+ }, {
+ token: "constant.language",
+ regex: "\\{\\{",
+ next: "django-start"
+ }, {
+ token: "constant.language",
+ regex: "\\{\\%",
+ next: "django-tag"
+ });
+ this.embedRules(DjangoHighlightRules, "django-", [{
+ token: "comment.block",
+ regex: "\\{\\%\\s*endcomment\\s*\\%\\}",
+ merge: true,
+ next: "start"
+ }, {
+ token: "constant.language",
+ regex: "\\%\\}",
+ next: "start"
+ }, {
+ token: "constant.language",
+ regex: "\\}\\}",
+ next: "start"
+ }]);
+ }
+};
+
+oop.inherits(DjangoHtmlHighlightRules, HtmlHighlightRules);
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = DjangoHtmlHighlightRules;
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.$id = "ace/mode/django";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-dockerfile.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-dockerfile.js
new file mode 100644
index 00000000..f19df224
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-dockerfile.js
@@ -0,0 +1,492 @@
+ace.define("ace/mode/sh_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 reservedKeywords = exports.reservedKeywords = (
+ '!|{|}|case|do|done|elif|else|'+
+ 'esac|fi|for|if|in|then|until|while|'+
+ '&|;|export|local|read|typeset|unset|'+
+ 'elif|select|set|function|declare|readonly'
+ );
+
+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 + "(?==))";
+
+ var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))";
+
+ var func = "(?:" + variableName + "\\s*\\(\\))";
+
+ this.$rules = {
+ "start" : [{
+ token : "constant",
+ regex : /\\./
+ }, {
+ token : ["text", "comment"],
+ regex : /(^|\s)(#.*)$/
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[$`"\\]|$)/
+ }, {
+ include : "variables"
+ }, {
+ token : "keyword.operator",
+ regex : /`/ // TODO highlight `
+ }, {
+ token : "string.end",
+ regex : '"',
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string",
+ regex : "\\$'",
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/
+ }, {
+ token : "string",
+ regex : "'",
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ regex : "<<<",
+ token : "keyword.operator"
+ }, {
+ stateName: "heredoc",
+ regex : "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",
+ onMatch : function(value, currentState, stack) {
+ var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
+ var tokens = value.split(this.splitRegex);
+ stack.push(next, tokens[4]);
+ return [
+ {type:"constant", value: tokens[1]},
+ {type:"text", value: tokens[2]},
+ {type:"string", value: tokens[3]},
+ {type:"support.class", value: tokens[4]},
+ {type:"string", value: tokens[5]}
+ ];
+ },
+ rules: {
+ heredoc: [{
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }],
+ indentedHeredoc: [{
+ token: "string",
+ regex: "^\t+"
+ }, {
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }]
+ }
+ }, {
+ regex : "$",
+ token : "empty",
+ next : function(currentState, stack) {
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
+ return stack[0];
+ return currentState;
+ }
+ }, {
+ token : ["keyword", "text", "text", "text", "variable"],
+ regex : /(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/
+ }, {
+ token : "variable.language",
+ regex : builtinVariable
+ }, {
+ token : "variable",
+ regex : variable
+ }, {
+ include : "variables"
+ }, {
+ token : "support.function",
+ regex : func
+ }, {
+ token : "support.function",
+ regex : fileDescriptor
+ }, {
+ token : "string", // ' string
+ start : "'", end : "'"
+ }, {
+ 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 : "punctuation.operator",
+ regex : ";"
+ }, {
+ token : "paren.lparen",
+ regex : "[\\[\\(\\{]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\)\\}]",
+ next : "pop"
+ }],
+ variables: [{
+ token : "variable",
+ regex : /(\$)(\w+)/
+ }, {
+ token : ["variable", "paren.lparen"],
+ regex : /(\$)(\()/,
+ push : "start"
+ }, {
+ token : ["variable", "paren.lparen", "keyword.operator", "variable", "keyword.operator"],
+ regex : /(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,
+ push : "start"
+ }, {
+ token : "variable",
+ regex : /\$[*@#?\-$!0_]/
+ }, {
+ token : ["variable", "paren.lparen"],
+ regex : /(\$)(\{)/,
+ push : "start"
+ }]
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(ShHighlightRules, TextHighlightRules);
+
+exports.ShHighlightRules = ShHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules;
+var Range = require("../range").Range;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+
+var Mode = function() {
+ this.HighlightRules = ShHighlightRules;
+ this.foldingRules = new CStyleFoldMode();
+ this.$behaviour = new CstyleBehaviour();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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.getTokenizer().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));
+ };
+
+ this.$id = "ace/mode/sh";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/dockerfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/sh_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules;
+
+var DockerfileHighlightRules = function() {
+ ShHighlightRules.call(this);
+
+ var startRules = this.$rules.start;
+ for (var i = 0; i < startRules.length; i++) {
+ if (startRules[i].token == "variable.language") {
+ startRules.splice(i, 0, {
+ token: "constant.language",
+ regex: "(?:^(?:FROM|MAINTAINER|RUN|CMD|EXPOSE|ENV|ADD|ENTRYPOINT|VOLUME|USER|WORKDIR|ONBUILD|COPY|LABEL)\\b)",
+ caseInsensitive: true
+ });
+ break;
+ }
+ }
+
+};
+
+oop.inherits(DockerfileHighlightRules, ShHighlightRules);
+
+exports.DockerfileHighlightRules = DockerfileHighlightRules;
+});
+
+ace.define("ace/mode/dockerfile",["require","exports","module","ace/lib/oop","ace/mode/sh","ace/mode/dockerfile_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var ShMode = require("./sh").Mode;
+var DockerfileHighlightRules = require("./dockerfile_highlight_rules").DockerfileHighlightRules;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ ShMode.call(this);
+
+ this.HighlightRules = DockerfileHighlightRules;
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, ShMode);
+
+(function() {
+ this.$id = "ace/mode/dockerfile";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-dot.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-dot.js
new file mode 100644
index 00000000..72914768
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-dot.js
@@ -0,0 +1,410 @@
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/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) {
+"use strict";
+
+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 : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "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/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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/dot",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matching_brace_outdent","ace/mode/dot_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var DotHighlightRules = require("./dot_highlight_rules").DotHighlightRules;
+var DotFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = DotHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new DotFoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ["//", "#"];
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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);
+ };
+
+ this.$id = "ace/mode/dot";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-drools.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-drools.js
new file mode 100644
index 00000000..5863afe0
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-drools.js
@@ -0,0 +1,457 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\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"
+ }, {
+ defaultToken : "comment"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaHighlightRules, TextHighlightRules);
+
+exports.JavaHighlightRules = JavaHighlightRules;
+});
+
+ace.define("ace/mode/drools_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/java_highlight_rules","ace/mode/doc_comment_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+var packageIdentifierRe = "[a-zA-Z\\$_\u00a1-\uffff][\\.a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var DroolsHighlightRules = function() {
+
+ var keywords = ("date|effective|expires|lock|on|active|no|loop|auto|focus" +
+ "|activation|group|agenda|ruleflow|duration|timer|calendars|refract|direct" +
+ "|dialect|salience|enabled|attributes|extends|template" +
+ "|function|contains|matches|eval|excludes|soundslike" +
+ "|memberof|not|in|or|and|exists|forall|over|from|entry|point|accumulate|acc|collect" +
+ "|action|reverse|result|end|init|instanceof|extends|super|boolean|char|byte|short" +
+ "|int|long|float|double|this|void|class|new|case|final|if|else|for|while|do" +
+ "|default|try|catch|finally|switch|synchronized|return|throw|break|continue|assert" +
+ "|modify|static|public|protected|private|abstract|native|transient|volatile" +
+ "|strictfp|throws|interface|enum|implements|type|window|trait|no-loop|str"
+ );
+
+ 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": "null",
+ "support.class" : langClasses,
+ "support.function" : "retract|update|modify|insert"
+ }, "identifier");
+
+ var stringRules = function() {
+ return [{
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }];
+ };
+
+
+ var basicPreRules = function(blockCommentRules) {
+ return [{
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : blockCommentRules
+ }, {
+ 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"
+ }];
+ };
+
+ var blockCommentRules = function(returnRule) {
+ return [
+ {
+ token : "comment.block", // closing comment
+ regex : "\\*\\/",
+ next : returnRule
+ }, {
+ defaultToken : "comment.block"
+ }
+ ];
+ }
+
+ var basicPostRules = function() {
+ return [{
+ 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+"
+ }];
+ };
+
+
+ this.$rules = {
+ "start" : [].concat(basicPreRules("block.comment"), [
+ {
+ token : "entity.name.type",
+ regex : "@[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : ["keyword","text","entity.name.type"],
+ regex : "(package)(\\s+)(" + packageIdentifierRe +")"
+ }, {
+ token : ["keyword","text","keyword","text","entity.name.type"],
+ regex : "(import)(\\s+)(function)(\\s+)(" + packageIdentifierRe +")"
+ }, {
+ token : ["keyword","text","entity.name.type"],
+ regex : "(import)(\\s+)(" + packageIdentifierRe +")"
+ }, {
+ token : ["keyword","text","entity.name.type","text","variable"],
+ regex : "(global)(\\s+)(" + packageIdentifierRe +")(\\s+)(" + identifierRe +")"
+ }, {
+ token : ["keyword","text","keyword","text","entity.name.type"],
+ regex : "(declare)(\\s+)(trait)(\\s+)(" + identifierRe +")"
+ }, {
+ token : ["keyword","text","entity.name.type"],
+ regex : "(declare)(\\s+)(" + identifierRe +")"
+ }, {
+ token : ["keyword","text","entity.name.type"],
+ regex : "(extends)(\\s+)(" + packageIdentifierRe +")"
+ }, {
+ token : ["keyword","text"],
+ regex : "(rule)(\\s+)",
+ next : "asset.name"
+ }],
+ stringRules(),
+ [{
+ token : ["variable.other","text","text"],
+ regex : "(" + identifierRe + ")(\\s*)(:)"
+ }, {
+ token : ["keyword","text"],
+ regex : "(query)(\\s+)",
+ next : "asset.name"
+ }, {
+ token : ["keyword","text"],
+ regex : "(when)(\\s*)"
+ }, {
+ token : ["keyword","text"],
+ regex : "(then)(\\s*)",
+ next : "java-start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }], basicPostRules()),
+ "block.comment" : blockCommentRules("start"),
+ "asset.name" : [
+ {
+ token : "entity.name",
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "entity.name",
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "entity.name",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "start"
+ }]
+ };
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+
+ this.embedRules(JavaHighlightRules, "java-", [
+ {
+ token : "support.function",
+ regex: "\\b(insert|modify|retract|update)\\b"
+ }, {
+ token : "keyword",
+ regex: "\\bend\\b",
+ next : "start"
+ }]);
+
+};
+
+oop.inherits(DroolsHighlightRules, TextHighlightRules);
+
+exports.DroolsHighlightRules = DroolsHighlightRules;
+});
+
+ace.define("ace/mode/folding/drools",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var FoldMode = exports.FoldMode = function() {};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+ this.foldingStartMarker = /\b(rule|declare|query|when|then)\b/;
+ this.foldingStopMarker = /\bend\b/;
+
+ 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]) {
+ var position = {row: row, column: line.length};
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var seek = "end";
+ var token = iterator.getCurrentToken();
+ if (token.value == "when") {
+ seek = "then";
+ }
+ while (token) {
+ if (token.value == seek) {
+ return Range.fromPoints(position ,{
+ row: iterator.getCurrentTokenRow(),
+ column: iterator.getCurrentTokenColumn()
+ });
+ }
+ token = iterator.stepForward();
+ }
+ }
+
+ }
+ }
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/drools",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/drools_highlight_rules","ace/mode/folding/drools"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var DroolsHighlightRules = require("./drools_highlight_rules").DroolsHighlightRules;
+var DroolsFoldMode = require("./folding/drools").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = DroolsHighlightRules;
+ this.foldingRules = new DroolsFoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.$id = "ace/mode/drools";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-eiffel.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-eiffel.js
new file mode 100644
index 00000000..decf61d1
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-eiffel.js
@@ -0,0 +1,128 @@
+ace.define("ace/mode/eiffel_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 EiffelHighlightRules = function() {
+ var keywords = "across|agent|alias|all|attached|as|assign|attribute|check|" +
+ "class|convert|create|debug|deferred|detachable|do|else|elseif|end|" +
+ "ensure|expanded|export|external|feature|from|frozen|if|inherit|" +
+ "inspect|invariant|like|local|loop|not|note|obsolete|old|once|" +
+ "Precursor|redefine|rename|require|rescue|retry|select|separate|" +
+ "some|then|undefine|until|variant|when";
+
+ var operatorKeywords = "and|implies|or|xor";
+
+ var languageConstants = "Void";
+
+ var booleanConstants = "True|False";
+
+ var languageVariables = "Current|Result";
+
+ var keywordMapper = this.createKeywordMapper({
+ "constant.language": languageConstants,
+ "constant.language.boolean": booleanConstants,
+ "variable.language": languageVariables,
+ "keyword.operator": operatorKeywords,
+ "keyword": keywords
+ }, "identifier", true);
+
+ var simpleString = /(?:[^"%\b\f\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)+?/;
+
+ this.$rules = {
+ "start": [{
+ token : "string.quoted.other", // Aligned-verbatim-strings (verbatim option not supported)
+ regex : /"\[/,
+ next: "aligned_verbatim_string"
+ }, {
+ token : "string.quoted.other", // Non-aligned-verbatim-strings (verbatim option not supported)
+ regex : /"\{/,
+ next: "non-aligned_verbatim_string"
+ }, {
+ token : "string.quoted.double",
+ regex : /"(?:[^%\b\f\n\r\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)*?"/
+ }, {
+ token : "comment.line.double-dash",
+ regex : /--.*/
+ }, {
+ token : "constant.character",
+ regex : /'(?:[^%\b\f\n\r\t\v]|%[A-DFHLNQR-V%'"()<>]|%\/(?:0[xX][\da-fA-F](?:_*[\da-fA-F])*|0[cC][0-7](?:_*[0-7])*|0[bB][01](?:_*[01])*|\d(?:_*\d)*)\/)'/
+ }, {
+ token : "constant.numeric", // hexa | octal | bin
+ regex : /\b0(?:[xX][\da-fA-F](?:_*[\da-fA-F])*|[cC][0-7](?:_*[0-7])*|[bB][01](?:_*[01])*)\b/
+ }, {
+ token : "constant.numeric",
+ regex : /(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?[eE][+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]|<<|\|\(/
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]|>>|\|\)/
+ }, {
+ token : "keyword.operator", // punctuation
+ regex : /:=|->|\.(?=\w)|[;,:?]/
+ }, {
+ token : "keyword.operator",
+ regex : /\\\\|\|\.\.\||\.\.|\/[~\/]?|[><\/]=?|[-+*^=~]/
+ }, {
+ token : function (v) {
+ var result = keywordMapper(v);
+ if (result === "identifier" && v === v.toUpperCase()) {
+ result = "entity.name.type";
+ }
+ return result;
+ },
+ regex : /[a-zA-Z][a-zA-Z\d_]*\b/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "aligned_verbatim_string" : [{
+ token : "string",
+ regex : /]"/,
+ next : "start"
+ }, {
+ token : "string",
+ regex : simpleString
+ }
+ ],
+ "non-aligned_verbatim_string" : [{
+ token : "string.quoted.other",
+ regex : /}"/,
+ next : "start"
+ }, {
+ token : "string.quoted.other",
+ regex : simpleString
+ }
+ ]};
+};
+
+oop.inherits(EiffelHighlightRules, TextHighlightRules);
+
+exports.EiffelHighlightRules = EiffelHighlightRules;
+});
+
+ace.define("ace/mode/eiffel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/eiffel_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var EiffelHighlightRules = require("./eiffel_highlight_rules").EiffelHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = EiffelHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.$id = "ace/mode/eiffel";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-ejs.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-ejs.js
new file mode 100644
index 00000000..4309c8b8
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-ejs.js
@@ -0,0 +1,2999 @@
+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 supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+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(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": {"manifest": 1},
+ "head": {},
+ "title": {},
+ "base": {"href": 1, "target": 1},
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
+ "noscript": {"href": 1},
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
+ "section": {},
+ "nav": {},
+ "article": {"pubdate": 1},
+ "aside": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "header": {},
+ "footer": {},
+ "address": {},
+ "main": {},
+ "p": {},
+ "hr": {},
+ "pre": {},
+ "blockquote": {"cite": 1},
+ "ol": {"start": 1, "reversed": 1},
+ "ul": {},
+ "li": {"value": 1},
+ "dl": {},
+ "dt": {},
+ "dd": {},
+ "figure": {},
+ "figcaption": {},
+ "div": {},
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
+ "em": {},
+ "strong": {},
+ "small": {},
+ "s": {},
+ "cite": {},
+ "q": {"cite": 1},
+ "dfn": {},
+ "abbr": {},
+ "data": {},
+ "time": {"datetime": 1},
+ "code": {},
+ "var": {},
+ "samp": {},
+ "kbd": {},
+ "sub": {},
+ "sup": {},
+ "i": {},
+ "b": {},
+ "u": {},
+ "mark": {},
+ "ruby": {},
+ "rt": {},
+ "rp": {},
+ "bdi": {},
+ "bdo": {},
+ "span": {},
+ "br": {},
+ "wbr": {},
+ "ins": {"cite": 1, "datetime": 1},
+ "del": {"cite": 1, "datetime": 1},
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
+ "param": {"name": 1, "value": 1},
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
+ "source": {"src": 1, "type": 1, "media": 1},
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
+ "canvas": {"width": 1, "height": 1},
+ "map": {"name": 1},
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
+ "svg": {},
+ "math": {},
+ "table": {"summary": 1},
+ "caption": {},
+ "colgroup": {"span": 1},
+ "col": {"span": 1},
+ "tbody": {},
+ "thead": {},
+ "tfoot": {},
+ "tr": {},
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
+ "legend": {},
+ "label": {"form": 1, "for": 1},
+ "input": {
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
+ "datalist": {},
+ "optgroup": {"disabled": 1, "label": 1},
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
+ "output": {"for": 1, "form": 1, "name": 1},
+ "progress": {"value": 1, "max": 1},
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
+ "details": {"open": 1},
+ "summary": {},
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
+ "menu": {"type": 1, "label": 1},
+ "dialog": {"open": 1}
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+function findAttributeName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "attribute-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompletions(state, session, pos, prefix);
+ if (is(token, "attribute-value"))
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/&[a-z]*$/i.test(line))
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ var attributeName = findAttributeName(session, pos);
+
+ if (!tagName)
+ return [];
+ var values = [];
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
+ values = Object.keys(attributeMap[tagName][attributeName]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "attribute value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
+
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "html entity",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).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) {
+"use strict";
+
+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 instanceVariable = exports.instanceVariable = {
+ token : "variable.instance", // instance variable
+ regex : "@{1,2}[a-zA-Z_\\d]+"
+};
+
+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|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|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*(?=[).,;]|$)"
+ },
+
+ [{
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren.lparen";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.start",
+ regex : /"/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+ }, {
+ token : "paren.start",
+ regex : /#{/,
+ push : "start"
+ }, {
+ token : "string.end",
+ regex : /"/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+ }, {
+ token : "paren.start",
+ regex : /#{/,
+ push : "start"
+ }, {
+ token : "string.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : /'/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\['\\]/
+ }, {
+ token : "string.end",
+ regex : /'/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ {
+ 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 : "=>"
+ }, {
+ stateName: "heredoc",
+ onMatch : function(value, currentState, stack) {
+ var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
+ var tokens = value.split(this.splitRegex);
+ stack.push(next, tokens[3]);
+ return [
+ {type:"constant", value: tokens[1]},
+ {type:"string", value: tokens[2]},
+ {type:"support.class", value: tokens[3]},
+ {type:"string", value: tokens[4]}
+ ];
+ },
+ regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",
+ rules: {
+ heredoc: [{
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }],
+ indentedHeredoc: [{
+ token: "string",
+ regex: "^ +"
+ }, {
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }]
+ }
+ }, {
+ regex : "$",
+ token : "empty",
+ next : function(currentState, stack) {
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
+ return stack[0];
+ return currentState;
+ }
+ }, {
+ token : "string.character",
+ regex : "\\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(?:$|\\s.*$)",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+
+ this.normalizeRules();
+};
+
+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) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = RubyHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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*$/);
+ var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/);
+ var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
+ var startingConditional = line.match(/^\s*(if|else|when)\s*/)
+ if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return /^\s+(end|else)$/.test(line + input) || this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, session, row) {
+ var line = session.getLine(row);
+ if (/}/.test(line))
+ return this.$outdent.autoOutdent(session, row);
+ var indent = this.$getIndent(line);
+ var prevLine = session.getLine(row - 1);
+ var prevIndent = this.$getIndent(prevLine);
+ var tab = session.getTabString();
+ if (prevIndent.length <= indent.length) {
+ if (indent.slice(-tab.length) == tab)
+ session.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ }
+ };
+
+ this.$id = "ace/mode/ruby";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/ejs",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/javascript_highlight_rules","ace/lib/oop","ace/mode/html","ace/mode/javascript","ace/mode/css","ace/mode/ruby"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+
+var EjsHighlightRules = function(start, end) {
+ HtmlHighlightRules.call(this);
+
+ if (!start)
+ start = "(?:<%|<\\?|{{)";
+ if (!end)
+ end = "(?:%>|\\?>|}})";
+
+ for (var i in this.$rules) {
+ this.$rules[i].unshift({
+ token : "markup.list.meta.tag",
+ regex : start + "(?![>}])[-=]?",
+ push : "ejs-start"
+ });
+ }
+
+ this.embedRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "ejs-", [{
+ token : "markup.list.meta.tag",
+ regex : "-?" + end,
+ next : "pop"
+ }, {
+ token: "comment",
+ regex: "//.*?" + end,
+ next: "pop"
+ }]);
+
+ this.normalizeRules();
+};
+
+
+oop.inherits(EjsHighlightRules, HtmlHighlightRules);
+
+exports.EjsHighlightRules = EjsHighlightRules;
+
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var RubyMode = require("./ruby").Mode;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = EjsHighlightRules;
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode,
+ "ejs-": JavaScriptMode
+ });
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+
+ this.$id = "ace/mode/ejs";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-elixir.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-elixir.js
new file mode 100644
index 00000000..d8931b98
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-elixir.js
@@ -0,0 +1,494 @@
+ace.define("ace/mode/elixir_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 ElixirHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { token:
+ [ 'meta.module.elixir',
+ 'keyword.control.module.elixir',
+ 'meta.module.elixir',
+ 'entity.name.type.module.elixir' ],
+ regex: '^(\\s*)(defmodule)(\\s+)((?:[A-Z]\\w*\\s*\\.\\s*)*[A-Z]\\w*)' },
+ { token: 'comment.documentation.heredoc',
+ regex: '@(?:module|type)?doc (?:~[a-z])?"""',
+ push:
+ [ { token: 'comment.documentation.heredoc',
+ regex: '\\s*"""',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'comment.documentation.heredoc' } ],
+ comment: '@doc with heredocs is treated as documentation' },
+ { token: 'comment.documentation.heredoc',
+ regex: '@(?:module|type)?doc ~[A-Z]"""',
+ push:
+ [ { token: 'comment.documentation.heredoc',
+ regex: '\\s*"""',
+ next: 'pop' },
+ { defaultToken: 'comment.documentation.heredoc' } ],
+ comment: '@doc with heredocs is treated as documentation' },
+ { token: 'comment.documentation.heredoc',
+ regex: '@(?:module|type)?doc (?:~[a-z])?\'\'\'',
+ push:
+ [ { token: 'comment.documentation.heredoc',
+ regex: '\\s*\'\'\'',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'comment.documentation.heredoc' } ],
+ comment: '@doc with heredocs is treated as documentation' },
+ { token: 'comment.documentation.heredoc',
+ regex: '@(?:module|type)?doc ~[A-Z]\'\'\'',
+ push:
+ [ { token: 'comment.documentation.heredoc',
+ regex: '\\s*\'\'\'',
+ next: 'pop' },
+ { defaultToken: 'comment.documentation.heredoc' } ],
+ comment: '@doc with heredocs is treated as documentation' },
+ { token: 'comment.documentation.false',
+ regex: '@(?:module|type)?doc false',
+ comment: '@doc false is treated as documentation' },
+ { token: 'comment.documentation.string',
+ regex: '@(?:module|type)?doc "',
+ push:
+ [ { token: 'comment.documentation.string',
+ regex: '"',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'comment.documentation.string' } ],
+ comment: '@doc with string is treated as documentation' },
+ { token: 'keyword.control.elixir',
+ regex: '\\b(?:do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defdelegate|defcallback|defmacrocallback|defexception|defoverridable|exit|after|rescue|catch|else|raise|throw|import|require|alias|use|quote|unquote|super)\\b(?![?!])',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<!\\.)\\b(do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defdelegate|defcallback|defmacrocallback|defexception|defoverridable|exit|after|rescue|catch|else|raise|throw|import|require|alias|use|quote|unquote|super)\\b(?![?!])' },
+ { token: 'keyword.operator.elixir',
+ regex: '\\b(?:and|not|or|when|xor|in|inlist|inbits)\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<!\\.)\\b(and|not|or|when|xor|in|inlist|inbits)\\b',
+ comment: ' as above, just doesn\'t need a \'end\' and does a logic operation' },
+ { token: 'constant.language.elixir',
+ regex: '\\b(?:nil|true|false)\\b(?![?!])' },
+ { token: 'variable.language.elixir',
+ regex: '\\b__(?:CALLER|ENV|MODULE|DIR)__\\b(?![?!])' },
+ { token:
+ [ 'punctuation.definition.variable.elixir',
+ 'variable.other.readwrite.module.elixir' ],
+ regex: '(@)([a-zA-Z_]\\w*)' },
+ { token:
+ [ 'punctuation.definition.variable.elixir',
+ 'variable.other.anonymous.elixir' ],
+ regex: '(&)(\\d*)' },
+ { token: 'variable.other.constant.elixir',
+ regex: '\\b[A-Z]\\w*\\b' },
+ { token: 'constant.numeric.elixir',
+ regex: '\\b(?:0x[\\da-fA-F](?:_?[\\da-fA-F])*|\\d(?:_?\\d)*(?:\\.(?![^[:space:][:digit:]])(?:_?\\d)*)?(?:[eE][-+]?\\d(?:_?\\d)*)?|0b[01]+|0o[0-7]+)\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '\\b(0x\\h(?>_?\\h)*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0b[01]+|0o[0-7]+)\\b' },
+ { token: 'punctuation.definition.constant.elixir',
+ regex: ':\'',
+ push:
+ [ { token: 'punctuation.definition.constant.elixir',
+ regex: '\'',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'constant.other.symbol.single-quoted.elixir' } ] },
+ { token: 'punctuation.definition.constant.elixir',
+ regex: ':"',
+ push:
+ [ { token: 'punctuation.definition.constant.elixir',
+ regex: '"',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'constant.other.symbol.double-quoted.elixir' } ] },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '(?:\'\'\')',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?>\'\'\')',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '^\\s*\'\'\'',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'support.function.variable.quoted.single.heredoc.elixir' } ],
+ comment: 'Single-quoted heredocs' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '\'',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\'',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'support.function.variable.quoted.single.elixir' } ],
+ comment: 'single quoted string (allows for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '(?:""")',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?>""")',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '^\\s*"""',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.quoted.double.heredoc.elixir' } ],
+ comment: 'Double-quoted heredocs' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '"',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.quoted.double.elixir' } ],
+ comment: 'double quoted string (allows for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z](?:""")',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '~[a-z](?>""")',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '^\\s*"""',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.quoted.double.heredoc.elixir' } ],
+ comment: 'Double-quoted heredocs sigils' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z]\\{',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\}[a-z]*',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.interpolated.elixir' } ],
+ comment: 'sigil (allow for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z]\\[',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\][a-z]*',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.interpolated.elixir' } ],
+ comment: 'sigil (allow for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z]\\<',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\>[a-z]*',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.interpolated.elixir' } ],
+ comment: 'sigil (allow for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z]\\(',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\)[a-z]*',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.interpolated.elixir' } ],
+ comment: 'sigil (allow for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z][^\\w]',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '[^\\w][a-z]*',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.interpolated.elixir' } ],
+ comment: 'sigil (allow for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z](?:""")',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '~[A-Z](?>""")',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '^\\s*"""',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'Double-quoted heredocs sigils' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z]\\{',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\}[a-z]*',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'sigil (without interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z]\\[',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\][a-z]*',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'sigil (without interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z]\\<',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\>[a-z]*',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'sigil (without interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z]\\(',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\)[a-z]*',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'sigil (without interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z][^\\w]',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '[^\\w][a-z]*',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'sigil (without interpolation)' },
+ { token: ['punctuation.definition.constant.elixir', 'constant.other.symbol.elixir'],
+ regex: '(:)([a-zA-Z_][\\w@]*(?:[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(?:\\^\\^)?)',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<!:)(:)(?>[a-zA-Z_][\\w@]*(?>[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(\\^\\^)?)',
+ comment: 'symbols' },
+ { token: 'punctuation.definition.constant.elixir',
+ regex: '(?:[a-zA-Z_][\\w@]*(?:[?!])?):(?!:)',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?>[a-zA-Z_][\\w@]*(?>[?!])?)(:)(?!:)',
+ comment: 'symbols' },
+ { token:
+ [ 'punctuation.definition.comment.elixir',
+ 'comment.line.number-sign.elixir' ],
+ regex: '(#)(.*)' },
+ { token: 'constant.numeric.elixir',
+ regex: '\\?(?:\\\\(?:x[\\da-fA-F]{1,2}(?![\\da-fA-F])\\b|[^xMC])|[^\\s\\\\])',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<!\\w)\\?(\\\\(x\\h{1,2}(?!\\h)\\b|[^xMC])|[^\\s\\\\])',
+ comment: '\n\t\t\tmatches questionmark-letters.\n\n\t\t\texamples (1st alternation = hex):\n\t\t\t?\\x1 ?\\x61\n\n\t\t\texamples (2rd alternation = escaped):\n\t\t\t?\\n ?\\b\n\n\t\t\texamples (3rd alternation = normal):\n\t\t\t?a ?A ?0 \n\t\t\t?* ?" ?( \n\t\t\t?. ?#\n\t\t\t\n\t\t\tthe negative lookbehind prevents against matching\n\t\t\tp(42.tainted?)\n\t\t\t' },
+ { token: 'keyword.operator.assignment.augmented.elixir',
+ regex: '\\+=|\\-=|\\|\\|=|~=|&&=' },
+ { token: 'keyword.operator.comparison.elixir',
+ regex: '===?|!==?|<=?|>=?' },
+ { token: 'keyword.operator.bitwise.elixir',
+ regex: '\\|{3}|&{3}|\\^{3}|<{3}|>{3}|~{3}' },
+ { token: 'keyword.operator.logical.elixir',
+ regex: '!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b',
+ originalRegex: '(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b' },
+ { token: 'keyword.operator.arithmetic.elixir',
+ regex: '\\*|\\+|\\-|/' },
+ { token: 'keyword.operator.other.elixir',
+ regex: '\\||\\+\\+|\\-\\-|\\*\\*|\\\\\\\\|\\<\\-|\\<\\>|\\<\\<|\\>\\>|\\:\\:|\\.\\.|\\|>|~|=>' },
+ { token: 'keyword.operator.assignment.elixir', regex: '=' },
+ { token: 'punctuation.separator.other.elixir', regex: ':' },
+ { token: 'punctuation.separator.statement.elixir',
+ regex: '\\;' },
+ { token: 'punctuation.separator.object.elixir', regex: ',' },
+ { token: 'punctuation.separator.method.elixir', regex: '\\.' },
+ { token: 'punctuation.section.scope.elixir', regex: '\\{|\\}' },
+ { token: 'punctuation.section.array.elixir', regex: '\\[|\\]' },
+ { token: 'punctuation.section.function.elixir',
+ regex: '\\(|\\)' } ],
+ '#escaped_char':
+ [ { token: 'constant.character.escape.elixir',
+ regex: '\\\\(?:x[\\da-fA-F]{1,2}|.)' } ],
+ '#interpolated_elixir':
+ [ { token:
+ [ 'source.elixir.embedded.source',
+ 'source.elixir.embedded.source.empty' ],
+ regex: '(#\\{)(\\})' },
+ { todo:
+ { token: 'punctuation.section.embedded.elixir',
+ regex: '#\\{',
+ push:
+ [ { token: 'punctuation.section.embedded.elixir',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#nest_curly_and_self' },
+ { include: '$self' },
+ { defaultToken: 'source.elixir.embedded.source' } ] } } ],
+ '#nest_curly_and_self':
+ [ { token: 'punctuation.section.scope.elixir',
+ regex: '\\{',
+ push:
+ [ { token: 'punctuation.section.scope.elixir',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#nest_curly_and_self' } ] },
+ { include: '$self' } ],
+ '#regex_sub':
+ [ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { token:
+ [ 'punctuation.definition.arbitrary-repitition.elixir',
+ 'string.regexp.arbitrary-repitition.elixir',
+ 'string.regexp.arbitrary-repitition.elixir',
+ 'punctuation.definition.arbitrary-repitition.elixir' ],
+ regex: '(\\{)(\\d+)((?:,\\d+)?)(\\})' },
+ { token: 'punctuation.definition.character-class.elixir',
+ regex: '\\[(?:\\^?\\])?',
+ push:
+ [ { token: 'punctuation.definition.character-class.elixir',
+ regex: '\\]',
+ next: 'pop' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.regexp.character-class.elixir' } ] },
+ { token: 'punctuation.definition.group.elixir',
+ regex: '\\(',
+ push:
+ [ { token: 'punctuation.definition.group.elixir',
+ regex: '\\)',
+ next: 'pop' },
+ { include: '#regex_sub' },
+ { defaultToken: 'string.regexp.group.elixir' } ] },
+ { token:
+ [ 'punctuation.definition.comment.elixir',
+ 'comment.line.number-sign.elixir' ],
+ regex: '(?:^|\\s)(#)(\\s[[a-zA-Z0-9,. \\t?!-][^\\x00-\\x7F]]*$)',
+ originalRegex: '(?<=^|\\s)(#)\\s[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$',
+ comment: 'We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.' } ] }
+
+ this.normalizeRules();
+};
+
+ElixirHighlightRules.metaData = { comment: 'Textmate bundle for Elixir Programming Language.',
+ fileTypes: [ 'ex', 'exs' ],
+ firstLineMatch: '^#!/.*\\belixir',
+ foldingStartMarker: '(after|else|catch|rescue|\\-\\>|\\{|\\[|do)\\s*$',
+ foldingStopMarker: '^\\s*((\\}|\\]|after|else|catch|rescue)\\s*$|end\\b)',
+ keyEquivalent: '^~E',
+ name: 'Elixir',
+ scopeName: 'source.elixir' }
+
+
+oop.inherits(ElixirHighlightRules, TextHighlightRules);
+
+exports.ElixirHighlightRules = ElixirHighlightRules;
+});
+
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/elixir",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elixir_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ElixirHighlightRules = require("./elixir_highlight_rules").ElixirHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ElixirHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/elixir"
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-elm.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-elm.js
new file mode 100644
index 00000000..24406af9
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-elm.js
@@ -0,0 +1,299 @@
+ace.define("ace/mode/elm_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 ElmHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": "as|case|class|data|default|deriving|do|else|export|foreign|" +
+ "hiding|jsevent|if|import|in|infix|infixl|infixr|instance|let|" +
+ "module|newtype|of|open|then|type|where|_|port|\u03BB"
+ }, "identifier");
+
+ var escapeRe = /\\(\d+|['"\\&trnbvf])/;
+
+ var smallRe = /[a-z_]/.source;
+ var largeRe = /[A-Z]/.source;
+ var idRe = /[a-z_A-Z0-9']/.source;
+
+ this.$rules = {
+ start: [{
+ token: "string.start",
+ regex: '"',
+ next: "string"
+ }, {
+ token: "string.character",
+ regex: "'(?:" + escapeRe.source + "|.)'?"
+ }, {
+ regex: /0(?:[xX][0-9A-Fa-f]+|[oO][0-7]+)|\d+(\.\d+)?([eE][-+]?\d*)?/,
+ token: "constant.numeric"
+ }, {
+ token: "comment",
+ regex: "--.*"
+ }, {
+ token : "keyword",
+ regex : /\.\.|\||:|=|\\|"|->|<-|\u2192/
+ }, {
+ token : "keyword.operator",
+ regex : /[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]+/
+ }, {
+ token : "operator.punctuation",
+ regex : /[,;`]/
+ }, {
+ regex : largeRe + idRe + "+\\.?",
+ token : function(value) {
+ if (value[value.length - 1] == ".")
+ return "entity.name.function";
+ return "constant.language";
+ }
+ }, {
+ regex : "^" + smallRe + idRe + "+",
+ token : function(value) {
+ return "constant.language";
+ }
+ }, {
+ token : keywordMapper,
+ regex : "[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b"
+ }, {
+ regex: "{-#?",
+ token: "comment.start",
+ onMatch: function(value, currentState, stack) {
+ this.next = value.length == 2 ? "blockComment" : "docComment";
+ return this.token;
+ }
+ }, {
+ token: "variable.language",
+ regex: /\[markdown\|/,
+ next: "markdown"
+ }, {
+ token: "paren.lparen",
+ regex: /[\[({]/
+ }, {
+ token: "paren.rparen",
+ regex: /[\])}]/
+ } ],
+ markdown: [{
+ regex: /\|\]/,
+ next: "start"
+ }, {
+ defaultToken : "string"
+ }],
+ blockComment: [{
+ regex: "{-",
+ token: "comment.start",
+ push: "blockComment"
+ }, {
+ regex: "-}",
+ token: "comment.end",
+ next: "pop"
+ }, {
+ defaultToken: "comment"
+ }],
+ docComment: [{
+ regex: "{-",
+ token: "comment.start",
+ push: "docComment"
+ }, {
+ regex: "-}",
+ token: "comment.end",
+ next: "pop"
+ }, {
+ defaultToken: "doc.comment"
+ }],
+ string: [{
+ token: "constant.language.escape",
+ regex: escapeRe
+ }, {
+ token: "text",
+ regex: /\\(\s|$)/,
+ next: "stringGap"
+ }, {
+ token: "string.end",
+ regex: '"',
+ next: "start"
+ }, {
+ defaultToken: "string"
+ }],
+ stringGap: [{
+ token: "text",
+ regex: /\\/,
+ next: "string"
+ }, {
+ token: "error",
+ regex: "",
+ next: "start"
+ }]
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(ElmHighlightRules, TextHighlightRules);
+
+exports.ElmHighlightRules = ElmHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/elm",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elm_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var HighlightRules = require("./elm_highlight_rules").ElmHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "{-", end: "-}", nestable: true};
+ this.$id = "ace/mode/elm";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-erlang.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-erlang.js
new file mode 100644
index 00000000..3554bf7e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-erlang.js
@@ -0,0 +1,1002 @@
+ace.define("ace/mode/erlang_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 ErlangHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { include: '#module-directive' },
+ { include: '#import-export-directive' },
+ { include: '#behaviour-directive' },
+ { include: '#record-directive' },
+ { include: '#define-directive' },
+ { include: '#macro-directive' },
+ { include: '#directive' },
+ { include: '#function' },
+ { include: '#everything-else' } ],
+ '#atom':
+ [ { token: 'punctuation.definition.symbol.begin.erlang',
+ regex: '\'',
+ push:
+ [ { token: 'punctuation.definition.symbol.end.erlang',
+ regex: '\'',
+ next: 'pop' },
+ { token:
+ [ 'punctuation.definition.escape.erlang',
+ 'constant.other.symbol.escape.erlang',
+ 'punctuation.definition.escape.erlang',
+ 'constant.other.symbol.escape.erlang',
+ 'constant.other.symbol.escape.erlang' ],
+ regex: '(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' },
+ { token: 'invalid.illegal.atom.erlang', regex: '\\\\\\^?.?' },
+ { defaultToken: 'constant.other.symbol.quoted.single.erlang' } ] },
+ { token: 'constant.other.symbol.unquoted.erlang',
+ regex: '[a-z][a-zA-Z\\d@_]*' } ],
+ '#behaviour-directive':
+ [ { token:
+ [ 'meta.directive.behaviour.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.behaviour.erlang',
+ 'keyword.control.directive.behaviour.erlang',
+ 'meta.directive.behaviour.erlang',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'meta.directive.behaviour.erlang',
+ 'entity.name.type.class.behaviour.definition.erlang',
+ 'meta.directive.behaviour.erlang',
+ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.behaviour.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(behaviour)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)' } ],
+ '#binary':
+ [ { token: 'punctuation.definition.binary.begin.erlang',
+ regex: '<<',
+ push:
+ [ { token: 'punctuation.definition.binary.end.erlang',
+ regex: '>>',
+ next: 'pop' },
+ { token:
+ [ 'punctuation.separator.binary.erlang',
+ 'punctuation.separator.value-size.erlang' ],
+ regex: '(,)|(:)' },
+ { include: '#internal-type-specifiers' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.structure.binary.erlang' } ] } ],
+ '#character':
+ [ { token:
+ [ 'punctuation.definition.character.erlang',
+ 'punctuation.definition.escape.erlang',
+ 'constant.character.escape.erlang',
+ 'punctuation.definition.escape.erlang',
+ 'constant.character.escape.erlang',
+ 'constant.character.escape.erlang' ],
+ regex: '(\\$)(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' },
+ { token: 'invalid.illegal.character.erlang',
+ regex: '\\$\\\\\\^?.?' },
+ { token:
+ [ 'punctuation.definition.character.erlang',
+ 'constant.character.erlang' ],
+ regex: '(\\$)(\\S)' },
+ { token: 'invalid.illegal.character.erlang', regex: '\\$.?' } ],
+ '#comment':
+ [ { token: 'punctuation.definition.comment.erlang',
+ regex: '%.*$',
+ push_:
+ [ { token: 'comment.line.percentage.erlang',
+ regex: '$',
+ next: 'pop' },
+ { defaultToken: 'comment.line.percentage.erlang' } ] } ],
+ '#define-directive':
+ [ { token:
+ [ 'meta.directive.define.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.define.erlang',
+ 'keyword.control.directive.define.erlang',
+ 'meta.directive.define.erlang',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'meta.directive.define.erlang',
+ 'entity.name.function.macro.definition.erlang',
+ 'meta.directive.define.erlang',
+ 'punctuation.separator.parameters.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(,)',
+ push:
+ [ { token:
+ [ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.define.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '(\\))(\\s*)(\\.)',
+ next: 'pop' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.directive.define.erlang' } ] },
+ { token: 'meta.directive.define.erlang',
+ regex: '(?=^\\s*-\\s*define\\s*\\(\\s*[a-zA-Z\\d@_]+\\s*\\()',
+ push:
+ [ { token:
+ [ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.define.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '(\\))(\\s*)(\\.)',
+ next: 'pop' },
+ { token:
+ [ 'text',
+ 'punctuation.section.directive.begin.erlang',
+ 'text',
+ 'keyword.control.directive.define.erlang',
+ 'text',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'text',
+ 'entity.name.function.macro.definition.erlang',
+ 'text',
+ 'punctuation.definition.parameters.begin.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\()',
+ push:
+ [ { token:
+ [ 'punctuation.definition.parameters.end.erlang',
+ 'text',
+ 'punctuation.separator.parameters.erlang' ],
+ regex: '(\\))(\\s*)(,)',
+ next: 'pop' },
+ { token: 'punctuation.separator.parameters.erlang', regex: ',' },
+ { include: '#everything-else' } ] },
+ { token: 'punctuation.separator.define.erlang',
+ regex: '\\|\\||\\||:|;|,|\\.|->' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.directive.define.erlang' } ] } ],
+ '#directive':
+ [ { token:
+ [ 'meta.directive.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.erlang',
+ 'keyword.control.directive.erlang',
+ 'meta.directive.erlang',
+ 'punctuation.definition.parameters.begin.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\(?)',
+ push:
+ [ { token:
+ [ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '(\\)?)(\\s*)(\\.)',
+ next: 'pop' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.directive.erlang' } ] },
+ { token:
+ [ 'meta.directive.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.erlang',
+ 'keyword.control.directive.erlang',
+ 'meta.directive.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\.)' } ],
+ '#everything-else':
+ [ { include: '#comment' },
+ { include: '#record-usage' },
+ { include: '#macro-usage' },
+ { include: '#expression' },
+ { include: '#keyword' },
+ { include: '#textual-operator' },
+ { include: '#function-call' },
+ { include: '#tuple' },
+ { include: '#list' },
+ { include: '#binary' },
+ { include: '#parenthesized-expression' },
+ { include: '#character' },
+ { include: '#number' },
+ { include: '#atom' },
+ { include: '#string' },
+ { include: '#symbolic-operator' },
+ { include: '#variable' } ],
+ '#expression':
+ [ { token: 'keyword.control.if.erlang',
+ regex: '\\bif\\b',
+ push:
+ [ { token: 'keyword.control.end.erlang',
+ regex: '\\bend\\b',
+ next: 'pop' },
+ { include: '#internal-expression-punctuation' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.expression.if.erlang' } ] },
+ { token: 'keyword.control.case.erlang',
+ regex: '\\bcase\\b',
+ push:
+ [ { token: 'keyword.control.end.erlang',
+ regex: '\\bend\\b',
+ next: 'pop' },
+ { include: '#internal-expression-punctuation' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.expression.case.erlang' } ] },
+ { token: 'keyword.control.receive.erlang',
+ regex: '\\breceive\\b',
+ push:
+ [ { token: 'keyword.control.end.erlang',
+ regex: '\\bend\\b',
+ next: 'pop' },
+ { include: '#internal-expression-punctuation' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.expression.receive.erlang' } ] },
+ { token:
+ [ 'keyword.control.fun.erlang',
+ 'text',
+ 'entity.name.type.class.module.erlang',
+ 'text',
+ 'punctuation.separator.module-function.erlang',
+ 'text',
+ 'entity.name.function.erlang',
+ 'text',
+ 'punctuation.separator.function-arity.erlang' ],
+ regex: '\\b(fun)(\\s*)(?:([a-z][a-zA-Z\\d@_]*)(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*)(\\s*)(/)' },
+ { token: 'keyword.control.fun.erlang',
+ regex: '\\bfun\\b',
+ push:
+ [ { token: 'keyword.control.end.erlang',
+ regex: '\\bend\\b',
+ next: 'pop' },
+ { token: 'text',
+ regex: '(?=\\()',
+ push:
+ [ { token: 'punctuation.separator.clauses.erlang',
+ regex: ';|(?=\\bend\\b)',
+ next: 'pop' },
+ { include: '#internal-function-parts' } ] },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.expression.fun.erlang' } ] },
+ { token: 'keyword.control.try.erlang',
+ regex: '\\btry\\b',
+ push:
+ [ { token: 'keyword.control.end.erlang',
+ regex: '\\bend\\b',
+ next: 'pop' },
+ { include: '#internal-expression-punctuation' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.expression.try.erlang' } ] },
+ { token: 'keyword.control.begin.erlang',
+ regex: '\\bbegin\\b',
+ push:
+ [ { token: 'keyword.control.end.erlang',
+ regex: '\\bend\\b',
+ next: 'pop' },
+ { include: '#internal-expression-punctuation' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.expression.begin.erlang' } ] },
+ { token: 'keyword.control.query.erlang',
+ regex: '\\bquery\\b',
+ push:
+ [ { token: 'keyword.control.end.erlang',
+ regex: '\\bend\\b',
+ next: 'pop' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.expression.query.erlang' } ] } ],
+ '#function':
+ [ { token:
+ [ 'meta.function.erlang',
+ 'entity.name.function.definition.erlang',
+ 'meta.function.erlang' ],
+ regex: '^(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(?=\\()',
+ push:
+ [ { token: 'punctuation.terminator.function.erlang',
+ regex: '\\.',
+ next: 'pop' },
+ { token: [ 'text', 'entity.name.function.erlang', 'text' ],
+ regex: '^(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(?=\\()' },
+ { token: 'text',
+ regex: '(?=\\()',
+ push:
+ [ { token: 'punctuation.separator.clauses.erlang',
+ regex: ';|(?=\\.)',
+ next: 'pop' },
+ { include: '#parenthesized-expression' },
+ { include: '#internal-function-parts' } ] },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.function.erlang' } ] } ],
+ '#function-call':
+ [ { token: 'meta.function-call.erlang',
+ regex: '(?=(?:[a-z][a-zA-Z\\d@_]*|\'[^\']*\')\\s*(?:\\(|:\\s*(?:[a-z][a-zA-Z\\d@_]*|\'[^\']*\')\\s*\\())',
+ push:
+ [ { token: 'punctuation.definition.parameters.end.erlang',
+ regex: '\\)',
+ next: 'pop' },
+ { token:
+ [ 'entity.name.type.class.module.erlang',
+ 'text',
+ 'punctuation.separator.module-function.erlang',
+ 'text',
+ 'entity.name.function.guard.erlang',
+ 'text',
+ 'punctuation.definition.parameters.begin.erlang' ],
+ regex: '(?:(erlang)(\\s*)(:)(\\s*))?(is_atom|is_binary|is_constant|is_float|is_function|is_integer|is_list|is_number|is_pid|is_port|is_reference|is_tuple|is_record|abs|element|hd|length|node|round|self|size|tl|trunc)(\\s*)(\\()',
+ push:
+ [ { token: 'text', regex: '(?=\\))', next: 'pop' },
+ { token: 'punctuation.separator.parameters.erlang', regex: ',' },
+ { include: '#everything-else' } ] },
+ { token:
+ [ 'entity.name.type.class.module.erlang',
+ 'text',
+ 'punctuation.separator.module-function.erlang',
+ 'text',
+ 'entity.name.function.erlang',
+ 'text',
+ 'punctuation.definition.parameters.begin.erlang' ],
+ regex: '(?:([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(\\()',
+ push:
+ [ { token: 'text', regex: '(?=\\))', next: 'pop' },
+ { token: 'punctuation.separator.parameters.erlang', regex: ',' },
+ { include: '#everything-else' } ] },
+ { defaultToken: 'meta.function-call.erlang' } ] } ],
+ '#import-export-directive':
+ [ { token:
+ [ 'meta.directive.import.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.import.erlang',
+ 'keyword.control.directive.import.erlang',
+ 'meta.directive.import.erlang',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'meta.directive.import.erlang',
+ 'entity.name.type.class.module.erlang',
+ 'meta.directive.import.erlang',
+ 'punctuation.separator.parameters.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(import)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(,)',
+ push:
+ [ { token:
+ [ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.import.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '(\\))(\\s*)(\\.)',
+ next: 'pop' },
+ { include: '#internal-function-list' },
+ { defaultToken: 'meta.directive.import.erlang' } ] },
+ { token:
+ [ 'meta.directive.export.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.export.erlang',
+ 'keyword.control.directive.export.erlang',
+ 'meta.directive.export.erlang',
+ 'punctuation.definition.parameters.begin.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(export)(\\s*)(\\()',
+ push:
+ [ { token:
+ [ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.export.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '(\\))(\\s*)(\\.)',
+ next: 'pop' },
+ { include: '#internal-function-list' },
+ { defaultToken: 'meta.directive.export.erlang' } ] } ],
+ '#internal-expression-punctuation':
+ [ { token:
+ [ 'punctuation.separator.clause-head-body.erlang',
+ 'punctuation.separator.clauses.erlang',
+ 'punctuation.separator.expressions.erlang' ],
+ regex: '(->)|(;)|(,)' } ],
+ '#internal-function-list':
+ [ { token: 'punctuation.definition.list.begin.erlang',
+ regex: '\\[',
+ push:
+ [ { token: 'punctuation.definition.list.end.erlang',
+ regex: '\\]',
+ next: 'pop' },
+ { token:
+ [ 'entity.name.function.erlang',
+ 'text',
+ 'punctuation.separator.function-arity.erlang' ],
+ regex: '([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(/)',
+ push:
+ [ { token: 'punctuation.separator.list.erlang',
+ regex: ',|(?=\\])',
+ next: 'pop' },
+ { include: '#everything-else' } ] },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.structure.list.function.erlang' } ] } ],
+ '#internal-function-parts':
+ [ { token: 'text',
+ regex: '(?=\\()',
+ push:
+ [ { token: 'punctuation.separator.clause-head-body.erlang',
+ regex: '->',
+ next: 'pop' },
+ { token: 'punctuation.definition.parameters.begin.erlang',
+ regex: '\\(',
+ push:
+ [ { token: 'punctuation.definition.parameters.end.erlang',
+ regex: '\\)',
+ next: 'pop' },
+ { token: 'punctuation.separator.parameters.erlang', regex: ',' },
+ { include: '#everything-else' } ] },
+ { token: 'punctuation.separator.guards.erlang', regex: ',|;' },
+ { include: '#everything-else' } ] },
+ { token: 'punctuation.separator.expressions.erlang',
+ regex: ',' },
+ { include: '#everything-else' } ],
+ '#internal-record-body':
+ [ { token: 'punctuation.definition.class.record.begin.erlang',
+ regex: '\\{',
+ push:
+ [ { token: 'meta.structure.record.erlang',
+ regex: '(?=\\})',
+ next: 'pop' },
+ { token:
+ [ 'variable.other.field.erlang',
+ 'variable.language.omitted.field.erlang',
+ 'text',
+ 'keyword.operator.assignment.erlang' ],
+ regex: '(?:([a-z][a-zA-Z\\d@_]*|\'[^\']*\')|(_))(\\s*)(=|::)',
+ push:
+ [ { token: 'punctuation.separator.class.record.erlang',
+ regex: ',|(?=\\})',
+ next: 'pop' },
+ { include: '#everything-else' } ] },
+ { token:
+ [ 'variable.other.field.erlang',
+ 'text',
+ 'punctuation.separator.class.record.erlang' ],
+ regex: '([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)((?:,)?)' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.structure.record.erlang' } ] } ],
+ '#internal-type-specifiers':
+ [ { token: 'punctuation.separator.value-type.erlang',
+ regex: '/',
+ push:
+ [ { token: 'text', regex: '(?=,|:|>>)', next: 'pop' },
+ { token:
+ [ 'storage.type.erlang',
+ 'storage.modifier.signedness.erlang',
+ 'storage.modifier.endianness.erlang',
+ 'storage.modifier.unit.erlang',
+ 'punctuation.separator.type-specifiers.erlang' ],
+ regex: '(integer|float|binary|bytes|bitstring|bits)|(signed|unsigned)|(big|little|native)|(unit)|(-)' } ] } ],
+ '#keyword':
+ [ { token: 'keyword.control.erlang',
+ regex: '\\b(?:after|begin|case|catch|cond|end|fun|if|let|of|query|try|receive|when)\\b' } ],
+ '#list':
+ [ { token: 'punctuation.definition.list.begin.erlang',
+ regex: '\\[',
+ push:
+ [ { token: 'punctuation.definition.list.end.erlang',
+ regex: '\\]',
+ next: 'pop' },
+ { token: 'punctuation.separator.list.erlang',
+ regex: '\\||\\|\\||,' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.structure.list.erlang' } ] } ],
+ '#macro-directive':
+ [ { token:
+ [ 'meta.directive.ifdef.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.ifdef.erlang',
+ 'keyword.control.directive.ifdef.erlang',
+ 'meta.directive.ifdef.erlang',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'meta.directive.ifdef.erlang',
+ 'entity.name.function.macro.erlang',
+ 'meta.directive.ifdef.erlang',
+ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.ifdef.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(ifdef)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' },
+ { token:
+ [ 'meta.directive.ifndef.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.ifndef.erlang',
+ 'keyword.control.directive.ifndef.erlang',
+ 'meta.directive.ifndef.erlang',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'meta.directive.ifndef.erlang',
+ 'entity.name.function.macro.erlang',
+ 'meta.directive.ifndef.erlang',
+ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.ifndef.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(ifndef)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' },
+ { token:
+ [ 'meta.directive.undef.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.undef.erlang',
+ 'keyword.control.directive.undef.erlang',
+ 'meta.directive.undef.erlang',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'meta.directive.undef.erlang',
+ 'entity.name.function.macro.erlang',
+ 'meta.directive.undef.erlang',
+ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.undef.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(undef)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' } ],
+ '#macro-usage':
+ [ { token:
+ [ 'keyword.operator.macro.erlang',
+ 'meta.macro-usage.erlang',
+ 'entity.name.function.macro.erlang' ],
+ regex: '(\\?\\??)(\\s*)([a-zA-Z\\d@_]+)' } ],
+ '#module-directive':
+ [ { token:
+ [ 'meta.directive.module.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.module.erlang',
+ 'keyword.control.directive.module.erlang',
+ 'meta.directive.module.erlang',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'meta.directive.module.erlang',
+ 'entity.name.type.class.module.definition.erlang',
+ 'meta.directive.module.erlang',
+ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.module.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(module)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)' } ],
+ '#number':
+ [ { token: 'text',
+ regex: '(?=\\d)',
+ push:
+ [ { token: 'text', regex: '(?!\\d)', next: 'pop' },
+ { token:
+ [ 'constant.numeric.float.erlang',
+ 'punctuation.separator.integer-float.erlang',
+ 'constant.numeric.float.erlang',
+ 'punctuation.separator.float-exponent.erlang' ],
+ regex: '(\\d+)(\\.)(\\d+)((?:[eE][\\+\\-]?\\d+)?)' },
+ { token:
+ [ 'constant.numeric.integer.binary.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.binary.erlang' ],
+ regex: '(2)(#)([0-1]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-3.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-3.erlang' ],
+ regex: '(3)(#)([0-2]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-4.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-4.erlang' ],
+ regex: '(4)(#)([0-3]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-5.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-5.erlang' ],
+ regex: '(5)(#)([0-4]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-6.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-6.erlang' ],
+ regex: '(6)(#)([0-5]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-7.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-7.erlang' ],
+ regex: '(7)(#)([0-6]+)' },
+ { token:
+ [ 'constant.numeric.integer.octal.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.octal.erlang' ],
+ regex: '(8)(#)([0-7]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-9.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-9.erlang' ],
+ regex: '(9)(#)([0-8]+)' },
+ { token:
+ [ 'constant.numeric.integer.decimal.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.decimal.erlang' ],
+ regex: '(10)(#)(\\d+)' },
+ { token:
+ [ 'constant.numeric.integer.base-11.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-11.erlang' ],
+ regex: '(11)(#)([\\daA]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-12.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-12.erlang' ],
+ regex: '(12)(#)([\\da-bA-B]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-13.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-13.erlang' ],
+ regex: '(13)(#)([\\da-cA-C]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-14.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-14.erlang' ],
+ regex: '(14)(#)([\\da-dA-D]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-15.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-15.erlang' ],
+ regex: '(15)(#)([\\da-eA-E]+)' },
+ { token:
+ [ 'constant.numeric.integer.hexadecimal.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.hexadecimal.erlang' ],
+ regex: '(16)(#)([\\da-fA-F]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-17.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-17.erlang' ],
+ regex: '(17)(#)([\\da-gA-G]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-18.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-18.erlang' ],
+ regex: '(18)(#)([\\da-hA-H]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-19.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-19.erlang' ],
+ regex: '(19)(#)([\\da-iA-I]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-20.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-20.erlang' ],
+ regex: '(20)(#)([\\da-jA-J]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-21.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-21.erlang' ],
+ regex: '(21)(#)([\\da-kA-K]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-22.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-22.erlang' ],
+ regex: '(22)(#)([\\da-lA-L]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-23.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-23.erlang' ],
+ regex: '(23)(#)([\\da-mA-M]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-24.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-24.erlang' ],
+ regex: '(24)(#)([\\da-nA-N]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-25.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-25.erlang' ],
+ regex: '(25)(#)([\\da-oA-O]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-26.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-26.erlang' ],
+ regex: '(26)(#)([\\da-pA-P]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-27.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-27.erlang' ],
+ regex: '(27)(#)([\\da-qA-Q]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-28.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-28.erlang' ],
+ regex: '(28)(#)([\\da-rA-R]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-29.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-29.erlang' ],
+ regex: '(29)(#)([\\da-sA-S]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-30.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-30.erlang' ],
+ regex: '(30)(#)([\\da-tA-T]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-31.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-31.erlang' ],
+ regex: '(31)(#)([\\da-uA-U]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-32.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-32.erlang' ],
+ regex: '(32)(#)([\\da-vA-V]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-33.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-33.erlang' ],
+ regex: '(33)(#)([\\da-wA-W]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-34.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-34.erlang' ],
+ regex: '(34)(#)([\\da-xA-X]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-35.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-35.erlang' ],
+ regex: '(35)(#)([\\da-yA-Y]+)' },
+ { token:
+ [ 'constant.numeric.integer.base-36.erlang',
+ 'punctuation.separator.base-integer.erlang',
+ 'constant.numeric.integer.base-36.erlang' ],
+ regex: '(36)(#)([\\da-zA-Z]+)' },
+ { token: 'invalid.illegal.integer.erlang',
+ regex: '\\d+#[\\da-zA-Z]+' },
+ { token: 'constant.numeric.integer.decimal.erlang',
+ regex: '\\d+' } ] } ],
+ '#parenthesized-expression':
+ [ { token: 'punctuation.section.expression.begin.erlang',
+ regex: '\\(',
+ push:
+ [ { token: 'punctuation.section.expression.end.erlang',
+ regex: '\\)',
+ next: 'pop' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.expression.parenthesized' } ] } ],
+ '#record-directive':
+ [ { token:
+ [ 'meta.directive.record.erlang',
+ 'punctuation.section.directive.begin.erlang',
+ 'meta.directive.record.erlang',
+ 'keyword.control.directive.import.erlang',
+ 'meta.directive.record.erlang',
+ 'punctuation.definition.parameters.begin.erlang',
+ 'meta.directive.record.erlang',
+ 'entity.name.type.class.record.definition.erlang',
+ 'meta.directive.record.erlang',
+ 'punctuation.separator.parameters.erlang' ],
+ regex: '^(\\s*)(-)(\\s*)(record)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(,)',
+ push:
+ [ { token:
+ [ 'punctuation.definition.class.record.end.erlang',
+ 'meta.directive.record.erlang',
+ 'punctuation.definition.parameters.end.erlang',
+ 'meta.directive.record.erlang',
+ 'punctuation.section.directive.end.erlang' ],
+ regex: '(\\})(\\s*)(\\))(\\s*)(\\.)',
+ next: 'pop' },
+ { include: '#internal-record-body' },
+ { defaultToken: 'meta.directive.record.erlang' } ] } ],
+ '#record-usage':
+ [ { token:
+ [ 'keyword.operator.record.erlang',
+ 'meta.record-usage.erlang',
+ 'entity.name.type.class.record.erlang',
+ 'meta.record-usage.erlang',
+ 'punctuation.separator.record-field.erlang',
+ 'meta.record-usage.erlang',
+ 'variable.other.field.erlang' ],
+ regex: '(#)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(\\.)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')' },
+ { token:
+ [ 'keyword.operator.record.erlang',
+ 'meta.record-usage.erlang',
+ 'entity.name.type.class.record.erlang' ],
+ regex: '(#)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')',
+ push:
+ [ { token: 'punctuation.definition.class.record.end.erlang',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#internal-record-body' },
+ { defaultToken: 'meta.record-usage.erlang' } ] } ],
+ '#string':
+ [ { token: 'punctuation.definition.string.begin.erlang',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.erlang',
+ regex: '"',
+ next: 'pop' },
+ { token:
+ [ 'punctuation.definition.escape.erlang',
+ 'constant.character.escape.erlang',
+ 'punctuation.definition.escape.erlang',
+ 'constant.character.escape.erlang',
+ 'constant.character.escape.erlang' ],
+ regex: '(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' },
+ { token: 'invalid.illegal.string.erlang', regex: '\\\\\\^?.?' },
+ { token:
+ [ 'punctuation.definition.placeholder.erlang',
+ 'punctuation.separator.placeholder-parts.erlang',
+ 'constant.other.placeholder.erlang',
+ 'punctuation.separator.placeholder-parts.erlang',
+ 'punctuation.separator.placeholder-parts.erlang',
+ 'constant.other.placeholder.erlang',
+ 'punctuation.separator.placeholder-parts.erlang',
+ 'punctuation.separator.placeholder-parts.erlang',
+ 'punctuation.separator.placeholder-parts.erlang',
+ 'constant.other.placeholder.erlang',
+ 'constant.other.placeholder.erlang' ],
+ regex: '(~)(?:((?:\\-)?)(\\d+)|(\\*))?(?:(\\.)(?:(\\d+)|(\\*)))?(?:(\\.)(?:(\\*)|(.)))?([~cfegswpWPBX#bx\\+ni])' },
+ { token:
+ [ 'punctuation.definition.placeholder.erlang',
+ 'punctuation.separator.placeholder-parts.erlang',
+ 'constant.other.placeholder.erlang',
+ 'constant.other.placeholder.erlang' ],
+ regex: '(~)((?:\\*)?)((?:\\d+)?)([~du\\-#fsacl])' },
+ { token: 'invalid.illegal.string.erlang', regex: '~.?' },
+ { defaultToken: 'string.quoted.double.erlang' } ] } ],
+ '#symbolic-operator':
+ [ { token: 'keyword.operator.symbolic.erlang',
+ regex: '\\+\\+|\\+|--|-|\\*|/=|/|=/=|=:=|==|=<|=|<-|<|>=|>|!|::' } ],
+ '#textual-operator':
+ [ { token: 'keyword.operator.textual.erlang',
+ regex: '\\b(?:andalso|band|and|bxor|xor|bor|orelse|or|bnot|not|bsl|bsr|div|rem)\\b' } ],
+ '#tuple':
+ [ { token: 'punctuation.definition.tuple.begin.erlang',
+ regex: '\\{',
+ push:
+ [ { token: 'punctuation.definition.tuple.end.erlang',
+ regex: '\\}',
+ next: 'pop' },
+ { token: 'punctuation.separator.tuple.erlang', regex: ',' },
+ { include: '#everything-else' },
+ { defaultToken: 'meta.structure.tuple.erlang' } ] } ],
+ '#variable':
+ [ { token: [ 'variable.other.erlang', 'variable.language.omitted.erlang' ],
+ regex: '(_[a-zA-Z\\d@_]+|[A-Z][a-zA-Z\\d@_]*)|(_)' } ] }
+
+ this.normalizeRules();
+};
+
+ErlangHighlightRules.metaData = { comment: 'The recognition of function definitions and compiler directives (such as module, record and macro definitions) requires that each of the aforementioned constructs must be the first string inside a line (except for whitespace). Also, the function/module/record/macro names must be given unquoted. -- desp',
+ fileTypes: [ 'erl', 'hrl' ],
+ keyEquivalent: '^~E',
+ name: 'Erlang',
+ scopeName: 'source.erlang' }
+
+
+oop.inherits(ErlangHighlightRules, TextHighlightRules);
+
+exports.ErlangHighlightRules = ErlangHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/erlang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/erlang_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ErlangHighlightRules = require("./erlang_highlight_rules").ErlangHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ErlangHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "%";
+ this.blockComment = null;
+ this.$id = "ace/mode/erlang";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-forth.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-forth.js
new file mode 100644
index 00000000..f960fd6a
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-forth.js
@@ -0,0 +1,290 @@
+ace.define("ace/mode/forth_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 ForthHighlightRules = function() {
+
+ this.$rules = { start: [ { include: '#forth' } ],
+ '#comment':
+ [ { token: 'comment.line.double-dash.forth',
+ regex: '(?:^|\\s)--\\s.*$',
+ comment: 'line comments for iForth' },
+ { token: 'comment.line.backslash.forth',
+ regex: '(?:^|\\s)\\\\[\\s\\S]*$',
+ comment: 'ANSI line comment' },
+ { token: 'comment.line.backslash-g.forth',
+ regex: '(?:^|\\s)\\\\[Gg] .*$',
+ comment: 'gForth line comment' },
+ { token: 'comment.block.forth',
+ regex: '(?:^|\\s)\\(\\*(?=\\s|$)',
+ push:
+ [ { token: 'comment.block.forth',
+ regex: '(?:^|\\s)\\*\\)(?=\\s|$)',
+ next: 'pop' },
+ { defaultToken: 'comment.block.forth' } ],
+ comment: 'multiline comments for iForth' },
+ { token: 'comment.block.documentation.forth',
+ regex: '\\bDOC\\b',
+ caseInsensitive: true,
+ push:
+ [ { token: 'comment.block.documentation.forth',
+ regex: '\\bENDDOC\\b',
+ caseInsensitive: true,
+ next: 'pop' },
+ { defaultToken: 'comment.block.documentation.forth' } ],
+ comment: 'documentation comments for iForth' },
+ { token: 'comment.line.parentheses.forth',
+ regex: '(?:^|\\s)\\.?\\( [^)]*\\)',
+ comment: 'ANSI line comment' } ],
+ '#constant':
+ [ { token: 'constant.language.forth',
+ regex: '(?:^|\\s)(?:TRUE|FALSE|BL|PI|CELL|C/L|R/O|W/O|R/W)(?=\\s|$)',
+ caseInsensitive: true},
+ { token: 'constant.numeric.forth',
+ regex: '(?:^|\\s)[$#%]?[-+]?[0-9]+(?:\\.[0-9]*e-?[0-9]+|\\.?[0-9a-fA-F]*)(?=\\s|$)'},
+ { token: 'constant.character.forth',
+ regex: '(?:^|\\s)(?:[&^]\\S|(?:"|\')\\S(?:"|\'))(?=\\s|$)'}],
+ '#forth':
+ [ { include: '#constant' },
+ { include: '#comment' },
+ { include: '#string' },
+ { include: '#word' },
+ { include: '#variable' },
+ { include: '#storage' },
+ { include: '#word-def' } ],
+ '#storage':
+ [ { token: 'storage.type.forth',
+ regex: '(?:^|\\s)(?:2CONSTANT|2VARIABLE|ALIAS|CONSTANT|CREATE-INTERPRET/COMPILE[:]?|CREATE|DEFER|FCONSTANT|FIELD|FVARIABLE|USER|VALUE|VARIABLE|VOCABULARY)(?=\\s|$)',
+ caseInsensitive: true}],
+ '#string':
+ [ { token: 'string.quoted.double.forth',
+ regex: '(ABORT" |BREAK" |\\." |C" |0"|S\\\\?" )([^"]+")',
+ caseInsensitive: true},
+ { token: 'string.unquoted.forth',
+ regex: '(?:INCLUDE|NEEDS|REQUIRE|USE)[ ]\\S+(?=\\s|$)',
+ caseInsensitive: true}],
+ '#variable':
+ [ { token: 'variable.language.forth',
+ regex: '\\b(?:I|J)\\b',
+ caseInsensitive: true } ],
+ '#word':
+ [ { token: 'keyword.control.immediate.forth',
+ regex: '(?:^|\\s)\\[(?:\\?DO|\\+LOOP|AGAIN|BEGIN|DEFINED|DO|ELSE|ENDIF|FOR|IF|IFDEF|IFUNDEF|LOOP|NEXT|REPEAT|THEN|UNTIL|WHILE)\\](?=\\s|$)',
+ caseInsensitive: true},
+ { token: 'keyword.other.immediate.forth',
+ regex: '(?:^|\\s)(?:COMPILE-ONLY|IMMEDIATE|IS|RESTRICT|TO|WHAT\'S|])(?=\\s|$)',
+ caseInsensitive: true},
+ { token: 'keyword.control.compile-only.forth',
+ regex: '(?:^|\\s)(?:-DO|\\-LOOP|\\?DO|\\?LEAVE|\\+DO|\\+LOOP|ABORT\\"|AGAIN|AHEAD|BEGIN|CASE|DO|ELSE|ENDCASE|ENDIF|ENDOF|ENDTRY\\-IFERROR|ENDTRY|FOR|IF|IFERROR|LEAVE|LOOP|NEXT|RECOVER|REPEAT|RESTORE|THEN|TRY|U\\-DO|U\\+DO|UNTIL|WHILE)(?=\\s|$)',
+ caseInsensitive: true},
+ { token: 'keyword.other.compile-only.forth',
+ regex: '(?:^|\\s)(?:\\?DUP-0=-IF|\\?DUP-IF|\\)|\\[|\\[\'\\]|\\[CHAR\\]|\\[COMPILE\\]|\\[IS\\]|\\[TO\\]|<COMPILATION|<INTERPRETATION|ASSERT\\(|ASSERT0\\(|ASSERT1\\(|ASSERT2\\(|ASSERT3\\(|COMPILATION>|DEFERS|DOES>|INTERPRETATION>|OF|POSTPONE)(?=\\s|$)',
+ caseInsensitive: true},
+ { token: 'keyword.other.non-immediate.forth',
+ regex: '(?:^|\\s)(?:\'|<IS>|<TO>|CHAR|END-STRUCT|INCLUDE[D]?|LOAD|NEEDS|REQUIRE[D]?|REVISION|SEE|STRUCT|THRU|USE)(?=\\s|$)',
+ caseInsensitive: true},
+ { token: 'keyword.other.warning.forth',
+ regex: '(?:^|\\s)(?:~~|BREAK:|BREAK"|DBG)(?=\\s|$)',
+ caseInsensitive: true}],
+ '#word-def':
+ [ { token:
+ [ 'keyword.other.compile-only.forth',
+ 'keyword.other.compile-only.forth',
+ 'meta.block.forth',
+ 'entity.name.function.forth' ],
+ regex: '(:NONAME)|(^:|\\s:)(\\s)(\\S+)(?=\\s|$)',
+ caseInsensitive: true,
+ push:
+ [ { token: 'keyword.other.compile-only.forth',
+ regex: ';(?:CODE)?',
+ caseInsensitive: true,
+ next: 'pop' },
+ { include: '#constant' },
+ { include: '#comment' },
+ { include: '#string' },
+ { include: '#word' },
+ { include: '#variable' },
+ { include: '#storage' },
+ { defaultToken: 'meta.block.forth' } ] } ] }
+
+ this.normalizeRules();
+};
+
+ForthHighlightRules.metaData = { fileTypes: [ 'frt', 'fs', 'ldr', 'fth', '4th' ],
+ foldingStartMarker: '/\\*\\*|\\{\\s*$',
+ foldingStopMarker: '\\*\\*/|^\\s*\\}',
+ keyEquivalent: '^~F',
+ name: 'Forth',
+ scopeName: 'source.forth' }
+
+
+oop.inherits(ForthHighlightRules, TextHighlightRules);
+
+exports.ForthHighlightRules = ForthHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/forth",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/forth_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ForthHighlightRules = require("./forth_highlight_rules").ForthHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ForthHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.blockComment = null;
+ this.$id = "ace/mode/forth";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-fortran.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-fortran.js
new file mode 100644
index 00000000..3f2c5bdb
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-fortran.js
@@ -0,0 +1,423 @@
+ace.define("ace/mode/fortran_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 FortranHighlightRules = function() {
+
+ var keywords = (
+ "call|case|contains|continue|cycle|do|else|elseif|end|enddo|endif|function|"+
+ "if|implicit|in|include|inout|intent|module|none|only|out|print|program|return|"+
+ "select|status|stop|subroutine|" +
+ "return|then|use|while|write|"+
+ "CALL|CASE|CONTAINS|CONTINUE|CYCLE|DO|ELSE|ELSEIF|END|ENDDO|ENDIF|FUNCTION|"+
+ "IF|IMPLICIT|IN|INCLUDE|INOUT|INTENT|MODULE|NONE|ONLY|OUT|PRINT|PROGRAM|RETURN|"+
+ "SELECT|STATUS|STOP|SUBROUTINE|" +
+ "RETURN|THEN|USE|WHILE|WRITE"
+ );
+
+ var keywordOperators = (
+ "and|or|not|eq|ne|gt|ge|lt|le|" +
+ "AND|OR|NOT|EQ|NE|GT|GE|LT|LE"
+ );
+
+ var builtinConstants = (
+ "true|false|TRUE|FALSE"
+ );
+
+ var builtinFunctions = (
+ "abs|achar|acos|acosh|adjustl|adjustr|aimag|aint|all|allocate|"+
+ "anint|any|asin|asinh|associated|atan|atan2|atanh|"+
+ "bessel_j0|bessel_j1|bessel_jn|bessel_y0|bessel_y1|bessel_yn|"+
+ "bge|bgt|bit_size|ble|blt|btest|ceiling|char|cmplx|conjg|cos|cosh|"+
+ "count|cpu_time|cshift|date_and_time|dble|deallocate|digits|dim|dot_product|dprod|"+
+ "dshiftl|dshiftr|dsqrt|eoshift|epsilon|erf|erfc|erfc_scaled|exp|float|floor|"+
+ "format|fraction|gamma|input|len|lge|lgt|lle|llt|log|log10|maskl|maskr|matmul|max|maxloc|maxval|"+
+ "merge|min|minloc|minval|mod|modulo|nint|not|norm2|null|nullify|pack|parity|popcnt|poppar|"+
+ "precision|present|product|radix|random_number|random_seed|range|repeat|reshape|round|"+
+ "rrspacing|same_type_as|scale|scan|selected_char_kind|selected_int_kind|selected_real_kind|"+
+ "set_exponent|shape|shifta|shiftl|shiftr|sign|sin|sinh|size|sngl|spacing|spread|"+
+ "sqrt|sum|system_clock|tan|tanh|tiny|trailz|transfer|transpose|trim|ubound|unpack|verify|" +
+ "ABS|ACHAR|ACOS|ACOSH|ADJUSTL|ADJUSTR|AIMAG|AINT|ALL|ALLOCATE|"+
+ "ANINT|ANY|ASIN|ASINH|ASSOCIATED|ATAN|ATAN2|ATANH|"+
+ "BESSEL_J0|BESSEL_J1|BESSEL_JN|BESSEL_Y0|BESSEL_Y1|BESSEL_YN|"+
+ "BGE|BGT|BIT_SIZE|BLE|BLT|BTEST|CEILING|CHAR|CMPLX|CONJG|COS|COSH|"+
+ "COUNT|CPU_TIME|CSHIFT|DATE_AND_TIME|DBLE|DEALLOCATE|DIGITS|DIM|DOT_PRODUCT|DPROD|"+
+ "DSHIFTL|DSHIFTR|DSQRT|EOSHIFT|EPSILON|ERF|ERFC|ERFC_SCALED|EXP|FLOAT|FLOOR|"+
+ "FORMAT|FRACTION|GAMMA|INPUT|LEN|LGE|LGT|LLE|LLT|LOG|LOG10|MASKL|MASKR|MATMUL|MAX|MAXLOC|MAXVAL|"+
+ "MERGE|MIN|MINLOC|MINVAL|MOD|MODULO|NINT|NOT|NORM2|NULL|NULLIFY|PACK|PARITY|POPCNT|POPPAR|"+
+ "PRECISION|PRESENT|PRODUCT|RADIX|RANDOM_NUMBER|RANDOM_SEED|RANGE|REPEAT|RESHAPE|ROUND|"+
+ "RRSPACING|SAME_TYPE_AS|SCALE|SCAN|SELECTED_CHAR_KIND|SELECTED_INT_KIND|SELECTED_REAL_KIND|"+
+ "SET_EXPONENT|SHAPE|SHIFTA|SHIFTL|SHIFTR|SIGN|SIN|SINH|SIZE|SNGL|SPACING|SPREAD|"+
+ "SQRT|SUM|SYSTEM_CLOCK|TAN|TANH|TINY|TRAILZ|TRANSFER|TRANSPOSE|TRIM|UBOUND|UNPACK|VERIFY"
+ );
+
+ var storageType = (
+ "logical|character|integer|real|type|" +
+ "LOGICAL|CHARACTER|INTEGER|REAL|TYPE"
+ );
+
+ var storageModifiers = (
+ "allocatable|dimension|intent|parameter|pointer|target|private|public|" +
+ "ALLOCATABLE|DIMENSION|INTENT|PARAMETER|POINTER|TARGET|PRIVATE|PUBLIC"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "invalid.deprecated": "debugger",
+ "support.function": builtinFunctions,
+ "constant.language": builtinConstants,
+ "keyword": keywords,
+ "keyword.operator": keywordOperators,
+ "storage.type": storageType,
+ "storage.modifier" : storageModifiers
+ }, "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 + ")";
+
+ var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "!.*$"
+ }, {
+ token : "string", // multi line """ string start
+ regex : strPre + '"{3}',
+ next : "qqstring3"
+ }, {
+ token : "string", // " string
+ regex : strPre + '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "string", // multi line ''' string start
+ regex : strPre + "'{3}",
+ next : "qstring3"
+ }, {
+ token : "string", // ' string
+ regex : strPre + "'(?=.)",
+ next : "qstring"
+ }, {
+ 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 : "keyword", // pre-compiler directives
+ regex : "#\\s*(?:include|import|define|undef|INCLUDE|IMPORT|DEFINE|UNDEF)\\b"
+ }, {
+ token : "keyword", // special case pre-compiler directive
+ regex : "#\\s*(?:endif|ifdef|else|elseif|ifndef|ENDIF|IFDEF|ELSE|ELSEIF|IFNDEF)\\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+"
+ } ],
+ "qqstring3" : [ {
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string", // multi line """ string end
+ regex : '"{3}',
+ next : "start"
+ }, {
+ defaultToken : "string"
+ } ],
+ "qstring3" : [ {
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string", // multi line """ string end
+ regex : '"{3}',
+ next : "start"
+ }, {
+ defaultToken : "string"
+ } ],
+ "qqstring" : [{
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start"
+ }, {
+ defaultToken: "string"
+ }],
+ "qstring" : [{
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start"
+ }, {
+ defaultToken: "string"
+ }]
+ };
+};
+
+oop.inherits(FortranHighlightRules, TextHighlightRules);
+
+exports.FortranHighlightRules = FortranHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/fortran",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/fortran_highlight_rules","ace/mode/folding/cstyle","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var FortranHighlightRules = require("./fortran_highlight_rules").FortranHighlightRules;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = FortranHighlightRules;
+ this.foldingRules = new CStyleFoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "!";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 = {
+ "return": 1,
+ "break": 1,
+ "continue": 1,
+ "RETURN": 1,
+ "BREAK": 1,
+ "CONTINUE": 1
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (input !== "\r\n" && input !== "\r" && input !== "\n")
+ return false;
+
+ var tokens = this.getTokenizer().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));
+ };
+
+ this.$id = "ace/mode/fortran";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-ftl.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-ftl.js
new file mode 100644
index 00000000..dbca4fd1
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-ftl.js
@@ -0,0 +1,1182 @@
+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 supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/ftl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var FtlLangHighlightRules = function () {
+
+ var stringBuiltIns = "\\?|substring|cap_first|uncap_first|capitalize|chop_linebreak|date|time|datetime|"
+ + "ends_with|html|groups|index_of|j_string|js_string|json_string|last_index_of|length|lower_case|"
+ + "left_pad|right_pad|contains|matches|number|replace|rtf|url|split|starts_with|string|trim|"
+ + "upper_case|word_list|xhtml|xml";
+ var numberBuiltIns = "c|round|floor|ceiling";
+ var dateBuiltIns = "iso_[a-z_]+";
+ var seqBuiltIns = "first|last|seq_contains|seq_index_of|seq_last_index_of|reverse|size|sort|sort_by|chunk";
+ var hashBuiltIns = "keys|values";
+ var xmlBuiltIns = "children|parent|root|ancestors|node_name|node_type|node_namespace";
+ var expertBuiltIns = "byte|double|float|int|long|short|number_to_date|number_to_time|number_to_datetime|"
+ + "eval|has_content|interpret|is_[a-z_]+|namespacenew";
+ var allBuiltIns = stringBuiltIns + numberBuiltIns + dateBuiltIns + seqBuiltIns + hashBuiltIns
+ + xmlBuiltIns + expertBuiltIns;
+
+ var deprecatedBuiltIns = "default|exists|if_exists|web_safe";
+
+ var variables = "data_model|error|globals|lang|locale|locals|main|namespace|node|current_node|"
+ + "now|output_encoding|template_name|url_escaping_charset|vars|version";
+
+ var operators = "gt|gte|lt|lte|as|in|using";
+
+ var reserved = "true|false";
+
+ var attributes = "encoding|parse|locale|number_format|date_format|time_format|datetime_format|time_zone|"
+ + "url_escaping_charset|classic_compatible|strip_whitespace|strip_text|strict_syntax|ns_prefixes|"
+ + "attributes";
+
+ this.$rules = {
+ "start" : [{
+ token : "constant.character.entity",
+ regex : /&[^;]+;/
+ }, {
+ token : "support.function",
+ regex : "\\?("+allBuiltIns+")"
+ }, {
+ token : "support.function.deprecated",
+ regex : "\\?("+deprecatedBuiltIns+")"
+ }, {
+ token : "language.variable",
+ regex : "\\.(?:"+variables+")"
+ }, {
+ token : "constant.language",
+ regex : "\\b("+reserved+")\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "\\b(?:"+operators+")\\b"
+ }, {
+ token : "entity.other.attribute-name",
+ regex : attributes
+ }, {
+ token : "string", //
+ regex : /['"]/,
+ next : "qstring"
+ }, {
+ token : function(value) {
+ if (value.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")) {
+ return "constant.numeric";
+ } else {
+ return "variable";
+ }
+ },
+ regex : /[\w.+\-]+/
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\.|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }],
+
+ "qstring" : [{
+ token : "constant.character.escape",
+ regex : '\\\\[nrtvef\\\\"$]'
+ }, {
+ token : "string",
+ regex : /['"]/,
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }]
+ };
+};
+
+oop.inherits(FtlLangHighlightRules, TextHighlightRules);
+
+var FtlHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var directives = "assign|attempt|break|case|compress|default|elseif|else|escape|fallback|function|flush|"
+ + "ftl|global|if|import|include|list|local|lt|macro|nested|noescape|noparse|nt|recover|recurse|return|rt|"
+ + "setting|stop|switch|t|visit";
+
+ var startRules = [
+ {
+ token : "comment",
+ regex : "<#--",
+ next : "ftl-dcomment"
+ }, {
+ token : "string.interpolated",
+ regex : "\\${",
+ push : "ftl-start"
+ }, {
+ token : "keyword.function",
+ regex : "</?#("+directives+")",
+ push : "ftl-start"
+ }, {
+ token : "keyword.other",
+ regex : "</?@[a-zA-Z\\.]+",
+ push : "ftl-start"
+ }
+ ];
+
+ var endRules = [
+ {
+ token : "keyword",
+ regex : "/?>",
+ next : "pop"
+ }, {
+ token : "string.interpolated",
+ regex : "}",
+ next : "pop"
+ }
+ ];
+
+ for (var key in this.$rules)
+ this.$rules[key].unshift.apply(this.$rules[key], startRules);
+
+ this.embedRules(FtlLangHighlightRules, "ftl-", endRules, ["start"]);
+
+ this.addRules({
+ "ftl-dcomment" : [{
+ token : "comment",
+ regex : "-->",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ });
+
+ this.normalizeRules();
+};
+
+oop.inherits(FtlHighlightRules, HtmlHighlightRules);
+
+exports.FtlHighlightRules = FtlHighlightRules;
+});
+
+ace.define("ace/mode/ftl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ftl_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var FtlHighlightRules = require("./ftl_highlight_rules").FtlHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = FtlHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.$id = "ace/mode/ftl";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-gcode.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-gcode.js
new file mode 100644
index 00000000..a648426c
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-gcode.js
@@ -0,0 +1,86 @@
+ace.define("ace/mode/gcode_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 GcodeHighlightRules = function() {
+
+ var keywords = (
+ "IF|DO|WHILE|ENDWHILE|CALL|ENDIF|SUB|ENDSUB|GOTO|REPEAT|ENDREPEAT|CALL"
+ );
+
+ var builtinConstants = (
+ "PI"
+ );
+
+ var builtinFunctions = (
+ "ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN"
+ );
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtinFunctions,
+ "keyword": keywords,
+ "constant.language": builtinConstants
+ }, "identifier", true);
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "\\(.*\\)"
+ }, {
+ token : "comment", // block number
+ regex : "([N])([0-9]+)"
+ }, {
+ token : "string", // " string
+ regex : "([G])([0-9]+\\.?[0-9]?)"
+ }, {
+ token : "string", // ' string
+ regex : "([M])([0-9]+\\.?[0-9]?)"
+ }, {
+ token : "constant.numeric", // float
+ regex : "([-+]?([0-9]*\\.?[0-9]+\\.?))|(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)"
+ }, {
+ token : keywordMapper,
+ regex : "[A-Z]"
+ }, {
+ token : "keyword.operator",
+ regex : "EQ|LT|GT|NE|GE|LE|OR|XOR"
+ }, {
+ token : "paren.lparen",
+ regex : "[\\[]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ]
+ };
+ };
+
+ oop.inherits(GcodeHighlightRules, TextHighlightRules);
+
+ exports.GcodeHighlightRules = GcodeHighlightRules;
+});
+
+ace.define("ace/mode/gcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gcode_highlight_rules","ace/range"], function(require, exports, module) {
+ "use strict";
+
+ var oop = require("../lib/oop");
+ var TextMode = require("./text").Mode;
+ var GcodeHighlightRules = require("./gcode_highlight_rules").GcodeHighlightRules;
+ var Range = require("../range").Range;
+
+ var Mode = function() {
+ this.HighlightRules = GcodeHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+ };
+ oop.inherits(Mode, TextMode);
+
+ (function() {
+ this.$id = "ace/mode/gcode";
+ }).call(Mode.prototype);
+
+ exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-gherkin.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-gherkin.js
new file mode 100644
index 00000000..322dbe40
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-gherkin.js
@@ -0,0 +1,163 @@
+ace.define("ace/mode/gherkin_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 stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";
+
+var GherkinHighlightRules = function() {
+ var languages = [{
+ name: "en",
+ labels: "Feature|Background|Scenario(?: Outline)?|Examples",
+ keywords: "Given|When|Then|And|But"
+ }];
+
+ var labels = languages.map(function(l) {
+ return l.labels;
+ }).join("|");
+ var keywords = languages.map(function(l) {
+ return l.keywords;
+ }).join("|");
+ this.$rules = {
+ start : [{
+ token: "constant.numeric",
+ regex: "(?:(?:[1-9]\\d*)|(?:0))"
+ }, {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "keyword",
+ regex : "(?:" + labels + "):|(?:" + keywords + ")\\b"
+ }, {
+ token : "keyword",
+ regex : "\\*"
+ }, {
+ token : "string", // multi line """ string start
+ regex : '"{3}',
+ next : "qqstring3"
+ }, {
+ token : "string", // " string
+ regex : '"',
+ next : "qqstring"
+ }, {
+ token : "text",
+ regex : "^\\s*(?=@[\\w])",
+ next : [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "variable.parameter",
+ regex : "@[\\w]+"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "start"
+ }]
+ }, {
+ token : "comment",
+ regex : "<[^>]+>"
+ }, {
+ token : "comment",
+ regex : "\\|(?=.)",
+ next : "table-item"
+ }, {
+ token : "comment",
+ regex : "\\|$",
+ next : "start"
+ }],
+ "qqstring3" : [ {
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string", // multi line """ string end
+ regex : '"{3}',
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }],
+ "qqstring" : [{
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start"
+ }, {
+ defaultToken: "string"
+ }],
+ "table-item" : [{
+ token : "comment",
+ regex : /$/,
+ next : "start"
+ }, {
+ token : "comment",
+ regex : /\|/
+ }, {
+ token : "string",
+ regex : /\\./
+ }, {
+ defaultToken : "string"
+ }]
+ };
+ this.normalizeRules();
+}
+
+oop.inherits(GherkinHighlightRules, TextHighlightRules);
+
+exports.GherkinHighlightRules = GherkinHighlightRules;
+});
+
+ace.define("ace/mode/gherkin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gherkin_highlight_rules"], function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var GherkinHighlightRules = require("./gherkin_highlight_rules").GherkinHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = GherkinHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/gherkin";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var space2 = " ";
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+
+ console.log(state)
+
+ if(line.match("[ ]*\\|")) {
+ indent += "| ";
+ }
+
+ if (tokens.length && tokens[tokens.length-1].type == "comment") {
+ return indent;
+ }
+
+
+ if (state == "start") {
+ if (line.match("Scenario:|Feature:|Scenario Outline:|Background:")) {
+ indent += space2;
+ } else if(line.match("(Given|Then).+(:)$|Examples:")) {
+ indent += space2;
+ } else if(line.match("\\*.+")) {
+ indent += "* ";
+ }
+ }
+
+
+ return indent;
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-gitignore.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-gitignore.js
new file mode 100644
index 00000000..c3eac559
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-gitignore.js
@@ -0,0 +1,52 @@
+ace.define("ace/mode/gitignore_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 GitignoreHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /^\s*#.*$/
+ }, {
+ token : "keyword", // negated patterns
+ regex : /^\s*!.*$/
+ }
+ ]
+ };
+
+ this.normalizeRules();
+};
+
+GitignoreHighlightRules.metaData = {
+ fileTypes: ['gitignore'],
+ name: 'Gitignore'
+};
+
+oop.inherits(GitignoreHighlightRules, TextHighlightRules);
+
+exports.GitignoreHighlightRules = GitignoreHighlightRules;
+});
+
+ace.define("ace/mode/gitignore",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gitignore_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var GitignoreHighlightRules = require("./gitignore_highlight_rules").GitignoreHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = GitignoreHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/gitignore";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-glsl.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-glsl.js
new file mode 100644
index 00000000..ee95feea
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-glsl.js
@@ -0,0 +1,564 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var cFunctions = exports.cFunctions = "\\b(?:hypot(?: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|char16_t|char32_t"
+ );
+
+ var storageModifiers = (
+ "const|extern|register|restrict|static|volatile|inline|private|" +
+ "protected|public|friend|explicit|virtual|export|mutable|typename|" +
+ "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"
+ );
+
+ 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|nullptr"
+ );
+
+ 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";
+ var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source;
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "//$",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : "//",
+ next : "singleLineComment"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // character
+ regex : "'(?:" + escapeRe + "|.)?'"
+ }, {
+ token : "string.start",
+ regex : '"',
+ stateName: "qqstring",
+ next: [
+ { token: "string", regex: /\\\s*$/, next: "qqstring" },
+ { token: "constant.language.escape", regex: escapeRe },
+ { token: "constant.language.escape", regex: /%[^'"\\]/ },
+ { token: "string.end", regex: '"|$', next: "start" },
+ { defaultToken: "string"}
+ ]
+ }, {
+ token : "string.start",
+ regex : 'R"\\(',
+ stateName: "rawString",
+ next: [
+ { token: "string.end", regex: '\\)"', next: "start" },
+ { defaultToken: "string"}
+ ]
+ }, {
+ 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 : "keyword", // pre-compiler directives
+ regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b",
+ next : "directive"
+ }, {
+ token : "keyword", // special case pre-compiler directive
+ regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"
+ }, {
+ token : "support.function.C99.c",
+ regex : cFunctions
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*"
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "singleLineComment" : [
+ {
+ token : "comment",
+ regex : /\\$/,
+ next : "singleLineComment"
+ }, {
+ token : "comment",
+ regex : /$/,
+ next : "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ],
+ "directive" : [
+ {
+ token : "constant.other.multiline",
+ regex : /\\/
+ },
+ {
+ 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",
+ regex : /[^\\\/]+/,
+ next : "start"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+ this.normalizeRules();
+};
+
+oop.inherits(c_cppHighlightRules, TextHighlightRules);
+
+exports.c_cppHighlightRules = c_cppHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","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 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.HighlightRules = c_cppHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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);
+ };
+
+ this.$id = "ace/mode/c_cpp";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/glsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/c_cpp_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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;
+});
+
+ace.define("ace/mode/glsl",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/glsl_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 CMode = require("./c_cpp").Mode;
+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.HighlightRules = glslHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, CMode);
+
+(function() {
+ this.$id = "ace/mode/glsl";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-gobstones.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-gobstones.js
new file mode 100644
index 00000000..746b3413
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-gobstones.js
@@ -0,0 +1,922 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/gobstones_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var GobstonesHighlightRules = function() {
+
+ var keywords = (
+ "program|procedure|function|interactive|if|then|else|switch|repeat|while|foreach|in|not|div|mod|Skip|return"
+ );
+
+ var buildinConstants = (
+ "False|True"
+ );
+
+
+ var langClasses = (
+ "Poner|Sacar|Mover|IrAlBorde|VaciarTablero|" +
+ "nroBolitas|hayBolitas|puedeMover|siguiente|previo|opuesto|minBool|maxBool|" +
+ "minDir|maxDir|minColor|maxColor"
+ );
+
+ var supportType = (
+ "Verde|Rojo|Azul|Negro|Norte|Sur|Este|Oeste"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": keywords,
+ "constant.language": buildinConstants,
+ "support.function": langClasses,
+ "support.type": supportType
+ }, "identifier");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ {
+ token : "comment",
+ regex : "\\-\\-.*$"
+ },
+ {
+ token : "comment",
+ regex : "#.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+
+ token : "string", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:True|False)\\b"
+ }, {
+ token : "keyword.operator",
+ regex : ":=|\\.\\.|,|;|\\|\\||\\/\\/|\\+|\\-|\\^|\\*|>|<|>=|=>|==|&&"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(GobstonesHighlightRules, TextHighlightRules);
+
+exports.GobstonesHighlightRules = GobstonesHighlightRules;
+});
+
+ace.define("ace/mode/gobstones",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/gobstones_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptMode = require("./javascript").Mode;
+var GobstonesHighlightRules = require("./gobstones_highlight_rules").GobstonesHighlightRules;
+
+var Mode = function() {
+ JavaScriptMode.call(this);
+ this.HighlightRules = GobstonesHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, JavaScriptMode);
+
+(function() {
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+ this.$id = "ace/mode/gobstones";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-golang.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-golang.js
new file mode 100644
index 00000000..cb81eafa
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-golang.js
@@ -0,0 +1,406 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/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 = (
+ "else|break|case|return|goto|if|const|select|" +
+ "continue|struct|default|switch|for|range|" +
+ "func|import|package|chan|defer|fallthrough|go|interface|map|range|" +
+ "select|type|var"
+ );
+ var builtinTypes = (
+ "string|uint8|uint16|uint32|uint64|int8|int16|int32|int64|float32|" +
+ "float64|complex64|complex128|byte|rune|uint|int|uintptr|bool|error"
+ );
+ var builtinFunctions = (
+ "new|close|cap|copy|panic|panicln|print|println|len|make|delete|real|recover|imag|append"
+ );
+ var builtinConstants = ("nil|true|false|iota");
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": keywords,
+ "constant.language": builtinConstants,
+ "support.function": builtinFunctions,
+ "support.type": builtinTypes
+ }, "");
+
+ var stringEscapeRe = "\\\\(?:[0-7]{3}|x\\h{2}|u{4}|U\\h{6}|[abfnrtv'\"\\\\])".replace(/\\h/g, "[a-fA-F\\d]");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "\\/\\/.*$"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment.start", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // single line
+ regex : /"(?:[^"\\]|\\.)*?"/
+ }, {
+ token : "string", // raw
+ regex : '`',
+ next : "bqstring"
+ }, {
+ token : "constant.numeric", // rune
+ regex : "'(?:[^\\'\uD800-\uDBFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|" + stringEscapeRe.replace('"', '') + ")'"
+ }, {
+ token : "constant.numeric", // hex
+ regex : "0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : ["keyword", "text", "entity.name.function"],
+ regex : "(func)(\\s+)([a-zA-Z_$][a-zA-Z0-9_$]*)\\b"
+ }, {
+ token : function(val) {
+ if (val[val.length - 1] == "(") {
+ return [{
+ type: keywordMapper(val.slice(0, -1)) || "support.function",
+ value: val.slice(0, -1)
+ }, {
+ type: "paren.lparen",
+ value: val.slice(-1)
+ }];
+ }
+
+ return keywordMapper(val) || "identifier";
+ },
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b\\(?"
+ }, {
+ token : "keyword.operator",
+ regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^="
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment.end",
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "bqstring" : [
+ {
+ token : "string",
+ regex : '`',
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+ };
+ oop.inherits(GolangHighlightRules, TextHighlightRules);
+
+ exports.GolangHighlightRules = GolangHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/golang",["require","exports","module","ace/lib/oop","ace/mode/text","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 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.HighlightRules = GolangHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new CStyleFoldMode();
+ this.$behaviour = new CstyleBehaviour();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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);
+ };
+
+ this.$id = "ace/mode/golang";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-graphqlschema.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-graphqlschema.js
new file mode 100644
index 00000000..9d2833dd
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-graphqlschema.js
@@ -0,0 +1,206 @@
+ace.define("ace/mode/graphqlschema_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 GraphQLSchemaHighlightRules = function() {
+
+ var keywords = (
+ "type|interface|union|enum|schema|input|implements|extends|scalar"
+ );
+
+ var dataTypes = (
+ "Int|Float|String|ID|Boolean"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": keywords,
+ "storage.type": dataTypes
+ }, "identifier");
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ } ]
+ };
+ this.normalizeRules();
+};
+
+oop.inherits(GraphQLSchemaHighlightRules, TextHighlightRules);
+
+exports.GraphQLSchemaHighlightRules = GraphQLSchemaHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/graphqlschema",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/graphqlschema_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var GraphQLSchemaHighlightRules = require("./graphqlschema_highlight_rules").GraphQLSchemaHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = GraphQLSchemaHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/graphqlschema";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-groovy.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-groovy.js
new file mode 100644
index 00000000..b04ffd9b
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-groovy.js
@@ -0,0 +1,980 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+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) {
+"use strict";
+
+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"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "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;
+});
+
+ace.define("ace/mode/groovy",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/groovy_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptMode = require("./javascript").Mode;
+var GroovyHighlightRules = require("./groovy_highlight_rules").GroovyHighlightRules;
+
+var Mode = function() {
+ JavaScriptMode.call(this);
+ this.HighlightRules = GroovyHighlightRules;
+};
+oop.inherits(Mode, JavaScriptMode);
+
+(function() {
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+ this.$id = "ace/mode/groovy";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-haml.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-haml.js
new file mode 100644
index 00000000..c4255c54
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-haml.js
@@ -0,0 +1,1547 @@
+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 supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/ruby_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 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 instanceVariable = exports.instanceVariable = {
+ token : "variable.instance", // instance variable
+ regex : "@{1,2}[a-zA-Z_\\d]+"
+};
+
+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|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|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*(?=[).,;]|$)"
+ },
+
+ [{
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren.lparen";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.start",
+ regex : /"/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+ }, {
+ token : "paren.start",
+ regex : /#{/,
+ push : "start"
+ }, {
+ token : "string.end",
+ regex : /"/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+ }, {
+ token : "paren.start",
+ regex : /#{/,
+ push : "start"
+ }, {
+ token : "string.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : /'/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\['\\]/
+ }, {
+ token : "string.end",
+ regex : /'/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ {
+ 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 : "=>"
+ }, {
+ stateName: "heredoc",
+ onMatch : function(value, currentState, stack) {
+ var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
+ var tokens = value.split(this.splitRegex);
+ stack.push(next, tokens[3]);
+ return [
+ {type:"constant", value: tokens[1]},
+ {type:"string", value: tokens[2]},
+ {type:"support.class", value: tokens[3]},
+ {type:"string", value: tokens[4]}
+ ];
+ },
+ regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",
+ rules: {
+ heredoc: [{
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }],
+ indentedHeredoc: [{
+ token: "string",
+ regex: "^ +"
+ }, {
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }]
+ }
+ }, {
+ regex : "$",
+ token : "empty",
+ next : function(currentState, stack) {
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
+ return stack[0];
+ return currentState;
+ }
+ }, {
+ token : "string.character",
+ regex : "\\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(?:$|\\s.*$)",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(RubyHighlightRules, TextHighlightRules);
+
+exports.RubyHighlightRules = RubyHighlightRules;
+});
+
+ace.define("ace/mode/haml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/ruby_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var RubyExports = require("./ruby_highlight_rules");
+var RubyHighlightRules = RubyExports.RubyHighlightRules;
+
+var HamlHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ this.$rules = {
+ "start": [
+ {
+ token: "comment.block", // multiline HTML comment
+ regex: /^\/$/,
+ next: "comment"
+ },
+ {
+ token: "comment.block", // multiline HAML comment
+ regex: /^\-#$/,
+ next: "comment"
+ },
+ {
+ token: "comment.line", // HTML comment
+ regex: /\/\s*.*/
+ },
+ {
+ token: "comment.line", // HAML comment
+ regex: /-#\s*.*/
+ },
+ {
+ token: "keyword.other.doctype",
+ regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?"
+ },
+ RubyExports.qString,
+ RubyExports.qqString,
+ RubyExports.tString,
+ {
+ token: "meta.tag.haml",
+ regex: /(%[\w:\-]+)/
+ },
+ {
+ token: "keyword.attribute-name.class.haml",
+ regex: /\.[\w-]+/
+ },
+ {
+ token: "keyword.attribute-name.id.haml",
+ regex: /#[\w-]+/,
+ next: "element_class"
+ },
+ RubyExports.constantNumericHex,
+ RubyExports.constantNumericFloat,
+ RubyExports.constantOtherSymbol,
+ {
+ token: "text",
+ regex: /=|-|~/,
+ next: "embedded_ruby"
+ }
+ ],
+ "element_class": [
+ {
+ token: "keyword.attribute-name.class.haml",
+ regex: /\.[\w-]+/
+ },
+ {
+ token: "punctuation.section",
+ regex: /\{/,
+ next: "element_attributes"
+ },
+ RubyExports.constantOtherSymbol,
+ {
+ token: "empty",
+ regex: "$|(?!\\.|#|\\{|\\[|=|-|~|\\/])",
+ next: "start"
+ }
+ ],
+ "element_attributes": [
+ RubyExports.constantOtherSymbol,
+ RubyExports.qString,
+ RubyExports.qqString,
+ RubyExports.tString,
+ RubyExports.constantNumericHex,
+ RubyExports.constantNumericFloat,
+ {
+ token: "punctuation.section",
+ regex: /$|\}/,
+ next: "start"
+ }
+ ],
+ "embedded_ruby": [
+ RubyExports.constantNumericHex,
+ RubyExports.constantNumericFloat,
+ RubyExports.instanceVariable,
+ RubyExports.qString,
+ RubyExports.qqString,
+ RubyExports.tString,
+ {
+ 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"
+ }
+ ],
+ "comment": [
+ {
+ token: "comment.block",
+ regex: /^$/,
+ next: "start"
+ },
+ {
+ token: "comment.block", // comment spanning the whole line
+ regex: /\s+.*/
+ }
+ ]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(HamlHighlightRules, HtmlHighlightRules);
+
+exports.HamlHighlightRules = HamlHighlightRules;
+});
+
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/haml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haml_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var HamlHighlightRules = require("./haml_highlight_rules").HamlHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HamlHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+
+ this.$id = "ace/mode/haml";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-handlebars.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-handlebars.js
new file mode 100644
index 00000000..c970820e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-handlebars.js
@@ -0,0 +1,2593 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+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(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": {"manifest": 1},
+ "head": {},
+ "title": {},
+ "base": {"href": 1, "target": 1},
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
+ "noscript": {"href": 1},
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
+ "section": {},
+ "nav": {},
+ "article": {"pubdate": 1},
+ "aside": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "header": {},
+ "footer": {},
+ "address": {},
+ "main": {},
+ "p": {},
+ "hr": {},
+ "pre": {},
+ "blockquote": {"cite": 1},
+ "ol": {"start": 1, "reversed": 1},
+ "ul": {},
+ "li": {"value": 1},
+ "dl": {},
+ "dt": {},
+ "dd": {},
+ "figure": {},
+ "figcaption": {},
+ "div": {},
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
+ "em": {},
+ "strong": {},
+ "small": {},
+ "s": {},
+ "cite": {},
+ "q": {"cite": 1},
+ "dfn": {},
+ "abbr": {},
+ "data": {},
+ "time": {"datetime": 1},
+ "code": {},
+ "var": {},
+ "samp": {},
+ "kbd": {},
+ "sub": {},
+ "sup": {},
+ "i": {},
+ "b": {},
+ "u": {},
+ "mark": {},
+ "ruby": {},
+ "rt": {},
+ "rp": {},
+ "bdi": {},
+ "bdo": {},
+ "span": {},
+ "br": {},
+ "wbr": {},
+ "ins": {"cite": 1, "datetime": 1},
+ "del": {"cite": 1, "datetime": 1},
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
+ "param": {"name": 1, "value": 1},
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
+ "source": {"src": 1, "type": 1, "media": 1},
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
+ "canvas": {"width": 1, "height": 1},
+ "map": {"name": 1},
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
+ "svg": {},
+ "math": {},
+ "table": {"summary": 1},
+ "caption": {},
+ "colgroup": {"span": 1},
+ "col": {"span": 1},
+ "tbody": {},
+ "thead": {},
+ "tfoot": {},
+ "tr": {},
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
+ "legend": {},
+ "label": {"form": 1, "for": 1},
+ "input": {
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
+ "datalist": {},
+ "optgroup": {"disabled": 1, "label": 1},
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
+ "output": {"for": 1, "form": 1, "name": 1},
+ "progress": {"value": 1, "max": 1},
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
+ "details": {"open": 1},
+ "summary": {},
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
+ "menu": {"type": 1, "label": 1},
+ "dialog": {"open": 1}
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+function findAttributeName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "attribute-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompletions(state, session, pos, prefix);
+ if (is(token, "attribute-value"))
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/&[a-z]*$/i.test(line))
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ var attributeName = findAttributeName(session, pos);
+
+ if (!tagName)
+ return [];
+ var values = [];
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
+ values = Object.keys(attributeMap[tagName][attributeName]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "attribute value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
+
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "html entity",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/handlebars_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+function pop2(currentState, stack) {
+ stack.splice(0, 3);
+ return stack.shift() || "start";
+}
+var HandlebarsHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+ var hbs = {
+ regex : "(?={{)",
+ push : "handlebars"
+ };
+ for (var key in this.$rules) {
+ this.$rules[key].unshift(hbs);
+ }
+ this.$rules.handlebars = [{
+ token : "comment.start",
+ regex : "{{!--",
+ push : [{
+ token : "comment.end",
+ regex : "--}}",
+ next : pop2
+ }, {
+ defaultToken : "comment"
+ }]
+ }, {
+ token : "comment.start",
+ regex : "{{!",
+ push : [{
+ token : "comment.end",
+ regex : "}}",
+ next : pop2
+ }, {
+ defaultToken : "comment"
+ }]
+ }, {
+ token : "support.function", // unescaped variable
+ regex : "{{{",
+ push : [{
+ token : "support.function",
+ regex : "}}}",
+ next : pop2
+ }, {
+ token : "variable.parameter",
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*"
+ }]
+ }, {
+ token : "storage.type.start", // begin section
+ regex : "{{[#\\^/&]?",
+ push : [{
+ token : "storage.type.end",
+ regex : "}}",
+ next : pop2
+ }, {
+ token : "variable.parameter",
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*"
+ }]
+ }];
+
+ this.normalizeRules();
+};
+
+oop.inherits(HandlebarsHighlightRules, HtmlHighlightRules);
+
+exports.HandlebarsHighlightRules = HandlebarsHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/html",["require","exports","module","ace/lib/oop","ace/mode/behaviour/xml"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
+
+var HtmlBehaviour = function () {
+
+ XmlBehaviour.call(this);
+
+};
+
+oop.inherits(HtmlBehaviour, XmlBehaviour);
+
+exports.HtmlBehaviour = HtmlBehaviour;
+});
+
+ace.define("ace/mode/handlebars",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/handlebars_highlight_rules","ace/mode/behaviour/html","ace/mode/folding/html"], function(require, exports, module) {
+ "use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var HandlebarsHighlightRules = require("./handlebars_highlight_rules").HandlebarsHighlightRules;
+var HtmlBehaviour = require("./behaviour/html").HtmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = HandlebarsHighlightRules;
+ this.$behaviour = new HtmlBehaviour();
+};
+
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.blockComment = {start: "{{!--", end: "--}}"};
+ this.$id = "ace/mode/handlebars";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-haskell.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-haskell.js
new file mode 100644
index 00000000..51a54454
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-haskell.js
@@ -0,0 +1,372 @@
+ace.define("ace/mode/haskell_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 HaskellHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { token:
+ [ 'punctuation.definition.entity.haskell',
+ 'keyword.operator.function.infix.haskell',
+ 'punctuation.definition.entity.haskell' ],
+ regex: '(`)([a-zA-Z_\']*?)(`)',
+ comment: 'In case this regex seems unusual for an infix operator, note that Haskell allows any ordinary function application (elem 4 [1..10]) to be rewritten as an infix expression (4 `elem` [1..10]).' },
+ { token: 'constant.language.unit.haskell', regex: '\\(\\)' },
+ { token: 'constant.language.empty-list.haskell',
+ regex: '\\[\\]' },
+ { token: 'keyword.other.haskell',
+ regex: '\\bmodule\\b',
+ push:
+ [ { token: 'keyword.other.haskell', regex: '\\bwhere\\b', next: 'pop' },
+ { include: '#module_name' },
+ { include: '#module_exports' },
+ { token: 'invalid', regex: '[a-z]+' },
+ { defaultToken: 'meta.declaration.module.haskell' } ] },
+ { token: 'keyword.other.haskell',
+ regex: '\\bclass\\b',
+ push:
+ [ { token: 'keyword.other.haskell',
+ regex: '\\bwhere\\b',
+ next: 'pop' },
+ { token: 'support.class.prelude.haskell',
+ regex: '\\b(?:Monad|Functor|Eq|Ord|Read|Show|Num|(?:Frac|Ra)tional|Enum|Bounded|Real(?:Frac|Float)?|Integral|Floating)\\b' },
+ { token: 'entity.other.inherited-class.haskell',
+ regex: '[A-Z][A-Za-z_\']*' },
+ { token: 'variable.other.generic-type.haskell',
+ regex: '\\b[a-z][a-zA-Z0-9_\']*\\b' },
+ { defaultToken: 'meta.declaration.class.haskell' } ] },
+ { token: 'keyword.other.haskell',
+ regex: '\\binstance\\b',
+ push:
+ [ { token: 'keyword.other.haskell',
+ regex: '\\bwhere\\b|$',
+ next: 'pop' },
+ { include: '#type_signature' },
+ { defaultToken: 'meta.declaration.instance.haskell' } ] },
+ { token: 'keyword.other.haskell',
+ regex: 'import',
+ push:
+ [ { token: 'meta.import.haskell', regex: '$|;|^', next: 'pop' },
+ { token: 'keyword.other.haskell', regex: 'qualified|as|hiding' },
+ { include: '#module_name' },
+ { include: '#module_exports' },
+ { defaultToken: 'meta.import.haskell' } ] },
+ { token: [ 'keyword.other.haskell', 'meta.deriving.haskell' ],
+ regex: '(deriving)(\\s*\\()',
+ push:
+ [ { token: 'meta.deriving.haskell', regex: '\\)', next: 'pop' },
+ { token: 'entity.other.inherited-class.haskell',
+ regex: '\\b[A-Z][a-zA-Z_\']*' },
+ { defaultToken: 'meta.deriving.haskell' } ] },
+ { token: 'keyword.other.haskell',
+ regex: '\\b(?:deriving|where|data|type|case|of|let|in|newtype|default)\\b' },
+ { token: 'keyword.operator.haskell', regex: '\\binfix[lr]?\\b' },
+ { token: 'keyword.control.haskell',
+ regex: '\\b(?:do|if|then|else)\\b' },
+ { token: 'constant.numeric.float.haskell',
+ regex: '\\b(?:[0-9]+\\.[0-9]+(?:[eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\\b',
+ comment: 'Floats are always decimal' },
+ { token: 'constant.numeric.haskell',
+ regex: '\\b(?:[0-9]+|0(?:[xX][0-9a-fA-F]+|[oO][0-7]+))\\b' },
+ { token:
+ [ 'meta.preprocessor.c',
+ 'punctuation.definition.preprocessor.c',
+ 'meta.preprocessor.c' ],
+ regex: '^(\\s*)(#)(\\s*\\w+)',
+ comment: 'In addition to Haskell\'s "native" syntax, GHC permits the C preprocessor to be run on a source file.' },
+ { include: '#pragma' },
+ { token: 'punctuation.definition.string.begin.haskell',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.haskell',
+ regex: '"',
+ next: 'pop' },
+ { token: 'constant.character.escape.haskell',
+ regex: '\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&])' },
+ { token: 'constant.character.escape.octal.haskell',
+ regex: '\\\\o[0-7]+|\\\\x[0-9A-Fa-f]+|\\\\[0-9]+' },
+ { token: 'constant.character.escape.control.haskell',
+ regex: '\\^[A-Z@\\[\\]\\\\\\^_]' },
+ { defaultToken: 'string.quoted.double.haskell' } ] },
+ { token:
+ [ 'punctuation.definition.string.begin.haskell',
+ 'string.quoted.single.haskell',
+ 'constant.character.escape.haskell',
+ 'constant.character.escape.octal.haskell',
+ 'constant.character.escape.hexadecimal.haskell',
+ 'constant.character.escape.control.haskell',
+ 'punctuation.definition.string.end.haskell' ],
+ regex: '(\')(?:([\\ -\\[\\]-~])|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_]))(\')' },
+ { token:
+ [ 'meta.function.type-declaration.haskell',
+ 'entity.name.function.haskell',
+ 'meta.function.type-declaration.haskell',
+ 'keyword.other.double-colon.haskell' ],
+ regex: '^(\\s*)([a-z_][a-zA-Z0-9_\']*|\\([|!%$+\\-.,=</>]+\\))(\\s*)(::)',
+ push:
+ [ { token: 'meta.function.type-declaration.haskell',
+ regex: '$',
+ next: 'pop' },
+ { include: '#type_signature' },
+ { defaultToken: 'meta.function.type-declaration.haskell' } ] },
+ { token: 'support.constant.haskell',
+ regex: '\\b(?:Just|Nothing|Left|Right|True|False|LT|EQ|GT|\\(\\)|\\[\\])\\b' },
+ { token: 'constant.other.haskell', regex: '\\b[A-Z]\\w*\\b' },
+ { include: '#comments' },
+ { token: 'support.function.prelude.haskell',
+ regex: '\\b(?:abs|acos|acosh|all|and|any|appendFile|applyM|asTypeOf|asin|asinh|atan|atan2|atanh|break|catch|ceiling|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|div|divMod|drop|dropWhile|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromEnum|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|head|id|init|interact|ioError|isDenormalized|isIEEE|isInfinite|isNaN|isNegativeZero|iterate|last|lcm|length|lex|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|odd|or|otherwise|pi|pred|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|read|readFile|readIO|readList|readLn|readParen|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showList|showParen|showString|shows|showsPrec|significand|signum|sin|sinh|snd|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|toEnum|toInteger|toRational|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\\b' },
+ { include: '#infix_op' },
+ { token: 'keyword.operator.haskell',
+ regex: '[|!%$?~+:\\-.=</>\\\\]+',
+ comment: 'In case this regex seems overly general, note that Haskell permits the definition of new operators which can be nearly any string of punctuation characters, such as $%^&*.' },
+ { token: 'punctuation.separator.comma.haskell', regex: ',' } ],
+ '#block_comment':
+ [ { token: 'punctuation.definition.comment.haskell',
+ regex: '\\{-(?!#)',
+ push:
+ [ { include: '#block_comment' },
+ { token: 'punctuation.definition.comment.haskell',
+ regex: '-\\}',
+ next: 'pop' },
+ { defaultToken: 'comment.block.haskell' } ] } ],
+ '#comments':
+ [ { token: 'punctuation.definition.comment.haskell',
+ regex: '--.*',
+ push_:
+ [ { token: 'comment.line.double-dash.haskell',
+ regex: '$',
+ next: 'pop' },
+ { defaultToken: 'comment.line.double-dash.haskell' } ] },
+ { include: '#block_comment' } ],
+ '#infix_op':
+ [ { token: 'entity.name.function.infix.haskell',
+ regex: '\\([|!%$+:\\-.=</>]+\\)|\\(,+\\)' } ],
+ '#module_exports':
+ [ { token: 'meta.declaration.exports.haskell',
+ regex: '\\(',
+ push:
+ [ { token: 'meta.declaration.exports.haskell.end',
+ regex: '\\)',
+ next: 'pop' },
+ { token: 'entity.name.function.haskell',
+ regex: '\\b[a-z][a-zA-Z_\']*' },
+ { token: 'storage.type.haskell', regex: '\\b[A-Z][A-Za-z_\']*' },
+ { token: 'punctuation.separator.comma.haskell', regex: ',' },
+ { include: '#infix_op' },
+ { token: 'meta.other.unknown.haskell',
+ regex: '\\(.*?\\)',
+ comment: 'So named because I don\'t know what to call this.' },
+ { defaultToken: 'meta.declaration.exports.haskell.end' } ] } ],
+ '#module_name':
+ [ { token: 'support.other.module.haskell',
+ regex: '[A-Z][A-Za-z._\']*' } ],
+ '#pragma':
+ [ { token: 'meta.preprocessor.haskell',
+ regex: '\\{-#',
+ push:
+ [ { token: 'meta.preprocessor.haskell',
+ regex: '#-\\}',
+ next: 'pop' },
+ { token: 'keyword.other.preprocessor.haskell',
+ regex: '\\b(?:LANGUAGE|UNPACK|INLINE)\\b' },
+ { defaultToken: 'meta.preprocessor.haskell' } ] } ],
+ '#type_signature':
+ [ { token:
+ [ 'meta.class-constraint.haskell',
+ 'entity.other.inherited-class.haskell',
+ 'meta.class-constraint.haskell',
+ 'variable.other.generic-type.haskell',
+ 'meta.class-constraint.haskell',
+ 'keyword.other.big-arrow.haskell' ],
+ regex: '(\\(\\s*)([A-Z][A-Za-z]*)(\\s+)([a-z][A-Za-z_\']*)(\\)\\s*)(=>)' },
+ { include: '#pragma' },
+ { token: 'keyword.other.arrow.haskell', regex: '->' },
+ { token: 'keyword.other.big-arrow.haskell', regex: '=>' },
+ { token: 'support.type.prelude.haskell',
+ regex: '\\b(?:Int(?:eger)?|Maybe|Either|Bool|Float|Double|Char|String|Ordering|ShowS|ReadS|FilePath|IO(?:Error)?)\\b' },
+ { token: 'variable.other.generic-type.haskell',
+ regex: '\\b[a-z][a-zA-Z0-9_\']*\\b' },
+ { token: 'storage.type.haskell',
+ regex: '\\b[A-Z][a-zA-Z0-9_\']*\\b' },
+ { token: 'support.constant.unit.haskell', regex: '\\(\\)' },
+ { include: '#comments' } ] }
+
+ this.normalizeRules();
+};
+
+HaskellHighlightRules.metaData = { fileTypes: [ 'hs' ],
+ keyEquivalent: '^~H',
+ name: 'Haskell',
+ scopeName: 'source.haskell' }
+
+
+oop.inherits(HaskellHighlightRules, TextHighlightRules);
+
+exports.HaskellHighlightRules = HaskellHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/haskell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haskell_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var HaskellHighlightRules = require("./haskell_highlight_rules").HaskellHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HaskellHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.blockComment = null;
+ this.$id = "ace/mode/haskell";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-haskell_cabal.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-haskell_cabal.js
new file mode 100644
index 00000000..5b69e04c
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-haskell_cabal.js
@@ -0,0 +1,134 @@
+ace.define("ace/mode/haskell_cabal_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 CabalHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "^\\s*--.*$"
+ }, {
+ token: ["keyword"],
+ regex: /^(\s*\w.*?)(:(?:\s+|$))/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[\d_]+(?:(?:[\.\d_]*)?)/
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"
+ }, {
+ token : "markup.heading",
+ regex : /^(\w.*)$/
+ }
+ ]};
+
+};
+
+oop.inherits(CabalHighlightRules, TextHighlightRules);
+
+exports.CabalHighlightRules = CabalHighlightRules;
+});
+
+ace.define("ace/mode/folding/haskell_cabal",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+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.isHeading = function (session,row) {
+ var heading = "markup.heading";
+ var token = session.getTokens(row)[0];
+ return row==0 || (token && token.type.lastIndexOf(heading, 0) === 0);
+ };
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ if (this.isHeading(session,row)){
+ return "start";
+ } else if (foldStyle === "markbeginend" && !(/^\s*$/.test(session.getLine(row)))){
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ if (!(/^\s*$/.test(session.getLine(row)))){
+ break;
+ }
+ }
+ if (row==maxRow || this.isHeading(session,row)){
+ return "end";
+ }
+ }
+ return "";
+ };
+
+
+ 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 (this.isHeading(session,row)) {
+ while (++row < maxRow) {
+ if (this.isHeading(session,row)){
+ row--;
+ break;
+ }
+ }
+
+ endRow = row;
+ 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);
+ }
+ } else if (this.getFoldWidget(session, foldStyle, row)==="end"){
+ var endRow = row;
+ var endColumn = session.getLine(endRow).length;
+ while (--row>=0){
+ if (this.isHeading(session,row)){
+ break;
+ }
+ }
+ var line = session.getLine(row);
+ var startColumn = line.length;
+ return new Range(row, startColumn, endRow, endColumn);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/haskell_cabal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haskell_cabal_highlight_rules","ace/mode/folding/haskell_cabal"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CabalHighlightRules = require("./haskell_cabal_highlight_rules").CabalHighlightRules;
+var FoldMode = require("./folding/haskell_cabal").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CabalHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.blockComment = null;
+ this.$id = "ace/mode/haskell_cabal";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-haxe.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-haxe.js
new file mode 100644
index 00000000..694b9b80
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-haxe.js
@@ -0,0 +1,379 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/haxe_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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"
+ }, {
+ defaultToken : "comment"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(HaxeHighlightRules, TextHighlightRules);
+
+exports.HaxeHighlightRules = HaxeHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/haxe",["require","exports","module","ace/lib/oop","ace/mode/text","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 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.HighlightRules = HaxeHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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.$id = "ace/mode/haxe";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-hjson.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-hjson.js
new file mode 100644
index 00000000..85758765
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-hjson.js
@@ -0,0 +1,346 @@
+ace.define("ace/mode/hjson_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 HjsonHighlightRules = function() {
+
+ this.$rules = {
+ start: [{
+ include: "#comments"
+ }, {
+ include: "#rootObject"
+ }, {
+ include: "#value"
+ }],
+ "#array": [{
+ token: "paren.lparen",
+ regex: /\[/,
+ push: [{
+ token: "paren.rparen",
+ regex: /\]/,
+ next: "pop"
+ }, {
+ include: "#value"
+ }, {
+ include: "#comments"
+ }, {
+ token: "text",
+ regex: /,|$/
+ }, {
+ token: "invalid.illegal",
+ regex: /[^\s\]]/
+ }, {
+ defaultToken: "array"
+ }]
+ }],
+ "#comments": [{
+ token: [
+ "comment.punctuation",
+ "comment.line"
+ ],
+ regex: /(#)(.*$)/
+ }, {
+ token: "comment.punctuation",
+ regex: /\/\*/,
+ push: [{
+ token: "comment.punctuation",
+ regex: /\*\//,
+ next: "pop"
+ }, {
+ defaultToken: "comment.block"
+ }]
+ }, {
+ token: [
+ "comment.punctuation",
+ "comment.line"
+ ],
+ regex: /(\/\/)(.*$)/
+ }],
+ "#constant": [{
+ token: "constant",
+ regex: /\b(?:true|false|null)\b/
+ }],
+ "#keyname": [{
+ token: "keyword",
+ regex: /(?:[^,\{\[\}\]\s]+|"(?:[^"\\]|\\.)*")\s*(?=:)/
+ }],
+ "#mstring": [{
+ token: "string",
+ regex: /'''/,
+ push: [{
+ token: "string",
+ regex: /'''/,
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ "#number": [{
+ token: "constant.numeric",
+ regex: /-?(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:[eE][+-]?\d+)?)?/,
+ comment: "handles integer and decimal numbers"
+ }],
+ "#object": [{
+ token: "paren.lparen",
+ regex: /\{/,
+ push: [{
+ token: "paren.rparen",
+ regex: /\}/,
+ next: "pop"
+ }, {
+ include: "#keyname"
+ }, {
+ include: "#value"
+ }, {
+ token: "text",
+ regex: /:/
+ }, {
+ token: "text",
+ regex: /,/
+ }, {
+ defaultToken: "paren"
+ }]
+ }],
+ "#rootObject": [{
+ token: "paren",
+ regex: /(?=\s*(?:[^,\{\[\}\]\s]+|"(?:[^"\\]|\\.)*")\s*:)/,
+ push: [{
+ token: "paren.rparen",
+ regex: /---none---/,
+ next: "pop"
+ }, {
+ include: "#keyname"
+ }, {
+ include: "#value"
+ }, {
+ token: "text",
+ regex: /:/
+ }, {
+ token: "text",
+ regex: /,/
+ }, {
+ defaultToken: "paren"
+ }]
+ }],
+ "#string": [{
+ token: "string",
+ regex: /"/,
+ push: [{
+ token: "string",
+ regex: /"/,
+ next: "pop"
+ }, {
+ token: "constant.language.escape",
+ regex: /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/
+ }, {
+ token: "invalid.illegal",
+ regex: /\\./
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ "#ustring": [{
+ token: "string",
+ regex: /\b[^:,0-9\-\{\[\}\]\s].*$/
+ }],
+ "#value": [{
+ include: "#constant"
+ }, {
+ include: "#number"
+ }, {
+ include: "#string"
+ }, {
+ include: "#array"
+ }, {
+ include: "#object"
+ }, {
+ include: "#comments"
+ }, {
+ include: "#mstring"
+ }, {
+ include: "#ustring"
+ }]
+ }
+
+ this.normalizeRules();
+};
+
+HjsonHighlightRules.metaData = {
+ fileTypes: ["hjson"],
+ foldingStartMarker: "(?x: # turn on extended mode\n ^ # a line beginning with\n \\s* # some optional space\n [{\\[] # the start of an object or array\n (?! # but not followed by\n .* # whatever\n [}\\]] # and the close of an object or array\n ,? # an optional comma\n \\s* # some optional space\n $ # at the end of the line\n )\n | # ...or...\n [{\\[] # the start of an object or array\n \\s* # some optional space\n $ # at the end of the line\n )",
+ foldingStopMarker: "(?x: # turn on extended mode\n ^ # a line beginning with\n \\s* # some optional space\n [}\\]] # and the close of an object or array\n )",
+ keyEquivalent: "^~J",
+ name: "Hjson",
+ scopeName: "source.hjson"
+}
+
+
+oop.inherits(HjsonHighlightRules, TextHighlightRules);
+
+exports.HjsonHighlightRules = HjsonHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/hjson",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/hjson_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var HjsonHighlightRules = require("./hjson_highlight_rules").HjsonHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HjsonHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = { start: "/*", end: "*/" };
+ this.$id = "ace/mode/hjson"
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-html.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-html.js
new file mode 100644
index 00000000..35aa2cc3
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-html.js
@@ -0,0 +1,2480 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+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(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": {"manifest": 1},
+ "head": {},
+ "title": {},
+ "base": {"href": 1, "target": 1},
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
+ "noscript": {"href": 1},
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
+ "section": {},
+ "nav": {},
+ "article": {"pubdate": 1},
+ "aside": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "header": {},
+ "footer": {},
+ "address": {},
+ "main": {},
+ "p": {},
+ "hr": {},
+ "pre": {},
+ "blockquote": {"cite": 1},
+ "ol": {"start": 1, "reversed": 1},
+ "ul": {},
+ "li": {"value": 1},
+ "dl": {},
+ "dt": {},
+ "dd": {},
+ "figure": {},
+ "figcaption": {},
+ "div": {},
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
+ "em": {},
+ "strong": {},
+ "small": {},
+ "s": {},
+ "cite": {},
+ "q": {"cite": 1},
+ "dfn": {},
+ "abbr": {},
+ "data": {},
+ "time": {"datetime": 1},
+ "code": {},
+ "var": {},
+ "samp": {},
+ "kbd": {},
+ "sub": {},
+ "sup": {},
+ "i": {},
+ "b": {},
+ "u": {},
+ "mark": {},
+ "ruby": {},
+ "rt": {},
+ "rp": {},
+ "bdi": {},
+ "bdo": {},
+ "span": {},
+ "br": {},
+ "wbr": {},
+ "ins": {"cite": 1, "datetime": 1},
+ "del": {"cite": 1, "datetime": 1},
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
+ "param": {"name": 1, "value": 1},
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
+ "source": {"src": 1, "type": 1, "media": 1},
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
+ "canvas": {"width": 1, "height": 1},
+ "map": {"name": 1},
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
+ "svg": {},
+ "math": {},
+ "table": {"summary": 1},
+ "caption": {},
+ "colgroup": {"span": 1},
+ "col": {"span": 1},
+ "tbody": {},
+ "thead": {},
+ "tfoot": {},
+ "tr": {},
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
+ "legend": {},
+ "label": {"form": 1, "for": 1},
+ "input": {
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
+ "datalist": {},
+ "optgroup": {"disabled": 1, "label": 1},
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
+ "output": {"for": 1, "form": 1, "name": 1},
+ "progress": {"value": 1, "max": 1},
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
+ "details": {"open": 1},
+ "summary": {},
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
+ "menu": {"type": 1, "label": 1},
+ "dialog": {"open": 1}
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+function findAttributeName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "attribute-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompletions(state, session, pos, prefix);
+ if (is(token, "attribute-value"))
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/&[a-z]*$/i.test(line))
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ var attributeName = findAttributeName(session, pos);
+
+ if (!tagName)
+ return [];
+ var values = [];
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
+ values = Object.keys(attributeMap[tagName][attributeName]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "attribute value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
+
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "html entity",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-html_elixir.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-html_elixir.js
new file mode 100644
index 00000000..207e4899
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-html_elixir.js
@@ -0,0 +1,3059 @@
+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 supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/elixir_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 ElixirHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { token:
+ [ 'meta.module.elixir',
+ 'keyword.control.module.elixir',
+ 'meta.module.elixir',
+ 'entity.name.type.module.elixir' ],
+ regex: '^(\\s*)(defmodule)(\\s+)((?:[A-Z]\\w*\\s*\\.\\s*)*[A-Z]\\w*)' },
+ { token: 'comment.documentation.heredoc',
+ regex: '@(?:module|type)?doc (?:~[a-z])?"""',
+ push:
+ [ { token: 'comment.documentation.heredoc',
+ regex: '\\s*"""',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'comment.documentation.heredoc' } ],
+ comment: '@doc with heredocs is treated as documentation' },
+ { token: 'comment.documentation.heredoc',
+ regex: '@(?:module|type)?doc ~[A-Z]"""',
+ push:
+ [ { token: 'comment.documentation.heredoc',
+ regex: '\\s*"""',
+ next: 'pop' },
+ { defaultToken: 'comment.documentation.heredoc' } ],
+ comment: '@doc with heredocs is treated as documentation' },
+ { token: 'comment.documentation.heredoc',
+ regex: '@(?:module|type)?doc (?:~[a-z])?\'\'\'',
+ push:
+ [ { token: 'comment.documentation.heredoc',
+ regex: '\\s*\'\'\'',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'comment.documentation.heredoc' } ],
+ comment: '@doc with heredocs is treated as documentation' },
+ { token: 'comment.documentation.heredoc',
+ regex: '@(?:module|type)?doc ~[A-Z]\'\'\'',
+ push:
+ [ { token: 'comment.documentation.heredoc',
+ regex: '\\s*\'\'\'',
+ next: 'pop' },
+ { defaultToken: 'comment.documentation.heredoc' } ],
+ comment: '@doc with heredocs is treated as documentation' },
+ { token: 'comment.documentation.false',
+ regex: '@(?:module|type)?doc false',
+ comment: '@doc false is treated as documentation' },
+ { token: 'comment.documentation.string',
+ regex: '@(?:module|type)?doc "',
+ push:
+ [ { token: 'comment.documentation.string',
+ regex: '"',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'comment.documentation.string' } ],
+ comment: '@doc with string is treated as documentation' },
+ { token: 'keyword.control.elixir',
+ regex: '\\b(?:do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defdelegate|defcallback|defmacrocallback|defexception|defoverridable|exit|after|rescue|catch|else|raise|throw|import|require|alias|use|quote|unquote|super)\\b(?![?!])',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<!\\.)\\b(do|end|case|bc|lc|for|if|cond|unless|try|receive|fn|defmodule|defp?|defprotocol|defimpl|defrecord|defstruct|defmacrop?|defdelegate|defcallback|defmacrocallback|defexception|defoverridable|exit|after|rescue|catch|else|raise|throw|import|require|alias|use|quote|unquote|super)\\b(?![?!])' },
+ { token: 'keyword.operator.elixir',
+ regex: '\\b(?:and|not|or|when|xor|in|inlist|inbits)\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<!\\.)\\b(and|not|or|when|xor|in|inlist|inbits)\\b',
+ comment: ' as above, just doesn\'t need a \'end\' and does a logic operation' },
+ { token: 'constant.language.elixir',
+ regex: '\\b(?:nil|true|false)\\b(?![?!])' },
+ { token: 'variable.language.elixir',
+ regex: '\\b__(?:CALLER|ENV|MODULE|DIR)__\\b(?![?!])' },
+ { token:
+ [ 'punctuation.definition.variable.elixir',
+ 'variable.other.readwrite.module.elixir' ],
+ regex: '(@)([a-zA-Z_]\\w*)' },
+ { token:
+ [ 'punctuation.definition.variable.elixir',
+ 'variable.other.anonymous.elixir' ],
+ regex: '(&)(\\d*)' },
+ { token: 'variable.other.constant.elixir',
+ regex: '\\b[A-Z]\\w*\\b' },
+ { token: 'constant.numeric.elixir',
+ regex: '\\b(?:0x[\\da-fA-F](?:_?[\\da-fA-F])*|\\d(?:_?\\d)*(?:\\.(?![^[:space:][:digit:]])(?:_?\\d)*)?(?:[eE][-+]?\\d(?:_?\\d)*)?|0b[01]+|0o[0-7]+)\\b',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '\\b(0x\\h(?>_?\\h)*|\\d(?>_?\\d)*(\\.(?![^[:space:][:digit:]])(?>_?\\d)*)?([eE][-+]?\\d(?>_?\\d)*)?|0b[01]+|0o[0-7]+)\\b' },
+ { token: 'punctuation.definition.constant.elixir',
+ regex: ':\'',
+ push:
+ [ { token: 'punctuation.definition.constant.elixir',
+ regex: '\'',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'constant.other.symbol.single-quoted.elixir' } ] },
+ { token: 'punctuation.definition.constant.elixir',
+ regex: ':"',
+ push:
+ [ { token: 'punctuation.definition.constant.elixir',
+ regex: '"',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'constant.other.symbol.double-quoted.elixir' } ] },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '(?:\'\'\')',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?>\'\'\')',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '^\\s*\'\'\'',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'support.function.variable.quoted.single.heredoc.elixir' } ],
+ comment: 'Single-quoted heredocs' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '\'',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\'',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'support.function.variable.quoted.single.elixir' } ],
+ comment: 'single quoted string (allows for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '(?:""")',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?>""")',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '^\\s*"""',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.quoted.double.heredoc.elixir' } ],
+ comment: 'Double-quoted heredocs' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '"',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.quoted.double.elixir' } ],
+ comment: 'double quoted string (allows for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z](?:""")',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '~[a-z](?>""")',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '^\\s*"""',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.quoted.double.heredoc.elixir' } ],
+ comment: 'Double-quoted heredocs sigils' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z]\\{',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\}[a-z]*',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.interpolated.elixir' } ],
+ comment: 'sigil (allow for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z]\\[',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\][a-z]*',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.interpolated.elixir' } ],
+ comment: 'sigil (allow for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z]\\<',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\>[a-z]*',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.interpolated.elixir' } ],
+ comment: 'sigil (allow for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z]\\(',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\)[a-z]*',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.interpolated.elixir' } ],
+ comment: 'sigil (allow for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[a-z][^\\w]',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '[^\\w][a-z]*',
+ next: 'pop' },
+ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.interpolated.elixir' } ],
+ comment: 'sigil (allow for interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z](?:""")',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '~[A-Z](?>""")',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '^\\s*"""',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'Double-quoted heredocs sigils' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z]\\{',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\}[a-z]*',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'sigil (without interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z]\\[',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\][a-z]*',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'sigil (without interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z]\\<',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\>[a-z]*',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'sigil (without interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z]\\(',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '\\)[a-z]*',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'sigil (without interpolation)' },
+ { token: 'punctuation.definition.string.begin.elixir',
+ regex: '~[A-Z][^\\w]',
+ push:
+ [ { token: 'punctuation.definition.string.end.elixir',
+ regex: '[^\\w][a-z]*',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.other.literal.upper.elixir' } ],
+ comment: 'sigil (without interpolation)' },
+ { token: ['punctuation.definition.constant.elixir', 'constant.other.symbol.elixir'],
+ regex: '(:)([a-zA-Z_][\\w@]*(?:[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(?:\\^\\^)?)',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<!:)(:)(?>[a-zA-Z_][\\w@]*(?>[?!]|=(?![>=]))?|\\<\\>|===?|!==?|<<>>|<<<|>>>|~~~|::|<\\-|\\|>|=>|~|~=|=|/|\\\\\\\\|\\*\\*?|\\.\\.?\\.?|>=?|<=?|&&?&?|\\+\\+?|\\-\\-?|\\|\\|?\\|?|\\!|@|\\%?\\{\\}|%|\\[\\]|\\^(\\^\\^)?)',
+ comment: 'symbols' },
+ { token: 'punctuation.definition.constant.elixir',
+ regex: '(?:[a-zA-Z_][\\w@]*(?:[?!])?):(?!:)',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?>[a-zA-Z_][\\w@]*(?>[?!])?)(:)(?!:)',
+ comment: 'symbols' },
+ { token:
+ [ 'punctuation.definition.comment.elixir',
+ 'comment.line.number-sign.elixir' ],
+ regex: '(#)(.*)' },
+ { token: 'constant.numeric.elixir',
+ regex: '\\?(?:\\\\(?:x[\\da-fA-F]{1,2}(?![\\da-fA-F])\\b|[^xMC])|[^\\s\\\\])',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<!\\w)\\?(\\\\(x\\h{1,2}(?!\\h)\\b|[^xMC])|[^\\s\\\\])',
+ comment: '\n\t\t\tmatches questionmark-letters.\n\n\t\t\texamples (1st alternation = hex):\n\t\t\t?\\x1 ?\\x61\n\n\t\t\texamples (2rd alternation = escaped):\n\t\t\t?\\n ?\\b\n\n\t\t\texamples (3rd alternation = normal):\n\t\t\t?a ?A ?0 \n\t\t\t?* ?" ?( \n\t\t\t?. ?#\n\t\t\t\n\t\t\tthe negative lookbehind prevents against matching\n\t\t\tp(42.tainted?)\n\t\t\t' },
+ { token: 'keyword.operator.assignment.augmented.elixir',
+ regex: '\\+=|\\-=|\\|\\|=|~=|&&=' },
+ { token: 'keyword.operator.comparison.elixir',
+ regex: '===?|!==?|<=?|>=?' },
+ { token: 'keyword.operator.bitwise.elixir',
+ regex: '\\|{3}|&{3}|\\^{3}|<{3}|>{3}|~{3}' },
+ { token: 'keyword.operator.logical.elixir',
+ regex: '!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b',
+ originalRegex: '(?<=[ \\t])!+|\\bnot\\b|&&|\\band\\b|\\|\\||\\bor\\b|\\bxor\\b' },
+ { token: 'keyword.operator.arithmetic.elixir',
+ regex: '\\*|\\+|\\-|/' },
+ { token: 'keyword.operator.other.elixir',
+ regex: '\\||\\+\\+|\\-\\-|\\*\\*|\\\\\\\\|\\<\\-|\\<\\>|\\<\\<|\\>\\>|\\:\\:|\\.\\.|\\|>|~|=>' },
+ { token: 'keyword.operator.assignment.elixir', regex: '=' },
+ { token: 'punctuation.separator.other.elixir', regex: ':' },
+ { token: 'punctuation.separator.statement.elixir',
+ regex: '\\;' },
+ { token: 'punctuation.separator.object.elixir', regex: ',' },
+ { token: 'punctuation.separator.method.elixir', regex: '\\.' },
+ { token: 'punctuation.section.scope.elixir', regex: '\\{|\\}' },
+ { token: 'punctuation.section.array.elixir', regex: '\\[|\\]' },
+ { token: 'punctuation.section.function.elixir',
+ regex: '\\(|\\)' } ],
+ '#escaped_char':
+ [ { token: 'constant.character.escape.elixir',
+ regex: '\\\\(?:x[\\da-fA-F]{1,2}|.)' } ],
+ '#interpolated_elixir':
+ [ { token:
+ [ 'source.elixir.embedded.source',
+ 'source.elixir.embedded.source.empty' ],
+ regex: '(#\\{)(\\})' },
+ { todo:
+ { token: 'punctuation.section.embedded.elixir',
+ regex: '#\\{',
+ push:
+ [ { token: 'punctuation.section.embedded.elixir',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#nest_curly_and_self' },
+ { include: '$self' },
+ { defaultToken: 'source.elixir.embedded.source' } ] } } ],
+ '#nest_curly_and_self':
+ [ { token: 'punctuation.section.scope.elixir',
+ regex: '\\{',
+ push:
+ [ { token: 'punctuation.section.scope.elixir',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#nest_curly_and_self' } ] },
+ { include: '$self' } ],
+ '#regex_sub':
+ [ { include: '#interpolated_elixir' },
+ { include: '#escaped_char' },
+ { token:
+ [ 'punctuation.definition.arbitrary-repitition.elixir',
+ 'string.regexp.arbitrary-repitition.elixir',
+ 'string.regexp.arbitrary-repitition.elixir',
+ 'punctuation.definition.arbitrary-repitition.elixir' ],
+ regex: '(\\{)(\\d+)((?:,\\d+)?)(\\})' },
+ { token: 'punctuation.definition.character-class.elixir',
+ regex: '\\[(?:\\^?\\])?',
+ push:
+ [ { token: 'punctuation.definition.character-class.elixir',
+ regex: '\\]',
+ next: 'pop' },
+ { include: '#escaped_char' },
+ { defaultToken: 'string.regexp.character-class.elixir' } ] },
+ { token: 'punctuation.definition.group.elixir',
+ regex: '\\(',
+ push:
+ [ { token: 'punctuation.definition.group.elixir',
+ regex: '\\)',
+ next: 'pop' },
+ { include: '#regex_sub' },
+ { defaultToken: 'string.regexp.group.elixir' } ] },
+ { token:
+ [ 'punctuation.definition.comment.elixir',
+ 'comment.line.number-sign.elixir' ],
+ regex: '(?:^|\\s)(#)(\\s[[a-zA-Z0-9,. \\t?!-][^\\x00-\\x7F]]*$)',
+ originalRegex: '(?<=^|\\s)(#)\\s[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$',
+ comment: 'We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.' } ] }
+
+ this.normalizeRules();
+};
+
+ElixirHighlightRules.metaData = { comment: 'Textmate bundle for Elixir Programming Language.',
+ fileTypes: [ 'ex', 'exs' ],
+ firstLineMatch: '^#!/.*\\belixir',
+ foldingStartMarker: '(after|else|catch|rescue|\\-\\>|\\{|\\[|do)\\s*$',
+ foldingStopMarker: '^\\s*((\\}|\\]|after|else|catch|rescue)\\s*$|end\\b)',
+ keyEquivalent: '^~E',
+ name: 'Elixir',
+ scopeName: 'source.elixir' }
+
+
+oop.inherits(ElixirHighlightRules, TextHighlightRules);
+
+exports.ElixirHighlightRules = ElixirHighlightRules;
+});
+
+ace.define("ace/mode/html_elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/elixir_highlight_rules"], function(require, exports, module) {
+ "use strict";
+
+ var oop = require("../lib/oop");
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+ var ElixirHighlightRules = require("./elixir_highlight_rules").ElixirHighlightRules;
+
+ var HtmlElixirHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var startRules = [
+ {
+ regex: "<%%|%%>",
+ token: "constant.language.escape"
+ }, {
+ token : "comment.start.eex",
+ regex : "<%#",
+ push : [{
+ token : "comment.end.eex",
+ regex: "%>",
+ next: "pop",
+ defaultToken:"comment"
+ }]
+ }, {
+ token : "support.elixir_tag",
+ regex : "<%+(?!>)[-=]?",
+ push : "elixir-start"
+ }
+ ];
+
+ var endRules = [
+ {
+ token : "support.elixir_tag",
+ regex : "%>",
+ next : "pop"
+ }, {
+ token: "comment",
+ regex: "#(?:[^%]|%[^>])*"
+ }
+ ];
+
+ for (var key in this.$rules)
+ this.$rules[key].unshift.apply(this.$rules[key], startRules);
+
+ this.embedRules(ElixirHighlightRules, "elixir-", endRules, ["start"]);
+
+ this.normalizeRules();
+ };
+
+
+ oop.inherits(HtmlElixirHighlightRules, HtmlHighlightRules);
+
+ exports.HtmlElixirHighlightRules = HtmlElixirHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+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(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": {"manifest": 1},
+ "head": {},
+ "title": {},
+ "base": {"href": 1, "target": 1},
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
+ "noscript": {"href": 1},
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
+ "section": {},
+ "nav": {},
+ "article": {"pubdate": 1},
+ "aside": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "header": {},
+ "footer": {},
+ "address": {},
+ "main": {},
+ "p": {},
+ "hr": {},
+ "pre": {},
+ "blockquote": {"cite": 1},
+ "ol": {"start": 1, "reversed": 1},
+ "ul": {},
+ "li": {"value": 1},
+ "dl": {},
+ "dt": {},
+ "dd": {},
+ "figure": {},
+ "figcaption": {},
+ "div": {},
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
+ "em": {},
+ "strong": {},
+ "small": {},
+ "s": {},
+ "cite": {},
+ "q": {"cite": 1},
+ "dfn": {},
+ "abbr": {},
+ "data": {},
+ "time": {"datetime": 1},
+ "code": {},
+ "var": {},
+ "samp": {},
+ "kbd": {},
+ "sub": {},
+ "sup": {},
+ "i": {},
+ "b": {},
+ "u": {},
+ "mark": {},
+ "ruby": {},
+ "rt": {},
+ "rp": {},
+ "bdi": {},
+ "bdo": {},
+ "span": {},
+ "br": {},
+ "wbr": {},
+ "ins": {"cite": 1, "datetime": 1},
+ "del": {"cite": 1, "datetime": 1},
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
+ "param": {"name": 1, "value": 1},
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
+ "source": {"src": 1, "type": 1, "media": 1},
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
+ "canvas": {"width": 1, "height": 1},
+ "map": {"name": 1},
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
+ "svg": {},
+ "math": {},
+ "table": {"summary": 1},
+ "caption": {},
+ "colgroup": {"span": 1},
+ "col": {"span": 1},
+ "tbody": {},
+ "thead": {},
+ "tfoot": {},
+ "tr": {},
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
+ "legend": {},
+ "label": {"form": 1, "for": 1},
+ "input": {
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
+ "datalist": {},
+ "optgroup": {"disabled": 1, "label": 1},
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
+ "output": {"for": 1, "form": 1, "name": 1},
+ "progress": {"value": 1, "max": 1},
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
+ "details": {"open": 1},
+ "summary": {},
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
+ "menu": {"type": 1, "label": 1},
+ "dialog": {"open": 1}
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+function findAttributeName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "attribute-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompletions(state, session, pos, prefix);
+ if (is(token, "attribute-value"))
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/&[a-z]*$/i.test(line))
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ var attributeName = findAttributeName(session, pos);
+
+ if (!tagName)
+ return [];
+ var values = [];
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
+ values = Object.keys(attributeMap[tagName][attributeName]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "attribute value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
+
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "html entity",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/elixir",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/elixir_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ElixirHighlightRules = require("./elixir_highlight_rules").ElixirHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ElixirHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/elixir"
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/html_elixir",["require","exports","module","ace/lib/oop","ace/mode/html_elixir_highlight_rules","ace/mode/html","ace/mode/javascript","ace/mode/css","ace/mode/elixir"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlElixirHighlightRules = require("./html_elixir_highlight_rules").HtmlElixirHighlightRules;
+var HtmlMode = require("./html").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var ElixirMode = require("./elixir").Mode;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = HtmlElixirHighlightRules;
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode,
+ "elixir-": ElixirMode
+ });
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+
+ this.$id = "ace/mode/html_elixir";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-html_ruby.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-html_ruby.js
new file mode 100644
index 00000000..593e9552
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-html_ruby.js
@@ -0,0 +1,3016 @@
+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 supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/ruby_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 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 instanceVariable = exports.instanceVariable = {
+ token : "variable.instance", // instance variable
+ regex : "@{1,2}[a-zA-Z_\\d]+"
+};
+
+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|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|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*(?=[).,;]|$)"
+ },
+
+ [{
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren.lparen";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.start",
+ regex : /"/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+ }, {
+ token : "paren.start",
+ regex : /#{/,
+ push : "start"
+ }, {
+ token : "string.end",
+ regex : /"/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+ }, {
+ token : "paren.start",
+ regex : /#{/,
+ push : "start"
+ }, {
+ token : "string.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : /'/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\['\\]/
+ }, {
+ token : "string.end",
+ regex : /'/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ {
+ 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 : "=>"
+ }, {
+ stateName: "heredoc",
+ onMatch : function(value, currentState, stack) {
+ var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
+ var tokens = value.split(this.splitRegex);
+ stack.push(next, tokens[3]);
+ return [
+ {type:"constant", value: tokens[1]},
+ {type:"string", value: tokens[2]},
+ {type:"support.class", value: tokens[3]},
+ {type:"string", value: tokens[4]}
+ ];
+ },
+ regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",
+ rules: {
+ heredoc: [{
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }],
+ indentedHeredoc: [{
+ token: "string",
+ regex: "^ +"
+ }, {
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }]
+ }
+ }, {
+ regex : "$",
+ token : "empty",
+ next : function(currentState, stack) {
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
+ return stack[0];
+ return currentState;
+ }
+ }, {
+ token : "string.character",
+ regex : "\\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(?:$|\\s.*$)",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(RubyHighlightRules, TextHighlightRules);
+
+exports.RubyHighlightRules = RubyHighlightRules;
+});
+
+ace.define("ace/mode/html_ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/ruby_highlight_rules"], function(require, exports, module) {
+ "use strict";
+
+ var oop = require("../lib/oop");
+ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+ var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
+
+ var HtmlRubyHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var startRules = [
+ {
+ regex: "<%%|%%>",
+ token: "constant.language.escape"
+ }, {
+ token : "comment.start.erb",
+ regex : "<%#",
+ push : [{
+ token : "comment.end.erb",
+ regex: "%>",
+ next: "pop",
+ defaultToken:"comment"
+ }]
+ }, {
+ token : "support.ruby_tag",
+ regex : "<%+(?!>)[-=]?",
+ push : "ruby-start"
+ }
+ ];
+
+ var endRules = [
+ {
+ token : "support.ruby_tag",
+ regex : "%>",
+ next : "pop"
+ }, {
+ token: "comment",
+ regex: "#(?:[^%]|%[^>])*"
+ }
+ ];
+
+ for (var key in this.$rules)
+ this.$rules[key].unshift.apply(this.$rules[key], startRules);
+
+ this.embedRules(RubyHighlightRules, "ruby-", endRules, ["start"]);
+
+ this.normalizeRules();
+ };
+
+
+ oop.inherits(HtmlRubyHighlightRules, HtmlHighlightRules);
+
+ exports.HtmlRubyHighlightRules = HtmlRubyHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+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(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": {"manifest": 1},
+ "head": {},
+ "title": {},
+ "base": {"href": 1, "target": 1},
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
+ "noscript": {"href": 1},
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
+ "section": {},
+ "nav": {},
+ "article": {"pubdate": 1},
+ "aside": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "header": {},
+ "footer": {},
+ "address": {},
+ "main": {},
+ "p": {},
+ "hr": {},
+ "pre": {},
+ "blockquote": {"cite": 1},
+ "ol": {"start": 1, "reversed": 1},
+ "ul": {},
+ "li": {"value": 1},
+ "dl": {},
+ "dt": {},
+ "dd": {},
+ "figure": {},
+ "figcaption": {},
+ "div": {},
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
+ "em": {},
+ "strong": {},
+ "small": {},
+ "s": {},
+ "cite": {},
+ "q": {"cite": 1},
+ "dfn": {},
+ "abbr": {},
+ "data": {},
+ "time": {"datetime": 1},
+ "code": {},
+ "var": {},
+ "samp": {},
+ "kbd": {},
+ "sub": {},
+ "sup": {},
+ "i": {},
+ "b": {},
+ "u": {},
+ "mark": {},
+ "ruby": {},
+ "rt": {},
+ "rp": {},
+ "bdi": {},
+ "bdo": {},
+ "span": {},
+ "br": {},
+ "wbr": {},
+ "ins": {"cite": 1, "datetime": 1},
+ "del": {"cite": 1, "datetime": 1},
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
+ "param": {"name": 1, "value": 1},
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
+ "source": {"src": 1, "type": 1, "media": 1},
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
+ "canvas": {"width": 1, "height": 1},
+ "map": {"name": 1},
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
+ "svg": {},
+ "math": {},
+ "table": {"summary": 1},
+ "caption": {},
+ "colgroup": {"span": 1},
+ "col": {"span": 1},
+ "tbody": {},
+ "thead": {},
+ "tfoot": {},
+ "tr": {},
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
+ "legend": {},
+ "label": {"form": 1, "for": 1},
+ "input": {
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
+ "datalist": {},
+ "optgroup": {"disabled": 1, "label": 1},
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
+ "output": {"for": 1, "form": 1, "name": 1},
+ "progress": {"value": 1, "max": 1},
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
+ "details": {"open": 1},
+ "summary": {},
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
+ "menu": {"type": 1, "label": 1},
+ "dialog": {"open": 1}
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+function findAttributeName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "attribute-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompletions(state, session, pos, prefix);
+ if (is(token, "attribute-value"))
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/&[a-z]*$/i.test(line))
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ var attributeName = findAttributeName(session, pos);
+
+ if (!tagName)
+ return [];
+ var values = [];
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
+ values = Object.keys(attributeMap[tagName][attributeName]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "attribute value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
+
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "html entity",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = RubyHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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*$/);
+ var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/);
+ var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
+ var startingConditional = line.match(/^\s*(if|else|when)\s*/)
+ if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return /^\s+(end|else)$/.test(line + input) || this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, session, row) {
+ var line = session.getLine(row);
+ if (/}/.test(line))
+ return this.$outdent.autoOutdent(session, row);
+ var indent = this.$getIndent(line);
+ var prevLine = session.getLine(row - 1);
+ var prevIndent = this.$getIndent(prevLine);
+ var tab = session.getTabString();
+ if (prevIndent.length <= indent.length) {
+ if (indent.slice(-tab.length) == tab)
+ session.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ }
+ };
+
+ this.$id = "ace/mode/ruby";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/html_ruby",["require","exports","module","ace/lib/oop","ace/mode/html_ruby_highlight_rules","ace/mode/html","ace/mode/javascript","ace/mode/css","ace/mode/ruby"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlRubyHighlightRules = require("./html_ruby_highlight_rules").HtmlRubyHighlightRules;
+var HtmlMode = require("./html").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var RubyMode = require("./ruby").Mode;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = HtmlRubyHighlightRules;
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode,
+ "ruby-": RubyMode
+ });
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+
+ this.$id = "ace/mode/html_ruby";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-ini.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-ini.js
new file mode 100644
index 00000000..f53e87f7
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-ini.js
@@ -0,0 +1,155 @@
+ace.define("ace/mode/ini_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 escapeRe = "\\\\(?:[\\\\0abtrn;#=:]|x[a-fA-F\\d]{4})";
+
+var IniHighlightRules = function() {
+ this.$rules = {
+ start: [{
+ token: 'punctuation.definition.comment.ini',
+ regex: '#.*',
+ push_: [{
+ token: 'comment.line.number-sign.ini',
+ regex: '$|^',
+ next: 'pop'
+ }, {
+ defaultToken: 'comment.line.number-sign.ini'
+ }]
+ }, {
+ token: 'punctuation.definition.comment.ini',
+ regex: ';.*',
+ push_: [{
+ token: 'comment.line.semicolon.ini',
+ regex: '$|^',
+ next: 'pop'
+ }, {
+ defaultToken: 'comment.line.semicolon.ini'
+ }]
+ }, {
+ token: ['keyword.other.definition.ini', 'text', 'punctuation.separator.key-value.ini'],
+ regex: '\\b([a-zA-Z0-9_.-]+)\\b(\\s*)(=)'
+ }, {
+ token: ['punctuation.definition.entity.ini', 'constant.section.group-title.ini', 'punctuation.definition.entity.ini'],
+ regex: '^(\\[)(.*?)(\\])'
+ }, {
+ token: 'punctuation.definition.string.begin.ini',
+ regex: "'",
+ push: [{
+ token: 'punctuation.definition.string.end.ini',
+ regex: "'",
+ next: 'pop'
+ }, {
+ token: "constant.language.escape",
+ regex: escapeRe
+ }, {
+ defaultToken: 'string.quoted.single.ini'
+ }]
+ }, {
+ token: 'punctuation.definition.string.begin.ini',
+ regex: '"',
+ push: [{
+ token: "constant.language.escape",
+ regex: escapeRe
+ }, {
+ token: 'punctuation.definition.string.end.ini',
+ regex: '"',
+ next: 'pop'
+ }, {
+ defaultToken: 'string.quoted.double.ini'
+ }]
+ }]
+ };
+
+ this.normalizeRules();
+};
+
+IniHighlightRules.metaData = {
+ fileTypes: ['ini', 'conf'],
+ keyEquivalent: '^~I',
+ name: 'Ini',
+ scopeName: 'source.ini'
+};
+
+
+oop.inherits(IniHighlightRules, TextHighlightRules);
+
+exports.IniHighlightRules = IniHighlightRules;
+});
+
+ace.define("ace/mode/folding/ini",["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*\[([^\])]*)]\s*(?:$|[;#])/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var re = this.foldingStartMarker;
+ var line = session.getLine(row);
+
+ var m = line.match(re);
+
+ if (!m) return;
+
+ var startName = m[1] + ".";
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ if (/^\s*$/.test(line))
+ continue;
+ m = line.match(re);
+ if (m && m[1].lastIndexOf(startName, 0) !== 0)
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/ini",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ini_highlight_rules","ace/mode/folding/ini"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var IniHighlightRules = require("./ini_highlight_rules").IniHighlightRules;
+var FoldMode = require("./folding/ini").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = IniHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = ";";
+ this.blockComment = null;
+ this.$id = "ace/mode/ini";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-io.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-io.js
new file mode 100644
index 00000000..93d53e2c
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-io.js
@@ -0,0 +1,246 @@
+ace.define("ace/mode/io_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 IoHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { token: [ 'text', 'meta.empty-parenthesis.io' ],
+ regex: '(\\()(\\))',
+ comment: 'we match this to overload return inside () --Allan; scoping rules for what gets the scope have changed, so we now group the ) instead of the ( -- Rob' },
+ { token: [ 'text', 'meta.comma-parenthesis.io' ],
+ regex: '(\\,)(\\))',
+ comment: 'We want to do the same for ,) -- Seckar; same as above -- Rob' },
+ { token: 'keyword.control.io',
+ regex: '\\b(?:if|ifTrue|ifFalse|ifTrueIfFalse|for|loop|reverseForeach|foreach|map|continue|break|while|do|return)\\b' },
+ { token: 'punctuation.definition.comment.io',
+ regex: '/\\*',
+ push:
+ [ { token: 'punctuation.definition.comment.io',
+ regex: '\\*/',
+ next: 'pop' },
+ { defaultToken: 'comment.block.io' } ] },
+ { token: 'punctuation.definition.comment.io',
+ regex: '//',
+ push:
+ [ { token: 'comment.line.double-slash.io',
+ regex: '$',
+ next: 'pop' },
+ { defaultToken: 'comment.line.double-slash.io' } ] },
+ { token: 'punctuation.definition.comment.io',
+ regex: '#',
+ push:
+ [ { token: 'comment.line.number-sign.io', regex: '$', next: 'pop' },
+ { defaultToken: 'comment.line.number-sign.io' } ] },
+ { token: 'variable.language.io',
+ regex: '\\b(?:self|sender|target|proto|protos|parent)\\b',
+ comment: 'I wonder if some of this isn\'t variable.other.language? --Allan; scoping this as variable.language to match Objective-C\'s handling of \'self\', which is inconsistent with C++\'s handling of \'this\' but perhaps intentionally so -- Rob' },
+ { token: 'keyword.operator.io',
+ regex: '<=|>=|=|:=|\\*|\\||\\|\\||\\+|-|/|&|&&|>|<|\\?|@|@@|\\b(?:and|or)\\b' },
+ { token: 'constant.other.io', regex: '\\bGL[\\w_]+\\b' },
+ { token: 'support.class.io', regex: '\\b[A-Z](?:\\w+)?\\b' },
+ { token: 'support.function.io',
+ regex: '\\b(?:clone|call|init|method|list|vector|block|\\w+(?=\\s*\\())\\b' },
+ { token: 'support.function.open-gl.io',
+ regex: '\\bgl(?:u|ut)?[A-Z]\\w+\\b' },
+ { token: 'punctuation.definition.string.begin.io',
+ regex: '"""',
+ push:
+ [ { token: 'punctuation.definition.string.end.io',
+ regex: '"""',
+ next: 'pop' },
+ { token: 'constant.character.escape.io', regex: '\\\\.' },
+ { defaultToken: 'string.quoted.triple.io' } ] },
+ { token: 'punctuation.definition.string.begin.io',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.io',
+ regex: '"',
+ next: 'pop' },
+ { token: 'constant.character.escape.io', regex: '\\\\.' },
+ { defaultToken: 'string.quoted.double.io' } ] },
+ { token: 'constant.numeric.io',
+ 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: 'variable.other.global.io', regex: 'Lobby\\b' },
+ { token: 'constant.language.io',
+ regex: '\\b(?:TRUE|true|FALSE|false|NULL|null|Null|Nil|nil|YES|NO)\\b' } ] }
+
+ this.normalizeRules();
+};
+
+IoHighlightRules.metaData = { fileTypes: [ 'io' ],
+ keyEquivalent: '^~I',
+ name: 'Io',
+ scopeName: 'source.io' }
+
+
+oop.inherits(IoHighlightRules, TextHighlightRules);
+
+exports.IoHighlightRules = IoHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/io",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/io_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var IoHighlightRules = require("./io_highlight_rules").IoHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = IoHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/io";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-jack.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-jack.js
new file mode 100644
index 00000000..ceaf1351
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-jack.js
@@ -0,0 +1,339 @@
+ace.define("ace/mode/jack_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 JackHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {
+ token : "string",
+ regex : '"',
+ next : "string2"
+ }, {
+ token : "string",
+ regex : "'",
+ next : "string1"
+ }, {
+ token : "constant.numeric", // hex
+ regex: "-?0[xX][0-9a-fA-F]+\\b"
+ }, {
+ token : "constant.numeric", // float
+ regex : "(?:0|[-+]?[1-9][0-9]*)\\b"
+ }, {
+ token : "constant.binary",
+ regex : "<[0-9A-Fa-f][0-9A-Fa-f](\\s+[0-9A-Fa-f][0-9A-Fa-f])*>"
+ }, {
+ token : "constant.language.boolean",
+ regex : "(?:true|false)\\b"
+ }, {
+ token : "constant.language.null",
+ regex : "null\\b"
+ }, {
+ token : "storage.type",
+ regex: "(?:Integer|Boolean|Null|String|Buffer|Tuple|List|Object|Function|Coroutine|Form)\\b"
+ }, {
+ token : "keyword",
+ regex : "(?:return|abort|vars|for|delete|in|is|escape|exec|split|and|if|elif|else|while)\\b"
+ }, {
+ token : "language.builtin",
+ regex : "(?:lines|source|parse|read-stream|interval|substr|parseint|write|print|range|rand|inspect|bind|i-values|i-pairs|i-map|i-filter|i-chunk|i-all\\?|i-any\\?|i-collect|i-zip|i-merge|i-each)\\b"
+ }, {
+ token : "comment",
+ regex : "--.*$"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "storage.form",
+ regex : "@[a-z]+"
+ }, {
+ token : "constant.other.symbol",
+ regex : ':+[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?'
+ }, {
+ token : "variable",
+ regex : '[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?'
+ }, {
+ token : "keyword.operator",
+ regex : "\\|\\||\\^\\^|&&|!=|==|<=|<|>=|>|\\+|-|\\*|\\/|\\^|\\%|\\#|\\!"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "string1" : [
+ {
+ 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"
+ }
+ ],
+ "string2" : [
+ {
+ 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(JackHighlightRules, TextHighlightRules);
+
+exports.JackHighlightRules = JackHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/jack",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jack_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 HighlightRules = require("./jack_highlight_rules").JackHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+
+ 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.$id = "ace/mode/jack";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-jade.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-jade.js
new file mode 100644
index 00000000..bfbe9c88
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-jade.js
@@ -0,0 +1,2129 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+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 supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+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_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","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 lang = require("../lib/lang");
+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;
+
+var escaped = function(ch) {
+ return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*";
+}
+
+function github_embed(tag, prefix) {
+ return { // Github style block
+ token : "support.function",
+ regex : "^\\s*```" + tag + "\\s*$",
+ push : prefix + "start"
+ };
+}
+
+var MarkdownHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ this.$rules["start"].unshift({
+ token : "empty_line",
+ regex : '^$',
+ next: "allowBlock"
+ }, { // h1
+ token: "markup.heading.1",
+ regex: "^=+(?=\\s*$)"
+ }, { // h2
+ token: "markup.heading.2",
+ regex: "^\\-+(?=\\s*$)"
+ }, {
+ token : function(value) {
+ return "markup.heading." + value.length;
+ },
+ regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/,
+ next : "header"
+ },
+ github_embed("(?:javascript|js)", "jscode-"),
+ github_embed("xml", "xmlcode-"),
+ github_embed("html", "htmlcode-"),
+ github_embed("css", "csscode-"),
+ { // Github style block
+ token : "support.function",
+ regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",
+ next : "githubblock"
+ }, { // block quote
+ token : "string.blockquote",
+ regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
+ next : "blockquote"
+ }, { // HR * - _
+ token : "constant",
+ regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",
+ next: "allowBlock"
+ }, { // list
+ token : "markup.list",
+ regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
+ next : "listblock-start"
+ }, {
+ include : "basic"
+ });
+
+ this.addRules({
+ "basic" : [{
+ token : "constant.language.escape",
+ regex : /\\[\\`*_{}\[\]()#+\-.!]/
+ }, { // code span `
+ token : "support.function",
+ regex : "(`+)(.*?[^`])(\\1)"
+ }, { // reference
+ token : ["text", "constant", "text", "url", "string", "text"],
+ regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$"
+ }, { // link by reference
+ token : ["text", "string", "text", "constant", "text"],
+ regex : "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)("+ escaped("]") + ")(\\])"
+ }, { // link by url
+ token : ["text", "string", "text", "markup.underline", "string", "text"],
+ regex : "(\\[)(" + // [
+ escaped("]") + // link text
+ ")(\\]\\()"+ // ](
+ '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href
+ '(\\s*"' + escaped('"') + '"\\s*)?' + // "title"
+ "(\\))" // )
+ }, { // strong ** __
+ token : "string.strong",
+ regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"
+ }, { // emphasis * _
+ token : "string.emphasis",
+ regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"
+ }, { //
+ token : ["text", "url", "text"],
+ regex : "(<)("+
+ "(?:https?|ftp|dict):[^'\">\\s]+"+
+ "|"+
+ "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+
+ ")(>)"
+ }],
+ "allowBlock": [
+ {token : "support.function", regex : "^ {4}.+", next : "allowBlock"},
+ {token : "empty_line", regex : '^$', next: "allowBlock"},
+ {token : "empty", regex : "", next : "start"}
+ ],
+
+ "header" : [{
+ regex: "$",
+ next : "start"
+ }, {
+ include: "basic"
+ }, {
+ defaultToken : "heading"
+ } ],
+
+ "listblock-start" : [{
+ token : "support.variable",
+ regex : /(?:\[[ x]\])?/,
+ next : "listblock"
+ }],
+
+ "listblock" : [ { // Lists only escape on completely blank lines.
+ token : "empty_line",
+ regex : "^$",
+ next : "start"
+ }, { // list
+ token : "markup.list",
+ regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
+ next : "listblock-start"
+ }, {
+ include : "basic", noEscape: true
+ }, { // Github style block
+ token : "support.function",
+ regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
+ next : "githubblock"
+ }, {
+ defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly
+ } ],
+
+ "blockquote" : [ { // Blockquotes only escape on blank lines.
+ token : "empty_line",
+ regex : "^\\s*$",
+ next : "start"
+ }, { // block quote
+ token : "string.blockquote",
+ regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
+ next : "blockquote"
+ }, {
+ include : "basic", noEscape: true
+ }, {
+ defaultToken : "string.blockquote"
+ } ],
+
+ "githubblock" : [ {
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "start"
+ }, {
+ defaultToken : "support.function"
+ } ]
+ });
+
+ this.embedRules(JavaScriptHighlightRules, "jscode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.embedRules(HtmlHighlightRules, "htmlcode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.embedRules(CssHighlightRules, "csscode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.embedRules(XmlHighlightRules, "xmlcode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.normalizeRules();
+};
+oop.inherits(MarkdownHighlightRules, TextHighlightRules);
+
+exports.MarkdownHighlightRules = MarkdownHighlightRules;
+});
+
+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-shadow|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|unquote").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(
+ ("aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|" +
+ "blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|" +
+ "chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|" +
+ "darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|" +
+ "darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|" +
+ "darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|" +
+ "darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|" +
+ "dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|" +
+ "ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|" +
+ "hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|" +
+ "lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|" +
+ "lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|" +
+ "lightsalmon|lightseagreen|lightskyblue|lightslategray|" +
+ "lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|" +
+ "magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|" +
+ "mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|" +
+ "mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|" +
+ "moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|" +
+ "orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|" +
+ "papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|" +
+ "red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|" +
+ "seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|" +
+ "springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|" +
+ "wheat|white|whitesmoke|yellow|yellowgreen").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 : ["support.function", "string", "support.function"],
+ regex : "(url\\()(.*)(\\))"
+ }, {
+ 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+"
+ }, {
+ caseInsensitive: true
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "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/mode/text_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 CssHighlightRules = require('./css_highlight_rules');
+
+var LessHighlightRules = function() {
+
+
+ var keywordList = "@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|" +
+ "@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|" +
+ "or|and|when|not";
+
+ var keywords = keywordList.split('|');
+
+ var properties = CssHighlightRules.supportType.split('|');
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.constant": CssHighlightRules.supportConstant,
+ "keyword": keywordList,
+ "support.constant.color": CssHighlightRules.supportConstantColor,
+ "support.constant.fonts": CssHighlightRules.supportConstantFonts
+ }, "identifier", true);
+
+ 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", "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", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : ["support.function", "paren.lparen", "string", "paren.rparen"],
+ regex : "(url)(\\()(.*)(\\))"
+ }, {
+ token : ["support.function", "paren.lparen"],
+ regex : "(:extend|[a-z0-9_\\-]+)(\\()"
+ }, {
+ token : function(value) {
+ if (keywords.indexOf(value.toLowerCase()) > -1)
+ return "keyword";
+ else
+ return "variable";
+ },
+ regex : "[@\\$][a-z0-9_\\-@\\$]*\\b"
+ }, {
+ token : "variable",
+ regex : "[@\\$]\\{[a-z0-9_\\-@\\$]*\\}"
+ }, {
+ token : function(first, second) {
+ if(properties.indexOf(first.toLowerCase()) > -1) {
+ return ["support.type.property", "text"];
+ }
+ else {
+ return ["support.type.unknownProperty", "text"];
+ }
+ },
+ regex : "([a-z0-9-_]+)(\\s*:)"
+ }, {
+ token : "keyword",
+ regex : "&" // special case - always treat as keyword
+ }, {
+ token : keywordMapper,
+ 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-z_][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+"
+ }, {
+ caseInsensitive: true
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ]
+ };
+ this.normalizeRules();
+};
+
+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) {
+"use strict";
+
+ 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 keywords = (
+ "this|throw|then|try|typeof|super|switch|return|break|by|continue|" +
+ "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" +
+ "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"
+ );
+
+ 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 functionRule = {
+ token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"],
+ regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source
+ };
+
+ var stringEscape = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/;
+
+ this.$rules = {
+ start : [
+ {
+ token : "constant.numeric",
+ regex : "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"
+ }, {
+ stateName: "qdoc",
+ token : "string", regex : "'''", next : [
+ {token : "string", regex : "'''", next : "start"},
+ {token : "constant.language.escape", regex : stringEscape},
+ {defaultToken: "string"}
+ ]
+ }, {
+ stateName: "qqdoc",
+ token : "string",
+ regex : '"""',
+ next : [
+ {token : "string", regex : '"""', next : "start"},
+ {token : "paren.string", regex : '#{', push : "start"},
+ {token : "constant.language.escape", regex : stringEscape},
+ {defaultToken: "string"}
+ ]
+ }, {
+ stateName: "qstring",
+ token : "string", regex : "'", next : [
+ {token : "string", regex : "'", next : "start"},
+ {token : "constant.language.escape", regex : stringEscape},
+ {defaultToken: "string"}
+ ]
+ }, {
+ stateName: "qqstring",
+ token : "string.start", regex : '"', next : [
+ {token : "string.end", regex : '"', next : "start"},
+ {token : "paren.string", regex : '#{', push : "start"},
+ {token : "constant.language.escape", regex : stringEscape},
+ {defaultToken: "string"}
+ ]
+ }, {
+ stateName: "js",
+ token : "string", regex : "`", next : [
+ {token : "string", regex : "`", next : "start"},
+ {token : "constant.language.escape", regex : stringEscape},
+ {defaultToken: "string"}
+ ]
+ }, {
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift() || "";
+ if (this.next.indexOf("string") != -1)
+ return "paren.string";
+ }
+ return "paren";
+ }
+ }, {
+ 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", "text", "identifier"],
+ regex : "(\\.)(\\s*)(" + illegal + ")"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\.{1,3}"
+ }, {
+ token : ["keyword", "text", "language.support.class",
+ "text", "keyword", "text", "language.support.class"],
+ regex : "(class)(\\s+)(" + identifier + ")(?:(\\s+)(extends)(\\s+)(" + identifier + "))?"
+ }, {
+ token : ["entity.name.function", "text", "keyword.operator", "text"].concat(functionRule.token),
+ regex : "(" + identifier + ")(\\s*)([=:])(\\s*)" + functionRule.regex
+ },
+ functionRule,
+ {
+ 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+"
+ }],
+
+
+ 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"
+ }, {
+ defaultToken : "comment"
+ }]
+ };
+ this.normalizeRules();
+ }
+
+ exports.CoffeeHighlightRules = CoffeeHighlightRules;
+});
+
+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) {
+"use strict";
+
+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-_]+)?"
+ },
+ {
+ onMatch: function(value, currentState, stack) {
+ stack.unshift(this.next, value.length - 2, currentState);
+ return "comment";
+ },
+ regex: /^\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",
+ 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": [
+ {regex: /^\s*(?:\/\/)?/, onMatch: function(value, currentState, stack) {
+ if (value.length <= stack[1]) {
+ if (value.slice(-1) == "/") {
+ stack[1] = value.length - 2;
+ this.next = "";
+ return "comment";
+ }
+ stack.shift();
+ stack.shift();
+ this.next = stack.shift();
+ return "text";
+ } else {
+ this.next = "";
+ return "comment";
+ }
+ }, next: "start"},
+ {defaultToken: "comment"}
+ ],
+ "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", "punctuation"],
+ regex: "([a-zA-Z:\\.-]+)(=)?",
+ next: "attribute_strings"
+ },
+ {
+ token: "punctuation",
+ regex: "\\)",
+ next: "start"
+ }
+ ],
+ "attribute_strings": [
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ },
+ {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ },
+ {
+ token : "string",
+ regex : '(?=\\S)',
+ next : "tag_attributes"
+ }
+ ],
+ "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/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/jade",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jade_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JadeHighlightRules = require("./jade_highlight_rules").JadeHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JadeHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.$id = "ace/mode/jade";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-java.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-java.js
new file mode 100644
index 00000000..8fac1ebd
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-java.js
@@ -0,0 +1,935 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+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) {
+"use strict";
+
+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", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\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"
+ }, {
+ defaultToken : "comment"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaHighlightRules, TextHighlightRules);
+
+exports.JavaHighlightRules = JavaHighlightRules;
+});
+
+ace.define("ace/mode/java",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/java_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptMode = require("./javascript").Mode;
+var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules;
+
+var Mode = function() {
+ JavaScriptMode.call(this);
+ this.HighlightRules = JavaHighlightRules;
+};
+oop.inherits(Mode, JavaScriptMode);
+
+(function() {
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+ this.$id = "ace/mode/java";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-javascript.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-javascript.js
new file mode 100644
index 00000000..0e4a81ac
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-javascript.js
@@ -0,0 +1,789 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-json.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-json.js
new file mode 100644
index 00000000..6be2035e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-json.js
@@ -0,0 +1,319 @@
+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() {
+ 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 : "text", // single quoted strings are not allowed
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "comment", // comments are not allowed, but who cares?
+ regex : "\\/\\/.*$"
+ }, {
+ token : "comment.start", // comments are not allowed, but who cares?
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ 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 : '"|$',
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment.end", // comments are not allowed, but who cares?
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ]
+ };
+
+};
+
+oop.inherits(JsonHighlightRules, TextHighlightRules);
+
+exports.JsonHighlightRules = JsonHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+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.HighlightRules = HighlightRules;
+ 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("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+
+ this.$id = "ace/mode/json";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-jsoniq.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-jsoniq.js
new file mode 100644
index 00000000..c533c916
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-jsoniq.js
@@ -0,0 +1,2619 @@
+ace.define("ace/mode/xquery/jsoniq_lexer",["require","exports","module"], function(require, exports, module) {
+module.exports = (function outer (modules, cache, entry) {
+ var previousRequire = typeof require == "function" && require;
+ function newRequire(name, jumped){
+ if(!cache[name]) {
+ if(!modules[name]) {
+ var currentRequire = typeof require == "function" && require;
+ if (!jumped && currentRequire) return currentRequire(name, true);
+ if (previousRequire) return previousRequire(name, true);
+ var err = new Error('Cannot find module \'' + name + '\'');
+ err.code = 'MODULE_NOT_FOUND';
+ throw err;
+ }
+ var m = cache[name] = {exports:{}};
+ modules[name][0].call(m.exports, function(x){
+ var id = modules[name][1][x];
+ return newRequire(id ? id : x);
+ },m,m.exports,outer,modules,cache,entry);
+ }
+ return cache[name].exports;
+ }
+ for(var i=0;i<entry.length;i++) newRequire(entry[i]);
+ return newRequire(entry[0]);
+})
+({"/node_modules/xqlint/lib/lexers/JSONiqTokenizer.js":[function(_dereq_,module,exports){
+ var JSONiqTokenizer = exports.JSONiqTokenizer = function JSONiqTokenizer(string, parsingEventHandler)
+ {
+ init(string, parsingEventHandler);
+ var self = this;
+
+ this.ParseException = function(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;
+ end = e;
+ eventHandler.reset(input);
+ }
+
+ this.getOffendingToken = function(e)
+ {
+ var o = e.getOffending();
+ return o >= 0 ? JSONiqTokenizer.TOKEN[o] : null;
+ };
+
+ this.getExpectedTokenSet = function(e)
+ {
+ var expected;
+ if (e.getExpected() < 0)
+ {
+ expected = JSONiqTokenizer.getTokenSet(- e.getState());
+ }
+ else
+ {
+ expected = [JSONiqTokenizer.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 = 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 || found != null ? "" : "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_start = function()
+ {
+ eventHandler.startNonterminal("start", e0);
+ lookahead1W(14); // ModuleDecl | Annotation | OptionDecl | Operator | Variable | Tag | AttrTest |
+ switch (l1)
+ {
+ case 58: // '<![CDATA['
+ shift(58); // '<![CDATA['
+ break;
+ case 57: // '<!--'
+ shift(57); // '<!--'
+ break;
+ case 59: // '<?'
+ shift(59); // '<?'
+ break;
+ case 43: // '(#'
+ shift(43); // '(#'
+ break;
+ case 45: // '(:~'
+ shift(45); // '(:~'
+ break;
+ case 44: // '(:'
+ shift(44); // '(:'
+ break;
+ case 37: // '"'
+ shift(37); // '"'
+ break;
+ case 41: // "'"
+ shift(41); // "'"
+ break;
+ case 277: // '}'
+ shift(277); // '}'
+ break;
+ case 274: // '{'
+ shift(274); // '{'
+ break;
+ case 42: // '('
+ shift(42); // '('
+ break;
+ case 46: // ')'
+ shift(46); // ')'
+ break;
+ case 52: // '/'
+ shift(52); // '/'
+ break;
+ case 65: // '['
+ shift(65); // '['
+ break;
+ case 66: // ']'
+ shift(66); // ']'
+ break;
+ case 49: // ','
+ shift(49); // ','
+ break;
+ case 51: // '.'
+ shift(51); // '.'
+ break;
+ case 56: // ';'
+ shift(56); // ';'
+ break;
+ case 54: // ':'
+ shift(54); // ':'
+ break;
+ case 36: // '!'
+ shift(36); // '!'
+ break;
+ case 276: // '|'
+ shift(276); // '|'
+ break;
+ case 40: // '$$'
+ shift(40); // '$$'
+ break;
+ case 5: // Annotation
+ shift(5); // Annotation
+ break;
+ case 4: // ModuleDecl
+ shift(4); // ModuleDecl
+ break;
+ case 6: // OptionDecl
+ shift(6); // OptionDecl
+ break;
+ case 15: // AttrTest
+ shift(15); // AttrTest
+ break;
+ case 16: // Wildcard
+ shift(16); // Wildcard
+ break;
+ case 18: // IntegerLiteral
+ shift(18); // IntegerLiteral
+ break;
+ case 19: // DecimalLiteral
+ shift(19); // DecimalLiteral
+ break;
+ case 20: // DoubleLiteral
+ shift(20); // DoubleLiteral
+ break;
+ case 8: // Variable
+ shift(8); // Variable
+ break;
+ case 9: // Tag
+ shift(9); // Tag
+ break;
+ case 7: // Operator
+ shift(7); // Operator
+ break;
+ case 35: // EOF
+ shift(35); // EOF
+ break;
+ default:
+ parse_EQName();
+ }
+ eventHandler.endNonterminal("start", e0);
+ };
+
+ this.parse_StartTag = function()
+ {
+ eventHandler.startNonterminal("StartTag", e0);
+ lookahead1W(8); // QName | S^WS | EOF | '"' | "'" | '/>' | '=' | '>'
+ switch (l1)
+ {
+ case 61: // '>'
+ shift(61); // '>'
+ break;
+ case 53: // '/>'
+ shift(53); // '/>'
+ break;
+ case 29: // QName
+ shift(29); // QName
+ break;
+ case 60: // '='
+ shift(60); // '='
+ break;
+ case 37: // '"'
+ shift(37); // '"'
+ break;
+ case 41: // "'"
+ shift(41); // "'"
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("StartTag", e0);
+ };
+
+ this.parse_TagContent = function()
+ {
+ eventHandler.startNonterminal("TagContent", e0);
+ lookahead1(11); // Tag | EndTag | PredefinedEntityRef | ElementContentChar | CharRef | EOF |
+ switch (l1)
+ {
+ case 25: // ElementContentChar
+ shift(25); // ElementContentChar
+ break;
+ case 9: // Tag
+ shift(9); // Tag
+ break;
+ case 10: // EndTag
+ shift(10); // EndTag
+ break;
+ case 58: // '<![CDATA['
+ shift(58); // '<![CDATA['
+ break;
+ case 57: // '<!--'
+ shift(57); // '<!--'
+ break;
+ case 21: // PredefinedEntityRef
+ shift(21); // PredefinedEntityRef
+ break;
+ case 31: // CharRef
+ shift(31); // CharRef
+ break;
+ case 275: // '{{'
+ shift(275); // '{{'
+ break;
+ case 278: // '}}'
+ shift(278); // '}}'
+ break;
+ case 274: // '{'
+ shift(274); // '{'
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("TagContent", e0);
+ };
+
+ this.parse_AposAttr = function()
+ {
+ eventHandler.startNonterminal("AposAttr", e0);
+ lookahead1(10); // PredefinedEntityRef | EscapeApos | AposAttrContentChar | CharRef | EOF | "'" |
+ switch (l1)
+ {
+ case 23: // EscapeApos
+ shift(23); // EscapeApos
+ break;
+ case 27: // AposAttrContentChar
+ shift(27); // AposAttrContentChar
+ break;
+ case 21: // PredefinedEntityRef
+ shift(21); // PredefinedEntityRef
+ break;
+ case 31: // CharRef
+ shift(31); // CharRef
+ break;
+ case 275: // '{{'
+ shift(275); // '{{'
+ break;
+ case 278: // '}}'
+ shift(278); // '}}'
+ break;
+ case 274: // '{'
+ shift(274); // '{'
+ break;
+ case 41: // "'"
+ shift(41); // "'"
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("AposAttr", e0);
+ };
+
+ this.parse_QuotAttr = function()
+ {
+ eventHandler.startNonterminal("QuotAttr", e0);
+ lookahead1(9); // PredefinedEntityRef | EscapeQuot | QuotAttrContentChar | CharRef | EOF | '"' |
+ switch (l1)
+ {
+ case 22: // EscapeQuot
+ shift(22); // EscapeQuot
+ break;
+ case 26: // QuotAttrContentChar
+ shift(26); // QuotAttrContentChar
+ break;
+ case 21: // PredefinedEntityRef
+ shift(21); // PredefinedEntityRef
+ break;
+ case 31: // CharRef
+ shift(31); // CharRef
+ break;
+ case 275: // '{{'
+ shift(275); // '{{'
+ break;
+ case 278: // '}}'
+ shift(278); // '}}'
+ break;
+ case 274: // '{'
+ shift(274); // '{'
+ break;
+ case 37: // '"'
+ shift(37); // '"'
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("QuotAttr", e0);
+ };
+
+ this.parse_CData = function()
+ {
+ eventHandler.startNonterminal("CData", e0);
+ lookahead1(1); // CDataSectionContents | EOF | ']]>'
+ switch (l1)
+ {
+ case 14: // CDataSectionContents
+ shift(14); // CDataSectionContents
+ break;
+ case 67: // ']]>'
+ shift(67); // ']]>'
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("CData", e0);
+ };
+
+ this.parse_XMLComment = function()
+ {
+ eventHandler.startNonterminal("XMLComment", e0);
+ lookahead1(0); // DirCommentContents | EOF | '-->'
+ switch (l1)
+ {
+ case 12: // DirCommentContents
+ shift(12); // DirCommentContents
+ break;
+ case 50: // '-->'
+ shift(50); // '-->'
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("XMLComment", e0);
+ };
+
+ this.parse_PI = function()
+ {
+ eventHandler.startNonterminal("PI", e0);
+ lookahead1(3); // DirPIContents | EOF | '?' | '?>'
+ switch (l1)
+ {
+ case 13: // DirPIContents
+ shift(13); // DirPIContents
+ break;
+ case 62: // '?'
+ shift(62); // '?'
+ break;
+ case 63: // '?>'
+ shift(63); // '?>'
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("PI", e0);
+ };
+
+ this.parse_Pragma = function()
+ {
+ eventHandler.startNonterminal("Pragma", e0);
+ lookahead1(2); // PragmaContents | EOF | '#' | '#)'
+ switch (l1)
+ {
+ case 11: // PragmaContents
+ shift(11); // PragmaContents
+ break;
+ case 38: // '#'
+ shift(38); // '#'
+ break;
+ case 39: // '#)'
+ shift(39); // '#)'
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("Pragma", e0);
+ };
+
+ this.parse_Comment = function()
+ {
+ eventHandler.startNonterminal("Comment", e0);
+ lookahead1(4); // CommentContents | EOF | '(:' | ':)'
+ switch (l1)
+ {
+ case 55: // ':)'
+ shift(55); // ':)'
+ break;
+ case 44: // '(:'
+ shift(44); // '(:'
+ break;
+ case 32: // CommentContents
+ shift(32); // CommentContents
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("Comment", e0);
+ };
+
+ this.parse_CommentDoc = function()
+ {
+ eventHandler.startNonterminal("CommentDoc", e0);
+ lookahead1(6); // DocTag | DocCommentContents | EOF | '(:' | ':)'
+ switch (l1)
+ {
+ case 33: // DocTag
+ shift(33); // DocTag
+ break;
+ case 34: // DocCommentContents
+ shift(34); // DocCommentContents
+ break;
+ case 55: // ':)'
+ shift(55); // ':)'
+ break;
+ case 44: // '(:'
+ shift(44); // '(:'
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("CommentDoc", e0);
+ };
+
+ this.parse_QuotString = function()
+ {
+ eventHandler.startNonterminal("QuotString", e0);
+ lookahead1(5); // JSONChar | JSONCharRef | JSONPredefinedCharRef | EOF | '"'
+ switch (l1)
+ {
+ case 3: // JSONPredefinedCharRef
+ shift(3); // JSONPredefinedCharRef
+ break;
+ case 2: // JSONCharRef
+ shift(2); // JSONCharRef
+ break;
+ case 1: // JSONChar
+ shift(1); // JSONChar
+ break;
+ case 37: // '"'
+ shift(37); // '"'
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("QuotString", e0);
+ };
+
+ this.parse_AposString = function()
+ {
+ eventHandler.startNonterminal("AposString", e0);
+ lookahead1(7); // PredefinedEntityRef | EscapeApos | AposChar | CharRef | EOF | "'"
+ switch (l1)
+ {
+ case 21: // PredefinedEntityRef
+ shift(21); // PredefinedEntityRef
+ break;
+ case 31: // CharRef
+ shift(31); // CharRef
+ break;
+ case 23: // EscapeApos
+ shift(23); // EscapeApos
+ break;
+ case 24: // AposChar
+ shift(24); // AposChar
+ break;
+ case 41: // "'"
+ shift(41); // "'"
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("AposString", e0);
+ };
+
+ this.parse_Prefix = function()
+ {
+ eventHandler.startNonterminal("Prefix", e0);
+ lookahead1W(13); // NCName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ whitespace();
+ parse_NCName();
+ eventHandler.endNonterminal("Prefix", e0);
+ };
+
+ this.parse__EQName = function()
+ {
+ eventHandler.startNonterminal("_EQName", e0);
+ lookahead1W(12); // EQName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ whitespace();
+ parse_EQName();
+ eventHandler.endNonterminal("_EQName", e0);
+ };
+
+ function parse_EQName()
+ {
+ eventHandler.startNonterminal("EQName", e0);
+ switch (l1)
+ {
+ case 80: // 'attribute'
+ shift(80); // 'attribute'
+ break;
+ case 94: // 'comment'
+ shift(94); // 'comment'
+ break;
+ case 118: // 'document-node'
+ shift(118); // 'document-node'
+ break;
+ case 119: // 'element'
+ shift(119); // 'element'
+ break;
+ case 122: // 'empty-sequence'
+ shift(122); // 'empty-sequence'
+ break;
+ case 143: // 'function'
+ shift(143); // 'function'
+ break;
+ case 150: // 'if'
+ shift(150); // 'if'
+ break;
+ case 163: // 'item'
+ shift(163); // 'item'
+ break;
+ case 183: // 'namespace-node'
+ shift(183); // 'namespace-node'
+ break;
+ case 189: // 'node'
+ shift(189); // 'node'
+ break;
+ case 214: // 'processing-instruction'
+ shift(214); // 'processing-instruction'
+ break;
+ case 224: // 'schema-attribute'
+ shift(224); // 'schema-attribute'
+ break;
+ case 225: // 'schema-element'
+ shift(225); // 'schema-element'
+ break;
+ case 241: // 'switch'
+ shift(241); // 'switch'
+ break;
+ case 242: // 'text'
+ shift(242); // 'text'
+ break;
+ case 251: // 'typeswitch'
+ shift(251); // 'typeswitch'
+ break;
+ default:
+ parse_FunctionName();
+ }
+ eventHandler.endNonterminal("EQName", e0);
+ }
+
+ function parse_FunctionName()
+ {
+ eventHandler.startNonterminal("FunctionName", e0);
+ switch (l1)
+ {
+ case 17: // EQName^Token
+ shift(17); // EQName^Token
+ break;
+ case 68: // 'after'
+ shift(68); // 'after'
+ break;
+ case 71: // 'ancestor'
+ shift(71); // 'ancestor'
+ break;
+ case 72: // 'ancestor-or-self'
+ shift(72); // 'ancestor-or-self'
+ break;
+ case 73: // 'and'
+ shift(73); // 'and'
+ break;
+ case 77: // 'as'
+ shift(77); // 'as'
+ break;
+ case 78: // 'ascending'
+ shift(78); // 'ascending'
+ break;
+ case 82: // 'before'
+ shift(82); // 'before'
+ break;
+ case 86: // 'case'
+ shift(86); // 'case'
+ break;
+ case 87: // 'cast'
+ shift(87); // 'cast'
+ break;
+ case 88: // 'castable'
+ shift(88); // 'castable'
+ break;
+ case 91: // 'child'
+ shift(91); // 'child'
+ break;
+ case 92: // 'collation'
+ shift(92); // 'collation'
+ break;
+ case 101: // 'copy'
+ shift(101); // 'copy'
+ break;
+ case 103: // 'count'
+ shift(103); // 'count'
+ break;
+ case 106: // 'declare'
+ shift(106); // 'declare'
+ break;
+ case 107: // 'default'
+ shift(107); // 'default'
+ break;
+ case 108: // 'delete'
+ shift(108); // 'delete'
+ break;
+ case 109: // 'descendant'
+ shift(109); // 'descendant'
+ break;
+ case 110: // 'descendant-or-self'
+ shift(110); // 'descendant-or-self'
+ break;
+ case 111: // 'descending'
+ shift(111); // 'descending'
+ break;
+ case 116: // 'div'
+ shift(116); // 'div'
+ break;
+ case 117: // 'document'
+ shift(117); // 'document'
+ break;
+ case 120: // 'else'
+ shift(120); // 'else'
+ break;
+ case 121: // 'empty'
+ shift(121); // 'empty'
+ break;
+ case 124: // 'end'
+ shift(124); // 'end'
+ break;
+ case 126: // 'eq'
+ shift(126); // 'eq'
+ break;
+ case 127: // 'every'
+ shift(127); // 'every'
+ break;
+ case 129: // 'except'
+ shift(129); // 'except'
+ break;
+ case 132: // 'first'
+ shift(132); // 'first'
+ break;
+ case 133: // 'following'
+ shift(133); // 'following'
+ break;
+ case 134: // 'following-sibling'
+ shift(134); // 'following-sibling'
+ break;
+ case 135: // 'for'
+ shift(135); // 'for'
+ break;
+ case 144: // 'ge'
+ shift(144); // 'ge'
+ break;
+ case 146: // 'group'
+ shift(146); // 'group'
+ break;
+ case 148: // 'gt'
+ shift(148); // 'gt'
+ break;
+ case 149: // 'idiv'
+ shift(149); // 'idiv'
+ break;
+ case 151: // 'import'
+ shift(151); // 'import'
+ break;
+ case 157: // 'insert'
+ shift(157); // 'insert'
+ break;
+ case 158: // 'instance'
+ shift(158); // 'instance'
+ break;
+ case 160: // 'intersect'
+ shift(160); // 'intersect'
+ break;
+ case 161: // 'into'
+ shift(161); // 'into'
+ break;
+ case 162: // 'is'
+ shift(162); // 'is'
+ break;
+ case 168: // 'last'
+ shift(168); // 'last'
+ break;
+ case 170: // 'le'
+ shift(170); // 'le'
+ break;
+ case 172: // 'let'
+ shift(172); // 'let'
+ break;
+ case 176: // 'lt'
+ shift(176); // 'lt'
+ break;
+ case 178: // 'mod'
+ shift(178); // 'mod'
+ break;
+ case 179: // 'modify'
+ shift(179); // 'modify'
+ break;
+ case 180: // 'module'
+ shift(180); // 'module'
+ break;
+ case 182: // 'namespace'
+ shift(182); // 'namespace'
+ break;
+ case 184: // 'ne'
+ shift(184); // 'ne'
+ break;
+ case 196: // 'only'
+ shift(196); // 'only'
+ break;
+ case 198: // 'or'
+ shift(198); // 'or'
+ break;
+ case 199: // 'order'
+ shift(199); // 'order'
+ break;
+ case 200: // 'ordered'
+ shift(200); // 'ordered'
+ break;
+ case 204: // 'parent'
+ shift(204); // 'parent'
+ break;
+ case 210: // 'preceding'
+ shift(210); // 'preceding'
+ break;
+ case 211: // 'preceding-sibling'
+ shift(211); // 'preceding-sibling'
+ break;
+ case 216: // 'rename'
+ shift(216); // 'rename'
+ break;
+ case 217: // 'replace'
+ shift(217); // 'replace'
+ break;
+ case 218: // 'return'
+ shift(218); // 'return'
+ break;
+ case 222: // 'satisfies'
+ shift(222); // 'satisfies'
+ break;
+ case 227: // 'self'
+ shift(227); // 'self'
+ break;
+ case 233: // 'some'
+ shift(233); // 'some'
+ break;
+ case 234: // 'stable'
+ shift(234); // 'stable'
+ break;
+ case 235: // 'start'
+ shift(235); // 'start'
+ break;
+ case 246: // 'to'
+ shift(246); // 'to'
+ break;
+ case 247: // 'treat'
+ shift(247); // 'treat'
+ break;
+ case 248: // 'try'
+ shift(248); // 'try'
+ break;
+ case 252: // 'union'
+ shift(252); // 'union'
+ break;
+ case 254: // 'unordered'
+ shift(254); // 'unordered'
+ break;
+ case 258: // 'validate'
+ shift(258); // 'validate'
+ break;
+ case 264: // 'where'
+ shift(264); // 'where'
+ break;
+ case 268: // 'with'
+ shift(268); // 'with'
+ break;
+ case 272: // 'xquery'
+ shift(272); // 'xquery'
+ break;
+ case 70: // 'allowing'
+ shift(70); // 'allowing'
+ break;
+ case 79: // 'at'
+ shift(79); // 'at'
+ break;
+ case 81: // 'base-uri'
+ shift(81); // 'base-uri'
+ break;
+ case 83: // 'boundary-space'
+ shift(83); // 'boundary-space'
+ break;
+ case 84: // 'break'
+ shift(84); // 'break'
+ break;
+ case 89: // 'catch'
+ shift(89); // 'catch'
+ break;
+ case 96: // 'construction'
+ shift(96); // 'construction'
+ break;
+ case 99: // 'context'
+ shift(99); // 'context'
+ break;
+ case 100: // 'continue'
+ shift(100); // 'continue'
+ break;
+ case 102: // 'copy-namespaces'
+ shift(102); // 'copy-namespaces'
+ break;
+ case 104: // 'decimal-format'
+ shift(104); // 'decimal-format'
+ break;
+ case 123: // 'encoding'
+ shift(123); // 'encoding'
+ break;
+ case 130: // 'exit'
+ shift(130); // 'exit'
+ break;
+ case 131: // 'external'
+ shift(131); // 'external'
+ break;
+ case 139: // 'ft-option'
+ shift(139); // 'ft-option'
+ break;
+ case 152: // 'in'
+ shift(152); // 'in'
+ break;
+ case 153: // 'index'
+ shift(153); // 'index'
+ break;
+ case 159: // 'integrity'
+ shift(159); // 'integrity'
+ break;
+ case 169: // 'lax'
+ shift(169); // 'lax'
+ break;
+ case 190: // 'nodes'
+ shift(190); // 'nodes'
+ break;
+ case 197: // 'option'
+ shift(197); // 'option'
+ break;
+ case 201: // 'ordering'
+ shift(201); // 'ordering'
+ break;
+ case 220: // 'revalidation'
+ shift(220); // 'revalidation'
+ break;
+ case 223: // 'schema'
+ shift(223); // 'schema'
+ break;
+ case 226: // 'score'
+ shift(226); // 'score'
+ break;
+ case 232: // 'sliding'
+ shift(232); // 'sliding'
+ break;
+ case 238: // 'strict'
+ shift(238); // 'strict'
+ break;
+ case 249: // 'tumbling'
+ shift(249); // 'tumbling'
+ break;
+ case 250: // 'type'
+ shift(250); // 'type'
+ break;
+ case 255: // 'updating'
+ shift(255); // 'updating'
+ break;
+ case 259: // 'value'
+ shift(259); // 'value'
+ break;
+ case 260: // 'variable'
+ shift(260); // 'variable'
+ break;
+ case 261: // 'version'
+ shift(261); // 'version'
+ break;
+ case 265: // 'while'
+ shift(265); // 'while'
+ break;
+ case 95: // 'constraint'
+ shift(95); // 'constraint'
+ break;
+ case 174: // 'loop'
+ shift(174); // 'loop'
+ break;
+ default:
+ shift(219); // 'returning'
+ }
+ eventHandler.endNonterminal("FunctionName", e0);
+ }
+
+ function parse_NCName()
+ {
+ eventHandler.startNonterminal("NCName", e0);
+ switch (l1)
+ {
+ case 28: // NCName^Token
+ shift(28); // NCName^Token
+ break;
+ case 68: // 'after'
+ shift(68); // 'after'
+ break;
+ case 73: // 'and'
+ shift(73); // 'and'
+ break;
+ case 77: // 'as'
+ shift(77); // 'as'
+ break;
+ case 78: // 'ascending'
+ shift(78); // 'ascending'
+ break;
+ case 82: // 'before'
+ shift(82); // 'before'
+ break;
+ case 86: // 'case'
+ shift(86); // 'case'
+ break;
+ case 87: // 'cast'
+ shift(87); // 'cast'
+ break;
+ case 88: // 'castable'
+ shift(88); // 'castable'
+ break;
+ case 92: // 'collation'
+ shift(92); // 'collation'
+ break;
+ case 103: // 'count'
+ shift(103); // 'count'
+ break;
+ case 107: // 'default'
+ shift(107); // 'default'
+ break;
+ case 111: // 'descending'
+ shift(111); // 'descending'
+ break;
+ case 116: // 'div'
+ shift(116); // 'div'
+ break;
+ case 120: // 'else'
+ shift(120); // 'else'
+ break;
+ case 121: // 'empty'
+ shift(121); // 'empty'
+ break;
+ case 124: // 'end'
+ shift(124); // 'end'
+ break;
+ case 126: // 'eq'
+ shift(126); // 'eq'
+ break;
+ case 129: // 'except'
+ shift(129); // 'except'
+ break;
+ case 135: // 'for'
+ shift(135); // 'for'
+ break;
+ case 144: // 'ge'
+ shift(144); // 'ge'
+ break;
+ case 146: // 'group'
+ shift(146); // 'group'
+ break;
+ case 148: // 'gt'
+ shift(148); // 'gt'
+ break;
+ case 149: // 'idiv'
+ shift(149); // 'idiv'
+ break;
+ case 158: // 'instance'
+ shift(158); // 'instance'
+ break;
+ case 160: // 'intersect'
+ shift(160); // 'intersect'
+ break;
+ case 161: // 'into'
+ shift(161); // 'into'
+ break;
+ case 162: // 'is'
+ shift(162); // 'is'
+ break;
+ case 170: // 'le'
+ shift(170); // 'le'
+ break;
+ case 172: // 'let'
+ shift(172); // 'let'
+ break;
+ case 176: // 'lt'
+ shift(176); // 'lt'
+ break;
+ case 178: // 'mod'
+ shift(178); // 'mod'
+ break;
+ case 179: // 'modify'
+ shift(179); // 'modify'
+ break;
+ case 184: // 'ne'
+ shift(184); // 'ne'
+ break;
+ case 196: // 'only'
+ shift(196); // 'only'
+ break;
+ case 198: // 'or'
+ shift(198); // 'or'
+ break;
+ case 199: // 'order'
+ shift(199); // 'order'
+ break;
+ case 218: // 'return'
+ shift(218); // 'return'
+ break;
+ case 222: // 'satisfies'
+ shift(222); // 'satisfies'
+ break;
+ case 234: // 'stable'
+ shift(234); // 'stable'
+ break;
+ case 235: // 'start'
+ shift(235); // 'start'
+ break;
+ case 246: // 'to'
+ shift(246); // 'to'
+ break;
+ case 247: // 'treat'
+ shift(247); // 'treat'
+ break;
+ case 252: // 'union'
+ shift(252); // 'union'
+ break;
+ case 264: // 'where'
+ shift(264); // 'where'
+ break;
+ case 268: // 'with'
+ shift(268); // 'with'
+ break;
+ case 71: // 'ancestor'
+ shift(71); // 'ancestor'
+ break;
+ case 72: // 'ancestor-or-self'
+ shift(72); // 'ancestor-or-self'
+ break;
+ case 80: // 'attribute'
+ shift(80); // 'attribute'
+ break;
+ case 91: // 'child'
+ shift(91); // 'child'
+ break;
+ case 94: // 'comment'
+ shift(94); // 'comment'
+ break;
+ case 101: // 'copy'
+ shift(101); // 'copy'
+ break;
+ case 106: // 'declare'
+ shift(106); // 'declare'
+ break;
+ case 108: // 'delete'
+ shift(108); // 'delete'
+ break;
+ case 109: // 'descendant'
+ shift(109); // 'descendant'
+ break;
+ case 110: // 'descendant-or-self'
+ shift(110); // 'descendant-or-self'
+ break;
+ case 117: // 'document'
+ shift(117); // 'document'
+ break;
+ case 118: // 'document-node'
+ shift(118); // 'document-node'
+ break;
+ case 119: // 'element'
+ shift(119); // 'element'
+ break;
+ case 122: // 'empty-sequence'
+ shift(122); // 'empty-sequence'
+ break;
+ case 127: // 'every'
+ shift(127); // 'every'
+ break;
+ case 132: // 'first'
+ shift(132); // 'first'
+ break;
+ case 133: // 'following'
+ shift(133); // 'following'
+ break;
+ case 134: // 'following-sibling'
+ shift(134); // 'following-sibling'
+ break;
+ case 143: // 'function'
+ shift(143); // 'function'
+ break;
+ case 150: // 'if'
+ shift(150); // 'if'
+ break;
+ case 151: // 'import'
+ shift(151); // 'import'
+ break;
+ case 157: // 'insert'
+ shift(157); // 'insert'
+ break;
+ case 163: // 'item'
+ shift(163); // 'item'
+ break;
+ case 168: // 'last'
+ shift(168); // 'last'
+ break;
+ case 180: // 'module'
+ shift(180); // 'module'
+ break;
+ case 182: // 'namespace'
+ shift(182); // 'namespace'
+ break;
+ case 183: // 'namespace-node'
+ shift(183); // 'namespace-node'
+ break;
+ case 189: // 'node'
+ shift(189); // 'node'
+ break;
+ case 200: // 'ordered'
+ shift(200); // 'ordered'
+ break;
+ case 204: // 'parent'
+ shift(204); // 'parent'
+ break;
+ case 210: // 'preceding'
+ shift(210); // 'preceding'
+ break;
+ case 211: // 'preceding-sibling'
+ shift(211); // 'preceding-sibling'
+ break;
+ case 214: // 'processing-instruction'
+ shift(214); // 'processing-instruction'
+ break;
+ case 216: // 'rename'
+ shift(216); // 'rename'
+ break;
+ case 217: // 'replace'
+ shift(217); // 'replace'
+ break;
+ case 224: // 'schema-attribute'
+ shift(224); // 'schema-attribute'
+ break;
+ case 225: // 'schema-element'
+ shift(225); // 'schema-element'
+ break;
+ case 227: // 'self'
+ shift(227); // 'self'
+ break;
+ case 233: // 'some'
+ shift(233); // 'some'
+ break;
+ case 241: // 'switch'
+ shift(241); // 'switch'
+ break;
+ case 242: // 'text'
+ shift(242); // 'text'
+ break;
+ case 248: // 'try'
+ shift(248); // 'try'
+ break;
+ case 251: // 'typeswitch'
+ shift(251); // 'typeswitch'
+ break;
+ case 254: // 'unordered'
+ shift(254); // 'unordered'
+ break;
+ case 258: // 'validate'
+ shift(258); // 'validate'
+ break;
+ case 260: // 'variable'
+ shift(260); // 'variable'
+ break;
+ case 272: // 'xquery'
+ shift(272); // 'xquery'
+ break;
+ case 70: // 'allowing'
+ shift(70); // 'allowing'
+ break;
+ case 79: // 'at'
+ shift(79); // 'at'
+ break;
+ case 81: // 'base-uri'
+ shift(81); // 'base-uri'
+ break;
+ case 83: // 'boundary-space'
+ shift(83); // 'boundary-space'
+ break;
+ case 84: // 'break'
+ shift(84); // 'break'
+ break;
+ case 89: // 'catch'
+ shift(89); // 'catch'
+ break;
+ case 96: // 'construction'
+ shift(96); // 'construction'
+ break;
+ case 99: // 'context'
+ shift(99); // 'context'
+ break;
+ case 100: // 'continue'
+ shift(100); // 'continue'
+ break;
+ case 102: // 'copy-namespaces'
+ shift(102); // 'copy-namespaces'
+ break;
+ case 104: // 'decimal-format'
+ shift(104); // 'decimal-format'
+ break;
+ case 123: // 'encoding'
+ shift(123); // 'encoding'
+ break;
+ case 130: // 'exit'
+ shift(130); // 'exit'
+ break;
+ case 131: // 'external'
+ shift(131); // 'external'
+ break;
+ case 139: // 'ft-option'
+ shift(139); // 'ft-option'
+ break;
+ case 152: // 'in'
+ shift(152); // 'in'
+ break;
+ case 153: // 'index'
+ shift(153); // 'index'
+ break;
+ case 159: // 'integrity'
+ shift(159); // 'integrity'
+ break;
+ case 169: // 'lax'
+ shift(169); // 'lax'
+ break;
+ case 190: // 'nodes'
+ shift(190); // 'nodes'
+ break;
+ case 197: // 'option'
+ shift(197); // 'option'
+ break;
+ case 201: // 'ordering'
+ shift(201); // 'ordering'
+ break;
+ case 220: // 'revalidation'
+ shift(220); // 'revalidation'
+ break;
+ case 223: // 'schema'
+ shift(223); // 'schema'
+ break;
+ case 226: // 'score'
+ shift(226); // 'score'
+ break;
+ case 232: // 'sliding'
+ shift(232); // 'sliding'
+ break;
+ case 238: // 'strict'
+ shift(238); // 'strict'
+ break;
+ case 249: // 'tumbling'
+ shift(249); // 'tumbling'
+ break;
+ case 250: // 'type'
+ shift(250); // 'type'
+ break;
+ case 255: // 'updating'
+ shift(255); // 'updating'
+ break;
+ case 259: // 'value'
+ shift(259); // 'value'
+ break;
+ case 261: // 'version'
+ shift(261); // 'version'
+ break;
+ case 265: // 'while'
+ shift(265); // 'while'
+ break;
+ case 95: // 'constraint'
+ shift(95); // 'constraint'
+ break;
+ case 174: // 'loop'
+ shift(174); // 'loop'
+ break;
+ default:
+ shift(219); // 'returning'
+ }
+ eventHandler.endNonterminal("NCName", e0);
+ }
+
+ function shift(t)
+ {
+ if (l1 == t)
+ {
+ whitespace();
+ eventHandler.terminal(JSONiqTokenizer.TOKEN[l1], b1, e1 > size ? size : e1);
+ b0 = b1; e0 = e1; l1 = 0;
+ }
+ else
+ {
+ error(b1, e1, 0, l1, t);
+ }
+ }
+
+ function whitespace()
+ {
+ if (e0 != b1)
+ {
+ b0 = e0;
+ e0 = b1;
+ eventHandler.whitespace(b0, e0);
+ }
+ }
+
+ function matchW(set)
+ {
+ var code;
+ for (;;)
+ {
+ code = match(set);
+ if (code != 30) // S^WS
+ {
+ break;
+ }
+ }
+ return code;
+ }
+
+ function lookahead1W(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = matchW(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function lookahead1(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = match(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function error(b, e, s, l, t)
+ {
+ throw new self.ParseException(b, e, s, l, t);
+ }
+
+ var lk, b0, e0;
+ var l1, b1, e1;
+ var eventHandler;
+
+ var input;
+ var size;
+ var begin;
+ var end;
+
+ function match(tokenSetId)
+ {
+ var nonbmp = false;
+ begin = end;
+ var current = end;
+ var result = JSONiqTokenizer.INITIAL[tokenSetId];
+ var state = 0;
+
+ for (var code = result & 4095; code != 0; )
+ {
+ var charclass;
+ var c0 = current < size ? input.charCodeAt(current) : 0;
+ ++current;
+ if (c0 < 0x80)
+ {
+ charclass = JSONiqTokenizer.MAP0[c0];
+ }
+ else if (c0 < 0xd800)
+ {
+ var c1 = c0 >> 4;
+ charclass = JSONiqTokenizer.MAP1[(c0 & 15) + JSONiqTokenizer.MAP1[(c1 & 31) + JSONiqTokenizer.MAP1[c1 >> 5]]];
+ }
+ 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 (JSONiqTokenizer.MAP2[m] > c0) hi = m - 1;
+ else if (JSONiqTokenizer.MAP2[6 + m] < c0) lo = m + 1;
+ else {charclass = JSONiqTokenizer.MAP2[12 + m]; break;}
+ if (lo > hi) {charclass = 0; break;}
+ }
+ }
+
+ state = code;
+ var i0 = (charclass << 12) + code - 1;
+ code = JSONiqTokenizer.TRANSITION[(i0 & 15) + JSONiqTokenizer.TRANSITION[i0 >> 4]];
+
+ 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;
+ return 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;
+ }
+}
+
+JSONiqTokenizer.getTokenSet = function(tokenSetId)
+{
+ var set = [];
+ var s = tokenSetId < 0 ? - tokenSetId : INITIAL[tokenSetId] & 4095;
+ for (var i = 0; i < 279; i += 32)
+ {
+ var j = i;
+ var i0 = (i >> 5) * 2066 + s - 1;
+ var i1 = i0 >> 2;
+ var i2 = i1 >> 2;
+ var f = JSONiqTokenizer.EXPECTED[(i0 & 3) + JSONiqTokenizer.EXPECTED[(i1 & 3) + JSONiqTokenizer.EXPECTED[(i2 & 3) + JSONiqTokenizer.EXPECTED[i2 >> 2]]]];
+ for ( ; f != 0; f >>>= 1, ++j)
+ {
+ if ((f & 1) != 0)
+ {
+ set.push(JSONiqTokenizer.TOKEN[j]);
+ }
+ }
+ }
+ return set;
+};
+
+JSONiqTokenizer.MAP0 =
+[ 67, 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, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 37, 31, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 31, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 31, 62, 63, 64, 65, 37
+];
+
+JSONiqTokenizer.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, 347, 363, 379, 416, 416, 416, 408, 331, 323, 331, 323, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 433, 433, 433, 433, 433, 433, 433, 316, 331, 331, 331, 331, 331, 331, 331, 331, 394, 416, 416, 417, 415, 416, 416, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 330, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 67, 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, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 37, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 37, 31, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 31, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 31, 62, 63, 64, 65, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 31, 31, 37, 37, 37, 37, 37, 37, 37, 66, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66
+];
+
+JSONiqTokenizer.MAP2 =
+[ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 37, 31, 37, 31, 31, 37
+];
+
+JSONiqTokenizer.INITIAL =
+[ 1, 2, 49155, 57348, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
+];
+
+JSONiqTokenizer.TRANSITION =
+[ 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 17408, 19288, 17439, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22126, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17672, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19469, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 36919, 18234, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18419, 18432, 18304, 18448, 18485, 18523, 18553, 18583, 18599, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 18825, 18841, 18871, 18906, 18944, 18960, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19074, 36169, 17439, 36866, 17466, 36890, 36866, 22314, 19105, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22126, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17672, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19469, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 36919, 18234, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18419, 18432, 18304, 18448, 18485, 18523, 18553, 18583, 18599, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 18825, 18841, 18871, 18906, 18944, 18960, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22182, 19288, 19121, 36866, 17466, 18345, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19273, 19552, 19304, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19332, 17423, 19363, 36866, 17466, 17537, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 18614, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 19391, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 19427, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36154, 19288, 19457, 36866, 17466, 17740, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22780, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22375, 22197, 18469, 36866, 17466, 36890, 36866, 21991, 24018, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 21331, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 19485, 19501, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19537, 22390, 19568, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19596, 19611, 19457, 36866, 17466, 36890, 36866, 18246, 19627, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22242, 20553, 19457, 36866, 17466, 36890, 36866, 18648, 30477, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36472, 19288, 19457, 36866, 17466, 17809, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 21770, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 19643, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 19672, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 20538, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 17975, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22345, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19726, 19742, 21529, 24035, 23112, 26225, 23511, 27749, 27397, 24035, 34360, 24035, 24036, 23114, 35166, 23114, 23114, 19758, 23511, 35247, 23511, 23511, 28447, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 19821, 23511, 23511, 23511, 23511, 23512, 19441, 36539, 24035, 24035, 24035, 24035, 19846, 19869, 23114, 23114, 23114, 28618, 32187, 19892, 23511, 23511, 23511, 34585, 20402, 36647, 24035, 24035, 24036, 23114, 33757, 23114, 23114, 23029, 20271, 23511, 27070, 23511, 23511, 30562, 24035, 24035, 29274, 26576, 23114, 23114, 31118, 23036, 29695, 23511, 23511, 32431, 23634, 30821, 24035, 23110, 19913, 23114, 23467, 31261, 23261, 34299, 19932, 24035, 32609, 19965, 35389, 19984, 27689, 19830, 29391, 29337, 20041, 22643, 35619, 33728, 20062, 20121, 20166, 35100, 26145, 20211, 23008, 19876, 20208, 20227, 25670, 20132, 26578, 27685, 20141, 20243, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36094, 19288, 19457, 36866, 17466, 21724, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22735, 19552, 20287, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22750, 19288, 21529, 24035, 23112, 28056, 23511, 29483, 28756, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 20327, 23511, 23511, 23511, 23511, 31156, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 20371, 23511, 23511, 23511, 23511, 27443, 20395, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 29457, 29700, 23511, 23511, 23511, 23511, 33444, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 28350, 20421, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 20447, 20475, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 20523, 22257, 20569, 20783, 21715, 17603, 20699, 20837, 20614, 20630, 21149, 20670, 21405, 17486, 17509, 17525, 18373, 19179, 20695, 20716, 20732, 20755, 19194, 18042, 21641, 20592, 20779, 20598, 21412, 17470, 17591, 20896, 17468, 17619, 20799, 20700, 21031, 20744, 20699, 20828, 18075, 21259, 20581, 20853, 18048, 20868, 20884, 17756, 17784, 17800, 17825, 17854, 21171, 21200, 20931, 20947, 21378, 20955, 20971, 18086, 20645, 21002, 20986, 18178, 17960, 18012, 18381, 18064, 29176, 21044, 21438, 21018, 21122, 21393, 21060, 21844, 21094, 20654, 17493, 18150, 18166, 18214, 25967, 20763, 21799, 21110, 21830, 21138, 21246, 21301, 18336, 18361, 21165, 21187, 20812, 21216, 21232, 21287, 21317, 18553, 21347, 21363, 21428, 21454, 21271, 21483, 21499, 21515, 21575, 21467, 18712, 21591, 21633, 21078, 18189, 18198, 20679, 21657, 21701, 21074, 21687, 21740, 21756, 21786, 21815, 21860, 21876, 21892, 21946, 21962, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36457, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 36813, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 21981, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 22151, 22007, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 27898, 17884, 18890, 17906, 17928, 22042, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 22070, 22112, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 22142, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36109, 19288, 18469, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22167, 19288, 19457, 36866, 17466, 17768, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22227, 36487, 22273, 36866, 17466, 36890, 36866, 19316, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18749, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 22304, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19580, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22330, 19089, 19457, 36866, 17466, 18721, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22765, 19347, 19457, 36866, 17466, 36890, 36866, 18114, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34541, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 22540, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29908, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22561, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 23837, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22584, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36442, 19288, 21605, 24035, 23112, 28137, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 31568, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22690, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 27584, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 22659, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22360, 19552, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22675, 22811, 19457, 36866, 17466, 36890, 36866, 19133, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22827, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36064, 19288, 22865, 22881, 32031, 22897, 22913, 22956, 29939, 24035, 24035, 24035, 23003, 23114, 23114, 23114, 23024, 22420, 23511, 23511, 23511, 23052, 29116, 23073, 29268, 24035, 25563, 26915, 23106, 23131, 23114, 23114, 23159, 23181, 23197, 23248, 23511, 23511, 23282, 23305, 22493, 32364, 24035, 33472, 30138, 26325, 31770, 33508, 27345, 33667, 23114, 23321, 23473, 23351, 35793, 36576, 23511, 23375, 22500, 24145, 24035, 29197, 20192, 24533, 23440, 23114, 19017, 23459, 22839, 23489, 23510, 23511, 33563, 23528, 32076, 25389, 24035, 26576, 23561, 23583, 23114, 32683, 22516, 23622, 23655, 23511, 23634, 35456, 37144, 23110, 23683, 34153, 20499, 32513, 25824, 23705, 24035, 24035, 23111, 23114, 19874, 27078, 33263, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 20507, 32241, 20150, 31862, 27464, 35108, 23727, 23007, 35895, 34953, 26578, 27685, 20141, 24569, 31691, 19787, 33967, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36427, 19552, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 27027, 26576, 23114, 23114, 23114, 31471, 23756, 22468, 23511, 23511, 23511, 34687, 23772, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 23788, 24035, 24035, 24035, 21559, 23828, 23114, 23114, 23114, 25086, 22839, 23853, 23511, 23511, 23511, 23876, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 31761, 23909, 23953, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36049, 19288, 21605, 30825, 23112, 23987, 23511, 24003, 31001, 27617, 24034, 24035, 24036, 24052, 24089, 23114, 23114, 22420, 24109, 24168, 23511, 23511, 29116, 24188, 27609, 20017, 29516, 24035, 26576, 24222, 19968, 23114, 24252, 33811, 22468, 24270, 33587, 23511, 24320, 27443, 22493, 24035, 24035, 24035, 24035, 24339, 23113, 23114, 23114, 23114, 28128, 28618, 29700, 23511, 23511, 23511, 28276, 34564, 20402, 24035, 24035, 32929, 24036, 23114, 23114, 23114, 24357, 23029, 22839, 23511, 23511, 23511, 24377, 25645, 24035, 34112, 24035, 26576, 23114, 26643, 23114, 32683, 22516, 23511, 25638, 23511, 23711, 24035, 24395, 27809, 23114, 24414, 20499, 24432, 30917, 23628, 24035, 30680, 23111, 23114, 30233, 27078, 25748, 24452, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 24475, 19829, 26577, 26597, 26154, 24519, 24556, 24596, 23007, 20046, 20132, 26578, 24634, 20141, 24569, 31691, 24679, 24727, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36412, 19288, 21605, 19943, 34861, 32618, 26027, 29483, 32016, 32050, 36233, 24776, 35574, 24801, 24819, 32671, 31289, 22420, 24868, 24886, 20087, 26849, 29116, 19803, 24035, 24035, 24035, 36228, 26576, 23114, 23114, 23114, 24981, 33811, 22468, 23511, 23511, 23511, 29028, 27443, 22493, 24923, 27965, 24035, 24035, 32797, 24946, 23443, 23114, 23114, 29636, 24997, 22849, 28252, 23511, 23511, 23511, 25042, 25110, 24035, 24035, 34085, 24036, 25133, 23114, 23114, 25152, 23029, 22839, 25169, 23511, 36764, 23511, 25645, 30403, 24035, 25186, 26576, 31806, 24093, 25212, 32683, 22516, 32713, 26245, 34293, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 32406, 23111, 23114, 28676, 30944, 27689, 25234, 24035, 23112, 19872, 37063, 23266, 24036, 23114, 30243, 20379, 26100, 29218, 20211, 30105, 25257, 25284, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 24834, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36034, 19288, 21671, 25314, 25072, 25330, 25346, 25362, 29939, 29951, 35288, 29984, 23812, 27216, 25405, 25424, 30456, 22584, 26292, 25461, 25480, 31592, 29116, 25516, 34963, 25545, 27007, 25579, 33937, 25614, 25661, 25686, 34872, 25702, 25718, 25734, 25769, 25795, 25811, 25840, 22493, 26533, 25856, 24035, 25876, 30763, 27481, 25909, 23114, 28987, 25936, 25954, 29700, 25983, 23511, 31412, 26043, 26063, 22568, 29241, 29592, 26116, 31216, 35383, 26170, 34783, 26194, 26221, 22839, 26241, 26261, 22477, 26283, 26308, 27306, 31035, 24655, 26576, 29854, 33386, 26341, 32683, 22516, 32153, 30926, 26361, 19996, 26381, 35463, 26397, 26424, 34646, 26478, 35605, 31386, 26494, 35567, 31964, 22940, 23689, 25218, 30309, 32289, 19830, 33605, 23112, 32109, 27733, 27084, 24496, 35886, 35221, 26525, 36602, 26549, 26558, 26574, 26594, 26613, 26629, 26666, 26700, 26578, 27685, 23740, 24285, 31691, 26733, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36397, 19552, 18991, 25887, 28117, 32618, 26776, 29483, 29939, 26802, 24035, 24035, 24036, 28664, 23114, 23114, 23114, 22420, 30297, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 25559, 26576, 23114, 23114, 23114, 30525, 33811, 22468, 23511, 23511, 23511, 28725, 27443, 22493, 24035, 24035, 27249, 24035, 24035, 23113, 23114, 23114, 26827, 23114, 28618, 29700, 23511, 23511, 26845, 23511, 34564, 20402, 24035, 24035, 26979, 24036, 23114, 23114, 23114, 24974, 23029, 22839, 23511, 23511, 23511, 26865, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 33305, 24035, 25598, 23114, 19874, 34253, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 26886, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 26931, 24569, 26439, 26947, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36019, 19288, 26995, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 27043, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 27061, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 29978, 24035, 24035, 23113, 23114, 33114, 23114, 23114, 30010, 29700, 23511, 35913, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 27155, 26576, 23114, 23114, 30447, 23036, 29695, 23511, 23511, 30935, 20099, 24152, 25529, 27100, 34461, 27121, 22625, 29156, 26009, 27137, 30422, 31903, 31655, 28870, 27171, 32439, 31731, 19830, 27232, 22612, 27265, 26786, 25494, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 20342, 27288, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 27322, 27339, 28020, 27361, 27382, 29939, 24035, 24035, 32581, 24036, 23114, 23114, 23114, 27425, 22420, 23511, 23511, 23511, 27442, 28306, 19803, 24035, 24035, 24035, 24035, 26710, 23114, 23114, 23114, 23114, 32261, 22468, 23511, 23511, 23511, 23511, 35719, 24694, 29510, 24035, 24035, 24035, 24035, 26717, 23114, 23114, 23114, 23114, 28618, 32217, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 27459, 23114, 23114, 23114, 36252, 23029, 20271, 23511, 23511, 23511, 28840, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 27480, 34483, 28401, 29761, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36382, 19288, 21605, 27497, 27517, 28504, 28898, 27569, 29939, 29401, 27600, 27323, 27633, 19025, 27662, 23114, 27705, 22420, 20483, 27721, 23511, 27765, 28306, 19803, 23540, 24035, 24610, 27781, 27805, 26650, 23114, 28573, 32990, 25920, 22468, 26870, 23511, 26684, 34262, 34737, 25057, 34622, 24035, 24035, 23971, 24206, 27825, 27847, 23114, 23114, 27865, 27885, 35766, 27914, 23511, 23511, 32766, 32844, 27934, 28795, 26909, 27955, 26092, 27988, 25445, 28005, 28036, 28052, 21965, 23511, 32196, 19897, 28072, 28102, 36534, 21541, 23801, 28153, 28180, 28197, 28221, 23036, 32695, 28251, 28268, 28292, 23667, 34825, 23930, 24580, 28322, 28344, 31627, 28366, 25996, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 35625, 33477, 33359, 27674, 28393, 33992, 24036, 23114, 30243, 19829, 28417, 28433, 28463, 23008, 19876, 20208, 23007, 20046, 20132, 28489, 28520, 20141, 24569, 31691, 19787, 28550, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 28589, 24035, 24035, 24035, 24035, 28608, 23114, 23114, 23114, 23114, 28618, 20431, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36004, 19288, 28634, 31951, 28565, 28702, 28718, 28741, 32544, 20175, 28792, 32086, 20105, 28811, 29059, 29862, 28856, 22420, 28886, 30354, 23359, 28922, 28306, 28952, 23888, 26320, 36506, 24035, 29331, 28968, 36609, 23114, 29003, 31661, 27061, 30649, 27366, 23511, 29023, 27918, 24694, 24035, 24035, 23893, 33094, 30867, 23113, 23114, 23114, 29044, 34184, 30010, 29700, 23511, 23511, 29081, 29102, 34585, 20402, 27789, 24035, 24035, 24036, 23114, 29132, 23114, 23114, 23029, 20271, 23511, 29153, 23511, 23511, 30562, 30174, 24035, 24035, 27409, 25438, 23114, 23114, 29172, 36668, 31332, 23511, 23511, 29192, 30144, 24035, 23110, 30203, 23114, 23467, 31544, 23261, 23628, 24035, 22545, 23111, 23114, 29213, 27078, 27689, 29234, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 29257, 23008, 19876, 20208, 28768, 29290, 29320, 34776, 29353, 20141, 22435, 29378, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36367, 19288, 21605, 34616, 19006, 32618, 31497, 31507, 36216, 20184, 24035, 34393, 29424, 34668, 23114, 34900, 29447, 22420, 30360, 23511, 37089, 29473, 28306, 19803, 29499, 24398, 24035, 24035, 26576, 31799, 29532, 29550, 23114, 33811, 22468, 32298, 29571, 31184, 23511, 23512, 37127, 36628, 29589, 24035, 24135, 24035, 23113, 29608, 23114, 27831, 29634, 28618, 29652, 30037, 23511, 24172, 29671, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 29555, 29690, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 29719, 24035, 23110, 29738, 23114, 23467, 34035, 29756, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 29777, 34364, 28181, 30243, 29799, 31920, 27272, 27185, 23008, 31126, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29828, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35989, 19552, 19687, 35139, 28649, 29878, 29894, 29924, 29939, 23224, 23085, 31969, 24036, 35173, 24752, 24803, 23114, 22420, 31190, 30318, 24870, 23511, 28306, 29967, 23967, 24035, 24035, 24035, 26576, 30000, 23114, 23114, 23114, 33811, 22468, 30026, 23511, 23511, 23511, 23512, 26078, 24035, 24035, 24035, 30053, 37137, 30071, 23114, 23114, 33368, 25136, 28618, 30723, 23511, 23511, 37096, 31356, 34585, 20402, 30092, 30127, 30160, 24036, 35740, 30219, 24960, 30259, 23029, 20271, 34042, 30285, 30342, 30376, 23289, 30055, 30400, 30419, 30438, 32640, 33532, 33514, 30472, 18792, 26267, 24323, 23057, 30493, 23639, 20008, 30196, 33188, 30517, 20075, 23511, 30541, 23628, 30578, 33928, 28776, 30594, 19874, 30610, 30637, 19830, 30677, 27646, 19872, 25779, 23266, 23232, 35016, 30243, 30696, 29812, 30712, 30746, 27206, 30779, 30807, 23007, 33395, 20132, 26578, 27685, 31703, 22928, 31691, 19787, 31079, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36352, 19288, 23335, 30841, 26131, 30888, 30904, 30986, 29939, 24035, 24704, 31017, 20025, 23114, 26178, 31051, 31095, 22420, 23511, 22524, 31142, 31172, 28534, 31206, 35497, 25196, 24035, 28592, 24503, 23114, 31239, 31285, 23114, 31305, 31321, 31355, 31372, 31407, 23511, 30556, 24694, 24035, 27501, 19805, 24035, 24035, 23113, 23114, 31428, 24066, 23114, 28618, 29700, 23511, 31837, 18809, 23511, 34585, 31448, 24035, 24035, 24035, 23090, 23114, 23114, 23114, 23114, 31619, 35038, 23511, 23511, 23511, 23511, 33714, 24035, 33085, 24035, 29431, 23114, 31467, 23114, 23143, 31487, 23511, 31523, 23511, 35195, 36783, 24035, 30111, 23567, 23114, 23467, 31543, 31560, 23628, 24035, 24035, 23111, 23114, 19874, 30953, 31584, 34508, 24035, 31608, 26345, 37055, 23266, 31643, 31677, 31719, 31747, 31786, 31822, 26898, 23008, 19876, 31859, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 31878, 31936, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35974, 19288, 21605, 27972, 35663, 31985, 29655, 32001, 36715, 24785, 25893, 23545, 31912, 19853, 19916, 25938, 24540, 22420, 31843, 29674, 29573, 32735, 28936, 19803, 24035, 24035, 32047, 24035, 26576, 23114, 23114, 27544, 23114, 33811, 22468, 23511, 23511, 32161, 23511, 23512, 32066, 24035, 33313, 24035, 24035, 24035, 23113, 27426, 32102, 23114, 23114, 28618, 32125, 23511, 32144, 23511, 23511, 33569, 20402, 24035, 27045, 24035, 24036, 23114, 23114, 28328, 23114, 30076, 32177, 23511, 23511, 30384, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23595, 32212, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 22635, 25753, 32233, 32257, 32277, 19829, 26577, 26597, 20211, 23008, 19876, 32322, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 32352, 35285, 32380, 34196, 33016, 30661, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 32404, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 32422, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 30269, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 19949, 24035, 23111, 32455, 19874, 31269, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36337, 19552, 19209, 21617, 26509, 32475, 32491, 32529, 29939, 24035, 32578, 25241, 32597, 23114, 32634, 29007, 32656, 22420, 23511, 32729, 26365, 32751, 28306, 32788, 32882, 24035, 24035, 32813, 36727, 23114, 33182, 23114, 27553, 33235, 32829, 23511, 32706, 23511, 28906, 28377, 26962, 32881, 32904, 32898, 32920, 24035, 32953, 23114, 32977, 26408, 23114, 28164, 33006, 23511, 33039, 35774, 23511, 32306, 20402, 33076, 30872, 24035, 24036, 25408, 33110, 28979, 23114, 23029, 20271, 35835, 33130, 33054, 23511, 30562, 33148, 24035, 24035, 33167, 23114, 23114, 33775, 23036, 20459, 23511, 23511, 25464, 24646, 24035, 24035, 22446, 23114, 23114, 25627, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 31391, 33204, 33220, 33251, 33287, 26577, 26597, 20211, 33329, 19876, 33345, 23007, 20046, 20132, 26578, 27685, 28473, 22599, 31691, 33411, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35959, 19288, 21907, 27243, 29843, 32618, 33427, 31507, 29939, 33460, 34090, 24035, 24036, 33493, 24416, 33530, 23114, 22420, 33548, 24379, 33585, 23511, 28306, 19803, 33603, 24202, 24035, 24035, 25593, 33749, 28205, 23114, 23114, 32388, 22468, 33853, 33060, 23511, 23511, 31339, 33621, 24035, 24035, 34397, 24618, 30757, 33663, 23114, 23114, 33683, 35684, 28618, 26678, 23511, 23511, 32506, 33699, 34585, 20402, 24035, 32562, 26973, 24036, 23114, 23114, 33377, 33773, 23029, 20271, 23511, 23511, 30621, 23511, 23860, 24035, 33791, 21553, 26576, 36558, 23114, 33809, 23036, 32857, 26047, 23511, 33827, 23634, 24035, 24035, 23110, 23114, 23114, 31252, 23511, 33845, 23628, 24035, 24459, 23111, 23114, 33869, 27078, 30791, 29783, 24035, 24742, 19872, 33895, 23266, 26462, 19710, 33879, 33919, 26577, 26597, 24123, 24930, 21930, 20208, 30501, 33953, 25268, 20252, 33983, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36322, 19552, 23390, 33634, 35154, 34008, 34024, 34058, 35544, 34106, 34128, 26811, 33151, 34144, 34169, 34212, 23114, 34228, 34244, 34278, 34315, 23511, 34331, 34347, 34380, 34413, 24035, 24663, 26576, 34429, 34453, 34477, 29534, 33811, 22468, 34499, 34524, 34557, 25170, 34580, 35436, 23937, 34601, 24035, 24341, 26453, 23113, 34638, 34662, 23114, 24236, 28618, 34684, 34703, 34729, 23511, 35352, 34753, 34799, 24035, 34815, 32558, 34848, 34888, 35814, 34923, 23165, 29137, 23606, 30326, 30730, 34939, 33023, 30562, 36848, 34979, 24035, 24847, 34996, 23114, 23114, 35032, 29695, 35054, 23511, 23511, 35091, 33296, 35124, 24296, 28235, 24361, 36276, 32772, 35067, 35189, 27301, 30855, 24852, 22452, 35211, 35237, 35316, 25500, 35270, 23405, 24304, 35304, 29362, 24036, 23114, 35332, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 35368, 28823, 23920, 32336, 35405, 20141, 24569, 31691, 35421, 35479, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35944, 22795, 21605, 33647, 35877, 35513, 30962, 35529, 34073, 35557, 24035, 24035, 20405, 31107, 23114, 23114, 23114, 35590, 34713, 23511, 23511, 23511, 35641, 19803, 29408, 32937, 25298, 24035, 35657, 23115, 27849, 24760, 35679, 26205, 22468, 23511, 35700, 24907, 24901, 35075, 31893, 34980, 24035, 24035, 24035, 24035, 23113, 35009, 23114, 23114, 23114, 28618, 35716, 30970, 23511, 23511, 23511, 34585, 23215, 24035, 24035, 24035, 24036, 35735, 23114, 23114, 23114, 27105, 35756, 35790, 23511, 23511, 23511, 35254, 35446, 24035, 24035, 31223, 35809, 23114, 23114, 23036, 36825, 35830, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 31031, 20355, 19872, 33903, 23266, 24036, 23114, 28686, 19829, 26577, 26597, 20211, 23008, 23424, 20208, 24711, 31065, 24486, 26578, 27685, 20141, 19773, 35851, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36307, 19288, 21605, 35494, 19702, 32618, 33437, 31507, 29939, 25117, 24035, 27939, 24036, 27869, 23114, 26829, 23114, 22420, 23494, 23511, 33132, 23511, 28306, 19803, 24035, 34832, 24035, 24035, 26576, 23114, 25153, 23114, 23114, 33811, 22468, 23511, 23511, 35911, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35929, 19288, 21605, 25860, 23112, 36185, 23511, 36201, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 26748, 24035, 24035, 24035, 24035, 24035, 36249, 23114, 23114, 23114, 23114, 28618, 28835, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 27151, 24035, 26760, 23114, 27989, 23114, 23114, 36268, 20271, 23511, 24436, 23511, 29703, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36292, 19288, 21605, 36503, 21922, 32618, 34534, 31507, 36522, 24035, 33793, 24035, 35864, 23114, 23114, 36555, 23417, 22420, 23511, 23511, 36574, 26020, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 36592, 24035, 24035, 36625, 24035, 24035, 23113, 23114, 32961, 23114, 23114, 29618, 29700, 23511, 29086, 23511, 23511, 34585, 20402, 36644, 24035, 24035, 24036, 29740, 23114, 23114, 23114, 29065, 36663, 31527, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 31451, 23112, 36684, 23511, 36700, 29939, 24035, 24035, 24035, 30185, 23114, 23114, 23114, 27526, 22420, 23511, 23511, 23511, 32865, 28306, 19803, 36743, 24035, 27017, 24035, 26576, 27535, 23114, 31432, 23114, 33811, 22468, 33271, 23511, 32128, 23511, 23512, 24694, 24035, 27196, 24035, 24035, 24035, 23113, 32459, 23114, 23114, 23114, 28618, 29700, 33829, 36762, 23511, 23511, 34585, 20402, 24035, 36746, 24035, 29722, 23114, 23114, 34437, 23114, 34907, 20271, 23511, 23511, 18801, 23511, 23206, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 36837, 24035, 24035, 33739, 23114, 23114, 25094, 23511, 23261, 23628, 24035, 36780, 23111, 24073, 19874, 27078, 35344, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22720, 19288, 36799, 36866, 17466, 36890, 36864, 21991, 22211, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 17631, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36883, 36906, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22705, 19288, 19457, 36866, 17466, 36890, 36866, 19375, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36124, 19288, 36951, 36866, 17466, 36890, 36866, 21991, 22404, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18567, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36979, 36995, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18027, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 21529, 24035, 23112, 23033, 23511, 31507, 25377, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 37040, 23511, 23511, 23511, 23511, 28086, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 37079, 23511, 23511, 23511, 23511, 23512, 34766, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 37112, 37160, 18469, 36866, 17466, 36890, 36866, 17656, 37174, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18537, 22984, 17553, 17572, 22285, 18780, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36883, 36906, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 127011, 110630, 114730, 106539, 127011, 127011, 127011, 53264, 18, 18, 0, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 0, 0, 127011, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 3002368, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2576384, 2215936, 2215936, 2215936, 2416640, 2424832, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2543616, 2215936, 2215936, 2215936, 2215936, 2215936, 2629632, 2215936, 2617344, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2691072, 2215936, 2707456, 2215936, 2715648, 2215936, 2723840, 2764800, 2215936, 2215936, 2797568, 2215936, 2822144, 2215936, 2215936, 2854912, 2215936, 2215936, 2215936, 2912256, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 180224, 0, 0, 2174976, 0, 0, 2170880, 2617344, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2691072, 2170880, 2707456, 2170880, 2715648, 2170880, 2723840, 2764800, 2170880, 2170880, 2797568, 2170880, 2170880, 2797568, 2170880, 2822144, 2170880, 2170880, 2854912, 2170880, 2170880, 2170880, 2912256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2609152, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2654208, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 184599, 280, 0, 2174976, 0, 0, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 544, 0, 546, 0, 0, 2179072, 0, 0, 0, 552, 0, 0, 2170880, 2170880, 2170880, 3117056, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2158592, 2158592, 2232320, 2232320, 0, 2240512, 2240512, 0, 0, 0, 644, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3129344, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2400256, 2215936, 2215936, 2215936, 2215936, 2711552, 2170880, 2170880, 2170880, 2170880, 2170880, 2760704, 2768896, 2789376, 2813952, 2170880, 2170880, 2170880, 2875392, 2904064, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2453504, 2457600, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 167936, 0, 0, 0, 0, 2174976, 0, 0, 2215936, 2215936, 2514944, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2592768, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 32768, 0, 0, 0, 0, 0, 2174976, 32768, 0, 2633728, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2711552, 2215936, 2215936, 2215936, 2215936, 2215936, 2760704, 2768896, 2789376, 2813952, 2215936, 2215936, 2215936, 2875392, 2904064, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 0, 65819, 2215936, 2215936, 3031040, 2215936, 3055616, 2215936, 2215936, 2215936, 2215936, 3092480, 2215936, 2215936, 3125248, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3002368, 2215936, 2215936, 2170880, 2170880, 2494464, 2170880, 2170880, 0, 0, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2445312, 2170880, 2465792, 2473984, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2523136, 2170880, 2170880, 2641920, 2170880, 2170880, 2170880, 2699264, 2170880, 2727936, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2879488, 2170880, 2916352, 2170880, 2170880, 2170880, 2879488, 2170880, 2916352, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3026944, 2170880, 2170880, 3063808, 2170880, 2170880, 3112960, 2170880, 2170880, 3133440, 2170880, 2170880, 3112960, 2170880, 2170880, 3133440, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 2379776, 2215936, 2523136, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2596864, 2215936, 2621440, 2215936, 2215936, 2641920, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 548, 0, 0, 0, 0, 287, 2170880, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3117056, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2699264, 2215936, 2727936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2879488, 2215936, 2916352, 2215936, 2215936, 0, 0, 0, 0, 188416, 0, 2179072, 0, 0, 0, 0, 0, 287, 2170880, 0, 2171019, 2171019, 2171019, 2400395, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3031179, 2171019, 3055755, 2171019, 2171019, 2215936, 3133440, 2215936, 2215936, 2215936, 3162112, 2215936, 2215936, 3182592, 3186688, 2215936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2523275, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2597003, 2171019, 2621579, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 4337664, 28, 2170880, 2170880, 2170880, 2629632, 2170880, 2170880, 2170880, 2170880, 2719744, 2744320, 2170880, 2170880, 2170880, 2834432, 2838528, 2170880, 2908160, 2170880, 2170880, 2936832, 2215936, 2215936, 2215936, 2215936, 2719744, 2744320, 2215936, 2215936, 2215936, 2834432, 2838528, 2215936, 2908160, 2215936, 2215936, 2936832, 2215936, 2215936, 2985984, 2215936, 2994176, 2215936, 2215936, 3014656, 2215936, 3059712, 3076096, 3088384, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2445312, 2215936, 2465792, 2473984, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171019, 2171019, 2494603, 2171019, 2171019, 2215936, 2215936, 2215936, 3215360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2985984, 2170880, 2994176, 2170880, 2170880, 3016168, 2170880, 3059712, 3076096, 3088384, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 124, 124, 0, 128, 128, 2170880, 2170880, 2170880, 3215360, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2486272, 2170880, 2170880, 2506752, 2170880, 2170880, 2170880, 2535424, 2539520, 2170880, 2170880, 2588672, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 2170880, 2170880, 3051520, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3170304, 0, 2387968, 2392064, 2170880, 2170880, 2433024, 2170880, 2170880, 2170880, 3170304, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2486272, 2215936, 2215936, 2506752, 2215936, 2215936, 2215936, 2535424, 2539520, 2215936, 2215936, 2588672, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 136, 0, 2215936, 2215936, 2920448, 2215936, 2215936, 2215936, 2990080, 2215936, 2215936, 2215936, 2215936, 3051520, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3108864, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3026944, 2215936, 2215936, 3063808, 2215936, 2215936, 3112960, 2215936, 2215936, 2215936, 3170304, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2453504, 2457600, 2170880, 2170880, 2170880, 2486272, 2170880, 2170880, 2506752, 2170880, 2170880, 2170880, 2537049, 2539520, 2170880, 2170880, 2588672, 2170880, 2170880, 2170880, 1508, 2170880, 2170880, 2170880, 1512, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 2170880, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2686976, 2748416, 2170880, 2170880, 2170880, 2924544, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3121152, 2170880, 2170880, 3145728, 3158016, 3166208, 2170880, 2420736, 2428928, 2170880, 2478080, 2170880, 2170880, 2170880, 2170880, 0, 0, 2170880, 2170880, 2170880, 2170880, 2646016, 2670592, 0, 0, 3145728, 3158016, 3166208, 2387968, 2392064, 2215936, 2215936, 2433024, 2215936, 2461696, 2215936, 2215936, 2215936, 2510848, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 0, 2170880, 2215936, 2215936, 2580480, 2215936, 2605056, 2637824, 2215936, 2215936, 2686976, 2748416, 2215936, 2215936, 2215936, 2924544, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 286, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 3121152, 2215936, 2215936, 3145728, 3158016, 3166208, 2387968, 2392064, 2170880, 2170880, 2433024, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 1625, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 647, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2576384, 2170880, 2170880, 2170880, 2170880, 2170880, 2609152, 2170880, 2170880, 2686976, 0, 0, 2748416, 2170880, 2170880, 0, 2170880, 2924544, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 0, 0, 28, 28, 2170880, 3141632, 2215936, 2420736, 2428928, 2215936, 2478080, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2215936, 2998272, 2215936, 3010560, 2215936, 2215936, 2215936, 3141632, 2170880, 2420736, 2428928, 2752512, 2756608, 0, 2846720, 2961408, 2170880, 2998272, 2170880, 3010560, 2170880, 2170880, 2170880, 3141632, 2170880, 2170880, 2490368, 2215936, 2490368, 2215936, 2215936, 2215936, 2547712, 2555904, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 245760, 0, 3129344, 2170880, 2170880, 2490368, 2170880, 2170880, 2170880, 0, 0, 2547712, 2555904, 2170880, 2170880, 2170880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 45056, 0, 2584576, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 1482, 97, 97, 97, 97, 97, 97, 97, 1354, 97, 97, 97, 97, 97, 97, 97, 97, 1148, 97, 97, 97, 97, 97, 97, 97, 2584576, 2170880, 2170880, 1512, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2441216, 2170880, 2527232, 2170880, 2600960, 2170880, 2850816, 2170880, 2170880, 2170880, 3022848, 2215936, 2441216, 2215936, 2527232, 2215936, 2600960, 2215936, 2850816, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 287, 2170880, 2215936, 3022848, 2170880, 2441216, 2170880, 2527232, 0, 0, 2170880, 2600960, 2170880, 0, 2850816, 2170880, 2170880, 2170880, 2170880, 2170880, 2523136, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2596864, 2170880, 2621440, 2170880, 2170880, 2641920, 2170880, 2170880, 2170880, 3022848, 2170880, 2519040, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2519040, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2453504, 2457600, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2514944, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2592768, 2170880, 2170880, 2519040, 0, 2024, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 2396160, 2170880, 2170880, 2170880, 2170880, 3018752, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396160, 0, 2024, 2170880, 2170880, 2170880, 2170880, 3018752, 2170880, 2650112, 2965504, 2170880, 2215936, 2650112, 2965504, 2215936, 0, 0, 2170880, 2650112, 2965504, 2170880, 2551808, 2170880, 2551808, 2215936, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 141, 45, 45, 67, 67, 67, 67, 67, 224, 67, 67, 238, 67, 67, 67, 67, 67, 67, 67, 1288, 67, 67, 67, 67, 67, 67, 67, 67, 67, 469, 67, 67, 67, 67, 67, 67, 0, 2551808, 2170880, 2170880, 2215936, 0, 2170880, 2170880, 2215936, 0, 2170880, 2170880, 2215936, 0, 2170880, 2977792, 2977792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 29, 102432, 127011, 110630, 114730, 106539, 127011, 127011, 127011, 53264, 18, 18, 49172, 0, 0, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 136, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 4256099, 4256099, 24, 24, 0, 28, 28, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 0, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 2170880, 2170880, 2547712, 2555904, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3129344, 2215936, 2215936, 543, 543, 545, 545, 0, 0, 2179072, 0, 550, 551, 551, 0, 287, 2171166, 2171166, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 645, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 149, 2584576, 2170880, 2170880, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2441216, 2170880, 2527232, 2170880, 2600960, 2519040, 0, 0, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 2396160, 2170880, 2170880, 2170880, 2170880, 3018752, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396160, 0, 0, 2170880, 2170880, 2170880, 2170880, 3018752, 2170880, 2650112, 2965504, 53264, 18, 49172, 57366, 24, 155648, 28, 102432, 155648, 155687, 114730, 106539, 0, 0, 155648, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 0, 0, 0, 0, 2220032, 0, 94208, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 208896, 18, 278528, 24, 24, 0, 28, 28, 53264, 18, 159765, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 139394, 28, 28, 102432, 131, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 32768, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 546, 0, 0, 2183168, 0, 0, 552, 832, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2609152, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2654208, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 1084, 0, 1088, 0, 1092, 0, 0, 0, 0, 0, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 937, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 644, 0, 0, 0, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 826, 0, 828, 0, 0, 2183168, 0, 0, 830, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2592768, 2170880, 2170880, 2170880, 2170880, 2633728, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2711552, 2170880, 2170880, 2170880, 2170880, 2170880, 2760704, 53264, 18, 49172, 57366, 24, 8192, 28, 172066, 172032, 110630, 172066, 106539, 0, 0, 172032, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 16384, 28, 28, 28, 28, 102432, 0, 98304, 0, 0, 2220032, 110630, 0, 0, 0, 0, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 45056, 0, 0, 0, 53264, 18, 49172, 57366, 25, 8192, 30, 102432, 0, 110630, 114730, 106539, 0, 0, 176219, 53264, 18, 18, 49172, 0, 57366, 0, 124, 124, 124, 0, 128, 128, 128, 128, 102432, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 0, 546, 0, 0, 2183168, 0, 65536, 552, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2170880, 2998272, 2170880, 3010560, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 143, 45, 45, 67, 67, 67, 67, 67, 227, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1824, 67, 1826, 67, 67, 67, 67, 17, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 120, 121, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 2179072, 548, 0, 65820, 65820, 0, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 2033, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 978, 0, 546, 70179, 0, 2183168, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1013, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 473, 67, 67, 67, 67, 483, 67, 67, 1025, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1119, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1359, 97, 97, 97, 67, 67, 1584, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 497, 67, 67, 1659, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1667, 45, 45, 45, 45, 45, 169, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1668, 45, 45, 45, 45, 67, 67, 1694, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 774, 67, 67, 1713, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 1723, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 1538, 45, 45, 45, 45, 45, 1559, 45, 45, 1561, 45, 45, 45, 45, 45, 45, 45, 687, 45, 45, 45, 45, 45, 45, 45, 45, 448, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1771, 1772, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 67, 67, 67, 67, 67, 1821, 67, 67, 67, 67, 67, 67, 1827, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 1614, 97, 97, 97, 97, 97, 603, 97, 97, 605, 97, 97, 608, 97, 97, 97, 97, 0, 1532, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 450, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 1839, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 1883, 97, 1885, 97, 0, 1888, 0, 97, 97, 0, 97, 97, 1848, 97, 97, 97, 97, 1852, 45, 45, 45, 45, 45, 45, 45, 384, 391, 45, 45, 45, 45, 45, 45, 45, 385, 45, 45, 45, 45, 45, 45, 45, 45, 1237, 45, 45, 45, 45, 45, 45, 67, 0, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 1951, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1963, 97, 2023, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 1994, 67, 1995, 67, 67, 67, 67, 67, 67, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 137, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2793472, 2805760, 2170880, 2830336, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3031040, 2170880, 3055616, 2170880, 2170880, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 281, 549, 0, 65820, 65820, 0, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 2031, 2032, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1769, 67, 0, 546, 70179, 549, 549, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1858, 45, 641, 0, 0, 0, 0, 41606, 926, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 456, 67, 0, 0, 0, 1313, 0, 0, 0, 1096, 1319, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1110, 97, 97, 97, 97, 67, 67, 67, 67, 1301, 1476, 0, 0, 0, 0, 1307, 1478, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1486, 97, 1487, 97, 1313, 1480, 0, 0, 0, 0, 1319, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 566, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1476, 0, 1478, 0, 1480, 0, 97, 97, 97, 97, 97, 97, 97, 45, 1853, 45, 1855, 45, 45, 45, 45, 53264, 18, 49172, 57366, 26, 8192, 31, 102432, 0, 110630, 114730, 106539, 0, 0, 225368, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 18, 49172, 163840, 57366, 0, 24, 24, 229376, 0, 28, 28, 28, 229376, 102432, 0, 0, 0, 0, 2220167, 110630, 0, 0, 0, 114730, 106539, 0, 2171019, 2171019, 2171019, 2171019, 2592907, 2171019, 2171019, 2171019, 2171019, 2633867, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2654347, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3117195, 2171019, 2171019, 2171019, 2171019, 2240641, 0, 0, 0, 0, 0, 0, 0, 0, 368, 0, 140, 2171019, 2171019, 2171019, 2416779, 2424971, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2617483, 2171019, 2171019, 2642059, 2171019, 2171019, 2171019, 2699403, 2171019, 2728075, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3215499, 2215936, 2215936, 2215936, 2215936, 2215936, 2437120, 2215936, 2215936, 2171019, 2822283, 2171019, 2171019, 2855051, 2171019, 2171019, 2171019, 2912395, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3002507, 2171019, 2171019, 2215936, 2215936, 2494464, 2215936, 2215936, 2215936, 2171166, 2171166, 2416926, 2425118, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2576670, 2171166, 2617630, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2691358, 2171166, 2707742, 2171166, 2715934, 2171166, 2724126, 2765086, 2171166, 2171166, 2797854, 2171166, 2822430, 2171166, 2171166, 2855198, 2171166, 2171166, 2171166, 2912542, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2793758, 2806046, 2171166, 2830622, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3109150, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2543902, 2171166, 2171166, 2171166, 2171166, 2171166, 2629918, 2793611, 2805899, 2171019, 2830475, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 0, 546, 0, 0, 2183168, 0, 0, 552, 0, 2171166, 2171166, 2171166, 2400542, 2171166, 2171166, 2171166, 0, 2171166, 2171166, 2171166, 0, 2171166, 2920734, 2171166, 2171166, 2171166, 2990366, 2171166, 2171166, 2171166, 2171166, 3117342, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 0, 53264, 0, 18, 18, 4329472, 2232445, 0, 2240641, 4337664, 2711691, 2171019, 2171019, 2171019, 2171019, 2171019, 2760843, 2769035, 2789515, 2814091, 2171019, 2171019, 2171019, 2875531, 2904203, 2171019, 2171019, 3092619, 2171019, 2171019, 3125387, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3199115, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2453504, 2457600, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2793472, 2805760, 2215936, 2830336, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2494464, 2170880, 2170880, 2171166, 2171166, 2634014, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2711838, 2171166, 2171166, 2171166, 2171166, 2171166, 2760990, 2769182, 2789662, 2814238, 2171166, 2171166, 2171166, 2875678, 2904350, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3199262, 2171166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2379915, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2445451, 2171019, 2465931, 2474123, 2171019, 2171019, 3113099, 2171019, 2171019, 3133579, 2171019, 2171019, 2171019, 3162251, 2171019, 2171019, 3182731, 3186827, 2171019, 2379776, 2879627, 2171019, 2916491, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3027083, 2171019, 2171019, 3063947, 2699550, 2171166, 2728222, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2879774, 2171166, 2916638, 2171166, 2171166, 2171166, 2171166, 2171166, 2609438, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2654494, 2171166, 2171166, 2171166, 2171166, 2171166, 2445598, 2171166, 2466078, 2474270, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2523422, 2171019, 2437259, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2543755, 2171019, 2171019, 2171019, 2584715, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2908299, 2171019, 2171019, 2936971, 2171019, 2171019, 2986123, 2171019, 2994315, 2171019, 2171019, 3014795, 2171019, 3059851, 3076235, 3088523, 2171166, 2171166, 2986270, 2171166, 2994462, 2171166, 2171166, 3014942, 2171166, 3059998, 3076382, 3088670, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3027230, 2171166, 2171166, 3064094, 2171166, 2171166, 3113246, 2171166, 2171166, 3133726, 2506891, 2171019, 2171019, 2171019, 2535563, 2539659, 2171019, 2171019, 2588811, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2691211, 2171019, 2707595, 2171019, 2715787, 2171019, 2723979, 2764939, 2171019, 2171019, 2797707, 2215936, 2215936, 3170304, 0, 0, 0, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2453790, 2457886, 2171166, 2171166, 2171166, 2486558, 2171166, 2171166, 2507038, 2171166, 2171166, 2171166, 2535710, 2539806, 2171166, 2171166, 2588958, 2171166, 2171166, 2171166, 2171166, 2515230, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2593054, 2171166, 2171166, 2171166, 2171166, 3051806, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3170590, 0, 2388107, 2392203, 2171019, 2171019, 2433163, 2171019, 2461835, 2171019, 2171019, 2171019, 2510987, 2171019, 2171019, 2171019, 2171019, 2580619, 2171019, 2605195, 2637963, 2171019, 2171019, 2171019, 2920587, 2171019, 2171019, 2171019, 2990219, 2171019, 2171019, 2171019, 2171019, 3051659, 2171019, 2171019, 2171019, 2453643, 2457739, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2515083, 2171019, 2171019, 2171019, 2171019, 2646155, 2670731, 2752651, 2756747, 2846859, 2961547, 2171019, 2998411, 2171019, 3010699, 2171019, 2171019, 2687115, 2748555, 2171019, 2171019, 2171019, 2924683, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3121291, 2171019, 2171019, 2171019, 3170443, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2486272, 2215936, 2215936, 2506752, 3145867, 3158155, 3166347, 2387968, 2392064, 2215936, 2215936, 2433024, 2215936, 2461696, 2215936, 2215936, 2215936, 2510848, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 553, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 3121152, 2215936, 2215936, 3145728, 3158016, 3166208, 2388254, 2392350, 2171166, 2171166, 2433310, 2171166, 2461982, 2171166, 2171166, 2171166, 2511134, 2171166, 2171166, 0, 2171166, 2171166, 2580766, 2171166, 2605342, 2638110, 2171166, 2171166, 2171166, 2171166, 3031326, 2171166, 3055902, 2171166, 2171166, 2171166, 2171166, 3092766, 2171166, 2171166, 3125534, 2171166, 2171166, 2171166, 3162398, 2171166, 2171166, 3182878, 3186974, 2171166, 0, 0, 0, 2171019, 2171019, 2171019, 2171019, 3109003, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2215936, 2215936, 2400256, 2215936, 2215936, 2215936, 2215936, 2171166, 2687262, 0, 0, 2748702, 2171166, 2171166, 0, 2171166, 2924830, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2597150, 2171166, 2621726, 2171166, 2171166, 2642206, 2171166, 2171166, 2171166, 2171166, 3121438, 2171166, 2171166, 3146014, 3158302, 3166494, 2171019, 2420875, 2429067, 2171019, 2478219, 2171019, 2171019, 2171019, 2171019, 2547851, 2556043, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3129483, 2215936, 2171019, 3141771, 2215936, 2420736, 2428928, 2215936, 2478080, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2215936, 2998272, 2215936, 3010560, 2215936, 2215936, 2215936, 3141632, 2171166, 2421022, 2429214, 2171166, 2478366, 2171166, 2171166, 2171166, 2171166, 0, 0, 2171166, 2171166, 2171166, 2171166, 2646302, 2670878, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 0, 45, 45, 45, 45, 45, 1405, 1406, 45, 45, 45, 45, 1409, 45, 45, 45, 45, 45, 1415, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1238, 45, 45, 45, 45, 67, 2752798, 2756894, 0, 2847006, 2961694, 2171166, 2998558, 2171166, 3010846, 2171166, 2171166, 2171166, 3141918, 2171019, 2171019, 2490507, 3129344, 2171166, 2171166, 2490654, 2171166, 2171166, 2171166, 0, 0, 2547998, 2556190, 2171166, 2171166, 2171166, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 167, 45, 45, 45, 45, 185, 187, 45, 45, 198, 45, 45, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3129630, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2576523, 2171019, 2171019, 2171019, 2171019, 2171019, 2609291, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3002368, 2215936, 2215936, 2171166, 2171166, 2494750, 2171166, 2171166, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 147, 2584576, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 3002654, 2171166, 2171166, 2171019, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2175257, 0, 0, 2584862, 2171166, 2171166, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171019, 2441355, 2171019, 2527371, 2171019, 2601099, 2171019, 2850955, 2171019, 2171019, 2171019, 3022987, 2215936, 2441216, 2215936, 2527232, 2215936, 2600960, 2215936, 2850816, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 69632, 287, 2170880, 2215936, 3022848, 2171166, 2441502, 2171166, 2527518, 0, 0, 2171166, 2601246, 2171166, 0, 2851102, 2171166, 2171166, 2171166, 2171166, 2720030, 2744606, 2171166, 2171166, 2171166, 2834718, 2838814, 2171166, 2908446, 2171166, 2171166, 2937118, 3023134, 2171019, 2519179, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2519040, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 3215646, 0, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2486411, 2171019, 2171019, 2171019, 2629771, 2171019, 2171019, 2171019, 2171019, 2719883, 2744459, 2171019, 2171019, 2171019, 2834571, 2838667, 2171019, 2519326, 0, 0, 2171166, 2171166, 0, 2171166, 2171166, 2171166, 2396299, 2171019, 2171019, 2171019, 2171019, 3018891, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396446, 0, 0, 2171166, 2171166, 2171166, 2171166, 3019038, 2171019, 2650251, 2965643, 2171019, 2215936, 2650112, 2965504, 2215936, 0, 0, 2171166, 2650398, 2965790, 2171166, 2551947, 2171019, 2551808, 2215936, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 144, 45, 45, 67, 67, 67, 67, 67, 228, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1929, 97, 97, 97, 97, 0, 0, 0, 2552094, 2171166, 2171019, 2215936, 0, 2171166, 2171019, 2215936, 0, 2171166, 2171019, 2215936, 0, 2171166, 2977931, 2977792, 2978078, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 1321, 97, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 140, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2445312, 2170880, 2465792, 2473984, 2170880, 2170880, 2170880, 2584576, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 0, 140, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3002368, 2170880, 2170880, 2215936, 2215936, 2494464, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3215360, 544, 0, 0, 0, 544, 0, 546, 0, 0, 0, 546, 0, 0, 2183168, 0, 0, 552, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 0, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 552, 0, 0, 0, 552, 0, 287, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2437120, 2170880, 2170880, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 644, 0, 2215936, 2215936, 3170304, 544, 0, 546, 0, 552, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 0, 140, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 249856, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 151640, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2416640, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 253952, 110630, 114730, 106539, 0, 0, 32856, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 192512, 53264, 18, 18, 49172, 0, 57366, 0, 2232445, 184320, 2232445, 0, 2240641, 2240641, 184320, 2240641, 102432, 0, 0, 0, 221184, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3108864, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 0, 0, 0, 45056, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 127, 127, 53264, 18, 49172, 258071, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 204800, 53264, 18, 49172, 57366, 24, 27, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 33, 0, 33, 33, 33, 0, 0, 0, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 16384, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 2170880, 2170880, 2170880, 2416640, 67, 67, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 2030, 45, 45, 45, 45, 67, 1573, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1699, 67, 67, 67, 67, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1355, 97, 97, 97, 1358, 97, 97, 97, 641, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 1187, 45, 45, 45, 45, 45, 0, 1480, 0, 0, 0, 0, 1319, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 592, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1531, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1680, 45, 45, 45, 641, 0, 924, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1186, 45, 45, 45, 45, 45, 45, 67, 67, 37139, 37139, 24853, 24853, 0, 70179, 282, 0, 0, 65820, 65820, 369, 287, 97, 0, 0, 97, 97, 0, 97, 2028, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1767, 67, 67, 67, 0, 0, 0, 0, 0, 0, 1612, 97, 97, 97, 97, 97, 97, 0, 1785, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1790, 97, 0, 0, 2170880, 2170880, 3051520, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3170304, 241664, 2387968, 2392064, 2170880, 2170880, 2433024, 53264, 19, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 274432, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 270336, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 1134711, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 1126440, 1126440, 1126440, 0, 0, 1126400, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 36, 110630, 114730, 106539, 0, 0, 217088, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 94, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 96, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 24666, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 126, 28, 28, 28, 28, 102432, 53264, 122, 123, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 2170880, 2170880, 4256099, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 1319, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1109, 97, 97, 97, 97, 1113, 132, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 146, 150, 45, 45, 45, 45, 45, 175, 45, 180, 45, 186, 45, 189, 45, 45, 203, 67, 256, 67, 67, 270, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 293, 297, 97, 97, 97, 97, 97, 322, 97, 327, 97, 333, 97, 0, 0, 97, 2026, 0, 2027, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1685, 67, 67, 67, 67, 67, 67, 67, 1690, 67, 336, 97, 97, 350, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 2424832, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2617344, 2170880, 45, 439, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 525, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 622, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1524, 97, 97, 1527, 369, 648, 45, 45, 45, 45, 45, 45, 45, 45, 45, 659, 45, 45, 45, 45, 408, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1239, 45, 45, 45, 67, 729, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 762, 67, 746, 67, 67, 67, 67, 67, 67, 67, 67, 67, 759, 67, 67, 67, 67, 0, 0, 0, 1477, 0, 1086, 0, 0, 0, 1479, 0, 1090, 67, 67, 796, 67, 67, 799, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1291, 67, 67, 67, 811, 67, 67, 67, 67, 67, 816, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 833, 97, 97, 97, 97, 97, 97, 97, 97, 1380, 0, 0, 0, 45, 45, 45, 45, 45, 1185, 45, 45, 45, 45, 45, 45, 45, 386, 45, 45, 45, 45, 45, 45, 45, 45, 1810, 45, 45, 45, 45, 45, 45, 67, 97, 97, 844, 97, 97, 97, 97, 97, 97, 97, 97, 97, 857, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 97, 97, 97, 894, 97, 97, 897, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1382, 45, 45, 45, 97, 909, 97, 97, 97, 97, 97, 914, 97, 97, 97, 97, 97, 97, 97, 923, 67, 67, 1079, 67, 67, 67, 67, 67, 37689, 1085, 25403, 1089, 66365, 1093, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 148, 1114, 97, 97, 97, 97, 97, 97, 1122, 97, 97, 97, 97, 97, 97, 97, 97, 97, 606, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1173, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 145, 45, 45, 67, 67, 67, 67, 67, 1762, 67, 67, 67, 1766, 67, 67, 67, 67, 67, 67, 528, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 1934, 67, 67, 1255, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1035, 67, 67, 67, 67, 67, 67, 1297, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1111, 97, 97, 97, 97, 97, 97, 1327, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 33344, 97, 97, 97, 1335, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 1377, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 670, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 430, 45, 45, 45, 45, 67, 67, 1438, 67, 67, 1442, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1592, 67, 67, 67, 1451, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1458, 67, 67, 67, 67, 0, 0, 1305, 0, 0, 0, 0, 0, 1311, 0, 0, 0, 1317, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1322, 97, 97, 1491, 97, 97, 1495, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1551, 45, 1553, 45, 1504, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1513, 97, 97, 97, 97, 0, 45, 45, 45, 45, 1536, 45, 45, 45, 45, 1540, 45, 67, 67, 67, 67, 67, 1585, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1700, 67, 67, 67, 97, 1648, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1541, 0, 97, 97, 97, 97, 0, 1940, 0, 97, 97, 97, 97, 97, 97, 45, 45, 2011, 45, 45, 45, 2015, 67, 67, 2017, 67, 67, 67, 2021, 97, 67, 67, 812, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 97, 97, 97, 910, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 923, 0, 0, 0, 45, 45, 45, 45, 1184, 45, 45, 45, 45, 1188, 45, 45, 45, 45, 1414, 45, 45, 45, 1417, 45, 1419, 45, 45, 45, 45, 45, 443, 45, 45, 45, 45, 45, 45, 453, 45, 45, 67, 67, 67, 67, 1244, 67, 67, 67, 67, 1248, 67, 67, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 282, 41098, 65820, 97, 1324, 97, 97, 97, 97, 1328, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 930, 45, 45, 45, 45, 97, 97, 97, 97, 1378, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 975, 45, 45, 45, 45, 67, 67, 1923, 67, 1925, 67, 67, 1927, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1985, 45, 45, 45, 45, 45, 45, 1560, 45, 45, 45, 45, 45, 45, 45, 45, 45, 946, 45, 45, 950, 45, 45, 45, 0, 97, 97, 97, 1939, 0, 0, 0, 97, 1943, 97, 97, 1945, 97, 45, 45, 45, 669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 990, 45, 45, 45, 67, 257, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 337, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 370, 2170880, 2170880, 2170880, 2416640, 401, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 459, 461, 67, 67, 67, 67, 67, 67, 67, 67, 475, 67, 480, 67, 67, 67, 67, 67, 67, 1054, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1698, 67, 67, 67, 67, 67, 484, 67, 67, 487, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1459, 67, 67, 97, 556, 558, 97, 97, 97, 97, 97, 97, 97, 97, 572, 97, 577, 97, 97, 0, 0, 1896, 97, 97, 97, 97, 97, 97, 1903, 45, 45, 45, 45, 983, 45, 45, 45, 45, 988, 45, 45, 45, 45, 45, 45, 1195, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1549, 45, 45, 45, 45, 45, 581, 97, 97, 584, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1153, 97, 97, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 662, 45, 45, 45, 684, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1004, 45, 45, 45, 67, 67, 67, 749, 67, 67, 67, 67, 67, 67, 67, 67, 67, 761, 67, 67, 67, 67, 67, 67, 1068, 67, 67, 67, 1071, 67, 67, 67, 67, 1076, 794, 795, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 544, 97, 97, 97, 97, 847, 97, 97, 97, 97, 97, 97, 97, 97, 97, 859, 97, 0, 0, 2025, 97, 20480, 97, 97, 2029, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1575, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1775, 67, 67, 67, 97, 97, 97, 97, 892, 893, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1515, 97, 993, 994, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 992, 67, 67, 67, 1284, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1607, 67, 67, 97, 1364, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 596, 97, 45, 1556, 1557, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 696, 45, 1596, 1597, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 499, 67, 97, 97, 97, 1621, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1346, 97, 97, 97, 97, 1740, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1678, 45, 45, 45, 45, 45, 67, 97, 97, 97, 97, 97, 97, 1836, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1984, 97, 45, 45, 45, 45, 45, 45, 1808, 45, 45, 45, 45, 45, 45, 45, 45, 67, 739, 67, 67, 67, 67, 67, 744, 45, 45, 1909, 45, 45, 45, 45, 45, 45, 45, 67, 1917, 67, 1918, 67, 67, 67, 67, 67, 67, 1247, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 532, 67, 67, 67, 67, 67, 67, 1922, 67, 67, 67, 67, 67, 67, 67, 97, 1930, 97, 1931, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1576, 67, 67, 67, 67, 1580, 67, 67, 0, 97, 97, 1938, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 699, 45, 45, 45, 704, 45, 45, 45, 45, 45, 45, 45, 45, 987, 45, 45, 45, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 97, 2006, 97, 97, 97, 97, 0, 45, 1533, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1416, 45, 45, 45, 45, 45, 45, 45, 45, 722, 723, 45, 45, 45, 45, 45, 45, 2045, 67, 67, 67, 2047, 0, 0, 97, 97, 97, 2051, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 409, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1957, 45, 67, 67, 67, 67, 67, 1836, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 67, 67, 1761, 67, 67, 67, 1764, 67, 67, 67, 67, 67, 67, 67, 494, 67, 67, 67, 67, 67, 67, 67, 67, 67, 787, 67, 67, 67, 67, 67, 67, 45, 45, 420, 45, 45, 422, 45, 45, 425, 45, 45, 45, 45, 45, 45, 45, 387, 45, 45, 45, 45, 397, 45, 45, 45, 67, 460, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 515, 67, 485, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 498, 67, 67, 67, 67, 67, 97, 0, 2039, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1426, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1689, 67, 67, 67, 97, 557, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 612, 97, 582, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 595, 97, 97, 97, 97, 97, 896, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 885, 97, 97, 97, 97, 97, 45, 939, 45, 45, 45, 45, 943, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1916, 67, 67, 67, 67, 67, 45, 67, 67, 67, 67, 67, 67, 67, 1015, 67, 67, 67, 67, 1019, 67, 67, 67, 67, 67, 67, 1271, 67, 67, 67, 67, 67, 67, 1277, 67, 67, 67, 67, 67, 67, 1287, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 804, 67, 67, 67, 67, 67, 1077, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2437120, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2543616, 2170880, 2170880, 2170880, 2170880, 2170880, 2629632, 1169, 97, 1171, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 936, 45, 45, 67, 67, 214, 67, 220, 67, 67, 233, 67, 243, 67, 248, 67, 67, 67, 67, 67, 67, 1298, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1617, 97, 0, 0, 0, 45, 45, 45, 1183, 45, 45, 45, 45, 45, 45, 45, 45, 45, 393, 45, 45, 45, 45, 45, 45, 67, 67, 1243, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1074, 67, 67, 1281, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 776, 1323, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 907, 45, 1412, 45, 45, 45, 45, 45, 45, 45, 1418, 45, 45, 45, 45, 45, 45, 686, 45, 45, 45, 690, 45, 45, 695, 45, 45, 67, 67, 67, 67, 67, 1465, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1712, 97, 97, 97, 97, 1741, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 426, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1924, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1983, 97, 97, 45, 45, 1987, 45, 1988, 45, 0, 97, 97, 97, 97, 0, 0, 0, 1942, 97, 97, 97, 97, 97, 45, 45, 45, 700, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 711, 45, 45, 153, 45, 45, 166, 45, 176, 45, 181, 45, 45, 188, 191, 196, 45, 204, 255, 258, 263, 67, 271, 67, 67, 0, 37139, 24853, 0, 0, 0, 282, 41098, 65820, 97, 97, 97, 294, 97, 300, 97, 97, 313, 97, 323, 97, 328, 97, 97, 335, 338, 343, 97, 351, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 41098, 0, 140, 45, 45, 45, 45, 1404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1411, 67, 67, 486, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1251, 67, 67, 501, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 513, 67, 67, 67, 67, 67, 67, 1443, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1263, 67, 67, 67, 67, 67, 97, 97, 583, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1526, 97, 598, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 610, 97, 97, 0, 97, 97, 1796, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1744, 45, 45, 45, 369, 0, 651, 45, 653, 45, 654, 45, 656, 45, 45, 45, 660, 45, 45, 45, 45, 1558, 45, 45, 45, 45, 45, 45, 45, 45, 1566, 45, 45, 681, 45, 683, 45, 45, 45, 45, 45, 45, 45, 45, 691, 692, 694, 45, 45, 45, 716, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 709, 45, 45, 712, 45, 714, 45, 45, 45, 718, 45, 45, 45, 45, 45, 45, 45, 726, 45, 45, 45, 733, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1691, 67, 67, 747, 67, 67, 67, 67, 67, 67, 67, 67, 67, 760, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 1613, 97, 97, 97, 97, 97, 97, 1509, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 67, 764, 67, 67, 67, 67, 768, 67, 770, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 1977, 67, 778, 779, 781, 67, 67, 67, 67, 67, 67, 788, 789, 67, 67, 792, 793, 67, 67, 67, 813, 67, 67, 67, 67, 67, 67, 67, 67, 67, 824, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 836, 97, 838, 97, 839, 97, 841, 97, 97, 97, 845, 97, 97, 97, 97, 97, 97, 97, 97, 97, 858, 97, 97, 0, 1728, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 1802, 45, 97, 97, 862, 97, 97, 97, 97, 866, 97, 868, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1788, 97, 97, 97, 0, 0, 97, 97, 876, 877, 879, 97, 97, 97, 97, 97, 97, 886, 887, 97, 97, 890, 891, 97, 97, 97, 97, 97, 97, 97, 899, 97, 97, 97, 903, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1646, 97, 97, 97, 97, 911, 97, 97, 97, 97, 97, 97, 97, 97, 97, 922, 923, 45, 955, 45, 957, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 195, 45, 45, 45, 45, 45, 981, 982, 45, 45, 45, 45, 45, 45, 989, 45, 45, 45, 45, 45, 170, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 411, 45, 45, 45, 45, 45, 67, 1023, 67, 67, 67, 67, 67, 67, 1031, 67, 1033, 67, 67, 67, 67, 67, 67, 67, 817, 819, 67, 67, 67, 67, 67, 37689, 544, 67, 1065, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 516, 67, 67, 1078, 67, 67, 1081, 1082, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2437406, 2171166, 2171166, 97, 1115, 97, 1117, 97, 97, 97, 97, 97, 97, 1125, 97, 1127, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 1644, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 1642, 97, 97, 97, 97, 97, 97, 625, 97, 97, 97, 97, 97, 97, 97, 97, 97, 316, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1159, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1502, 97, 97, 97, 97, 97, 1172, 97, 97, 1175, 1176, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 935, 45, 45, 45, 1233, 45, 45, 45, 1236, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1873, 67, 67, 45, 45, 1218, 45, 45, 45, 1223, 45, 45, 45, 45, 45, 45, 45, 1230, 45, 45, 67, 67, 215, 219, 222, 67, 230, 67, 67, 244, 246, 249, 67, 67, 67, 67, 67, 67, 1882, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 1904, 45, 1905, 45, 67, 67, 67, 67, 67, 1258, 67, 1260, 67, 67, 67, 67, 67, 67, 67, 67, 67, 495, 67, 67, 67, 67, 67, 67, 67, 67, 1283, 67, 67, 67, 67, 67, 67, 67, 1290, 67, 67, 67, 67, 67, 67, 67, 818, 67, 67, 67, 67, 67, 67, 37689, 544, 67, 67, 1295, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2174976, 0, 0, 97, 97, 97, 1326, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1514, 97, 97, 97, 97, 97, 1338, 97, 1340, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1500, 97, 97, 1503, 97, 1363, 97, 97, 97, 97, 97, 97, 97, 1370, 97, 97, 97, 97, 97, 97, 97, 563, 97, 97, 97, 97, 97, 97, 578, 97, 1375, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 685, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1003, 45, 45, 45, 45, 67, 67, 67, 1463, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1778, 97, 97, 97, 97, 97, 1518, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 609, 97, 97, 97, 45, 1542, 45, 45, 45, 45, 45, 45, 45, 1548, 45, 45, 45, 45, 45, 1554, 45, 1570, 1571, 45, 67, 67, 67, 67, 67, 67, 1578, 67, 67, 67, 67, 67, 67, 67, 1055, 67, 67, 67, 67, 67, 1061, 67, 67, 1582, 67, 67, 67, 67, 67, 67, 67, 1588, 67, 67, 67, 67, 67, 1594, 67, 67, 67, 67, 67, 97, 2038, 0, 97, 97, 97, 97, 97, 2044, 45, 45, 45, 995, 45, 45, 45, 45, 1000, 45, 45, 45, 45, 45, 45, 45, 1809, 45, 1811, 45, 45, 45, 45, 45, 67, 1610, 1611, 67, 1476, 0, 1478, 0, 1480, 0, 97, 97, 97, 97, 97, 97, 1618, 1647, 1649, 97, 97, 97, 1652, 97, 1654, 1655, 97, 0, 45, 45, 45, 1658, 45, 45, 67, 67, 216, 67, 67, 67, 67, 234, 67, 67, 67, 67, 252, 254, 1845, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 945, 45, 947, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1881, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 1902, 45, 45, 45, 45, 45, 45, 1908, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1921, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 0, 97, 1937, 97, 97, 1940, 0, 0, 97, 97, 97, 97, 97, 97, 1947, 1948, 1949, 45, 45, 45, 1952, 45, 1954, 45, 45, 45, 45, 1959, 1960, 1961, 67, 67, 67, 67, 67, 67, 1455, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 757, 67, 67, 67, 67, 67, 67, 1964, 67, 1966, 67, 67, 67, 67, 1971, 1972, 1973, 97, 0, 0, 0, 97, 97, 1104, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 884, 97, 97, 97, 889, 97, 97, 1978, 97, 0, 0, 1981, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 736, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1018, 67, 67, 67, 45, 67, 67, 67, 67, 0, 2049, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 933, 45, 45, 45, 45, 1234, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 97, 97, 288, 97, 97, 97, 97, 97, 97, 317, 97, 97, 97, 97, 97, 97, 0, 0, 97, 1787, 97, 97, 97, 97, 0, 0, 45, 45, 378, 45, 45, 45, 45, 45, 390, 45, 45, 45, 45, 45, 45, 45, 424, 45, 45, 45, 431, 433, 45, 45, 45, 67, 1050, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 518, 67, 97, 97, 97, 1144, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 632, 97, 97, 97, 97, 97, 97, 97, 1367, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 855, 97, 97, 97, 97, 67, 97, 97, 97, 97, 97, 97, 1837, 0, 97, 97, 97, 97, 97, 0, 0, 0, 1897, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1208, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 724, 45, 45, 45, 45, 45, 97, 2010, 45, 45, 45, 45, 45, 45, 2016, 67, 67, 67, 67, 67, 67, 2022, 45, 2046, 67, 67, 67, 0, 0, 2050, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 932, 45, 45, 45, 45, 45, 1222, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1227, 45, 45, 45, 45, 45, 133, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 701, 702, 45, 45, 705, 706, 45, 45, 45, 45, 45, 45, 703, 45, 45, 45, 45, 45, 45, 45, 45, 45, 719, 45, 45, 45, 45, 45, 725, 45, 45, 45, 369, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1216, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 834, 97, 97, 97, 97, 97, 97, 97, 1342, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1799, 97, 97, 45, 45, 45, 1569, 45, 45, 45, 1572, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 1306, 0, 67, 67, 67, 1598, 67, 67, 67, 67, 67, 67, 67, 67, 1606, 67, 67, 1609, 97, 97, 97, 1650, 97, 97, 1653, 97, 97, 97, 0, 45, 45, 1657, 45, 45, 45, 1206, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1421, 45, 45, 45, 1703, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 1711, 97, 97, 0, 1895, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 958, 45, 960, 45, 45, 45, 45, 45, 45, 45, 45, 1913, 45, 45, 1915, 67, 67, 67, 67, 67, 67, 67, 466, 67, 67, 67, 67, 67, 67, 481, 67, 45, 1749, 45, 45, 45, 45, 45, 45, 45, 45, 1755, 45, 45, 45, 45, 45, 173, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 974, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1773, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1886, 0, 0, 0, 97, 97, 67, 2035, 2036, 67, 67, 97, 0, 0, 97, 2041, 2042, 97, 97, 45, 45, 45, 45, 1662, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1397, 45, 45, 45, 45, 151, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 437, 205, 45, 67, 67, 67, 218, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1047, 67, 67, 67, 67, 97, 97, 97, 97, 298, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 870, 97, 97, 97, 97, 97, 97, 97, 97, 352, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 0, 0, 0, 0, 0, 365, 0, 41098, 0, 140, 45, 45, 45, 45, 45, 1427, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1435, 520, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1037, 617, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 923, 45, 1232, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1919, 67, 1759, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1021, 45, 154, 45, 162, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 964, 45, 45, 45, 206, 45, 67, 67, 67, 67, 221, 67, 229, 67, 67, 67, 67, 67, 67, 67, 67, 530, 67, 67, 67, 67, 67, 67, 67, 67, 755, 67, 67, 67, 67, 67, 67, 67, 67, 785, 67, 67, 67, 67, 67, 67, 67, 67, 802, 67, 67, 67, 807, 67, 67, 67, 97, 97, 97, 97, 353, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 0, 0, 0, 0, 0, 366, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 402, 45, 45, 45, 45, 45, 45, 45, 410, 45, 45, 45, 45, 45, 45, 45, 674, 45, 45, 45, 45, 45, 45, 45, 45, 389, 45, 394, 45, 45, 398, 45, 45, 45, 45, 441, 45, 45, 45, 45, 45, 447, 45, 45, 45, 454, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1768, 67, 67, 67, 67, 67, 488, 67, 67, 67, 67, 67, 67, 67, 496, 67, 67, 67, 67, 67, 67, 67, 1774, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 67, 67, 523, 67, 67, 527, 67, 67, 67, 67, 67, 533, 67, 67, 67, 540, 97, 97, 97, 585, 97, 97, 97, 97, 97, 97, 97, 593, 97, 97, 97, 97, 97, 97, 1784, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 0, 18, 18, 24, 24, 0, 28, 28, 97, 97, 620, 97, 97, 624, 97, 97, 97, 97, 97, 630, 97, 97, 97, 637, 713, 45, 45, 45, 45, 45, 45, 721, 45, 45, 45, 45, 45, 45, 45, 45, 1197, 45, 45, 45, 45, 45, 45, 45, 45, 730, 732, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1581, 67, 45, 67, 67, 67, 67, 1012, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1059, 67, 67, 67, 67, 67, 1024, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 775, 67, 67, 67, 67, 1066, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 479, 67, 67, 67, 67, 67, 67, 1080, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 287, 0, 0, 0, 287, 0, 2379776, 2170880, 2170880, 97, 97, 97, 1118, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 920, 97, 97, 0, 0, 0, 0, 45, 1181, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 432, 45, 45, 45, 45, 45, 45, 1219, 45, 45, 45, 45, 45, 45, 1226, 45, 45, 45, 45, 45, 45, 959, 45, 45, 45, 45, 45, 45, 45, 45, 45, 184, 45, 45, 45, 45, 202, 45, 1241, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1266, 67, 1268, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1279, 67, 67, 67, 67, 67, 272, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 67, 67, 67, 1286, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1293, 67, 67, 67, 1296, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 281, 94, 0, 0, 97, 97, 97, 1366, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1373, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 0, 97, 1376, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 1384, 45, 45, 67, 208, 67, 67, 67, 67, 67, 67, 237, 67, 67, 67, 67, 67, 67, 67, 1069, 1070, 67, 67, 67, 67, 67, 67, 67, 0, 37140, 24854, 0, 0, 0, 0, 41098, 65821, 45, 1423, 45, 45, 45, 45, 45, 45, 67, 67, 1431, 67, 67, 67, 67, 67, 67, 67, 1083, 37689, 0, 25403, 0, 66365, 0, 0, 0, 1436, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1830, 67, 1452, 1453, 67, 67, 67, 67, 1456, 67, 67, 67, 67, 67, 67, 67, 67, 67, 771, 67, 67, 67, 67, 67, 67, 1461, 67, 67, 67, 1464, 67, 1466, 67, 67, 67, 67, 67, 67, 1470, 67, 67, 67, 67, 67, 67, 1587, 67, 67, 67, 67, 67, 67, 67, 67, 1595, 1489, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1129, 97, 1505, 1506, 97, 97, 97, 97, 1510, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1163, 1164, 97, 97, 97, 97, 97, 1516, 97, 97, 97, 1519, 97, 1521, 97, 97, 97, 97, 97, 97, 1525, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 67, 67, 67, 67, 67, 1586, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1276, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1600, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1301, 0, 0, 0, 1307, 97, 97, 1620, 97, 97, 97, 97, 97, 97, 97, 1627, 97, 97, 97, 97, 97, 97, 913, 97, 97, 97, 97, 919, 97, 97, 97, 0, 97, 97, 97, 1781, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 1792, 1860, 45, 1862, 1863, 45, 1865, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1875, 67, 1877, 1878, 67, 1880, 67, 97, 97, 97, 97, 97, 1887, 0, 1889, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 237568, 0, 367, 0, 97, 1893, 0, 0, 0, 97, 1898, 1899, 97, 1901, 97, 45, 45, 45, 45, 45, 2014, 45, 67, 67, 67, 67, 67, 2020, 67, 97, 1989, 45, 1990, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1996, 67, 1997, 67, 67, 67, 67, 67, 273, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 2005, 0, 97, 2007, 97, 97, 18, 0, 139621, 0, 0, 0, 642, 0, 133, 364, 0, 0, 367, 41606, 0, 97, 97, 2056, 2057, 0, 2059, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 209, 67, 67, 67, 223, 67, 67, 67, 67, 67, 67, 67, 67, 67, 786, 67, 67, 67, 791, 67, 67, 45, 45, 940, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 727, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1016, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 133, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 142, 45, 45, 67, 210, 67, 67, 67, 225, 67, 67, 239, 67, 67, 67, 250, 67, 67, 67, 67, 67, 464, 67, 67, 67, 67, 67, 476, 67, 67, 67, 67, 67, 67, 67, 1709, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 1843, 0, 67, 259, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 289, 97, 97, 97, 303, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 901, 97, 97, 97, 97, 97, 339, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 358, 0, 0, 0, 0, 0, 0, 41098, 0, 140, 45, 45, 45, 45, 45, 1953, 45, 1955, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1687, 1688, 67, 67, 67, 67, 45, 45, 405, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1203, 45, 458, 67, 67, 67, 67, 67, 67, 67, 67, 67, 470, 477, 67, 67, 67, 67, 67, 67, 67, 1970, 97, 97, 97, 1974, 0, 0, 0, 97, 1103, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1372, 97, 97, 97, 97, 67, 522, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 536, 67, 67, 67, 67, 67, 67, 1696, 67, 67, 67, 67, 67, 67, 67, 1701, 67, 555, 97, 97, 97, 97, 97, 97, 97, 97, 97, 567, 574, 97, 97, 97, 97, 97, 301, 97, 309, 97, 97, 97, 97, 97, 97, 97, 97, 97, 900, 97, 97, 97, 905, 97, 97, 97, 619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 633, 97, 97, 18, 0, 139621, 0, 0, 362, 0, 0, 0, 364, 0, 0, 367, 41606, 369, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 663, 664, 67, 67, 67, 67, 750, 751, 67, 67, 67, 67, 758, 67, 67, 67, 67, 67, 67, 67, 1272, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1057, 1058, 67, 67, 67, 67, 67, 67, 67, 67, 797, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 512, 67, 67, 67, 97, 97, 97, 97, 895, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 902, 97, 97, 97, 97, 67, 67, 1051, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1062, 67, 67, 67, 67, 67, 491, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1302, 0, 0, 0, 1308, 97, 97, 97, 97, 1145, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1139, 97, 97, 97, 97, 1156, 97, 97, 97, 97, 97, 97, 1161, 97, 97, 97, 97, 97, 1166, 97, 97, 18, 640, 139621, 0, 641, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 67, 67, 67, 67, 1257, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 1305, 0, 0, 97, 97, 1337, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1630, 97, 67, 1474, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2380062, 2171166, 2171166, 97, 1529, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1228, 45, 45, 45, 45, 67, 67, 67, 67, 1707, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1891, 1739, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1198, 45, 1200, 45, 45, 45, 45, 97, 97, 1894, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 672, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1420, 45, 45, 45, 45, 67, 67, 1965, 67, 1967, 67, 67, 67, 97, 97, 97, 97, 0, 1976, 0, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 97, 97, 1979, 0, 0, 97, 1982, 97, 97, 97, 1986, 45, 45, 45, 45, 45, 735, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1770, 67, 67, 2000, 97, 97, 97, 2002, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1798, 97, 97, 97, 45, 45, 45, 2034, 67, 67, 67, 67, 97, 0, 0, 2040, 97, 97, 97, 97, 45, 45, 45, 45, 1752, 45, 45, 45, 1753, 1754, 45, 45, 45, 45, 45, 45, 383, 45, 45, 45, 45, 45, 45, 45, 45, 45, 675, 45, 45, 45, 45, 45, 45, 438, 45, 45, 45, 45, 45, 445, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1430, 67, 67, 67, 67, 67, 67, 67, 67, 67, 524, 67, 67, 67, 67, 67, 531, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 1096, 97, 97, 97, 621, 97, 97, 97, 97, 97, 628, 97, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 665, 45, 45, 45, 45, 45, 45, 45, 45, 45, 676, 45, 45, 45, 45, 45, 942, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 707, 708, 45, 45, 45, 45, 763, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 809, 810, 67, 67, 67, 67, 783, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 1303, 0, 0, 0, 97, 861, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 613, 97, 45, 45, 956, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1215, 45, 67, 67, 67, 67, 1027, 67, 67, 67, 67, 1032, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 1097, 1064, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1075, 67, 1098, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 331, 97, 97, 97, 97, 1158, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 594, 97, 97, 1309, 0, 0, 0, 1315, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1374, 97, 45, 45, 1543, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1240, 67, 67, 1583, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1252, 67, 97, 97, 97, 1635, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1800, 97, 45, 45, 45, 97, 97, 1793, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1743, 45, 45, 45, 1746, 45, 0, 97, 97, 97, 97, 97, 1851, 97, 45, 45, 45, 45, 1856, 45, 45, 45, 45, 1864, 45, 45, 67, 67, 1869, 67, 67, 67, 67, 1874, 67, 0, 97, 97, 45, 67, 2058, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 211, 67, 67, 67, 67, 67, 67, 240, 67, 67, 67, 67, 67, 67, 67, 1444, 67, 67, 67, 67, 67, 67, 67, 67, 67, 509, 67, 67, 67, 67, 67, 67, 67, 67, 67, 268, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 290, 97, 97, 97, 305, 97, 97, 319, 97, 97, 97, 330, 97, 97, 18, 640, 139621, 0, 641, 0, 0, 0, 0, 364, 0, 643, 367, 41606, 97, 97, 348, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 380, 45, 45, 45, 45, 45, 45, 395, 45, 45, 45, 400, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 658, 45, 45, 45, 45, 45, 972, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 427, 45, 45, 45, 45, 45, 745, 67, 67, 67, 67, 67, 67, 67, 67, 756, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 1086, 25403, 1090, 66365, 1094, 0, 0, 97, 843, 97, 97, 97, 97, 97, 97, 97, 97, 854, 97, 97, 97, 97, 97, 97, 1121, 97, 97, 97, 97, 1126, 97, 97, 97, 97, 45, 980, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1400, 45, 67, 67, 67, 1011, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 1304, 0, 0, 0, 1190, 45, 45, 1193, 1194, 45, 45, 45, 45, 45, 1199, 45, 1201, 45, 45, 45, 45, 1911, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1579, 67, 67, 67, 67, 45, 1205, 45, 45, 45, 45, 45, 45, 45, 45, 1211, 45, 45, 45, 45, 45, 984, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1550, 45, 45, 45, 45, 45, 1217, 45, 45, 45, 45, 45, 45, 1225, 45, 45, 45, 45, 1229, 45, 45, 45, 1388, 45, 45, 45, 45, 45, 45, 1396, 45, 45, 45, 45, 45, 444, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1574, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1590, 67, 67, 67, 67, 67, 1254, 67, 67, 67, 67, 67, 1259, 67, 1261, 67, 67, 67, 67, 1265, 67, 67, 67, 67, 67, 67, 1708, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 67, 67, 67, 67, 1285, 67, 67, 67, 67, 1289, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 1087, 25403, 1091, 66365, 1095, 0, 0, 97, 97, 97, 97, 1339, 97, 1341, 97, 97, 97, 97, 1345, 97, 97, 97, 97, 97, 561, 97, 97, 97, 97, 97, 573, 97, 97, 97, 97, 97, 97, 1717, 97, 0, 97, 97, 97, 97, 97, 97, 97, 591, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1329, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1351, 97, 97, 97, 97, 97, 97, 1357, 97, 97, 97, 97, 97, 588, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 568, 97, 97, 97, 97, 97, 97, 97, 1365, 97, 97, 97, 97, 1369, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1356, 97, 97, 97, 97, 97, 97, 45, 45, 1403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1399, 45, 45, 45, 1413, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1669, 45, 1422, 45, 45, 1425, 45, 45, 1428, 45, 1429, 67, 67, 67, 67, 67, 67, 67, 67, 1468, 67, 67, 67, 67, 67, 67, 67, 67, 529, 67, 67, 67, 67, 67, 67, 539, 67, 67, 1475, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 97, 97, 1530, 97, 0, 45, 45, 1534, 45, 45, 45, 45, 45, 45, 45, 45, 1956, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1599, 67, 67, 1601, 67, 67, 67, 67, 67, 67, 67, 67, 67, 803, 67, 67, 67, 67, 67, 67, 1632, 97, 1634, 0, 97, 97, 97, 1640, 97, 97, 97, 1643, 97, 97, 1645, 97, 97, 97, 97, 97, 912, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1660, 1661, 45, 45, 45, 45, 1665, 1666, 45, 45, 45, 45, 45, 1670, 1692, 1693, 67, 67, 67, 67, 67, 1697, 67, 67, 67, 67, 67, 67, 67, 1702, 97, 97, 1714, 1715, 97, 97, 97, 97, 0, 1721, 1722, 97, 97, 97, 97, 97, 97, 1353, 97, 97, 97, 97, 97, 97, 97, 97, 1362, 1726, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 1734, 97, 97, 97, 97, 97, 848, 849, 97, 97, 97, 97, 856, 97, 97, 97, 97, 97, 354, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 45, 45, 1750, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1681, 45, 0, 1846, 97, 97, 97, 97, 97, 97, 45, 45, 1854, 45, 45, 45, 45, 1859, 67, 67, 67, 1879, 67, 67, 97, 97, 1884, 97, 97, 0, 0, 0, 97, 97, 97, 1105, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1344, 97, 97, 97, 1347, 97, 1892, 97, 0, 0, 0, 97, 97, 97, 1900, 97, 97, 45, 45, 45, 45, 45, 997, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1002, 45, 45, 1005, 1006, 45, 67, 67, 67, 67, 67, 1926, 67, 67, 1928, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1737, 97, 0, 97, 97, 97, 97, 0, 0, 0, 97, 97, 1944, 97, 97, 1946, 45, 45, 45, 1544, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 190, 45, 45, 45, 152, 155, 45, 163, 45, 45, 177, 179, 182, 45, 45, 45, 193, 197, 45, 45, 45, 1672, 45, 45, 45, 45, 45, 1677, 45, 1679, 45, 45, 45, 45, 996, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1212, 45, 45, 45, 45, 67, 260, 264, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 295, 299, 302, 97, 310, 97, 97, 324, 326, 329, 97, 97, 97, 0, 97, 97, 1639, 0, 1641, 97, 97, 97, 97, 97, 97, 97, 97, 1511, 97, 97, 97, 97, 97, 97, 97, 97, 1523, 97, 97, 97, 97, 97, 97, 97, 97, 1719, 97, 97, 97, 97, 97, 97, 97, 97, 1720, 97, 97, 97, 97, 97, 97, 97, 312, 97, 97, 97, 97, 97, 97, 97, 97, 1123, 97, 97, 97, 97, 97, 97, 97, 340, 344, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 373, 375, 419, 45, 45, 45, 45, 45, 45, 45, 45, 45, 428, 45, 45, 435, 45, 45, 45, 1751, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1410, 45, 45, 45, 67, 67, 67, 505, 67, 67, 67, 67, 67, 67, 67, 67, 67, 514, 67, 67, 67, 67, 67, 67, 1969, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 2064, 2065, 0, 2066, 45, 521, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 534, 67, 67, 67, 67, 67, 67, 465, 67, 67, 67, 474, 67, 67, 67, 67, 67, 67, 67, 1467, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 1933, 0, 97, 97, 97, 602, 97, 97, 97, 97, 97, 97, 97, 97, 97, 611, 97, 97, 18, 640, 139621, 358, 641, 0, 0, 0, 0, 364, 0, 0, 367, 0, 618, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 631, 97, 97, 97, 97, 97, 881, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 569, 97, 97, 97, 97, 97, 369, 0, 45, 652, 45, 45, 45, 45, 45, 657, 45, 45, 45, 45, 45, 45, 1235, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1432, 67, 67, 67, 67, 67, 67, 67, 766, 67, 67, 67, 67, 67, 67, 67, 67, 773, 67, 67, 67, 0, 1305, 0, 1311, 0, 1317, 97, 97, 97, 97, 97, 97, 97, 1624, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 1724, 97, 97, 97, 777, 67, 67, 782, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 535, 67, 67, 67, 67, 67, 67, 67, 814, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 837, 97, 97, 97, 97, 97, 97, 1496, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 918, 97, 97, 97, 97, 0, 842, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1168, 97, 97, 97, 97, 864, 97, 97, 97, 97, 97, 97, 97, 97, 871, 97, 97, 97, 0, 1637, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1801, 45, 45, 97, 875, 97, 97, 880, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1151, 1152, 97, 97, 97, 67, 67, 67, 1040, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 790, 67, 67, 67, 1180, 0, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 200, 45, 45, 67, 67, 67, 1454, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 806, 67, 67, 67, 0, 0, 0, 1481, 0, 1094, 0, 0, 97, 1483, 97, 97, 97, 97, 97, 97, 304, 97, 97, 318, 97, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 97, 97, 97, 1507, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1332, 97, 97, 97, 1619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1631, 97, 1633, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1381, 0, 0, 45, 45, 45, 45, 97, 97, 1727, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 626, 97, 97, 97, 97, 97, 97, 636, 45, 45, 1760, 67, 67, 67, 67, 67, 67, 67, 1765, 67, 67, 67, 67, 67, 67, 67, 1299, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1616, 97, 97, 1803, 45, 45, 45, 45, 1807, 45, 45, 45, 45, 45, 1813, 45, 45, 45, 67, 67, 1684, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 822, 67, 67, 37689, 544, 67, 67, 1818, 67, 67, 67, 67, 1822, 67, 67, 67, 67, 67, 1828, 67, 67, 67, 67, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 2012, 2013, 45, 45, 67, 67, 67, 2018, 2019, 67, 67, 97, 67, 97, 97, 97, 1833, 97, 97, 0, 0, 97, 97, 1840, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 1733, 97, 1735, 97, 97, 97, 0, 97, 97, 97, 1849, 97, 97, 97, 45, 45, 45, 45, 45, 1857, 45, 45, 45, 1910, 45, 1912, 45, 45, 1914, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1017, 67, 67, 1020, 67, 45, 1861, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1872, 67, 67, 67, 67, 67, 67, 752, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1446, 67, 67, 67, 67, 67, 1876, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1890, 97, 97, 97, 97, 97, 1134, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 570, 97, 97, 97, 97, 580, 1935, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1906, 45, 67, 67, 67, 67, 2048, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 931, 45, 45, 45, 45, 45, 45, 1674, 45, 1676, 45, 45, 45, 45, 45, 45, 45, 446, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1871, 67, 67, 67, 67, 0, 97, 97, 45, 67, 0, 97, 2060, 2061, 0, 2063, 45, 67, 0, 97, 45, 45, 156, 45, 45, 45, 45, 45, 45, 45, 45, 45, 192, 45, 45, 45, 45, 1673, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 429, 45, 45, 45, 45, 67, 67, 67, 269, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 349, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 374, 45, 45, 67, 67, 213, 217, 67, 67, 67, 67, 67, 242, 67, 247, 67, 253, 45, 45, 698, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 399, 45, 45, 0, 0, 0, 0, 925, 41606, 0, 929, 0, 0, 45, 45, 45, 45, 45, 45, 1391, 45, 45, 1395, 45, 45, 45, 45, 45, 45, 423, 45, 45, 45, 45, 45, 45, 45, 436, 45, 67, 67, 67, 67, 1041, 67, 1043, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1776, 67, 67, 97, 97, 97, 1099, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 888, 97, 97, 97, 1131, 97, 97, 97, 97, 1135, 97, 1137, 97, 97, 97, 97, 97, 97, 97, 1497, 97, 97, 97, 97, 97, 97, 97, 97, 97, 883, 97, 97, 97, 97, 97, 97, 1310, 0, 0, 0, 1316, 0, 0, 0, 0, 1100, 0, 0, 0, 97, 97, 97, 97, 97, 1107, 97, 97, 97, 97, 97, 97, 97, 97, 1343, 97, 97, 97, 97, 97, 97, 1348, 0, 0, 1317, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1112, 97, 45, 1804, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1868, 67, 1870, 67, 67, 67, 67, 67, 1817, 67, 67, 1819, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 823, 67, 37689, 544, 67, 97, 1832, 97, 97, 1834, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 1732, 97, 97, 97, 97, 97, 97, 97, 850, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1177, 0, 0, 925, 0, 0, 0, 0, 97, 97, 97, 97, 0, 0, 1941, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1991, 1992, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1998, 134, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 941, 45, 45, 944, 45, 45, 45, 45, 45, 45, 952, 45, 45, 207, 67, 67, 67, 67, 67, 226, 67, 67, 67, 67, 67, 67, 67, 67, 67, 820, 67, 67, 67, 67, 37689, 544, 369, 650, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1682, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 835, 97, 97, 97, 97, 97, 97, 97, 1522, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1725, 67, 67, 67, 1695, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1034, 67, 1036, 67, 67, 67, 265, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 296, 97, 97, 97, 97, 314, 97, 97, 97, 97, 332, 334, 97, 97, 97, 97, 97, 1146, 1147, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1626, 97, 97, 97, 97, 97, 97, 345, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 372, 45, 45, 45, 1220, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1213, 45, 45, 45, 45, 404, 406, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 434, 45, 45, 45, 440, 45, 45, 45, 45, 45, 45, 45, 45, 451, 452, 45, 45, 45, 67, 1683, 67, 67, 67, 1686, 67, 67, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 67, 67, 490, 492, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1447, 67, 67, 1450, 67, 67, 67, 67, 67, 526, 67, 67, 67, 67, 67, 67, 67, 67, 537, 538, 67, 67, 67, 67, 67, 506, 67, 67, 508, 67, 67, 511, 67, 67, 67, 67, 0, 1476, 0, 0, 0, 0, 0, 1478, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1484, 97, 97, 97, 97, 97, 97, 865, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1499, 97, 97, 97, 97, 97, 97, 97, 97, 97, 587, 589, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 629, 97, 97, 97, 97, 97, 97, 97, 97, 97, 623, 97, 97, 97, 97, 97, 97, 97, 97, 634, 635, 97, 97, 97, 97, 97, 1160, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1628, 97, 97, 97, 97, 369, 0, 45, 45, 45, 45, 45, 655, 45, 45, 45, 45, 45, 45, 45, 45, 999, 45, 1001, 45, 45, 45, 45, 45, 45, 45, 45, 715, 45, 45, 45, 720, 45, 45, 45, 45, 45, 45, 45, 45, 728, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 97, 97, 97, 97, 840, 97, 97, 97, 97, 97, 1174, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 0, 0, 0, 0, 1100, 97, 97, 97, 97, 97, 97, 97, 97, 627, 97, 97, 97, 97, 97, 97, 97, 938, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 680, 45, 968, 45, 970, 45, 973, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 962, 45, 45, 45, 45, 45, 979, 45, 45, 45, 45, 45, 985, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1224, 45, 45, 45, 45, 45, 45, 45, 45, 688, 45, 45, 45, 45, 45, 45, 45, 1007, 1008, 67, 67, 67, 67, 67, 1014, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1045, 67, 67, 67, 67, 67, 67, 67, 1038, 67, 67, 67, 67, 67, 67, 1044, 67, 1046, 67, 1049, 67, 67, 67, 67, 67, 67, 800, 67, 67, 67, 67, 67, 67, 808, 67, 67, 0, 0, 0, 1102, 97, 97, 97, 97, 97, 1108, 97, 97, 97, 97, 97, 97, 306, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1371, 97, 97, 97, 97, 97, 97, 97, 97, 1132, 97, 97, 97, 97, 97, 97, 1138, 97, 1140, 97, 1143, 97, 97, 97, 97, 97, 1352, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 869, 97, 97, 97, 97, 97, 45, 1191, 45, 45, 45, 45, 45, 1196, 45, 45, 45, 45, 45, 45, 45, 45, 1407, 45, 45, 45, 45, 45, 45, 45, 45, 986, 45, 45, 45, 45, 45, 45, 991, 45, 67, 67, 67, 1256, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1048, 67, 67, 67, 97, 1336, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 615, 97, 1386, 45, 1387, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 455, 45, 457, 45, 45, 1424, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1433, 67, 1434, 67, 67, 67, 67, 67, 767, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1591, 67, 1593, 67, 67, 45, 45, 1805, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1814, 45, 45, 1816, 67, 67, 67, 67, 1820, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1829, 67, 67, 67, 67, 67, 815, 67, 67, 67, 67, 821, 67, 67, 67, 37689, 544, 67, 1831, 97, 97, 97, 97, 1835, 0, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1731, 97, 97, 97, 97, 97, 97, 97, 97, 97, 853, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 1850, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1547, 45, 45, 45, 45, 45, 45, 45, 45, 1664, 45, 45, 45, 45, 45, 45, 45, 45, 961, 45, 45, 45, 45, 965, 45, 967, 1907, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1920, 0, 1936, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 67, 67, 67, 67, 67, 67, 1763, 67, 67, 67, 67, 67, 67, 67, 67, 1056, 67, 67, 67, 67, 67, 67, 67, 67, 1273, 67, 67, 67, 67, 67, 67, 67, 67, 1457, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 28672, 97, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 2054, 97, 97, 291, 97, 97, 97, 97, 97, 97, 320, 97, 97, 97, 97, 97, 97, 307, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 926, 1179, 0, 45, 377, 45, 45, 45, 381, 45, 45, 392, 45, 45, 396, 45, 45, 45, 45, 971, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1756, 45, 45, 45, 67, 67, 67, 67, 463, 67, 67, 67, 467, 67, 67, 478, 67, 67, 482, 67, 67, 67, 67, 67, 1028, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1469, 67, 67, 1472, 67, 502, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1460, 67, 97, 97, 97, 97, 560, 97, 97, 97, 564, 97, 97, 575, 97, 97, 579, 97, 97, 97, 97, 97, 1368, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 930, 97, 599, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 872, 97, 45, 666, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1758, 0, 362, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 934, 45, 45, 45, 164, 168, 174, 178, 45, 45, 45, 45, 45, 194, 45, 45, 45, 165, 45, 45, 45, 45, 45, 45, 45, 45, 45, 199, 45, 45, 45, 67, 67, 1010, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1060, 67, 67, 67, 67, 67, 67, 1052, 1053, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1063, 97, 1157, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1167, 97, 97, 97, 97, 97, 1379, 97, 97, 97, 0, 0, 0, 45, 1383, 45, 45, 45, 1806, 45, 45, 45, 45, 45, 45, 1812, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1577, 67, 67, 67, 67, 67, 67, 67, 753, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1262, 67, 67, 67, 67, 67, 67, 67, 1282, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1471, 67, 45, 1402, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 417, 45, 67, 1462, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 97, 1517, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1128, 97, 97, 97, 97, 1636, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 851, 97, 97, 97, 97, 97, 97, 97, 67, 67, 1705, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1842, 0, 0, 1779, 97, 97, 97, 1782, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1789, 97, 97, 0, 0, 0, 97, 1847, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1675, 45, 45, 45, 45, 45, 45, 45, 45, 737, 738, 67, 740, 67, 741, 67, 743, 67, 67, 67, 67, 67, 67, 1968, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 45, 67, 0, 97, 45, 67, 2062, 97, 45, 67, 0, 97, 45, 67, 67, 97, 97, 2001, 97, 0, 0, 2004, 97, 97, 0, 97, 97, 97, 97, 1797, 97, 97, 97, 97, 97, 45, 45, 45, 67, 261, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 292, 97, 97, 97, 97, 311, 315, 321, 325, 97, 97, 97, 97, 97, 97, 1623, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1330, 97, 97, 1333, 1334, 97, 341, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 363, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 1221, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 413, 45, 45, 416, 45, 376, 45, 45, 45, 45, 382, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1408, 45, 45, 45, 45, 45, 403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 414, 45, 45, 45, 418, 67, 67, 67, 462, 67, 67, 67, 67, 468, 67, 67, 67, 67, 67, 67, 67, 67, 1602, 67, 1604, 67, 67, 67, 67, 67, 67, 67, 67, 489, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 500, 67, 67, 67, 67, 67, 1067, 67, 67, 67, 67, 67, 1072, 67, 67, 67, 67, 67, 67, 274, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 504, 67, 67, 67, 67, 67, 67, 67, 510, 67, 67, 67, 517, 519, 541, 67, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 554, 97, 97, 97, 559, 97, 97, 97, 97, 565, 97, 97, 97, 97, 97, 97, 97, 1718, 0, 97, 97, 97, 97, 97, 97, 97, 898, 97, 97, 97, 97, 97, 97, 906, 97, 97, 97, 97, 586, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 597, 97, 97, 97, 97, 97, 1520, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 1656, 45, 45, 45, 97, 97, 601, 97, 97, 97, 97, 97, 97, 97, 607, 97, 97, 97, 614, 616, 638, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 661, 45, 45, 45, 407, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1815, 45, 67, 45, 667, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 678, 45, 45, 45, 421, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 976, 977, 45, 45, 45, 682, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 693, 45, 45, 697, 67, 67, 748, 67, 67, 67, 67, 754, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1274, 67, 67, 67, 67, 67, 67, 67, 67, 765, 67, 67, 67, 67, 769, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1589, 67, 67, 67, 67, 67, 67, 67, 67, 780, 67, 67, 784, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1777, 67, 97, 97, 97, 97, 97, 97, 846, 97, 97, 97, 97, 852, 97, 97, 97, 97, 97, 97, 97, 1742, 45, 45, 45, 45, 45, 45, 45, 1747, 97, 97, 97, 863, 97, 97, 97, 97, 867, 97, 97, 97, 97, 97, 97, 97, 308, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 1178, 925, 0, 1179, 0, 97, 97, 97, 878, 97, 97, 882, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 908, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 954, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 963, 45, 45, 966, 45, 45, 157, 45, 45, 171, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 948, 45, 45, 45, 45, 45, 1022, 67, 67, 1026, 67, 67, 67, 1030, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1603, 1605, 67, 67, 67, 1608, 67, 67, 67, 1039, 67, 67, 1042, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 471, 67, 67, 67, 67, 67, 0, 1100, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 904, 97, 97, 97, 97, 1116, 97, 97, 1120, 97, 97, 97, 1124, 97, 97, 97, 97, 97, 97, 562, 97, 97, 97, 571, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1133, 97, 97, 1136, 97, 97, 97, 97, 97, 97, 97, 97, 915, 917, 97, 97, 97, 97, 97, 0, 97, 1170, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 0, 0, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1993, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1275, 67, 67, 67, 1278, 67, 0, 0, 0, 45, 45, 1182, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1189, 1204, 45, 45, 45, 1207, 45, 45, 1209, 45, 1210, 45, 45, 45, 45, 45, 45, 1546, 45, 45, 45, 45, 45, 45, 45, 45, 45, 689, 45, 45, 45, 45, 45, 45, 1231, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 236, 67, 67, 67, 67, 67, 67, 67, 801, 67, 67, 67, 805, 67, 67, 67, 67, 67, 1242, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1249, 67, 67, 67, 67, 67, 67, 507, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1300, 0, 0, 0, 0, 0, 1267, 67, 67, 1269, 67, 1270, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1280, 97, 1349, 97, 1350, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1360, 97, 97, 97, 0, 1980, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 673, 45, 45, 45, 45, 677, 45, 45, 45, 45, 1401, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 953, 67, 1437, 67, 1440, 67, 67, 67, 67, 1445, 67, 67, 67, 1448, 67, 67, 67, 67, 67, 67, 1029, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1825, 67, 67, 67, 67, 67, 1473, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1320, 0, 834, 97, 97, 97, 97, 1490, 97, 1493, 97, 97, 97, 97, 1498, 97, 97, 97, 1501, 97, 97, 97, 0, 97, 1638, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 916, 97, 97, 97, 97, 97, 97, 0, 1528, 97, 97, 97, 0, 45, 45, 45, 1535, 45, 45, 45, 45, 45, 45, 45, 1867, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1932, 0, 0, 1555, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1567, 45, 45, 158, 45, 45, 172, 45, 45, 45, 183, 45, 45, 45, 45, 201, 45, 45, 67, 212, 67, 67, 67, 67, 231, 235, 241, 245, 67, 67, 67, 67, 67, 67, 493, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 472, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1651, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 1539, 45, 45, 45, 67, 1704, 67, 1706, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1841, 97, 0, 1844, 97, 97, 97, 97, 1716, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 590, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 1385, 1748, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1757, 45, 45, 159, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 415, 45, 45, 97, 97, 1780, 97, 97, 97, 0, 0, 1786, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1730, 0, 97, 97, 97, 97, 97, 1736, 97, 1738, 67, 97, 97, 97, 97, 97, 97, 0, 1838, 97, 97, 97, 97, 97, 0, 0, 97, 1729, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1162, 97, 97, 97, 1165, 97, 97, 97, 45, 1950, 45, 45, 45, 45, 45, 45, 45, 45, 1958, 67, 67, 67, 1962, 67, 67, 67, 67, 67, 1246, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 1710, 97, 97, 97, 1999, 67, 97, 97, 97, 97, 0, 2003, 97, 97, 97, 0, 97, 97, 2008, 2009, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 2052, 67, 2053, 0, 0, 0, 0, 925, 41606, 0, 0, 930, 0, 45, 45, 45, 45, 45, 45, 1392, 45, 1394, 45, 45, 45, 45, 45, 45, 45, 1545, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1563, 1565, 45, 45, 45, 1568, 0, 97, 2055, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 28672, 97, 45, 45, 160, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 679, 45, 45, 67, 67, 266, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 346, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 362, 0, 364, 0, 367, 41098, 369, 140, 371, 45, 45, 45, 379, 45, 45, 45, 388, 45, 45, 45, 45, 45, 45, 45, 45, 1663, 45, 45, 45, 45, 45, 45, 45, 45, 45, 449, 45, 45, 45, 45, 45, 67, 67, 542, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 97, 97, 97, 97, 97, 1622, 97, 97, 97, 97, 97, 97, 97, 1629, 97, 97, 0, 1794, 1795, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1745, 45, 45, 97, 639, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 45, 731, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 251, 67, 67, 67, 67, 67, 798, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1073, 67, 67, 67, 860, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 873, 0, 0, 1101, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 921, 97, 0, 67, 67, 67, 67, 1245, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1250, 67, 67, 1253, 0, 0, 1312, 0, 0, 0, 1318, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1106, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1149, 97, 97, 97, 97, 97, 1155, 97, 97, 1325, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1141, 97, 97, 67, 67, 1439, 67, 1441, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1264, 67, 67, 67, 97, 97, 1492, 97, 1494, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1331, 97, 97, 97, 97, 67, 67, 67, 2037, 67, 97, 0, 0, 97, 97, 97, 2043, 97, 45, 45, 45, 442, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 232, 67, 67, 67, 67, 67, 67, 67, 67, 1823, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1975, 0, 0, 97, 874, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1142, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 65, 86, 117, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 63, 84, 115, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 61, 82, 113, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 59, 80, 111, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 57, 78, 109, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 55, 76, 107, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 53, 74, 105, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 51, 72, 103, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 49, 70, 101, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 47, 68, 99, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 45, 67, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 213085, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 0, 0, 44, 0, 0, 32863, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 41, 41, 41, 0, 0, 1138688, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 89, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 127, 127, 127, 127, 102432, 67, 262, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 342, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 360, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 717, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 412, 45, 45, 45, 45, 45, 67, 1009, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1292, 67, 67, 1294, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 1615, 97, 97, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 66, 87, 118, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 64, 85, 116, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 62, 83, 114, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 60, 81, 112, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 58, 79, 110, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 56, 77, 108, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 54, 75, 106, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 52, 73, 104, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 50, 71, 102, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 48, 69, 100, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 46, 67, 98, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 233472, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 69724, 53264, 18, 18, 49172, 0, 57366, 262144, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 45, 45, 161, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 710, 45, 45, 28, 139621, 359, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 1389, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 949, 45, 45, 45, 45, 67, 503, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1449, 67, 67, 97, 600, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1154, 97, 0, 0, 0, 0, 925, 41606, 927, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1866, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 772, 67, 67, 67, 67, 67, 45, 45, 969, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 951, 45, 45, 45, 45, 1192, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1202, 45, 45, 0, 0, 0, 1314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1488, 67, 67, 267, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 347, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 361, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 734, 45, 45, 45, 67, 67, 67, 67, 67, 742, 67, 67, 45, 45, 668, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1214, 45, 45, 1130, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1361, 97, 45, 45, 1671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1552, 45, 45, 0, 0, 0, 0, 2220032, 0, 0, 1130496, 0, 0, 0, 0, 2170880, 2171020, 2170880, 2170880, 18, 0, 0, 131072, 0, 0, 0, 90112, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 1485, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 1537, 45, 45, 45, 45, 45, 1390, 45, 1393, 45, 45, 45, 45, 1398, 45, 45, 45, 2170880, 2171167, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2576384, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 0, 0, 0, 0, 0, 0, 2183168, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2721252, 2744320, 2170880, 2170880, 2170880, 2834432, 2840040, 2170880, 2908160, 2170880, 2170880, 2936832, 2170880, 2170880, 2985984, 2170880, 2994176, 2170880, 2170880, 3014656, 2170880, 3059712, 3076096, 3088384, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 0, 2220032, 0, 0, 0, 1142784, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3215360, 2215936, 2215936, 2215936, 2215936, 2215936, 2437120, 2215936, 2215936, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 543, 0, 545, 0, 0, 2183168, 0, 0, 831, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 3031040, 2170880, 3055616, 2170880, 2170880, 2170880, 2170880, 3092480, 2170880, 2170880, 3125248, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 0, 0, 0, 0, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 0, 0, 0, 65820, 65820, 0, 287, 97, 97, 97, 97, 97, 1783, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 1791, 0, 0, 546, 70179, 0, 0, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 604, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1150, 97, 97, 97, 97, 97, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 0, 0, 147456, 0, 0, 0, 0, 925, 41606, 0, 928, 0, 0, 45, 45, 45, 45, 45, 45, 998, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1562, 45, 1564, 45, 45, 45, 45, 0, 2158592, 2158592, 0, 0, 0, 0, 2232320, 2232320, 2232320, 0, 2240512, 2240512, 2240512, 2240512, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2416640
+];
+
+JSONiqTokenizer.EXPECTED =
+[ 291, 300, 304, 341, 315, 309, 305, 295, 319, 323, 327, 329, 296, 333, 337, 339, 342, 346, 350, 294, 356, 360, 312, 367, 352, 371, 363, 375, 379, 383, 387, 391, 395, 726, 399, 405, 518, 684, 405, 405, 405, 405, 808, 405, 405, 405, 512, 405, 405, 405, 431, 405, 405, 406, 405, 405, 404, 405, 405, 405, 405, 405, 405, 405, 908, 631, 410, 415, 405, 414, 419, 608, 405, 429, 602, 405, 435, 443, 405, 441, 641, 478, 405, 447, 451, 450, 456, 643, 461, 460, 762, 679, 465, 469, 741, 473, 477, 482, 486, 492, 932, 931, 523, 498, 504, 720, 405, 510, 596, 405, 516, 941, 580, 522, 929, 527, 590, 589, 897, 939, 534, 538, 547, 551, 555, 559, 563, 567, 571, 969, 575, 708, 690, 689, 579, 584, 634, 405, 594, 731, 405, 600, 882, 405, 606, 895, 786, 452, 612, 405, 615, 620, 876, 624, 628, 638, 647, 651, 655, 659, 663, 667, 676, 683, 688, 695, 694, 791, 405, 699, 437, 405, 706, 714, 405, 712, 825, 870, 405, 718, 724, 769, 768, 823, 730, 735, 745, 751, 422, 755, 759, 425, 766, 902, 810, 587, 775, 888, 887, 405, 773, 992, 405, 779, 962, 405, 785, 781, 986, 790, 795, 797, 506, 500, 499, 801, 805, 814, 820, 829, 833, 837, 841, 845, 849, 853, 857, 861, 616, 865, 869, 868, 488, 405, 874, 816, 405, 880, 738, 405, 886, 892, 543, 405, 901, 906, 913, 912, 918, 494, 541, 922, 926, 936, 945, 949, 953, 957, 530, 966, 973, 960, 702, 701, 405, 979, 981, 405, 985, 747, 405, 990, 998, 914, 405, 996, 1004, 672, 975, 974, 1014, 1002, 1008, 670, 1012, 405, 405, 405, 405, 405, 401, 1018, 1022, 1026, 1106, 1071, 1111, 1111, 1111, 1082, 1145, 1030, 1101, 1034, 1038, 1106, 1106, 1106, 1106, 1046, 1206, 1052, 1106, 1072, 1111, 1111, 1042, 1134, 1065, 1111, 1112, 1056, 1160, 1207, 1062, 1204, 1208, 1069, 1106, 1106, 1106, 1076, 1111, 1207, 1161, 1122, 1205, 1064, 1094, 1106, 1106, 1107, 1111, 1111, 1111, 1078, 1086, 1207, 1092, 1098, 1046, 1058, 1106, 1106, 1110, 1111, 1111, 1116, 1120, 1161, 1126, 1202, 1104, 1106, 1145, 1146, 1129, 1138, 1088, 1151, 1048, 1157, 1153, 1132, 1141, 1165, 1107, 1111, 1172, 1179, 1109, 1183, 1175, 1143, 1147, 1187, 1108, 1191, 1195, 1144, 1199, 1168, 1212, 1216, 1220, 1224, 1228, 1232, 1236, 1557, 1247, 1241, 1241, 1038, 1434, 1241, 1241, 1241, 1241, 1254, 1275, 1617, 1241, 1280, 1287, 1241, 1241, 1241, 1287, 1241, 2114, 1291, 1241, 1243, 1241, 2049, 1824, 2094, 2095, 1520, 1309, 1241, 1241, 1302, 1241, 1321, 1311, 1241, 1241, 1313, 1778, 1325, 1336, 1241, 1241, 1325, 1330, 1353, 1241, 1241, 1695, 1354, 1241, 1241, 1241, 1294, 1686, 1331, 1241, 1696, 1368, 1241, 1338, 1370, 1241, 1392, 1399, 1364, 2017, 1406, 2016, 1405, 1716, 1406, 1407, 1422, 1417, 1421, 1241, 1241, 1241, 1349, 1426, 1241, 1774, 1756, 1241, 1773, 1241, 1241, 1345, 1964, 1812, 1432, 1241, 1241, 1345, 1993, 1459, 1241, 1241, 1241, 1395, 1848, 1767, 1465, 1241, 1241, 1394, 1847, 1242, 1477, 1241, 1241, 1428, 1241, 1445, 1492, 1241, 1241, 1438, 1241, 1499, 1241, 1241, 1241, 1455, 1241, 1818, 1448, 1241, 1250, 1241, 2026, 1623, 1449, 1241, 1612, 1616, 1241, 1614, 1241, 1257, 1241, 1241, 1985, 1292, 1586, 1512, 1241, 1517, 2050, 1526, 1674, 1519, 1524, 1647, 2051, 1532, 1537, 1551, 1544, 1550, 1555, 1561, 1571, 1578, 1584, 1590, 1591, 1653, 1595, 1602, 1606, 1610, 1634, 1628, 1640, 1633, 1645, 1241, 1241, 1241, 1469, 1241, 1970, 1651, 1241, 1270, 1241, 1241, 1819, 1449, 1241, 1293, 1664, 1241, 1241, 1481, 1485, 1574, 1672, 1241, 1241, 1513, 1317, 1487, 1684, 1241, 1241, 1533, 1299, 1694, 1241, 1241, 1295, 1241, 1241, 1241, 1546, 1700, 1241, 1241, 1707, 1241, 1713, 1241, 1849, 1715, 1241, 1720, 1241, 1276, 1267, 1241, 1241, 2107, 1657, 1864, 1241, 1881, 1241, 1326, 1292, 1241, 1685, 1358, 1724, 1338, 1241, 1363, 1362, 1342, 1340, 1361, 1339, 1833, 1372, 1360, 1833, 1833, 1342, 1343, 1835, 1341, 1731, 1738, 1344, 1241, 1745, 1241, 1379, 1241, 1241, 2092, 1241, 1388, 1761, 1754, 1241, 1386, 1241, 1400, 1760, 1241, 1241, 1241, 1598, 1734, 1241, 1241, 1241, 1635, 1645, 1241, 1780, 1766, 1241, 1241, 1332, 1771, 1241, 1241, 1629, 2079, 1241, 1242, 1784, 1241, 1241, 1680, 1639, 2063, 1790, 1241, 1241, 1741, 1241, 1241, 1800, 1241, 1241, 1762, 1473, 1241, 1806, 1241, 1241, 1786, 1240, 1709, 1241, 1241, 1241, 1668, 1811, 1241, 1940, 1241, 1401, 1974, 1241, 1408, 1413, 1382, 1241, 1816, 1241, 1241, 1802, 2086, 1811, 1241, 1817, 1945, 1823, 2095, 2095, 2047, 2094, 2046, 2080, 1241, 1409, 1312, 1376, 2096, 2048, 1241, 1241, 1807, 1241, 1241, 1241, 2035, 1241, 1241, 1828, 1241, 2057, 2061, 1241, 1241, 1843, 1241, 2059, 1241, 1241, 1241, 1690, 1847, 1241, 1241, 1241, 1703, 2102, 1848, 1241, 1241, 1853, 1292, 1848, 1241, 2016, 1857, 1241, 2002, 1868, 1241, 1436, 1241, 1241, 1271, 1305, 1241, 1874, 1241, 1241, 1884, 2037, 1892, 1241, 1890, 1241, 1461, 1241, 1241, 1795, 1241, 1241, 1891, 1241, 1878, 1241, 1888, 1241, 1888, 1905, 1896, 2087, 1912, 1903, 1241, 1911, 1906, 1916, 1905, 2027, 1863, 1925, 2088, 1859, 1861, 1922, 1927, 1931, 1935, 1494, 1241, 1241, 1918, 1907, 1939, 1917, 1944, 1949, 1241, 1241, 1451, 1955, 1241, 1241, 1241, 1796, 1727, 2061, 1241, 1241, 1899, 1241, 1660, 1968, 1241, 1241, 1951, 1678, 1978, 1241, 1241, 1241, 1839, 1241, 1241, 1984, 1982, 1241, 1488, 1241, 1241, 1624, 1450, 1989, 1241, 1241, 1241, 1870, 1995, 1292, 1241, 1241, 1958, 1261, 1241, 1996, 1241, 1241, 1241, 2039, 2008, 1241, 1241, 1750, 2000, 1241, 1256, 2001, 1960, 1241, 1564, 1241, 1504, 1241, 1241, 1442, 1241, 1241, 1564, 1528, 1263, 1241, 1508, 1241, 1241, 1468, 1498, 2006, 1540, 2015, 1539, 2014, 1748, 2013, 1539, 1831, 2014, 2012, 1500, 1567, 2022, 2021, 1241, 1580, 1241, 1241, 2033, 2037, 1791, 2045, 2031, 1241, 1621, 1241, 1641, 2044, 1241, 1241, 1241, 2093, 1241, 1241, 2055, 1241, 1241, 2067, 1241, 1283, 1241, 1241, 1241, 2101, 2071, 1241, 1241, 1241, 2073, 1848, 2040, 1241, 1241, 1241, 2077, 1241, 1241, 2106, 1241, 1241, 2084, 1241, 2111, 1241, 1241, 1381, 1380, 1241, 1241, 1241, 2100, 1241, 2129, 2118, 2122, 2126, 2197, 2133, 3010, 2825, 2145, 2698, 2156, 2226, 2160, 2161, 2165, 2174, 2293, 2194, 2630, 2201, 2203, 2152, 3019, 2226, 2263, 2209, 2213, 2218, 2269, 2292, 2269, 2269, 2184, 2226, 2238, 2148, 2151, 3017, 2245, 2214, 2269, 2269, 2185, 2226, 2292, 2269, 2291, 2269, 2269, 2269, 2292, 2205, 3019, 2226, 2226, 2160, 2160, 2160, 2261, 2160, 2160, 2160, 2262, 2276, 2160, 2160, 2277, 2216, 2283, 2216, 2269, 2269, 2268, 2269, 2267, 2269, 2269, 2269, 2271, 2568, 2292, 2269, 2293, 2269, 2182, 2190, 2269, 2186, 2226, 2226, 2226, 2226, 2227, 2160, 2160, 2160, 2160, 2263, 2160, 2275, 2277, 2282, 2215, 2217, 2269, 2269, 2291, 2269, 2269, 2293, 2291, 2269, 2220, 2269, 2295, 2294, 2269, 2269, 2305, 2233, 2262, 2278, 2218, 2269, 2234, 2226, 2226, 2228, 2160, 2160, 2160, 2289, 2220, 2294, 2294, 2269, 2269, 2304, 2269, 2160, 2160, 2287, 2269, 2269, 2305, 2269, 2269, 2312, 2269, 2269, 2225, 2226, 2160, 2287, 2289, 2219, 2304, 2295, 2314, 2234, 2226, 2314, 2269, 2226, 2226, 2160, 2288, 2219, 2222, 2304, 2296, 2269, 2224, 2160, 2160, 2269, 2302, 2294, 2314, 2224, 2226, 2288, 2220, 2294, 2269, 2290, 2269, 2269, 2293, 2269, 2269, 2269, 2269, 2270, 2221, 2313, 2225, 2227, 2160, 2300, 2269, 2225, 2261, 2309, 2234, 2229, 2223, 2318, 2318, 2318, 2328, 2336, 2340, 2344, 2350, 2637, 2712, 2358, 2362, 2372, 2135, 2378, 2398, 2135, 2135, 2135, 2135, 2136, 2417, 2241, 2135, 2378, 2135, 2135, 2980, 2984, 2135, 3006, 2135, 2135, 2135, 2945, 2931, 2425, 2400, 2135, 2135, 2135, 2954, 2135, 2481, 2433, 2135, 2135, 2988, 2824, 2135, 2135, 2482, 2434, 2135, 2135, 2440, 2445, 2452, 2135, 2135, 2998, 3002, 2961, 2441, 2446, 2453, 2463, 2974, 2135, 2135, 2135, 2140, 2642, 2709, 2459, 2470, 2465, 2135, 2135, 3005, 2135, 2135, 2987, 2823, 2458, 2469, 2464, 2975, 2135, 2135, 2135, 2353, 2488, 2447, 2324, 2974, 2135, 2409, 2459, 2448, 2135, 2961, 2487, 2446, 2476, 2323, 2973, 2135, 2135, 2135, 2354, 2476, 2974, 2135, 2135, 2135, 2957, 2135, 2135, 2960, 2135, 2135, 2135, 2363, 2409, 2459, 2474, 2465, 2487, 2571, 2973, 2135, 2135, 2168, 2973, 2135, 2135, 2135, 2959, 2135, 2135, 2135, 2506, 2135, 2957, 2488, 2170, 2135, 2135, 2135, 2960, 2135, 2818, 2493, 2135, 2135, 3033, 2135, 2135, 2135, 2934, 2819, 2494, 2135, 2135, 2135, 2976, 2780, 2499, 2135, 2135, 2135, 3000, 2968, 2135, 2935, 2135, 2135, 2135, 2364, 2507, 2135, 2135, 2934, 2135, 2135, 2780, 2492, 2507, 2135, 2135, 2506, 2780, 2135, 2135, 2782, 2780, 2135, 2782, 2135, 2783, 2374, 2514, 2135, 2135, 2135, 3007, 2530, 2974, 2135, 2135, 2135, 3008, 2135, 2135, 2134, 2135, 2526, 2531, 2975, 2135, 2135, 3042, 2581, 2575, 2956, 2135, 2135, 2135, 2394, 2135, 2508, 2535, 2840, 2844, 2495, 2135, 2135, 2136, 2684, 2537, 2842, 2846, 2135, 2136, 2561, 2581, 2551, 2536, 2841, 2845, 2975, 3043, 2582, 2843, 2555, 2135, 3040, 3044, 2538, 2844, 2975, 2135, 2135, 2253, 2644, 2672, 2542, 2554, 2135, 2135, 2346, 2873, 2551, 2555, 2135, 2135, 2135, 2381, 2559, 2565, 2538, 2553, 2135, 2560, 2914, 2576, 2590, 2135, 2135, 2135, 2408, 2136, 2596, 2624, 2135, 2135, 2135, 2409, 2135, 2618, 2597, 3008, 2135, 2135, 2380, 2956, 2601, 2135, 2135, 2135, 2410, 2620, 2624, 2135, 2136, 2383, 2135, 2135, 2783, 2623, 2135, 2135, 2393, 2888, 2136, 2621, 3008, 2135, 2618, 2618, 2622, 2135, 2135, 2405, 2414, 2619, 2384, 2624, 2135, 2136, 2950, 2135, 2138, 2135, 2139, 2135, 2604, 2623, 2135, 2140, 2878, 2665, 2957, 2622, 2135, 2135, 2428, 2762, 2606, 2612, 2135, 2135, 2501, 2586, 2604, 3038, 2135, 2604, 3036, 2387, 2958, 2386, 2135, 2141, 2135, 2421, 2387, 2385, 2135, 2385, 2384, 2384, 2135, 2386, 2628, 2384, 2135, 2135, 2501, 2596, 2591, 2135, 2135, 2135, 2400, 2135, 2634, 2135, 2135, 2559, 2580, 2575, 2648, 2135, 2135, 2135, 2429, 2649, 2135, 2135, 2135, 2435, 2654, 2658, 2135, 2135, 2135, 2436, 2649, 2178, 2659, 2135, 2135, 2595, 2601, 2669, 2677, 2135, 2135, 2616, 2957, 2879, 2665, 2691, 2135, 2363, 2367, 2900, 2878, 2664, 2690, 2975, 2877, 2643, 2670, 2974, 2671, 2975, 2135, 2135, 2619, 2608, 2669, 2673, 2135, 2135, 2653, 2177, 2672, 2135, 2135, 2135, 2486, 2168, 2251, 2255, 2695, 2974, 2709, 2135, 2135, 2135, 2487, 2169, 2399, 2716, 2975, 2135, 2363, 2770, 2776, 2640, 2717, 2135, 2135, 2729, 2135, 2135, 2641, 2718, 2135, 2135, 2135, 2505, 2135, 2640, 2257, 2974, 2135, 2727, 2975, 2135, 2365, 2332, 2895, 2957, 2135, 2959, 2135, 2365, 2749, 2754, 2959, 2958, 2958, 2135, 2380, 2793, 2799, 2135, 2735, 2738, 2135, 2381, 2135, 2135, 2940, 2974, 2135, 2744, 2135, 2135, 2739, 2519, 2976, 2745, 2135, 2135, 2135, 2509, 2755, 2135, 2135, 2135, 2510, 2772, 2778, 2135, 2135, 2740, 2520, 2135, 2771, 2777, 2135, 2135, 2759, 2750, 2792, 2798, 2135, 2135, 2781, 2392, 2779, 2135, 2135, 2135, 2521, 2135, 2679, 2248, 2135, 2135, 2681, 2480, 2135, 2135, 2786, 3000, 2135, 2679, 2683, 2135, 2135, 2416, 2135, 2135, 2135, 2525, 2135, 2730, 2135, 2135, 2135, 2560, 2581, 2135, 2805, 2135, 2135, 2804, 2962, 2832, 2974, 2135, 2382, 2135, 2135, 2958, 2135, 2135, 2960, 2135, 2829, 2833, 2975, 2961, 2965, 2969, 2973, 2968, 2972, 2135, 2135, 2135, 2641, 2135, 2515, 2966, 2970, 2851, 2478, 2135, 2135, 2808, 2135, 2809, 2135, 2135, 2135, 2722, 2852, 2479, 2135, 2135, 2815, 2135, 2135, 2766, 2853, 2480, 2135, 2857, 2479, 2135, 2388, 2723, 2135, 2364, 2331, 2894, 2858, 2480, 2135, 2135, 2850, 2478, 2135, 2135, 2135, 2806, 2864, 2135, 2399, 2256, 2974, 2865, 2135, 2135, 2862, 2135, 2135, 2135, 2685, 2807, 2865, 2135, 2135, 2807, 2863, 2135, 2135, 2135, 2686, 2884, 2807, 2135, 2809, 2807, 2135, 2135, 2807, 2806, 2705, 2810, 2808, 2700, 2869, 2702, 2702, 2702, 2704, 2883, 2135, 2135, 2135, 2730, 2884, 2135, 2135, 2135, 2731, 2321, 2546, 2135, 2135, 2876, 2255, 2889, 2322, 2547, 2135, 2401, 2135, 2135, 2135, 2949, 2367, 2893, 2544, 2973, 2906, 2973, 2135, 2135, 2877, 2663, 2368, 2901, 2907, 2974, 2366, 2899, 2905, 2972, 2920, 2974, 2135, 2135, 2911, 2900, 2920, 2363, 2913, 2918, 2465, 2941, 2975, 2135, 2135, 2924, 2928, 2974, 2945, 2931, 2135, 2135, 2135, 2765, 2136, 2955, 2135, 2135, 2939, 2931, 2380, 2135, 2135, 2380, 2135, 2135, 2135, 2780, 2507, 2137, 2135, 2137, 2135, 2139, 2135, 2806, 2810, 2135, 2135, 2135, 2992, 2135, 2135, 2962, 2966, 2970, 2974, 2135, 2135, 2787, 3014, 2135, 2521, 2993, 2135, 2135, 2135, 2803, 2135, 2135, 2135, 2618, 2607, 2997, 3001, 2135, 2135, 2963, 2967, 2971, 2975, 2135, 2135, 2791, 2797, 2135, 3009, 2999, 3003, 2787, 3001, 2135, 2135, 2964, 2968, 2785, 2999, 3003, 2135, 2135, 2135, 2804, 2785, 2999, 3004, 2135, 2135, 2135, 2807, 2135, 2135, 3023, 2135, 2135, 2135, 2811, 2135, 2135, 3027, 2135, 2135, 2135, 2837, 2968, 3028, 2135, 2135, 2135, 2875, 2135, 2784, 3029, 2135, 2408, 2457, 2446, 0, 14, 0, -2120220672, 1610612736, -2074083328, -2002780160, -2111830528, 1073872896, 1342177280, 1075807216, 4096, 16384, 2048, 8192, 0, 8192, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, -2145386496, 8388608, 1073741824, 0, 0x80000000, 0x80000000, 2097152, 2097152, 2097152, 536870912, 0, 0, 134217728, 33554432, 1536, 268435456, 268435456, 268435456, 268435456, 128, 256, 32, 0, 65536, 131072, 524288, 16777216, 268435456, 0x80000000, 1572864, 1835008, 640, 32768, 65536, 262144, 1048576, 2097152, 196608, 196800, 196608, 196608, 0, 131072, 131072, 131072, 196608, 196624, 196608, 196624, 196608, 196608, 128, 4096, 16384, 16384, 2048, 0, 4, 0, 0, 0x80000000, 2097152, 0, 1024, 32, 32, 0, 65536, 1572864, 1048576, 32768, 32768, 32768, 32768, 196608, 196608, 196608, 64, 64, 196608, 196608, 131072, 131072, 131072, 131072, 268435456, 268435456, 64, 196736, 196608, 196608, 196608, 131072, 196608, 196608, 16384, 4, 4, 4, 2, 32, 32, 65536, 1048576, 12582912, 1073741824, 0, 0, 2, 8, 16, 96, 2048, 32768, 0, 0, 131072, 268435456, 268435456, 268435456, 256, 256, 196608, 196672, 196608, 196608, 196608, 196608, 4, 0, 256, 256, 256, 256, 32, 32, 32768, 32, 32, 32, 32, 32768, 268435456, 268435456, 268435456, 196608, 196608, 196608, 196624, 196608, 196608, 196608, 16, 16, 16, 268435456, 196608, 64, 64, 64, 196608, 196608, 196608, 196672, 268435456, 64, 64, 196608, 196608, 16, 196608, 196608, 196608, 268435456, 64, 196608, 131072, 262144, 4194304, 25165824, 33554432, 134217728, 268435456, 268435456, 196608, 262152, 8, 256, 512, 3072, 16384, 200, -1073741816, 8392713, 40, 8392718, 520, 807404072, 40, 520, 100663304, 0, 0, -540651761, -540651761, 257589048, 0, 262144, 0, 0, 3, 8, 256, 0, 4, 6, 4100, 8388612, 0, 0, 0, 3, 4, 8, 256, 512, 1024, 0, 2097152, 0, 0, -537854471, -537854471, 0, 100663296, 0, 0, 1, 2, 0, 0, 0, 16384, 0, 0, 0, 96, 14336, 0, 0, 0, 7, 8, 234881024, 0, 0, 0, 8, 0, 0, 0, 0, 262144, 0, 0, 16, 64, 384, 512, 0, 1, 1, 0, 12582912, 0, 0, 0, 0, 33554432, 67108864, -606084144, -606084144, -606084138, 0, 0, 28, 32, 768, 1966080, -608174080, 0, 0, 0, 14, 35056, 16, 64, 896, 24576, 98304, 98304, 131072, 262144, 524288, 1048576, 4194304, 25165824, 1048576, 62914560, 134217728, -805306368, 0, 384, 512, 16384, 65536, 131072, 262144, 29360128, 33554432, 134217728, 268435456, 1073741824, 0x80000000, 262144, 524288, 1048576, 29360128, 33554432, 524288, 1048576, 16777216, 33554432, 134217728, 268435456, 1073741824, 0, 0, 0, 123856, 1966080, 0, 64, 384, 16384, 65536, 131072, 16384, 65536, 524288, 268435456, 0x80000000, 0, 0, 524288, 0x80000000, 0, 0, 1, 16, 0, 256, 524288, 0, 0, 0, 25, 96, 128, -537854471, 0, 0, 0, 32, 7404800, -545259520, 0, 0, 0, 60, 0, 249, 64768, 1048576, 6291456, 6291456, 25165824, 100663296, 402653184, 1073741824, 96, 128, 1280, 2048, 4096, 57344, 6291456, 57344, 6291456, 8388608, 16777216, 33554432, 201326592, 1342177280, 0x80000000, 0, 57344, 6291456, 8388608, 100663296, 134217728, 0x80000000, 0, 0, 0, 1, 8, 16, 64, 128, 64, 128, 256, 1024, 131072, 131072, 131072, 262144, 524288, 16777216, 57344, 6291456, 8388608, 67108864, 134217728, 64, 256, 1024, 2048, 4096, 57344, 64, 256, 0, 24576, 32768, 6291456, 67108864, 134217728, 0, 1, 64, 256, 24576, 32768, 4194304, 32768, 4194304, 67108864, 0, 0, 64, 256, 0, 0, 24576, 32768, 0, 16384, 4194304, 67108864, 64, 16384, 0, 0, 1, 64, 256, 16384, 4194304, 67108864, 0, 0, 0, 16384, 0, 16384, 16384, 0, -470447874, -470447874, -470447874, 0, 0, 128, 0, 0, 8, 96, 2048, 32768, 262144, 8388608, 35056, 1376256, -471859200, 0, 0, 14, 16, 224, 2048, 32768, 2097152, 4194304, 8388608, -486539264, 0, 96, 128, 2048, 32768, 262144, 2097152, 262144, 2097152, 8388608, 33554432, 536870912, 1073741824, 0x80000000, 0, 1610612736, 0x80000000, 0, 0, 1, 524288, 1048576, 12582912, 0, 0, 0, 151311, 264503296, 2097152, 8388608, 33554432, 1610612736, 0x80000000, 262144, 8388608, 33554432, 536870912, 67108864, 4194304, 0, 4194304, 0, 4194304, 4194304, 0, 0, 524288, 8388608, 536870912, 1073741824, 0x80000000, 1, 4097, 8388609, 96, 2048, 32768, 1073741824, 0x80000000, 0, 96, 2048, 0x80000000, 0, 0, 96, 2048, 0, 0, 1, 12582912, 0, 0, 0, 0, 1641895695, 1641895695, 0, 0, 0, 249, 7404800, 15, 87808, 1835008, 1639972864, 0, 768, 5120, 16384, 65536, 1835008, 1835008, 12582912, 16777216, 1610612736, 0, 3, 4, 8, 768, 4096, 65536, 0, 0, 256, 512, 786432, 8, 256, 512, 4096, 16384, 1835008, 16384, 1835008, 12582912, 1610612736, 0, 0, 0, 256, 0, 0, 0, 4, 8, 16, 32, 1, 2, 8, 256, 16384, 524288, 16384, 524288, 1048576, 12582912, 1610612736, 0, 0, 0, 8388608, 0, 0, 0, 524288, 4194304, 0, 0, 0, 8388608, -548662288, -548662288, -548662288, 0, 0, 256, 16384, 65536, 520093696, -1073741824, 0, 0, 0, 16777216, 0, 16, 32, 960, 4096, 4980736, 520093696, 1073741824, 0, 32, 896, 4096, 57344, 1048576, 6291456, 8388608, 16777216, 100663296, 134217728, 268435456, 0x80000000, 0, 512, 786432, 4194304, 33554432, 134217728, 268435456, 0, 786432, 4194304, 134217728, 268435456, 0, 524288, 4194304, 268435456, 0, 0, 0, 0, 0, 4194304, 4194304, -540651761, 0, 0, 0, 2, 4, 8, 16, 96, 128, 264503296, -805306368, 0, 0, 0, 8, 256, 512, 19456, 131072, 3072, 16384, 131072, 262144, 8388608, 16777216, 512, 1024, 2048, 16384, 131072, 262144, 131072, 262144, 8388608, 33554432, 201326592, 268435456, 0, 3, 4, 256, 1024, 2048, 57344, 16384, 131072, 8388608, 33554432, 134217728, 268435456, 0, 3, 256, 1024, 16384, 131072, 33554432, 134217728, 1073741824, 0x80000000, 0, 0, 256, 524288, 0x80000000, 0, 3, 256, 33554432, 134217728, 1073741824, 0, 1, 2, 33554432, 1, 2, 134217728, 1073741824, 0, 1, 2, 134217728, 0, 0, 0, 64, 0, 0, 0, 16, 32, 896, 4096, 786432, 4194304, 16777216, 33554432, 201326592, 268435456, 1073741824, 0x80000000, 0, 0, 0, 15, 0, 4980736, 4980736, 4980736, 70460, 70460, 3478332, 0, 0, 1008, 4984832, 520093696, 60, 4864, 65536, 0, 0, 0, 12, 16, 32, 256, 512, 4096, 65536, 0, 0, 0, 67108864, 0, 0, 0, 12, 0, 256, 512, 65536, 0, 0, 1024, 512, 131072, 131072, 4, 16, 32, 65536, 0, 4, 16, 32, 0, 0, 0, 4, 16, 0, 0, 16384, 67108864, 0, 0, 1, 24, 96, 128, 256, 1024
+];
+
+JSONiqTokenizer.TOKEN =
+[
+ "(0)",
+ "JSONChar",
+ "JSONCharRef",
+ "JSONPredefinedCharRef",
+ "ModuleDecl",
+ "Annotation",
+ "OptionDecl",
+ "Operator",
+ "Variable",
+ "Tag",
+ "EndTag",
+ "PragmaContents",
+ "DirCommentContents",
+ "DirPIContents",
+ "CDataSectionContents",
+ "AttrTest",
+ "Wildcard",
+ "EQName",
+ "IntegerLiteral",
+ "DecimalLiteral",
+ "DoubleLiteral",
+ "PredefinedEntityRef",
+ "'\"\"'",
+ "EscapeApos",
+ "AposChar",
+ "ElementContentChar",
+ "QuotAttrContentChar",
+ "AposAttrContentChar",
+ "NCName",
+ "QName",
+ "S",
+ "CharRef",
+ "CommentContents",
+ "DocTag",
+ "DocCommentContents",
+ "EOF",
+ "'!'",
+ "'\"'",
+ "'#'",
+ "'#)'",
+ "'$$'",
+ "''''",
+ "'('",
+ "'(#'",
+ "'(:'",
+ "'(:~'",
+ "')'",
+ "'*'",
+ "'*'",
+ "','",
+ "'-->'",
+ "'.'",
+ "'/'",
+ "'/>'",
+ "':'",
+ "':)'",
+ "';'",
+ "'<!--'",
+ "'<![CDATA['",
+ "'<?'",
+ "'='",
+ "'>'",
+ "'?'",
+ "'?>'",
+ "'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'",
+ "'{'",
+ "'{{'",
+ "'|'",
+ "'}'",
+ "'}}'"
+];
+
+},{}],"/node_modules/xqlint/lib/lexers/jsoniq_lexer.js":[function(_dereq_,module,exports){
+'use strict';
+
+var JSONiqTokenizer = _dereq_('./JSONiqTokenizer').JSONiqTokenizer;
+var Lexer = _dereq_('./lexer').Lexer;
+
+var keys = 'NaN|after|allowing|ancestor|ancestor-or-self|and|append|array|as|ascending|at|attribute|base-uri|before|boundary-space|break|by|case|cast|castable|catch|child|collation|comment|constraint|construction|contains|context|continue|copy|copy-namespaces|count|decimal-format|decimal-separator|declare|default|delete|descendant|descendant-or-self|descending|digit|div|document|document-node|element|else|empty|empty-sequence|encoding|end|eq|every|except|exit|external|false|first|following|following-sibling|for|from|ft-option|function|ge|greatest|group|grouping-separator|gt|idiv|if|import|in|index|infinity|insert|instance|integrity|intersect|into|is|item|json|json-item|jsoniq|last|lax|le|least|let|loop|lt|minus-sign|mod|modify|module|namespace|namespace-node|ne|next|node|nodes|not|null|object|of|only|option|or|order|ordered|ordering|paragraphs|parent|pattern-separator|per-mille|percent|preceding|preceding-sibling|previous|processing-instruction|rename|replace|return|returning|revalidation|satisfies|schema|schema-attribute|schema-element|score|select|self|sentences|sliding|some|stable|start|strict|switch|text|then|times|to|treat|true|try|tumbling|type|typeswitch|union|unordered|updating|validate|value|variable|version|when|where|while|window|with|words|xquery|zero-digit'.split('|');
+var keywords = keys.map(function(val) { return { name: '\'' + val + '\'', token: 'keyword' }; });
+var ncnames = keys.map(function(val) { return { name: '\'' + val + '\'', token: 'text', next: function(stack){ stack.pop(); } }; });
+
+var cdata = 'constant.language';
+var number = 'constant';
+var xmlcomment = 'comment';
+var pi = 'xml-pe';
+var pragma = 'constant.buildin';
+var n = function(name){
+ return '\'' + name + '\'';
+};
+var Rules = {
+ start: [
+ { name: n('(#'), token: pragma, next: function(stack){ stack.push('Pragma'); } },
+ { name: n('(:'), token: 'comment', next: function(stack){ stack.push('Comment'); } },
+ { name: n('(:~'), token: 'comment.doc', next: function(stack){ stack.push('CommentDoc'); } },
+ { name: n('<!--'), token: xmlcomment, next: function(stack){ stack.push('XMLComment'); } },
+ { name: n('<?'), token: pi, next: function(stack) { stack.push('PI'); } },
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.push('AposString'); } },
+ { name: n('"'), token: 'string', next: function(stack){ stack.push('QuotString'); } },
+ { name: 'Annotation', token: 'support.function' },
+ { name: 'ModuleDecl', token: 'keyword', next: function(stack){ stack.push('Prefix'); } },
+ { name: 'OptionDecl', token: 'keyword', next: function(stack){ stack.push('_EQName'); } },
+ { name: 'AttrTest', token: 'support.type' },
+ { name: 'Variable', token: 'variable' },
+ { name: n('<![CDATA['), token: cdata, next: function(stack){ stack.push('CData'); } },
+ { name: 'IntegerLiteral', token: number },
+ { name: 'DecimalLiteral', token: number },
+ { name: 'DoubleLiteral', token: number },
+ { name: 'Operator', token: 'keyword.operator' },
+ { name: 'EQName', token: function(val) { return keys.indexOf(val) !== -1 ? 'keyword' : 'support.function'; } },
+ { name: n('('), token: 'lparen' },
+ { name: n(')'), token: 'rparen' },
+ { name: 'Tag', token: 'meta.tag', next: function(stack){ stack.push('StartTag'); } },
+ { name: n('}'), token: 'text', next: function(stack){ if(stack.length > 1) { stack.pop(); } } },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } } //, next: function(stack){ if(stack.length > 1) { stack.pop(); } } }
+ ].concat(keywords),
+ _EQName: [
+ { name: 'EQName', token: 'text', next: function(stack) { stack.pop(); } }
+ ].concat(ncnames),
+ Prefix: [
+ { name: 'NCName', token: 'text', next: function(stack) { stack.pop(); } }
+ ].concat(ncnames),
+ StartTag: [
+ { name: n('>'), token: 'meta.tag', next: function(stack){ stack.push('TagContent'); } },
+ { name: 'QName', token: 'entity.other.attribute-name' },
+ { name: n('='), token: 'text' },
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.push('AposAttr'); } },
+ { name: n('"'), token: 'string', next: function(stack){ stack.push('QuotAttr'); } },
+ { name: n('/>'), token: 'meta.tag.r', next: function(stack){ stack.pop(); } }
+ ],
+ TagContent: [
+ { name: 'ElementContentChar', token: 'text' },
+ { name: n('<![CDATA['), token: cdata, next: function(stack){ stack.push('CData'); } },
+ { name: n('<!--'), token: xmlcomment, next: function(stack){ stack.push('XMLComment'); } },
+ { name: 'Tag', token: 'meta.tag', next: function(stack){ stack.push('StartTag'); } },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'text' },
+ { name: n('}}'), token: 'text' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } },
+ { name: 'EndTag', token: 'meta.tag', next: function(stack){ stack.pop(); stack.pop(); } }
+ ],
+ AposAttr: [
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'EscapeApos', token: 'constant.language.escape' },
+ { name: 'AposAttrContentChar', token: 'string' },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'string' },
+ { name: n('}}'), token: 'string' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } }
+ ],
+ QuotAttr: [
+ { name: n('\"'), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'EscapeQuot', token: 'constant.language.escape' },
+ { name: 'QuotAttrContentChar', token: 'string' },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'string' },
+ { name: n('}}'), token: 'string' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } }
+ ],
+ Pragma: [
+ { name: 'PragmaContents', token: pragma },
+ { name: n('#'), token: pragma },
+ { name: n('#)'), token: pragma, next: function(stack){ stack.pop(); } }
+ ],
+ Comment: [
+ { name: 'CommentContents', token: 'comment' },
+ { name: n('(:'), token: 'comment', next: function(stack){ stack.push('Comment'); } },
+ { name: n(':)'), token: 'comment', next: function(stack){ stack.pop(); } }
+ ],
+ CommentDoc: [
+ { name: 'DocCommentContents', token: 'comment.doc' },
+ { name: 'DocTag', token: 'comment.doc.tag' },
+ { name: n('(:'), token: 'comment.doc', next: function(stack){ stack.push('CommentDoc'); } },
+ { name: n(':)'), token: 'comment.doc', next: function(stack){ stack.pop(); } }
+ ],
+ XMLComment: [
+ { name: 'DirCommentContents', token: xmlcomment },
+ { name: n('-->'), token: xmlcomment, next: function(stack){ stack.pop(); } }
+ ],
+ CData: [
+ { name: 'CDataSectionContents', token: cdata },
+ { name: n(']]>'), token: cdata, next: function(stack){ stack.pop(); } }
+ ],
+ PI: [
+ { name: 'DirPIContents', token: pi },
+ { name: n('?'), token: pi },
+ { name: n('?>'), token: pi, next: function(stack){ stack.pop(); } }
+ ],
+ AposString: [
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: 'EscapeApos', token: 'constant.language.escape' },
+ { name: 'AposChar', token: 'string' }
+ ],
+ QuotString: [
+ { name: n('"'), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'JSONPredefinedCharRef', token: 'constant.language.escape' },
+ { name: 'JSONCharRef', token: 'constant.language.escape' },
+ { name: 'JSONChar', token: 'string' }
+ ]
+};
+
+exports.JSONiqLexer = function(){ return new Lexer(JSONiqTokenizer, Rules); };
+},{"./JSONiqTokenizer":"/node_modules/xqlint/lib/lexers/JSONiqTokenizer.js","./lexer":"/node_modules/xqlint/lib/lexers/lexer.js"}],"/node_modules/xqlint/lib/lexers/lexer.js":[function(_dereq_,module,exports){
+'use strict';
+
+var TokenHandler = function(code) {
+ var input = code;
+ this.tokens = [];
+
+ this.reset = function() {
+ input = input;
+ this.tokens = [];
+ };
+
+ this.startNonterminal = function() {};
+ this.endNonterminal = function() {};
+
+ this.terminal = function(name, begin, end) {
+ this.tokens.push({
+ name: name,
+ value: input.substring(begin, end)
+ });
+ };
+
+ this.whitespace = function(begin, end) {
+ this.tokens.push({
+ name: 'WS',
+ value: input.substring(begin, end)
+ });
+ };
+};
+
+exports.Lexer = function(Tokenizer, Rules) {
+
+ this.tokens = [];
+
+ this.getLineTokens = function(line, state) {
+ state = (state === 'start' || !state) ? '["start"]' : state;
+ var stack = JSON.parse(state);
+ var h = new TokenHandler(line);
+ var tokenizer = new Tokenizer(line, h);
+ var tokens = [];
+
+ while(true) {
+ var currentState = stack[stack.length - 1];
+ try {
+ h.tokens = [];
+ tokenizer['parse_' + currentState]();
+ var info = null;
+
+ if(h.tokens.length > 1 && h.tokens[0].name === 'WS') {
+ tokens.push({
+ type: 'text',
+ value: h.tokens[0].value
+ });
+ h.tokens.splice(0, 1);
+ }
+
+ var token = h.tokens[0];
+ var rules = Rules[currentState];
+ for(var k = 0; k < rules.length; k++) {
+ var rule = Rules[currentState][k];
+ if((typeof(rule.name) === 'function' && rule.name(token)) || rule.name === token.name) {
+ info = rule;
+ break;
+ }
+ }
+
+ if(token.name === 'EOF') { break; }
+ if(token.value === '') { throw 'Encountered empty string lexical rule.'; }
+
+ tokens.push({
+ type: info === null ? 'text' : (typeof(info.token) === 'function' ? info.token(token.value) : info.token),
+ value: token.value
+ });
+
+ if(info && info.next) {
+ info.next(stack);
+ }
+
+ } catch(e) {
+ if(e instanceof tokenizer.ParseException) {
+ var index = 0;
+ for(var i=0; i < tokens.length; i++) {
+ index += tokens[i].value.length;
+ }
+ tokens.push({ type: 'text', value: line.substring(index) });
+ return {
+ tokens: tokens,
+ state: JSON.stringify(['start'])
+ };
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ return {
+ tokens: tokens,
+ state: JSON.stringify(stack)
+ };
+ };
+};
+},{}]},{},["/node_modules/xqlint/lib/lexers/jsoniq_lexer.js"]);
+
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+ace.define("ace/mode/behaviour/xquery",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+ var oop = require("../../lib/oop");
+ var Behaviour = require('../behaviour').Behaviour;
+ var CstyleBehaviour = require('./cstyle').CstyleBehaviour;
+ var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
+ 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 XQueryBehaviour = function () {
+
+ this.inherit(CstyleBehaviour, ["braces", "parens", "string_dquotes"]); // Get string behaviour
+ 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;
+ var state = JSON.parse(state).pop();
+ if ((token && token.value === '>') || state !== "StartTag") return;
+ 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;
+ }
+ var previous = iterator.stepBackward();
+ if (!token || !hasType(token, 'meta.tag') || (previous !== null && previous.value.match('/'))) {
+ return
+ }
+ var tag = token.value.substring(1);
+ if (atCursor){
+ var tag = tag.substring(0, position.column - token.start);
+ }
+
+ return {
+ text: '>' + '</' + tag + '>',
+ selection: [1, 1]
+ }
+ }
+ });
+
+ }
+ oop.inherits(XQueryBehaviour, Behaviour);
+
+ exports.XQueryBehaviour = XQueryBehaviour;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/jsoniq",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/jsoniq_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var JSONiqLexer = require("./xquery/jsoniq_lexer").JSONiqLexer;
+var Range = require("../range").Range;
+var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var Anchor = require("../anchor").Anchor;
+
+var Mode = function() {
+ this.$tokenizer = new JSONiqLexer();
+ this.$behaviour = new XQueryBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+ this.$highlightRules = new TextHighlightRules();
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.completer = {
+ getCompletions: function(editor, session, pos, prefix, callback) {
+ if (!session.$worker)
+ return callback();
+ session.$worker.emit("complete", { data: { pos: pos, prefix: prefix } });
+ session.$worker.on("complete", function(e){
+ callback(null, e.data);
+ });
+ }
+ };
+
+ 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.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) {
+
+ var worker = new WorkerClient(["ace"], "ace/mode/xquery_worker", "XQueryWorker");
+ var that = this;
+
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("ok", function(e) {
+ session.clearAnnotations();
+ });
+
+ worker.on("markers", function(e) {
+ session.clearAnnotations();
+ that.addMarkers(e.data, session);
+ });
+
+ return worker;
+ };
+
+ this.removeMarkers = function(session) {
+ var markers = session.getMarkers(false);
+ for (var id in markers) {
+ if (markers[id].clazz.indexOf('language_highlight_') === 0) {
+ session.removeMarker(id);
+ }
+ }
+ for (var i = 0; i < session.markerAnchors.length; i++) {
+ session.markerAnchors[i].detach();
+ }
+ session.markerAnchors = [];
+ };
+
+ this.addMarkers = function(annos, mySession) {
+ var _self = this;
+
+ if (!mySession.markerAnchors) mySession.markerAnchors = [];
+ this.removeMarkers(mySession);
+ mySession.languageAnnos = [];
+ annos.forEach(function(anno) {
+ var anchor = new Anchor(mySession.getDocument(), anno.pos.sl, anno.pos.sc || 0);
+ mySession.markerAnchors.push(anchor);
+ var markerId;
+ var colDiff = anno.pos.ec - anno.pos.sc;
+ var rowDiff = anno.pos.el - anno.pos.sl;
+ var gutterAnno = {
+ guttertext: anno.message,
+ type: anno.level || "warning",
+ text: anno.message
+ };
+
+ function updateFloat(single) {
+ if (markerId)
+ mySession.removeMarker(markerId);
+ gutterAnno.row = anchor.row;
+ if (anno.pos.sc !== undefined && anno.pos.ec !== undefined) {
+ var range = new Range(anno.pos.sl, anno.pos.sc, anno.pos.el, anno.pos.ec);
+ markerId = mySession.addMarker(range, "language_highlight_" + (anno.type ? anno.type : "default"));
+ }
+ if (single) mySession.setAnnotations(mySession.languageAnnos);
+ }
+ updateFloat();
+ anchor.on("change", function() {
+ updateFloat(true);
+ });
+ if (anno.message) mySession.languageAnnos.push(gutterAnno);
+ });
+ mySession.setAnnotations(mySession.languageAnnos);
+ };
+
+ this.$id = "ace/mode/jsoniq";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-jsp.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-jsp.js
new file mode 100644
index 00000000..ad13aed5
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-jsp.js
@@ -0,0 +1,1388 @@
+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 supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+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) {
+"use strict";
+
+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", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\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"
+ }, {
+ defaultToken : "comment"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JavaHighlightRules, TextHighlightRules);
+
+exports.JavaHighlightRules = JavaHighlightRules;
+});
+
+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) {
+"use strict";
+
+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);
+
+ var builtinVariables = 'request|response|out|session|' +
+ 'application|config|pageContext|page|Exception';
+
+ var keywords = 'page|include|taglib';
+
+ var startRules = [
+ {
+ token : "comment",
+ regex : "<%--",
+ push : "jsp-dcomment"
+ }, {
+ token : "meta.tag", // jsp open tag
+ regex : "<%@?|<%=?|<%!?|<jsp:[^>]+>",
+ push : "jsp-start"
+ }
+ ];
+
+ var endRules = [
+ {
+ token : "meta.tag", // jsp close tag
+ regex : "%>|<\\/jsp:[^>]+>",
+ next : "pop"
+ }, {
+ token: "variable.language",
+ regex : builtinVariables
+ }, {
+ token: "keyword",
+ regex : keywords
+ }
+ ];
+
+ for (var key in this.$rules)
+ this.$rules[key].unshift.apply(this.$rules[key], startRules);
+
+ this.embedRules(JavaHighlightRules, "jsp-", endRules, ["start"]);
+
+ this.addRules({
+ "jsp-dcomment" : [{
+ token : "comment",
+ regex : ".*?--%>",
+ next : "pop"
+ }]
+ });
+
+ this.normalizeRules();
+};
+
+oop.inherits(JspHighlightRules, HtmlHighlightRules);
+
+exports.JspHighlightRules = JspHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/jsp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jsp_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 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() {
+ this.HighlightRules = JspHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.$id = "ace/mode/jsp";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-jsx.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-jsx.js
new file mode 100644
index 00000000..3f3d3e4b
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-jsx.js
@@ -0,0 +1,404 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/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"
+ }, {
+ defaultToken : "comment"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(JsxHighlightRules, TextHighlightRules);
+
+exports.JsxHighlightRules = JsxHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/jsx",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jsx_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 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.HighlightRules = JsxHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+}
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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.$id = "ace/mode/jsx";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-julia.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-julia.js
new file mode 100644
index 00000000..ee1e88ab
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-julia.js
@@ -0,0 +1,296 @@
+ace.define("ace/mode/julia_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 JuliaHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { include: '#function_decl' },
+ { include: '#function_call' },
+ { include: '#type_decl' },
+ { include: '#keyword' },
+ { include: '#operator' },
+ { include: '#number' },
+ { include: '#string' },
+ { include: '#comment' } ],
+ '#bracket':
+ [ { token: 'keyword.bracket.julia',
+ regex: '\\(|\\)|\\[|\\]|\\{|\\}|,' } ],
+ '#comment':
+ [ { token:
+ [ 'punctuation.definition.comment.julia',
+ 'comment.line.number-sign.julia' ],
+ regex: '(#)(?!\\{)(.*$)'} ],
+ '#function_call':
+ [ { token: [ 'support.function.julia', 'text' ],
+ regex: '([a-zA-Z0-9_]+!?)([\\w\\xff-\\u218e\\u2455-\\uffff]*\\()'} ],
+ '#function_decl':
+ [ { token: [ 'keyword.other.julia', 'meta.function.julia',
+ 'entity.name.function.julia', 'meta.function.julia','text' ],
+ regex: '(function|macro)(\\s*)([a-zA-Z0-9_\\{]+!?)([\\w\\xff-\\u218e\\u2455-\\uffff]*)([(\\\\{])'} ],
+ '#keyword':
+ [ { token: 'keyword.other.julia',
+ regex: '\\b(?:function|type|immutable|macro|quote|abstract|bitstype|typealias|module|baremodule|new)\\b' },
+ { token: 'keyword.control.julia',
+ regex: '\\b(?:if|else|elseif|while|for|in|begin|let|end|do|try|catch|finally|return|break|continue)\\b' },
+ { token: 'storage.modifier.variable.julia',
+ regex: '\\b(?:global|local|const|export|import|importall|using)\\b' },
+ { token: 'variable.macro.julia', regex: '@[\\w\\xff-\\u218e\\u2455-\\uffff]+\\b' } ],
+ '#number':
+ [ { token: 'constant.numeric.julia',
+ regex: '\\b0(?:x|X)[0-9a-fA-F]*|(?:\\b[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]*)?(?:im)?|\\bInf(?:32)?\\b|\\bNaN(?:32)?\\b|\\btrue\\b|\\bfalse\\b' } ],
+ '#operator':
+ [ { token: 'keyword.operator.update.julia',
+ regex: '=|:=|\\+=|-=|\\*=|/=|//=|\\.//=|\\.\\*=|\\\\=|\\.\\\\=|^=|\\.^=|%=|\\|=|&=|\\$=|<<=|>>=' },
+ { token: 'keyword.operator.ternary.julia', regex: '\\?|:' },
+ { token: 'keyword.operator.boolean.julia',
+ regex: '\\|\\||&&|!' },
+ { token: 'keyword.operator.arrow.julia', regex: '->|<-|-->' },
+ { token: 'keyword.operator.relation.julia',
+ regex: '>|<|>=|<=|==|!=|\\.>|\\.<|\\.>=|\\.>=|\\.==|\\.!=|\\.=|\\.!|<:|:>' },
+ { token: 'keyword.operator.range.julia', regex: ':' },
+ { token: 'keyword.operator.shift.julia', regex: '<<|>>' },
+ { token: 'keyword.operator.bitwise.julia', regex: '\\||\\&|~' },
+ { token: 'keyword.operator.arithmetic.julia',
+ regex: '\\+|-|\\*|\\.\\*|/|\\./|//|\\.//|%|\\.%|\\\\|\\.\\\\|\\^|\\.\\^' },
+ { token: 'keyword.operator.isa.julia', regex: '::' },
+ { token: 'keyword.operator.dots.julia',
+ regex: '\\.(?=[a-zA-Z])|\\.\\.+' },
+ { token: 'keyword.operator.interpolation.julia',
+ regex: '\\$#?(?=.)' },
+ { token: [ 'variable', 'keyword.operator.transposed-variable.julia' ],
+ regex: '([\\w\\xff-\\u218e\\u2455-\\uffff]+)((?:\'|\\.\')*\\.?\')' },
+ { token: 'text',
+ regex: '\\[|\\('},
+ { token: [ 'text', 'keyword.operator.transposed-matrix.julia' ],
+ regex: "([\\]\\)])((?:'|\\.')*\\.?')"} ],
+ '#string':
+ [ { token: 'punctuation.definition.string.begin.julia',
+ regex: '\'',
+ push:
+ [ { token: 'punctuation.definition.string.end.julia',
+ regex: '\'',
+ next: 'pop' },
+ { include: '#string_escaped_char' },
+ { defaultToken: 'string.quoted.single.julia' } ] },
+ { token: 'punctuation.definition.string.begin.julia',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.julia',
+ regex: '"',
+ next: 'pop' },
+ { include: '#string_escaped_char' },
+ { defaultToken: 'string.quoted.double.julia' } ] },
+ { token: 'punctuation.definition.string.begin.julia',
+ regex: '\\b[\\w\\xff-\\u218e\\u2455-\\uffff]+"',
+ push:
+ [ { token: 'punctuation.definition.string.end.julia',
+ regex: '"[\\w\\xff-\\u218e\\u2455-\\uffff]*',
+ next: 'pop' },
+ { include: '#string_custom_escaped_char' },
+ { defaultToken: 'string.quoted.custom-double.julia' } ] },
+ { token: 'punctuation.definition.string.begin.julia',
+ regex: '`',
+ push:
+ [ { token: 'punctuation.definition.string.end.julia',
+ regex: '`',
+ next: 'pop' },
+ { include: '#string_escaped_char' },
+ { defaultToken: 'string.quoted.backtick.julia' } ] } ],
+ '#string_custom_escaped_char': [ { token: 'constant.character.escape.julia', regex: '\\\\"' } ],
+ '#string_escaped_char':
+ [ { token: 'constant.character.escape.julia',
+ regex: '\\\\(?:\\\\|[0-3]\\d{,2}|[4-7]\\d?|x[a-fA-F0-9]{,2}|u[a-fA-F0-9]{,4}|U[a-fA-F0-9]{,8}|.)' } ],
+ '#type_decl':
+ [ { token:
+ [ 'keyword.control.type.julia',
+ 'meta.type.julia',
+ 'entity.name.type.julia',
+ 'entity.other.inherited-class.julia',
+ 'punctuation.separator.inheritance.julia',
+ 'entity.other.inherited-class.julia' ],
+ regex: '(type|immutable)(\\s+)([a-zA-Z0-9_]+)(?:(\\s*)(<:)(\\s*[.a-zA-Z0-9_:]+))?' },
+ { token: [ 'other.typed-variable.julia', 'support.type.julia' ],
+ regex: '([a-zA-Z0-9_]+)(::[a-zA-Z0-9_{}]+)' } ] }
+
+ this.normalizeRules();
+};
+
+JuliaHighlightRules.metaData = { fileTypes: [ 'jl' ],
+ firstLineMatch: '^#!.*\\bjulia\\s*$',
+ foldingStartMarker: '^\\s*(?:if|while|for|begin|function|macro|module|baremodule|type|immutable|let)\\b(?!.*\\bend\\b).*$',
+ foldingStopMarker: '^\\s*(?:end)\\b.*$',
+ name: 'Julia',
+ scopeName: 'source.julia' }
+
+
+oop.inherits(JuliaHighlightRules, TextHighlightRules);
+
+exports.JuliaHighlightRules = JuliaHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/julia",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/julia_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JuliaHighlightRules = require("./julia_highlight_rules").JuliaHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = JuliaHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.blockComment = "";
+ this.$id = "ace/mode/julia";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-kotlin.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-kotlin.js
new file mode 100644
index 00000000..2621bae8
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-kotlin.js
@@ -0,0 +1,786 @@
+ace.define("ace/mode/kotlin_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 KotlinHighlightRules = function() {
+
+ this.$rules = {
+ start: [{
+ include: "#comments"
+ }, {
+ token: [
+ "text",
+ "keyword.other.kotlin",
+ "text",
+ "entity.name.package.kotlin",
+ "text"
+ ],
+ regex: /^(\s*)(package)\b(?:(\s*)([^ ;$]+)(\s*))?/
+ }, {
+ include: "#imports"
+ }, {
+ include: "#statements"
+ }],
+ "#classes": [{
+ token: "text",
+ regex: /(?=\s*(?:companion|class|object|interface))/,
+ push: [{
+ token: "text",
+ regex: /}|(?=$)/,
+ next: "pop"
+ }, {
+ token: ["keyword.other.kotlin", "text"],
+ regex: /\b((?:companion\s*)?)(class|object|interface)\b/,
+ push: [{
+ token: "text",
+ regex: /(?=<|{|\(|:)/,
+ next: "pop"
+ }, {
+ token: "keyword.other.kotlin",
+ regex: /\bobject\b/
+ }, {
+ token: "entity.name.type.class.kotlin",
+ regex: /\w+/
+ }]
+ }, {
+ token: "text",
+ regex: /</,
+ push: [{
+ token: "text",
+ regex: />/,
+ next: "pop"
+ }, {
+ include: "#generics"
+ }]
+ }, {
+ token: "text",
+ regex: /\(/,
+ push: [{
+ token: "text",
+ regex: /\)/,
+ next: "pop"
+ }, {
+ include: "#parameters"
+ }]
+ }, {
+ token: "keyword.operator.declaration.kotlin",
+ regex: /:/,
+ push: [{
+ token: "text",
+ regex: /(?={|$)/,
+ next: "pop"
+ }, {
+ token: "entity.other.inherited-class.kotlin",
+ regex: /\w+/
+ }, {
+ token: "text",
+ regex: /\(/,
+ push: [{
+ token: "text",
+ regex: /\)/,
+ next: "pop"
+ }, {
+ include: "#expressions"
+ }]
+ }]
+ }, {
+ token: "text",
+ regex: /\{/,
+ push: [{
+ token: "text",
+ regex: /\}/,
+ next: "pop"
+ }, {
+ include: "#statements"
+ }]
+ }]
+ }],
+ "#comments": [{
+ token: "punctuation.definition.comment.kotlin",
+ regex: /\/\*/,
+ push: [{
+ token: "punctuation.definition.comment.kotlin",
+ regex: /\*\//,
+ next: "pop"
+ }, {
+ defaultToken: "comment.block.kotlin"
+ }]
+ }, {
+ token: [
+ "text",
+ "punctuation.definition.comment.kotlin",
+ "comment.line.double-slash.kotlin"
+ ],
+ regex: /(\s*)(\/\/)(.*$)/
+ }],
+ "#constants": [{
+ token: "constant.language.kotlin",
+ regex: /\b(?:true|false|null|this|super)\b/
+ }, {
+ token: "constant.numeric.kotlin",
+ regex: /\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:(?:e|E)(?:\+|-)?[0-9]+)?)(?:[LlFfUuDd]|UL|ul)?\b/
+ }, {
+ token: "constant.other.kotlin",
+ regex: /\b[A-Z][A-Z0-9_]+\b/
+ }],
+ "#expressions": [{
+ token: "text",
+ regex: /\(/,
+ push: [{
+ token: "text",
+ regex: /\)/,
+ next: "pop"
+ }, {
+ include: "#expressions"
+ }]
+ }, {
+ include: "#types"
+ }, {
+ include: "#strings"
+ }, {
+ include: "#constants"
+ }, {
+ include: "#comments"
+ }, {
+ include: "#keywords"
+ }],
+ "#functions": [{
+ token: "text",
+ regex: /(?=\s*fun)/,
+ push: [{
+ token: "text",
+ regex: /}|(?=$)/,
+ next: "pop"
+ }, {
+ token: "keyword.other.kotlin",
+ regex: /\bfun\b/,
+ push: [{
+ token: "text",
+ regex: /(?=\()/,
+ next: "pop"
+ }, {
+ token: "text",
+ regex: /</,
+ push: [{
+ token: "text",
+ regex: />/,
+ next: "pop"
+ }, {
+ include: "#generics"
+ }]
+ }, {
+ token: ["text", "entity.name.function.kotlin"],
+ regex: /((?:[\.<\?>\w]+\.)?)(\w+)/
+ }]
+ }, {
+ token: "text",
+ regex: /\(/,
+ push: [{
+ token: "text",
+ regex: /\)/,
+ next: "pop"
+ }, {
+ include: "#parameters"
+ }]
+ }, {
+ token: "keyword.operator.declaration.kotlin",
+ regex: /:/,
+ push: [{
+ token: "text",
+ regex: /(?={|=|$)/,
+ next: "pop"
+ }, {
+ include: "#types"
+ }]
+ }, {
+ token: "text",
+ regex: /\{/,
+ push: [{
+ token: "text",
+ regex: /(?=\})/,
+ next: "pop"
+ }, {
+ include: "#statements"
+ }]
+ }, {
+ token: "keyword.operator.assignment.kotlin",
+ regex: /=/,
+ push: [{
+ token: "text",
+ regex: /(?=$)/,
+ next: "pop"
+ }, {
+ include: "#expressions"
+ }]
+ }]
+ }],
+ "#generics": [{
+ token: "keyword.operator.declaration.kotlin",
+ regex: /:/,
+ push: [{
+ token: "text",
+ regex: /(?=,|>)/,
+ next: "pop"
+ }, {
+ include: "#types"
+ }]
+ }, {
+ include: "#keywords"
+ }, {
+ token: "storage.type.generic.kotlin",
+ regex: /\w+/
+ }],
+ "#getters-and-setters": [{
+ token: ["entity.name.function.kotlin", "text"],
+ regex: /\b(get)\b(\s*\(\s*\))/,
+ push: [{
+ token: "text",
+ regex: /\}|(?=\bset\b)|$/,
+ next: "pop"
+ }, {
+ token: "keyword.operator.assignment.kotlin",
+ regex: /=/,
+ push: [{
+ token: "text",
+ regex: /(?=$|\bset\b)/,
+ next: "pop"
+ }, {
+ include: "#expressions"
+ }]
+ }, {
+ token: "text",
+ regex: /\{/,
+ push: [{
+ token: "text",
+ regex: /\}/,
+ next: "pop"
+ }, {
+ include: "#expressions"
+ }]
+ }]
+ }, {
+ token: ["entity.name.function.kotlin", "text"],
+ regex: /\b(set)\b(\s*)(?=\()/,
+ push: [{
+ token: "text",
+ regex: /\}|(?=\bget\b)|$/,
+ next: "pop"
+ }, {
+ token: "text",
+ regex: /\(/,
+ push: [{
+ token: "text",
+ regex: /\)/,
+ next: "pop"
+ }, {
+ include: "#parameters"
+ }]
+ }, {
+ token: "keyword.operator.assignment.kotlin",
+ regex: /=/,
+ push: [{
+ token: "text",
+ regex: /(?=$|\bset\b)/,
+ next: "pop"
+ }, {
+ include: "#expressions"
+ }]
+ }, {
+ token: "text",
+ regex: /\{/,
+ push: [{
+ token: "text",
+ regex: /\}/,
+ next: "pop"
+ }, {
+ include: "#expressions"
+ }]
+ }]
+ }],
+ "#imports": [{
+ token: [
+ "text",
+ "keyword.other.kotlin",
+ "text",
+ "keyword.other.kotlin"
+ ],
+ regex: /^(\s*)(import)(\s+[^ $]+\s+)((?:as)?)/
+ }],
+ "#keywords": [{
+ token: "storage.modifier.kotlin",
+ regex: /\b(?:var|val|public|private|protected|abstract|final|enum|open|attribute|annotation|override|inline|var|val|vararg|lazy|in|out|internal|data|tailrec|operator|infix|const|yield|typealias|typeof)\b/
+ }, {
+ token: "keyword.control.catch-exception.kotlin",
+ regex: /\b(?:try|catch|finally|throw)\b/
+ }, {
+ token: "keyword.control.kotlin",
+ regex: /\b(?:if|else|while|for|do|return|when|where|break|continue)\b/
+ }, {
+ token: "keyword.operator.kotlin",
+ regex: /\b(?:in|is|as|assert)\b/
+ }, {
+ token: "keyword.operator.comparison.kotlin",
+ regex: /==|!=|===|!==|<=|>=|<|>/
+ }, {
+ token: "keyword.operator.assignment.kotlin",
+ regex: /=/
+ }, {
+ token: "keyword.operator.declaration.kotlin",
+ regex: /:/
+ }, {
+ token: "keyword.operator.dot.kotlin",
+ regex: /\./
+ }, {
+ token: "keyword.operator.increment-decrement.kotlin",
+ regex: /\-\-|\+\+/
+ }, {
+ token: "keyword.operator.arithmetic.kotlin",
+ regex: /\-|\+|\*|\/|%/
+ }, {
+ token: "keyword.operator.arithmetic.assign.kotlin",
+ regex: /\+=|\-=|\*=|\/=/
+ }, {
+ token: "keyword.operator.logical.kotlin",
+ regex: /!|&&|\|\|/
+ }, {
+ token: "keyword.operator.range.kotlin",
+ regex: /\.\./
+ }, {
+ token: "punctuation.terminator.kotlin",
+ regex: /;/
+ }],
+ "#namespaces": [{
+ token: "keyword.other.kotlin",
+ regex: /\bnamespace\b/
+ }, {
+ token: "text",
+ regex: /\{/,
+ push: [{
+ token: "text",
+ regex: /\}/,
+ next: "pop"
+ }, {
+ include: "#statements"
+ }]
+ }],
+ "#parameters": [{
+ token: "keyword.operator.declaration.kotlin",
+ regex: /:/,
+ push: [{
+ token: "text",
+ regex: /(?=,|\)|=)/,
+ next: "pop"
+ }, {
+ include: "#types"
+ }]
+ }, {
+ token: "keyword.operator.declaration.kotlin",
+ regex: /=/,
+ push: [{
+ token: "text",
+ regex: /(?=,|\))/,
+ next: "pop"
+ }, {
+ include: "#expressions"
+ }]
+ }, {
+ include: "#keywords"
+ }, {
+ token: "variable.parameter.function.kotlin",
+ regex: /\w+/
+ }],
+ "#statements": [{
+ include: "#namespaces"
+ }, {
+ include: "#typedefs"
+ }, {
+ include: "#classes"
+ }, {
+ include: "#functions"
+ }, {
+ include: "#variables"
+ }, {
+ include: "#getters-and-setters"
+ }, {
+ include: "#expressions"
+ }],
+ "#strings": [{
+ token: "punctuation.definition.string.begin.kotlin",
+ regex: /"""/,
+ push: [{
+ token: "punctuation.definition.string.end.kotlin",
+ regex: /"""/,
+ next: "pop"
+ }, {
+ token: "variable.parameter.template.kotlin",
+ regex: /\$\w+|\$\{[^\}]+\}/
+ }, {
+ token: "constant.character.escape.kotlin",
+ regex: /\\./
+ }, {
+ defaultToken: "string.quoted.third.kotlin"
+ }]
+ }, {
+ token: "punctuation.definition.string.begin.kotlin",
+ regex: /"/,
+ push: [{
+ token: "punctuation.definition.string.end.kotlin",
+ regex: /"/,
+ next: "pop"
+ }, {
+ token: "variable.parameter.template.kotlin",
+ regex: /\$\w+|\$\{[^\}]+\}/
+ }, {
+ token: "constant.character.escape.kotlin",
+ regex: /\\./
+ }, {
+ defaultToken: "string.quoted.double.kotlin"
+ }]
+ }, {
+ token: "punctuation.definition.string.begin.kotlin",
+ regex: /'/,
+ push: [{
+ token: "punctuation.definition.string.end.kotlin",
+ regex: /'/,
+ next: "pop"
+ }, {
+ token: "constant.character.escape.kotlin",
+ regex: /\\./
+ }, {
+ defaultToken: "string.quoted.single.kotlin"
+ }]
+ }, {
+ token: "punctuation.definition.string.begin.kotlin",
+ regex: /`/,
+ push: [{
+ token: "punctuation.definition.string.end.kotlin",
+ regex: /`/,
+ next: "pop"
+ }, {
+ defaultToken: "string.quoted.single.kotlin"
+ }]
+ }],
+ "#typedefs": [{
+ token: "text",
+ regex: /(?=\s*type)/,
+ push: [{
+ token: "text",
+ regex: /(?=$)/,
+ next: "pop"
+ }, {
+ token: "keyword.other.kotlin",
+ regex: /\btype\b/
+ }, {
+ token: "text",
+ regex: /</,
+ push: [{
+ token: "text",
+ regex: />/,
+ next: "pop"
+ }, {
+ include: "#generics"
+ }]
+ }, {
+ include: "#expressions"
+ }]
+ }],
+ "#types": [{
+ token: "storage.type.buildin.kotlin",
+ regex: /\b(?:Any|Unit|String|Int|Boolean|Char|Long|Double|Float|Short|Byte|dynamic)\b/
+ }, {
+ token: "storage.type.buildin.array.kotlin",
+ regex: /\b(?:IntArray|BooleanArray|CharArray|LongArray|DoubleArray|FloatArray|ShortArray|ByteArray)\b/
+ }, {
+ token: [
+ "storage.type.buildin.collection.kotlin",
+ "text"
+ ],
+ regex: /\b(Array|List|Map)(<\b)/,
+ push: [{
+ token: "text",
+ regex: />/,
+ next: "pop"
+ }, {
+ include: "#types"
+ }, {
+ include: "#keywords"
+ }]
+ }, {
+ token: "text",
+ regex: /\w+</,
+ push: [{
+ token: "text",
+ regex: />/,
+ next: "pop"
+ }, {
+ include: "#types"
+ }, {
+ include: "#keywords"
+ }]
+ }, {
+ token: ["keyword.operator.tuple.kotlin", "text"],
+ regex: /(#)(\()/,
+ push: [{
+ token: "text",
+ regex: /\)/,
+ next: "pop"
+ }, {
+ include: "#expressions"
+ }]
+ }, {
+ token: "text",
+ regex: /\{/,
+ push: [{
+ token: "text",
+ regex: /\}/,
+ next: "pop"
+ }, {
+ include: "#statements"
+ }]
+ }, {
+ token: "text",
+ regex: /\(/,
+ push: [{
+ token: "text",
+ regex: /\)/,
+ next: "pop"
+ }, {
+ include: "#types"
+ }]
+ }, {
+ token: "keyword.operator.declaration.kotlin",
+ regex: /->/
+ }],
+ "#variables": [{
+ token: "text",
+ regex: /(?=\s*(?:var|val))/,
+ push: [{
+ token: "text",
+ regex: /(?=:|=|$)/,
+ next: "pop"
+ }, {
+ token: "keyword.other.kotlin",
+ regex: /\b(?:var|val)\b/,
+ push: [{
+ token: "text",
+ regex: /(?=:|=|$)/,
+ next: "pop"
+ }, {
+ token: "text",
+ regex: /</,
+ push: [{
+ token: "text",
+ regex: />/,
+ next: "pop"
+ }, {
+ include: "#generics"
+ }]
+ }, {
+ token: ["text", "entity.name.variable.kotlin"],
+ regex: /((?:[\.<\?>\w]+\.)?)(\w+)/
+ }]
+ }, {
+ token: "keyword.operator.declaration.kotlin",
+ regex: /:/,
+ push: [{
+ token: "text",
+ regex: /(?==|$)/,
+ next: "pop"
+ }, {
+ include: "#types"
+ }, {
+ include: "#getters-and-setters"
+ }]
+ }, {
+ token: "keyword.operator.assignment.kotlin",
+ regex: /=/,
+ push: [{
+ token: "text",
+ regex: /(?=$)/,
+ next: "pop"
+ }, {
+ include: "#expressions"
+ }, {
+ include: "#getters-and-setters"
+ }]
+ }]
+ }]
+ }
+
+ this.normalizeRules();
+};
+
+KotlinHighlightRules.metaData = {
+ fileTypes: ["kt", "kts"],
+ name: "Kotlin",
+ scopeName: "source.Kotlin"
+}
+
+
+oop.inherits(KotlinHighlightRules, TextHighlightRules);
+
+exports.KotlinHighlightRules = KotlinHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/kotlin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/kotlin_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var KotlinHighlightRules = require("./kotlin_highlight_rules").KotlinHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = KotlinHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.$id = "ace/mode/kotlin"
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-latex.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-latex.js
new file mode 100644
index 00000000..db79d0a5
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-latex.js
@@ -0,0 +1,289 @@
+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" : [{
+ token : "comment",
+ regex : "%.*$"
+ }, {
+ token : ["keyword", "lparen", "variable.parameter", "rparen", "lparen", "storage.type", "rparen"],
+ regex : "(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})"
+ }, {
+ token : ["keyword","lparen", "variable.parameter", "rparen"],
+ regex : "(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?"
+ }, {
+ token : ["storage.type", "lparen", "variable.parameter", "rparen"],
+ regex : "(\\\\begin)({)(verbatim)(})",
+ next : "verbatim"
+ }, {
+ token : ["storage.type", "lparen", "variable.parameter", "rparen"],
+ regex : "(\\\\begin)({)(lstlisting)(})",
+ next : "lstlisting"
+ }, {
+ token : ["storage.type", "lparen", "variable.parameter", "rparen"],
+ regex : "(\\\\(?:begin|end))({)([\\w*]*)(})"
+ }, {
+ token : "storage.type",
+ regex : /\\verb\b\*?/,
+ next : [{
+ token : ["keyword.operator", "string", "keyword.operator"],
+ regex : "(.)(.*?)(\\1|$)|",
+ next : "start"
+ }]
+ }, {
+ token : "storage.type",
+ regex : "\\\\[a-zA-Z]+"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "constant.character.escape",
+ regex : "\\\\[^a-zA-Z]?"
+ }, {
+ token : "string",
+ regex : "\\${1,2}",
+ next : "equation"
+ }],
+ "equation" : [{
+ token : "comment",
+ regex : "%.*$"
+ }, {
+ token : "string",
+ regex : "\\${1,2}",
+ next : "start"
+ }, {
+ token : "constant.character.escape",
+ regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
+ }, {
+ token : "error",
+ regex : "^\\s*$",
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }],
+ "verbatim": [{
+ token : ["storage.type", "lparen", "variable.parameter", "rparen"],
+ regex : "(\\\\end)({)(verbatim)(})",
+ next : "start"
+ }, {
+ defaultToken : "text"
+ }],
+ "lstlisting": [{
+ token : ["storage.type", "lparen", "variable.parameter", "rparen"],
+ regex : "(\\\\end)({)(lstlisting)(})",
+ next : "start"
+ }, {
+ defaultToken : "text"
+ }]
+ };
+
+ this.normalizeRules();
+};
+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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var BaseFoldMode = require("./fold_mode").FoldMode;
+var Range = require("../../range").Range;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var keywordLevels = {
+ "\\subparagraph": 1,
+ "\\paragraph": 2,
+ "\\subsubsubsection": 3,
+ "\\subsubsection": 4,
+ "\\subsection": 5,
+ "\\section": 6,
+ "\\chapter": 7,
+ "\\part": 8,
+ "\\begin": 9,
+ "\\end": 10
+};
+
+var FoldMode = exports.FoldMode = function() {};
+
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /^\s*\\(begin)|\s*\\(part|chapter|(?:sub)*(?:section|paragraph))\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, returnRange) {
+ var keywords = {
+ "\\begin": 1,
+ "\\end": -1
+ };
+
+ var stream = new TokenIterator(session, row, column);
+ var token = stream.getCurrentToken();
+ if (!token || !(token.type == "storage.type" || token.type == "constant.character.escape"))
+ 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 || !(token.type == "storage.type" || token.type == "constant.character.escape"))
+ 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;
+
+ if (dir == 1) {
+ stream.stepBackward();
+ stream.stepBackward();
+ }
+
+ if (returnRange)
+ return stream.getCurrentTokenRange();
+
+ 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 stream = new TokenIterator(session, row, column);
+ var token = stream.getCurrentToken();
+ if (!token || token.type != "storage.type")
+ return;
+
+ var startLevel = keywordLevels[token.value] || 0;
+ var stackDepth = 0
+ var endRow = row;
+
+ while(token = stream.stepForward()) {
+ if (token.type !== "storage.type")
+ continue;
+ var level = keywordLevels[token.value] || 0;
+
+ if (level >= 9) {
+ if (!stackDepth)
+ endRow = stream.getCurrentTokenRow() - 1;
+ stackDepth += level == 9 ? 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);
+
+});
+
+ace.define("ace/mode/latex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/latex_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/latex"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var LatexHighlightRules = require("./latex_highlight_rules").LatexHighlightRules;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var LatexFoldMode = require("./folding/latex").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = LatexHighlightRules;
+ this.foldingRules = new LatexFoldMode();
+ this.$behaviour = new CstyleBehaviour({ braces: true });
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.type = "text";
+
+ this.lineCommentStart = "%";
+
+ this.$id = "ace/mode/latex";
+
+ this.getMatching = function(session, row, column) {
+ if (row == undefined)
+ row = session.selection.lead
+ if (typeof row == "object") {
+ column = row.column;
+ row = row.row;
+ }
+
+ var startToken = session.getTokenAt(row, column);
+ if (!startToken)
+ return;
+ if (startToken.value == "\\begin" || startToken.value == "\\end") {
+ return this.foldingRules.latexBlock(session, row, column, true);
+ }
+ };
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-less.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-less.js
new file mode 100644
index 00000000..c407a097
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-less.js
@@ -0,0 +1,819 @@
+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 supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_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 CssHighlightRules = require('./css_highlight_rules');
+
+var LessHighlightRules = function() {
+
+
+ var keywordList = "@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|" +
+ "@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|" +
+ "or|and|when|not";
+
+ var keywords = keywordList.split('|');
+
+ var properties = CssHighlightRules.supportType.split('|');
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.constant": CssHighlightRules.supportConstant,
+ "keyword": keywordList,
+ "support.constant.color": CssHighlightRules.supportConstantColor,
+ "support.constant.fonts": CssHighlightRules.supportConstantFonts
+ }, "identifier", true);
+
+ 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", "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", // hex6 color
+ regex : "#[a-f0-9]{6}"
+ }, {
+ token : "constant.numeric", // hex3 color
+ regex : "#[a-f0-9]{3}"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token : ["support.function", "paren.lparen", "string", "paren.rparen"],
+ regex : "(url)(\\()(.*)(\\))"
+ }, {
+ token : ["support.function", "paren.lparen"],
+ regex : "(:extend|[a-z0-9_\\-]+)(\\()"
+ }, {
+ token : function(value) {
+ if (keywords.indexOf(value.toLowerCase()) > -1)
+ return "keyword";
+ else
+ return "variable";
+ },
+ regex : "[@\\$][a-z0-9_\\-@\\$]*\\b"
+ }, {
+ token : "variable",
+ regex : "[@\\$]\\{[a-z0-9_\\-@\\$]*\\}"
+ }, {
+ token : function(first, second) {
+ if(properties.indexOf(first.toLowerCase()) > -1) {
+ return ["support.type.property", "text"];
+ }
+ else {
+ return ["support.type.unknownProperty", "text"];
+ }
+ },
+ regex : "([a-z0-9-_]+)(\\s*:)"
+ }, {
+ token : "keyword",
+ regex : "&" // special case - always treat as keyword
+ }, {
+ token : keywordMapper,
+ 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-z_][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+"
+ }, {
+ caseInsensitive: true
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ]
+ };
+ this.normalizeRules();
+};
+
+oop.inherits(LessHighlightRules, TextHighlightRules);
+
+exports.LessHighlightRules = LessHighlightRules;
+
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/less",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/less_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/css_completions","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CssCompletions = require("./css_completions").CssCompletions;
+
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = LessHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions("ruleset", session, pos, prefix);
+ };
+
+ this.$id = "ace/mode/less";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-liquid.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-liquid.js
new file mode 100644
index 00000000..925ef305
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-liquid.js
@@ -0,0 +1,1184 @@
+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 supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/liquid_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var LiquidHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+ 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");
+ for (var rule in this.$rules) {
+ this.$rules[rule].unshift({
+ token : "variable",
+ regex : "{%",
+ push : "liquid-start"
+ }, {
+ token : "variable",
+ regex : "{{",
+ push : "liquid-start"
+ });
+ }
+
+ this.addRules({
+ "liquid-start" : [{
+ token: "variable",
+ regex: "}}",
+ next: "pop"
+ }, {
+ token: "variable",
+ regex: "%}",
+ next: "pop"
+ }, {
+ 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+"
+ }]
+ });
+
+ this.normalizeRules();
+};
+oop.inherits(LiquidHighlightRules, TextHighlightRules);
+
+exports.LiquidHighlightRules = LiquidHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/liquid",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/liquid_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var LiquidHighlightRules = require("./liquid_highlight_rules").LiquidHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function() {
+ this.HighlightRules = LiquidHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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);
+ };
+
+ this.$id = "ace/mode/liquid";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-lisp.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-lisp.js
new file mode 100644
index 00000000..fb0897d9
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-lisp.js
@@ -0,0 +1,105 @@
+ace.define("ace/mode/lisp_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 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 : '[^"\\\\]+'
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start"
+ }
+ ]
+}
+
+};
+
+oop.inherits(LispHighlightRules, TextHighlightRules);
+
+exports.LispHighlightRules = LispHighlightRules;
+});
+
+ace.define("ace/mode/lisp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lisp_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var LispHighlightRules = require("./lisp_highlight_rules").LispHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = LispHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ";";
+
+ this.$id = "ace/mode/lisp";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-livescript.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-livescript.js
new file mode 100644
index 00000000..0e480a91
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-livescript.js
@@ -0,0 +1,271 @@
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/livescript",["require","exports","module","ace/tokenizer","ace/mode/matching_brace_outdent","ace/mode/text"], function(require, exports, module){
+ var identifier, LiveScriptMode, keywordend, stringfill;
+ identifier = '(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*';
+ exports.Mode = LiveScriptMode = (function(superclass){
+ var indenter, prototype = extend$((import$(LiveScriptMode, superclass).displayName = 'LiveScriptMode', LiveScriptMode), superclass).prototype, constructor = LiveScriptMode;
+ function LiveScriptMode(){
+ var that;
+ this.$tokenizer = new (require('../tokenizer')).Tokenizer(LiveScriptMode.Rules);
+ if (that = require('../mode/matching_brace_outdent')) {
+ this.$outdent = new that.MatchingBraceOutdent;
+ }
+ this.$id = "ace/mode/livescript";
+ }
+ indenter = RegExp('(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*' + identifier + ')?))\\s*$');
+ prototype.getNextLineIndent = function(state, line, tab){
+ var indent, tokens;
+ indent = this.$getIndent(line);
+ tokens = this.$tokenizer.getLineTokens(line, state).tokens;
+ if (!(tokens.length && tokens[tokens.length - 1].type === 'comment')) {
+ if (state === 'start' && indenter.test(line)) {
+ indent += tab;
+ }
+ }
+ return indent;
+ };
+ prototype.lineCommentStart = "#";
+ prototype.blockComment = {start: "###", end: "###"};
+ prototype.checkOutdent = function(state, line, input){
+ var ref$;
+ return (ref$ = this.$outdent) != null ? ref$.checkOutdent(line, input) : void 8;
+ };
+ prototype.autoOutdent = function(state, doc, row){
+ var ref$;
+ return (ref$ = this.$outdent) != null ? ref$.autoOutdent(doc, row) : void 8;
+ };
+ return LiveScriptMode;
+ }(require('../mode/text').Mode));
+ keywordend = '(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))';
+ stringfill = {
+ defaultToken: 'string'
+ };
+ LiveScriptMode.Rules = {
+ start: [
+ {
+ token: 'keyword',
+ regex: '(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)' + keywordend
+ }, {
+ token: 'constant.language',
+ regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend
+ }, {
+ token: 'invalid.illegal',
+ regex: '(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)' + keywordend
+ }, {
+ token: 'language.support.class',
+ regex: '(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)' + keywordend
+ }, {
+ token: 'language.support.function',
+ regex: '(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)' + keywordend
+ }, {
+ token: 'variable.language',
+ regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend
+ }, {
+ token: 'identifier',
+ regex: identifier + '\\s*:(?![:=])'
+ }, {
+ token: 'variable',
+ regex: identifier
+ }, {
+ token: 'keyword.operator',
+ regex: '(?:\\.{3}|\\s+\\?)'
+ }, {
+ token: 'keyword.variable',
+ regex: '(?:@+|::|\\.\\.)',
+ next: 'key'
+ }, {
+ token: 'keyword.operator',
+ regex: '\\.\\s*',
+ next: 'key'
+ }, {
+ token: 'string',
+ regex: '\\\\\\S[^\\s,;)}\\]]*'
+ }, {
+ token: 'string.doc',
+ regex: '\'\'\'',
+ next: 'qdoc'
+ }, {
+ token: 'string.doc',
+ regex: '"""',
+ next: 'qqdoc'
+ }, {
+ token: 'string',
+ regex: '\'',
+ next: 'qstring'
+ }, {
+ token: 'string',
+ regex: '"',
+ next: 'qqstring'
+ }, {
+ token: 'string',
+ regex: '`',
+ next: 'js'
+ }, {
+ token: 'string',
+ regex: '<\\[',
+ next: 'words'
+ }, {
+ token: 'string.regex',
+ regex: '//',
+ next: 'heregex'
+ }, {
+ token: 'comment.doc',
+ regex: '/\\*',
+ next: 'comment'
+ }, {
+ token: 'comment',
+ regex: '#.*'
+ }, {
+ token: 'string.regex',
+ regex: '\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}',
+ next: 'key'
+ }, {
+ token: 'constant.numeric',
+ regex: '(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)'
+ }, {
+ token: 'lparen',
+ regex: '[({[]'
+ }, {
+ token: 'rparen',
+ regex: '[)}\\]]',
+ next: 'key'
+ }, {
+ token: 'keyword.operator',
+ regex: '[\\^!|&%+\\-]+'
+ }, {
+ token: 'text',
+ regex: '\\s+'
+ }
+ ],
+ heregex: [
+ {
+ token: 'string.regex',
+ regex: '.*?//[gimy$?]{0,4}',
+ next: 'start'
+ }, {
+ token: 'string.regex',
+ regex: '\\s*#{'
+ }, {
+ token: 'comment.regex',
+ regex: '\\s+(?:#.*)?'
+ }, {
+ defaultToken: 'string.regex'
+ }
+ ],
+ key: [
+ {
+ token: 'keyword.operator',
+ regex: '[.?@!]+'
+ }, {
+ token: 'identifier',
+ regex: identifier,
+ next: 'start'
+ }, {
+ token: 'text',
+ regex: '',
+ next: 'start'
+ }
+ ],
+ comment: [
+ {
+ token: 'comment.doc',
+ regex: '.*?\\*/',
+ next: 'start'
+ }, {
+ defaultToken: 'comment.doc'
+ }
+ ],
+ qdoc: [
+ {
+ token: 'string',
+ regex: ".*?'''",
+ next: 'key'
+ }, stringfill
+ ],
+ qqdoc: [
+ {
+ token: 'string',
+ regex: '.*?"""',
+ next: 'key'
+ }, stringfill
+ ],
+ qstring: [
+ {
+ token: 'string',
+ regex: '[^\\\\\']*(?:\\\\.[^\\\\\']*)*\'',
+ next: 'key'
+ }, stringfill
+ ],
+ qqstring: [
+ {
+ token: 'string',
+ regex: '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',
+ next: 'key'
+ }, stringfill
+ ],
+ js: [
+ {
+ token: 'string',
+ regex: '[^\\\\`]*(?:\\\\.[^\\\\`]*)*`',
+ next: 'key'
+ }, stringfill
+ ],
+ words: [
+ {
+ token: 'string',
+ regex: '.*?\\]>',
+ next: 'key'
+ }, stringfill
+ ]
+ };
+function extend$(sub, sup){
+ function fun(){} fun.prototype = (sub.superclass = sup).prototype;
+ (sub.prototype = new fun).constructor = sub;
+ if (typeof sup.extended == 'function') sup.extended(sub);
+ return sub;
+}
+function import$(obj, src){
+ var own = {}.hasOwnProperty;
+ for (var key in src) if (own.call(src, key)) obj[key] = src[key];
+ return obj;
+}
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-logiql.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-logiql.js
new file mode 100644
index 00000000..f4ea30d0
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-logiql.js
@@ -0,0 +1,310 @@
+ace.define("ace/mode/logiql_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 LogiQLHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { token: 'comment.block',
+ regex: '/\\*',
+ push:
+ [ { token: 'comment.block', regex: '\\*/', next: 'pop' },
+ { defaultToken: 'comment.block' } ]
+ },
+ { token: 'comment.single',
+ regex: '//.*'
+ },
+ { token: 'constant.numeric',
+ regex: '\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?[fd]?'
+ },
+ { token: 'string',
+ regex: '"',
+ push:
+ [ { token: 'string', regex: '"', next: 'pop' },
+ { defaultToken: 'string' } ]
+ },
+ { token: 'constant.language',
+ regex: '\\b(true|false)\\b'
+ },
+ { token: 'entity.name.type.logicblox',
+ regex: '`[a-zA-Z_:]+(\\d|\\a)*\\b'
+ },
+ { token: 'keyword.start', regex: '->', comment: 'Constraint' },
+ { token: 'keyword.start', regex: '-->', comment: 'Level 1 Constraint'},
+ { token: 'keyword.start', regex: '<-', comment: 'Rule' },
+ { token: 'keyword.start', regex: '<--', comment: 'Level 1 Rule' },
+ { token: 'keyword.end', regex: '\\.', comment: 'Terminator' },
+ { token: 'keyword.other', regex: '!', comment: 'Negation' },
+ { token: 'keyword.other', regex: ',', comment: 'Conjunction' },
+ { token: 'keyword.other', regex: ';', comment: 'Disjunction' },
+ { token: 'keyword.operator', regex: '<=|>=|!=|<|>', comment: 'Equality'},
+ { token: 'keyword.other', regex: '@', comment: 'Equality' },
+ { token: 'keyword.operator', regex: '\\+|-|\\*|/', comment: 'Arithmetic operations'},
+ { token: 'keyword', regex: '::', comment: 'Colon colon' },
+ { token: 'support.function',
+ regex: '\\b(agg\\s*<<)',
+ push:
+ [ { include: '$self' },
+ { token: 'support.function',
+ regex: '>>',
+ next: 'pop' } ]
+ },
+ { token: 'storage.modifier',
+ regex: '\\b(lang:[\\w:]*)'
+ },
+ { token: [ 'storage.type', 'text' ],
+ regex: '(export|sealed|clauses|block|alias|alias_all)(\\s*\\()(?=`)'
+ },
+ { token: 'entity.name',
+ regex: '[a-zA-Z_][a-zA-Z_0-9:]*(@prev|@init|@final)?(?=(\\(|\\[))'
+ },
+ { token: 'variable.parameter',
+ regex: '([a-zA-Z][a-zA-Z_0-9]*|_)\\s*(?=(,|\\.|<-|->|\\)|\\]|=))'
+ } ] }
+
+ this.normalizeRules();
+};
+
+oop.inherits(LogiQLHighlightRules, TextHighlightRules);
+
+exports.LogiQLHighlightRules = LogiQLHighlightRules;
+});
+
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+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);
+
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/logiql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/logiql_highlight_rules","ace/mode/folding/coffee","ace/token_iterator","ace/range","ace/mode/behaviour/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var LogiQLHighlightRules = require("./logiql_highlight_rules").LogiQLHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+var TokenIterator = require("../token_iterator").TokenIterator;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function() {
+ this.HighlightRules = LogiQLHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+ if (/comment|string/.test(endState))
+ return indent;
+ if (tokens.length && tokens[tokens.length - 1].type == "comment.single")
+ return indent;
+
+ var match = line.match();
+ if (/(-->|<--|<-|->|{)\s*$/.test(line))
+ indent += tab;
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ if (this.$outdent.checkOutdent(line, input))
+ return true;
+
+ if (input !== "\n" && input !== "\r\n")
+ return false;
+
+ if (!/^\s+/.test(line))
+ return false;
+
+ return true;
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ if (this.$outdent.autoOutdent(doc, row))
+ return;
+ var prevLine = doc.getLine(row);
+ var match = prevLine.match(/^\s+/);
+ var column = prevLine.lastIndexOf(".") + 1;
+ if (!match || !row || !column) return 0;
+
+ var line = doc.getLine(row + 1);
+ var startRange = this.getMatching(doc, {row: row, column: column});
+ if (!startRange || startRange.start.row == row) return 0;
+
+ column = match[0].length;
+ var indent = this.$getIndent(doc.getLine(startRange.start.row));
+ doc.replace(new Range(row + 1, 0, row + 1, column), indent);
+ };
+
+ this.getMatching = function(session, row, column) {
+ if (row == undefined)
+ row = session.selection.lead
+ if (typeof row == "object") {
+ column = row.column;
+ row = row.row;
+ }
+
+ var startToken = session.getTokenAt(row, column);
+ var KW_START = "keyword.start", KW_END = "keyword.end";
+ var tok;
+ if (!startToken)
+ return;
+ if (startToken.type == KW_START) {
+ var it = new TokenIterator(session, row, column);
+ it.step = it.stepForward;
+ } else if (startToken.type == KW_END) {
+ var it = new TokenIterator(session, row, column);
+ it.step = it.stepBackward;
+ } else
+ return;
+
+ while (tok = it.step()) {
+ if (tok.type == KW_START || tok.type == KW_END)
+ break;
+ }
+ if (!tok || tok.type == startToken.type)
+ return;
+
+ var col = it.getCurrentTokenColumn();
+ var row = it.getCurrentTokenRow();
+ return new Range(row, col, row, col + tok.value.length);
+ };
+ this.$id = "ace/mode/logiql";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-lsl.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-lsl.js
new file mode 100644
index 00000000..2531f6e1
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-lsl.js
@@ -0,0 +1,335 @@
+ace.define("ace/mode/lsl_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;
+
+oop.inherits(LSLHighlightRules, TextHighlightRules);
+
+function LSLHighlightRules() {
+ var keywordMapper = this.createKeywordMapper({
+ "constant.language.float.lsl" : "DEG_TO_RAD|PI|PI_BY_TWO|RAD_TO_DEG|SQRT2|TWO_PI",
+ "constant.language.integer.lsl": "ACTIVE|AGENT|AGENT_ALWAYS_RUN|AGENT_ATTACHMENTS|AGENT_AUTOPILOT|AGENT_AWAY|AGENT_BUSY|AGENT_BY_LEGACY_NAME|AGENT_BY_USERNAME|AGENT_CROUCHING|AGENT_FLYING|AGENT_IN_AIR|AGENT_LIST_PARCEL|AGENT_LIST_PARCEL_OWNER|AGENT_LIST_REGION|AGENT_MOUSELOOK|AGENT_ON_OBJECT|AGENT_SCRIPTED|AGENT_SITTING|AGENT_TYPING|AGENT_WALKING|ALL_SIDES|ANIM_ON|ATTACH_AVATAR_CENTER|ATTACH_BACK|ATTACH_BELLY|ATTACH_CHEST|ATTACH_CHIN|ATTACH_HEAD|ATTACH_HUD_BOTTOM|ATTACH_HUD_BOTTOM_LEFT|ATTACH_HUD_BOTTOM_RIGHT|ATTACH_HUD_CENTER_1|ATTACH_HUD_CENTER_2|ATTACH_HUD_TOP_CENTER|ATTACH_HUD_TOP_LEFT|ATTACH_HUD_TOP_RIGHT|ATTACH_LEAR|ATTACH_LEFT_PEC|ATTACH_LEYE|ATTACH_LFOOT|ATTACH_LHAND|ATTACH_LHIP|ATTACH_LLARM|ATTACH_LLLEG|ATTACH_LSHOULDER|ATTACH_LUARM|ATTACH_LULEG|ATTACH_MOUTH|ATTACH_NECK|ATTACH_NOSE|ATTACH_PELVIS|ATTACH_REAR|ATTACH_REYE|ATTACH_RFOOT|ATTACH_RHAND|ATTACH_RHIP|ATTACH_RIGHT_PEC|ATTACH_RLARM|ATTACH_RLLEG|ATTACH_RSHOULDER|ATTACH_RUARM|ATTACH_RULEG|AVOID_CHARACTERS|AVOID_DYNAMIC_OBSTACLES|AVOID_NONE|CAMERA_ACTIVE|CAMERA_BEHINDNESS_ANGLE|CAMERA_BEHINDNESS_LAG|CAMERA_DISTANCE|CAMERA_FOCUS|CAMERA_FOCUS_LAG|CAMERA_FOCUS_LOCKED|CAMERA_FOCUS_OFFSET|CAMERA_FOCUS_THRESHOLD|CAMERA_PITCH|CAMERA_POSITION|CAMERA_POSITION_LAG|CAMERA_POSITION_LOCKED|CAMERA_POSITION_THRESHOLD|CHANGED_ALLOWED_DROP|CHANGED_COLOR|CHANGED_INVENTORY|CHANGED_LINK|CHANGED_MEDIA|CHANGED_OWNER|CHANGED_REGION|CHANGED_REGION_START|CHANGED_SCALE|CHANGED_SHAPE|CHANGED_TELEPORT|CHANGED_TEXTURE|CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES|CHARACTER_AVOIDANCE_MODE|CHARACTER_CMD_JUMP|CHARACTER_CMD_SMOOTH_STOP|CHARACTER_CMD_STOP|CHARACTER_DESIRED_SPEED|CHARACTER_DESIRED_TURN_SPEED|CHARACTER_LENGTH|CHARACTER_MAX_ACCEL|CHARACTER_MAX_DECEL|CHARACTER_MAX_SPEED|CHARACTER_MAX_TURN_RADIUS|CHARACTER_ORIENTATION|CHARACTER_RADIUS|CHARACTER_STAY_WITHIN_PARCEL|CHARACTER_TYPE|CHARACTER_TYPE_A|CHARACTER_TYPE_B|CHARACTER_TYPE_C|CHARACTER_TYPE_D|CHARACTER_TYPE_NONE|CLICK_ACTION_BUY|CLICK_ACTION_NONE|CLICK_ACTION_OPEN|CLICK_ACTION_OPEN_MEDIA|CLICK_ACTION_PAY|CLICK_ACTION_PLAY|CLICK_ACTION_SIT|CLICK_ACTION_TOUCH|CONTENT_TYPE_ATOM|CONTENT_TYPE_FORM|CONTENT_TYPE_HTML|CONTENT_TYPE_JSON|CONTENT_TYPE_LLSD|CONTENT_TYPE_RSS|CONTENT_TYPE_TEXT|CONTENT_TYPE_XHTML|CONTENT_TYPE_XML|CONTROL_BACK|CONTROL_DOWN|CONTROL_FWD|CONTROL_LBUTTON|CONTROL_LEFT|CONTROL_ML_LBUTTON|CONTROL_RIGHT|CONTROL_ROT_LEFT|CONTROL_ROT_RIGHT|CONTROL_UP|DATA_BORN|DATA_NAME|DATA_ONLINE|DATA_PAYINFO|DATA_SIM_POS|DATA_SIM_RATING|DATA_SIM_STATUS|DEBUG_CHANNEL|DENSITY|ERR_GENERIC|ERR_MALFORMED_PARAMS|ERR_PARCEL_PERMISSIONS|ERR_RUNTIME_PERMISSIONS|ERR_THROTTLED|ESTATE_ACCESS_ALLOWED_AGENT_ADD|ESTATE_ACCESS_ALLOWED_AGENT_REMOVE|ESTATE_ACCESS_ALLOWED_GROUP_ADD|ESTATE_ACCESS_ALLOWED_GROUP_REMOVE|ESTATE_ACCESS_BANNED_AGENT_ADD|ESTATE_ACCESS_BANNED_AGENT_REMOVE|FALSE|FORCE_DIRECT_PATH|FRICTION|GCNP_RADIUS|GCNP_STATIC|GRAVITY_MULTIPLIER|HORIZONTAL|HTTP_BODY_MAXLENGTH|HTTP_BODY_TRUNCATED|HTTP_CUSTOM_HEADER|HTTP_METHOD|HTTP_MIMETYPE|HTTP_PRAGMA_NO_CACHE|HTTP_VERBOSE_THROTTLE|HTTP_VERIFY_CERT|INVENTORY_ALL|INVENTORY_ANIMATION|INVENTORY_BODYPART|INVENTORY_CLOTHING|INVENTORY_GESTURE|INVENTORY_LANDMARK|INVENTORY_NONE|INVENTORY_NOTECARD|INVENTORY_OBJECT|INVENTORY_SCRIPT|INVENTORY_SOUND|INVENTORY_TEXTURE|JSON_APPEND|KFM_CMD_PAUSE|KFM_CMD_PLAY|KFM_CMD_SET_MODE|KFM_CMD_STOP|KFM_COMMAND|KFM_DATA|KFM_FORWARD|KFM_LOOP|KFM_MODE|KFM_PING_PONG|KFM_REVERSE|KFM_ROTATION|KFM_TRANSLATION|LAND_LEVEL|LAND_LOWER|LAND_NOISE|LAND_RAISE|LAND_REVERT|LAND_SMOOTH|LINK_ALL_CHILDREN|LINK_ALL_OTHERS|LINK_ROOT|LINK_SET|LINK_THIS|LIST_STAT_GEOMETRIC_MEAN|LIST_STAT_MAX|LIST_STAT_MEAN|LIST_STAT_MEDIAN|LIST_STAT_MIN|LIST_STAT_NUM_COUNT|LIST_STAT_RANGE|LIST_STAT_STD_DEV|LIST_STAT_SUM|LIST_STAT_SUM_SQUARES|LOOP|MASK_BASE|MASK_EVERYONE|MASK_GROUP|MASK_NEXT|MASK_OWNER|OBJECT_ATTACHED_POINT|OBJECT_BODY_SHAPE_TYPE|OBJECT_CHARACTER_TIME|OBJECT_CLICK_ACTION|OBJECT_CREATOR|OBJECT_DESC|OBJECT_GROUP|OBJECT_HOVER_HEIGHT|OBJECT_LAST_OWNER_ID|OBJECT_NAME|OBJECT_OWNER|OBJECT_PATHFINDING_TYPE|OBJECT_PHANTOM|OBJECT_PHYSICS|OBJECT_PHYSICS_COST|OBJECT_POS|OBJECT_PRIM_EQUIVALENCE|OBJECT_RENDER_WEIGHT|OBJECT_RETURN_PARCEL|OBJECT_RETURN_PARCEL_OWNER|OBJECT_RETURN_REGION|OBJECT_ROOT|OBJECT_ROT|OBJECT_RUNNING_SCRIPT_COUNT|OBJECT_SCRIPT_MEMORY|OBJECT_SCRIPT_TIME|OBJECT_SERVER_COST|OBJECT_STREAMING_COST|OBJECT_TEMP_ON_REZ|OBJECT_TOTAL_SCRIPT_COUNT|OBJECT_UNKNOWN_DETAIL|OBJECT_VELOCITY|OPT_AVATAR|OPT_CHARACTER|OPT_EXCLUSION_VOLUME|OPT_LEGACY_LINKSET|OPT_MATERIAL_VOLUME|OPT_OTHER|OPT_STATIC_OBSTACLE|OPT_WALKABLE|PARCEL_COUNT_GROUP|PARCEL_COUNT_OTHER|PARCEL_COUNT_OWNER|PARCEL_COUNT_SELECTED|PARCEL_COUNT_TEMP|PARCEL_COUNT_TOTAL|PARCEL_DETAILS_AREA|PARCEL_DETAILS_DESC|PARCEL_DETAILS_GROUP|PARCEL_DETAILS_ID|PARCEL_DETAILS_NAME|PARCEL_DETAILS_OWNER|PARCEL_DETAILS_SEE_AVATARS|PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS|PARCEL_FLAG_ALLOW_CREATE_OBJECTS|PARCEL_FLAG_ALLOW_DAMAGE|PARCEL_FLAG_ALLOW_FLY|PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_GROUP_SCRIPTS|PARCEL_FLAG_ALLOW_LANDMARK|PARCEL_FLAG_ALLOW_SCRIPTS|PARCEL_FLAG_ALLOW_TERRAFORM|PARCEL_FLAG_LOCAL_SOUND_ONLY|PARCEL_FLAG_RESTRICT_PUSHOBJECT|PARCEL_FLAG_USE_ACCESS_GROUP|PARCEL_FLAG_USE_ACCESS_LIST|PARCEL_FLAG_USE_BAN_LIST|PARCEL_FLAG_USE_LAND_PASS_LIST|PARCEL_MEDIA_COMMAND_AGENT|PARCEL_MEDIA_COMMAND_AUTO_ALIGN|PARCEL_MEDIA_COMMAND_DESC|PARCEL_MEDIA_COMMAND_LOOP|PARCEL_MEDIA_COMMAND_LOOP_SET|PARCEL_MEDIA_COMMAND_PAUSE|PARCEL_MEDIA_COMMAND_PLAY|PARCEL_MEDIA_COMMAND_SIZE|PARCEL_MEDIA_COMMAND_STOP|PARCEL_MEDIA_COMMAND_TEXTURE|PARCEL_MEDIA_COMMAND_TIME|PARCEL_MEDIA_COMMAND_TYPE|PARCEL_MEDIA_COMMAND_UNLOAD|PARCEL_MEDIA_COMMAND_URL|PASS_ALWAYS|PASS_IF_NOT_HANDLED|PASS_NEVER|PASSIVE|PATROL_PAUSE_AT_WAYPOINTS|PAYMENT_INFO_ON_FILE|PAYMENT_INFO_USED|PAY_DEFAULT|PAY_HIDE|PERMISSION_ATTACH|PERMISSION_CHANGE_LINKS|PERMISSION_CONTROL_CAMERA|PERMISSION_DEBIT|PERMISSION_OVERRIDE_ANIMATIONS|PERMISSION_RETURN_OBJECTS|PERMISSION_SILENT_ESTATE_MANAGEMENT|PERMISSION_TAKE_CONTROLS|PERMISSION_TELEPORT|PERMISSION_TRACK_CAMERA|PERMISSION_TRIGGER_ANIMATION|PERM_ALL|PERM_COPY|PERM_MODIFY|PERM_MOVE|PERM_TRANSFER|PING_PONG|PRIM_ALPHA_MODE|PRIM_ALPHA_MODE_BLEND|PRIM_ALPHA_MODE_EMISSIVE|PRIM_ALPHA_MODE_MASK|PRIM_ALPHA_MODE_NONE|PRIM_BUMP_BARK|PRIM_BUMP_BLOBS|PRIM_BUMP_BRICKS|PRIM_BUMP_BRIGHT|PRIM_BUMP_CHECKER|PRIM_BUMP_CONCRETE|PRIM_BUMP_DARK|PRIM_BUMP_DISKS|PRIM_BUMP_GRAVEL|PRIM_BUMP_LARGETILE|PRIM_BUMP_NONE|PRIM_BUMP_SHINY|PRIM_BUMP_SIDING|PRIM_BUMP_STONE|PRIM_BUMP_STUCCO|PRIM_BUMP_SUCTION|PRIM_BUMP_TILE|PRIM_BUMP_WEAVE|PRIM_BUMP_WOOD|PRIM_COLOR|PRIM_DESC|PRIM_FLEXIBLE|PRIM_FULLBRIGHT|PRIM_GLOW|PRIM_HOLE_CIRCLE|PRIM_HOLE_DEFAULT|PRIM_HOLE_SQUARE|PRIM_HOLE_TRIANGLE|PRIM_LINK_TARGET|PRIM_MATERIAL|PRIM_MATERIAL_FLESH|PRIM_MATERIAL_GLASS|PRIM_MATERIAL_METAL|PRIM_MATERIAL_PLASTIC|PRIM_MATERIAL_RUBBER|PRIM_MATERIAL_STONE|PRIM_MATERIAL_WOOD|PRIM_MEDIA_ALT_IMAGE_ENABLE|PRIM_MEDIA_AUTO_LOOP|PRIM_MEDIA_AUTO_PLAY|PRIM_MEDIA_AUTO_SCALE|PRIM_MEDIA_AUTO_ZOOM|PRIM_MEDIA_CONTROLS|PRIM_MEDIA_CONTROLS_MINI|PRIM_MEDIA_CONTROLS_STANDARD|PRIM_MEDIA_CURRENT_URL|PRIM_MEDIA_FIRST_CLICK_INTERACT|PRIM_MEDIA_HEIGHT_PIXELS|PRIM_MEDIA_HOME_URL|PRIM_MEDIA_MAX_HEIGHT_PIXELS|PRIM_MEDIA_MAX_URL_LENGTH|PRIM_MEDIA_MAX_WHITELIST_COUNT|PRIM_MEDIA_MAX_WHITELIST_SIZE|PRIM_MEDIA_MAX_WIDTH_PIXELS|PRIM_MEDIA_PARAM_MAX|PRIM_MEDIA_PERMS_CONTROL|PRIM_MEDIA_PERMS_INTERACT|PRIM_MEDIA_PERM_ANYONE|PRIM_MEDIA_PERM_GROUP|PRIM_MEDIA_PERM_NONE|PRIM_MEDIA_PERM_OWNER|PRIM_MEDIA_WHITELIST|PRIM_MEDIA_WHITELIST_ENABLE|PRIM_MEDIA_WIDTH_PIXELS|PRIM_NAME|PRIM_NORMAL|PRIM_OMEGA|PRIM_PHANTOM|PRIM_PHYSICS|PRIM_PHYSICS_SHAPE_CONVEX|PRIM_PHYSICS_SHAPE_NONE|PRIM_PHYSICS_SHAPE_PRIM|PRIM_PHYSICS_SHAPE_TYPE|PRIM_POINT_LIGHT|PRIM_POSITION|PRIM_POS_LOCAL|PRIM_ROTATION|PRIM_ROT_LOCAL|PRIM_SCULPT_FLAG_INVERT|PRIM_SCULPT_FLAG_MIRROR|PRIM_SCULPT_TYPE_CYLINDER|PRIM_SCULPT_TYPE_MASK|PRIM_SCULPT_TYPE_PLANE|PRIM_SCULPT_TYPE_SPHERE|PRIM_SCULPT_TYPE_TORUS|PRIM_SHINY_HIGH|PRIM_SHINY_LOW|PRIM_SHINY_MEDIUM|PRIM_SHINY_NONE|PRIM_SIZE|PRIM_SLICE|PRIM_SPECULAR|PRIM_TEMP_ON_REZ|PRIM_TEXGEN|PRIM_TEXGEN_DEFAULT|PRIM_TEXGEN_PLANAR|PRIM_TEXT|PRIM_TEXTURE|PRIM_TYPE|PRIM_TYPE_BOX|PRIM_TYPE_CYLINDER|PRIM_TYPE_PRISM|PRIM_TYPE_RING|PRIM_TYPE_SCULPT|PRIM_TYPE_SPHERE|PRIM_TYPE_TORUS|PRIM_TYPE_TUBE|PROFILE_NONE|PROFILE_SCRIPT_MEMORY|PSYS_PART_BF_DEST_COLOR|PSYS_PART_BF_ONE|PSYS_PART_BF_ONE_MINUS_DEST_COLOR|PSYS_PART_BF_ONE_MINUS_SOURCE_ALPHA|PSYS_PART_BF_ONE_MINUS_SOURCE_COLOR|PSYS_PART_BF_SOURCE_ALPHA|PSYS_PART_BF_SOURCE_COLOR|PSYS_PART_BF_ZERO|PSYS_PART_BLEND_FUNC_DEST|PSYS_PART_BLEND_FUNC_SOURCE|PSYS_PART_BOUNCE_MASK|PSYS_PART_EMISSIVE_MASK|PSYS_PART_END_ALPHA|PSYS_PART_END_COLOR|PSYS_PART_END_GLOW|PSYS_PART_END_SCALE|PSYS_PART_FLAGS|PSYS_PART_FOLLOW_SRC_MASK|PSYS_PART_FOLLOW_VELOCITY_MASK|PSYS_PART_INTERP_COLOR_MASK|PSYS_PART_INTERP_SCALE_MASK|PSYS_PART_MAX_AGE|PSYS_PART_RIBBON_MASK|PSYS_PART_START_ALPHA|PSYS_PART_START_COLOR|PSYS_PART_START_GLOW|PSYS_PART_START_SCALE|PSYS_PART_TARGET_LINEAR_MASK|PSYS_PART_TARGET_POS_MASK|PSYS_PART_WIND_MASK|PSYS_SRC_ACCEL|PSYS_SRC_ANGLE_BEGIN|PSYS_SRC_ANGLE_END|PSYS_SRC_BURST_PART_COUNT|PSYS_SRC_BURST_RADIUS|PSYS_SRC_BURST_RATE|PSYS_SRC_BURST_SPEED_MAX|PSYS_SRC_BURST_SPEED_MIN|PSYS_SRC_MAX_AGE|PSYS_SRC_OMEGA|PSYS_SRC_PATTERN|PSYS_SRC_PATTERN_ANGLE|PSYS_SRC_PATTERN_ANGLE_CONE|PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY|PSYS_SRC_PATTERN_DROP|PSYS_SRC_PATTERN_EXPLODE|PSYS_SRC_TARGET_KEY|PSYS_SRC_TEXTURE|PUBLIC_CHANNEL|PURSUIT_FUZZ_FACTOR|PURSUIT_GOAL_TOLERANCE|PURSUIT_INTERCEPT|PURSUIT_OFFSET|PU_EVADE_HIDDEN|PU_EVADE_SPOTTED|PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED|PU_FAILURE_INVALID_GOAL|PU_FAILURE_INVALID_START|PU_FAILURE_NO_NAVMESH|PU_FAILURE_NO_VALID_DESTINATION|PU_FAILURE_OTHER|PU_FAILURE_PARCEL_UNREACHABLE|PU_FAILURE_TARGET_GONE|PU_FAILURE_UNREACHABLE|PU_GOAL_REACHED|PU_SLOWDOWN_DISTANCE_REACHED|RCERR_CAST_TIME_EXCEEDED|RCERR_SIM_PERF_LOW|RCERR_UNKNOWN|RC_DATA_FLAGS|RC_DETECT_PHANTOM|RC_GET_LINK_NUM|RC_GET_NORMAL|RC_GET_ROOT_KEY|RC_MAX_HITS|RC_REJECT_AGENTS|RC_REJECT_LAND|RC_REJECT_NONPHYSICAL|RC_REJECT_PHYSICAL|RC_REJECT_TYPES|REGION_FLAG_ALLOW_DAMAGE|REGION_FLAG_ALLOW_DIRECT_TELEPORT|REGION_FLAG_BLOCK_FLY|REGION_FLAG_BLOCK_TERRAFORM|REGION_FLAG_DISABLE_COLLISIONS|REGION_FLAG_DISABLE_PHYSICS|REGION_FLAG_FIXED_SUN|REGION_FLAG_RESTRICT_PUSHOBJECT|REGION_FLAG_SANDBOX|REMOTE_DATA_CHANNEL|REMOTE_DATA_REPLY|REMOTE_DATA_REQUEST|REQUIRE_LINE_OF_SIGHT|RESTITUTION|REVERSE|ROTATE|SCALE|SCRIPTED|SIM_STAT_PCT_CHARS_STEPPED|SMOOTH|STATUS_BLOCK_GRAB|STATUS_BLOCK_GRAB_OBJECT|STATUS_BOUNDS_ERROR|STATUS_CAST_SHADOWS|STATUS_DIE_AT_EDGE|STATUS_INTERNAL_ERROR|STATUS_MALFORMED_PARAMS|STATUS_NOT_FOUND|STATUS_NOT_SUPPORTED|STATUS_OK|STATUS_PHANTOM|STATUS_PHYSICS|STATUS_RETURN_AT_EDGE|STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z|STATUS_SANDBOX|STATUS_TYPE_MISMATCH|STATUS_WHITELIST_FAILED|STRING_TRIM|STRING_TRIM_HEAD|STRING_TRIM_TAIL|TOUCH_INVALID_FACE|TRAVERSAL_TYPE|TRAVERSAL_TYPE_FAST|TRAVERSAL_TYPE_NONE|TRAVERSAL_TYPE_SLOW|TRUE|TYPE_FLOAT|TYPE_INTEGER|TYPE_INVALID|TYPE_KEY|TYPE_ROTATION|TYPE_STRING|TYPE_VECTOR|VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY|VEHICLE_ANGULAR_DEFLECTION_TIMESCALE|VEHICLE_ANGULAR_FRICTION_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DIRECTION|VEHICLE_ANGULAR_MOTOR_TIMESCALE|VEHICLE_BANKING_EFFICIENCY|VEHICLE_BANKING_MIX|VEHICLE_BANKING_TIMESCALE|VEHICLE_BUOYANCY|VEHICLE_FLAG_CAMERA_DECOUPLED|VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT|VEHICLE_FLAG_HOVER_TERRAIN_ONLY|VEHICLE_FLAG_HOVER_UP_ONLY|VEHICLE_FLAG_HOVER_WATER_ONLY|VEHICLE_FLAG_LIMIT_MOTOR_UP|VEHICLE_FLAG_LIMIT_ROLL_ONLY|VEHICLE_FLAG_MOUSELOOK_BANK|VEHICLE_FLAG_MOUSELOOK_STEER|VEHICLE_FLAG_NO_DEFLECTION_UP|VEHICLE_HOVER_EFFICIENCY|VEHICLE_HOVER_HEIGHT|VEHICLE_HOVER_TIMESCALE|VEHICLE_LINEAR_DEFLECTION_EFFICIENCY|VEHICLE_LINEAR_DEFLECTION_TIMESCALE|VEHICLE_LINEAR_FRICTION_TIMESCALE|VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE|VEHICLE_LINEAR_MOTOR_DIRECTION|VEHICLE_LINEAR_MOTOR_OFFSET|VEHICLE_LINEAR_MOTOR_TIMESCALE|VEHICLE_REFERENCE_FRAME|VEHICLE_TYPE_AIRPLANE|VEHICLE_TYPE_BALLOON|VEHICLE_TYPE_BOAT|VEHICLE_TYPE_CAR|VEHICLE_TYPE_NONE|VEHICLE_TYPE_SLED|VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY|VEHICLE_VERTICAL_ATTRACTION_TIMESCALE|VERTICAL|WANDER_PAUSE_AT_WAYPOINTS|XP_ERROR_EXPERIENCES_DISABLED|XP_ERROR_EXPERIENCE_DISABLED|XP_ERROR_EXPERIENCE_SUSPENDED|XP_ERROR_INVALID_EXPERIENCE|XP_ERROR_INVALID_PARAMETERS|XP_ERROR_KEY_NOT_FOUND|XP_ERROR_MATURITY_EXCEEDED|XP_ERROR_NONE|XP_ERROR_NOT_FOUND|XP_ERROR_NOT_PERMITTED|XP_ERROR_NO_EXPERIENCE|XP_ERROR_QUOTA_EXCEEDED|XP_ERROR_RETRY_UPDATE|XP_ERROR_STORAGE_EXCEPTION|XP_ERROR_STORE_DISABLED|XP_ERROR_THROTTLED|XP_ERROR_UNKNOWN_ERROR",
+ "constant.language.integer.boolean.lsl" : "FALSE|TRUE",
+ "constant.language.quaternion.lsl" : "ZERO_ROTATION",
+ "constant.language.string.lsl" : "EOF|JSON_ARRAY|JSON_DELETE|JSON_FALSE|JSON_INVALID|JSON_NULL|JSON_NUMBER|JSON_OBJECT|JSON_STRING|JSON_TRUE|NULL_KEY|TEXTURE_BLANK|TEXTURE_DEFAULT|TEXTURE_MEDIA|TEXTURE_PLYWOOD|TEXTURE_TRANSPARENT|URL_REQUEST_DENIED|URL_REQUEST_GRANTED",
+ "constant.language.vector.lsl" : "TOUCH_INVALID_TEXCOORD|TOUCH_INVALID_VECTOR|ZERO_VECTOR",
+ "invalid.broken.lsl": "LAND_LARGE_BRUSH|LAND_MEDIUM_BRUSH|LAND_SMALL_BRUSH",
+ "invalid.deprecated.lsl" : "ATTACH_LPEC|ATTACH_RPEC|DATA_RATING|OBJECT_ATTACHMENT_GEOMETRY_BYTES|OBJECT_ATTACHMENT_SURFACE_AREA|PRIM_CAST_SHADOWS|PRIM_MATERIAL_LIGHT|PRIM_TYPE_LEGACY|PSYS_SRC_INNERANGLE|PSYS_SRC_OUTERANGLE|VEHICLE_FLAG_NO_FLY_UP|llClearExperiencePermissions|llCloud|llGetExperienceList|llMakeExplosion|llMakeFire|llMakeFountain|llMakeSmoke|llRemoteDataSetRegion|llSound|llSoundPreload|llXorBase64Strings|llXorBase64StringsCorrect",
+ "invalid.illegal.lsl": "event",
+ "invalid.unimplemented.lsl": "CHARACTER_MAX_ANGULAR_ACCEL|CHARACTER_MAX_ANGULAR_SPEED|CHARACTER_TURN_SPEED_MULTIPLIER|PERMISSION_CHANGE_JOINTS|PERMISSION_CHANGE_PERMISSIONS|PERMISSION_EXPERIENCE|PERMISSION_RELEASE_OWNERSHIP|PERMISSION_REMAP_CONTROLS|PRIM_PHYSICS_MATERIAL|PSYS_SRC_OBJ_REL_MASK|llCollisionSprite|llPointAt|llRefreshPrimURL|llReleaseCamera|llRemoteLoadScript|llSetPrimURL|llStopPointAt|llTakeCamera",
+ "reserved.godmode.lsl": "llGodLikeRezObject|llSetInventoryPermMask|llSetObjectPermMask",
+ "reserved.log.lsl" : "print",
+ "keyword.control.lsl" : "do|else|for|if|jump|return|while",
+ "storage.type.lsl" : "float|integer|key|list|quaternion|rotation|string|vector",
+ "support.function.lsl": "llAbs|llAcos|llAddToLandBanList|llAddToLandPassList|llAdjustSoundVolume|llAgentInExperience|llAllowInventoryDrop|llAngleBetween|llApplyImpulse|llApplyRotationalImpulse|llAsin|llAtan2|llAttachToAvatar|llAttachToAvatarTemp|llAvatarOnLinkSitTarget|llAvatarOnSitTarget|llAxes2Rot|llAxisAngle2Rot|llBase64ToInteger|llBase64ToString|llBreakAllLinks|llBreakLink|llCSV2List|llCastRay|llCeil|llClearCameraParams|llClearLinkMedia|llClearPrimMedia|llCloseRemoteDataChannel|llCollisionFilter|llCollisionSound|llCos|llCreateCharacter|llCreateKeyValue|llCreateLink|llDataSizeKeyValue|llDeleteCharacter|llDeleteKeyValue|llDeleteSubList|llDeleteSubString|llDetachFromAvatar|llDetectedGrab|llDetectedGroup|llDetectedKey|llDetectedLinkNumber|llDetectedName|llDetectedOwner|llDetectedPos|llDetectedRot|llDetectedTouchBinormal|llDetectedTouchFace|llDetectedTouchNormal|llDetectedTouchPos|llDetectedTouchST|llDetectedTouchUV|llDetectedType|llDetectedVel|llDialog|llDie|llDumpList2String|llEdgeOfWorld|llEjectFromLand|llEmail|llEscapeURL|llEuler2Rot|llEvade|llExecCharacterCmd|llFabs|llFleeFrom|llFloor|llForceMouselook|llFrand|llGenerateKey|llGetAccel|llGetAgentInfo|llGetAgentLanguage|llGetAgentList|llGetAgentSize|llGetAlpha|llGetAndResetTime|llGetAnimation|llGetAnimationList|llGetAnimationOverride|llGetAttached|llGetAttachedList|llGetBoundingBox|llGetCameraPos|llGetCameraRot|llGetCenterOfMass|llGetClosestNavPoint|llGetColor|llGetCreator|llGetDate|llGetDisplayName|llGetEnergy|llGetEnv|llGetExperienceDetails|llGetExperienceErrorMessage|llGetForce|llGetFreeMemory|llGetFreeURLs|llGetGMTclock|llGetGeometricCenter|llGetHTTPHeader|llGetInventoryCreator|llGetInventoryKey|llGetInventoryName|llGetInventoryNumber|llGetInventoryPermMask|llGetInventoryType|llGetKey|llGetLandOwnerAt|llGetLinkKey|llGetLinkMedia|llGetLinkName|llGetLinkNumber|llGetLinkNumberOfSides|llGetLinkPrimitiveParams|llGetListEntryType|llGetListLength|llGetLocalPos|llGetLocalRot|llGetMass|llGetMassMKS|llGetMaxScaleFactor|llGetMemoryLimit|llGetMinScaleFactor|llGetNextEmail|llGetNotecardLine|llGetNumberOfNotecardLines|llGetNumberOfPrims|llGetNumberOfSides|llGetObjectDesc|llGetObjectDetails|llGetObjectMass|llGetObjectName|llGetObjectPermMask|llGetObjectPrimCount|llGetOmega|llGetOwner|llGetOwnerKey|llGetParcelDetails|llGetParcelFlags|llGetParcelMaxPrims|llGetParcelMusicURL|llGetParcelPrimCount|llGetParcelPrimOwners|llGetPermissions|llGetPermissionsKey|llGetPhysicsMaterial|llGetPos|llGetPrimMediaParams|llGetPrimitiveParams|llGetRegionAgentCount|llGetRegionCorner|llGetRegionFPS|llGetRegionFlags|llGetRegionName|llGetRegionTimeDilation|llGetRootPosition|llGetRootRotation|llGetRot|llGetSPMaxMemory|llGetScale|llGetScriptName|llGetScriptState|llGetSimStats|llGetSimulatorHostname|llGetStartParameter|llGetStaticPath|llGetStatus|llGetSubString|llGetSunDirection|llGetTexture|llGetTextureOffset|llGetTextureRot|llGetTextureScale|llGetTime|llGetTimeOfDay|llGetTimestamp|llGetTorque|llGetUnixTime|llGetUsedMemory|llGetUsername|llGetVel|llGetWallclock|llGiveInventory|llGiveInventoryList|llGiveMoney|llGround|llGroundContour|llGroundNormal|llGroundRepel|llGroundSlope|llHTTPRequest|llHTTPResponse|llInsertString|llInstantMessage|llIntegerToBase64|llJson2List|llJsonGetValue|llJsonSetValue|llJsonValueType|llKey2Name|llKeyCountKeyValue|llKeysKeyValue|llLinkParticleSystem|llLinkSitTarget|llList2CSV|llList2Float|llList2Integer|llList2Json|llList2Key|llList2List|llList2ListStrided|llList2Rot|llList2String|llList2Vector|llListFindList|llListInsertList|llListRandomize|llListReplaceList|llListSort|llListStatistics|llListen|llListenControl|llListenRemove|llLoadURL|llLog|llLog10|llLookAt|llLoopSound|llLoopSoundMaster|llLoopSoundSlave|llMD5String|llManageEstateAccess|llMapDestination|llMessageLinked|llMinEventDelay|llModPow|llModifyLand|llMoveToTarget|llNavigateTo|llOffsetTexture|llOpenRemoteDataChannel|llOverMyLand|llOwnerSay|llParcelMediaCommandList|llParcelMediaQuery|llParseString2List|llParseStringKeepNulls|llParticleSystem|llPassCollisions|llPassTouches|llPatrolPoints|llPlaySound|llPlaySoundSlave|llPow|llPreloadSound|llPursue|llPushObject|llReadKeyValue|llRegionSay|llRegionSayTo|llReleaseControls|llReleaseURL|llRemoteDataReply|llRemoteLoadScriptPin|llRemoveFromLandBanList|llRemoveFromLandPassList|llRemoveInventory|llRemoveVehicleFlags|llRequestAgentData|llRequestDisplayName|llRequestExperiencePermissions|llRequestInventoryData|llRequestPermissions|llRequestSecureURL|llRequestSimulatorData|llRequestURL|llRequestUsername|llResetAnimationOverride|llResetLandBanList|llResetLandPassList|llResetOtherScript|llResetScript|llResetTime|llReturnObjectsByID|llReturnObjectsByOwner|llRezAtRoot|llRezObject|llRot2Angle|llRot2Axis|llRot2Euler|llRot2Fwd|llRot2Left|llRot2Up|llRotBetween|llRotLookAt|llRotTarget|llRotTargetRemove|llRotateTexture|llRound|llSHA1String|llSameGroup|llSay|llScaleByFactor|llScaleTexture|llScriptDanger|llScriptProfiler|llSendRemoteData|llSensor|llSensorRemove|llSensorRepeat|llSetAlpha|llSetAngularVelocity|llSetAnimationOverride|llSetBuoyancy|llSetCameraAtOffset|llSetCameraEyeOffset|llSetCameraParams|llSetClickAction|llSetColor|llSetContentType|llSetDamage|llSetForce|llSetForceAndTorque|llSetHoverHeight|llSetKeyframedMotion|llSetLinkAlpha|llSetLinkCamera|llSetLinkColor|llSetLinkMedia|llSetLinkPrimitiveParams|llSetLinkPrimitiveParamsFast|llSetLinkTexture|llSetLinkTextureAnim|llSetLocalRot|llSetMemoryLimit|llSetObjectDesc|llSetObjectName|llSetParcelMusicURL|llSetPayPrice|llSetPhysicsMaterial|llSetPos|llSetPrimMediaParams|llSetPrimitiveParams|llSetRegionPos|llSetRemoteScriptAccessPin|llSetRot|llSetScale|llSetScriptState|llSetSitText|llSetSoundQueueing|llSetSoundRadius|llSetStatus|llSetText|llSetTexture|llSetTextureAnim|llSetTimerEvent|llSetTorque|llSetTouchText|llSetVehicleFlags|llSetVehicleFloatParam|llSetVehicleRotationParam|llSetVehicleType|llSetVehicleVectorParam|llSetVelocity|llShout|llSin|llSitTarget|llSleep|llSqrt|llStartAnimation|llStopAnimation|llStopHover|llStopLookAt|llStopMoveToTarget|llStopSound|llStringLength|llStringToBase64|llStringTrim|llSubStringIndex|llTakeControls|llTan|llTarget|llTargetOmega|llTargetRemove|llTeleportAgent|llTeleportAgentGlobalCoords|llTeleportAgentHome|llTextBox|llToLower|llToUpper|llTransferLindenDollars|llTriggerSound|llTriggerSoundLimited|llUnSit|llUnescapeURL|llUpdateCharacter|llUpdateKeyValue|llVecDist|llVecMag|llVecNorm|llVolumeDetect|llWanderWithin|llWater|llWhisper|llWind|llXorBase64",
+ "support.function.event.lsl" : "at_rot_target|at_target|attach|changed|collision|collision_end|collision_start|control|dataserver|email|experience_permissions|experience_permissions_denied|http_request|http_response|land_collision|land_collision_end|land_collision_start|link_message|listen|money|moving_end|moving_start|no_sensor|not_at_rot_target|not_at_target|object_rez|on_rez|path_update|remote_data|run_time_permissions|sensor|state_entry|state_exit|timer|touch|touch_end|touch_start|transaction_result"
+ }, "identifier");
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment.line.double-slash.lsl",
+ regex : "\\/\\/.*$"
+ }, {
+ token : "comment.block.begin.lsl",
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string.quoted.double.lsl",
+ start : '"',
+ end : '"',
+ next : [{
+ token : "constant.character.escape.lsl",
+ regex : /\\[tn"\\]/
+ }]
+ }, {
+ token : "constant.numeric.lsl",
+ regex : "(0[xX][0-9a-fA-F]+|[+-]?[0-9]+(?:(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)?)\\b"
+ }, {
+ token : "entity.name.state.lsl",
+ regex : "\\b((state)\\s+[A-Za-z_]\\w*|default)\\b"
+ }, {
+ token : keywordMapper,
+ regex : "\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"
+ }, {
+ token : "support.function.user-defined.lsl",
+ regex : /\b([a-zA-Z_]\w*)(?=\(.*?\))/
+ }, {
+ token : "keyword.operator.lsl",
+ regex : "\\+\\+|\\-\\-|<<|>>|&&?|\\|\\|?|\\^|~|[!%<>=*+\\-\\/]=?"
+ }, {
+ token : "invalid.illegal.keyword.operator.lsl",
+ regex : ":=?"
+ }, {
+ token : "punctuation.operator.lsl",
+ regex : "\\,|\\;"
+ }, {
+ token : "paren.lparen.lsl",
+ regex : "[\\[\\(\\{]"
+ }, {
+ token : "paren.rparen.lsl",
+ regex : "[\\]\\)\\}]"
+ }, {
+ token : "text.lsl",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment.block.end.lsl",
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment.block.lsl"
+ }
+ ]
+ };
+ this.normalizeRules();
+}
+
+exports.LSLHighlightRules = LSLHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/lsl",["require","exports","module","ace/mode/lsl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/text","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/lib/oop"], function(require, exports, module) {
+"use strict";
+
+var Rules = require("./lsl_highlight_rules").LSLHighlightRules;
+var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var TextMode = require("./text").Mode;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var oop = require("../lib/oop");
+
+var Mode = function() {
+ this.HighlightRules = Rules;
+ this.$outdent = new Outdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ["//"];
+
+ this.blockComment = {
+ start: "/*",
+ end: "*/"
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().getLineTokens(line, state);
+ var tokens = tokenizedLine.tokens;
+ var endState = tokenizedLine.state;
+
+ if (tokens.length && tokens[tokens.length-1].type === "comment.block.lsl") {
+ 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.$id = "ace/mode/lsl";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-lua.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-lua.js
new file mode 100644
index 00000000..bcf4daa5
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-lua.js
@@ -0,0 +1,424 @@
+ace.define("ace/mode/lua_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 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 deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn");
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": keywords,
+ "support.function": functions,
+ "keyword.deprecated": deprecatedIn5152,
+ "constant.library": stdLibaries,
+ "constant.language": builtinConstants,
+ "variable.language": "self"
+ }, "identifier");
+
+ 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 + ")";
+
+ this.$rules = {
+ "start" : [{
+ stateName: "bracketedComment",
+ onMatch : function(value, currentState, stack){
+ stack.unshift(this.next, value.length - 2, currentState);
+ return "comment";
+ },
+ regex : /\-\-\[=*\[/,
+ next : [
+ {
+ onMatch : function(value, currentState, stack) {
+ if (value.length == stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack.shift();
+ } else {
+ this.next = "";
+ }
+ return "comment";
+ },
+ regex : /\]=*\]/,
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ]
+ },
+
+ {
+ token : "comment",
+ regex : "\\-\\-.*$"
+ },
+ {
+ stateName: "bracketedString",
+ onMatch : function(value, currentState, stack){
+ stack.unshift(this.next, value.length, currentState);
+ return "string.start";
+ },
+ regex : /\[=*\[/,
+ next : [
+ {
+ onMatch : function(value, currentState, stack) {
+ if (value.length == stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack.shift();
+ } else {
+ this.next = "";
+ }
+ return "string.end";
+ },
+
+ regex : /\]=*\]/,
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }
+ ]
+ },
+ {
+ token : "string", // " string
+ regex : '"(?:[^\\\\]|\\\\.)*?"'
+ }, {
+ 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+|\\w+"
+ } ]
+ };
+
+ this.normalizeRules();
+}
+
+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) {
+"use strict";
+
+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[0] == "bracketedComment" || type[0] == "bracketedString")
+ 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[0] == "bracketedComment" || type[0] == "bracketedString")
+ 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/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
+var LuaFoldMode = require("./folding/lua").FoldMode;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+
+var Mode = function() {
+ this.HighlightRules = LuaHighlightRules;
+
+ this.foldingRules = new LuaFoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "--[", end: "]--"};
+
+ 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 += token.value.length;
+ } else if (token.type == "paren.rparen") {
+ level -= token.value.length;
+ }
+ }
+ 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.getTokenizer().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.getTokenizer().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.getTokenizer().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));
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/lua_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/lua";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-luapage.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-luapage.js
new file mode 100644
index 00000000..be6b0922
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-luapage.js
@@ -0,0 +1,2978 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+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(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": {"manifest": 1},
+ "head": {},
+ "title": {},
+ "base": {"href": 1, "target": 1},
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
+ "noscript": {"href": 1},
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
+ "section": {},
+ "nav": {},
+ "article": {"pubdate": 1},
+ "aside": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "header": {},
+ "footer": {},
+ "address": {},
+ "main": {},
+ "p": {},
+ "hr": {},
+ "pre": {},
+ "blockquote": {"cite": 1},
+ "ol": {"start": 1, "reversed": 1},
+ "ul": {},
+ "li": {"value": 1},
+ "dl": {},
+ "dt": {},
+ "dd": {},
+ "figure": {},
+ "figcaption": {},
+ "div": {},
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
+ "em": {},
+ "strong": {},
+ "small": {},
+ "s": {},
+ "cite": {},
+ "q": {"cite": 1},
+ "dfn": {},
+ "abbr": {},
+ "data": {},
+ "time": {"datetime": 1},
+ "code": {},
+ "var": {},
+ "samp": {},
+ "kbd": {},
+ "sub": {},
+ "sup": {},
+ "i": {},
+ "b": {},
+ "u": {},
+ "mark": {},
+ "ruby": {},
+ "rt": {},
+ "rp": {},
+ "bdi": {},
+ "bdo": {},
+ "span": {},
+ "br": {},
+ "wbr": {},
+ "ins": {"cite": 1, "datetime": 1},
+ "del": {"cite": 1, "datetime": 1},
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
+ "param": {"name": 1, "value": 1},
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
+ "source": {"src": 1, "type": 1, "media": 1},
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
+ "canvas": {"width": 1, "height": 1},
+ "map": {"name": 1},
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
+ "svg": {},
+ "math": {},
+ "table": {"summary": 1},
+ "caption": {},
+ "colgroup": {"span": 1},
+ "col": {"span": 1},
+ "tbody": {},
+ "thead": {},
+ "tfoot": {},
+ "tr": {},
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
+ "legend": {},
+ "label": {"form": 1, "for": 1},
+ "input": {
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
+ "datalist": {},
+ "optgroup": {"disabled": 1, "label": 1},
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
+ "output": {"for": 1, "form": 1, "name": 1},
+ "progress": {"value": 1, "max": 1},
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
+ "details": {"open": 1},
+ "summary": {},
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
+ "menu": {"type": 1, "label": 1},
+ "dialog": {"open": 1}
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+function findAttributeName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "attribute-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompletions(state, session, pos, prefix);
+ if (is(token, "attribute-value"))
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/&[a-z]*$/i.test(line))
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ var attributeName = findAttributeName(session, pos);
+
+ if (!tagName)
+ return [];
+ var values = [];
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
+ values = Object.keys(attributeMap[tagName][attributeName]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "attribute value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
+
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "html entity",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).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) {
+"use strict";
+
+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 deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn");
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword": keywords,
+ "support.function": functions,
+ "keyword.deprecated": deprecatedIn5152,
+ "constant.library": stdLibaries,
+ "constant.language": builtinConstants,
+ "variable.language": "self"
+ }, "identifier");
+
+ 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 + ")";
+
+ this.$rules = {
+ "start" : [{
+ stateName: "bracketedComment",
+ onMatch : function(value, currentState, stack){
+ stack.unshift(this.next, value.length - 2, currentState);
+ return "comment";
+ },
+ regex : /\-\-\[=*\[/,
+ next : [
+ {
+ onMatch : function(value, currentState, stack) {
+ if (value.length == stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack.shift();
+ } else {
+ this.next = "";
+ }
+ return "comment";
+ },
+ regex : /\]=*\]/,
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ]
+ },
+
+ {
+ token : "comment",
+ regex : "\\-\\-.*$"
+ },
+ {
+ stateName: "bracketedString",
+ onMatch : function(value, currentState, stack){
+ stack.unshift(this.next, value.length, currentState);
+ return "string.start";
+ },
+ regex : /\[=*\[/,
+ next : [
+ {
+ onMatch : function(value, currentState, stack) {
+ if (value.length == stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack.shift();
+ } else {
+ this.next = "";
+ }
+ return "string.end";
+ },
+
+ regex : /\]=*\]/,
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }
+ ]
+ },
+ {
+ token : "string", // " string
+ regex : '"(?:[^\\\\]|\\\\.)*?"'
+ }, {
+ 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+|\\w+"
+ } ]
+ };
+
+ this.normalizeRules();
+}
+
+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) {
+"use strict";
+
+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[0] == "bracketedComment" || type[0] == "bracketedString")
+ 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[0] == "bracketedComment" || type[0] == "bracketedString")
+ 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/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
+var LuaFoldMode = require("./folding/lua").FoldMode;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+
+var Mode = function() {
+ this.HighlightRules = LuaHighlightRules;
+
+ this.foldingRules = new LuaFoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "--[", end: "]--"};
+
+ 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 += token.value.length;
+ } else if (token.type == "paren.rparen") {
+ level -= token.value.length;
+ }
+ }
+ 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.getTokenizer().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.getTokenizer().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.getTokenizer().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));
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/lua_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/lua";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules;
+
+var LuaPageHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var startRules = [
+ {
+ token: "keyword",
+ regex: "<\\%\\=?",
+ push: "lua-start"
+ }, {
+ token: "keyword",
+ regex: "<\\?lua\\=?",
+ push: "lua-start"
+ }
+ ];
+
+ var endRules = [
+ {
+ token: "keyword",
+ regex: "\\%>",
+ next: "pop"
+ }, {
+ token: "keyword",
+ regex: "\\?>",
+ next: "pop"
+ }
+ ];
+
+ this.embedRules(LuaHighlightRules, "lua-", endRules, ["start"]);
+
+ for (var key in this.$rules)
+ this.$rules[key].unshift.apply(this.$rules[key], startRules);
+
+ this.normalizeRules();
+};
+
+oop.inherits(LuaPageHighlightRules, HtmlHighlightRules);
+
+exports.LuaPageHighlightRules = LuaPageHighlightRules;
+
+});
+
+ace.define("ace/mode/luapage",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/lua","ace/mode/luapage_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var LuaMode = require("./lua").Mode;
+var LuaPageHighlightRules = require("./luapage_highlight_rules").LuaPageHighlightRules;
+
+var Mode = function() {
+ HtmlMode.call(this);
+
+ this.HighlightRules = LuaPageHighlightRules;
+ this.createModeDelegates({
+ "lua-": LuaMode
+ });
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.$id = "ace/mode/luapage";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-lucene.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-lucene.js
new file mode 100644
index 00000000..b830b7ae
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-lucene.js
@@ -0,0 +1,70 @@
+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) {
+"use strict";
+
+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;
+});
+
+ace.define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"], function(require, exports, module) {
+'use strict';
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var LuceneHighlightRules = require("./lucene_highlight_rules").LuceneHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = LuceneHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.$id = "ace/mode/lucene";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-makefile.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-makefile.js
new file mode 100644
index 00000000..e59bd3e7
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-makefile.js
@@ -0,0 +1,404 @@
+ace.define("ace/mode/sh_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 reservedKeywords = exports.reservedKeywords = (
+ '!|{|}|case|do|done|elif|else|'+
+ 'esac|fi|for|if|in|then|until|while|'+
+ '&|;|export|local|read|typeset|unset|'+
+ 'elif|select|set|function|declare|readonly'
+ );
+
+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 + "(?==))";
+
+ var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))";
+
+ var func = "(?:" + variableName + "\\s*\\(\\))";
+
+ this.$rules = {
+ "start" : [{
+ token : "constant",
+ regex : /\\./
+ }, {
+ token : ["text", "comment"],
+ regex : /(^|\s)(#.*)$/
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[$`"\\]|$)/
+ }, {
+ include : "variables"
+ }, {
+ token : "keyword.operator",
+ regex : /`/ // TODO highlight `
+ }, {
+ token : "string.end",
+ regex : '"',
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string",
+ regex : "\\$'",
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/
+ }, {
+ token : "string",
+ regex : "'",
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ regex : "<<<",
+ token : "keyword.operator"
+ }, {
+ stateName: "heredoc",
+ regex : "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",
+ onMatch : function(value, currentState, stack) {
+ var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
+ var tokens = value.split(this.splitRegex);
+ stack.push(next, tokens[4]);
+ return [
+ {type:"constant", value: tokens[1]},
+ {type:"text", value: tokens[2]},
+ {type:"string", value: tokens[3]},
+ {type:"support.class", value: tokens[4]},
+ {type:"string", value: tokens[5]}
+ ];
+ },
+ rules: {
+ heredoc: [{
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }],
+ indentedHeredoc: [{
+ token: "string",
+ regex: "^\t+"
+ }, {
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }]
+ }
+ }, {
+ regex : "$",
+ token : "empty",
+ next : function(currentState, stack) {
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
+ return stack[0];
+ return currentState;
+ }
+ }, {
+ token : ["keyword", "text", "text", "text", "variable"],
+ regex : /(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/
+ }, {
+ token : "variable.language",
+ regex : builtinVariable
+ }, {
+ token : "variable",
+ regex : variable
+ }, {
+ include : "variables"
+ }, {
+ token : "support.function",
+ regex : func
+ }, {
+ token : "support.function",
+ regex : fileDescriptor
+ }, {
+ token : "string", // ' string
+ start : "'", end : "'"
+ }, {
+ 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 : "punctuation.operator",
+ regex : ";"
+ }, {
+ token : "paren.lparen",
+ regex : "[\\[\\(\\{]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\)\\}]",
+ next : "pop"
+ }],
+ variables: [{
+ token : "variable",
+ regex : /(\$)(\w+)/
+ }, {
+ token : ["variable", "paren.lparen"],
+ regex : /(\$)(\()/,
+ push : "start"
+ }, {
+ token : ["variable", "paren.lparen", "keyword.operator", "variable", "keyword.operator"],
+ regex : /(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,
+ push : "start"
+ }, {
+ token : "variable",
+ regex : /\$[*@#?\-$!0_]/
+ }, {
+ token : ["variable", "paren.lparen"],
+ regex : /(\$)(\{)/,
+ push : "start"
+ }]
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(ShHighlightRules, TextHighlightRules);
+
+exports.ShHighlightRules = ShHighlightRules;
+});
+
+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) {
+"use strict";
+
+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/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/makefile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/makefile_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var MakefileHighlightRules = require("./makefile_highlight_rules").MakefileHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = MakefileHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+ this.$indentWithTabs = true;
+
+ this.$id = "ace/mode/makefile";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-markdown.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-markdown.js
new file mode 100644
index 00000000..51df9be7
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-markdown.js
@@ -0,0 +1,2865 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var XmlFoldMode = require("./folding/xml").FoldMode;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+
+var Mode = function() {
+ this.HighlightRules = XmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.foldingRules = new XmlFoldMode();
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.voidElements = lang.arrayToMap([]);
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/xml";
+}).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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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/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(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": {"manifest": 1},
+ "head": {},
+ "title": {},
+ "base": {"href": 1, "target": 1},
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
+ "noscript": {"href": 1},
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
+ "section": {},
+ "nav": {},
+ "article": {"pubdate": 1},
+ "aside": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "header": {},
+ "footer": {},
+ "address": {},
+ "main": {},
+ "p": {},
+ "hr": {},
+ "pre": {},
+ "blockquote": {"cite": 1},
+ "ol": {"start": 1, "reversed": 1},
+ "ul": {},
+ "li": {"value": 1},
+ "dl": {},
+ "dt": {},
+ "dd": {},
+ "figure": {},
+ "figcaption": {},
+ "div": {},
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
+ "em": {},
+ "strong": {},
+ "small": {},
+ "s": {},
+ "cite": {},
+ "q": {"cite": 1},
+ "dfn": {},
+ "abbr": {},
+ "data": {},
+ "time": {"datetime": 1},
+ "code": {},
+ "var": {},
+ "samp": {},
+ "kbd": {},
+ "sub": {},
+ "sup": {},
+ "i": {},
+ "b": {},
+ "u": {},
+ "mark": {},
+ "ruby": {},
+ "rt": {},
+ "rp": {},
+ "bdi": {},
+ "bdo": {},
+ "span": {},
+ "br": {},
+ "wbr": {},
+ "ins": {"cite": 1, "datetime": 1},
+ "del": {"cite": 1, "datetime": 1},
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
+ "param": {"name": 1, "value": 1},
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
+ "source": {"src": 1, "type": 1, "media": 1},
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
+ "canvas": {"width": 1, "height": 1},
+ "map": {"name": 1},
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
+ "svg": {},
+ "math": {},
+ "table": {"summary": 1},
+ "caption": {},
+ "colgroup": {"span": 1},
+ "col": {"span": 1},
+ "tbody": {},
+ "thead": {},
+ "tfoot": {},
+ "tr": {},
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
+ "legend": {},
+ "label": {"form": 1, "for": 1},
+ "input": {
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
+ "datalist": {},
+ "optgroup": {"disabled": 1, "label": 1},
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
+ "output": {"for": 1, "form": 1, "name": 1},
+ "progress": {"value": 1, "max": 1},
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
+ "details": {"open": 1},
+ "summary": {},
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
+ "menu": {"type": 1, "label": 1},
+ "dialog": {"open": 1}
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+function findAttributeName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "attribute-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompletions(state, session, pos, prefix);
+ if (is(token, "attribute-value"))
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/&[a-z]*$/i.test(line))
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ var attributeName = findAttributeName(session, pos);
+
+ if (!tagName)
+ return [];
+ var values = [];
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
+ values = Object.keys(attributeMap[tagName][attributeName]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "attribute value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
+
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "html entity",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","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 lang = require("../lib/lang");
+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;
+
+var escaped = function(ch) {
+ return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*";
+}
+
+function github_embed(tag, prefix) {
+ return { // Github style block
+ token : "support.function",
+ regex : "^\\s*```" + tag + "\\s*$",
+ push : prefix + "start"
+ };
+}
+
+var MarkdownHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ this.$rules["start"].unshift({
+ token : "empty_line",
+ regex : '^$',
+ next: "allowBlock"
+ }, { // h1
+ token: "markup.heading.1",
+ regex: "^=+(?=\\s*$)"
+ }, { // h2
+ token: "markup.heading.2",
+ regex: "^\\-+(?=\\s*$)"
+ }, {
+ token : function(value) {
+ return "markup.heading." + value.length;
+ },
+ regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/,
+ next : "header"
+ },
+ github_embed("(?:javascript|js)", "jscode-"),
+ github_embed("xml", "xmlcode-"),
+ github_embed("html", "htmlcode-"),
+ github_embed("css", "csscode-"),
+ { // Github style block
+ token : "support.function",
+ regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",
+ next : "githubblock"
+ }, { // block quote
+ token : "string.blockquote",
+ regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
+ next : "blockquote"
+ }, { // HR * - _
+ token : "constant",
+ regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",
+ next: "allowBlock"
+ }, { // list
+ token : "markup.list",
+ regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
+ next : "listblock-start"
+ }, {
+ include : "basic"
+ });
+
+ this.addRules({
+ "basic" : [{
+ token : "constant.language.escape",
+ regex : /\\[\\`*_{}\[\]()#+\-.!]/
+ }, { // code span `
+ token : "support.function",
+ regex : "(`+)(.*?[^`])(\\1)"
+ }, { // reference
+ token : ["text", "constant", "text", "url", "string", "text"],
+ regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$"
+ }, { // link by reference
+ token : ["text", "string", "text", "constant", "text"],
+ regex : "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)("+ escaped("]") + ")(\\])"
+ }, { // link by url
+ token : ["text", "string", "text", "markup.underline", "string", "text"],
+ regex : "(\\[)(" + // [
+ escaped("]") + // link text
+ ")(\\]\\()"+ // ](
+ '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href
+ '(\\s*"' + escaped('"') + '"\\s*)?' + // "title"
+ "(\\))" // )
+ }, { // strong ** __
+ token : "string.strong",
+ regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"
+ }, { // emphasis * _
+ token : "string.emphasis",
+ regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"
+ }, { //
+ token : ["text", "url", "text"],
+ regex : "(<)("+
+ "(?:https?|ftp|dict):[^'\">\\s]+"+
+ "|"+
+ "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+
+ ")(>)"
+ }],
+ "allowBlock": [
+ {token : "support.function", regex : "^ {4}.+", next : "allowBlock"},
+ {token : "empty_line", regex : '^$', next: "allowBlock"},
+ {token : "empty", regex : "", next : "start"}
+ ],
+
+ "header" : [{
+ regex: "$",
+ next : "start"
+ }, {
+ include: "basic"
+ }, {
+ defaultToken : "heading"
+ } ],
+
+ "listblock-start" : [{
+ token : "support.variable",
+ regex : /(?:\[[ x]\])?/,
+ next : "listblock"
+ }],
+
+ "listblock" : [ { // Lists only escape on completely blank lines.
+ token : "empty_line",
+ regex : "^$",
+ next : "start"
+ }, { // list
+ token : "markup.list",
+ regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
+ next : "listblock-start"
+ }, {
+ include : "basic", noEscape: true
+ }, { // Github style block
+ token : "support.function",
+ regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
+ next : "githubblock"
+ }, {
+ defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly
+ } ],
+
+ "blockquote" : [ { // Blockquotes only escape on blank lines.
+ token : "empty_line",
+ regex : "^\\s*$",
+ next : "start"
+ }, { // block quote
+ token : "string.blockquote",
+ regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
+ next : "blockquote"
+ }, {
+ include : "basic", noEscape: true
+ }, {
+ defaultToken : "string.blockquote"
+ } ],
+
+ "githubblock" : [ {
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "start"
+ }, {
+ defaultToken : "support.function"
+ } ]
+ });
+
+ this.embedRules(JavaScriptHighlightRules, "jscode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.embedRules(HtmlHighlightRules, "htmlcode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.embedRules(CssHighlightRules, "csscode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.embedRules(XmlHighlightRules, "xmlcode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.normalizeRules();
+};
+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) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/html","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown"], 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 MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
+var MarkdownFoldMode = require("./folding/markdown").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = MarkdownHighlightRules;
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "xml-": XmlMode,
+ "html-": HtmlMode
+ });
+
+ this.foldingRules = new MarkdownFoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.type = "text";
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ 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);
+ }
+ };
+ this.$id = "ace/mode/markdown";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-mask.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-mask.js
new file mode 100644
index 00000000..983d02f8
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-mask.js
@@ -0,0 +1,1786 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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 supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","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 lang = require("../lib/lang");
+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;
+
+var escaped = function(ch) {
+ return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*";
+}
+
+function github_embed(tag, prefix) {
+ return { // Github style block
+ token : "support.function",
+ regex : "^\\s*```" + tag + "\\s*$",
+ push : prefix + "start"
+ };
+}
+
+var MarkdownHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ this.$rules["start"].unshift({
+ token : "empty_line",
+ regex : '^$',
+ next: "allowBlock"
+ }, { // h1
+ token: "markup.heading.1",
+ regex: "^=+(?=\\s*$)"
+ }, { // h2
+ token: "markup.heading.2",
+ regex: "^\\-+(?=\\s*$)"
+ }, {
+ token : function(value) {
+ return "markup.heading." + value.length;
+ },
+ regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/,
+ next : "header"
+ },
+ github_embed("(?:javascript|js)", "jscode-"),
+ github_embed("xml", "xmlcode-"),
+ github_embed("html", "htmlcode-"),
+ github_embed("css", "csscode-"),
+ { // Github style block
+ token : "support.function",
+ regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$",
+ next : "githubblock"
+ }, { // block quote
+ token : "string.blockquote",
+ regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
+ next : "blockquote"
+ }, { // HR * - _
+ token : "constant",
+ regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$",
+ next: "allowBlock"
+ }, { // list
+ token : "markup.list",
+ regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
+ next : "listblock-start"
+ }, {
+ include : "basic"
+ });
+
+ this.addRules({
+ "basic" : [{
+ token : "constant.language.escape",
+ regex : /\\[\\`*_{}\[\]()#+\-.!]/
+ }, { // code span `
+ token : "support.function",
+ regex : "(`+)(.*?[^`])(\\1)"
+ }, { // reference
+ token : ["text", "constant", "text", "url", "string", "text"],
+ regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$"
+ }, { // link by reference
+ token : ["text", "string", "text", "constant", "text"],
+ regex : "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)("+ escaped("]") + ")(\\])"
+ }, { // link by url
+ token : ["text", "string", "text", "markup.underline", "string", "text"],
+ regex : "(\\[)(" + // [
+ escaped("]") + // link text
+ ")(\\]\\()"+ // ](
+ '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href
+ '(\\s*"' + escaped('"') + '"\\s*)?' + // "title"
+ "(\\))" // )
+ }, { // strong ** __
+ token : "string.strong",
+ regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)"
+ }, { // emphasis * _
+ token : "string.emphasis",
+ regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)"
+ }, { //
+ token : ["text", "url", "text"],
+ regex : "(<)("+
+ "(?:https?|ftp|dict):[^'\">\\s]+"+
+ "|"+
+ "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+
+ ")(>)"
+ }],
+ "allowBlock": [
+ {token : "support.function", regex : "^ {4}.+", next : "allowBlock"},
+ {token : "empty_line", regex : '^$', next: "allowBlock"},
+ {token : "empty", regex : "", next : "start"}
+ ],
+
+ "header" : [{
+ regex: "$",
+ next : "start"
+ }, {
+ include: "basic"
+ }, {
+ defaultToken : "heading"
+ } ],
+
+ "listblock-start" : [{
+ token : "support.variable",
+ regex : /(?:\[[ x]\])?/,
+ next : "listblock"
+ }],
+
+ "listblock" : [ { // Lists only escape on completely blank lines.
+ token : "empty_line",
+ regex : "^$",
+ next : "start"
+ }, { // list
+ token : "markup.list",
+ regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+",
+ next : "listblock-start"
+ }, {
+ include : "basic", noEscape: true
+ }, { // Github style block
+ token : "support.function",
+ regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$",
+ next : "githubblock"
+ }, {
+ defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly
+ } ],
+
+ "blockquote" : [ { // Blockquotes only escape on blank lines.
+ token : "empty_line",
+ regex : "^\\s*$",
+ next : "start"
+ }, { // block quote
+ token : "string.blockquote",
+ regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+",
+ next : "blockquote"
+ }, {
+ include : "basic", noEscape: true
+ }, {
+ defaultToken : "string.blockquote"
+ } ],
+
+ "githubblock" : [ {
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "start"
+ }, {
+ defaultToken : "support.function"
+ } ]
+ });
+
+ this.embedRules(JavaScriptHighlightRules, "jscode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.embedRules(HtmlHighlightRules, "htmlcode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.embedRules(CssHighlightRules, "csscode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.embedRules(XmlHighlightRules, "xmlcode-", [{
+ token : "support.function",
+ regex : "^\\s*```",
+ next : "pop"
+ }]);
+
+ this.normalizeRules();
+};
+oop.inherits(MarkdownHighlightRules, TextHighlightRules);
+
+exports.MarkdownHighlightRules = MarkdownHighlightRules;
+});
+
+ace.define("ace/mode/mask_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/css_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+exports.MaskHighlightRules = MaskHighlightRules;
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextRules = require("./text_highlight_rules").TextHighlightRules;
+var JSRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var CssRules = require("./css_highlight_rules").CssHighlightRules;
+var MDRules = require("./markdown_highlight_rules").MarkdownHighlightRules;
+var HTMLRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var token_TAG = "keyword.support.constant.language",
+ token_COMPO = "support.function.markup.bold",
+ token_KEYWORD = "keyword",
+ token_LANG = "constant.language",
+ token_UTIL = "keyword.control.markup.italic",
+ token_ATTR = "support.variable.class",
+ token_PUNKT = "keyword.operator",
+ token_ITALIC = "markup.italic",
+ token_BOLD = "markup.bold",
+ token_LPARE = "paren.lparen",
+ token_RPARE = "paren.rparen";
+
+var const_FUNCTIONS,
+ const_KEYWORDS,
+ const_CONST,
+ const_TAGS;
+(function(){
+ const_FUNCTIONS = lang.arrayToMap(
+ ("log").split("|")
+ );
+ const_CONST = lang.arrayToMap(
+ (":dualbind|:bind|:import|slot|event|style|html|markdown|md").split("|")
+ );
+ const_KEYWORDS = lang.arrayToMap(
+ ("debugger|define|var|if|each|for|of|else|switch|case|with|visible|+if|+each|+for|+switch|+with|+visible|include|import").split("|")
+ );
+ const_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("|")
+ );
+}());
+
+function MaskHighlightRules () {
+
+ this.$rules = {
+ "start" : [
+ Token("comment", "\\/\\/.*$"),
+ Token("comment", "\\/\\*", [
+ Token("comment", ".*?\\*\\/", "start"),
+ Token("comment", ".+")
+ ]),
+
+ Blocks.string("'''"),
+ Blocks.string('"""'),
+ Blocks.string('"'),
+ Blocks.string("'"),
+
+ Blocks.syntax(/(markdown|md)\b/, "md-multiline", "multiline"),
+ Blocks.syntax(/html\b/, "html-multiline", "multiline"),
+ Blocks.syntax(/(slot|event)\b/, "js-block", "block"),
+ Blocks.syntax(/style\b/, "css-block", "block"),
+ Blocks.syntax(/var\b/, "js-statement", "attr"),
+
+ Blocks.tag(),
+
+ Token(token_LPARE, "[[({>]"),
+ Token(token_RPARE, "[\\])};]", "start"),
+ {
+ caseInsensitive: true
+ }
+ ]
+ };
+ var rules = this;
+
+ addJavaScript("interpolation", /\]/, token_RPARE + "." + token_ITALIC);
+ addJavaScript("statement", /\)|}|;/);
+ addJavaScript("block", /\}/);
+ addCss();
+ addMarkdown();
+ addHtml();
+
+ function addJavaScript(name, escape, closeType) {
+ var prfx = "js-" + name + "-",
+ rootTokens = name === "block" ? ["start"] : ["start", "no_regex"];
+ add(
+ JSRules
+ , prfx
+ , escape
+ , rootTokens
+ , closeType
+ );
+ }
+ function addCss() {
+ add(CssRules, "css-block-", /\}/);
+ }
+ function addMarkdown() {
+ add(MDRules, "md-multiline-", /("""|''')/, []);
+ }
+ function addHtml() {
+ add(HTMLRules, "html-multiline-", /("""|''')/);
+ }
+ function add(Rules, strPrfx, rgxEnd, rootTokens, closeType) {
+ var next = "pop";
+ var tokens = rootTokens || [ "start" ];
+ if (tokens.length === 0) {
+ tokens = null;
+ }
+ if (/block|multiline/.test(strPrfx)) {
+ next = strPrfx + "end";
+ rules.$rules[next] = [
+ Token("empty", "", "start")
+ ];
+ }
+ rules.embedRules(
+ Rules
+ , strPrfx
+ , [ Token(closeType || token_RPARE, rgxEnd, next) ]
+ , tokens
+ , tokens == null ? true : false
+ );
+ }
+
+ this.normalizeRules();
+}
+oop.inherits(MaskHighlightRules, TextRules);
+
+var Blocks = {
+ string: function(str, next){
+ var token = Token(
+ "string.start"
+ , str
+ , [
+ Token(token_LPARE + "." + token_ITALIC, /~\[/, Blocks.interpolation()),
+ Token("string.end", str, "pop"),
+ {
+ defaultToken: "string"
+ }
+ ]
+ , next
+ );
+ if (str.length === 1){
+ var escaped = Token("string.escape", "\\\\" + str);
+ token.push.unshift(escaped);
+ }
+ return token;
+ },
+ interpolation: function(){
+ return [
+ Token(token_UTIL, /\s*\w*\s*:/),
+ "js-interpolation-start"
+ ];
+ },
+ tagHead: function (rgx) {
+ return Token(token_ATTR, rgx, [
+ Token(token_ATTR, /[\w\-_]+/),
+ Token(token_LPARE + "." + token_ITALIC, /~\[/, Blocks.interpolation()),
+ Blocks.goUp()
+ ]);
+ },
+ tag: function () {
+ return {
+ token: 'tag',
+ onMatch : function(value) {
+ if (void 0 !== const_KEYWORDS[value])
+ return token_KEYWORD;
+ if (void 0 !== const_CONST[value])
+ return token_LANG;
+ if (void 0 !== const_FUNCTIONS[value])
+ return "support.function";
+ if (void 0 !== const_TAGS[value.toLowerCase()])
+ return token_TAG;
+
+ return token_COMPO;
+ },
+ regex : /([@\w\-_:+]+)|((^|\s)(?=\s*(\.|#)))/,
+ push: [
+ Blocks.tagHead(/\./) ,
+ Blocks.tagHead(/#/) ,
+ Blocks.expression(),
+ Blocks.attribute(),
+
+ Token(token_LPARE, /[;>{]/, "pop")
+ ]
+ };
+ },
+ syntax: function(rgx, next, type){
+ return {
+ token: token_LANG,
+ regex : rgx,
+ push: ({
+ "attr": [
+ next + "-start",
+ Token(token_PUNKT, /;/, "start")
+ ],
+ "multiline": [
+ Blocks.tagHead(/\./) ,
+ Blocks.tagHead(/#/) ,
+ Blocks.attribute(),
+ Blocks.expression(),
+ Token(token_LPARE, /[>\{]/),
+ Token(token_PUNKT, /;/, "start"),
+ Token(token_LPARE, /'''|"""/, [ next + "-start" ])
+ ],
+ "block": [
+ Blocks.tagHead(/\./) ,
+ Blocks.tagHead(/#/) ,
+ Blocks.attribute(),
+ Blocks.expression(),
+ Token(token_LPARE, /\{/, [ next + "-start" ])
+ ]
+ })[type]
+ };
+ },
+ attribute: function(){
+ return Token(function(value){
+ return /^x\-/.test(value)
+ ? token_ATTR + "." + token_BOLD
+ : token_ATTR;
+ }, /[\w_-]+/, [
+ Token(token_PUNKT, /\s*=\s*/, [
+ Blocks.string('"'),
+ Blocks.string("'"),
+ Blocks.word(),
+ Blocks.goUp()
+ ]),
+ Blocks.goUp()
+ ]);
+ },
+ expression: function(){
+ return Token(token_LPARE, /\(/, [ "js-statement-start" ]);
+ },
+ word: function(){
+ return Token("string", /[\w-_]+/);
+ },
+ goUp: function(){
+ return Token("text", "", "pop");
+ },
+ goStart: function(){
+ return Token("text", "", "start");
+ }
+};
+
+
+function Token(token, rgx, mix) {
+ var push, next, onMatch;
+ if (arguments.length === 4) {
+ push = mix;
+ next = arguments[3];
+ }
+ else if (typeof mix === "string") {
+ next = mix;
+ }
+ else {
+ push = mix;
+ }
+ if (typeof token === "function") {
+ onMatch = token;
+ token = "empty";
+ }
+ return {
+ token: token,
+ regex: rgx,
+ push: push,
+ next: next,
+ onMatch: onMatch
+ };
+}
+
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/mask",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mask_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var MaskHighlightRules = require("./mask_highlight_rules").MaskHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = MaskHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.$id = "ace/mode/mask";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-matlab.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-matlab.js
new file mode 100644
index 00000000..b8870403
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-matlab.js
@@ -0,0 +1,256 @@
+ace.define("ace/mode/matlab_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 MatlabHighlightRules = function() {
+
+var keywords = (
+ "break|case|catch|classdef|continue|else|elseif|end|for|function|global|if|otherwise|parfor|persistent|return|spmd|switch|try|while"
+ );
+
+ var builtinConstants = (
+ "true|false|inf|Inf|nan|NaN|eps|pi|ans|nargin|nargout|varargin|varargout"
+ );
+
+ var builtinFunctions = (
+ "abs|accumarray|acos(?:d|h)?|acot(?:d|h)?|acsc(?:d|h)?|actxcontrol(?:list|select)?|actxGetRunningServer|actxserver|addlistener|addpath|addpref|addtodate|"+
+ "airy|align|alim|all|allchild|alpha|alphamap|amd|ancestor|and|angle|annotation|any|area|arrayfun|asec(?:d|h)?|asin(?:d|h)?|assert|assignin|atan(?:2|d|h)?|" +
+ "audiodevinfo|audioplayer|audiorecorder|aufinfo|auread|autumn|auwrite|avifile|aviinfo|aviread|axes|axis|balance|bar(?:3|3h|h)?|base2dec|beep|BeginInvoke|bench|"+
+ "bessel(?:h|i|j|k|y)|beta|betainc|betaincinv|betaln|bicg|bicgstab|bicgstabl|bin2dec|bitand|bitcmp|bitget|bitmax|bitnot|bitor|bitset|bitshift|bitxor|blanks|blkdiag|"+
+ "bone|box|brighten|brush|bsxfun|builddocsearchdb|builtin|bvp4c|bvp5c|bvpget|bvpinit|bvpset|bvpxtend|calendar|calllib|callSoapService|camdolly|cameratoolbar|camlight|"+
+ "camlookat|camorbit|campan|campos|camproj|camroll|camtarget|camup|camva|camzoom|cart2pol|cart2sph|cast|cat|caxis|cd|cdf2rdf|cdfepoch|cdfinfo|cdflib(?:.(?:close|closeVar|"+
+ "computeEpoch|computeEpoch16|create|createAttr|createVar|delete|deleteAttr|deleteAttrEntry|deleteAttrgEntry|deleteVar|deleteVarRecords|epoch16Breakdown|epochBreakdown|getAttrEntry|"+
+ "getAttrgEntry|getAttrMaxEntry|getAttrMaxgEntry|getAttrName|getAttrNum|getAttrScope|getCacheSize|getChecksum|getCompression|getCompressionCacheSize|getConstantNames|"+
+ "getConstantValue|getCopyright|getFileBackward|getFormat|getLibraryCopyright|getLibraryVersion|getMajority|getName|getNumAttrEntries|getNumAttrgEntries|getNumAttributes|"+
+ "getNumgAttributes|getReadOnlyMode|getStageCacheSize|getValidate|getVarAllocRecords|getVarBlockingFactor|getVarCacheSize|getVarCompression|getVarData|getVarMaxAllocRecNum|"+
+ "getVarMaxWrittenRecNum|getVarName|getVarNum|getVarNumRecsWritten|getVarPadValue|getVarRecordData|getVarReservePercent|getVarsMaxWrittenRecNum|getVarSparseRecords|getVersion|"+
+ "hyperGetVarData|hyperPutVarData|inquire|inquireAttr|inquireAttrEntry|inquireAttrgEntry|inquireVar|open|putAttrEntry|putAttrgEntry|putVarData|putVarRecordData|renameAttr|"+
+ "renameVar|setCacheSize|setChecksum|setCompression|setCompressionCacheSize|setFileBackward|setFormat|setMajority|setReadOnlyMode|setStageCacheSize|setValidate|"+
+ "setVarAllocBlockRecords|setVarBlockingFactor|setVarCacheSize|setVarCompression|setVarInitialRecs|setVarPadValue|SetVarReservePercent|setVarsCacheSize|setVarSparseRecords))?|"+
+ "cdfread|cdfwrite|ceil|cell2mat|cell2struct|celldisp|cellfun|cellplot|cellstr|cgs|checkcode|checkin|checkout|chol|cholinc|cholupdate|circshift|cla|clabel|class|clc|clear|"+
+ "clearvars|clf|clipboard|clock|close|closereq|cmopts|cmpermute|cmunique|colamd|colon|colorbar|colordef|colormap|colormapeditor|colperm|Combine|comet|comet3|commandhistory|"+
+ "commandwindow|compan|compass|complex|computer|cond|condeig|condest|coneplot|conj|containers.Map|contour(?:3|c|f|slice)?|contrast|conv|conv2|convhull|convhulln|convn|cool|"+
+ "copper|copyfile|copyobj|corrcoef|cos(?:d|h)?|cot(?:d|h)?|cov|cplxpair|cputime|createClassFromWsdl|createSoapMessage|cross|csc(?:d|h)?|csvread|csvwrite|ctranspose|cumprod|"+
+ "cumsum|cumtrapz|curl|customverctrl|cylinder|daqread|daspect|datacursormode|datatipinfo|date|datenum|datestr|datetick|datevec|dbclear|dbcont|dbdown|dblquad|dbmex|dbquit|"+
+ "dbstack|dbstatus|dbstep|dbstop|dbtype|dbup|dde23|ddeget|ddesd|ddeset|deal|deblank|dec2base|dec2bin|dec2hex|decic|deconv|del2|delaunay|delaunay3|delaunayn|DelaunayTri|delete|"+
+ "demo|depdir|depfun|det|detrend|deval|diag|dialog|diary|diff|diffuse|dir|disp|display|dither|divergence|dlmread|dlmwrite|dmperm|doc|docsearch|dos|dot|dragrect|drawnow|dsearch|"+
+ "dsearchn|dynamicprops|echo|echodemo|edit|eig|eigs|ellipj|ellipke|ellipsoid|empty|enableNETfromNetworkDrive|enableservice|EndInvoke|enumeration|eomday|eq|erf|erfc|erfcinv|"+
+ "erfcx|erfinv|error|errorbar|errordlg|etime|etree|etreeplot|eval|evalc|evalin|event.(?:EventData|listener|PropertyEvent|proplistener)|exifread|exist|exit|exp|expint|expm|"+
+ "expm1|export2wsdlg|eye|ezcontour|ezcontourf|ezmesh|ezmeshc|ezplot|ezplot3|ezpolar|ezsurf|ezsurfc|factor|factorial|fclose|feather|feature|feof|ferror|feval|fft|fft2|fftn|"+
+ "fftshift|fftw|fgetl|fgets|fieldnames|figure|figurepalette|fileattrib|filebrowser|filemarker|fileparts|fileread|filesep|fill|fill3|filter|filter2|find|findall|findfigs|"+
+ "findobj|findstr|finish|fitsdisp|fitsinfo|fitsread|fitswrite|fix|flag|flipdim|fliplr|flipud|floor|flow|fminbnd|fminsearch|fopen|format|fplot|fprintf|frame2im|fread|freqspace|"+
+ "frewind|fscanf|fseek|ftell|FTP|full|fullfile|func2str|functions|funm|fwrite|fzero|gallery|gamma|gammainc|gammaincinv|gammaln|gca|gcbf|gcbo|gcd|gcf|gco|ge|genpath|genvarname|"+
+ "get|getappdata|getenv|getfield|getframe|getpixelposition|getpref|ginput|gmres|gplot|grabcode|gradient|gray|graymon|grid|griddata(?:3|n)?|griddedInterpolant|gsvd|gt|gtext|"+
+ "guidata|guide|guihandles|gunzip|gzip|h5create|h5disp|h5info|h5read|h5readatt|h5write|h5writeatt|hadamard|handle|hankel|hdf|hdf5|hdf5info|hdf5read|hdf5write|hdfinfo|"+
+ "hdfread|hdftool|help|helpbrowser|helpdesk|helpdlg|helpwin|hess|hex2dec|hex2num|hgexport|hggroup|hgload|hgsave|hgsetget|hgtransform|hidden|hilb|hist|histc|hold|home|horzcat|"+
+ "hostid|hot|hsv|hsv2rgb|hypot|ichol|idivide|ifft|ifft2|ifftn|ifftshift|ilu|im2frame|im2java|imag|image|imagesc|imapprox|imfinfo|imformats|import|importdata|imread|imwrite|"+
+ "ind2rgb|ind2sub|inferiorto|info|inline|inmem|inpolygon|input|inputdlg|inputname|inputParser|inspect|instrcallback|instrfind|instrfindall|int2str|integral(?:2|3)?|interp(?:1|"+
+ "1q|2|3|ft|n)|interpstreamspeed|intersect|intmax|intmin|inv|invhilb|ipermute|isa|isappdata|iscell|iscellstr|ischar|iscolumn|isdir|isempty|isequal|isequaln|isequalwithequalnans|"+
+ "isfield|isfinite|isfloat|isglobal|ishandle|ishghandle|ishold|isinf|isinteger|isjava|iskeyword|isletter|islogical|ismac|ismatrix|ismember|ismethod|isnan|isnumeric|isobject|"+
+ "isocaps|isocolors|isonormals|isosurface|ispc|ispref|isprime|isprop|isreal|isrow|isscalar|issorted|isspace|issparse|isstr|isstrprop|isstruct|isstudent|isunix|isvarname|"+
+ "isvector|javaaddpath|javaArray|javachk|javaclasspath|javacomponent|javaMethod|javaMethodEDT|javaObject|javaObjectEDT|javarmpath|jet|keyboard|kron|lasterr|lasterror|"+
+ "lastwarn|lcm|ldivide|ldl|le|legend|legendre|length|libfunctions|libfunctionsview|libisloaded|libpointer|libstruct|license|light|lightangle|lighting|lin2mu|line|lines|"+
+ "linkaxes|linkdata|linkprop|linsolve|linspace|listdlg|listfonts|load|loadlibrary|loadobj|log|log10|log1p|log2|loglog|logm|logspace|lookfor|lower|ls|lscov|lsqnonneg|lsqr|"+
+ "lt|lu|luinc|magic|makehgtform|mat2cell|mat2str|material|matfile|matlab.io.MatFile|matlab.mixin.(?:Copyable|Heterogeneous(?:.getDefaultScalarElement)?)|matlabrc|"+
+ "matlabroot|max|maxNumCompThreads|mean|median|membrane|memmapfile|memory|menu|mesh|meshc|meshgrid|meshz|meta.(?:class(?:.fromName)?|DynamicProperty|EnumeratedValue|event|"+
+ "MetaData|method|package(?:.(?:fromName|getAllPackages))?|property)|metaclass|methods|methodsview|mex(?:.getCompilerConfigurations)?|MException|mexext|mfilename|min|minres|"+
+ "minus|mislocked|mkdir|mkpp|mldivide|mlint|mlintrpt|mlock|mmfileinfo|mmreader|mod|mode|more|move|movefile|movegui|movie|movie2avi|mpower|mrdivide|msgbox|mtimes|mu2lin|"+
+ "multibandread|multibandwrite|munlock|namelengthmax|nargchk|narginchk|nargoutchk|native2unicode|nccreate|ncdisp|nchoosek|ncinfo|ncread|ncreadatt|ncwrite|ncwriteatt|"+
+ "ncwriteschema|ndgrid|ndims|ne|NET(?:.(?:addAssembly|Assembly|convertArray|createArray|createGeneric|disableAutoRelease|enableAutoRelease|GenericClass|invokeGenericMethod|"+
+ "NetException|setStaticProperty))?|netcdf.(?:abort|close|copyAtt|create|defDim|defGrp|defVar|defVarChunking|defVarDeflate|defVarFill|defVarFletcher32|delAtt|endDef|getAtt|"+
+ "getChunkCache|getConstant|getConstantNames|getVar|inq|inqAtt|inqAttID|inqAttName|inqDim|inqDimID|inqDimIDs|inqFormat|inqGrpName|inqGrpNameFull|inqGrpParent|inqGrps|"+
+ "inqLibVers|inqNcid|inqUnlimDims|inqVar|inqVarChunking|inqVarDeflate|inqVarFill|inqVarFletcher32|inqVarID|inqVarIDs|open|putAtt|putVar|reDef|renameAtt|renameDim|renameVar|"+
+ "setChunkCache|setDefaultFormat|setFill|sync)|newplot|nextpow2|nnz|noanimate|nonzeros|norm|normest|not|notebook|now|nthroot|null|num2cell|num2hex|num2str|numel|nzmax|"+
+ "ode(?:113|15i|15s|23|23s|23t|23tb|45)|odeget|odeset|odextend|onCleanup|ones|open|openfig|opengl|openvar|optimget|optimset|or|ordeig|orderfields|ordqz|ordschur|orient|"+
+ "orth|pack|padecoef|pagesetupdlg|pan|pareto|parseSoapResponse|pascal|patch|path|path2rc|pathsep|pathtool|pause|pbaspect|pcg|pchip|pcode|pcolor|pdepe|pdeval|peaks|perl|perms|"+
+ "permute|pie|pink|pinv|planerot|playshow|plot|plot3|plotbrowser|plotedit|plotmatrix|plottools|plotyy|plus|pol2cart|polar|poly|polyarea|polyder|polyeig|polyfit|polyint|polyval|"+
+ "polyvalm|pow2|power|ppval|prefdir|preferences|primes|print|printdlg|printopt|printpreview|prod|profile|profsave|propedit|propertyeditor|psi|publish|PutCharArray|PutFullMatrix|"+
+ "PutWorkspaceData|pwd|qhull|qmr|qr|qrdelete|qrinsert|qrupdate|quad|quad2d|quadgk|quadl|quadv|questdlg|quit|quiver|quiver3|qz|rand|randi|randn|randperm|RandStream(?:.(?:create|"+
+ "getDefaultStream|getGlobalStream|list|setDefaultStream|setGlobalStream))?|rank|rat|rats|rbbox|rcond|rdivide|readasync|real|reallog|realmax|realmin|realpow|realsqrt|record|"+
+ "rectangle|rectint|recycle|reducepatch|reducevolume|refresh|refreshdata|regexp|regexpi|regexprep|regexptranslate|rehash|rem|Remove|RemoveAll|repmat|reset|reshape|residue|"+
+ "restoredefaultpath|rethrow|rgb2hsv|rgb2ind|rgbplot|ribbon|rmappdata|rmdir|rmfield|rmpath|rmpref|rng|roots|rose|rosser|rot90|rotate|rotate3d|round|rref|rsf2csf|run|save|saveas|"+
+ "saveobj|savepath|scatter|scatter3|schur|sec|secd|sech|selectmoveresize|semilogx|semilogy|sendmail|serial|set|setappdata|setdiff|setenv|setfield|setpixelposition|setpref|setstr|"+
+ "setxor|shading|shg|shiftdim|showplottool|shrinkfaces|sign|sin(?:d|h)?|size|slice|smooth3|snapnow|sort|sortrows|sound|soundsc|spalloc|spaugment|spconvert|spdiags|specular|speye|"+
+ "spfun|sph2cart|sphere|spinmap|spline|spones|spparms|sprand|sprandn|sprandsym|sprank|spring|sprintf|spy|sqrt|sqrtm|squeeze|ss2tf|sscanf|stairs|startup|std|stem|stem3|stopasync|"+
+ "str2double|str2func|str2mat|str2num|strcat|strcmp|strcmpi|stream2|stream3|streamline|streamparticles|streamribbon|streamslice|streamtube|strfind|strjust|strmatch|strncmp|"+
+ "strncmpi|strread|strrep|strtok|strtrim|struct2cell|structfun|strvcat|sub2ind|subplot|subsasgn|subsindex|subspace|subsref|substruct|subvolume|sum|summer|superclasses|superiorto|"+
+ "support|surf|surf2patch|surface|surfc|surfl|surfnorm|svd|svds|swapbytes|symamd|symbfact|symmlq|symrcm|symvar|system|tan(?:d|h)?|tar|tempdir|tempname|tetramesh|texlabel|text|"+
+ "textread|textscan|textwrap|tfqmr|throw|tic|Tiff(?:.(?:getTagNames|getVersion))?|timer|timerfind|timerfindall|times|timeseries|title|toc|todatenum|toeplitz|toolboxdir|trace|"+
+ "transpose|trapz|treelayout|treeplot|tril|trimesh|triplequad|triplot|TriRep|TriScatteredInterp|trisurf|triu|tscollection|tsearch|tsearchn|tstool|type|typecast|uibuttongroup|"+
+ "uicontextmenu|uicontrol|uigetdir|uigetfile|uigetpref|uiimport|uimenu|uiopen|uipanel|uipushtool|uiputfile|uiresume|uisave|uisetcolor|uisetfont|uisetpref|uistack|uitable|"+
+ "uitoggletool|uitoolbar|uiwait|uminus|undocheckout|unicode2native|union|unique|unix|unloadlibrary|unmesh|unmkpp|untar|unwrap|unzip|uplus|upper|urlread|urlwrite|usejava|"+
+ "userpath|validateattributes|validatestring|vander|var|vectorize|ver|verctrl|verLessThan|version|vertcat|VideoReader(?:.isPlatformSupported)?|VideoWriter(?:.getProfiles)?|"+
+ "view|viewmtx|visdiff|volumebounds|voronoi|voronoin|wait|waitbar|waitfor|waitforbuttonpress|warndlg|warning|waterfall|wavfinfo|wavplay|wavread|wavrecord|wavwrite|web|weekday|"+
+ "what|whatsnew|which|whitebg|who|whos|wilkinson|winopen|winqueryreg|winter|wk1finfo|wk1read|wk1write|workspace|xlabel|xlim|xlsfinfo|xlsread|xlswrite|xmlread|xmlwrite|xor|xslt|"+
+ "ylabel|ylim|zeros|zip|zlabel|zlim|zoom|addedvarplot|andrewsplot|anova(?:1|2|n)|ansaribradley|aoctool|barttest|bbdesign|beta(?:cdf|fit|inv|like|pdf|rnd|stat)|bino(?:cdf|fit|inv|"+
+ "pdf|rnd|stat)|biplot|bootci|bootstrp|boxplot|candexch|candgen|canoncorr|capability|capaplot|caseread|casewrite|categorical|ccdesign|cdfplot|chi2(?:cdf|gof|inv|pdf|rnd|stat)|"+
+ "cholcov|Classification(?:BaggedEnsemble|Discriminant(?:.(?:fit|make|template))?|Ensemble|KNN(?:.(?:fit|template))?|PartitionedEnsemble|PartitionedModel|Tree(?:.(?:fit|"+
+ "template))?)|classify|classregtree|cluster|clusterdata|cmdscale|combnk|Compact(?:Classification(?:Discriminant|Ensemble|Tree)|Regression(?:Ensemble|Tree)|TreeBagger)|confusionmat|"+
+ "controlchart|controlrules|cophenet|copula(?:cdf|fit|param|pdf|rnd|stat)|cordexch|corr|corrcov|coxphfit|createns|crosstab|crossval|cvpartition|datasample|dataset|daugment|dcovary|"+
+ "dendrogram|dfittool|disttool|dummyvar|dwtest|ecdf|ecdfhist|ev(?:cdf|fit|inv|like|pdf|rnd|stat)|ExhaustiveSearcher|exp(?:cdf|fit|inv|like|pdf|rnd|stat)|factoran|fcdf|ff2n|finv|"+
+ "fitdist|fitensemble|fpdf|fracfact|fracfactgen|friedman|frnd|fstat|fsurfht|fullfact|gagerr|gam(?:cdf|fit|inv|like|pdf|rnd|stat)|GeneralizedLinearModel(?:.fit)?|geo(?:cdf|inv|mean|"+
+ "pdf|rnd|stat)|gev(?:cdf|fit|inv|like|pdf|rnd|stat)|gline|glmfit|glmval|glyphplot|gmdistribution(?:.fit)?|gname|gp(?:cdf|fit|inv|like|pdf|rnd|stat)|gplotmatrix|grp2idx|grpstats|"+
+ "gscatter|haltonset|harmmean|hist3|histfit|hmm(?:decode|estimate|generate|train|viterbi)|hougen|hyge(?:cdf|inv|pdf|rnd|stat)|icdf|inconsistent|interactionplot|invpred|iqr|iwishrnd|"+
+ "jackknife|jbtest|johnsrnd|KDTreeSearcher|kmeans|knnsearch|kruskalwallis|ksdensity|kstest|kstest2|kurtosis|lasso|lassoglm|lassoPlot|leverage|lhsdesign|lhsnorm|lillietest|"+
+ "LinearModel(?:.fit)?|linhyptest|linkage|logn(?:cdf|fit|inv|like|pdf|rnd|stat)|lsline|mad|mahal|maineffectsplot|manova1|manovacluster|mdscale|mhsample|mle|mlecov|mnpdf|"+
+ "mnrfit|mnrnd|mnrval|moment|multcompare|multivarichart|mvn(?:cdf|pdf|rnd)|mvregress|mvregresslike|mvt(?:cdf|pdf|rnd)|NaiveBayes(?:.fit)?|nan(?:cov|max|mean|median|min|std|"+
+ "sum|var)|nbin(?:cdf|fit|inv|pdf|rnd|stat)|ncf(?:cdf|inv|pdf|rnd|stat)|nct(?:cdf|inv|pdf|rnd|stat)|ncx2(?:cdf|inv|pdf|rnd|stat)|NeighborSearcher|nlinfit|nlintool|nlmefit|nlmefitsa|"+
+ "nlparci|nlpredci|nnmf|nominal|NonLinearModel(?:.fit)?|norm(?:cdf|fit|inv|like|pdf|rnd|stat)|normplot|normspec|ordinal|outlierMeasure|parallelcoords|paretotails|partialcorr|"+
+ "pcacov|pcares|pdf|pdist|pdist2|pearsrnd|perfcurve|perms|piecewisedistribution|plsregress|poiss(?:cdf|fit|inv|pdf|rnd|tat)|polyconf|polytool|prctile|princomp|ProbDist(?:Kernel|"+
+ "Parametric|UnivKernel|UnivParam)?|probplot|procrustes|qqplot|qrandset|qrandstream|quantile|randg|random|randsample|randtool|range|rangesearch|ranksum|rayl(?:cdf|fit|inv|pdf|"+
+ "rnd|stat)|rcoplot|refcurve|refline|regress|Regression(?:BaggedEnsemble|Ensemble|PartitionedEnsemble|PartitionedModel|Tree(?:.(?:fit|template))?)|regstats|relieff|ridge|"+
+ "robustdemo|robustfit|rotatefactors|rowexch|rsmdemo|rstool|runstest|sampsizepwr|scatterhist|sequentialfs|signrank|signtest|silhouette|skewness|slicesample|sobolset|squareform|"+
+ "statget|statset|stepwise|stepwisefit|surfht|tabulate|tblread|tblwrite|tcdf|tdfread|tiedrank|tinv|tpdf|TreeBagger|treedisp|treefit|treeprune|treetest|treeval|trimmean|trnd|tstat|"+
+ "ttest|ttest2|unid(?:cdf|inv|pdf|rnd|stat)|unif(?:cdf|inv|it|pdf|rnd|stat)|vartest(?:2|n)?|wbl(?:cdf|fit|inv|like|pdf|rnd|stat)|wblplot|wishrnd|x2fx|xptread|zscore|ztest"+
+ "adapthisteq|analyze75info|analyze75read|applycform|applylut|axes2pix|bestblk|blockproc|bwarea|bwareaopen|bwboundaries|bwconncomp|bwconvhull|bwdist|bwdistgeodesic|bweuler|"+
+ "bwhitmiss|bwlabel|bwlabeln|bwmorph|bwpack|bwperim|bwselect|bwtraceboundary|bwulterode|bwunpack|checkerboard|col2im|colfilt|conndef|convmtx2|corner|cornermetric|corr2|cp2tform|"+
+ "cpcorr|cpselect|cpstruct2pairs|dct2|dctmtx|deconvblind|deconvlucy|deconvreg|deconvwnr|decorrstretch|demosaic|dicom(?:anon|dict|info|lookup|read|uid|write)|edge|edgetaper|entropy|"+
+ "entropyfilt|fan2para|fanbeam|findbounds|fliptform|freqz2|fsamp2|fspecial|ftrans2|fwind1|fwind2|getheight|getimage|getimagemodel|getline|getneighbors|getnhood|getpts|"+
+ "getrangefromclass|getrect|getsequence|gray2ind|graycomatrix|graycoprops|graydist|grayslice|graythresh|hdrread|hdrwrite|histeq|hough|houghlines|houghpeaks|iccfind|iccread|"+
+ "iccroot|iccwrite|idct2|ifanbeam|im2bw|im2col|im2double|im2int16|im2java2d|im2single|im2uint16|im2uint8|imabsdiff|imadd|imadjust|ImageAdapter|imageinfo|imagemodel|imapplymatrix|"+
+ "imattributes|imbothat|imclearborder|imclose|imcolormaptool|imcomplement|imcontour|imcontrast|imcrop|imdilate|imdisplayrange|imdistline|imdivide|imellipse|imerode|imextendedmax|"+
+ "imextendedmin|imfill|imfilter|imfindcircles|imfreehand|imfuse|imgca|imgcf|imgetfile|imhandles|imhist|imhmax|imhmin|imimposemin|imlincomb|imline|immagbox|immovie|immultiply|imnoise|"+
+ "imopen|imoverview|imoverviewpanel|impixel|impixelinfo|impixelinfoval|impixelregion|impixelregionpanel|implay|impoint|impoly|impositionrect|improfile|imputfile|impyramid|"+
+ "imreconstruct|imrect|imregconfig|imregionalmax|imregionalmin|imregister|imresize|imroi|imrotate|imsave|imscrollpanel|imshow|imshowpair|imsubtract|imtool|imtophat|imtransform|"+
+ "imview|ind2gray|ind2rgb|interfileinfo|interfileread|intlut|ippl|iptaddcallback|iptcheckconn|iptcheckhandle|iptcheckinput|iptcheckmap|iptchecknargin|iptcheckstrs|iptdemos|iptgetapi|"+
+ "iptGetPointerBehavior|iptgetpref|ipticondir|iptnum2ordinal|iptPointerManager|iptprefs|iptremovecallback|iptSetPointerBehavior|iptsetpref|iptwindowalign|iradon|isbw|isflat|isgray|"+
+ "isicc|isind|isnitf|isrgb|isrset|lab2double|lab2uint16|lab2uint8|label2rgb|labelmatrix|makecform|makeConstrainToRectFcn|makehdr|makelut|makeresampler|maketform|mat2gray|mean2|"+
+ "medfilt2|montage|nitfinfo|nitfread|nlfilter|normxcorr2|ntsc2rgb|openrset|ordfilt2|otf2psf|padarray|para2fan|phantom|poly2mask|psf2otf|qtdecomp|qtgetblk|qtsetblk|radon|rangefilt|"+
+ "reflect|regionprops|registration.metric.(?:MattesMutualInformation|MeanSquares)|registration.optimizer.(?:OnePlusOneEvolutionary|RegularStepGradientDescent)|rgb2gray|"+
+ "rgb2ntsc|rgb2ycbcr|roicolor|roifill|roifilt2|roipoly|rsetwrite|std2|stdfilt|strel|stretchlim|subimage|tformarray|tformfwd|tforminv|tonemap|translate|truesize|uintlut|viscircles|"+
+ "warp|watershed|whitepoint|wiener2|xyz2double|xyz2uint16|ycbcr2rgb|bintprog|color|fgoalattain|fminbnd|fmincon|fminimax|fminsearch|fminunc|fseminf|fsolve|fzero|fzmult|gangstr|ktrlink|"+
+ "linprog|lsqcurvefit|lsqlin|lsqnonlin|lsqnonneg|optimget|optimset|optimtool|quadprog"
+ );
+ var storageType = (
+ "cell|struct|char|double|single|logical|u?int(?:8|16|32|64)|sparse"
+ );
+ var keywordMapper = this.createKeywordMapper({
+ "storage.type": storageType,
+ "support.function": builtinFunctions,
+ "keyword": keywords,
+ "constant.language": builtinConstants
+ }, "identifier", true);
+
+ this.$rules = {
+ start: [{
+ token : "string",
+ regex : "'",
+ stateName : "qstring",
+ next : [{
+ token : "constant.language.escape",
+ regex : "''"
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ regex: "",
+ next: "noQstring"
+ }],
+ noQstring : [{
+ regex: "^\\s*%{\\s*$",
+ token: "comment.start",
+ push: "blockComment"
+ }, {
+ token : "comment",
+ regex : "%[^\r\n]*"
+ }, {
+ token : "string",
+ regex : '"',
+ stateName : "qqstring",
+ next : [{
+ token : "constant.language.escape",
+ regex : /\\./
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ 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 : "\\+|\\-|\\/|\\/\\/|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=",
+ next: "start"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\.",
+ next: "start"
+ }, {
+ token : "paren.lparen",
+ regex : "[({\\[]",
+ next: "start"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]})]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }, {
+ token : "text",
+ regex : "$",
+ next : "start"
+ }],
+ blockComment: [{
+ regex: "^\\s*%{\\s*$",
+ token: "comment.start",
+ push: "blockComment"
+ }, {
+ regex: "^\\s*%}\\s*$",
+ token: "comment.end",
+ next: "pop"
+ }, {
+ defaultToken: "comment"
+ }]
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(MatlabHighlightRules, TextHighlightRules);
+
+exports.MatlabHighlightRules = MatlabHighlightRules;
+});
+
+ace.define("ace/mode/matlab",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matlab_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var MatlabHighlightRules = require("./matlab_highlight_rules").MatlabHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = MatlabHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "%";
+ this.blockComment = {start: "%{", end: "%}"};
+
+ this.$id = "ace/mode/matlab";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-maze.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-maze.js
new file mode 100644
index 00000000..cdc8d221
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-maze.js
@@ -0,0 +1,284 @@
+ace.define("ace/mode/maze_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 MazeHighlightRules = function() {
+
+ this.$rules = {
+ start: [{
+ token: "keyword.control",
+ regex: /##|``/,
+ comment: "Wall"
+ }, {
+ token: "entity.name.tag",
+ regex: /\.\./,
+ comment: "Path"
+ }, {
+ token: "keyword.control",
+ regex: /<>/,
+ comment: "Splitter"
+ }, {
+ token: "entity.name.tag",
+ regex: /\*[\*A-Za-z0-9]/,
+ comment: "Signal"
+ }, {
+ token: "constant.numeric",
+ regex: /[0-9]{2}/,
+ comment: "Pause"
+ }, {
+ token: "keyword.control",
+ regex: /\^\^/,
+ comment: "Start"
+ }, {
+ token: "keyword.control",
+ regex: /\(\)/,
+ comment: "Hole"
+ }, {
+ token: "support.function",
+ regex: />>/,
+ comment: "Out"
+ }, {
+ token: "support.function",
+ regex: />\//,
+ comment: "Ln Out"
+ }, {
+ token: "support.function",
+ regex: /<</,
+ comment: "In"
+ }, {
+ token: "keyword.control",
+ regex: /--/,
+ comment: "One use"
+ }, {
+ token: "constant.language",
+ regex: /%[LRUDNlrudn]/,
+ comment: "Direction"
+ }, {
+ token: [
+ "entity.name.function",
+ "keyword.other",
+ "keyword.operator",
+ "keyword.other",
+ "keyword.operator",
+ "constant.numeric",
+ "keyword.operator",
+ "keyword.other",
+ "keyword.operator",
+ "constant.numeric",
+ "string.quoted.double",
+ "string.quoted.single"
+ ],
+ regex: /([A-Za-z][A-Za-z0-9])( *-> *)(?:([-+*\/]=)( *)((?:-)?)([0-9]+)|(=)( *)(?:((?:-)?)([0-9]+)|("[^"]*")|('[^']*')))/,
+ comment: "Assignment function"
+ }, {
+ token: [
+ "entity.name.function",
+ "keyword.other",
+ "keyword.control",
+ "keyword.other",
+ "keyword.operator",
+ "keyword.other",
+ "keyword.operator",
+ "constant.numeric",
+ "entity.name.tag",
+ "keyword.other",
+ "keyword.control",
+ "keyword.other",
+ "constant.language",
+ "keyword.other",
+ "keyword.control",
+ "keyword.other",
+ "constant.language"
+ ],
+ regex: /([A-Za-z][A-Za-z0-9])( *-> *)(IF|if)( *)(?:([<>]=?|==)( *)((?:-)?)([0-9]+)|(\*[\*A-Za-z0-9]))( *)(THEN|then)( *)(%[LRUDNlrudn])(?:( *)(ELSE|else)( *)(%[LRUDNlrudn]))?/,
+ comment: "Equality Function"
+ }, {
+ token: "entity.name.function",
+ regex: /[A-Za-z][A-Za-z0-9]/,
+ comment: "Function cell"
+ }, {
+ token: "comment.line.double-slash",
+ regex: / *\/\/.*/,
+ comment: "Comment"
+ }]
+ };
+
+ this.normalizeRules();
+};
+
+MazeHighlightRules.metaData = {
+ fileTypes: ["mz"],
+ name: "Maze",
+ scopeName: "source.maze"
+};
+
+
+oop.inherits(MazeHighlightRules, TextHighlightRules);
+
+exports.MazeHighlightRules = MazeHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/maze",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/maze_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var MazeHighlightRules = require("./maze_highlight_rules").MazeHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = MazeHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.$id = "ace/mode/maze";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-mel.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-mel.js
new file mode 100644
index 00000000..20de249b
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-mel.js
@@ -0,0 +1,256 @@
+ace.define("ace/mode/mel_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 MELHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { caseInsensitive: true,
+ token: 'storage.type.mel',
+ regex: '\\b(matrix|string|vector|float|int|void)\\b' },
+ { caseInsensitive: true,
+ token: 'support.function.mel',
+ regex: '\\b((s(h(ow(ManipCtx|S(hadingGroupAttrEditor|electionInTitle)|H(idden|elp)|Window)|el(f(Button|TabLayout|Layout)|lField)|ading(GeometryRelCtx|Node|Connection|LightRelCtx))|y(s(tem|File)|mbol(Button|CheckBox))|nap(shot|Mode|2to2 |TogetherCtx|Key)|c(ulpt|ene(UIReplacement|Editor)|ale(BrushBrightness |Constraint|Key(Ctx)?)?|r(ipt(Node|Ctx|Table|edPanel(Type)?|Job|EditorInfo)|oll(Field|Layout))|mh)|t(itch(Surface(Points)?|AndExplodeShell )|a(ckTrace|rt(sWith |String ))|r(cmp|i(ng(ToStringArray |Array(Remove(Duplicates | )|C(ount |atenate )|ToString |Intersector))|p )|oke))|i(n(gleProfileBirailSurface)?|ze|gn|mplify)|o(u(nd(Control)?|rce)|ft(Mod(Ctx)?)?|rt)|u(perCtx|rface(S(haderList|ampler))?|b(st(itute(Geometry|AllString )?|ring)|d(M(irror|a(tchTopology|p(SewMove|Cut)))|iv(Crease|DisplaySmoothness)?|C(ollapse|leanTopology)|T(o(Blind|Poly)|ransferUVsToCache)|DuplicateAndConnect|EditUV|ListComponentConversion|AutoProjection)))|p(h(ere|rand)|otLight(PreviewPort)?|aceLocator|r(ing|eadSheetEditor))|e(t(s|MenuMode|Sta(te |rtupMessage|mpDensity )|NodeTypeFlag|ConstraintRestPosition |ToolTo|In(putDeviceMapping|finity)|D(ynamic|efaultShadingGroup|rivenKeyframe)|UITemplate|P(ar(ticleAttr|ent)|roject )|E(scapeCtx|dit(or|Ctx))|Key(Ctx|frame|Path)|F(ocus|luidAttr)|Attr(Mapping)?)|parator|ed|l(ect(Mode|ionConnection|Context|Type|edNodes|Pr(iority|ef)|Key(Ctx)?)?|LoadSettings)|archPathArray )|kin(Cluster|Percent)|q(uareSurface|rt)|w(itchTable|atchDisplayPort)|a(ve(Menu|Shelf|ToolSettings|I(nitialState|mage)|Pref(s|Objects)|Fluid|A(ttrPreset |llShelves))|mpleImage)|rtContext|mooth(step|Curve|TangentSurface))|h(sv_to_rgb|yp(ot|er(Graph|Shade|Panel))|i(tTest|de|lite)|ot(Box|key(Check)?)|ud(Button|Slider(Button)?)|e(lp(Line)?|adsUpDisplay|rmite)|wRe(nder(Load)?|flectionMap)|ard(enPointCurve|ware(RenderPanel)?))|n(o(nLinear|ise|de(Type|IconButton|Outliner|Preset)|rmal(ize |Constraint))|urbs(Boolean|S(elect|quare)|C(opyUVSet|ube)|To(Subdiv|Poly(gonsPref)?)|Plane|ViewDirectionVector )|ew(ton|PanelItems)|ame(space(Info)?|Command|Field))|c(h(oice|dir|eck(Box(Grp)?|DefaultRenderGlobals)|a(n(nelBox|geSubdiv(Region|ComponentDisplayLevel))|racter(Map|OutlineEditor)?))|y(cleCheck|linder)|tx(Completion|Traverse|EditMode|Abort)|irc(ularFillet|le)|o(s|n(str(uctionHistory|ain(Value)?)|nect(ionInfo|Control|Dynamic|Joint|Attr)|t(extInfo|rol)|dition|e|vert(SolidTx|Tessellation|Unit|FromOldLayers |Lightmap)|firmDialog)|py(SkinWeights|Key|Flexor|Array )|l(or(Slider(Grp|ButtonGrp)|Index(SliderGrp)?|Editor|AtPoint)?|umnLayout|lision)|arsenSubdivSelectionList|m(p(onentEditor|utePolysetVolume |actHairSystem )|mand(Port|Echo|Line)))|u(tKey|r(ve(MoveEPCtx|SketchCtx|CVCtx|Intersect|OnSurface|E(ditorCtx|PCtx)|AddPtCtx)?|rent(Ctx|Time(Ctx)?|Unit)))|p(GetSolverAttr|Button|S(olver(Types)?|e(t(SolverAttr|Edit)|am))|C(o(nstraint|llision)|ache)|Tool|P(anel|roperty))|eil|l(ip(Schedule(rOutliner)?|TrimBefore |Editor(CurrentTimeCtx)?)?|ose(Surface|Curve)|uster|ear(Cache)?|amp)|a(n(CreateManip|vas)|tch(Quiet)?|pitalizeString |mera(View)?)|r(oss(Product )?|eate(RenderLayer|MotionField |SubdivRegion|N(ode|ewShelf )|D(isplayLayer|rawCtx)|Editor))|md(Shell|FileOutput))|M(R(ender(ShadowData|Callback|Data|Util|View|Line(Array)?)|ampAttribute)|G(eometryData|lobal)|M(odelMessage|essage|a(nipData|t(erial|rix)))|BoundingBox|S(yntax|ceneMessage|t(atus|ring(Array)?)|imple|pace|elect(ion(Mask|List)|Info)|watchRender(Register|Base))|H(ardwareRenderer|WShaderSwatchGenerator)|NodeMessage|C(o(nditionMessage|lor(Array)?|m(putation|mand(Result|Message)))|ursor|loth(Material|S(ystem|olverRegister)|Con(straint|trol)|Triangle|Particle|Edge|Force)|allbackIdArray)|T(ypeId|ime(r(Message)?|Array)?|oolsInfo|esselationParams|r(imBoundaryArray|ansformationMatrix))|I(ntArray|t(Geometry|Mesh(Polygon|Edge|Vertex|FaceVertex)|S(urfaceCV|electionList)|CurveCV|Instancer|eratorType|D(ependency(Graph|Nodes)|ag)|Keyframe)|k(System|HandleGroup)|mage)|3dView|Object(SetMessage|Handle|Array)?|D(G(M(odifier|essage)|Context)|ynSwept(Triangle|Line)|istance|oubleArray|evice(State|Channel)|a(ta(Block|Handle)|g(M(odifier|essage)|Path(Array)?))|raw(Request(Queue)?|Info|Data|ProcedureBase))|U(serEventMessage|i(nt(Array|64Array)|Message))|P(o(int(Array)?|lyMessage)|lug(Array)?|rogressWindow|x(G(eometry(Iterator|Data)|lBuffer)|M(idiInputDevice|odelEditorCommand|anipContainer)|S(urfaceShape(UI)?|pringNode|electionContext)|HwShaderNode|Node|Co(ntext(Command)?|m(ponentShape|mand))|T(oolCommand|ransform(ationMatrix)?)|IkSolver(Node)?|3dModelView|ObjectSet|D(eformerNode|ata|ragAndDropBehavior)|PolyT(weakUVCommand|rg)|EmitterNode|F(i(eldNode|leTranslator)|luidEmitterNode)|LocatorNode))|E(ulerRotation|vent(Message)?)|ayatomr|Vector(Array)?|Quaternion|F(n(R(otateManip|eflectShader|adialField)|G(e(nericAttribute|ometry(Data|Filter))|ravityField)|M(otionPath|es(sageAttribute|h(Data)?)|a(nip3D|trix(Data|Attribute)))|B(l(innShader|endShapeDeformer)|ase)|S(caleManip|t(ateManip|ring(Data|ArrayData))|ingleIndexedComponent|ubd(Names|Data)?|p(hereData|otLight)|et|kinCluster)|HikEffector|N(on(ExtendedLight|AmbientLight)|u(rbs(Surface(Data)?|Curve(Data)?)|meric(Data|Attribute))|ewtonField)|C(haracter|ircleSweepManip|ompo(nent(ListData)?|undAttribute)|urveSegmentManip|lip|amera)|T(ypedAttribute|oggleManip|urbulenceField|r(ipleIndexedComponent|ansform))|I(ntArrayData|k(Solver|Handle|Joint|Effector))|D(ynSweptGeometryData|i(s(cManip|tanceManip)|rection(Manip|alLight))|ouble(IndexedComponent|ArrayData)|ependencyNode|a(ta|gNode)|ragField)|U(ni(tAttribute|formField)|Int64ArrayData)|P(hong(Shader|EShader)|oint(On(SurfaceManip|CurveManip)|Light|ArrayData)|fxGeometry|lugin(Data)?|arti(cleSystem|tion))|E(numAttribute|xpression)|V(o(lume(Light|AxisField)|rtexField)|ectorArrayData)|KeyframeDelta(Move|B(lockAddRemove|reakdown)|Scale|Tangent|InfType|Weighted|AddRemove)?|F(ield|luid|reePointTriadManip)|W(ireDeformer|eightGeometryFilter)|L(ight(DataAttribute)?|a(yeredShader|ttice(D(eformer|ata))?|mbertShader))|A(ni(sotropyShader|mCurve)|ttribute|irField|r(eaLight|rayAttrsData)|mbientLight))?|ile(IO|Object)|eedbackLine|loat(Matrix|Point(Array)?|Vector(Array)?|Array))|L(i(ghtLinks|brary)|ockMessage)|A(n(im(Message|C(ontrol|urveC(hange|lipboard(Item(Array)?)?))|Util)|gle)|ttribute(Spec(Array)?|Index)|r(rayData(Builder|Handle)|g(Database|Parser|List))))|t(hreePointArcCtx|ime(Control|Port|rX)|o(ol(Button|HasOptions|Collection|Dropped|PropertyWindow)|NativePath |upper|kenize(List )?|l(ower|erance)|rus|ggle(WindowVisibility|Axis)?)|u(rbulence|mble(Ctx)?)|ex(RotateContext|M(oveContext|anipContext)|t(ScrollList|Curves|ure(HairColor |DisplacePlane |PlacementContext|Window)|ToShelf |Field(Grp|ButtonGrp)?)?|S(caleContext|electContext|mudgeUVContext)|WinToolCtx)|woPointArcCtx|a(n(gentConstraint)?|bLayout)|r(im|unc(ate(HairCache|FluidCache))?|a(ns(formLimits|lator)|c(e|k(Ctx)?))))|i(s(olateSelect|Connected|True|Dirty|ParentOf |Valid(String |ObjectName |UiName )|AnimCurve )|n(s(tance(r)?|ert(Joint(Ctx)?|K(not(Surface|Curve)|eyCtx)))|heritTransform|t(S(crollBar|lider(Grp)?)|er(sect|nalVar|ToUI )|Field(Grp)?))|conText(Radio(Button|Collection)|Button|StaticLabel|CheckBox)|temFilter(Render|Type|Attr)?|prEngine|k(S(ystem(Info)?|olver|plineHandleCtx)|Handle(Ctx|DisplayScale)?|fkDisplayMethod)|m(portComposerCurves |fPlugins|age))|o(ceanNurbsPreviewPlane |utliner(Panel|Editor)|p(tion(Menu(Grp)?|Var)|en(GLExtension|MayaPref))|verrideModifier|ffset(Surface|Curve(OnSurface)?)|r(ientConstraint|bit(Ctx)?)|b(soleteProc |j(ect(Center|Type(UI)?|Layer )|Exists)))|d(yn(RelEd(itor|Panel)|Globals|C(ontrol|ache)|P(a(intEditor|rticleCtx)|ref)|Exp(ort|ression)|amicLoad)|i(s(connect(Joint|Attr)|tanceDim(Context|ension)|pla(y(RGBColor|S(tats|urface|moothness)|C(olor|ull)|Pref|LevelOfDetail|Affected)|cementToPoly)|kCache|able)|r(name |ect(ionalLight|KeyCtx)|map)|mWhen)|o(cServer|Blur|t(Product )?|ubleProfileBirailSurface|peSheetEditor|lly(Ctx)?)|uplicate(Surface|Curve)?|e(tach(Surface|Curve|DeviceAttr)|vice(Panel|Editor)|f(ine(DataServer|VirtualDevice)|ormer|ault(Navigation|LightListCheckBox))|l(ete(Sh(elfTab |adingGroupsAndMaterials )|U(nusedBrushes |I)|Attr)?|randstr)|g_to_rad)|agPose|r(opoffLocator|ag(gerContext)?)|g(timer|dirty|Info|eval))|CBG |u(serCtx|n(t(angleUV|rim)|i(t|form)|do(Info)?|loadPlugin|assignInputDevice|group)|iTemplate|p(dateAE |Axis)|v(Snapshot|Link))|joint(C(tx|luster)|DisplayScale|Lattice)?|p(sd(ChannelOutliner|TextureFile|E(ditTextureFile|xport))|close|i(c(ture|kWalk)|xelMove)|o(se|int(MatrixMult |C(onstraint|urveConstraint)|On(Surface|Curve)|Position|Light)|p(upMenu|en)|w|l(y(Reduce|GeoSampler|M(irrorFace|ove(UV|Edge|Vertex|Facet(UV)?)|erge(UV|Edge(Ctx)?|Vertex|Facet(Ctx)?)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|l(indData|endColor))|S(traightenUVBorder|oftEdge|u(perCtx|bdivide(Edge|Facet))|p(her(icalProjection|e)|lit(Ring|Ctx|Edge|Vertex)?)|e(tToFaceNormal|parate|wEdge|lect(Constraint(Monitor)?|EditCtx))|mooth)|Normal(izeUV|PerVertex)?|C(hipOff|ylind(er|ricalProjection)|o(ne|pyUV|l(or(BlindData|Set|PerVertex)|lapse(Edge|Facet)))|u(t(Ctx)?|be)|l(ipboard|oseBorder)|acheMonitor|rea(seEdge|teFacet(Ctx)?))|T(o(Subdiv|rus)|r(iangulate|ansfer))|In(stallAction|fo)|Options|D(uplicate(Edge|AndConnect)|el(Edge|Vertex|Facet))|U(nite|VSet)|P(yramid|oke|lan(e|arProjection)|r(ism|ojection))|E(ditUV|valuate|xtrude(Edge|Facet))|Qu(eryBlindData|ad)|F(orceUV|lip(UV|Edge))|WedgeFace|L(istComponentConversion|ayoutUV)|A(utoProjection|ppend(Vertex|FacetCtx)?|verage(Normal|Vertex)))|eVectorConstraint))|utenv|er(cent|formanceOptions)|fxstrokes|wd|l(uginInfo|a(y(b(last|ackOptions))?|n(e|arSrf)))|a(steKey|ne(l(History|Configuration)?|Layout)|thAnimation|irBlend|use|lettePort|r(ti(cle(RenderInfo|Instancer|Exists)?|tion)|ent(Constraint)?|am(Dim(Context|ension)|Locator)))|r(int|o(j(ect(ion(Manip|Context)|Curve|Tangent)|FileViewer)|pMo(dCtx|ve)|gress(Bar|Window)|mptDialog)|eloadRefEd))|e(n(codeString|d(sWith |String )|v|ableDevice)|dit(RenderLayer(Globals|Members)|or(Template)?|DisplayLayer(Globals|Members)|AttrLimits )|v(ent|al(Deferred|Echo)?)|quivalent(Tol | )|ffector|r(f|ror)|x(clusiveLightCheckBox|t(end(Surface|Curve)|rude)|ists|p(ortComposerCurves |ression(EditorListen)?)?|ec(uteForEachObject )?|actWorldBoundingBox)|mit(ter)?)|v(i(sor|ew(Set|HeadOn|2dToolCtx|C(lipPlane|amera)|Place|Fit|LookAt))|o(lumeAxis|rtex)|e(ctorize|rifyCmd )|alidateShelfName )|key(Tangent|frame(Region(MoveKeyCtx|S(caleKeyCtx|e(tKeyCtx|lectKeyCtx))|CurrentTimeCtx|TrackCtx|InsertKeyCtx|D(irectKeyCtx|ollyCtx))|Stats|Outliner)?)|qu(it|erySubdiv)|f(c(heck|lose)|i(nd(RelatedSkinCluster |MenuItem |er|Keyframe|AllIntersections )|tBspline|l(ter(StudioImport|Curve|Expand)?|e(BrowserDialog|test|Info|Dialog|Extension )?|letCurve)|rstParentOf )|o(ntDialog|pen|rmLayout)|print|eof|flush|write|l(o(or|w|at(S(crollBar|lider(Grp|ButtonGrp|2)?)|Eq |Field(Grp)?))|u(shUndo|id(CacheInfo|Emitter|VoxelInfo))|exor)|r(omNativePath |e(eFormFillet|wind|ad)|ameLayout)|get(word|line)|mod)|w(hatIs|i(ndow(Pref)?|re(Context)?)|orkspace|ebBrowser(Prefs)?|a(itCursor|rning)|ri(nkle(Context)?|teTake))|l(s(T(hroughFilter|ype )|UI)?|i(st(Relatives|MenuAnnotation |Sets|History|NodeTypes|C(onnections|ameras)|Transforms |InputDevice(s|Buttons|Axes)|erEditor|DeviceAttachments|Unselected |A(nimatable|ttr))|n(step|eIntersection )|ght(link|List(Panel|Editor)?))|o(ckNode|okThru|ft|ad(NewShelf |P(lugin|refObjects)|Fluid)|g)|a(ssoContext|y(out|er(Button|ed(ShaderPort|TexturePort)))|ttice(DeformKeyCtx)?|unch(ImageEditor)?))|a(ssign(Command|InputDevice)|n(notate|im(C(one|urveEditor)|Display|View)|gle(Between)?)|tt(ach(Surface|Curve|DeviceAttr)|r(ibute(Menu|Info|Exists|Query)|NavigationControlGrp|Co(ntrolGrp|lorSliderGrp|mpatibility)|PresetEditWin|EnumOptionMenu(Grp)?|Field(Grp|SliderGrp)))|i(r|mConstraint)|d(d(NewShelfTab|Dynamic|PP|Attr(ibuteEditorNodeHelp)?)|vanceToNextDrivenKey)|uto(Place|Keyframe)|pp(endStringArray|l(y(Take|AttrPreset)|icationName))|ffect(s|edNet)|l(i(as(Attr)?|gn(Surface|C(tx|urve))?)|lViewFit)|r(c(len|Len(DimContext|gthDimension))|t(BuildPaintMenu|Se(tPaintCtx|lectCtx)|3dPaintCtx|UserPaintCtx|PuttyCtx|FluidAttrCtx|Attr(SkinPaintCtx|Ctx|PaintVertexCtx))|rayMapper)|mbientLight|b(s|out))|r(igid(Body|Solver)|o(t(at(ionInterpolation|e))?|otOf |undConstantRadius|w(ColumnLayout|Layout)|ll(Ctx)?)|un(up|TimeCommand)|e(s(olutionNode|et(Tool|AE )|ampleFluid)|hash|n(der(GlobalsNode|Manip|ThumbnailUpdate|Info|er|Partition|QualityNode|Window(SelectContext|Editor)|LayerButton)?|ame(SelectionList |UI|Attr)?)|cord(Device|Attr)|target|order(Deformers)?|do|v(olve|erse(Surface|Curve))|quires|f(ineSubdivSelectionList|erence(Edit|Query)?|resh(AE )?)|loadImage|adTake|root|move(MultiInstance|Joint)|build(Surface|Curve))|a(n(d(state|omizeFollicles )?|geControl)|d(i(o(MenuItemCollection|Button(Grp)?|Collection)|al)|_to_deg)|mpColorPort)|gb_to_hsv)|g(o(toBindPose |al)|e(t(M(odifiers|ayaPanelTypes )|Classification|InputDeviceRange|pid|env|DefaultBrush|Pa(nel|rticleAttr)|F(ileList|luidAttr)|A(ttr|pplicationVersionAsFloat ))|ometryConstraint)|l(Render(Editor)?|obalStitch)|a(uss|mma)|r(id(Layout)?|oup(ObjectsByName )?|a(dientControl(NoAttr)?|ph(SelectContext|TrackCtx|DollyCtx)|vity|bColor))|match)|x(pmPicker|form|bmLangPathList )|m(i(n(imizeApp)?|rrorJoint)|o(del(CurrentTimeCtx|Panel|Editor)|use|v(In|e(IKtoFK |VertexAlongDirection|KeyCtx)?|Out))|u(te|ltiProfileBirailSurface)|e(ssageLine|nu(BarLayout|Item(ToShelf )?|Editor)?|mory)|a(nip(Rotate(Context|LimitsCtx)|Move(Context|LimitsCtx)|Scale(Context|LimitsCtx)|Options)|tch|ke(Roll |SingleSurface|TubeOn |Identity|Paintable|bot|Live)|rker|g|x))|b(in(Membership|d(Skin|Pose))|o(neLattice|undary|x(ZoomCtx|DollyCtx))|u(tton(Manip)?|ild(BookmarkMenu|KeyframeMenu)|fferCurve)|e(ssel|vel(Plus)?)|l(indDataType|end(Shape(Panel|Editor)?|2|TwoAttr))|a(sename(Ex | )|tchRender|ke(Results|Simulation|Clip|PartialHistory|FluidShading )))))\\b' },
+ { caseInsensitive: true,
+ token: 'support.constant.mel',
+ regex: '\\b(s(h(ellTessellate|a(d(ing(Map|Engine)|erGlow)|pe))|n(ow|apshot(Shape)?)|c(ulpt|aleConstraint|ript)|t(yleCurve|itch(Srf|AsNurbsShell)|u(cco|dioClearCoat)|encil|roke(Globals)?)|i(ngleShadingSwitch|mpleVolumeShader)|o(ftMod(Manip|Handle)?|lidFractal)|u(rface(Sha(der|pe)|Info|EdManip|VarGroup|Luminance)|b(Surface|d(M(odifier(UV|World)?|ap(SewMove|Cut|pingManip))|B(lindData|ase)|iv(ReverseFaces|SurfaceVarGroup|Co(llapse|mponentId)|To(Nurbs|Poly))?|HierBlind|CleanTopology|Tweak(UV)?|P(lanarProj|rojManip)|LayoutUV|A(ddTopology|utoProj))|Curve))|p(BirailSrf|otLight|ring)|e(tRange|lectionListOperator)|k(inCluster|etchPlane)|quareSrf|ampler(Info)?|m(ooth(Curve|TangentSrf)|ear))|h(svToRgb|yper(GraphInfo|View|Layout)|ik(Solver|Handle|Effector)|oldMatrix|eightField|w(Re(nderGlobals|flectionMap)|Shader)|a(ir(System|Constraint|TubeShader)|rd(enPoint|wareRenderGlobals)))|n(o(n(ExtendedLightShapeNode|Linear|AmbientLightShapeNode)|ise|rmalConstraint)|urbs(Surface|Curve|T(oSubdiv(Proc)?|essellate)|DimShape)|e(twork|wtonField))|c(h(o(ice|oser)|ecker|aracter(Map|Offset)?)|o(n(straint|tr(olPoint|ast)|dition)|py(ColorSet|UVSet))|urve(Range|Shape|Normalizer(Linear|Angle)?|In(tersect|fo)|VarGroup|From(Mesh(CoM|Edge)?|Su(rface(Bnd|CoS|Iso)?|bdiv(Edge|Face)?)))|l(ip(Scheduler|Library)|o(se(stPointOnSurface|Surface|Curve)|th|ud)|uster(Handle)?|amp)|amera(View)?|r(eate(BPManip|ColorSet|UVSet)|ater))|t(ime(ToUnitConversion|Function)?|oo(nLineAttributes|lDrawManip)|urbulenceField|ex(BaseDeformManip|ture(BakeSet|2d|ToGeom|3d|Env)|SmudgeUVManip|LatticeDeformManip)|weak|angentConstraint|r(i(pleShadingSwitch|m(WithBoundaries)?)|ansform(Geometry)?))|i(n(s(tancer|ertKnot(Surface|Curve))|tersectSurface)|k(RPsolver|MCsolver|S(ystem|olver|Csolver|plineSolver)|Handle|PASolver|Effector)|m(plicit(Box|Sphere|Cone)|agePlane))|o(cean(Shader)?|pticalFX|ffset(Surface|C(os|urve))|ldBlindDataBase|rient(Constraint|ationMarker)|bject(RenderFilter|MultiFilter|BinFilter|S(criptFilter|et)|NameFilter|TypeFilter|Filter|AttrFilter))|d(yn(Globals|Base)|i(s(tance(Between|DimShape)|pla(yLayer(Manager)?|cementShader)|kCache)|rect(ionalLight|edDisc)|mensionShape)|o(ubleShadingSwitch|f)|pBirailSrf|e(tach(Surface|Curve)|pendNode|f(orm(Bend|S(ine|quash)|Twist|ableShape|F(unc|lare)|Wave)|ault(RenderUtilityList|ShaderList|TextureList|LightList))|lete(Co(lorSet|mponent)|UVSet))|ag(Node|Pose)|r(opoffLocator|agField))|u(seBackground|n(trim|i(t(Conversion|ToTimeConversion)|formField)|known(Transform|Dag)?)|vChooser)|j(iggle|oint(Cluster|Ffd|Lattice)?)|p(sdFileTex|hong(E)?|o(s(tProcessList|itionMarker)|int(MatrixMult|Constraint|On(SurfaceInfo|CurveInfo)|Emitter|Light)|l(y(Reduce|M(irror|o(difier(UV|World)?|ve(UV|Edge|Vertex|Face(tUV)?))|erge(UV|Edge|Vert|Face)|ap(Sew(Move)?|Cut|Del))|B(oolOp|evel|lindData|ase)|S(traightenUVBorder|oftEdge|ubd(Edge|Face)|p(h(ere|Proj)|lit(Ring|Edge|Vert)?)|e(parate|wEdge)|mooth(Proxy|Face)?)|Normal(izeUV|PerVertex)?|C(hipOff|yl(inder|Proj)|o(ne|pyUV|l(orPerVertex|lapse(Edge|F)))|u(t(Manip(Container)?)?|be)|loseBorder|rea(seEdge|t(or|eFace)))|T(o(Subdiv|rus)|weak(UV)?|r(iangulate|ansfer))|OptUvs|D(uplicateEdge|el(Edge|Vertex|Facet))|Unite|P(yramid|oke(Manip)?|lan(e|arProj)|r(i(sm|mitive)|oj))|Extrude(Edge|Vertex|Face)|VertexNormalManip|Quad|Flip(UV|Edge)|WedgeFace|LayoutUV|A(utoProj|ppend(Vertex)?|verageVertex))|eVectorConstraint))|fx(Geometry|Hair|Toon)|l(usMinusAverage|a(n(e|arTrimSurface)|ce(2dTexture|3dTexture)))|a(ssMatrix|irBlend|r(ti(cle(SamplerInfo|C(olorMapper|loud)|TranspMapper|IncandMapper|AgeMapper)?|tion)|ent(Constraint|Tessellate)|amDimension))|r(imitive|o(ject(ion|Curve|Tangent)|xyManager)))|e(n(tity|v(Ball|ironmentFog|S(phere|ky)|C(hrome|ube)|Fog))|x(t(end(Surface|Curve)|rude)|p(lodeNurbsShell|ression)))|v(iewManip|o(lume(Shader|Noise|Fog|Light|AxisField)|rtexField)|e(ctor(RenderGlobals|Product)|rtexBakeSet))|quadShadingSwitch|f(i(tBspline|eld|l(ter(Resample|Simplify|ClosestSample|Euler)?|e|letCurve))|o(urByFourMatrix|llicle)|urPointOn(MeshInfo|Subd)|f(BlendSrf(Obsolete)?|d|FilletSrf)|l(ow|uid(S(hape|liceManip)|Texture(2D|3D)|Emitter)|exorShape)|ra(ctal|meCache))|w(tAddMatrix|ire|ood|eightGeometryFilter|ater|rap)|l(ight(Info|Fog|Li(st|nker))?|o(cator|okAt|d(Group|Thresholds)|ft)|uminance|ea(stSquaresModifier|ther)|a(yered(Shader|Texture)|ttice|mbert))|a(n(notationShape|i(sotropic|m(Blend(InOut)?|C(urve(T(T|U|L|A)|U(T|U|L|A))?|lip)))|gleBetween)|tt(ach(Surface|Curve)|rHierarchyTest)|i(rField|mConstraint)|dd(Matrix|DoubleLinear)|udio|vg(SurfacePoints|NurbsSurfacePoints|Curves)|lign(Manip|Surface|Curve)|r(cLengthDimension|tAttrPaintTest|eaLight|rayMapper)|mbientLight|bstractBase(NurbsConversion|Create))|r(igid(Body|Solver|Constraint)|o(ck|undConstantRadius)|e(s(olution|ultCurve(TimeTo(Time|Unitless|Linear|Angular))?)|nder(Rect|Globals(List)?|Box|Sphere|Cone|Quality|L(ight|ayer(Manager)?))|cord|v(olve(dPrimitive)?|erse(Surface|Curve)?)|f(erence|lect)|map(Hsv|Color|Value)|build(Surface|Curve))|a(dialField|mp(Shader)?)|gbToHsv|bfSrf)|g(uide|eo(Connect(or|able)|metry(Shape|Constraint|VarGroup|Filter))|lobal(Stitch|CacheControl)|ammaCorrect|r(id|oup(Id|Parts)|a(nite|vityField)))|Fur(Globals|Description|Feedback|Attractors)|xformManip|m(o(tionPath|untain|vie)|u(te|lt(Matrix|i(plyDivide|listerLight)|DoubleLinear))|pBirailSrf|e(sh(VarGroup)?|ntalray(Texture|IblShape))|a(terialInfo|ke(Group|Nurb(sSquare|Sphere|C(ylinder|ircle|one|ube)|Torus|Plane)|CircularArc|T(hreePointCircularArc|extCurves|woPointCircularArc))|rble))|b(irailSrf|o(neLattice|olean|undary(Base)?)|u(lge|mp(2d|3d))|evel(Plus)?|l(in(n|dDataTemplate)|end(Shape|Color(s|Sets)|TwoAttr|Device|Weighted)?)|a(se(GeometryVarGroup|ShadingSwitch|Lattice)|keSet)|r(ownian|ush)))\\b' },
+ { caseInsensitive: true,
+ token: 'keyword.control.mel',
+ regex: '\\b(if|in|else|for|while|break|continue|case|default|do|switch|return|switch|case|source|catch|alias)\\b' },
+ { token: 'keyword.other.mel', regex: '\\b(global)\\b' },
+ { caseInsensitive: true,
+ token: 'constant.language.mel',
+ regex: '\\b(null|undefined)\\b' },
+ { token: 'constant.numeric.mel',
+ 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: 'punctuation.definition.string.begin.mel',
+ regex: '"',
+ push:
+ [ { token: 'constant.character.escape.mel', regex: '\\\\.' },
+ { token: 'punctuation.definition.string.end.mel',
+ regex: '"',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.double.mel' } ] },
+
+ { token: [ 'variable.other.mel', 'punctuation.definition.variable.mel' ],
+ regex: '(\\$)([a-zA-Z_\\x7f-\\xff][a-zA-Z0-9_\\x7f-\\xff]*?\\b)' },
+
+ { token: 'punctuation.definition.string.begin.mel',
+ regex: '\'',
+ push:
+ [ { token: 'constant.character.escape.mel', regex: '\\\\.' },
+ { token: 'punctuation.definition.string.end.mel',
+ regex: '\'',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.single.mel' } ] },
+
+ { token: 'constant.language.mel',
+ regex: '\\b(false|true|yes|no|on|off)\\b' },
+
+ { token: 'punctuation.definition.comment.mel',
+ regex: '/\\*',
+ push:
+ [ { token: 'punctuation.definition.comment.mel',
+ regex: '\\*/',
+ next: 'pop' },
+ { defaultToken: 'comment.block.mel' } ] },
+
+ { token: [ 'comment.line.double-slash.mel', 'punctuation.definition.comment.mel' ],
+ regex: '(//)(.*$\\n?)' },
+
+ { caseInsensitive: true,
+ token: 'keyword.operator.mel',
+ regex: '\\b(instanceof)\\b' },
+ { token: 'keyword.operator.symbolic.mel',
+ regex: '[-\\!\\%\\&\\*\\+\\=\\/\\?\\:]' },
+
+ { token: [ 'meta.preprocessor.mel', 'punctuation.definition.preprocessor.mel' ],
+ regex: '(^[ \\t]*)((?:#)[a-zA-Z]+)' },
+
+ { token: [ 'meta.function.mel', 'keyword.other.mel', 'storage.type.mel', 'entity.name.function.mel', 'punctuation.section.function.mel' ],
+ regex: '(global\\s*)?(proc\\s*)(\\w+\\s*\\[?\\]?\\s+|\\s+)([A-Za-z_][A-Za-z0-9_\\.]*)(\\s*\\()',
+ push:
+ [ { include: '$self' },
+ { token: 'punctuation.section.function.mel',
+ regex: '\\)',
+ next: 'pop' },
+ { defaultToken: 'meta.function.mel' } ] }
+
+ ] }
+
+ this.normalizeRules();
+};
+
+oop.inherits(MELHighlightRules, TextHighlightRules);
+
+exports.MELHighlightRules = MELHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/mel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mel_highlight_rules","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 MELHighlightRules = require("./mel_highlight_rules").MELHighlightRules;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = MELHighlightRules;
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/mel";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-mushcode.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-mushcode.js
new file mode 100644
index 00000000..5e6b7eaf
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-mushcode.js
@@ -0,0 +1,674 @@
+ace.define("ace/mode/mushcode_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 MushCodeRules = function() {
+
+
+ var keywords = (
+ "@if|"+
+ "@ifelse|"+
+ "@switch|"+
+ "@halt|"+
+ "@dolist|"+
+ "@create|"+
+ "@scent|"+
+ "@sound|"+
+ "@touch|"+
+ "@ataste|"+
+ "@osound|"+
+ "@ahear|"+
+ "@aahear|"+
+ "@amhear|"+
+ "@otouch|"+
+ "@otaste|"+
+ "@drop|"+
+ "@odrop|"+
+ "@adrop|"+
+ "@dropfail|"+
+ "@odropfail|"+
+ "@smell|"+
+ "@oemit|"+
+ "@emit|"+
+ "@pemit|"+
+ "@parent|"+
+ "@clone|"+
+ "@taste|"+
+ "whisper|"+
+ "page|"+
+ "say|"+
+ "pose|"+
+ "semipose|"+
+ "teach|"+
+ "touch|"+
+ "taste|"+
+ "smell|"+
+ "listen|"+
+ "look|"+
+ "move|"+
+ "go|"+
+ "home|"+
+ "follow|"+
+ "unfollow|"+
+ "desert|"+
+ "dismiss|"+
+ "@tel"
+ );
+
+ var builtinConstants = (
+ "=#0"
+ );
+
+ var builtinFunctions = (
+ "default|"+
+ "edefault|"+
+ "eval|"+
+ "get_eval|"+
+ "get|"+
+ "grep|"+
+ "grepi|"+
+ "hasattr|"+
+ "hasattrp|"+
+ "hasattrval|"+
+ "hasattrpval|"+
+ "lattr|"+
+ "nattr|"+
+ "poss|"+
+ "udefault|"+
+ "ufun|"+
+ "u|"+
+ "v|"+
+ "uldefault|"+
+ "xget|"+
+ "zfun|"+
+ "band|"+
+ "bnand|"+
+ "bnot|"+
+ "bor|"+
+ "bxor|"+
+ "shl|"+
+ "shr|"+
+ "and|"+
+ "cand|"+
+ "cor|"+
+ "eq|"+
+ "gt|"+
+ "gte|"+
+ "lt|"+
+ "lte|"+
+ "nand|"+
+ "neq|"+
+ "nor|"+
+ "not|"+
+ "or|"+
+ "t|"+
+ "xor|"+
+ "con|"+
+ "entrances|"+
+ "exit|"+
+ "followers|"+
+ "home|"+
+ "lcon|"+
+ "lexits|"+
+ "loc|"+
+ "locate|"+
+ "lparent|"+
+ "lsearch|"+
+ "next|"+
+ "num|"+
+ "owner|"+
+ "parent|"+
+ "pmatch|"+
+ "rloc|"+
+ "rnum|"+
+ "room|"+
+ "where|"+
+ "zone|"+
+ "worn|"+
+ "held|"+
+ "carried|"+
+ "acos|"+
+ "asin|"+
+ "atan|"+
+ "ceil|"+
+ "cos|"+
+ "e|"+
+ "exp|"+
+ "fdiv|"+
+ "fmod|"+
+ "floor|"+
+ "log|"+
+ "ln|"+
+ "pi|"+
+ "power|"+
+ "round|"+
+ "sin|"+
+ "sqrt|"+
+ "tan|"+
+ "aposs|"+
+ "andflags|"+
+ "conn|"+
+ "commandssent|"+
+ "controls|"+
+ "doing|"+
+ "elock|"+
+ "findable|"+
+ "flags|"+
+ "fullname|"+
+ "hasflag|"+
+ "haspower|"+
+ "hastype|"+
+ "hidden|"+
+ "idle|"+
+ "isbaker|"+
+ "lock|"+
+ "lstats|"+
+ "money|"+
+ "who|"+
+ "name|"+
+ "nearby|"+
+ "obj|"+
+ "objflags|"+
+ "photo|"+
+ "poll|"+
+ "powers|"+
+ "pendingtext|"+
+ "receivedtext|"+
+ "restarts|"+
+ "restarttime|"+
+ "subj|"+
+ "shortestpath|"+
+ "tmoney|"+
+ "type|"+
+ "visible|"+
+ "cat|"+
+ "element|"+
+ "elements|"+
+ "extract|"+
+ "filter|"+
+ "filterbool|"+
+ "first|"+
+ "foreach|"+
+ "fold|"+
+ "grab|"+
+ "graball|"+
+ "index|"+
+ "insert|"+
+ "itemize|"+
+ "items|"+
+ "iter|"+
+ "last|"+
+ "ldelete|"+
+ "map|"+
+ "match|"+
+ "matchall|"+
+ "member|"+
+ "mix|"+
+ "munge|"+
+ "pick|"+
+ "remove|"+
+ "replace|"+
+ "rest|"+
+ "revwords|"+
+ "setdiff|"+
+ "setinter|"+
+ "setunion|"+
+ "shuffle|"+
+ "sort|"+
+ "sortby|"+
+ "splice|"+
+ "step|"+
+ "wordpos|"+
+ "words|"+
+ "add|"+
+ "lmath|"+
+ "max|"+
+ "mean|"+
+ "median|"+
+ "min|"+
+ "mul|"+
+ "percent|"+
+ "sign|"+
+ "stddev|"+
+ "sub|"+
+ "val|"+
+ "bound|"+
+ "abs|"+
+ "inc|"+
+ "dec|"+
+ "dist2d|"+
+ "dist3d|"+
+ "div|"+
+ "floordiv|"+
+ "mod|"+
+ "modulo|"+
+ "remainder|"+
+ "vadd|"+
+ "vdim|"+
+ "vdot|"+
+ "vmag|"+
+ "vmax|"+
+ "vmin|"+
+ "vmul|"+
+ "vsub|"+
+ "vunit|"+
+ "regedit|"+
+ "regeditall|"+
+ "regeditalli|"+
+ "regediti|"+
+ "regmatch|"+
+ "regmatchi|"+
+ "regrab|"+
+ "regraball|"+
+ "regraballi|"+
+ "regrabi|"+
+ "regrep|"+
+ "regrepi|"+
+ "after|"+
+ "alphamin|"+
+ "alphamax|"+
+ "art|"+
+ "before|"+
+ "brackets|"+
+ "capstr|"+
+ "case|"+
+ "caseall|"+
+ "center|"+
+ "containsfansi|"+
+ "comp|"+
+ "decompose|"+
+ "decrypt|"+
+ "delete|"+
+ "edit|"+
+ "encrypt|"+
+ "escape|"+
+ "if|"+
+ "ifelse|"+
+ "lcstr|"+
+ "left|"+
+ "lit|"+
+ "ljust|"+
+ "merge|"+
+ "mid|"+
+ "ostrlen|"+
+ "pos|"+
+ "repeat|"+
+ "reverse|"+
+ "right|"+
+ "rjust|"+
+ "scramble|"+
+ "secure|"+
+ "space|"+
+ "spellnum|"+
+ "squish|"+
+ "strcat|"+
+ "strmatch|"+
+ "strinsert|"+
+ "stripansi|"+
+ "stripfansi|"+
+ "strlen|"+
+ "switch|"+
+ "switchall|"+
+ "table|"+
+ "tr|"+
+ "trim|"+
+ "ucstr|"+
+ "unsafe|"+
+ "wrap|"+
+ "ctitle|"+
+ "cwho|"+
+ "channels|"+
+ "clock|"+
+ "cflags|"+
+ "ilev|"+
+ "itext|"+
+ "inum|"+
+ "convsecs|"+
+ "convutcsecs|"+
+ "convtime|"+
+ "ctime|"+
+ "etimefmt|"+
+ "isdaylight|"+
+ "mtime|"+
+ "secs|"+
+ "msecs|"+
+ "starttime|"+
+ "time|"+
+ "timefmt|"+
+ "timestring|"+
+ "utctime|"+
+ "atrlock|"+
+ "clone|"+
+ "create|"+
+ "cook|"+
+ "dig|"+
+ "emit|"+
+ "lemit|"+
+ "link|"+
+ "oemit|"+
+ "open|"+
+ "pemit|"+
+ "remit|"+
+ "set|"+
+ "tel|"+
+ "wipe|"+
+ "zemit|"+
+ "fbcreate|"+
+ "fbdestroy|"+
+ "fbwrite|"+
+ "fbclear|"+
+ "fbcopy|"+
+ "fbcopyto|"+
+ "fbclip|"+
+ "fbdump|"+
+ "fbflush|"+
+ "fbhset|"+
+ "fblist|"+
+ "fbstats|"+
+ "qentries|"+
+ "qentry|"+
+ "play|"+
+ "ansi|"+
+ "break|"+
+ "c|"+
+ "asc|"+
+ "die|"+
+ "isdbref|"+
+ "isint|"+
+ "isnum|"+
+ "isletters|"+
+ "linecoords|"+
+ "localize|"+
+ "lnum|"+
+ "nameshort|"+
+ "null|"+
+ "objeval|"+
+ "r|"+
+ "rand|"+
+ "s|"+
+ "setq|"+
+ "setr|"+
+ "soundex|"+
+ "soundslike|"+
+ "valid|"+
+ "vchart|"+
+ "vchart2|"+
+ "vlabel|"+
+ "@@|"+
+ "bakerdays|"+
+ "bodybuild|"+
+ "box|"+
+ "capall|"+
+ "catalog|"+
+ "children|"+
+ "ctrailer|"+
+ "darttime|"+
+ "debt|"+
+ "detailbar|"+
+ "exploredroom|"+
+ "fansitoansi|"+
+ "fansitoxansi|"+
+ "fullbar|"+
+ "halfbar|"+
+ "isdarted|"+
+ "isnewbie|"+
+ "isword|"+
+ "lambda|"+
+ "lobjects|"+
+ "lplayers|"+
+ "lthings|"+
+ "lvexits|"+
+ "lvobjects|"+
+ "lvplayers|"+
+ "lvthings|"+
+ "newswrap|"+
+ "numsuffix|"+
+ "playerson|"+
+ "playersthisweek|"+
+ "randomad|"+
+ "randword|"+
+ "realrandword|"+
+ "replacechr|"+
+ "second|"+
+ "splitamount|"+
+ "strlenall|"+
+ "text|"+
+ "third|"+
+ "tofansi|"+
+ "totalac|"+
+ "unique|"+
+ "getaddressroom|"+
+ "listpropertycomm|"+
+ "listpropertyres|"+
+ "lotowner|"+
+ "lotrating|"+
+ "lotratingcount|"+
+ "lotvalue|"+
+ "boughtproduct|"+
+ "companyabb|"+
+ "companyicon|"+
+ "companylist|"+
+ "companyname|"+
+ "companyowners|"+
+ "companyvalue|"+
+ "employees|"+
+ "invested|"+
+ "productlist|"+
+ "productname|"+
+ "productowners|"+
+ "productrating|"+
+ "productratingcount|"+
+ "productsoldat|"+
+ "producttype|"+
+ "ratedproduct|"+
+ "soldproduct|"+
+ "topproducts|"+
+ "totalspentonproduct|"+
+ "totalstock|"+
+ "transfermoney|"+
+ "uniquebuyercount|"+
+ "uniqueproductsbought|"+
+ "validcompany|"+
+ "deletepicture|"+
+ "fbsave|"+
+ "getpicturesecurity|"+
+ "haspicture|"+
+ "listpictures|"+
+ "picturesize|"+
+ "replacecolor|"+
+ "rgbtocolor|"+
+ "savepicture|"+
+ "setpicturesecurity|"+
+ "showpicture|"+
+ "piechart|"+
+ "piechartlabel|"+
+ "createmaze|"+
+ "drawmaze|"+
+ "drawwireframe"
+ );
+ 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 : "variable", // mush substitution register
+ regex : "%[0-9]{1}"
+ },
+ {
+ token : "variable", // mush substitution register
+ regex : "%q[0-9A-Za-z]{1}"
+ },
+ {
+ token : "variable", // mush special character register
+ regex : "%[a-zA-Z]{1}"
+ },
+ {
+ token: "variable.language",
+ regex: "%[a-z0-9-_]+"
+ },
+ {
+ 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+"
+ } ]
+ };
+};
+
+oop.inherits(MushCodeRules, TextHighlightRules);
+
+exports.MushCodeRules = MushCodeRules;
+});
+
+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("([\\[{])(?:\\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);
+
+});
+
+ace.define("ace/mode/mushcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mushcode_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 MushCodeRules = require("./mushcode_highlight_rules").MushCodeRules;
+var PythonFoldMode = require("./folding/pythonic").FoldMode;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = MushCodeRules;
+ this.foldingRules = new PythonFoldMode("\\:");
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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.getTokenizer().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));
+ };
+
+ this.$id = "ace/mode/mushcode";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-mysql.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-mysql.js
new file mode 100644
index 00000000..7abe675c
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-mysql.js
@@ -0,0 +1,160 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/mysql_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 MysqlHighlightRules = function() {
+
+ var mySqlKeywords = /*sql*/ "alter|and|as|asc|between|count|create|delete|desc|distinct|drop|from|having|in|insert|into|is|join|like|not|on|or|order|select|set|table|union|update|values|where" + "|accessible|action|add|after|algorithm|all|analyze|asensitive|at|authors|auto_increment|autocommit|avg|avg_row_length|before|binary|binlog|both|btree|cache|call|cascade|cascaded|case|catalog_name|chain|change|changed|character|check|checkpoint|checksum|class_origin|client_statistics|close|coalesce|code|collate|collation|collations|column|columns|comment|commit|committed|completion|concurrent|condition|connection|consistent|constraint|contains|continue|contributors|convert|cross|current_date|current_time|current_timestamp|current_user|cursor|data|database|databases|day_hour|day_microsecond|day_minute|day_second|deallocate|dec|declare|default|delay_key_write|delayed|delimiter|des_key_file|describe|deterministic|dev_pop|dev_samp|deviance|directory|disable|discard|distinctrow|div|dual|dumpfile|each|elseif|enable|enclosed|end|ends|engine|engines|enum|errors|escape|escaped|even|event|events|every|execute|exists|exit|explain|extended|fast|fetch|field|fields|first|flush|for|force|foreign|found_rows|full|fulltext|function|general|global|grant|grants|group|groupby_concat|handler|hash|help|high_priority|hosts|hour_microsecond|hour_minute|hour_second|if|ignore|ignore_server_ids|import|index|index_statistics|infile|inner|innodb|inout|insensitive|insert_method|install|interval|invoker|isolation|iterate|key|keys|kill|language|last|leading|leave|left|level|limit|linear|lines|list|load|local|localtime|localtimestamp|lock|logs|low_priority|master|master_heartbeat_period|master_ssl_verify_server_cert|masters|match|max|max_rows|maxvalue|message_text|middleint|migrate|min|min_rows|minute_microsecond|minute_second|mod|mode|modifies|modify|mutex|mysql_errno|natural|next|no|no_write_to_binlog|offline|offset|one|online|open|optimize|option|optionally|out|outer|outfile|pack_keys|parser|partition|partitions|password|phase|plugin|plugins|prepare|preserve|prev|primary|privileges|procedure|processlist|profile|profiles|purge|query|quick|range|read|read_write|reads|real|rebuild|recover|references|regexp|relaylog|release|remove|rename|reorganize|repair|repeatable|replace|require|resignal|restrict|resume|return|returns|revoke|right|rlike|rollback|rollup|row|row_format|rtree|savepoint|schedule|schema|schema_name|schemas|second_microsecond|security|sensitive|separator|serializable|server|session|share|show|signal|slave|slow|smallint|snapshot|soname|spatial|specific|sql|sql_big_result|sql_buffer_result|sql_cache|sql_calc_found_rows|sql_no_cache|sql_small_result|sqlexception|sqlstate|sqlwarning|ssl|start|starting|starts|status|std|stddev|stddev_pop|stddev_samp|storage|straight_join|subclass_origin|sum|suspend|table_name|table_statistics|tables|tablespace|temporary|terminated|to|trailing|transaction|trigger|triggers|truncate|uncommitted|undo|uninstall|unique|unlock|upgrade|usage|use|use_frm|user|user_resources|user_statistics|using|utc_date|utc_time|utc_timestamp|value|variables|varying|view|views|warnings|when|while|with|work|write|xa|xor|year_month|zerofill|begin|do|then|else|loop|repeat";
+ var builtins = "by|bool|boolean|bit|blob|decimal|double|enum|float|long|longblob|longtext|medium|mediumblob|mediumint|mediumtext|time|timestamp|tinyblob|tinyint|tinytext|text|bigint|int|int1|int2|int3|int4|int8|integer|float|float4|float8|double|char|varbinary|varchar|varcharacter|precision|date|datetime|year|unsigned|signed|numeric|ucase|lcase|mid|len|round|rank|now|format|coalesce|ifnull|isnull|nvl"
+ var variable = "charset|clear|connect|edit|ego|exit|go|help|nopager|notee|nowarning|pager|print|prompt|quit|rehash|source|status|system|tee"
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtins,
+ "keyword": mySqlKeywords,
+ "constant": "false|true|null|unknown|date|time|timestamp|ODBCdotTable|zerolessFloat",
+ "variable.language": variable
+ }, "identifier", true);
+
+
+ function string(rule) {
+ var start = rule.start;
+ var escapeSeq = rule.escape;
+ return {
+ token: "string.start",
+ regex: start,
+ next: [
+ {token: "constant.language.escape", regex: escapeSeq},
+ {token: "string.end", next: "start", regex: start},
+ {defaultToken: "string"}
+ ]
+ };
+ }
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment", regex : "(?:-- |#).*$"
+ },
+ string({start: '"', escape: /\\[0'"bnrtZ\\%_]?/}),
+ string({start: "'", escape: /\\[0'"bnrtZ\\%_]?/}),
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next : "comment"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0[xX][0-9a-fA-F]+|[xX]'[0-9a-fA-F]+'|0[bB][01]+|[bB]'[01]+'/
+ }, {
+ token : "constant.numeric", // float
+ regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "constant.class",
+ regex : "@@?[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "constant.buildin",
+ regex : "`[^`]*`"
+ }, {
+ token : "keyword.operator",
+ regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="
+ }, {
+ token : "paren.lparen",
+ regex : "[\\(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\)]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ],
+ "comment" : [
+ {token : "comment", regex : "\\*\\/", next : "start"},
+ {defaultToken : "comment"}
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]);
+ this.normalizeRules();
+};
+
+oop.inherits(MysqlHighlightRules, TextHighlightRules);
+
+exports.MysqlHighlightRules = MysqlHighlightRules;
+});
+
+ace.define("ace/mode/mysql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mysql_highlight_rules"], function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var TextMode = require("../mode/text").Mode;
+var MysqlHighlightRules = require("./mysql_highlight_rules").MysqlHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = MysqlHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = ["--", "#"]; // todo space
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.$id = "ace/mode/mysql";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-nix.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-nix.js
new file mode 100644
index 00000000..3424beaf
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-nix.js
@@ -0,0 +1,631 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var cFunctions = exports.cFunctions = "\\b(?:hypot(?: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|char16_t|char32_t"
+ );
+
+ var storageModifiers = (
+ "const|extern|register|restrict|static|volatile|inline|private|" +
+ "protected|public|friend|explicit|virtual|export|mutable|typename|" +
+ "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"
+ );
+
+ 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|nullptr"
+ );
+
+ 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";
+ var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source;
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "//$",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : "//",
+ next : "singleLineComment"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // character
+ regex : "'(?:" + escapeRe + "|.)?'"
+ }, {
+ token : "string.start",
+ regex : '"',
+ stateName: "qqstring",
+ next: [
+ { token: "string", regex: /\\\s*$/, next: "qqstring" },
+ { token: "constant.language.escape", regex: escapeRe },
+ { token: "constant.language.escape", regex: /%[^'"\\]/ },
+ { token: "string.end", regex: '"|$', next: "start" },
+ { defaultToken: "string"}
+ ]
+ }, {
+ token : "string.start",
+ regex : 'R"\\(',
+ stateName: "rawString",
+ next: [
+ { token: "string.end", regex: '\\)"', next: "start" },
+ { defaultToken: "string"}
+ ]
+ }, {
+ 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 : "keyword", // pre-compiler directives
+ regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b",
+ next : "directive"
+ }, {
+ token : "keyword", // special case pre-compiler directive
+ regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"
+ }, {
+ token : "support.function.C99.c",
+ regex : cFunctions
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*"
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "singleLineComment" : [
+ {
+ token : "comment",
+ regex : /\\$/,
+ next : "singleLineComment"
+ }, {
+ token : "comment",
+ regex : /$/,
+ next : "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ],
+ "directive" : [
+ {
+ token : "constant.other.multiline",
+ regex : /\\/
+ },
+ {
+ 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",
+ regex : /[^\\\/]+/,
+ next : "start"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+ this.normalizeRules();
+};
+
+oop.inherits(c_cppHighlightRules, TextHighlightRules);
+
+exports.c_cppHighlightRules = c_cppHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","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 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.HighlightRules = c_cppHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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);
+ };
+
+ this.$id = "ace/mode/c_cpp";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/nix_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 NixHighlightRules = function() {
+
+ var constantLanguage = "true|false";
+ var keywordControl = "with|import|if|else|then|inherit";
+ var keywordDeclaration = "let|in|rec";
+
+ var keywordMapper = this.createKeywordMapper({
+ "constant.language.nix": constantLanguage,
+ "keyword.control.nix": keywordControl,
+ "keyword.declaration.nix": keywordDeclaration
+ }, "identifier");
+
+ this.$rules = {
+ "start": [{
+ token: "comment",
+ regex: /#.*$/
+ }, {
+ token: "comment",
+ regex: /\/\*/,
+ next: "comment"
+ }, {
+ token: "constant",
+ regex: "<[^>]+>"
+ }, {
+ regex: "(==|!=|<=?|>=?)",
+ token: ["keyword.operator.comparison.nix"]
+ }, {
+ regex: "((?:[+*/%-]|\\~)=)",
+ token: ["keyword.operator.assignment.arithmetic.nix"]
+ }, {
+ regex: "=",
+ token: "keyword.operator.assignment.nix"
+ }, {
+ token: "string",
+ regex: "''",
+ next: "qqdoc"
+ }, {
+ token: "string",
+ regex: "'",
+ next: "qstring"
+ }, {
+ token: "string",
+ regex: '"',
+ push: "qqstring"
+ }, {
+ 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"
+ }, {
+ regex: "}",
+ token: function(val, start, stack) {
+ return stack[1] && stack[1].charAt(0) == "q" ? "constant.language.escape" : "text";
+ },
+ next: "pop"
+ }],
+ "comment": [{
+ token: "comment", // closing comment
+ regex: "\\*\\/",
+ next: "start"
+ }, {
+ defaultToken: "comment"
+ }],
+ "qqdoc": [
+ {
+ token: "constant.language.escape",
+ regex: /\$\{/,
+ push: "start"
+ }, {
+ token: "string",
+ regex: "''",
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }],
+ "qqstring": [
+ {
+ token: "constant.language.escape",
+ regex: /\$\{/,
+ push: "start"
+ }, {
+ token: "string",
+ regex: '"',
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }],
+ "qstring": [
+ {
+ token: "constant.language.escape",
+ regex: /\$\{/,
+ push: "start"
+ }, {
+ token: "string",
+ regex: "'",
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ };
+
+ this.normalizeRules();
+ };
+
+ oop.inherits(NixHighlightRules, TextHighlightRules);
+
+ exports.NixHighlightRules = NixHighlightRules;
+});
+
+ace.define("ace/mode/nix",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/nix_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var CMode = require("./c_cpp").Mode;
+var NixHighlightRules = require("./nix_highlight_rules").NixHighlightRules;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ CMode.call(this);
+ this.HighlightRules = NixHighlightRules;
+ this.foldingRules = new CStyleFoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, CMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/nix";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-nsis.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-nsis.js
new file mode 100644
index 00000000..087bd2b5
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-nsis.js
@@ -0,0 +1,305 @@
+ace.define("ace/mode/nsis_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 NSISHighlightRules = function() {
+
+ this.$rules = {
+ start: [{
+ token: "keyword.compiler.nsis",
+ regex: /^\s*!(?:include|addincludedir|addplugindir|appendfile|cd|delfile|echo|error|execute|packhdr|pragma|finalize|getdllversion|system|tempfile|warning|verbose|define|undef|insertmacro|macro|macroend|makensis|searchparse|searchreplace)\b/,
+ caseInsensitive: true
+ }, {
+ token: "keyword.command.nsis",
+ regex: /^\s*(?:Abort|AddBrandingImage|AddSize|AllowRootDirInstall|AllowSkipFiles|AutoCloseWindow|BGFont|BGGradient|BrandingText|BringToFront|Call|CallInstDLL|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|CreateDirectory|CreateFont|CreateShortCut|Delete|DeleteINISec|DeleteINIStr|DeleteRegKey|DeleteRegValue|DetailPrint|DetailsButtonText|DirText|DirVar|DirVerify|EnableWindow|EnumRegKey|EnumRegValue|Exch|Exec|ExecShell|ExecShellWait|ExecWait|ExpandEnvStrings|File|FileBufSize|FileClose|FileErrorText|FileOpen|FileRead|FileReadByte|FileReadUTF16LE|FileReadWord|FileWriteUTF16LE|FileSeek|FileWrite|FileWriteByte|FileWriteWord|FindClose|FindFirst|FindNext|FindWindow|FlushINI|GetCurInstType|GetCurrentAddress|GetDlgItem|GetDLLVersion|GetDLLVersionLocal|GetErrorLevel|GetFileTime|GetFileTimeLocal|GetFullPathName|GetFunctionAddress|GetInstDirError|GetLabelAddress|GetTempFileName|Goto|HideWindow|Icon|IfAbort|IfErrors|IfFileExists|IfRebootFlag|IfSilent|InitPluginsDir|InstallButtonText|InstallColors|InstallDir|InstallDirRegKey|InstProgressFlags|InstType|InstTypeGetText|InstTypeSetText|IntCmp|IntCmpU|IntFmt|IntOp|IsWindow|LangString|LicenseBkColor|LicenseData|LicenseForceSelection|LicenseLangString|LicenseText|LoadLanguageFile|LockWindow|LogSet|LogText|ManifestDPIAware|ManifestSupportedOS|MessageBox|MiscButtonText|Name|Nop|OutFile|Page|PageCallbacks|Pop|Push|Quit|ReadEnvStr|ReadINIStr|ReadRegDWORD|ReadRegStr|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|SectionGetFlags|SectionGetInstTypes|SectionGetSize|SectionGetText|SectionIn|SectionSetFlags|SectionSetInstTypes|SectionSetSize|SectionSetText|SendMessage|SetAutoClose|SetBrandingImage|SetCompress|SetCompressor|SetCompressorDictSize|SetCtlColors|SetCurInstType|SetDatablockOptimize|SetDateSave|SetDetailsPrint|SetDetailsView|SetErrorLevel|SetErrors|SetFileAttributes|SetFont|SetOutPath|SetOverwrite|SetRebootFlag|SetRegView|SetShellVarContext|SetSilent|ShowInstDetails|ShowUninstDetails|ShowWindow|SilentInstall|SilentUnInstall|Sleep|SpaceTexts|StrCmp|StrCmpS|StrCpy|StrLen|SubCaption|Unicode|UninstallButtonText|UninstallCaption|UninstallIcon|UninstallSubCaption|UninstallText|UninstPage|UnRegDLL|Var|VIAddVersionKey|VIFileVersion|VIProductVersion|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|WriteRegMultiStr|WriteRegNone|WriteRegStr|WriteUninstaller|XPStyle)\b/,
+ caseInsensitive: true
+ }, {
+ token: "keyword.control.nsis",
+ regex: /^\s*!(?:ifdef|ifndef|if|ifmacrodef|ifmacrondef|else|endif)\b/,
+ caseInsensitive: true
+ }, {
+ token: "keyword.plugin.nsis",
+ regex: /^\s*\w+::\w+/,
+ caseInsensitive: true
+ }, {
+ token: "keyword.operator.comparison.nsis",
+ regex: /[!<>]?=|<>|<|>/
+ }, {
+ token: "support.function.nsis",
+ regex: /(?:\b|^\s*)(?:Function|FunctionEnd|Section|SectionEnd|SectionGroup|SectionGroupEnd|PageEx|PageExEnd)\b/,
+ caseInsensitive: true
+ }, {
+ token: "support.library.nsis",
+ regex: /\${[\w\.:-]+}/
+ }, {
+ token: "constant.nsis",
+ regex: /\b(?:ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HIDDEN|HKCC|HKCR(32|64)?|HKCU(32|64)?|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM(32|64)?|HKPD|HKU|IDABORT|IDCANCEL|IDD_DIR|IDD_INST|IDD_INSTFILES|IDD_LICENSE|IDD_SELCOM|IDD_UNINST|IDD_VERIFY|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|MB_YESNOCANCEL|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SW_HIDE|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWNORMAL|SYSTEM|TEMPORARY)\b/,
+ caseInsensitive: true
+ }, {
+ token: "constant.library.nsis",
+ regex: /\${(?:AtLeastServicePack|AtLeastWin7|AtLeastWin8|AtLeastWin10|AtLeastWin95|AtLeastWin98|AtLeastWin2000|AtLeastWin2003|AtLeastWin2008|AtLeastWin2008R2|AtLeastWinME|AtLeastWinNT4|AtLeastWinVista|AtLeastWinXP|AtMostServicePack|AtMostWin7|AtMostWin8|AtMostWin10|AtMostWin95|AtMostWin98|AtMostWin2000|AtMostWin2003|AtMostWin2008|AtMostWin2008R2|AtMostWinME|AtMostWinNT4|AtMostWinVista|AtMostWinXP|IsNT|IsServer|IsServicePack|IsWin7|IsWin8|IsWin10|IsWin95|IsWin98|IsWin2000|IsWin2003|IsWin2008|IsWin2008R2|IsWinME|IsWinNT4|IsWinVista|IsWinXP)}/
+ }, {
+ token: "constant.language.boolean.true.nsis",
+ regex: /\b(?:true|on)\b/
+ }, {
+ token: "constant.language.boolean.false.nsis",
+ regex: /\b(?:false|off)\b/
+ }, {
+ token: "constant.language.option.nsis",
+ regex: /(?:\b|^\s*)(?:(?:un\.)?components|(?:un\.)?custom|(?:un\.)?directory|(?:un\.)?instfiles|(?:un\.)?license|uninstConfirm|admin|all|auto|both|bottom|bzip2|current|force|hide|highest|ifdiff|ifnewer|lastused|leave|left|listonly|lzma|nevershow|none|normal|notset|right|show|silent|silentlog|textonly|top|try|user|Win10|Win7|Win8|WinVista|zlib)\b/,
+ caseInsensitive: true
+ }, {
+ token: "constant.language.slash-option.nsis",
+ regex: /\b\/(?:a|BRANDING|CENTER|COMPONENTSONLYONCUSTOM|CUSTOMSTRING=|date|e|ENABLECANCEL|FILESONLY|file|FINAL|GLOBAL|gray|ifempty|ifndef|ignorecase|IMGID=|ITALIC|LANG=|NOCUSTOM|noerrors|NONFATAL|nonfatal|oname=|o|REBOOTOK|redef|RESIZETOFIT|r|SHORT|SILENT|SOLID|STRIKE|TRIM|UNDERLINE|utcdate|windows|x)\b/,
+ caseInsensitive: true
+ }, {
+ token: "constant.numeric.nsis",
+ regex: /\b(?:0(?:x|X)[0-9a-fA-F]+|[0-9]+(?:\.[0-9]+)?)\b/
+ }, {
+ token: "entity.name.function.nsis",
+ regex: /\$\([\w\.:-]+\)/
+ }, {
+ token: "storage.type.function.nsis",
+ regex: /\$\w+/
+ }, {
+ token: "punctuation.definition.string.begin.nsis",
+ regex: /`/,
+ push: [{
+ token: "punctuation.definition.string.end.nsis",
+ regex: /`/,
+ next: "pop"
+ }, {
+ token: "constant.character.escape.nsis",
+ regex: /\$\\./
+ }, {
+ defaultToken: "string.quoted.back.nsis"
+ }]
+ }, {
+ token: "punctuation.definition.string.begin.nsis",
+ regex: /"/,
+ push: [{
+ token: "punctuation.definition.string.end.nsis",
+ regex: /"/,
+ next: "pop"
+ }, {
+ token: "constant.character.escape.nsis",
+ regex: /\$\\./
+ }, {
+ defaultToken: "string.quoted.double.nsis"
+ }]
+ }, {
+ token: "punctuation.definition.string.begin.nsis",
+ regex: /'/,
+ push: [{
+ token: "punctuation.definition.string.end.nsis",
+ regex: /'/,
+ next: "pop"
+ }, {
+ token: "constant.character.escape.nsis",
+ regex: /\$\\./
+ }, {
+ defaultToken: "string.quoted.single.nsis"
+ }]
+ }, {
+ token: [
+ "punctuation.definition.comment.nsis",
+ "comment.line.nsis"
+ ],
+ regex: /(;|#)(.*$)/
+ }, {
+ token: "punctuation.definition.comment.nsis",
+ regex: /\/\*/,
+ push: [{
+ token: "punctuation.definition.comment.nsis",
+ regex: /\*\//,
+ next: "pop"
+ }, {
+ defaultToken: "comment.block.nsis"
+ }]
+ }, {
+ token: "text",
+ regex: /(?:!include|!insertmacro)\b/
+ }]
+ };
+
+ this.normalizeRules();
+};
+
+NSISHighlightRules.metaData = {
+ comment: "\n\ttodo: - highlight functions\n\t",
+ fileTypes: ["nsi", "nsh"],
+ name: "NSIS",
+ scopeName: "source.nsis"
+};
+
+
+oop.inherits(NSISHighlightRules, TextHighlightRules);
+
+exports.NSISHighlightRules = NSISHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/nsis",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nsis_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var NSISHighlightRules = require("./nsis_highlight_rules").NSISHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = NSISHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = [";", "#"];
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/nsis";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-objectivec.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-objectivec.js
new file mode 100644
index 00000000..1dd0cb58
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-objectivec.js
@@ -0,0 +1,725 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var cFunctions = exports.cFunctions = "\\b(?:hypot(?: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|char16_t|char32_t"
+ );
+
+ var storageModifiers = (
+ "const|extern|register|restrict|static|volatile|inline|private|" +
+ "protected|public|friend|explicit|virtual|export|mutable|typename|" +
+ "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"
+ );
+
+ 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|nullptr"
+ );
+
+ 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";
+ var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source;
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "//$",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : "//",
+ next : "singleLineComment"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // character
+ regex : "'(?:" + escapeRe + "|.)?'"
+ }, {
+ token : "string.start",
+ regex : '"',
+ stateName: "qqstring",
+ next: [
+ { token: "string", regex: /\\\s*$/, next: "qqstring" },
+ { token: "constant.language.escape", regex: escapeRe },
+ { token: "constant.language.escape", regex: /%[^'"\\]/ },
+ { token: "string.end", regex: '"|$', next: "start" },
+ { defaultToken: "string"}
+ ]
+ }, {
+ token : "string.start",
+ regex : 'R"\\(',
+ stateName: "rawString",
+ next: [
+ { token: "string.end", regex: '\\)"', next: "start" },
+ { defaultToken: "string"}
+ ]
+ }, {
+ 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 : "keyword", // pre-compiler directives
+ regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b",
+ next : "directive"
+ }, {
+ token : "keyword", // special case pre-compiler directive
+ regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"
+ }, {
+ token : "support.function.C99.c",
+ regex : cFunctions
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*"
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "singleLineComment" : [
+ {
+ token : "comment",
+ regex : /\\$/,
+ next : "singleLineComment"
+ }, {
+ token : "comment",
+ regex : /$/,
+ next : "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ],
+ "directive" : [
+ {
+ token : "constant.other.multiline",
+ regex : /\\/
+ },
+ {
+ 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",
+ regex : /[^\\\/]+/,
+ next : "start"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+ this.normalizeRules();
+};
+
+oop.inherits(c_cppHighlightRules, TextHighlightRules);
+
+exports.c_cppHighlightRules = c_cppHighlightRules;
+});
+
+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) {
+"use strict";
+
+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"],
+ 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",
+ 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"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "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/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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/objectivec",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/objectivec_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ObjectiveCHighlightRules = require("./objectivec_highlight_rules").ObjectiveCHighlightRules;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ObjectiveCHighlightRules;
+ this.foldingRules = new CStyleFoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/objectivec";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-ocaml.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-ocaml.js
new file mode 100644
index 00000000..29f26cc4
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-ocaml.js
@@ -0,0 +1,414 @@
+ace.define("ace/mode/ocaml_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 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"
+ },
+ {
+ defaultToken : "comment"
+ }
+ ],
+
+ "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) {
+"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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/ocaml",["require","exports","module","ace/lib/oop","ace/mode/text","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 OcamlHighlightRules = require("./ocaml_highlight_rules").OcamlHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = OcamlHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+
+ 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.getTokenizer().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);
+ };
+
+ this.$id = "ace/mode/ocaml";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-pascal.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-pascal.js
new file mode 100644
index 00000000..9ccd1ed5
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-pascal.js
@@ -0,0 +1,198 @@
+ace.define("ace/mode/pascal_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 PascalHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { caseInsensitive: true,
+ token: 'keyword.control.pascal',
+ regex: '\\b(?:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|do|else|end|except|export|exports|external|far|file|finalization|finally|for|forward|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor))\\b' },
+ { caseInsensitive: true,
+ token:
+ [ 'variable.pascal', "text",
+ 'storage.type.prototype.pascal',
+ 'entity.name.function.prototype.pascal' ],
+ regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?(?=(?:\\(.*?\\))?;\\s*(?:attribute|forward|external))' },
+ { caseInsensitive: true,
+ token:
+ [ 'variable.pascal', "text",
+ 'storage.type.function.pascal',
+ 'entity.name.function.pascal' ],
+ regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?' },
+ { token: 'constant.numeric.pascal',
+ 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|ll|LL|ull|ULL)?\\b' },
+ { token: 'punctuation.definition.comment.pascal',
+ regex: '--.*$',
+ push_:
+ [ { token: 'comment.line.double-dash.pascal.one',
+ regex: '$',
+ next: 'pop' },
+ { defaultToken: 'comment.line.double-dash.pascal.one' } ] },
+ { token: 'punctuation.definition.comment.pascal',
+ regex: '//.*$',
+ push_:
+ [ { token: 'comment.line.double-slash.pascal.two',
+ regex: '$',
+ next: 'pop' },
+ { defaultToken: 'comment.line.double-slash.pascal.two' } ] },
+ { token: 'punctuation.definition.comment.pascal',
+ regex: '\\(\\*',
+ push:
+ [ { token: 'punctuation.definition.comment.pascal',
+ regex: '\\*\\)',
+ next: 'pop' },
+ { defaultToken: 'comment.block.pascal.one' } ] },
+ { token: 'punctuation.definition.comment.pascal',
+ regex: '\\{',
+ push:
+ [ { token: 'punctuation.definition.comment.pascal',
+ regex: '\\}',
+ next: 'pop' },
+ { defaultToken: 'comment.block.pascal.two' } ] },
+ { token: 'punctuation.definition.string.begin.pascal',
+ regex: '"',
+ push:
+ [ { token: 'constant.character.escape.pascal', regex: '\\\\.' },
+ { token: 'punctuation.definition.string.end.pascal',
+ regex: '"',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.double.pascal' } ]
+ },
+ { token: 'punctuation.definition.string.begin.pascal',
+ regex: '\'',
+ push:
+ [ { token: 'constant.character.escape.apostrophe.pascal',
+ regex: '\'\'' },
+ { token: 'punctuation.definition.string.end.pascal',
+ regex: '\'',
+ next: 'pop' },
+ { defaultToken: 'string.quoted.single.pascal' } ] },
+ { token: 'keyword.operator',
+ regex: '[+\\-;,/*%]|:=|=' } ] }
+
+ this.normalizeRules();
+};
+
+oop.inherits(PascalHighlightRules, TextHighlightRules);
+
+exports.PascalHighlightRules = PascalHighlightRules;
+});
+
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/pascal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pascal_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var PascalHighlightRules = require("./pascal_highlight_rules").PascalHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = PascalHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ["--", "//"];
+ this.blockComment = [
+ {start: "(*", end: "*)"},
+ {start: "{", end: "}"}
+ ];
+
+ this.$id = "ace/mode/pascal";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-perl.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-perl.js
new file mode 100644
index 00000000..768c5383
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-perl.js
@@ -0,0 +1,373 @@
+ace.define("ace/mode/perl_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 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.doc",
+ regex : "^=(?:begin|item)\\b",
+ next : "block_comment"
+ }, {
+ 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 : "comment",
+ regex : "#.*$"
+ }, {
+ 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 : '.+'
+ }
+ ],
+ "block_comment": [
+ {
+ token: "comment.doc",
+ regex: "^=cut\\b",
+ next: "start"
+ },
+ {
+ defaultToken: "comment.doc"
+ }
+ ]
+ };
+};
+
+oop.inherits(PerlHighlightRules, TextHighlightRules);
+
+exports.PerlHighlightRules = PerlHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/perl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/perl_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 PerlHighlightRules = require("./perl_highlight_rules").PerlHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = PerlHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new CStyleFoldMode({start: "^=(begin|item)\\b", end: "^=(cut)\\b"});
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+ this.blockComment = [
+ {start: "=begin", end: "=cut", lineStartOnly: true},
+ {start: "=item", end: "=cut", lineStartOnly: true}
+ ];
+
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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.$id = "ace/mode/perl";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-pgsql.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-pgsql.js
new file mode 100644
index 00000000..189f17a5
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-pgsql.js
@@ -0,0 +1,1500 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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) {
+"use strict";
+
+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.doc",
+ regex : "^=(?:begin|item)\\b",
+ next : "block_comment"
+ }, {
+ 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 : "comment",
+ regex : "#.*$"
+ }, {
+ 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 : '.+'
+ }
+ ],
+ "block_comment": [
+ {
+ token: "comment.doc",
+ regex: "^=cut\\b",
+ next: "start"
+ },
+ {
+ defaultToken: "comment.doc"
+ }
+ ]
+ };
+};
+
+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) {
+"use strict";
+
+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 + ")";
+
+ var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "string", // multi line """ string start
+ regex : strPre + '"{3}',
+ next : "qqstring3"
+ }, {
+ token : "string", // " string
+ regex : strPre + '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "string", // multi line ''' string start
+ regex : strPre + "'{3}",
+ next : "qstring3"
+ }, {
+ token : "string", // ' string
+ regex : strPre + "'(?=.)",
+ next : "qstring"
+ }, {
+ 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+"
+ } ],
+ "qqstring3" : [ {
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string", // multi line """ string end
+ regex : '"{3}',
+ next : "start"
+ }, {
+ defaultToken : "string"
+ } ],
+ "qstring3" : [ {
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string", // multi line ''' string end
+ regex : "'{3}",
+ next : "start"
+ }, {
+ defaultToken : "string"
+ } ],
+ "qqstring" : [{
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start"
+ }, {
+ defaultToken: "string"
+ }],
+ "qstring" : [{
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start"
+ }, {
+ defaultToken: "string"
+ }]
+ };
+};
+
+oop.inherits(PythonHighlightRules, TextHighlightRules);
+
+exports.PythonHighlightRules = PythonHighlightRules;
+});
+
+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() {
+ 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 : "text", // single quoted strings are not allowed
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "comment", // comments are not allowed, but who cares?
+ regex : "\\/\\/.*$"
+ }, {
+ token : "comment.start", // comments are not allowed, but who cares?
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ 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 : '"|$',
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment.end", // comments are not allowed, but who cares?
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ]
+ };
+
+};
+
+oop.inherits(JsonHighlightRules, TextHighlightRules);
+
+exports.JsonHighlightRules = JsonHighlightRules;
+});
+
+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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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","ace/mode/json_highlight_rules","ace/mode/javascript_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 JsonHighlightRules = require("./json_highlight_rules").JsonHighlightRules;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+
+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|anyrange|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|daterange|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|event|event_trigger|" +
+ "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|int4range|int8|int8range|integer|" +
+ "internal|intersect|interval|into|invoker|is|isnull|isolation|join|json|key|label|language|" +
+ "language_handler|large|last|lateral|lc_collate|lc_ctype|leading|leakproof|least|left|level|" +
+ "like|limit|line|listen|load|local|localtime|localtimestamp|location|lock|lseg|macaddr|" +
+ "mapping|match|materialized|maxvalue|minute|minvalue|mode|money|month|move|name|names|" +
+ "national|natural|nchar|next|no|none|not|nothing|notify|notnull|nowait|null|nullif|nulls|" +
+ "numeric|numrange|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|program|quote|range|read|real|" +
+ "reassign|recheck|record|recursive|ref|refcursor|references|refresh|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|snapshot|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|tsrange|tstzrange|tsvector|" +
+ "txid_snapshot|type|types|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|acldefault|" +
+ "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|anyrange_in|anyrange_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_remove|array_replace|array_send|array_smaller|" +
+ "array_to_json|array_to_string|array_typanalyze|array_upper|arraycontained|" +
+ "arraycontains|arraycontjoinsel|arraycontsel|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|btcanreturn|btcharcmp|btcostestimate|btendscan|btfloat48cmp|btfloat4cmp|" +
+ "btfloat4sortsupport|btfloat84cmp|btfloat8cmp|btfloat8sortsupport|btgetbitmap|" +
+ "btgettuple|btinsert|btint24cmp|btint28cmp|btint2cmp|btint2sortsupport|btint42cmp|" +
+ "btint48cmp|btint4cmp|btint4sortsupport|btint82cmp|btint84cmp|btint8cmp|" +
+ "btint8sortsupport|btmarkpos|btnamecmp|btnamesortsupport|btoidcmp|btoidsortsupport|" +
+ "btoidvectorcmp|btoptions|btrecordcmp|btreltimecmp|btrescan|btrestrpos|btrim|" +
+ "bttext_pattern_cmp|bttextcmp|bttidcmp|bttintervalcmp|btvacuumcleanup|" +
+ "bytea_string_agg_finalfn|bytea_string_agg_transfn|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_sortsupport|date_trunc|daterange|" +
+ "daterange_canonical|daterange_subdiff|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|elem_contained_by_range|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|event_trigger_in|event_trigger_out|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|has_type_privilege|hash_aclitem|hash_array|hash_numeric|" +
+ "hash_range|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|" +
+ "int4range|int4range_canonical|int4range_subdiff|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|" +
+ "int8range|int8range_canonical|int8range_subdiff|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_transform|" +
+ "interval_um|intervaltypmodin|intervaltypmodout|intinterval|isclosed|isempty|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|json_agg|" +
+ "json_agg_finalfn|json_agg_transfn|json_array_element|json_array_element_text|" +
+ "json_array_elements|json_array_length|json_each|json_each_text|json_extract_path|" +
+ "json_extract_path_op|json_extract_path_text|json_extract_path_text_op|json_in|" +
+ "json_object_field|json_object_field_text|json_object_keys|json_out|" +
+ "json_populate_record|json_populate_recordset|json_recv|json_send|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_lseek64|lo_open|lo_tell|lo_tell64|lo_truncate|" +
+ "lo_truncate64|lo_unlink|log|loread|lower|lower_inc|lower_inf|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_and|macaddr_cmp|macaddr_eq|macaddr_ge|" +
+ "macaddr_gt|macaddr_in|macaddr_le|macaddr_lt|macaddr_ne|macaddr_not|macaddr_or|" +
+ "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_transform|numeric_uminus|numeric_uplus|numeric_var_pop|numeric_var_samp|" +
+ "numerictypmodin|numerictypmodout|numnode|numrange|numrange_subdiff|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_backup_start_time|pg_cancel_backend|pg_char_to_encoding|pg_client_encoding|" +
+ "pg_collation_for|pg_collation_is_visible|pg_column_is_updatable|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_event_trigger_dropped_objects|pg_export_snapshot|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_multixact_members|pg_get_ruledef|pg_get_serial_sequence|pg_get_triggerdef|" +
+ "pg_get_userbyid|pg_get_viewdef|pg_has_role|pg_identify_object|pg_indexes_size|" +
+ "pg_is_in_backup|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_opfamily_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_is_updatable|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_checkpoint_sync_time|" +
+ "pg_stat_get_checkpoint_write_time|pg_stat_get_db_blk_read_time|" +
+ "pg_stat_get_db_blk_write_time|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_deadlocks|" +
+ "pg_stat_get_db_numbackends|pg_stat_get_db_stat_reset_time|" +
+ "pg_stat_get_db_temp_bytes|pg_stat_get_db_temp_files|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_total_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_total_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_location|pg_tablespace_size|" +
+ "pg_terminate_backend|pg_timezone_abbrevs|pg_timezone_names|pg_total_relation_size|" +
+ "pg_trigger_depth|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_location_diff|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|range_adjacent|" +
+ "range_after|range_before|range_cmp|range_contained_by|range_contains|" +
+ "range_contains_elem|range_eq|range_ge|range_gist_compress|range_gist_consistent|" +
+ "range_gist_decompress|range_gist_penalty|range_gist_picksplit|range_gist_same|" +
+ "range_gist_union|range_gt|range_in|range_intersect|range_le|range_lt|range_minus|" +
+ "range_ne|range_out|range_overlaps|range_overleft|range_overright|range_recv|range_send|" +
+ "range_typanalyze|range_union|rangesel|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|row_to_json|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|spg_kd_choose|spg_kd_config|spg_kd_inner_consistent|spg_kd_picksplit|" +
+ "spg_quad_choose|spg_quad_config|spg_quad_inner_consistent|spg_quad_leaf_consistent|" +
+ "spg_quad_picksplit|spg_range_quad_choose|spg_range_quad_config|" +
+ "spg_range_quad_inner_consistent|spg_range_quad_leaf_consistent|" +
+ "spg_range_quad_picksplit|spg_text_choose|spg_text_config|spg_text_inner_consistent|" +
+ "spg_text_leaf_consistent|spg_text_picksplit|spgbeginscan|spgbuild|spgbuildempty|" +
+ "spgbulkdelete|spgcanreturn|spgcostestimate|spgendscan|spggetbitmap|spggettuple|" +
+ "spginsert|spgmarkpos|spgoptions|spgrescan|spgrestrpos|spgvacuumcleanup|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|time_transform|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|" +
+ "timestamp_sortsupport|timestamp_transform|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_json|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|tsrange|" +
+ "tsrange_subdiff|tstzrange|tstzrange_subdiff|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|upper_inc|upper_inf|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|varbit_transform|varbitcmp|varbiteq|varbitge|varbitgt|varbitle|" +
+ "varbitlt|varbitne|varbittypmodin|varbittypmodout|varchar_transform|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",
+ regex : "\\$perl\\$",
+ next : "perl-start"
+ }, {
+ token : "string",
+ regex : "\\$python\\$",
+ next : "python-start"
+ }, {
+ token : "string",
+ regex : "\\$json\\$",
+ next : "json-start"
+ }, {
+ token : "string",
+ regex : "\\$(js|javascript)\\$",
+ next : "javascript-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"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+
+ "commentStatement" : [{
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "statement"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+
+ "commentDollarSql" : [{
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "dollarSql"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+
+ "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"}]);
+ this.embedRules(JsonHighlightRules, "json-", [{token : "string", regex : "\\$json\\$", next : "statement"}]);
+ this.embedRules(JavaScriptHighlightRules, "javascript-", [{token : "string", regex : "\\$(js|javascript)\\$", next : "statement"}]);
+};
+
+oop.inherits(PgsqlHighlightRules, TextHighlightRules);
+
+exports.PgsqlHighlightRules = PgsqlHighlightRules;
+});
+
+ace.define("ace/mode/pgsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pgsql_highlight_rules"], function(require, exports, module) {
+
+var oop = require("../lib/oop");
+var TextMode = require("../mode/text").Mode;
+var PgsqlHighlightRules = require("./pgsql_highlight_rules").PgsqlHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = PgsqlHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ 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
+ }
+ };
+
+ this.$id = "ace/mode/pgsql";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-php.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-php.js
new file mode 100644
index 00000000..b4d55de8
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-php.js
@@ -0,0 +1,12856 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/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 supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+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) {
+"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 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|class_uses|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_declared_traits|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_affected_rows|' +
+ 'mysqli_autocommit|mysqli_bind_param|mysqli_bind_result|mysqli_cache_stats|mysqli_change_user|mysqli_character_set_name|' +
+ 'mysqli_client_encoding|mysqli_close|mysqli_commit|mysqli_connect|mysqli_connect_errno|mysqli_connect_error|mysqli_data_seek|' +
+ 'mysqli_debug|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|mysqli_dump_debug_info|mysqli_embedded_server_end|' +
+ 'mysqli_embedded_server_start|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_errno|mysqli_error|mysqli_escape_string|' +
+ 'mysqli_execute|mysqli_fetch|mysqli_fetch_all|mysqli_fetch_array|mysqli_fetch_assoc|mysqli_fetch_field|mysqli_fetch_field_direct|' +
+ 'mysqli_fetch_fields|mysqli_fetch_lengths|mysqli_fetch_object|mysqli_fetch_row|mysqli_field_count|mysqli_field_seek|mysqli_field_tell|' +
+ 'mysqli_free_result|mysqli_get_charset|mysqli_get_client_info|mysqli_get_client_stats|mysqli_get_client_version|mysqli_get_connection_stats|' +
+ 'mysqli_get_host_info|mysqli_get_metadata|mysqli_get_proto_info|mysqli_get_server_info|mysqli_get_server_version|mysqli_get_warnings|' +
+ 'mysqli_info|mysqli_init|mysqli_insert_id|mysqli_kill|mysqli_link_construct|mysqli_master_query|mysqli_more_results|mysqli_multi_query|' +
+ 'mysqli_next_result|mysqli_num_fields|mysqli_num_rows|mysqli_options|mysqli_param_count|mysqli_ping|mysqli_poll|mysqli_prepare|' +
+ 'mysqli_query|mysqli_real_connect|mysqli_real_escape_string|mysqli_real_query|mysqli_reap_async_query|mysqli_refresh|mysqli_report|' +
+ 'mysqli_result|mysqli_rollback|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_select_db|mysqli_send_long_data|' +
+ 'mysqli_send_query|mysqli_set_charset|mysqli_set_local_infile_default|mysqli_set_local_infile_handler|mysqli_set_opt|mysqli_slave_query|' +
+ 'mysqli_sqlstate|mysqli_ssl_set|mysqli_stat|mysqli_stmt|mysqli_stmt_affected_rows|mysqli_stmt_attr_get|mysqli_stmt_attr_set|' +
+ 'mysqli_stmt_bind_param|mysqli_stmt_bind_result|mysqli_stmt_close|mysqli_stmt_data_seek|mysqli_stmt_errno|mysqli_stmt_error|' +
+ 'mysqli_stmt_execute|mysqli_stmt_fetch|mysqli_stmt_field_count|mysqli_stmt_free_result|mysqli_stmt_get_result|mysqli_stmt_get_warnings|' +
+ 'mysqli_stmt_init|mysqli_stmt_insert_id|mysqli_stmt_next_result|mysqli_stmt_num_rows|mysqli_stmt_param_count|mysqli_stmt_prepare|' +
+ 'mysqli_stmt_reset|mysqli_stmt_result_metadata|mysqli_stmt_send_long_data|mysqli_stmt_sqlstate|mysqli_stmt_store_result|mysqli_store_result|' +
+ 'mysqli_thread_id|mysqli_thread_safe|mysqli_use_result|mysqli_warning|mysqli_warning_count|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|trait_exists|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|trait|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|TRUE|false|FALSE|null|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 : /(?:#|\/\/)(?:[^?]|\?[^>])*/
+ },
+ 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 : ["keyword", "text", "support.class"],
+ regex : "\\b(new)(\\s+)(\\w+)"
+ }, {
+ token : ["support.class", "keyword.operator"],
+ regex : "\\b(\\w+)(::)"
+ }, {
+ 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_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*|self|parent)$/))
+ return "variable";
+ return "identifier";
+ },
+ regex : /[a-zA-Z_$\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/
+ }, {
+ onMatch : function(value, currentSate, state) {
+ value = value.substr(3);
+ if (value[0] == "'" || value[0] == '"')
+ value = value.slice(1, -1);
+ state.unshift(this.next, value);
+ return "markup.list";
+ },
+ regex : /<<<(?:\w+|'\w+'|"\w+")$/,
+ next: "heredoc"
+ }, {
+ token : "keyword.operator",
+ regex : "::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|!=|!==|<=|>=|=>|<<=|>>=|>>>=|<>|<|>|=|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "heredoc" : [
+ {
+ onMatch : function(value, currentSate, stack) {
+ if (stack[1] != value)
+ return "string";
+ stack.shift();
+ stack.shift();
+ return "markup.list";
+ },
+ regex : "^\\w+(?=;?$)",
+ next: "start"
+ }, {
+ token: "string",
+ regex : ".*"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment",
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : '\\\\(?:[nrtvef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})'
+ }, {
+ token : "variable",
+ regex : /\$[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/
+ }, {
+ token : "variable",
+ regex : /\$\{[^"\}]+\}?/ // this is wrong but ok for now
+ },
+ {token : "string", regex : '"', next : "start"},
+ {defaultToken : "string"}
+ ],
+ "qstring" : [
+ {token : "constant.language.escape", regex : /\\['\\]/},
+ {token : "string", regex : "'", next : "start"},
+ {defaultToken : "string"}
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(PhpLangHighlightRules, TextHighlightRules);
+
+
+var PhpHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var startRules = [
+ {
+ token : "support.php_tag", // php open tag
+ regex : "<\\?(?:php|=)?",
+ push : "php-start"
+ }
+ ];
+
+ var endRules = [
+ {
+ token : "support.php_tag", // php close tag
+ regex : "\\?>",
+ next : "pop"
+ }
+ ];
+
+ for (var key in this.$rules)
+ this.$rules[key].unshift.apply(this.$rules[key], startRules);
+
+ this.embedRules(PhpLangHighlightRules, "php-", endRules, ["start"]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(PhpHighlightRules, HtmlHighlightRules);
+
+exports.PhpHighlightRules = PhpHighlightRules;
+exports.PhpLangHighlightRules = PhpLangHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/php_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var functionMap = {
+ "abs": [
+ "int abs(int number)",
+ "Return the absolute value of the number"
+ ],
+ "acos": [
+ "float acos(float number)",
+ "Return the arc cosine of the number in radians"
+ ],
+ "acosh": [
+ "float acosh(float number)",
+ "Returns the inverse hyperbolic cosine of the number, i.e. the value whose hyperbolic cosine is number"
+ ],
+ "addGlob": [
+ "bool addGlob(string pattern[,int flags [, array options]])",
+ "Add files matching the glob pattern. See php's glob for the pattern syntax."
+ ],
+ "addPattern": [
+ "bool addPattern(string pattern[, string path [, array options]])",
+ "Add files matching the pcre pattern. See php's pcre for the pattern syntax."
+ ],
+ "addcslashes": [
+ "string addcslashes(string str, string charlist)",
+ "Escapes all chars mentioned in charlist with backslash. It creates octal representations if asked to backslash characters with 8th bit set or with ASCII<32 (except '\\n', '\\r', '\\t' etc...)"
+ ],
+ "addslashes": [
+ "string addslashes(string str)",
+ "Escapes single quote, double quotes and backslash characters in a string with backslashes"
+ ],
+ "apache_child_terminate": [
+ "bool apache_child_terminate(void)",
+ "Terminate apache process after this request"
+ ],
+ "apache_get_modules": [
+ "array apache_get_modules(void)",
+ "Get a list of loaded Apache modules"
+ ],
+ "apache_get_version": [
+ "string apache_get_version(void)",
+ "Fetch Apache version"
+ ],
+ "apache_getenv": [
+ "bool apache_getenv(string variable [, bool walk_to_top])",
+ "Get an Apache subprocess_env variable"
+ ],
+ "apache_lookup_uri": [
+ "object apache_lookup_uri(string URI)",
+ "Perform a partial request of the given URI to obtain information about it"
+ ],
+ "apache_note": [
+ "string apache_note(string note_name [, string note_value])",
+ "Get and set Apache request notes"
+ ],
+ "apache_request_auth_name": [
+ "string apache_request_auth_name()",
+ ""
+ ],
+ "apache_request_auth_type": [
+ "string apache_request_auth_type()",
+ ""
+ ],
+ "apache_request_discard_request_body": [
+ "long apache_request_discard_request_body()",
+ ""
+ ],
+ "apache_request_err_headers_out": [
+ "array apache_request_err_headers_out([{string name|array list} [, string value [, bool replace = false]]])",
+ "* fetch all headers that go out in case of an error or a subrequest"
+ ],
+ "apache_request_headers": [
+ "array apache_request_headers(void)",
+ "Fetch all HTTP request headers"
+ ],
+ "apache_request_headers_in": [
+ "array apache_request_headers_in()",
+ "* fetch all incoming request headers"
+ ],
+ "apache_request_headers_out": [
+ "array apache_request_headers_out([{string name|array list} [, string value [, bool replace = false]]])",
+ "* fetch all outgoing request headers"
+ ],
+ "apache_request_is_initial_req": [
+ "bool apache_request_is_initial_req()",
+ ""
+ ],
+ "apache_request_log_error": [
+ "boolean apache_request_log_error(string message, [long facility])",
+ ""
+ ],
+ "apache_request_meets_conditions": [
+ "long apache_request_meets_conditions()",
+ ""
+ ],
+ "apache_request_remote_host": [
+ "int apache_request_remote_host([int type])",
+ ""
+ ],
+ "apache_request_run": [
+ "long apache_request_run()",
+ "This is a wrapper for ap_sub_run_req and ap_destory_sub_req. It takes sub_request, runs it, destroys it, and returns it's status."
+ ],
+ "apache_request_satisfies": [
+ "long apache_request_satisfies()",
+ ""
+ ],
+ "apache_request_server_port": [
+ "int apache_request_server_port()",
+ ""
+ ],
+ "apache_request_set_etag": [
+ "void apache_request_set_etag()",
+ ""
+ ],
+ "apache_request_set_last_modified": [
+ "void apache_request_set_last_modified()",
+ ""
+ ],
+ "apache_request_some_auth_required": [
+ "bool apache_request_some_auth_required()",
+ ""
+ ],
+ "apache_request_sub_req_lookup_file": [
+ "object apache_request_sub_req_lookup_file(string file)",
+ "Returns sub-request for the specified file. You would need to run it yourself with run()."
+ ],
+ "apache_request_sub_req_lookup_uri": [
+ "object apache_request_sub_req_lookup_uri(string uri)",
+ "Returns sub-request for the specified uri. You would need to run it yourself with run()"
+ ],
+ "apache_request_sub_req_method_uri": [
+ "object apache_request_sub_req_method_uri(string method, string uri)",
+ "Returns sub-request for the specified file. You would need to run it yourself with run()."
+ ],
+ "apache_request_update_mtime": [
+ "long apache_request_update_mtime([int dependency_mtime])",
+ ""
+ ],
+ "apache_reset_timeout": [
+ "bool apache_reset_timeout(void)",
+ "Reset the Apache write timer"
+ ],
+ "apache_response_headers": [
+ "array apache_response_headers(void)",
+ "Fetch all HTTP response headers"
+ ],
+ "apache_setenv": [
+ "bool apache_setenv(string variable, string value [, bool walk_to_top])",
+ "Set an Apache subprocess_env variable"
+ ],
+ "array_change_key_case": [
+ "array array_change_key_case(array input [, int case=CASE_LOWER])",
+ "Retuns an array with all string keys lowercased [or uppercased]"
+ ],
+ "array_chunk": [
+ "array array_chunk(array input, int size [, bool preserve_keys])",
+ "Split array into chunks"
+ ],
+ "array_combine": [
+ "array array_combine(array keys, array values)",
+ "Creates an array by using the elements of the first parameter as keys and the elements of the second as the corresponding values"
+ ],
+ "array_count_values": [
+ "array array_count_values(array input)",
+ "Return the value as key and the frequency of that value in input as value"
+ ],
+ "array_diff": [
+ "array array_diff(array arr1, array arr2 [, array ...])",
+ "Returns the entries of arr1 that have values which are not present in any of the others arguments."
+ ],
+ "array_diff_assoc": [
+ "array array_diff_assoc(array arr1, array arr2 [, array ...])",
+ "Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal"
+ ],
+ "array_diff_key": [
+ "array array_diff_key(array arr1, array arr2 [, array ...])",
+ "Returns the entries of arr1 that have keys which are not present in any of the others arguments. This function is like array_diff() but works on the keys instead of the values. The associativity is preserved."
+ ],
+ "array_diff_uassoc": [
+ "array array_diff_uassoc(array arr1, array arr2 [, array ...], callback data_comp_func)",
+ "Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Elements are compared by user supplied function."
+ ],
+ "array_diff_ukey": [
+ "array array_diff_ukey(array arr1, array arr2 [, array ...], callback key_comp_func)",
+ "Returns the entries of arr1 that have keys which are not present in any of the others arguments. User supplied function is used for comparing the keys. This function is like array_udiff() but works on the keys instead of the values. The associativity is preserved."
+ ],
+ "array_fill": [
+ "array array_fill(int start_key, int num, mixed val)",
+ "Create an array containing num elements starting with index start_key each initialized to val"
+ ],
+ "array_fill_keys": [
+ "array array_fill_keys(array keys, mixed val)",
+ "Create an array using the elements of the first parameter as keys each initialized to val"
+ ],
+ "array_filter": [
+ "array array_filter(array input [, mixed callback])",
+ "Filters elements from the array via the callback."
+ ],
+ "array_flip": [
+ "array array_flip(array input)",
+ "Return array with key <-> value flipped"
+ ],
+ "array_intersect": [
+ "array array_intersect(array arr1, array arr2 [, array ...])",
+ "Returns the entries of arr1 that have values which are present in all the other arguments"
+ ],
+ "array_intersect_assoc": [
+ "array array_intersect_assoc(array arr1, array arr2 [, array ...])",
+ "Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check"
+ ],
+ "array_intersect_key": [
+ "array array_intersect_key(array arr1, array arr2 [, array ...])",
+ "Returns the entries of arr1 that have keys which are present in all the other arguments. Kind of equivalent to array_diff(array_keys($arr1), array_keys($arr2)[,array_keys(...)]). Equivalent of array_intersect_assoc() but does not do compare of the data."
+ ],
+ "array_intersect_uassoc": [
+ "array array_intersect_uassoc(array arr1, array arr2 [, array ...], callback key_compare_func)",
+ "Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check and they are compared by using an user-supplied callback."
+ ],
+ "array_intersect_ukey": [
+ "array array_intersect_ukey(array arr1, array arr2 [, array ...], callback key_compare_func)",
+ "Returns the entries of arr1 that have keys which are present in all the other arguments. Kind of equivalent to array_diff(array_keys($arr1), array_keys($arr2)[,array_keys(...)]). The comparison of the keys is performed by a user supplied function. Equivalent of array_intersect_uassoc() but does not do compare of the data."
+ ],
+ "array_key_exists": [
+ "bool array_key_exists(mixed key, array search)",
+ "Checks if the given key or index exists in the array"
+ ],
+ "array_keys": [
+ "array array_keys(array input [, mixed search_value[, bool strict]])",
+ "Return just the keys from the input array, optionally only for the specified search_value"
+ ],
+ "array_map": [
+ "array array_map(mixed callback, array input1 [, array input2 ,...])",
+ "Applies the callback to the elements in given arrays."
+ ],
+ "array_merge": [
+ "array array_merge(array arr1, array arr2 [, array ...])",
+ "Merges elements from passed arrays into one array"
+ ],
+ "array_merge_recursive": [
+ "array array_merge_recursive(array arr1, array arr2 [, array ...])",
+ "Recursively merges elements from passed arrays into one array"
+ ],
+ "array_multisort": [
+ "bool array_multisort(array ar1 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING]] [, array ar2 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING]], ...])",
+ "Sort multiple arrays at once similar to how ORDER BY clause works in SQL"
+ ],
+ "array_pad": [
+ "array array_pad(array input, int pad_size, mixed pad_value)",
+ "Returns a copy of input array padded with pad_value to size pad_size"
+ ],
+ "array_pop": [
+ "mixed array_pop(array stack)",
+ "Pops an element off the end of the array"
+ ],
+ "array_product": [
+ "mixed array_product(array input)",
+ "Returns the product of the array entries"
+ ],
+ "array_push": [
+ "int array_push(array stack, mixed var [, mixed ...])",
+ "Pushes elements onto the end of the array"
+ ],
+ "array_rand": [
+ "mixed array_rand(array input [, int num_req])",
+ "Return key/keys for random entry/entries in the array"
+ ],
+ "array_reduce": [
+ "mixed array_reduce(array input, mixed callback [, mixed initial])",
+ "Iteratively reduce the array to a single value via the callback."
+ ],
+ "array_replace": [
+ "array array_replace(array arr1, array arr2 [, array ...])",
+ "Replaces elements from passed arrays into one array"
+ ],
+ "array_replace_recursive": [
+ "array array_replace_recursive(array arr1, array arr2 [, array ...])",
+ "Recursively replaces elements from passed arrays into one array"
+ ],
+ "array_reverse": [
+ "array array_reverse(array input [, bool preserve keys])",
+ "Return input as a new array with the order of the entries reversed"
+ ],
+ "array_search": [
+ "mixed array_search(mixed needle, array haystack [, bool strict])",
+ "Searches the array for a given value and returns the corresponding key if successful"
+ ],
+ "array_shift": [
+ "mixed array_shift(array stack)",
+ "Pops an element off the beginning of the array"
+ ],
+ "array_slice": [
+ "array array_slice(array input, int offset [, int length [, bool preserve_keys]])",
+ "Returns elements specified by offset and length"
+ ],
+ "array_splice": [
+ "array array_splice(array input, int offset [, int length [, array replacement]])",
+ "Removes the elements designated by offset and length and replace them with supplied array"
+ ],
+ "array_sum": [
+ "mixed array_sum(array input)",
+ "Returns the sum of the array entries"
+ ],
+ "array_udiff": [
+ "array array_udiff(array arr1, array arr2 [, array ...], callback data_comp_func)",
+ "Returns the entries of arr1 that have values which are not present in any of the others arguments. Elements are compared by user supplied function."
+ ],
+ "array_udiff_assoc": [
+ "array array_udiff_assoc(array arr1, array arr2 [, array ...], callback key_comp_func)",
+ "Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Keys are compared by user supplied function."
+ ],
+ "array_udiff_uassoc": [
+ "array array_udiff_uassoc(array arr1, array arr2 [, array ...], callback data_comp_func, callback key_comp_func)",
+ "Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Keys and elements are compared by user supplied functions."
+ ],
+ "array_uintersect": [
+ "array array_uintersect(array arr1, array arr2 [, array ...], callback data_compare_func)",
+ "Returns the entries of arr1 that have values which are present in all the other arguments. Data is compared by using an user-supplied callback."
+ ],
+ "array_uintersect_assoc": [
+ "array array_uintersect_assoc(array arr1, array arr2 [, array ...], callback data_compare_func)",
+ "Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check. Data is compared by using an user-supplied callback."
+ ],
+ "array_uintersect_uassoc": [
+ "array array_uintersect_uassoc(array arr1, array arr2 [, array ...], callback data_compare_func, callback key_compare_func)",
+ "Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check. Both data and keys are compared by using user-supplied callbacks."
+ ],
+ "array_unique": [
+ "array array_unique(array input [, int sort_flags])",
+ "Removes duplicate values from array"
+ ],
+ "array_unshift": [
+ "int array_unshift(array stack, mixed var [, mixed ...])",
+ "Pushes elements onto the beginning of the array"
+ ],
+ "array_values": [
+ "array array_values(array input)",
+ "Return just the values from the input array"
+ ],
+ "array_walk": [
+ "bool array_walk(array input, string funcname [, mixed userdata])",
+ "Apply a user function to every member of an array"
+ ],
+ "array_walk_recursive": [
+ "bool array_walk_recursive(array input, string funcname [, mixed userdata])",
+ "Apply a user function recursively to every member of an array"
+ ],
+ "arsort": [
+ "bool arsort(array &array_arg [, int sort_flags])",
+ "Sort an array in reverse order and maintain index association"
+ ],
+ "asin": [
+ "float asin(float number)",
+ "Returns the arc sine of the number in radians"
+ ],
+ "asinh": [
+ "float asinh(float number)",
+ "Returns the inverse hyperbolic sine of the number, i.e. the value whose hyperbolic sine is number"
+ ],
+ "asort": [
+ "bool asort(array &array_arg [, int sort_flags])",
+ "Sort an array and maintain index association"
+ ],
+ "assert": [
+ "int assert(string|bool assertion)",
+ "Checks if assertion is false"
+ ],
+ "assert_options": [
+ "mixed assert_options(int what [, mixed value])",
+ "Set/get the various assert flags"
+ ],
+ "atan": [
+ "float atan(float number)",
+ "Returns the arc tangent of the number in radians"
+ ],
+ "atan2": [
+ "float atan2(float y, float x)",
+ "Returns the arc tangent of y/x, with the resulting quadrant determined by the signs of y and x"
+ ],
+ "atanh": [
+ "float atanh(float number)",
+ "Returns the inverse hyperbolic tangent of the number, i.e. the value whose hyperbolic tangent is number"
+ ],
+ "attachIterator": [
+ "void attachIterator(Iterator iterator[, mixed info])",
+ "Attach a new iterator"
+ ],
+ "base64_decode": [
+ "string base64_decode(string str[, bool strict])",
+ "Decodes string using MIME base64 algorithm"
+ ],
+ "base64_encode": [
+ "string base64_encode(string str)",
+ "Encodes string using MIME base64 algorithm"
+ ],
+ "base_convert": [
+ "string base_convert(string number, int frombase, int tobase)",
+ "Converts a number in a string from any base <= 36 to any base <= 36"
+ ],
+ "basename": [
+ "string basename(string path [, string suffix])",
+ "Returns the filename component of the path"
+ ],
+ "bcadd": [
+ "string bcadd(string left_operand, string right_operand [, int scale])",
+ "Returns the sum of two arbitrary precision numbers"
+ ],
+ "bccomp": [
+ "int bccomp(string left_operand, string right_operand [, int scale])",
+ "Compares two arbitrary precision numbers"
+ ],
+ "bcdiv": [
+ "string bcdiv(string left_operand, string right_operand [, int scale])",
+ "Returns the quotient of two arbitrary precision numbers (division)"
+ ],
+ "bcmod": [
+ "string bcmod(string left_operand, string right_operand)",
+ "Returns the modulus of the two arbitrary precision operands"
+ ],
+ "bcmul": [
+ "string bcmul(string left_operand, string right_operand [, int scale])",
+ "Returns the multiplication of two arbitrary precision numbers"
+ ],
+ "bcpow": [
+ "string bcpow(string x, string y [, int scale])",
+ "Returns the value of an arbitrary precision number raised to the power of another"
+ ],
+ "bcpowmod": [
+ "string bcpowmod(string x, string y, string mod [, int scale])",
+ "Returns the value of an arbitrary precision number raised to the power of another reduced by a modulous"
+ ],
+ "bcscale": [
+ "bool bcscale(int scale)",
+ "Sets default scale parameter for all bc math functions"
+ ],
+ "bcsqrt": [
+ "string bcsqrt(string operand [, int scale])",
+ "Returns the square root of an arbitray precision number"
+ ],
+ "bcsub": [
+ "string bcsub(string left_operand, string right_operand [, int scale])",
+ "Returns the difference between two arbitrary precision numbers"
+ ],
+ "bin2hex": [
+ "string bin2hex(string data)",
+ "Converts the binary representation of data to hex"
+ ],
+ "bind_textdomain_codeset": [
+ "string bind_textdomain_codeset (string domain, string codeset)",
+ "Specify the character encoding in which the messages from the DOMAIN message catalog will be returned."
+ ],
+ "bindec": [
+ "int bindec(string binary_number)",
+ "Returns the decimal equivalent of the binary number"
+ ],
+ "bindtextdomain": [
+ "string bindtextdomain(string domain_name, string dir)",
+ "Bind to the text domain domain_name, looking for translations in dir. Returns the current domain"
+ ],
+ "birdstep_autocommit": [
+ "bool birdstep_autocommit(int index)",
+ ""
+ ],
+ "birdstep_close": [
+ "bool birdstep_close(int id)",
+ ""
+ ],
+ "birdstep_commit": [
+ "bool birdstep_commit(int index)",
+ ""
+ ],
+ "birdstep_connect": [
+ "int birdstep_connect(string server, string user, string pass)",
+ ""
+ ],
+ "birdstep_exec": [
+ "int birdstep_exec(int index, string exec_str)",
+ ""
+ ],
+ "birdstep_fetch": [
+ "bool birdstep_fetch(int index)",
+ ""
+ ],
+ "birdstep_fieldname": [
+ "string birdstep_fieldname(int index, int col)",
+ ""
+ ],
+ "birdstep_fieldnum": [
+ "int birdstep_fieldnum(int index)",
+ ""
+ ],
+ "birdstep_freeresult": [
+ "bool birdstep_freeresult(int index)",
+ ""
+ ],
+ "birdstep_off_autocommit": [
+ "bool birdstep_off_autocommit(int index)",
+ ""
+ ],
+ "birdstep_result": [
+ "mixed birdstep_result(int index, mixed col)",
+ ""
+ ],
+ "birdstep_rollback": [
+ "bool birdstep_rollback(int index)",
+ ""
+ ],
+ "bzcompress": [
+ "string bzcompress(string source [, int blocksize100k [, int workfactor]])",
+ "Compresses a string into BZip2 encoded data"
+ ],
+ "bzdecompress": [
+ "string bzdecompress(string source [, int small])",
+ "Decompresses BZip2 compressed data"
+ ],
+ "bzerrno": [
+ "int bzerrno(resource bz)",
+ "Returns the error number"
+ ],
+ "bzerror": [
+ "array bzerror(resource bz)",
+ "Returns the error number and error string in an associative array"
+ ],
+ "bzerrstr": [
+ "string bzerrstr(resource bz)",
+ "Returns the error string"
+ ],
+ "bzopen": [
+ "resource bzopen(string|int file|fp, string mode)",
+ "Opens a new BZip2 stream"
+ ],
+ "bzread": [
+ "string bzread(resource bz[, int length])",
+ "Reads up to length bytes from a BZip2 stream, or 1024 bytes if length is not specified"
+ ],
+ "cal_days_in_month": [
+ "int cal_days_in_month(int calendar, int month, int year)",
+ "Returns the number of days in a month for a given year and calendar"
+ ],
+ "cal_from_jd": [
+ "array cal_from_jd(int jd, int calendar)",
+ "Converts from Julian Day Count to a supported calendar and return extended information"
+ ],
+ "cal_info": [
+ "array cal_info([int calendar])",
+ "Returns information about a particular calendar"
+ ],
+ "cal_to_jd": [
+ "int cal_to_jd(int calendar, int month, int day, int year)",
+ "Converts from a supported calendar to Julian Day Count"
+ ],
+ "call_user_func": [
+ "mixed call_user_func(mixed function_name [, mixed parmeter] [, mixed ...])",
+ "Call a user function which is the first parameter"
+ ],
+ "call_user_func_array": [
+ "mixed call_user_func_array(string function_name, array parameters)",
+ "Call a user function which is the first parameter with the arguments contained in array"
+ ],
+ "call_user_method": [
+ "mixed call_user_method(string method_name, mixed object [, mixed parameter] [, mixed ...])",
+ "Call a user method on a specific object or class"
+ ],
+ "call_user_method_array": [
+ "mixed call_user_method_array(string method_name, mixed object, array params)",
+ "Call a user method on a specific object or class using a parameter array"
+ ],
+ "ceil": [
+ "float ceil(float number)",
+ "Returns the next highest integer value of the number"
+ ],
+ "chdir": [
+ "bool chdir(string directory)",
+ "Change the current directory"
+ ],
+ "checkdate": [
+ "bool checkdate(int month, int day, int year)",
+ "Returns true(1) if it is a valid date in gregorian calendar"
+ ],
+ "chgrp": [
+ "bool chgrp(string filename, mixed group)",
+ "Change file group"
+ ],
+ "chmod": [
+ "bool chmod(string filename, int mode)",
+ "Change file mode"
+ ],
+ "chown": [
+ "bool chown (string filename, mixed user)",
+ "Change file owner"
+ ],
+ "chr": [
+ "string chr(int ascii)",
+ "Converts ASCII code to a character"
+ ],
+ "chroot": [
+ "bool chroot(string directory)",
+ "Change root directory"
+ ],
+ "chunk_split": [
+ "string chunk_split(string str [, int chunklen [, string ending]])",
+ "Returns split line"
+ ],
+ "class_alias": [
+ "bool class_alias(string user_class_name , string alias_name [, bool autoload])",
+ "Creates an alias for user defined class"
+ ],
+ "class_exists": [
+ "bool class_exists(string classname [, bool autoload])",
+ "Checks if the class exists"
+ ],
+ "class_implements": [
+ "array class_implements(mixed what [, bool autoload ])",
+ "Return all classes and interfaces implemented by SPL"
+ ],
+ "class_parents": [
+ "array class_parents(object instance [, boolean autoload = true])",
+ "Return an array containing the names of all parent classes"
+ ],
+ "clearstatcache": [
+ "void clearstatcache([bool clear_realpath_cache[, string filename]])",
+ "Clear file stat cache"
+ ],
+ "closedir": [
+ "void closedir([resource dir_handle])",
+ "Close directory connection identified by the dir_handle"
+ ],
+ "closelog": [
+ "bool closelog(void)",
+ "Close connection to system logger"
+ ],
+ "collator_asort": [
+ "bool collator_asort( Collator $coll, array(string) $arr )",
+ "* Sort array using specified collator, maintaining index association."
+ ],
+ "collator_compare": [
+ "int collator_compare( Collator $coll, string $str1, string $str2 )",
+ "* Compare two strings."
+ ],
+ "collator_create": [
+ "Collator collator_create( string $locale )",
+ "* Create collator."
+ ],
+ "collator_get_attribute": [
+ "int collator_get_attribute( Collator $coll, int $attr )",
+ "* Get collation attribute value."
+ ],
+ "collator_get_error_code": [
+ "int collator_get_error_code( Collator $coll )",
+ "* Get collator's last error code."
+ ],
+ "collator_get_error_message": [
+ "string collator_get_error_message( Collator $coll )",
+ "* Get text description for collator's last error code."
+ ],
+ "collator_get_locale": [
+ "string collator_get_locale( Collator $coll, int $type )",
+ "* Gets the locale name of the collator."
+ ],
+ "collator_get_sort_key": [
+ "bool collator_get_sort_key( Collator $coll, string $str )",
+ "* Get a sort key for a string from a Collator. }}}"
+ ],
+ "collator_get_strength": [
+ "int collator_get_strength(Collator coll)",
+ "* Returns the current collation strength."
+ ],
+ "collator_set_attribute": [
+ "bool collator_set_attribute( Collator $coll, int $attr, int $val )",
+ "* Set collation attribute."
+ ],
+ "collator_set_strength": [
+ "bool collator_set_strength(Collator coll, int strength)",
+ "* Set the collation strength."
+ ],
+ "collator_sort": [
+ "bool collator_sort( Collator $coll, array(string) $arr [, int $sort_flags] )",
+ "* Sort array using specified collator."
+ ],
+ "collator_sort_with_sort_keys": [
+ "bool collator_sort_with_sort_keys( Collator $coll, array(string) $arr )",
+ "* Equivalent to standard PHP sort using Collator. * Uses ICU ucol_getSortKey for performance."
+ ],
+ "com_create_guid": [
+ "string com_create_guid()",
+ "Generate a globally unique identifier (GUID)"
+ ],
+ "com_event_sink": [
+ "bool com_event_sink(object comobject, object sinkobject [, mixed sinkinterface])",
+ "Connect events from a COM object to a PHP object"
+ ],
+ "com_get_active_object": [
+ "object com_get_active_object(string progid [, int code_page ])",
+ "Returns a handle to an already running instance of a COM object"
+ ],
+ "com_load_typelib": [
+ "bool com_load_typelib(string typelib_name [, int case_insensitive])",
+ "Loads a Typelibrary and registers its constants"
+ ],
+ "com_message_pump": [
+ "bool com_message_pump([int timeoutms])",
+ "Process COM messages, sleeping for up to timeoutms milliseconds"
+ ],
+ "com_print_typeinfo": [
+ "bool com_print_typeinfo(object comobject | string typelib, string dispinterface, bool wantsink)",
+ "Print out a PHP class definition for a dispatchable interface"
+ ],
+ "compact": [
+ "array compact(mixed var_names [, mixed ...])",
+ "Creates a hash containing variables and their values"
+ ],
+ "compose_locale": [
+ "static string compose_locale($array)",
+ "* Creates a locale by combining the parts of locale-ID passed * }}}"
+ ],
+ "confirm_extname_compiled": [
+ "string confirm_extname_compiled(string arg)",
+ "Return a string to confirm that the module is compiled in"
+ ],
+ "connection_aborted": [
+ "int connection_aborted(void)",
+ "Returns true if client disconnected"
+ ],
+ "connection_status": [
+ "int connection_status(void)",
+ "Returns the connection status bitfield"
+ ],
+ "constant": [
+ "mixed constant(string const_name)",
+ "Given the name of a constant this function will return the constant's associated value"
+ ],
+ "convert_cyr_string": [
+ "string convert_cyr_string(string str, string from, string to)",
+ "Convert from one Cyrillic character set to another"
+ ],
+ "convert_uudecode": [
+ "string convert_uudecode(string data)",
+ "decode a uuencoded string"
+ ],
+ "convert_uuencode": [
+ "string convert_uuencode(string data)",
+ "uuencode a string"
+ ],
+ "copy": [
+ "bool copy(string source_file, string destination_file [, resource context])",
+ "Copy a file"
+ ],
+ "cos": [
+ "float cos(float number)",
+ "Returns the cosine of the number in radians"
+ ],
+ "cosh": [
+ "float cosh(float number)",
+ "Returns the hyperbolic cosine of the number, defined as (exp(number) + exp(-number))/2"
+ ],
+ "count": [
+ "int count(mixed var [, int mode])",
+ "Count the number of elements in a variable (usually an array)"
+ ],
+ "count_chars": [
+ "mixed count_chars(string input [, int mode])",
+ "Returns info about what characters are used in input"
+ ],
+ "crc32": [
+ "string crc32(string str)",
+ "Calculate the crc32 polynomial of a string"
+ ],
+ "create_function": [
+ "string create_function(string args, string code)",
+ "Creates an anonymous function, and returns its name (funny, eh?)"
+ ],
+ "crypt": [
+ "string crypt(string str [, string salt])",
+ "Hash a string"
+ ],
+ "ctype_alnum": [
+ "bool ctype_alnum(mixed c)",
+ "Checks for alphanumeric character(s)"
+ ],
+ "ctype_alpha": [
+ "bool ctype_alpha(mixed c)",
+ "Checks for alphabetic character(s)"
+ ],
+ "ctype_cntrl": [
+ "bool ctype_cntrl(mixed c)",
+ "Checks for control character(s)"
+ ],
+ "ctype_digit": [
+ "bool ctype_digit(mixed c)",
+ "Checks for numeric character(s)"
+ ],
+ "ctype_graph": [
+ "bool ctype_graph(mixed c)",
+ "Checks for any printable character(s) except space"
+ ],
+ "ctype_lower": [
+ "bool ctype_lower(mixed c)",
+ "Checks for lowercase character(s)"
+ ],
+ "ctype_print": [
+ "bool ctype_print(mixed c)",
+ "Checks for printable character(s)"
+ ],
+ "ctype_punct": [
+ "bool ctype_punct(mixed c)",
+ "Checks for any printable character which is not whitespace or an alphanumeric character"
+ ],
+ "ctype_space": [
+ "bool ctype_space(mixed c)",
+ "Checks for whitespace character(s)"
+ ],
+ "ctype_upper": [
+ "bool ctype_upper(mixed c)",
+ "Checks for uppercase character(s)"
+ ],
+ "ctype_xdigit": [
+ "bool ctype_xdigit(mixed c)",
+ "Checks for character(s) representing a hexadecimal digit"
+ ],
+ "curl_close": [
+ "void curl_close(resource ch)",
+ "Close a cURL session"
+ ],
+ "curl_copy_handle": [
+ "resource curl_copy_handle(resource ch)",
+ "Copy a cURL handle along with all of it's preferences"
+ ],
+ "curl_errno": [
+ "int curl_errno(resource ch)",
+ "Return an integer containing the last error number"
+ ],
+ "curl_error": [
+ "string curl_error(resource ch)",
+ "Return a string contain the last error for the current session"
+ ],
+ "curl_exec": [
+ "bool curl_exec(resource ch)",
+ "Perform a cURL session"
+ ],
+ "curl_getinfo": [
+ "mixed curl_getinfo(resource ch [, int option])",
+ "Get information regarding a specific transfer"
+ ],
+ "curl_init": [
+ "resource curl_init([string url])",
+ "Initialize a cURL session"
+ ],
+ "curl_multi_add_handle": [
+ "int curl_multi_add_handle(resource mh, resource ch)",
+ "Add a normal cURL handle to a cURL multi handle"
+ ],
+ "curl_multi_close": [
+ "void curl_multi_close(resource mh)",
+ "Close a set of cURL handles"
+ ],
+ "curl_multi_exec": [
+ "int curl_multi_exec(resource mh, int &still_running)",
+ "Run the sub-connections of the current cURL handle"
+ ],
+ "curl_multi_getcontent": [
+ "string curl_multi_getcontent(resource ch)",
+ "Return the content of a cURL handle if CURLOPT_RETURNTRANSFER is set"
+ ],
+ "curl_multi_info_read": [
+ "array curl_multi_info_read(resource mh [, long msgs_in_queue])",
+ "Get information about the current transfers"
+ ],
+ "curl_multi_init": [
+ "resource curl_multi_init(void)",
+ "Returns a new cURL multi handle"
+ ],
+ "curl_multi_remove_handle": [
+ "int curl_multi_remove_handle(resource mh, resource ch)",
+ "Remove a multi handle from a set of cURL handles"
+ ],
+ "curl_multi_select": [
+ "int curl_multi_select(resource mh[, double timeout])",
+ "Get all the sockets associated with the cURL extension, which can then be \"selected\""
+ ],
+ "curl_setopt": [
+ "bool curl_setopt(resource ch, int option, mixed value)",
+ "Set an option for a cURL transfer"
+ ],
+ "curl_setopt_array": [
+ "bool curl_setopt_array(resource ch, array options)",
+ "Set an array of option for a cURL transfer"
+ ],
+ "curl_version": [
+ "array curl_version([int version])",
+ "Return cURL version information."
+ ],
+ "current": [
+ "mixed current(array array_arg)",
+ "Return the element currently pointed to by the internal array pointer"
+ ],
+ "date": [
+ "string date(string format [, long timestamp])",
+ "Format a local date/time"
+ ],
+ "date_add": [
+ "DateTime date_add(DateTime object, DateInterval interval)",
+ "Adds an interval to the current date in object."
+ ],
+ "date_create": [
+ "DateTime date_create([string time[, DateTimeZone object]])",
+ "Returns new DateTime object"
+ ],
+ "date_create_from_format": [
+ "DateTime date_create_from_format(string format, string time[, DateTimeZone object])",
+ "Returns new DateTime object formatted according to the specified format"
+ ],
+ "date_date_set": [
+ "DateTime date_date_set(DateTime object, long year, long month, long day)",
+ "Sets the date."
+ ],
+ "date_default_timezone_get": [
+ "string date_default_timezone_get()",
+ "Gets the default timezone used by all date/time functions in a script"
+ ],
+ "date_default_timezone_set": [
+ "bool date_default_timezone_set(string timezone_identifier)",
+ "Sets the default timezone used by all date/time functions in a script"
+ ],
+ "date_diff": [
+ "DateInterval date_diff(DateTime object [, bool absolute])",
+ "Returns the difference between two DateTime objects."
+ ],
+ "date_format": [
+ "string date_format(DateTime object, string format)",
+ "Returns date formatted according to given format"
+ ],
+ "date_get_last_errors": [
+ "array date_get_last_errors()",
+ "Returns the warnings and errors found while parsing a date/time string."
+ ],
+ "date_interval_create_from_date_string": [
+ "DateInterval date_interval_create_from_date_string(string time)",
+ "Uses the normal date parsers and sets up a DateInterval from the relative parts of the parsed string"
+ ],
+ "date_interval_format": [
+ "string date_interval_format(DateInterval object, string format)",
+ "Formats the interval."
+ ],
+ "date_isodate_set": [
+ "DateTime date_isodate_set(DateTime object, long year, long week[, long day])",
+ "Sets the ISO date."
+ ],
+ "date_modify": [
+ "DateTime date_modify(DateTime object, string modify)",
+ "Alters the timestamp."
+ ],
+ "date_offset_get": [
+ "long date_offset_get(DateTime object)",
+ "Returns the DST offset."
+ ],
+ "date_parse": [
+ "array date_parse(string date)",
+ "Returns associative array with detailed info about given date"
+ ],
+ "date_parse_from_format": [
+ "array date_parse_from_format(string format, string date)",
+ "Returns associative array with detailed info about given date"
+ ],
+ "date_sub": [
+ "DateTime date_sub(DateTime object, DateInterval interval)",
+ "Subtracts an interval to the current date in object."
+ ],
+ "date_sun_info": [
+ "array date_sun_info(long time, float latitude, float longitude)",
+ "Returns an array with information about sun set/rise and twilight begin/end"
+ ],
+ "date_sunrise": [
+ "mixed date_sunrise(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])",
+ "Returns time of sunrise for a given day and location"
+ ],
+ "date_sunset": [
+ "mixed date_sunset(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])",
+ "Returns time of sunset for a given day and location"
+ ],
+ "date_time_set": [
+ "DateTime date_time_set(DateTime object, long hour, long minute[, long second])",
+ "Sets the time."
+ ],
+ "date_timestamp_get": [
+ "long date_timestamp_get(DateTime object)",
+ "Gets the Unix timestamp."
+ ],
+ "date_timestamp_set": [
+ "DateTime date_timestamp_set(DateTime object, long unixTimestamp)",
+ "Sets the date and time based on an Unix timestamp."
+ ],
+ "date_timezone_get": [
+ "DateTimeZone date_timezone_get(DateTime object)",
+ "Return new DateTimeZone object relative to give DateTime"
+ ],
+ "date_timezone_set": [
+ "DateTime date_timezone_set(DateTime object, DateTimeZone object)",
+ "Sets the timezone for the DateTime object."
+ ],
+ "datefmt_create": [
+ "IntlDateFormatter datefmt_create(string $locale, long date_type, long time_type[, string $timezone_str, long $calendar, string $pattern] )",
+ "* Create formatter."
+ ],
+ "datefmt_format": [
+ "string datefmt_format( [mixed]int $args or array $args )",
+ "* Format the time value as a string. }}}"
+ ],
+ "datefmt_get_calendar": [
+ "string datefmt_get_calendar( IntlDateFormatter $mf )",
+ "* Get formatter calendar."
+ ],
+ "datefmt_get_datetype": [
+ "string datefmt_get_datetype( IntlDateFormatter $mf )",
+ "* Get formatter datetype."
+ ],
+ "datefmt_get_error_code": [
+ "int datefmt_get_error_code( IntlDateFormatter $nf )",
+ "* Get formatter's last error code."
+ ],
+ "datefmt_get_error_message": [
+ "string datefmt_get_error_message( IntlDateFormatter $coll )",
+ "* Get text description for formatter's last error code."
+ ],
+ "datefmt_get_locale": [
+ "string datefmt_get_locale(IntlDateFormatter $mf)",
+ "* Get formatter locale."
+ ],
+ "datefmt_get_pattern": [
+ "string datefmt_get_pattern( IntlDateFormatter $mf )",
+ "* Get formatter pattern."
+ ],
+ "datefmt_get_timetype": [
+ "string datefmt_get_timetype( IntlDateFormatter $mf )",
+ "* Get formatter timetype."
+ ],
+ "datefmt_get_timezone_id": [
+ "string datefmt_get_timezone_id( IntlDateFormatter $mf )",
+ "* Get formatter timezone_id."
+ ],
+ "datefmt_isLenient": [
+ "string datefmt_isLenient(IntlDateFormatter $mf)",
+ "* Get formatter locale."
+ ],
+ "datefmt_localtime": [
+ "integer datefmt_localtime( IntlDateFormatter $fmt, string $text_to_parse[, int $parse_pos ])",
+ "* Parse the string $value to a localtime array }}}"
+ ],
+ "datefmt_parse": [
+ "integer datefmt_parse( IntlDateFormatter $fmt, string $text_to_parse [, int $parse_pos] )",
+ "* Parse the string $value starting at parse_pos to a Unix timestamp -int }}}"
+ ],
+ "datefmt_setLenient": [
+ "string datefmt_setLenient(IntlDateFormatter $mf)",
+ "* Set formatter lenient."
+ ],
+ "datefmt_set_calendar": [
+ "bool datefmt_set_calendar( IntlDateFormatter $mf, int $calendar )",
+ "* Set formatter calendar."
+ ],
+ "datefmt_set_pattern": [
+ "bool datefmt_set_pattern( IntlDateFormatter $mf, string $pattern )",
+ "* Set formatter pattern."
+ ],
+ "datefmt_set_timezone_id": [
+ "boolean datefmt_set_timezone_id( IntlDateFormatter $mf,$timezone_id)",
+ "* Set formatter timezone_id."
+ ],
+ "dba_close": [
+ "void dba_close(resource handle)",
+ "Closes database"
+ ],
+ "dba_delete": [
+ "bool dba_delete(string key, resource handle)",
+ "Deletes the entry associated with key If inifile: remove all other key lines"
+ ],
+ "dba_exists": [
+ "bool dba_exists(string key, resource handle)",
+ "Checks, if the specified key exists"
+ ],
+ "dba_fetch": [
+ "string dba_fetch(string key, [int skip ,] resource handle)",
+ "Fetches the data associated with key"
+ ],
+ "dba_firstkey": [
+ "string dba_firstkey(resource handle)",
+ "Resets the internal key pointer and returns the first key"
+ ],
+ "dba_handlers": [
+ "array dba_handlers([bool full_info])",
+ "List configured database handlers"
+ ],
+ "dba_insert": [
+ "bool dba_insert(string key, string value, resource handle)",
+ "If not inifile: Insert value as key, return false, if key exists already If inifile: Add vakue as key (next instance of key)"
+ ],
+ "dba_key_split": [
+ "array|false dba_key_split(string key)",
+ "Splits an inifile key into an array of the form array(0=>group,1=>value_name) but returns false if input is false or null"
+ ],
+ "dba_list": [
+ "array dba_list()",
+ "List opened databases"
+ ],
+ "dba_nextkey": [
+ "string dba_nextkey(resource handle)",
+ "Returns the next key"
+ ],
+ "dba_open": [
+ "resource dba_open(string path, string mode [, string handlername, string ...])",
+ "Opens path using the specified handler in mode"
+ ],
+ "dba_optimize": [
+ "bool dba_optimize(resource handle)",
+ "Optimizes (e.g. clean up, vacuum) database"
+ ],
+ "dba_popen": [
+ "resource dba_popen(string path, string mode [, string handlername, string ...])",
+ "Opens path using the specified handler in mode persistently"
+ ],
+ "dba_replace": [
+ "bool dba_replace(string key, string value, resource handle)",
+ "Inserts value as key, replaces key, if key exists already If inifile: remove all other key lines"
+ ],
+ "dba_sync": [
+ "bool dba_sync(resource handle)",
+ "Synchronizes database"
+ ],
+ "dcgettext": [
+ "string dcgettext(string domain_name, string msgid, long category)",
+ "Return the translation of msgid for domain_name and category, or msgid unaltered if a translation does not exist"
+ ],
+ "dcngettext": [
+ "string dcngettext (string domain, string msgid1, string msgid2, int n, int category)",
+ "Plural version of dcgettext()"
+ ],
+ "debug_backtrace": [
+ "array debug_backtrace([bool provide_object])",
+ "Return backtrace as array"
+ ],
+ "debug_print_backtrace": [
+ "void debug_print_backtrace(void) */",
+ "ZEND_FUNCTION(debug_print_backtrace) { zend_execute_data *ptr, *skip; int lineno; char *function_name; char *filename; char *class_name = NULL; char *call_type; char *include_filename = NULL; zval *arg_array = NULL; int indent = 0; if (zend_parse_parameters_none() == FAILURE) { return; } ptr = EG(current_execute_data);",
+ "PHP_FUNCTION(dom_document_relaxNG_validate_file) { _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE); } /* }}} end dom_document_relaxNG_validate_file"
+ ],
+ "dom_document_relaxNG_validate_xml": [
+ "boolean dom_document_relaxNG_validate_xml(string source); */",
+ "PHP_FUNCTION(dom_document_relaxNG_validate_xml) { _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING); } /* }}} end dom_document_relaxNG_validate_xml"
+ ],
+ "dom_document_rename_node": [
+ "DOMNode dom_document_rename_node(node n, string namespaceURI, string qualifiedName);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-renameNode Since: DOM Level 3"
+ ],
+ "dom_document_save": [
+ "int dom_document_save(string file);",
+ "Convenience method to save to file"
+ ],
+ "dom_document_save_html": [
+ "string dom_document_save_html();",
+ "Convenience method to output as html"
+ ],
+ "dom_document_save_html_file": [
+ "int dom_document_save_html_file(string file);",
+ "Convenience method to save to file as html"
+ ],
+ "dom_document_savexml": [
+ "string dom_document_savexml([node n]);",
+ "URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-saveXML Since: DOM Level 3"
+ ],
+ "dom_document_schema_validate": [
+ "boolean dom_document_schema_validate(string source); */",
+ "PHP_FUNCTION(dom_document_schema_validate_xml) { _dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING); } /* }}} end dom_document_schema_validate"
+ ],
+ "dom_document_schema_validate_file": [
+ "boolean dom_document_schema_validate_file(string filename); */",
+ "PHP_FUNCTION(dom_document_schema_validate_file) { _dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE); } /* }}} end dom_document_schema_validate_file"
+ ],
+ "dom_document_validate": [
+ "boolean dom_document_validate();",
+ "Since: DOM extended"
+ ],
+ "dom_document_xinclude": [
+ "int dom_document_xinclude([int options])",
+ "Substitutues xincludes in a DomDocument"
+ ],
+ "dom_domconfiguration_can_set_parameter": [
+ "boolean dom_domconfiguration_can_set_parameter(string name, domuserdata value);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-canSetParameter Since:"
+ ],
+ "dom_domconfiguration_get_parameter": [
+ "domdomuserdata dom_domconfiguration_get_parameter(string name);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-getParameter Since:"
+ ],
+ "dom_domconfiguration_set_parameter": [
+ "dom_void dom_domconfiguration_set_parameter(string name, domuserdata value);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-property Since:"
+ ],
+ "dom_domerrorhandler_handle_error": [
+ "dom_boolean dom_domerrorhandler_handle_error(domerror error);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-ERRORS-DOMErrorHandler-handleError Since:"
+ ],
+ "dom_domimplementation_create_document": [
+ "DOMDocument dom_domimplementation_create_document(string namespaceURI, string qualifiedName, DOMDocumentType doctype);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocument Since: DOM Level 2"
+ ],
+ "dom_domimplementation_create_document_type": [
+ "DOMDocumentType dom_domimplementation_create_document_type(string qualifiedName, string publicId, string systemId);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocType Since: DOM Level 2"
+ ],
+ "dom_domimplementation_get_feature": [
+ "DOMNode dom_domimplementation_get_feature(string feature, string version);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementation3-getFeature Since: DOM Level 3"
+ ],
+ "dom_domimplementation_has_feature": [
+ "boolean dom_domimplementation_has_feature(string feature, string version);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-5CED94D7 Since:"
+ ],
+ "dom_domimplementationlist_item": [
+ "domdomimplementation dom_domimplementationlist_item(int index);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementationList-item Since:"
+ ],
+ "dom_domimplementationsource_get_domimplementation": [
+ "domdomimplementation dom_domimplementationsource_get_domimplementation(string features);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-getDOMImpl Since:"
+ ],
+ "dom_domimplementationsource_get_domimplementations": [
+ "domimplementationlist dom_domimplementationsource_get_domimplementations(string features);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-getDOMImpls Since:"
+ ],
+ "dom_domstringlist_item": [
+ "domstring dom_domstringlist_item(int index);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMStringList-item Since:"
+ ],
+ "dom_element_get_attribute": [
+ "string dom_element_get_attribute(string name);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-666EE0F9 Since:"
+ ],
+ "dom_element_get_attribute_node": [
+ "DOMAttr dom_element_get_attribute_node(string name);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-217A91B8 Since:"
+ ],
+ "dom_element_get_attribute_node_ns": [
+ "DOMAttr dom_element_get_attribute_node_ns(string namespaceURI, string localName);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElGetAtNodeNS Since: DOM Level 2"
+ ],
+ "dom_element_get_attribute_ns": [
+ "string dom_element_get_attribute_ns(string namespaceURI, string localName);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElGetAttrNS Since: DOM Level 2"
+ ],
+ "dom_element_get_elements_by_tag_name": [
+ "DOMNodeList dom_element_get_elements_by_tag_name(string name);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1938918D Since:"
+ ],
+ "dom_element_get_elements_by_tag_name_ns": [
+ "DOMNodeList dom_element_get_elements_by_tag_name_ns(string namespaceURI, string localName);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-A6C90942 Since: DOM Level 2"
+ ],
+ "dom_element_has_attribute": [
+ "boolean dom_element_has_attribute(string name);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElHasAttr Since: DOM Level 2"
+ ],
+ "dom_element_has_attribute_ns": [
+ "boolean dom_element_has_attribute_ns(string namespaceURI, string localName);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElHasAttrNS Since: DOM Level 2"
+ ],
+ "dom_element_remove_attribute": [
+ "void dom_element_remove_attribute(string name);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-6D6AC0F9 Since:"
+ ],
+ "dom_element_remove_attribute_node": [
+ "DOMAttr dom_element_remove_attribute_node(DOMAttr oldAttr);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D589198 Since:"
+ ],
+ "dom_element_remove_attribute_ns": [
+ "void dom_element_remove_attribute_ns(string namespaceURI, string localName);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElRemAtNS Since: DOM Level 2"
+ ],
+ "dom_element_set_attribute": [
+ "void dom_element_set_attribute(string name, string value);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-F68F082 Since:"
+ ],
+ "dom_element_set_attribute_node": [
+ "DOMAttr dom_element_set_attribute_node(DOMAttr newAttr);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-887236154 Since:"
+ ],
+ "dom_element_set_attribute_node_ns": [
+ "DOMAttr dom_element_set_attribute_node_ns(DOMAttr newAttr);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetAtNodeNS Since: DOM Level 2"
+ ],
+ "dom_element_set_attribute_ns": [
+ "void dom_element_set_attribute_ns(string namespaceURI, string qualifiedName, string value);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetAttrNS Since: DOM Level 2"
+ ],
+ "dom_element_set_id_attribute": [
+ "void dom_element_set_id_attribute(string name, boolean isId);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttr Since: DOM Level 3"
+ ],
+ "dom_element_set_id_attribute_node": [
+ "void dom_element_set_id_attribute_node(attr idAttr, boolean isId);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttrNode Since: DOM Level 3"
+ ],
+ "dom_element_set_id_attribute_ns": [
+ "void dom_element_set_id_attribute_ns(string namespaceURI, string localName, boolean isId);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttrNS Since: DOM Level 3"
+ ],
+ "dom_import_simplexml": [
+ "somNode dom_import_simplexml(sxeobject node)",
+ "Get a simplexml_element object from dom to allow for processing"
+ ],
+ "dom_namednodemap_get_named_item": [
+ "DOMNode dom_namednodemap_get_named_item(string name);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1074577549 Since:"
+ ],
+ "dom_namednodemap_get_named_item_ns": [
+ "DOMNode dom_namednodemap_get_named_item_ns(string namespaceURI, string localName);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-getNamedItemNS Since: DOM Level 2"
+ ],
+ "dom_namednodemap_item": [
+ "DOMNode dom_namednodemap_item(int index);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-349467F9 Since:"
+ ],
+ "dom_namednodemap_remove_named_item": [
+ "DOMNode dom_namednodemap_remove_named_item(string name);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D58B193 Since:"
+ ],
+ "dom_namednodemap_remove_named_item_ns": [
+ "DOMNode dom_namednodemap_remove_named_item_ns(string namespaceURI, string localName);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-removeNamedItemNS Since: DOM Level 2"
+ ],
+ "dom_namednodemap_set_named_item": [
+ "DOMNode dom_namednodemap_set_named_item(DOMNode arg);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1025163788 Since:"
+ ],
+ "dom_namednodemap_set_named_item_ns": [
+ "DOMNode dom_namednodemap_set_named_item_ns(DOMNode arg);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-setNamedItemNS Since: DOM Level 2"
+ ],
+ "dom_namelist_get_name": [
+ "string dom_namelist_get_name(int index);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#NameList-getName Since:"
+ ],
+ "dom_namelist_get_namespace_uri": [
+ "string dom_namelist_get_namespace_uri(int index);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#NameList-getNamespaceURI Since:"
+ ],
+ "dom_node_append_child": [
+ "DomNode dom_node_append_child(DomNode newChild);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-184E7107 Since:"
+ ],
+ "dom_node_clone_node": [
+ "DomNode dom_node_clone_node(boolean deep);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-3A0ED0A4 Since:"
+ ],
+ "dom_node_compare_document_position": [
+ "short dom_node_compare_document_position(DomNode other);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-compareDocumentPosition Since: DOM Level 3"
+ ],
+ "dom_node_get_feature": [
+ "DomNode dom_node_get_feature(string feature, string version);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getFeature Since: DOM Level 3"
+ ],
+ "dom_node_get_user_data": [
+ "mixed dom_node_get_user_data(string key);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getUserData Since: DOM Level 3"
+ ],
+ "dom_node_has_attributes": [
+ "boolean dom_node_has_attributes();",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-NodeHasAttrs Since: DOM Level 2"
+ ],
+ "dom_node_has_child_nodes": [
+ "boolean dom_node_has_child_nodes();",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-810594187 Since:"
+ ],
+ "dom_node_insert_before": [
+ "domnode dom_node_insert_before(DomNode newChild, DomNode refChild);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-952280727 Since:"
+ ],
+ "dom_node_is_default_namespace": [
+ "boolean dom_node_is_default_namespace(string namespaceURI);",
+ "URL: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isDefaultNamespace Since: DOM Level 3"
+ ],
+ "dom_node_is_equal_node": [
+ "boolean dom_node_is_equal_node(DomNode arg);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-isEqualNode Since: DOM Level 3"
+ ],
+ "dom_node_is_same_node": [
+ "boolean dom_node_is_same_node(DomNode other);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-isSameNode Since: DOM Level 3"
+ ],
+ "dom_node_is_supported": [
+ "boolean dom_node_is_supported(string feature, string version);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Level-2-Core-Node-supports Since: DOM Level 2"
+ ],
+ "dom_node_lookup_namespace_uri": [
+ "string dom_node_lookup_namespace_uri(string prefix);",
+ "URL: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespaceURI Since: DOM Level 3"
+ ],
+ "dom_node_lookup_prefix": [
+ "string dom_node_lookup_prefix(string namespaceURI);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-lookupNamespacePrefix Since: DOM Level 3"
+ ],
+ "dom_node_normalize": [
+ "void dom_node_normalize();",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-normalize Since:"
+ ],
+ "dom_node_remove_child": [
+ "DomNode dom_node_remove_child(DomNode oldChild);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1734834066 Since:"
+ ],
+ "dom_node_replace_child": [
+ "DomNode dom_node_replace_child(DomNode newChild, DomNode oldChild);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-785887307 Since:"
+ ],
+ "dom_node_set_user_data": [
+ "mixed dom_node_set_user_data(string key, mixed data, userdatahandler handler);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-setUserData Since: DOM Level 3"
+ ],
+ "dom_nodelist_item": [
+ "DOMNode dom_nodelist_item(int index);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-844377136 Since:"
+ ],
+ "dom_string_extend_find_offset16": [
+ "int dom_string_extend_find_offset16(int offset32);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#i18n-methods-StringExtend-findOffset16 Since:"
+ ],
+ "dom_string_extend_find_offset32": [
+ "int dom_string_extend_find_offset32(int offset16);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#i18n-methods-StringExtend-findOffset32 Since:"
+ ],
+ "dom_text_is_whitespace_in_element_content": [
+ "boolean dom_text_is_whitespace_in_element_content();",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Text3-isWhitespaceInElementContent Since: DOM Level 3"
+ ],
+ "dom_text_replace_whole_text": [
+ "DOMText dom_text_replace_whole_text(string content);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Text3-replaceWholeText Since: DOM Level 3"
+ ],
+ "dom_text_split_text": [
+ "DOMText dom_text_split_text(int offset);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-38853C1D Since:"
+ ],
+ "dom_userdatahandler_handle": [
+ "dom_void dom_userdatahandler_handle(short operation, string key, domobject data, node src, node dst);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-handleUserDataEvent Since:"
+ ],
+ "dom_xpath_evaluate": [
+ "mixed dom_xpath_evaluate(string expr [,DOMNode context]); */",
+ "PHP_FUNCTION(dom_xpath_evaluate) { php_xpath_eval(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_DOM_XPATH_EVALUATE); } /* }}} end dom_xpath_evaluate"
+ ],
+ "dom_xpath_query": [
+ "DOMNodeList dom_xpath_query(string expr [,DOMNode context]); */",
+ "PHP_FUNCTION(dom_xpath_query) { php_xpath_eval(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_DOM_XPATH_QUERY); } /* }}} end dom_xpath_query"
+ ],
+ "dom_xpath_register_ns": [
+ "boolean dom_xpath_register_ns(string prefix, string uri); */",
+ "PHP_FUNCTION(dom_xpath_register_ns) { zval *id; xmlXPathContextPtr ctxp; int prefix_len, ns_uri_len; dom_xpath_object *intern; unsigned char *prefix, *ns_uri; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), \"Oss\", &id, dom_xpath_class_entry, &prefix, &prefix_len, &ns_uri, &ns_uri_len) == FAILURE) { return; } intern = (dom_xpath_object *)zend_object_store_get_object(id TSRMLS_CC); ctxp = (xmlXPathContextPtr) intern->ptr; if (ctxp == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, \"Invalid XPath Context\"); RETURN_FALSE; } if (xmlXPathRegisterNs(ctxp, prefix, ns_uri) != 0) { RETURN_FALSE } RETURN_TRUE; } /* }}}"
+ ],
+ "dom_xpath_register_php_functions": [
+ "void dom_xpath_register_php_functions() */",
+ "PHP_FUNCTION(dom_xpath_register_php_functions) { zval *id; dom_xpath_object *intern; zval *array_value, **entry, *new_string; int name_len = 0; char *name; DOM_GET_THIS(id); if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, \"a\", &array_value) == SUCCESS) { intern = (dom_xpath_object *)zend_object_store_get_object(id TSRMLS_CC); zend_hash_internal_pointer_reset(Z_ARRVAL_P(array_value)); while (zend_hash_get_current_data(Z_ARRVAL_P(array_value), (void **)&entry) == SUCCESS) { SEPARATE_ZVAL(entry); convert_to_string_ex(entry); MAKE_STD_ZVAL(new_string); ZVAL_LONG(new_string,1); zend_hash_update(intern->registered_phpfunctions, Z_STRVAL_PP(entry), Z_STRLEN_PP(entry) + 1, &new_string, sizeof(zval*), NULL); zend_hash_move_forward(Z_ARRVAL_P(array_value)); } intern->registerPhpFunctions = 2; RETURN_TRUE; } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, \"s\", &name, &name_len) == SUCCESS) { intern = (dom_xpath_object *)zend_object_store_get_object(id TSRMLS_CC); MAKE_STD_ZVAL(new_string); ZVAL_LONG(new_string,1); zend_hash_update(intern->registered_phpfunctions, name, name_len + 1, &new_string, sizeof(zval*), NULL); intern->registerPhpFunctions = 2; } else { intern = (dom_xpath_object *)zend_object_store_get_object(id TSRMLS_CC); intern->registerPhpFunctions = 1; } } /* }}} end dom_xpath_register_php_functions"
+ ],
+ "each": [
+ "array each(array arr)",
+ "Return the currently pointed key..value pair in the passed array, and advance the pointer to the next element"
+ ],
+ "easter_date": [
+ "int easter_date([int year])",
+ "Return the timestamp of midnight on Easter of a given year (defaults to current year)"
+ ],
+ "easter_days": [
+ "int easter_days([int year, [int method]])",
+ "Return the number of days after March 21 that Easter falls on for a given year (defaults to current year)"
+ ],
+ "echo": [
+ "void echo(string arg1 [, string ...])",
+ "Output one or more strings"
+ ],
+ "empty": [
+ "bool empty( mixed var )",
+ "Determine whether a variable is empty"
+ ],
+ "enchant_broker_describe": [
+ "array enchant_broker_describe(resource broker)",
+ "Enumerates the Enchant providers and tells you some rudimentary information about them. The same info is provided through phpinfo()"
+ ],
+ "enchant_broker_dict_exists": [
+ "bool enchant_broker_dict_exists(resource broker, string tag)",
+ "Wether a dictionary exists or not. Using non-empty tag"
+ ],
+ "enchant_broker_free": [
+ "boolean enchant_broker_free(resource broker)",
+ "Destroys the broker object and its dictionnaries"
+ ],
+ "enchant_broker_free_dict": [
+ "resource enchant_broker_free_dict(resource dict)",
+ "Free the dictionary resource"
+ ],
+ "enchant_broker_get_dict_path": [
+ "string enchant_broker_get_dict_path(resource broker, int dict_type)",
+ "Get the directory path for a given backend, works with ispell and myspell"
+ ],
+ "enchant_broker_get_error": [
+ "string enchant_broker_get_error(resource broker)",
+ "Returns the last error of the broker"
+ ],
+ "enchant_broker_init": [
+ "resource enchant_broker_init()",
+ "create a new broker object capable of requesting"
+ ],
+ "enchant_broker_list_dicts": [
+ "string enchant_broker_list_dicts(resource broker)",
+ "Lists the dictionaries available for the given broker"
+ ],
+ "enchant_broker_request_dict": [
+ "resource enchant_broker_request_dict(resource broker, string tag)",
+ "create a new dictionary using tag, the non-empty language tag you wish to request a dictionary for (\"en_US\", \"de_DE\", ...)"
+ ],
+ "enchant_broker_request_pwl_dict": [
+ "resource enchant_broker_request_pwl_dict(resource broker, string filename)",
+ "creates a dictionary using a PWL file. A PWL file is personal word file one word per line. It must exist before the call."
+ ],
+ "enchant_broker_set_dict_path": [
+ "bool enchant_broker_set_dict_path(resource broker, int dict_type, string value)",
+ "Set the directory path for a given backend, works with ispell and myspell"
+ ],
+ "enchant_broker_set_ordering": [
+ "bool enchant_broker_set_ordering(resource broker, string tag, string ordering)",
+ "Declares a preference of dictionaries to use for the language described/referred to by 'tag'. The ordering is a comma delimited list of provider names. As a special exception, the \"*\" tag can be used as a language tag to declare a default ordering for any language that does not explictly declare an ordering."
+ ],
+ "enchant_dict_add_to_personal": [
+ "void enchant_dict_add_to_personal(resource dict, string word)",
+ "add 'word' to personal word list"
+ ],
+ "enchant_dict_add_to_session": [
+ "void enchant_dict_add_to_session(resource dict, string word)",
+ "add 'word' to this spell-checking session"
+ ],
+ "enchant_dict_check": [
+ "bool enchant_dict_check(resource dict, string word)",
+ "If the word is correctly spelled return true, otherwise return false"
+ ],
+ "enchant_dict_describe": [
+ "array enchant_dict_describe(resource dict)",
+ "Describes an individual dictionary 'dict'"
+ ],
+ "enchant_dict_get_error": [
+ "string enchant_dict_get_error(resource dict)",
+ "Returns the last error of the current spelling-session"
+ ],
+ "enchant_dict_is_in_session": [
+ "bool enchant_dict_is_in_session(resource dict, string word)",
+ "whether or not 'word' exists in this spelling-session"
+ ],
+ "enchant_dict_quick_check": [
+ "bool enchant_dict_quick_check(resource dict, string word [, array &suggestions])",
+ "If the word is correctly spelled return true, otherwise return false, if suggestions variable is provided, fill it with spelling alternatives."
+ ],
+ "enchant_dict_store_replacement": [
+ "void enchant_dict_store_replacement(resource dict, string mis, string cor)",
+ "add a correction for 'mis' using 'cor'. Notes that you replaced @mis with @cor, so it's possibly more likely that future occurrences of @mis will be replaced with @cor. So it might bump @cor up in the suggestion list."
+ ],
+ "enchant_dict_suggest": [
+ "array enchant_dict_suggest(resource dict, string word)",
+ "Will return a list of values if any of those pre-conditions are not met."
+ ],
+ "end": [
+ "mixed end(array array_arg)",
+ "Advances array argument's internal pointer to the last element and return it"
+ ],
+ "ereg": [
+ "int ereg(string pattern, string string [, array registers])",
+ "Regular expression match"
+ ],
+ "ereg_replace": [
+ "string ereg_replace(string pattern, string replacement, string string)",
+ "Replace regular expression"
+ ],
+ "eregi": [
+ "int eregi(string pattern, string string [, array registers])",
+ "Case-insensitive regular expression match"
+ ],
+ "eregi_replace": [
+ "string eregi_replace(string pattern, string replacement, string string)",
+ "Case insensitive replace regular expression"
+ ],
+ "error_get_last": [
+ "array error_get_last()",
+ "Get the last occurred error as associative array. Returns NULL if there hasn't been an error yet."
+ ],
+ "error_log": [
+ "bool error_log(string message [, int message_type [, string destination [, string extra_headers]]])",
+ "Send an error message somewhere"
+ ],
+ "error_reporting": [
+ "int error_reporting([int new_error_level])",
+ "Return the current error_reporting level, and if an argument was passed - change to the new level"
+ ],
+ "escapeshellarg": [
+ "string escapeshellarg(string arg)",
+ "Quote and escape an argument for use in a shell command"
+ ],
+ "escapeshellcmd": [
+ "string escapeshellcmd(string command)",
+ "Escape shell metacharacters"
+ ],
+ "exec": [
+ "string exec(string command [, array &output [, int &return_value]])",
+ "Execute an external program"
+ ],
+ "exif_imagetype": [
+ "int exif_imagetype(string imagefile)",
+ "Get the type of an image"
+ ],
+ "exif_read_data": [
+ "array exif_read_data(string filename [, sections_needed [, sub_arrays[, read_thumbnail]]])",
+ "Reads header data from the JPEG/TIFF image filename and optionally reads the internal thumbnails"
+ ],
+ "exif_tagname": [
+ "string exif_tagname(index)",
+ "Get headername for index or false if not defined"
+ ],
+ "exif_thumbnail": [
+ "string exif_thumbnail(string filename [, &width, &height [, &imagetype]])",
+ "Reads the embedded thumbnail"
+ ],
+ "exit": [
+ "void exit([mixed status])",
+ "Output a message and terminate the current script"
+ ],
+ "exp": [
+ "float exp(float number)",
+ "Returns e raised to the power of the number"
+ ],
+ "explode": [
+ "array explode(string separator, string str [, int limit])",
+ "Splits a string on string separator and return array of components. If limit is positive only limit number of components is returned. If limit is negative all components except the last abs(limit) are returned."
+ ],
+ "expm1": [
+ "float expm1(float number)",
+ "Returns exp(number) - 1, computed in a way that accurate even when the value of number is close to zero"
+ ],
+ "extension_loaded": [
+ "bool extension_loaded(string extension_name)",
+ "Returns true if the named extension is loaded"
+ ],
+ "extract": [
+ "int extract(array var_array [, int extract_type [, string prefix]])",
+ "Imports variables into symbol table from an array"
+ ],
+ "ezmlm_hash": [
+ "int ezmlm_hash(string addr)",
+ "Calculate EZMLM list hash value."
+ ],
+ "fclose": [
+ "bool fclose(resource fp)",
+ "Close an open file pointer"
+ ],
+ "feof": [
+ "bool feof(resource fp)",
+ "Test for end-of-file on a file pointer"
+ ],
+ "fflush": [
+ "bool fflush(resource fp)",
+ "Flushes output"
+ ],
+ "fgetc": [
+ "string fgetc(resource fp)",
+ "Get a character from file pointer"
+ ],
+ "fgetcsv": [
+ "array fgetcsv(resource fp [,int length [, string delimiter [, string enclosure [, string escape]]]])",
+ "Get line from file pointer and parse for CSV fields"
+ ],
+ "fgets": [
+ "string fgets(resource fp[, int length])",
+ "Get a line from file pointer"
+ ],
+ "fgetss": [
+ "string fgetss(resource fp [, int length [, string allowable_tags]])",
+ "Get a line from file pointer and strip HTML tags"
+ ],
+ "file": [
+ "array file(string filename [, int flags[, resource context]])",
+ "Read entire file into an array"
+ ],
+ "file_exists": [
+ "bool file_exists(string filename)",
+ "Returns true if filename exists"
+ ],
+ "file_get_contents": [
+ "string file_get_contents(string filename [, bool use_include_path [, resource context [, long offset [, long maxlen]]]])",
+ "Read the entire file into a string"
+ ],
+ "file_put_contents": [
+ "int file_put_contents(string file, mixed data [, int flags [, resource context]])",
+ "Write/Create a file with contents data and return the number of bytes written"
+ ],
+ "fileatime": [
+ "int fileatime(string filename)",
+ "Get last access time of file"
+ ],
+ "filectime": [
+ "int filectime(string filename)",
+ "Get inode modification time of file"
+ ],
+ "filegroup": [
+ "int filegroup(string filename)",
+ "Get file group"
+ ],
+ "fileinode": [
+ "int fileinode(string filename)",
+ "Get file inode"
+ ],
+ "filemtime": [
+ "int filemtime(string filename)",
+ "Get last modification time of file"
+ ],
+ "fileowner": [
+ "int fileowner(string filename)",
+ "Get file owner"
+ ],
+ "fileperms": [
+ "int fileperms(string filename)",
+ "Get file permissions"
+ ],
+ "filesize": [
+ "int filesize(string filename)",
+ "Get file size"
+ ],
+ "filetype": [
+ "string filetype(string filename)",
+ "Get file type"
+ ],
+ "filter_has_var": [
+ "mixed filter_has_var(constant type, string variable_name)",
+ "* Returns true if the variable with the name 'name' exists in source."
+ ],
+ "filter_input": [
+ "mixed filter_input(constant type, string variable_name [, long filter [, mixed options]])",
+ "* Returns the filtered variable 'name'* from source `type`."
+ ],
+ "filter_input_array": [
+ "mixed filter_input_array(constant type, [, mixed options]])",
+ "* Returns an array with all arguments defined in 'definition'."
+ ],
+ "filter_var": [
+ "mixed filter_var(mixed variable [, long filter [, mixed options]])",
+ "* Returns the filtered version of the vriable."
+ ],
+ "filter_var_array": [
+ "mixed filter_var_array(array data, [, mixed options]])",
+ "* Returns an array with all arguments defined in 'definition'."
+ ],
+ "finfo_buffer": [
+ "string finfo_buffer(resource finfo, char *string [, int options [, resource context]])",
+ "Return infromation about a string buffer."
+ ],
+ "finfo_close": [
+ "resource finfo_close(resource finfo)",
+ "Close fileinfo resource."
+ ],
+ "finfo_file": [
+ "string finfo_file(resource finfo, char *file_name [, int options [, resource context]])",
+ "Return information about a file."
+ ],
+ "finfo_open": [
+ "resource finfo_open([int options [, string arg]])",
+ "Create a new fileinfo resource."
+ ],
+ "finfo_set_flags": [
+ "bool finfo_set_flags(resource finfo, int options)",
+ "Set libmagic configuration options."
+ ],
+ "floatval": [
+ "float floatval(mixed var)",
+ "Get the float value of a variable"
+ ],
+ "flock": [
+ "bool flock(resource fp, int operation [, int &wouldblock])",
+ "Portable file locking"
+ ],
+ "floor": [
+ "float floor(float number)",
+ "Returns the next lowest integer value from the number"
+ ],
+ "flush": [
+ "void flush(void)",
+ "Flush the output buffer"
+ ],
+ "fmod": [
+ "float fmod(float x, float y)",
+ "Returns the remainder of dividing x by y as a float"
+ ],
+ "fnmatch": [
+ "bool fnmatch(string pattern, string filename [, int flags])",
+ "Match filename against pattern"
+ ],
+ "fopen": [
+ "resource fopen(string filename, string mode [, bool use_include_path [, resource context]])",
+ "Open a file or a URL and return a file pointer"
+ ],
+ "forward_static_call": [
+ "mixed forward_static_call(mixed function_name [, mixed parmeter] [, mixed ...])",
+ "Call a user function which is the first parameter"
+ ],
+ "fpassthru": [
+ "int fpassthru(resource fp)",
+ "Output all remaining data from a file pointer"
+ ],
+ "fprintf": [
+ "int fprintf(resource stream, string format [, mixed arg1 [, mixed ...]])",
+ "Output a formatted string into a stream"
+ ],
+ "fputcsv": [
+ "int fputcsv(resource fp, array fields [, string delimiter [, string enclosure]])",
+ "Format line as CSV and write to file pointer"
+ ],
+ "fread": [
+ "string fread(resource fp, int length)",
+ "Binary-safe file read"
+ ],
+ "frenchtojd": [
+ "int frenchtojd(int month, int day, int year)",
+ "Converts a french republic calendar date to julian day count"
+ ],
+ "fscanf": [
+ "mixed fscanf(resource stream, string format [, string ...])",
+ "Implements a mostly ANSI compatible fscanf()"
+ ],
+ "fseek": [
+ "int fseek(resource fp, int offset [, int whence])",
+ "Seek on a file pointer"
+ ],
+ "fsockopen": [
+ "resource fsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]])",
+ "Open Internet or Unix domain socket connection"
+ ],
+ "fstat": [
+ "array fstat(resource fp)",
+ "Stat() on a filehandle"
+ ],
+ "ftell": [
+ "int ftell(resource fp)",
+ "Get file pointer's read/write position"
+ ],
+ "ftok": [
+ "int ftok(string pathname, string proj)",
+ "Convert a pathname and a project identifier to a System V IPC key"
+ ],
+ "ftp_alloc": [
+ "bool ftp_alloc(resource stream, int size[, &response])",
+ "Attempt to allocate space on the remote FTP server"
+ ],
+ "ftp_cdup": [
+ "bool ftp_cdup(resource stream)",
+ "Changes to the parent directory"
+ ],
+ "ftp_chdir": [
+ "bool ftp_chdir(resource stream, string directory)",
+ "Changes directories"
+ ],
+ "ftp_chmod": [
+ "int ftp_chmod(resource stream, int mode, string filename)",
+ "Sets permissions on a file"
+ ],
+ "ftp_close": [
+ "bool ftp_close(resource stream)",
+ "Closes the FTP stream"
+ ],
+ "ftp_connect": [
+ "resource ftp_connect(string host [, int port [, int timeout]])",
+ "Opens a FTP stream"
+ ],
+ "ftp_delete": [
+ "bool ftp_delete(resource stream, string file)",
+ "Deletes a file"
+ ],
+ "ftp_exec": [
+ "bool ftp_exec(resource stream, string command)",
+ "Requests execution of a program on the FTP server"
+ ],
+ "ftp_fget": [
+ "bool ftp_fget(resource stream, resource fp, string remote_file, int mode[, int resumepos])",
+ "Retrieves a file from the FTP server and writes it to an open file"
+ ],
+ "ftp_fput": [
+ "bool ftp_fput(resource stream, string remote_file, resource fp, int mode[, int startpos])",
+ "Stores a file from an open file to the FTP server"
+ ],
+ "ftp_get": [
+ "bool ftp_get(resource stream, string local_file, string remote_file, int mode[, int resume_pos])",
+ "Retrieves a file from the FTP server and writes it to a local file"
+ ],
+ "ftp_get_option": [
+ "mixed ftp_get_option(resource stream, int option)",
+ "Gets an FTP option"
+ ],
+ "ftp_login": [
+ "bool ftp_login(resource stream, string username, string password)",
+ "Logs into the FTP server"
+ ],
+ "ftp_mdtm": [
+ "int ftp_mdtm(resource stream, string filename)",
+ "Returns the last modification time of the file, or -1 on error"
+ ],
+ "ftp_mkdir": [
+ "string ftp_mkdir(resource stream, string directory)",
+ "Creates a directory and returns the absolute path for the new directory or false on error"
+ ],
+ "ftp_nb_continue": [
+ "int ftp_nb_continue(resource stream)",
+ "Continues retrieving/sending a file nbronously"
+ ],
+ "ftp_nb_fget": [
+ "int ftp_nb_fget(resource stream, resource fp, string remote_file, int mode[, int resumepos])",
+ "Retrieves a file from the FTP server asynchronly and writes it to an open file"
+ ],
+ "ftp_nb_fput": [
+ "int ftp_nb_fput(resource stream, string remote_file, resource fp, int mode[, int startpos])",
+ "Stores a file from an open file to the FTP server nbronly"
+ ],
+ "ftp_nb_get": [
+ "int ftp_nb_get(resource stream, string local_file, string remote_file, int mode[, int resume_pos])",
+ "Retrieves a file from the FTP server nbhronly and writes it to a local file"
+ ],
+ "ftp_nb_put": [
+ "int ftp_nb_put(resource stream, string remote_file, string local_file, int mode[, int startpos])",
+ "Stores a file on the FTP server"
+ ],
+ "ftp_nlist": [
+ "array ftp_nlist(resource stream, string directory)",
+ "Returns an array of filenames in the given directory"
+ ],
+ "ftp_pasv": [
+ "bool ftp_pasv(resource stream, bool pasv)",
+ "Turns passive mode on or off"
+ ],
+ "ftp_put": [
+ "bool ftp_put(resource stream, string remote_file, string local_file, int mode[, int startpos])",
+ "Stores a file on the FTP server"
+ ],
+ "ftp_pwd": [
+ "string ftp_pwd(resource stream)",
+ "Returns the present working directory"
+ ],
+ "ftp_raw": [
+ "array ftp_raw(resource stream, string command)",
+ "Sends a literal command to the FTP server"
+ ],
+ "ftp_rawlist": [
+ "array ftp_rawlist(resource stream, string directory [, bool recursive])",
+ "Returns a detailed listing of a directory as an array of output lines"
+ ],
+ "ftp_rename": [
+ "bool ftp_rename(resource stream, string src, string dest)",
+ "Renames the given file to a new path"
+ ],
+ "ftp_rmdir": [
+ "bool ftp_rmdir(resource stream, string directory)",
+ "Removes a directory"
+ ],
+ "ftp_set_option": [
+ "bool ftp_set_option(resource stream, int option, mixed value)",
+ "Sets an FTP option"
+ ],
+ "ftp_site": [
+ "bool ftp_site(resource stream, string cmd)",
+ "Sends a SITE command to the server"
+ ],
+ "ftp_size": [
+ "int ftp_size(resource stream, string filename)",
+ "Returns the size of the file, or -1 on error"
+ ],
+ "ftp_ssl_connect": [
+ "resource ftp_ssl_connect(string host [, int port [, int timeout]])",
+ "Opens a FTP-SSL stream"
+ ],
+ "ftp_systype": [
+ "string ftp_systype(resource stream)",
+ "Returns the system type identifier"
+ ],
+ "ftruncate": [
+ "bool ftruncate(resource fp, int size)",
+ "Truncate file to 'size' length"
+ ],
+ "func_get_arg": [
+ "mixed func_get_arg(int arg_num)",
+ "Get the $arg_num'th argument that was passed to the function"
+ ],
+ "func_get_args": [
+ "array func_get_args()",
+ "Get an array of the arguments that were passed to the function"
+ ],
+ "func_num_args": [
+ "int func_num_args(void)",
+ "Get the number of arguments that were passed to the function"
+ ],
+ "function_exists": [
+ "bool function_exists(string function_name)",
+ "Checks if the function exists"
+ ],
+ "fwrite": [
+ "int fwrite(resource fp, string str [, int length])",
+ "Binary-safe file write"
+ ],
+ "gc_collect_cycles": [
+ "int gc_collect_cycles(void)",
+ "Forces collection of any existing garbage cycles. Returns number of freed zvals"
+ ],
+ "gc_disable": [
+ "void gc_disable(void)",
+ "Deactivates the circular reference collector"
+ ],
+ "gc_enable": [
+ "void gc_enable(void)",
+ "Activates the circular reference collector"
+ ],
+ "gc_enabled": [
+ "void gc_enabled(void)",
+ "Returns status of the circular reference collector"
+ ],
+ "gd_info": [
+ "array gd_info()",
+ ""
+ ],
+ "getKeywords": [
+ "static array getKeywords(string $locale) {",
+ "* return an associative array containing keyword-value * pairs for this locale. The keys are keys to the array (doh!) * }}}"
+ ],
+ "get_browser": [
+ "mixed get_browser([string browser_name [, bool return_array]])",
+ "Get information about the capabilities of a browser. If browser_name is omitted or null, HTTP_USER_AGENT is used. Returns an object by default; if return_array is true, returns an array."
+ ],
+ "get_called_class": [
+ "string get_called_class()",
+ "Retrieves the \"Late Static Binding\" class name"
+ ],
+ "get_cfg_var": [
+ "mixed get_cfg_var(string option_name)",
+ "Get the value of a PHP configuration option"
+ ],
+ "get_class": [
+ "string get_class([object object])",
+ "Retrieves the class name"
+ ],
+ "get_class_methods": [
+ "array get_class_methods(mixed class)",
+ "Returns an array of method names for class or class instance."
+ ],
+ "get_class_vars": [
+ "array get_class_vars(string class_name)",
+ "Returns an array of default properties of the class."
+ ],
+ "get_current_user": [
+ "string get_current_user(void)",
+ "Get the name of the owner of the current PHP script"
+ ],
+ "get_declared_classes": [
+ "array get_declared_classes()",
+ "Returns an array of all declared classes."
+ ],
+ "get_declared_interfaces": [
+ "array get_declared_interfaces()",
+ "Returns an array of all declared interfaces."
+ ],
+ "get_defined_constants": [
+ "array get_defined_constants([bool categorize])",
+ "Return an array containing the names and values of all defined constants"
+ ],
+ "get_defined_functions": [
+ "array get_defined_functions(void)",
+ "Returns an array of all defined functions"
+ ],
+ "get_defined_vars": [
+ "array get_defined_vars(void)",
+ "Returns an associative array of names and values of all currently defined variable names (variables in the current scope)"
+ ],
+ "get_display_language": [
+ "static string get_display_language($locale[, $in_locale = null])",
+ "* gets the language for the $locale in $in_locale or default_locale"
+ ],
+ "get_display_name": [
+ "static string get_display_name($locale[, $in_locale = null])",
+ "* gets the name for the $locale in $in_locale or default_locale"
+ ],
+ "get_display_region": [
+ "static string get_display_region($locale, $in_locale = null)",
+ "* gets the region for the $locale in $in_locale or default_locale"
+ ],
+ "get_display_script": [
+ "static string get_display_script($locale, $in_locale = null)",
+ "* gets the script for the $locale in $in_locale or default_locale"
+ ],
+ "get_extension_funcs": [
+ "array get_extension_funcs(string extension_name)",
+ "Returns an array with the names of functions belonging to the named extension"
+ ],
+ "get_headers": [
+ "array get_headers(string url[, int format])",
+ "fetches all the headers sent by the server in response to a HTTP request"
+ ],
+ "get_html_translation_table": [
+ "array get_html_translation_table([int table [, int quote_style]])",
+ "Returns the internal translation table used by htmlspecialchars and htmlentities"
+ ],
+ "get_include_path": [
+ "string get_include_path()",
+ "Get the current include_path configuration option"
+ ],
+ "get_included_files": [
+ "array get_included_files(void)",
+ "Returns an array with the file names that were include_once()'d"
+ ],
+ "get_loaded_extensions": [
+ "array get_loaded_extensions([bool zend_extensions])",
+ "Return an array containing names of loaded extensions"
+ ],
+ "get_magic_quotes_gpc": [
+ "int get_magic_quotes_gpc(void)",
+ "Get the current active configuration setting of magic_quotes_gpc"
+ ],
+ "get_magic_quotes_runtime": [
+ "int get_magic_quotes_runtime(void)",
+ "Get the current active configuration setting of magic_quotes_runtime"
+ ],
+ "get_meta_tags": [
+ "array get_meta_tags(string filename [, bool use_include_path])",
+ "Extracts all meta tag content attributes from a file and returns an array"
+ ],
+ "get_object_vars": [
+ "array get_object_vars(object obj)",
+ "Returns an array of object properties"
+ ],
+ "get_parent_class": [
+ "string get_parent_class([mixed object])",
+ "Retrieves the parent class name for object or class or current scope."
+ ],
+ "get_resource_type": [
+ "string get_resource_type(resource res)",
+ "Get the resource type name for a given resource"
+ ],
+ "getallheaders": [
+ "array getallheaders(void)",
+ ""
+ ],
+ "getcwd": [
+ "mixed getcwd(void)",
+ "Gets the current directory"
+ ],
+ "getdate": [
+ "array getdate([int timestamp])",
+ "Get date/time information"
+ ],
+ "getenv": [
+ "string getenv(string varname)",
+ "Get the value of an environment variable"
+ ],
+ "gethostbyaddr": [
+ "string gethostbyaddr(string ip_address)",
+ "Get the Internet host name corresponding to a given IP address"
+ ],
+ "gethostbyname": [
+ "string gethostbyname(string hostname)",
+ "Get the IP address corresponding to a given Internet host name"
+ ],
+ "gethostbynamel": [
+ "array gethostbynamel(string hostname)",
+ "Return a list of IP addresses that a given hostname resolves to."
+ ],
+ "gethostname": [
+ "string gethostname()",
+ "Get the host name of the current machine"
+ ],
+ "getimagesize": [
+ "array getimagesize(string imagefile [, array info])",
+ "Get the size of an image as 4-element array"
+ ],
+ "getlastmod": [
+ "int getlastmod(void)",
+ "Get time of last page modification"
+ ],
+ "getmygid": [
+ "int getmygid(void)",
+ "Get PHP script owner's GID"
+ ],
+ "getmyinode": [
+ "int getmyinode(void)",
+ "Get the inode of the current script being parsed"
+ ],
+ "getmypid": [
+ "int getmypid(void)",
+ "Get current process ID"
+ ],
+ "getmyuid": [
+ "int getmyuid(void)",
+ "Get PHP script owner's UID"
+ ],
+ "getopt": [
+ "array getopt(string options [, array longopts])",
+ "Get options from the command line argument list"
+ ],
+ "getprotobyname": [
+ "int getprotobyname(string name)",
+ "Returns protocol number associated with name as per /etc/protocols"
+ ],
+ "getprotobynumber": [
+ "string getprotobynumber(int proto)",
+ "Returns protocol name associated with protocol number proto"
+ ],
+ "getrandmax": [
+ "int getrandmax(void)",
+ "Returns the maximum value a random number can have"
+ ],
+ "getrusage": [
+ "array getrusage([int who])",
+ "Returns an array of usage statistics"
+ ],
+ "getservbyname": [
+ "int getservbyname(string service, string protocol)",
+ "Returns port associated with service. Protocol must be \"tcp\" or \"udp\""
+ ],
+ "getservbyport": [
+ "string getservbyport(int port, string protocol)",
+ "Returns service name associated with port. Protocol must be \"tcp\" or \"udp\""
+ ],
+ "gettext": [
+ "string gettext(string msgid)",
+ "Return the translation of msgid for the current domain, or msgid unaltered if a translation does not exist"
+ ],
+ "gettimeofday": [
+ "array gettimeofday([bool get_as_float])",
+ "Returns the current time as array"
+ ],
+ "gettype": [
+ "string gettype(mixed var)",
+ "Returns the type of the variable"
+ ],
+ "glob": [
+ "array glob(string pattern [, int flags])",
+ "Find pathnames matching a pattern"
+ ],
+ "gmdate": [
+ "string gmdate(string format [, long timestamp])",
+ "Format a GMT date/time"
+ ],
+ "gmmktime": [
+ "int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])",
+ "Get UNIX timestamp for a GMT date"
+ ],
+ "gmp_abs": [
+ "resource gmp_abs(resource a)",
+ "Calculates absolute value"
+ ],
+ "gmp_add": [
+ "resource gmp_add(resource a, resource b)",
+ "Add a and b"
+ ],
+ "gmp_and": [
+ "resource gmp_and(resource a, resource b)",
+ "Calculates logical AND of a and b"
+ ],
+ "gmp_clrbit": [
+ "void gmp_clrbit(resource &a, int index)",
+ "Clears bit in a"
+ ],
+ "gmp_cmp": [
+ "int gmp_cmp(resource a, resource b)",
+ "Compares two numbers"
+ ],
+ "gmp_com": [
+ "resource gmp_com(resource a)",
+ "Calculates one's complement of a"
+ ],
+ "gmp_div_q": [
+ "resource gmp_div_q(resource a, resource b [, int round])",
+ "Divide a by b, returns quotient only"
+ ],
+ "gmp_div_qr": [
+ "array gmp_div_qr(resource a, resource b [, int round])",
+ "Divide a by b, returns quotient and reminder"
+ ],
+ "gmp_div_r": [
+ "resource gmp_div_r(resource a, resource b [, int round])",
+ "Divide a by b, returns reminder only"
+ ],
+ "gmp_divexact": [
+ "resource gmp_divexact(resource a, resource b)",
+ "Divide a by b using exact division algorithm"
+ ],
+ "gmp_fact": [
+ "resource gmp_fact(int a)",
+ "Calculates factorial function"
+ ],
+ "gmp_gcd": [
+ "resource gmp_gcd(resource a, resource b)",
+ "Computes greatest common denominator (gcd) of a and b"
+ ],
+ "gmp_gcdext": [
+ "array gmp_gcdext(resource a, resource b)",
+ "Computes G, S, and T, such that AS + BT = G = `gcd' (A, B)"
+ ],
+ "gmp_hamdist": [
+ "int gmp_hamdist(resource a, resource b)",
+ "Calculates hamming distance between a and b"
+ ],
+ "gmp_init": [
+ "resource gmp_init(mixed number [, int base])",
+ "Initializes GMP number"
+ ],
+ "gmp_intval": [
+ "int gmp_intval(resource gmpnumber)",
+ "Gets signed long value of GMP number"
+ ],
+ "gmp_invert": [
+ "resource gmp_invert(resource a, resource b)",
+ "Computes the inverse of a modulo b"
+ ],
+ "gmp_jacobi": [
+ "int gmp_jacobi(resource a, resource b)",
+ "Computes Jacobi symbol"
+ ],
+ "gmp_legendre": [
+ "int gmp_legendre(resource a, resource b)",
+ "Computes Legendre symbol"
+ ],
+ "gmp_mod": [
+ "resource gmp_mod(resource a, resource b)",
+ "Computes a modulo b"
+ ],
+ "gmp_mul": [
+ "resource gmp_mul(resource a, resource b)",
+ "Multiply a and b"
+ ],
+ "gmp_neg": [
+ "resource gmp_neg(resource a)",
+ "Negates a number"
+ ],
+ "gmp_nextprime": [
+ "resource gmp_nextprime(resource a)",
+ "Finds next prime of a"
+ ],
+ "gmp_or": [
+ "resource gmp_or(resource a, resource b)",
+ "Calculates logical OR of a and b"
+ ],
+ "gmp_perfect_square": [
+ "bool gmp_perfect_square(resource a)",
+ "Checks if a is an exact square"
+ ],
+ "gmp_popcount": [
+ "int gmp_popcount(resource a)",
+ "Calculates the population count of a"
+ ],
+ "gmp_pow": [
+ "resource gmp_pow(resource base, int exp)",
+ "Raise base to power exp"
+ ],
+ "gmp_powm": [
+ "resource gmp_powm(resource base, resource exp, resource mod)",
+ "Raise base to power exp and take result modulo mod"
+ ],
+ "gmp_prob_prime": [
+ "int gmp_prob_prime(resource a[, int reps])",
+ "Checks if a is \"probably prime\""
+ ],
+ "gmp_random": [
+ "resource gmp_random([int limiter])",
+ "Gets random number"
+ ],
+ "gmp_scan0": [
+ "int gmp_scan0(resource a, int start)",
+ "Finds first zero bit"
+ ],
+ "gmp_scan1": [
+ "int gmp_scan1(resource a, int start)",
+ "Finds first non-zero bit"
+ ],
+ "gmp_setbit": [
+ "void gmp_setbit(resource &a, int index[, bool set_clear])",
+ "Sets or clear bit in a"
+ ],
+ "gmp_sign": [
+ "int gmp_sign(resource a)",
+ "Gets the sign of the number"
+ ],
+ "gmp_sqrt": [
+ "resource gmp_sqrt(resource a)",
+ "Takes integer part of square root of a"
+ ],
+ "gmp_sqrtrem": [
+ "array gmp_sqrtrem(resource a)",
+ "Square root with remainder"
+ ],
+ "gmp_strval": [
+ "string gmp_strval(resource gmpnumber [, int base])",
+ "Gets string representation of GMP number"
+ ],
+ "gmp_sub": [
+ "resource gmp_sub(resource a, resource b)",
+ "Subtract b from a"
+ ],
+ "gmp_testbit": [
+ "bool gmp_testbit(resource a, int index)",
+ "Tests if bit is set in a"
+ ],
+ "gmp_xor": [
+ "resource gmp_xor(resource a, resource b)",
+ "Calculates logical exclusive OR of a and b"
+ ],
+ "gmstrftime": [
+ "string gmstrftime(string format [, int timestamp])",
+ "Format a GMT/UCT time/date according to locale settings"
+ ],
+ "grapheme_extract": [
+ "string grapheme_extract(string str, int size[, int extract_type[, int start[, int next]]])",
+ "Function to extract a sequence of default grapheme clusters"
+ ],
+ "grapheme_stripos": [
+ "int grapheme_stripos(string haystack, string needle [, int offset ])",
+ "Find position of first occurrence of a string within another, ignoring case differences"
+ ],
+ "grapheme_stristr": [
+ "string grapheme_stristr(string haystack, string needle[, bool part])",
+ "Finds first occurrence of a string within another"
+ ],
+ "grapheme_strlen": [
+ "int grapheme_strlen(string str)",
+ "Get number of graphemes in a string"
+ ],
+ "grapheme_strpos": [
+ "int grapheme_strpos(string haystack, string needle [, int offset ])",
+ "Find position of first occurrence of a string within another"
+ ],
+ "grapheme_strripos": [
+ "int grapheme_strripos(string haystack, string needle [, int offset])",
+ "Find position of last occurrence of a string within another, ignoring case"
+ ],
+ "grapheme_strrpos": [
+ "int grapheme_strrpos(string haystack, string needle [, int offset])",
+ "Find position of last occurrence of a string within another"
+ ],
+ "grapheme_strstr": [
+ "string grapheme_strstr(string haystack, string needle[, bool part])",
+ "Finds first occurrence of a string within another"
+ ],
+ "grapheme_substr": [
+ "string grapheme_substr(string str, int start [, int length])",
+ "Returns part of a string"
+ ],
+ "gregoriantojd": [
+ "int gregoriantojd(int month, int day, int year)",
+ "Converts a gregorian calendar date to julian day count"
+ ],
+ "gzcompress": [
+ "string gzcompress(string data [, int level])",
+ "Gzip-compress a string"
+ ],
+ "gzdeflate": [
+ "string gzdeflate(string data [, int level])",
+ "Gzip-compress a string"
+ ],
+ "gzencode": [
+ "string gzencode(string data [, int level [, int encoding_mode]])",
+ "GZ encode a string"
+ ],
+ "gzfile": [
+ "array gzfile(string filename [, int use_include_path])",
+ "Read und uncompress entire .gz-file into an array"
+ ],
+ "gzinflate": [
+ "string gzinflate(string data [, int length])",
+ "Unzip a gzip-compressed string"
+ ],
+ "gzopen": [
+ "resource gzopen(string filename, string mode [, int use_include_path])",
+ "Open a .gz-file and return a .gz-file pointer"
+ ],
+ "gzuncompress": [
+ "string gzuncompress(string data [, int length])",
+ "Unzip a gzip-compressed string"
+ ],
+ "hash": [
+ "string hash(string algo, string data[, bool raw_output = false])",
+ "Generate a hash of a given input string Returns lowercase hexits by default"
+ ],
+ "hash_algos": [
+ "array hash_algos(void)",
+ "Return a list of registered hashing algorithms"
+ ],
+ "hash_copy": [
+ "resource hash_copy(resource context)",
+ "Copy hash resource"
+ ],
+ "hash_file": [
+ "string hash_file(string algo, string filename[, bool raw_output = false])",
+ "Generate a hash of a given file Returns lowercase hexits by default"
+ ],
+ "hash_final": [
+ "string hash_final(resource context[, bool raw_output=false])",
+ "Output resulting digest"
+ ],
+ "hash_hmac": [
+ "string hash_hmac(string algo, string data, string key[, bool raw_output = false])",
+ "Generate a hash of a given input string with a key using HMAC Returns lowercase hexits by default"
+ ],
+ "hash_hmac_file": [
+ "string hash_hmac_file(string algo, string filename, string key[, bool raw_output = false])",
+ "Generate a hash of a given file with a key using HMAC Returns lowercase hexits by default"
+ ],
+ "hash_init": [
+ "resource hash_init(string algo[, int options, string key])",
+ "Initialize a hashing context"
+ ],
+ "hash_update": [
+ "bool hash_update(resource context, string data)",
+ "Pump data into the hashing algorithm"
+ ],
+ "hash_update_file": [
+ "bool hash_update_file(resource context, string filename[, resource context])",
+ "Pump data into the hashing algorithm from a file"
+ ],
+ "hash_update_stream": [
+ "int hash_update_stream(resource context, resource handle[, integer length])",
+ "Pump data into the hashing algorithm from an open stream"
+ ],
+ "header": [
+ "void header(string header [, bool replace, [int http_response_code]])",
+ "Sends a raw HTTP header"
+ ],
+ "header_remove": [
+ "void header_remove([string name])",
+ "Removes an HTTP header previously set using header()"
+ ],
+ "headers_list": [
+ "array headers_list(void)",
+ "Return list of headers to be sent / already sent"
+ ],
+ "headers_sent": [
+ "bool headers_sent([string &$file [, int &$line]])",
+ "Returns true if headers have already been sent, false otherwise"
+ ],
+ "hebrev": [
+ "string hebrev(string str [, int max_chars_per_line])",
+ "Converts logical Hebrew text to visual text"
+ ],
+ "hebrevc": [
+ "string hebrevc(string str [, int max_chars_per_line])",
+ "Converts logical Hebrew text to visual text with newline conversion"
+ ],
+ "hexdec": [
+ "int hexdec(string hexadecimal_number)",
+ "Returns the decimal equivalent of the hexadecimal number"
+ ],
+ "highlight_file": [
+ "bool highlight_file(string file_name [, bool return] )",
+ "Syntax highlight a source file"
+ ],
+ "highlight_string": [
+ "bool highlight_string(string string [, bool return] )",
+ "Syntax highlight a string or optionally return it"
+ ],
+ "html_entity_decode": [
+ "string html_entity_decode(string string [, int quote_style][, string charset])",
+ "Convert all HTML entities to their applicable characters"
+ ],
+ "htmlentities": [
+ "string htmlentities(string string [, int quote_style[, string charset[, bool double_encode]]])",
+ "Convert all applicable characters to HTML entities"
+ ],
+ "htmlspecialchars": [
+ "string htmlspecialchars(string string [, int quote_style[, string charset[, bool double_encode]]])",
+ "Convert special characters to HTML entities"
+ ],
+ "htmlspecialchars_decode": [
+ "string htmlspecialchars_decode(string string [, int quote_style])",
+ "Convert special HTML entities back to characters"
+ ],
+ "http_build_query": [
+ "string http_build_query(mixed formdata [, string prefix [, string arg_separator]])",
+ "Generates a form-encoded query string from an associative array or object."
+ ],
+ "hypot": [
+ "float hypot(float num1, float num2)",
+ "Returns sqrt(num1*num1 + num2*num2)"
+ ],
+ "ibase_add_user": [
+ "bool ibase_add_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])",
+ "Add a user to security database"
+ ],
+ "ibase_affected_rows": [
+ "int ibase_affected_rows( [ resource link_identifier ] )",
+ "Returns the number of rows affected by the previous INSERT, UPDATE or DELETE statement"
+ ],
+ "ibase_backup": [
+ "mixed ibase_backup(resource service_handle, string source_db, string dest_file [, int options [, bool verbose]])",
+ "Initiates a backup task in the service manager and returns immediately"
+ ],
+ "ibase_blob_add": [
+ "bool ibase_blob_add(resource blob_handle, string data)",
+ "Add data into created blob"
+ ],
+ "ibase_blob_cancel": [
+ "bool ibase_blob_cancel(resource blob_handle)",
+ "Cancel creating blob"
+ ],
+ "ibase_blob_close": [
+ "string ibase_blob_close(resource blob_handle)",
+ "Close blob"
+ ],
+ "ibase_blob_create": [
+ "resource ibase_blob_create([resource link_identifier])",
+ "Create blob for adding data"
+ ],
+ "ibase_blob_echo": [
+ "bool ibase_blob_echo([ resource link_identifier, ] string blob_id)",
+ "Output blob contents to browser"
+ ],
+ "ibase_blob_get": [
+ "string ibase_blob_get(resource blob_handle, int len)",
+ "Get len bytes data from open blob"
+ ],
+ "ibase_blob_import": [
+ "string ibase_blob_import([ resource link_identifier, ] resource file)",
+ "Create blob, copy file in it, and close it"
+ ],
+ "ibase_blob_info": [
+ "array ibase_blob_info([ resource link_identifier, ] string blob_id)",
+ "Return blob length and other useful info"
+ ],
+ "ibase_blob_open": [
+ "resource ibase_blob_open([ resource link_identifier, ] string blob_id)",
+ "Open blob for retrieving data parts"
+ ],
+ "ibase_close": [
+ "bool ibase_close([resource link_identifier])",
+ "Close an InterBase connection"
+ ],
+ "ibase_commit": [
+ "bool ibase_commit( resource link_identifier )",
+ "Commit transaction"
+ ],
+ "ibase_commit_ret": [
+ "bool ibase_commit_ret( resource link_identifier )",
+ "Commit transaction and retain the transaction context"
+ ],
+ "ibase_connect": [
+ "resource ibase_connect(string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]])",
+ "Open a connection to an InterBase database"
+ ],
+ "ibase_db_info": [
+ "string ibase_db_info(resource service_handle, string db, int action [, int argument])",
+ "Request statistics about a database"
+ ],
+ "ibase_delete_user": [
+ "bool ibase_delete_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])",
+ "Delete a user from security database"
+ ],
+ "ibase_drop_db": [
+ "bool ibase_drop_db([resource link_identifier])",
+ "Drop an InterBase database"
+ ],
+ "ibase_errcode": [
+ "int ibase_errcode(void)",
+ "Return error code"
+ ],
+ "ibase_errmsg": [
+ "string ibase_errmsg(void)",
+ "Return error message"
+ ],
+ "ibase_execute": [
+ "mixed ibase_execute(resource query [, mixed bind_arg [, mixed bind_arg [, ...]]])",
+ "Execute a previously prepared query"
+ ],
+ "ibase_fetch_assoc": [
+ "array ibase_fetch_assoc(resource result [, int fetch_flags])",
+ "Fetch a row from the results of a query"
+ ],
+ "ibase_fetch_object": [
+ "object ibase_fetch_object(resource result [, int fetch_flags])",
+ "Fetch a object from the results of a query"
+ ],
+ "ibase_fetch_row": [
+ "array ibase_fetch_row(resource result [, int fetch_flags])",
+ "Fetch a row from the results of a query"
+ ],
+ "ibase_field_info": [
+ "array ibase_field_info(resource query_result, int field_number)",
+ "Get information about a field"
+ ],
+ "ibase_free_event_handler": [
+ "bool ibase_free_event_handler(resource event)",
+ "Frees the event handler set by ibase_set_event_handler()"
+ ],
+ "ibase_free_query": [
+ "bool ibase_free_query(resource query)",
+ "Free memory used by a query"
+ ],
+ "ibase_free_result": [
+ "bool ibase_free_result(resource result)",
+ "Free the memory used by a result"
+ ],
+ "ibase_gen_id": [
+ "int ibase_gen_id(string generator [, int increment [, resource link_identifier ]])",
+ "Increments the named generator and returns its new value"
+ ],
+ "ibase_maintain_db": [
+ "bool ibase_maintain_db(resource service_handle, string db, int action [, int argument])",
+ "Execute a maintenance command on the database server"
+ ],
+ "ibase_modify_user": [
+ "bool ibase_modify_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])",
+ "Modify a user in security database"
+ ],
+ "ibase_name_result": [
+ "bool ibase_name_result(resource result, string name)",
+ "Assign a name to a result for use with ... WHERE CURRENT OF <name> statements"
+ ],
+ "ibase_num_fields": [
+ "int ibase_num_fields(resource query_result)",
+ "Get the number of fields in result"
+ ],
+ "ibase_num_params": [
+ "int ibase_num_params(resource query)",
+ "Get the number of params in a prepared query"
+ ],
+ "ibase_num_rows": [
+ "int ibase_num_rows( resource result_identifier )",
+ "Return the number of rows that are available in a result"
+ ],
+ "ibase_param_info": [
+ "array ibase_param_info(resource query, int field_number)",
+ "Get information about a parameter"
+ ],
+ "ibase_pconnect": [
+ "resource ibase_pconnect(string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]])",
+ "Open a persistent connection to an InterBase database"
+ ],
+ "ibase_prepare": [
+ "resource ibase_prepare(resource link_identifier[, string query [, resource trans_identifier ]])",
+ "Prepare a query for later execution"
+ ],
+ "ibase_query": [
+ "mixed ibase_query([resource link_identifier, [ resource link_identifier, ]] string query [, mixed bind_arg [, mixed bind_arg [, ...]]])",
+ "Execute a query"
+ ],
+ "ibase_restore": [
+ "mixed ibase_restore(resource service_handle, string source_file, string dest_db [, int options [, bool verbose]])",
+ "Initiates a restore task in the service manager and returns immediately"
+ ],
+ "ibase_rollback": [
+ "bool ibase_rollback( resource link_identifier )",
+ "Rollback transaction"
+ ],
+ "ibase_rollback_ret": [
+ "bool ibase_rollback_ret( resource link_identifier )",
+ "Rollback transaction and retain the transaction context"
+ ],
+ "ibase_server_info": [
+ "string ibase_server_info(resource service_handle, int action)",
+ "Request information about a database server"
+ ],
+ "ibase_service_attach": [
+ "resource ibase_service_attach(string host, string dba_username, string dba_password)",
+ "Connect to the service manager"
+ ],
+ "ibase_service_detach": [
+ "bool ibase_service_detach(resource service_handle)",
+ "Disconnect from the service manager"
+ ],
+ "ibase_set_event_handler": [
+ "resource ibase_set_event_handler([resource link_identifier,] callback handler, string event [, string event [, ...]])",
+ "Register the callback for handling each of the named events"
+ ],
+ "ibase_trans": [
+ "resource ibase_trans([int trans_args [, resource link_identifier [, ... ], int trans_args [, resource link_identifier [, ... ]] [, ...]]])",
+ "Start a transaction over one or several databases"
+ ],
+ "ibase_wait_event": [
+ "string ibase_wait_event([resource link_identifier,] string event [, string event [, ...]])",
+ "Waits for any one of the passed Interbase events to be posted by the database, and returns its name"
+ ],
+ "iconv": [
+ "string iconv(string in_charset, string out_charset, string str)",
+ "Returns str converted to the out_charset character set"
+ ],
+ "iconv_get_encoding": [
+ "mixed iconv_get_encoding([string type])",
+ "Get internal encoding and output encoding for ob_iconv_handler()"
+ ],
+ "iconv_mime_decode": [
+ "string iconv_mime_decode(string encoded_string [, int mode, string charset])",
+ "Decodes a mime header field"
+ ],
+ "iconv_mime_decode_headers": [
+ "array iconv_mime_decode_headers(string headers [, int mode, string charset])",
+ "Decodes multiple mime header fields"
+ ],
+ "iconv_mime_encode": [
+ "string iconv_mime_encode(string field_name, string field_value [, array preference])",
+ "Composes a mime header field with field_name and field_value in a specified scheme"
+ ],
+ "iconv_set_encoding": [
+ "bool iconv_set_encoding(string type, string charset)",
+ "Sets internal encoding and output encoding for ob_iconv_handler()"
+ ],
+ "iconv_strlen": [
+ "int iconv_strlen(string str [, string charset])",
+ "Returns the character count of str"
+ ],
+ "iconv_strpos": [
+ "int iconv_strpos(string haystack, string needle [, int offset [, string charset]])",
+ "Finds position of first occurrence of needle within part of haystack beginning with offset"
+ ],
+ "iconv_strrpos": [
+ "int iconv_strrpos(string haystack, string needle [, string charset])",
+ "Finds position of last occurrence of needle within part of haystack beginning with offset"
+ ],
+ "iconv_substr": [
+ "string iconv_substr(string str, int offset, [int length, string charset])",
+ "Returns specified part of a string"
+ ],
+ "idate": [
+ "int idate(string format [, int timestamp])",
+ "Format a local time/date as integer"
+ ],
+ "idn_to_ascii": [
+ "int idn_to_ascii(string domain[, int options])",
+ "Converts an Unicode domain to ASCII representation, as defined in the IDNA RFC"
+ ],
+ "idn_to_utf8": [
+ "int idn_to_utf8(string domain[, int options])",
+ "Converts an ASCII representation of the domain to Unicode (UTF-8), as defined in the IDNA RFC"
+ ],
+ "ignore_user_abort": [
+ "int ignore_user_abort([string value])",
+ "Set whether we want to ignore a user abort event or not"
+ ],
+ "image2wbmp": [
+ "bool image2wbmp(resource im [, string filename [, int threshold]])",
+ "Output WBMP image to browser or file"
+ ],
+ "image_type_to_extension": [
+ "string image_type_to_extension(int imagetype [, bool include_dot])",
+ "Get file extension for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype"
+ ],
+ "image_type_to_mime_type": [
+ "string image_type_to_mime_type(int imagetype)",
+ "Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype"
+ ],
+ "imagealphablending": [
+ "bool imagealphablending(resource im, bool on)",
+ "Turn alpha blending mode on or off for the given image"
+ ],
+ "imageantialias": [
+ "bool imageantialias(resource im, bool on)",
+ "Should antialiased functions used or not"
+ ],
+ "imagearc": [
+ "bool imagearc(resource im, int cx, int cy, int w, int h, int s, int e, int col)",
+ "Draw a partial ellipse"
+ ],
+ "imagechar": [
+ "bool imagechar(resource im, int font, int x, int y, string c, int col)",
+ "Draw a character"
+ ],
+ "imagecharup": [
+ "bool imagecharup(resource im, int font, int x, int y, string c, int col)",
+ "Draw a character rotated 90 degrees counter-clockwise"
+ ],
+ "imagecolorallocate": [
+ "int imagecolorallocate(resource im, int red, int green, int blue)",
+ "Allocate a color for an image"
+ ],
+ "imagecolorallocatealpha": [
+ "int imagecolorallocatealpha(resource im, int red, int green, int blue, int alpha)",
+ "Allocate a color with an alpha level. Works for true color and palette based images"
+ ],
+ "imagecolorat": [
+ "int imagecolorat(resource im, int x, int y)",
+ "Get the index of the color of a pixel"
+ ],
+ "imagecolorclosest": [
+ "int imagecolorclosest(resource im, int red, int green, int blue)",
+ "Get the index of the closest color to the specified color"
+ ],
+ "imagecolorclosestalpha": [
+ "int imagecolorclosestalpha(resource im, int red, int green, int blue, int alpha)",
+ "Find the closest matching colour with alpha transparency"
+ ],
+ "imagecolorclosesthwb": [
+ "int imagecolorclosesthwb(resource im, int red, int green, int blue)",
+ "Get the index of the color which has the hue, white and blackness nearest to the given color"
+ ],
+ "imagecolordeallocate": [
+ "bool imagecolordeallocate(resource im, int index)",
+ "De-allocate a color for an image"
+ ],
+ "imagecolorexact": [
+ "int imagecolorexact(resource im, int red, int green, int blue)",
+ "Get the index of the specified color"
+ ],
+ "imagecolorexactalpha": [
+ "int imagecolorexactalpha(resource im, int red, int green, int blue, int alpha)",
+ "Find exact match for colour with transparency"
+ ],
+ "imagecolormatch": [
+ "bool imagecolormatch(resource im1, resource im2)",
+ "Makes the colors of the palette version of an image more closely match the true color version"
+ ],
+ "imagecolorresolve": [
+ "int imagecolorresolve(resource im, int red, int green, int blue)",
+ "Get the index of the specified color or its closest possible alternative"
+ ],
+ "imagecolorresolvealpha": [
+ "int imagecolorresolvealpha(resource im, int red, int green, int blue, int alpha)",
+ "Resolve/Allocate a colour with an alpha level. Works for true colour and palette based images"
+ ],
+ "imagecolorset": [
+ "void imagecolorset(resource im, int col, int red, int green, int blue)",
+ "Set the color for the specified palette index"
+ ],
+ "imagecolorsforindex": [
+ "array imagecolorsforindex(resource im, int col)",
+ "Get the colors for an index"
+ ],
+ "imagecolorstotal": [
+ "int imagecolorstotal(resource im)",
+ "Find out the number of colors in an image's palette"
+ ],
+ "imagecolortransparent": [
+ "int imagecolortransparent(resource im [, int col])",
+ "Define a color as transparent"
+ ],
+ "imageconvolution": [
+ "resource imageconvolution(resource src_im, array matrix3x3, double div, double offset)",
+ "Apply a 3x3 convolution matrix, using coefficient div and offset"
+ ],
+ "imagecopy": [
+ "bool imagecopy(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h)",
+ "Copy part of an image"
+ ],
+ "imagecopymerge": [
+ "bool imagecopymerge(resource src_im, resource dst_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct)",
+ "Merge one part of an image with another"
+ ],
+ "imagecopymergegray": [
+ "bool imagecopymergegray(resource src_im, resource dst_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct)",
+ "Merge one part of an image with another"
+ ],
+ "imagecopyresampled": [
+ "bool imagecopyresampled(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h)",
+ "Copy and resize part of an image using resampling to help ensure clarity"
+ ],
+ "imagecopyresized": [
+ "bool imagecopyresized(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h)",
+ "Copy and resize part of an image"
+ ],
+ "imagecreate": [
+ "resource imagecreate(int x_size, int y_size)",
+ "Create a new image"
+ ],
+ "imagecreatefromgd": [
+ "resource imagecreatefromgd(string filename)",
+ "Create a new image from GD file or URL"
+ ],
+ "imagecreatefromgd2": [
+ "resource imagecreatefromgd2(string filename)",
+ "Create a new image from GD2 file or URL"
+ ],
+ "imagecreatefromgd2part": [
+ "resource imagecreatefromgd2part(string filename, int srcX, int srcY, int width, int height)",
+ "Create a new image from a given part of GD2 file or URL"
+ ],
+ "imagecreatefromgif": [
+ "resource imagecreatefromgif(string filename)",
+ "Create a new image from GIF file or URL"
+ ],
+ "imagecreatefromjpeg": [
+ "resource imagecreatefromjpeg(string filename)",
+ "Create a new image from JPEG file or URL"
+ ],
+ "imagecreatefrompng": [
+ "resource imagecreatefrompng(string filename)",
+ "Create a new image from PNG file or URL"
+ ],
+ "imagecreatefromstring": [
+ "resource imagecreatefromstring(string image)",
+ "Create a new image from the image stream in the string"
+ ],
+ "imagecreatefromwbmp": [
+ "resource imagecreatefromwbmp(string filename)",
+ "Create a new image from WBMP file or URL"
+ ],
+ "imagecreatefromxbm": [
+ "resource imagecreatefromxbm(string filename)",
+ "Create a new image from XBM file or URL"
+ ],
+ "imagecreatefromxpm": [
+ "resource imagecreatefromxpm(string filename)",
+ "Create a new image from XPM file or URL"
+ ],
+ "imagecreatetruecolor": [
+ "resource imagecreatetruecolor(int x_size, int y_size)",
+ "Create a new true color image"
+ ],
+ "imagedashedline": [
+ "bool imagedashedline(resource im, int x1, int y1, int x2, int y2, int col)",
+ "Draw a dashed line"
+ ],
+ "imagedestroy": [
+ "bool imagedestroy(resource im)",
+ "Destroy an image"
+ ],
+ "imageellipse": [
+ "bool imageellipse(resource im, int cx, int cy, int w, int h, int color)",
+ "Draw an ellipse"
+ ],
+ "imagefill": [
+ "bool imagefill(resource im, int x, int y, int col)",
+ "Flood fill"
+ ],
+ "imagefilledarc": [
+ "bool imagefilledarc(resource im, int cx, int cy, int w, int h, int s, int e, int col, int style)",
+ "Draw a filled partial ellipse"
+ ],
+ "imagefilledellipse": [
+ "bool imagefilledellipse(resource im, int cx, int cy, int w, int h, int color)",
+ "Draw an ellipse"
+ ],
+ "imagefilledpolygon": [
+ "bool imagefilledpolygon(resource im, array point, int num_points, int col)",
+ "Draw a filled polygon"
+ ],
+ "imagefilledrectangle": [
+ "bool imagefilledrectangle(resource im, int x1, int y1, int x2, int y2, int col)",
+ "Draw a filled rectangle"
+ ],
+ "imagefilltoborder": [
+ "bool imagefilltoborder(resource im, int x, int y, int border, int col)",
+ "Flood fill to specific color"
+ ],
+ "imagefilter": [
+ "bool imagefilter(resource src_im, int filtertype, [args] )",
+ "Applies Filter an image using a custom angle"
+ ],
+ "imagefontheight": [
+ "int imagefontheight(int font)",
+ "Get font height"
+ ],
+ "imagefontwidth": [
+ "int imagefontwidth(int font)",
+ "Get font width"
+ ],
+ "imageftbbox": [
+ "array imageftbbox(float size, float angle, string font_file, string text [, array extrainfo])",
+ "Give the bounding box of a text using fonts via freetype2"
+ ],
+ "imagefttext": [
+ "array imagefttext(resource im, float size, float angle, int x, int y, int col, string font_file, string text [, array extrainfo])",
+ "Write text to the image using fonts via freetype2"
+ ],
+ "imagegammacorrect": [
+ "bool imagegammacorrect(resource im, float inputgamma, float outputgamma)",
+ "Apply a gamma correction to a GD image"
+ ],
+ "imagegd": [
+ "bool imagegd(resource im [, string filename])",
+ "Output GD image to browser or file"
+ ],
+ "imagegd2": [
+ "bool imagegd2(resource im [, string filename, [, int chunk_size, [, int type]]])",
+ "Output GD2 image to browser or file"
+ ],
+ "imagegif": [
+ "bool imagegif(resource im [, string filename])",
+ "Output GIF image to browser or file"
+ ],
+ "imagegrabscreen": [
+ "resource imagegrabscreen()",
+ "Grab a screenshot"
+ ],
+ "imagegrabwindow": [
+ "resource imagegrabwindow(int window_handle [, int client_area])",
+ "Grab a window or its client area using a windows handle (HWND property in COM instance)"
+ ],
+ "imageinterlace": [
+ "int imageinterlace(resource im [, int interlace])",
+ "Enable or disable interlace"
+ ],
+ "imageistruecolor": [
+ "bool imageistruecolor(resource im)",
+ "return true if the image uses truecolor"
+ ],
+ "imagejpeg": [
+ "bool imagejpeg(resource im [, string filename [, int quality]])",
+ "Output JPEG image to browser or file"
+ ],
+ "imagelayereffect": [
+ "bool imagelayereffect(resource im, int effect)",
+ "Set the alpha blending flag to use the bundled libgd layering effects"
+ ],
+ "imageline": [
+ "bool imageline(resource im, int x1, int y1, int x2, int y2, int col)",
+ "Draw a line"
+ ],
+ "imageloadfont": [
+ "int imageloadfont(string filename)",
+ "Load a new font"
+ ],
+ "imagepalettecopy": [
+ "void imagepalettecopy(resource dst, resource src)",
+ "Copy the palette from the src image onto the dst image"
+ ],
+ "imagepng": [
+ "bool imagepng(resource im [, string filename])",
+ "Output PNG image to browser or file"
+ ],
+ "imagepolygon": [
+ "bool imagepolygon(resource im, array point, int num_points, int col)",
+ "Draw a polygon"
+ ],
+ "imagepsbbox": [
+ "array imagepsbbox(string text, resource font, int size [, int space, int tightness, float angle])",
+ "Return the bounding box needed by a string if rasterized"
+ ],
+ "imagepscopyfont": [
+ "int imagepscopyfont(int font_index)",
+ "Make a copy of a font for purposes like extending or reenconding"
+ ],
+ "imagepsencodefont": [
+ "bool imagepsencodefont(resource font_index, string filename)",
+ "To change a fonts character encoding vector"
+ ],
+ "imagepsextendfont": [
+ "bool imagepsextendfont(resource font_index, float extend)",
+ "Extend or or condense (if extend < 1) a font"
+ ],
+ "imagepsfreefont": [
+ "bool imagepsfreefont(resource font_index)",
+ "Free memory used by a font"
+ ],
+ "imagepsloadfont": [
+ "resource imagepsloadfont(string pathname)",
+ "Load a new font from specified file"
+ ],
+ "imagepsslantfont": [
+ "bool imagepsslantfont(resource font_index, float slant)",
+ "Slant a font"
+ ],
+ "imagepstext": [
+ "array imagepstext(resource image, string text, resource font, int size, int foreground, int background, int xcoord, int ycoord [, int space [, int tightness [, float angle [, int antialias])",
+ "Rasterize a string over an image"
+ ],
+ "imagerectangle": [
+ "bool imagerectangle(resource im, int x1, int y1, int x2, int y2, int col)",
+ "Draw a rectangle"
+ ],
+ "imagerotate": [
+ "resource imagerotate(resource src_im, float angle, int bgdcolor [, int ignoretransparent])",
+ "Rotate an image using a custom angle"
+ ],
+ "imagesavealpha": [
+ "bool imagesavealpha(resource im, bool on)",
+ "Include alpha channel to a saved image"
+ ],
+ "imagesetbrush": [
+ "bool imagesetbrush(resource image, resource brush)",
+ "Set the brush image to $brush when filling $image with the \"IMG_COLOR_BRUSHED\" color"
+ ],
+ "imagesetpixel": [
+ "bool imagesetpixel(resource im, int x, int y, int col)",
+ "Set a single pixel"
+ ],
+ "imagesetstyle": [
+ "bool imagesetstyle(resource im, array styles)",
+ "Set the line drawing styles for use with imageline and IMG_COLOR_STYLED."
+ ],
+ "imagesetthickness": [
+ "bool imagesetthickness(resource im, int thickness)",
+ "Set line thickness for drawing lines, ellipses, rectangles, polygons etc."
+ ],
+ "imagesettile": [
+ "bool imagesettile(resource image, resource tile)",
+ "Set the tile image to $tile when filling $image with the \"IMG_COLOR_TILED\" color"
+ ],
+ "imagestring": [
+ "bool imagestring(resource im, int font, int x, int y, string str, int col)",
+ "Draw a string horizontally"
+ ],
+ "imagestringup": [
+ "bool imagestringup(resource im, int font, int x, int y, string str, int col)",
+ "Draw a string vertically - rotated 90 degrees counter-clockwise"
+ ],
+ "imagesx": [
+ "int imagesx(resource im)",
+ "Get image width"
+ ],
+ "imagesy": [
+ "int imagesy(resource im)",
+ "Get image height"
+ ],
+ "imagetruecolortopalette": [
+ "void imagetruecolortopalette(resource im, bool ditherFlag, int colorsWanted)",
+ "Convert a true colour image to a palette based image with a number of colours, optionally using dithering."
+ ],
+ "imagettfbbox": [
+ "array imagettfbbox(float size, float angle, string font_file, string text)",
+ "Give the bounding box of a text using TrueType fonts"
+ ],
+ "imagettftext": [
+ "array imagettftext(resource im, float size, float angle, int x, int y, int col, string font_file, string text)",
+ "Write text to the image using a TrueType font"
+ ],
+ "imagetypes": [
+ "int imagetypes(void)",
+ "Return the types of images supported in a bitfield - 1=GIF, 2=JPEG, 4=PNG, 8=WBMP, 16=XPM"
+ ],
+ "imagewbmp": [
+ "bool imagewbmp(resource im [, string filename, [, int foreground]])",
+ "Output WBMP image to browser or file"
+ ],
+ "imagexbm": [
+ "int imagexbm(int im, string filename [, int foreground])",
+ "Output XBM image to browser or file"
+ ],
+ "imap_8bit": [
+ "string imap_8bit(string text)",
+ "Convert an 8-bit string to a quoted-printable string"
+ ],
+ "imap_alerts": [
+ "array imap_alerts(void)",
+ "Returns an array of all IMAP alerts that have been generated since the last page load or since the last imap_alerts() call, whichever came last. The alert stack is cleared after imap_alerts() is called."
+ ],
+ "imap_append": [
+ "bool imap_append(resource stream_id, string folder, string message [, string options [, string internal_date]])",
+ "Append a new message to a specified mailbox"
+ ],
+ "imap_base64": [
+ "string imap_base64(string text)",
+ "Decode BASE64 encoded text"
+ ],
+ "imap_binary": [
+ "string imap_binary(string text)",
+ "Convert an 8bit string to a base64 string"
+ ],
+ "imap_body": [
+ "string imap_body(resource stream_id, int msg_no [, int options])",
+ "Read the message body"
+ ],
+ "imap_bodystruct": [
+ "object imap_bodystruct(resource stream_id, int msg_no, string section)",
+ "Read the structure of a specified body section of a specific message"
+ ],
+ "imap_check": [
+ "object imap_check(resource stream_id)",
+ "Get mailbox properties"
+ ],
+ "imap_clearflag_full": [
+ "bool imap_clearflag_full(resource stream_id, string sequence, string flag [, int options])",
+ "Clears flags on messages"
+ ],
+ "imap_close": [
+ "bool imap_close(resource stream_id [, int options])",
+ "Close an IMAP stream"
+ ],
+ "imap_createmailbox": [
+ "bool imap_createmailbox(resource stream_id, string mailbox)",
+ "Create a new mailbox"
+ ],
+ "imap_delete": [
+ "bool imap_delete(resource stream_id, int msg_no [, int options])",
+ "Mark a message for deletion"
+ ],
+ "imap_deletemailbox": [
+ "bool imap_deletemailbox(resource stream_id, string mailbox)",
+ "Delete a mailbox"
+ ],
+ "imap_errors": [
+ "array imap_errors(void)",
+ "Returns an array of all IMAP errors generated since the last page load, or since the last imap_errors() call, whichever came last. The error stack is cleared after imap_errors() is called."
+ ],
+ "imap_expunge": [
+ "bool imap_expunge(resource stream_id)",
+ "Permanently delete all messages marked for deletion"
+ ],
+ "imap_fetch_overview": [
+ "array imap_fetch_overview(resource stream_id, string sequence [, int options])",
+ "Read an overview of the information in the headers of the given message sequence"
+ ],
+ "imap_fetchbody": [
+ "string imap_fetchbody(resource stream_id, int msg_no, string section [, int options])",
+ "Get a specific body section"
+ ],
+ "imap_fetchheader": [
+ "string imap_fetchheader(resource stream_id, int msg_no [, int options])",
+ "Get the full unfiltered header for a message"
+ ],
+ "imap_fetchstructure": [
+ "object imap_fetchstructure(resource stream_id, int msg_no [, int options])",
+ "Read the full structure of a message"
+ ],
+ "imap_gc": [
+ "bool imap_gc(resource stream_id, int flags)",
+ "This function garbage collects (purges) the cache of entries of a specific type."
+ ],
+ "imap_get_quota": [
+ "array imap_get_quota(resource stream_id, string qroot)",
+ "Returns the quota set to the mailbox account qroot"
+ ],
+ "imap_get_quotaroot": [
+ "array imap_get_quotaroot(resource stream_id, string mbox)",
+ "Returns the quota set to the mailbox account mbox"
+ ],
+ "imap_getacl": [
+ "array imap_getacl(resource stream_id, string mailbox)",
+ "Gets the ACL for a given mailbox"
+ ],
+ "imap_getmailboxes": [
+ "array imap_getmailboxes(resource stream_id, string ref, string pattern)",
+ "Reads the list of mailboxes and returns a full array of objects containing name, attributes, and delimiter"
+ ],
+ "imap_getsubscribed": [
+ "array imap_getsubscribed(resource stream_id, string ref, string pattern)",
+ "Return a list of subscribed mailboxes, in the same format as imap_getmailboxes()"
+ ],
+ "imap_headerinfo": [
+ "object imap_headerinfo(resource stream_id, int msg_no [, int from_length [, int subject_length [, string default_host]]])",
+ "Read the headers of the message"
+ ],
+ "imap_headers": [
+ "array imap_headers(resource stream_id)",
+ "Returns headers for all messages in a mailbox"
+ ],
+ "imap_last_error": [
+ "string imap_last_error(void)",
+ "Returns the last error that was generated by an IMAP function. The error stack is NOT cleared after this call."
+ ],
+ "imap_list": [
+ "array imap_list(resource stream_id, string ref, string pattern)",
+ "Read the list of mailboxes"
+ ],
+ "imap_listscan": [
+ "array imap_listscan(resource stream_id, string ref, string pattern, string content)",
+ "Read list of mailboxes containing a certain string"
+ ],
+ "imap_lsub": [
+ "array imap_lsub(resource stream_id, string ref, string pattern)",
+ "Return a list of subscribed mailboxes"
+ ],
+ "imap_mail": [
+ "bool imap_mail(string to, string subject, string message [, string additional_headers [, string cc [, string bcc [, string rpath]]]])",
+ "Send an email message"
+ ],
+ "imap_mail_compose": [
+ "string imap_mail_compose(array envelope, array body)",
+ "Create a MIME message based on given envelope and body sections"
+ ],
+ "imap_mail_copy": [
+ "bool imap_mail_copy(resource stream_id, string msglist, string mailbox [, int options])",
+ "Copy specified message to a mailbox"
+ ],
+ "imap_mail_move": [
+ "bool imap_mail_move(resource stream_id, string sequence, string mailbox [, int options])",
+ "Move specified message to a mailbox"
+ ],
+ "imap_mailboxmsginfo": [
+ "object imap_mailboxmsginfo(resource stream_id)",
+ "Returns info about the current mailbox"
+ ],
+ "imap_mime_header_decode": [
+ "array imap_mime_header_decode(string str)",
+ "Decode mime header element in accordance with RFC 2047 and return array of objects containing 'charset' encoding and decoded 'text'"
+ ],
+ "imap_msgno": [
+ "int imap_msgno(resource stream_id, int unique_msg_id)",
+ "Get the sequence number associated with a UID"
+ ],
+ "imap_mutf7_to_utf8": [
+ "string imap_mutf7_to_utf8(string in)",
+ "Decode a modified UTF-7 string to UTF-8"
+ ],
+ "imap_num_msg": [
+ "int imap_num_msg(resource stream_id)",
+ "Gives the number of messages in the current mailbox"
+ ],
+ "imap_num_recent": [
+ "int imap_num_recent(resource stream_id)",
+ "Gives the number of recent messages in current mailbox"
+ ],
+ "imap_open": [
+ "resource imap_open(string mailbox, string user, string password [, int options [, int n_retries]])",
+ "Open an IMAP stream to a mailbox"
+ ],
+ "imap_ping": [
+ "bool imap_ping(resource stream_id)",
+ "Check if the IMAP stream is still active"
+ ],
+ "imap_qprint": [
+ "string imap_qprint(string text)",
+ "Convert a quoted-printable string to an 8-bit string"
+ ],
+ "imap_renamemailbox": [
+ "bool imap_renamemailbox(resource stream_id, string old_name, string new_name)",
+ "Rename a mailbox"
+ ],
+ "imap_reopen": [
+ "bool imap_reopen(resource stream_id, string mailbox [, int options [, int n_retries]])",
+ "Reopen an IMAP stream to a new mailbox"
+ ],
+ "imap_rfc822_parse_adrlist": [
+ "array imap_rfc822_parse_adrlist(string address_string, string default_host)",
+ "Parses an address string"
+ ],
+ "imap_rfc822_parse_headers": [
+ "object imap_rfc822_parse_headers(string headers [, string default_host])",
+ "Parse a set of mail headers contained in a string, and return an object similar to imap_headerinfo()"
+ ],
+ "imap_rfc822_write_address": [
+ "string imap_rfc822_write_address(string mailbox, string host, string personal)",
+ "Returns a properly formatted email address given the mailbox, host, and personal info"
+ ],
+ "imap_savebody": [
+ "bool imap_savebody(resource stream_id, string|resource file, int msg_no[, string section = \"\"[, int options = 0]])",
+ "Save a specific body section to a file"
+ ],
+ "imap_search": [
+ "array imap_search(resource stream_id, string criteria [, int options [, string charset]])",
+ "Return a list of messages matching the given criteria"
+ ],
+ "imap_set_quota": [
+ "bool imap_set_quota(resource stream_id, string qroot, int mailbox_size)",
+ "Will set the quota for qroot mailbox"
+ ],
+ "imap_setacl": [
+ "bool imap_setacl(resource stream_id, string mailbox, string id, string rights)",
+ "Sets the ACL for a given mailbox"
+ ],
+ "imap_setflag_full": [
+ "bool imap_setflag_full(resource stream_id, string sequence, string flag [, int options])",
+ "Sets flags on messages"
+ ],
+ "imap_sort": [
+ "array imap_sort(resource stream_id, int criteria, int reverse [, int options [, string search_criteria [, string charset]]])",
+ "Sort an array of message headers, optionally including only messages that meet specified criteria."
+ ],
+ "imap_status": [
+ "object imap_status(resource stream_id, string mailbox, int options)",
+ "Get status info from a mailbox"
+ ],
+ "imap_subscribe": [
+ "bool imap_subscribe(resource stream_id, string mailbox)",
+ "Subscribe to a mailbox"
+ ],
+ "imap_thread": [
+ "array imap_thread(resource stream_id [, int options])",
+ "Return threaded by REFERENCES tree"
+ ],
+ "imap_timeout": [
+ "mixed imap_timeout(int timeout_type [, int timeout])",
+ "Set or fetch imap timeout"
+ ],
+ "imap_uid": [
+ "int imap_uid(resource stream_id, int msg_no)",
+ "Get the unique message id associated with a standard sequential message number"
+ ],
+ "imap_undelete": [
+ "bool imap_undelete(resource stream_id, int msg_no [, int flags])",
+ "Remove the delete flag from a message"
+ ],
+ "imap_unsubscribe": [
+ "bool imap_unsubscribe(resource stream_id, string mailbox)",
+ "Unsubscribe from a mailbox"
+ ],
+ "imap_utf7_decode": [
+ "string imap_utf7_decode(string buf)",
+ "Decode a modified UTF-7 string"
+ ],
+ "imap_utf7_encode": [
+ "string imap_utf7_encode(string buf)",
+ "Encode a string in modified UTF-7"
+ ],
+ "imap_utf8": [
+ "string imap_utf8(string mime_encoded_text)",
+ "Convert a mime-encoded text to UTF-8"
+ ],
+ "imap_utf8_to_mutf7": [
+ "string imap_utf8_to_mutf7(string in)",
+ "Encode a UTF-8 string to modified UTF-7"
+ ],
+ "implode": [
+ "string implode([string glue,] array pieces)",
+ "Joins array elements placing glue string between items and return one string"
+ ],
+ "import_request_variables": [
+ "bool import_request_variables(string types [, string prefix])",
+ "Import GET/POST/Cookie variables into the global scope"
+ ],
+ "in_array": [
+ "bool in_array(mixed needle, array haystack [, bool strict])",
+ "Checks if the given value exists in the array"
+ ],
+ "include": [
+ "bool include(string path)",
+ "Includes and evaluates the specified file"
+ ],
+ "include_once": [
+ "bool include_once(string path)",
+ "Includes and evaluates the specified file"
+ ],
+ "inet_ntop": [
+ "string inet_ntop(string in_addr)",
+ "Converts a packed inet address to a human readable IP address string"
+ ],
+ "inet_pton": [
+ "string inet_pton(string ip_address)",
+ "Converts a human readable IP address to a packed binary string"
+ ],
+ "ini_get": [
+ "string ini_get(string varname)",
+ "Get a configuration option"
+ ],
+ "ini_get_all": [
+ "array ini_get_all([string extension[, bool details = true]])",
+ "Get all configuration options"
+ ],
+ "ini_restore": [
+ "void ini_restore(string varname)",
+ "Restore the value of a configuration option specified by varname"
+ ],
+ "ini_set": [
+ "string ini_set(string varname, string newvalue)",
+ "Set a configuration option, returns false on error and the old value of the configuration option on success"
+ ],
+ "interface_exists": [
+ "bool interface_exists(string classname [, bool autoload])",
+ "Checks if the class exists"
+ ],
+ "intl_error_name": [
+ "string intl_error_name()",
+ "* Return a string for a given error code. * The string will be the same as the name of the error code constant."
+ ],
+ "intl_get_error_code": [
+ "int intl_get_error_code()",
+ "* Get code of the last occured error."
+ ],
+ "intl_get_error_message": [
+ "string intl_get_error_message()",
+ "* Get text description of the last occured error."
+ ],
+ "intl_is_failure": [
+ "bool intl_is_failure()",
+ "* Check whether the given error code indicates a failure. * Returns true if it does, and false if the code * indicates success or a warning."
+ ],
+ "intval": [
+ "int intval(mixed var [, int base])",
+ "Get the integer value of a variable using the optional base for the conversion"
+ ],
+ "ip2long": [
+ "int ip2long(string ip_address)",
+ "Converts a string containing an (IPv4) Internet Protocol dotted address into a proper address"
+ ],
+ "iptcembed": [
+ "array iptcembed(string iptcdata, string jpeg_file_name [, int spool])",
+ "Embed binary IPTC data into a JPEG image."
+ ],
+ "iptcparse": [
+ "array iptcparse(string iptcdata)",
+ "Parse binary IPTC-data into associative array"
+ ],
+ "is_a": [
+ "bool is_a(object object, string class_name)",
+ "Returns true if the object is of this class or has this class as one of its parents"
+ ],
+ "is_array": [
+ "bool is_array(mixed var)",
+ "Returns true if variable is an array"
+ ],
+ "is_bool": [
+ "bool is_bool(mixed var)",
+ "Returns true if variable is a boolean"
+ ],
+ "is_callable": [
+ "bool is_callable(mixed var [, bool syntax_only [, string callable_name]])",
+ "Returns true if var is callable."
+ ],
+ "is_dir": [
+ "bool is_dir(string filename)",
+ "Returns true if file is directory"
+ ],
+ "is_executable": [
+ "bool is_executable(string filename)",
+ "Returns true if file is executable"
+ ],
+ "is_file": [
+ "bool is_file(string filename)",
+ "Returns true if file is a regular file"
+ ],
+ "is_finite": [
+ "bool is_finite(float val)",
+ "Returns whether argument is finite"
+ ],
+ "is_float": [
+ "bool is_float(mixed var)",
+ "Returns true if variable is float point"
+ ],
+ "is_infinite": [
+ "bool is_infinite(float val)",
+ "Returns whether argument is infinite"
+ ],
+ "is_link": [
+ "bool is_link(string filename)",
+ "Returns true if file is symbolic link"
+ ],
+ "is_long": [
+ "bool is_long(mixed var)",
+ "Returns true if variable is a long (integer)"
+ ],
+ "is_nan": [
+ "bool is_nan(float val)",
+ "Returns whether argument is not a number"
+ ],
+ "is_null": [
+ "bool is_null(mixed var)",
+ "Returns true if variable is null"
+ ],
+ "is_numeric": [
+ "bool is_numeric(mixed value)",
+ "Returns true if value is a number or a numeric string"
+ ],
+ "is_object": [
+ "bool is_object(mixed var)",
+ "Returns true if variable is an object"
+ ],
+ "is_readable": [
+ "bool is_readable(string filename)",
+ "Returns true if file can be read"
+ ],
+ "is_resource": [
+ "bool is_resource(mixed var)",
+ "Returns true if variable is a resource"
+ ],
+ "is_scalar": [
+ "bool is_scalar(mixed value)",
+ "Returns true if value is a scalar"
+ ],
+ "is_string": [
+ "bool is_string(mixed var)",
+ "Returns true if variable is a string"
+ ],
+ "is_subclass_of": [
+ "bool is_subclass_of(object object, string class_name)",
+ "Returns true if the object has this class as one of its parents"
+ ],
+ "is_uploaded_file": [
+ "bool is_uploaded_file(string path)",
+ "Check if file was created by rfc1867 upload"
+ ],
+ "is_writable": [
+ "bool is_writable(string filename)",
+ "Returns true if file can be written"
+ ],
+ "isset": [
+ "bool isset(mixed var [, mixed var])",
+ "Determine whether a variable is set"
+ ],
+ "iterator_apply": [
+ "int iterator_apply(Traversable it, mixed function [, mixed params])",
+ "Calls a function for every element in an iterator"
+ ],
+ "iterator_count": [
+ "int iterator_count(Traversable it)",
+ "Count the elements in an iterator"
+ ],
+ "iterator_to_array": [
+ "array iterator_to_array(Traversable it [, bool use_keys = true])",
+ "Copy the iterator into an array"
+ ],
+ "jddayofweek": [
+ "mixed jddayofweek(int juliandaycount [, int mode])",
+ "Returns name or number of day of week from julian day count"
+ ],
+ "jdmonthname": [
+ "string jdmonthname(int juliandaycount, int mode)",
+ "Returns name of month for julian day count"
+ ],
+ "jdtofrench": [
+ "string jdtofrench(int juliandaycount)",
+ "Converts a julian day count to a french republic calendar date"
+ ],
+ "jdtogregorian": [
+ "string jdtogregorian(int juliandaycount)",
+ "Converts a julian day count to a gregorian calendar date"
+ ],
+ "jdtojewish": [
+ "string jdtojewish(int juliandaycount [, bool hebrew [, int fl]])",
+ "Converts a julian day count to a jewish calendar date"
+ ],
+ "jdtojulian": [
+ "string jdtojulian(int juliandaycount)",
+ "Convert a julian day count to a julian calendar date"
+ ],
+ "jdtounix": [
+ "int jdtounix(int jday)",
+ "Convert Julian Day to UNIX timestamp"
+ ],
+ "jewishtojd": [
+ "int jewishtojd(int month, int day, int year)",
+ "Converts a jewish calendar date to a julian day count"
+ ],
+ "join": [
+ "string join(array src, string glue)",
+ "An alias for implode"
+ ],
+ "jpeg2wbmp": [
+ "bool jpeg2wbmp (string f_org, string f_dest, int d_height, int d_width, int threshold)",
+ "Convert JPEG image to WBMP image"
+ ],
+ "json_decode": [
+ "mixed json_decode(string json [, bool assoc [, long depth]])",
+ "Decodes the JSON representation into a PHP value"
+ ],
+ "json_encode": [
+ "string json_encode(mixed data [, int options])",
+ "Returns the JSON representation of a value"
+ ],
+ "json_last_error": [
+ "int json_last_error()",
+ "Returns the error code of the last json_decode()."
+ ],
+ "juliantojd": [
+ "int juliantojd(int month, int day, int year)",
+ "Converts a julian calendar date to julian day count"
+ ],
+ "key": [
+ "mixed key(array array_arg)",
+ "Return the key of the element currently pointed to by the internal array pointer"
+ ],
+ "krsort": [
+ "bool krsort(array &array_arg [, int sort_flags])",
+ "Sort an array by key value in reverse order"
+ ],
+ "ksort": [
+ "bool ksort(array &array_arg [, int sort_flags])",
+ "Sort an array by key"
+ ],
+ "lcfirst": [
+ "string lcfirst(string str)",
+ "Make a string's first character lowercase"
+ ],
+ "lcg_value": [
+ "float lcg_value()",
+ "Returns a value from the combined linear congruential generator"
+ ],
+ "lchgrp": [
+ "bool lchgrp(string filename, mixed group)",
+ "Change symlink group"
+ ],
+ "ldap_8859_to_t61": [
+ "string ldap_8859_to_t61(string value)",
+ "Translate 8859 characters to t61 characters"
+ ],
+ "ldap_add": [
+ "bool ldap_add(resource link, string dn, array entry)",
+ "Add entries to LDAP directory"
+ ],
+ "ldap_bind": [
+ "bool ldap_bind(resource link [, string dn [, string password]])",
+ "Bind to LDAP directory"
+ ],
+ "ldap_compare": [
+ "bool ldap_compare(resource link, string dn, string attr, string value)",
+ "Determine if an entry has a specific value for one of its attributes"
+ ],
+ "ldap_connect": [
+ "resource ldap_connect([string host [, int port [, string wallet [, string wallet_passwd [, int authmode]]]]])",
+ "Connect to an LDAP server"
+ ],
+ "ldap_count_entries": [
+ "int ldap_count_entries(resource link, resource result)",
+ "Count the number of entries in a search result"
+ ],
+ "ldap_delete": [
+ "bool ldap_delete(resource link, string dn)",
+ "Delete an entry from a directory"
+ ],
+ "ldap_dn2ufn": [
+ "string ldap_dn2ufn(string dn)",
+ "Convert DN to User Friendly Naming format"
+ ],
+ "ldap_err2str": [
+ "string ldap_err2str(int errno)",
+ "Convert error number to error string"
+ ],
+ "ldap_errno": [
+ "int ldap_errno(resource link)",
+ "Get the current ldap error number"
+ ],
+ "ldap_error": [
+ "string ldap_error(resource link)",
+ "Get the current ldap error string"
+ ],
+ "ldap_explode_dn": [
+ "array ldap_explode_dn(string dn, int with_attrib)",
+ "Splits DN into its component parts"
+ ],
+ "ldap_first_attribute": [
+ "string ldap_first_attribute(resource link, resource result_entry)",
+ "Return first attribute"
+ ],
+ "ldap_first_entry": [
+ "resource ldap_first_entry(resource link, resource result)",
+ "Return first result id"
+ ],
+ "ldap_first_reference": [
+ "resource ldap_first_reference(resource link, resource result)",
+ "Return first reference"
+ ],
+ "ldap_free_result": [
+ "bool ldap_free_result(resource result)",
+ "Free result memory"
+ ],
+ "ldap_get_attributes": [
+ "array ldap_get_attributes(resource link, resource result_entry)",
+ "Get attributes from a search result entry"
+ ],
+ "ldap_get_dn": [
+ "string ldap_get_dn(resource link, resource result_entry)",
+ "Get the DN of a result entry"
+ ],
+ "ldap_get_entries": [
+ "array ldap_get_entries(resource link, resource result)",
+ "Get all result entries"
+ ],
+ "ldap_get_option": [
+ "bool ldap_get_option(resource link, int option, mixed retval)",
+ "Get the current value of various session-wide parameters"
+ ],
+ "ldap_get_values_len": [
+ "array ldap_get_values_len(resource link, resource result_entry, string attribute)",
+ "Get all values with lengths from a result entry"
+ ],
+ "ldap_list": [
+ "resource ldap_list(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])",
+ "Single-level search"
+ ],
+ "ldap_mod_add": [
+ "bool ldap_mod_add(resource link, string dn, array entry)",
+ "Add attribute values to current"
+ ],
+ "ldap_mod_del": [
+ "bool ldap_mod_del(resource link, string dn, array entry)",
+ "Delete attribute values"
+ ],
+ "ldap_mod_replace": [
+ "bool ldap_mod_replace(resource link, string dn, array entry)",
+ "Replace attribute values with new ones"
+ ],
+ "ldap_next_attribute": [
+ "string ldap_next_attribute(resource link, resource result_entry)",
+ "Get the next attribute in result"
+ ],
+ "ldap_next_entry": [
+ "resource ldap_next_entry(resource link, resource result_entry)",
+ "Get next result entry"
+ ],
+ "ldap_next_reference": [
+ "resource ldap_next_reference(resource link, resource reference_entry)",
+ "Get next reference"
+ ],
+ "ldap_parse_reference": [
+ "bool ldap_parse_reference(resource link, resource reference_entry, array referrals)",
+ "Extract information from reference entry"
+ ],
+ "ldap_parse_result": [
+ "bool ldap_parse_result(resource link, resource result, int errcode, string matcheddn, string errmsg, array referrals)",
+ "Extract information from result"
+ ],
+ "ldap_read": [
+ "resource ldap_read(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])",
+ "Read an entry"
+ ],
+ "ldap_rename": [
+ "bool ldap_rename(resource link, string dn, string newrdn, string newparent, bool deleteoldrdn);",
+ "Modify the name of an entry"
+ ],
+ "ldap_sasl_bind": [
+ "bool ldap_sasl_bind(resource link [, string binddn [, string password [, string sasl_mech [, string sasl_realm [, string sasl_authc_id [, string sasl_authz_id [, string props]]]]]]])",
+ "Bind to LDAP directory using SASL"
+ ],
+ "ldap_search": [
+ "resource ldap_search(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])",
+ "Search LDAP tree under base_dn"
+ ],
+ "ldap_set_option": [
+ "bool ldap_set_option(resource link, int option, mixed newval)",
+ "Set the value of various session-wide parameters"
+ ],
+ "ldap_set_rebind_proc": [
+ "bool ldap_set_rebind_proc(resource link, string callback)",
+ "Set a callback function to do re-binds on referral chasing."
+ ],
+ "ldap_sort": [
+ "bool ldap_sort(resource link, resource result, string sortfilter)",
+ "Sort LDAP result entries"
+ ],
+ "ldap_start_tls": [
+ "bool ldap_start_tls(resource link)",
+ "Start TLS"
+ ],
+ "ldap_t61_to_8859": [
+ "string ldap_t61_to_8859(string value)",
+ "Translate t61 characters to 8859 characters"
+ ],
+ "ldap_unbind": [
+ "bool ldap_unbind(resource link)",
+ "Unbind from LDAP directory"
+ ],
+ "leak": [
+ "void leak(int num_bytes=3)",
+ "Cause an intentional memory leak, for testing/debugging purposes"
+ ],
+ "levenshtein": [
+ "int levenshtein(string str1, string str2[, int cost_ins, int cost_rep, int cost_del])",
+ "Calculate Levenshtein distance between two strings"
+ ],
+ "libxml_clear_errors": [
+ "void libxml_clear_errors()",
+ "Clear last error from libxml"
+ ],
+ "libxml_disable_entity_loader": [
+ "bool libxml_disable_entity_loader([boolean disable])",
+ "Disable/Enable ability to load external entities"
+ ],
+ "libxml_get_errors": [
+ "object libxml_get_errors()",
+ "Retrieve array of errors"
+ ],
+ "libxml_get_last_error": [
+ "object libxml_get_last_error()",
+ "Retrieve last error from libxml"
+ ],
+ "libxml_set_streams_context": [
+ "void libxml_set_streams_context(resource streams_context)",
+ "Set the streams context for the next libxml document load or write"
+ ],
+ "libxml_use_internal_errors": [
+ "bool libxml_use_internal_errors([boolean use_errors])",
+ "Disable libxml errors and allow user to fetch error information as needed"
+ ],
+ "link": [
+ "int link(string target, string link)",
+ "Create a hard link"
+ ],
+ "linkinfo": [
+ "int linkinfo(string filename)",
+ "Returns the st_dev field of the UNIX C stat structure describing the link"
+ ],
+ "litespeed_request_headers": [
+ "array litespeed_request_headers(void)",
+ "Fetch all HTTP request headers"
+ ],
+ "litespeed_response_headers": [
+ "array litespeed_response_headers(void)",
+ "Fetch all HTTP response headers"
+ ],
+ "locale_accept_from_http": [
+ "string locale_accept_from_http(string $http_accept)",
+ null
+ ],
+ "locale_canonicalize": [
+ "static string locale_canonicalize(Locale $loc, string $locale)",
+ "* @param string $locale The locale string to canonicalize"
+ ],
+ "locale_filter_matches": [
+ "boolean locale_filter_matches(string $langtag, string $locale[, bool $canonicalize])",
+ "* Checks if a $langtag filter matches with $locale according to RFC 4647's basic filtering algorithm"
+ ],
+ "locale_get_all_variants": [
+ "static array locale_get_all_variants($locale)",
+ "* gets an array containing the list of variants, or null"
+ ],
+ "locale_get_default": [
+ "static string locale_get_default( )",
+ "Get default locale"
+ ],
+ "locale_get_keywords": [
+ "static array locale_get_keywords(string $locale) {",
+ "* return an associative array containing keyword-value * pairs for this locale. The keys are keys to the array (doh!)"
+ ],
+ "locale_get_primary_language": [
+ "static string locale_get_primary_language($locale)",
+ "* gets the primary language for the $locale"
+ ],
+ "locale_get_region": [
+ "static string locale_get_region($locale)",
+ "* gets the region for the $locale"
+ ],
+ "locale_get_script": [
+ "static string locale_get_script($locale)",
+ "* gets the script for the $locale"
+ ],
+ "locale_lookup": [
+ "string locale_lookup(array $langtag, string $locale[, bool $canonicalize[, string $default = null]])",
+ "* Searchs the items in $langtag for the best match to the language * range"
+ ],
+ "locale_set_default": [
+ "static string locale_set_default( string $locale )",
+ "Set default locale"
+ ],
+ "localeconv": [
+ "array localeconv(void)",
+ "Returns numeric formatting information based on the current locale"
+ ],
+ "localtime": [
+ "array localtime([int timestamp [, bool associative_array]])",
+ "Returns the results of the C system call localtime as an associative array if the associative_array argument is set to 1 other wise it is a regular array"
+ ],
+ "log": [
+ "float log(float number, [float base])",
+ "Returns the natural logarithm of the number, or the base log if base is specified"
+ ],
+ "log10": [
+ "float log10(float number)",
+ "Returns the base-10 logarithm of the number"
+ ],
+ "log1p": [
+ "float log1p(float number)",
+ "Returns log(1 + number), computed in a way that accurate even when the value of number is close to zero"
+ ],
+ "long2ip": [
+ "string long2ip(int proper_address)",
+ "Converts an (IPv4) Internet network address into a string in Internet standard dotted format"
+ ],
+ "lstat": [
+ "array lstat(string filename)",
+ "Give information about a file or symbolic link"
+ ],
+ "ltrim": [
+ "string ltrim(string str [, string character_mask])",
+ "Strips whitespace from the beginning of a string"
+ ],
+ "mail": [
+ "int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])",
+ "Send an email message"
+ ],
+ "max": [
+ "mixed max(mixed arg1 [, mixed arg2 [, mixed ...]])",
+ "Return the highest value in an array or a series of arguments"
+ ],
+ "mb_check_encoding": [
+ "bool mb_check_encoding([string var[, string encoding]])",
+ "Check if the string is valid for the specified encoding"
+ ],
+ "mb_convert_case": [
+ "string mb_convert_case(string sourcestring, int mode [, string encoding])",
+ "Returns a case-folded version of sourcestring"
+ ],
+ "mb_convert_encoding": [
+ "string mb_convert_encoding(string str, string to-encoding [, mixed from-encoding])",
+ "Returns converted string in desired encoding"
+ ],
+ "mb_convert_kana": [
+ "string mb_convert_kana(string str [, string option] [, string encoding])",
+ "Conversion between full-width character and half-width character (Japanese)"
+ ],
+ "mb_convert_variables": [
+ "string mb_convert_variables(string to-encoding, mixed from-encoding, mixed vars [, ...])",
+ "Converts the string resource in variables to desired encoding"
+ ],
+ "mb_decode_mimeheader": [
+ "string mb_decode_mimeheader(string string)",
+ "Decodes the MIME \"encoded-word\" in the string"
+ ],
+ "mb_decode_numericentity": [
+ "string mb_decode_numericentity(string string, array convmap [, string encoding])",
+ "Converts HTML numeric entities to character code"
+ ],
+ "mb_detect_encoding": [
+ "string mb_detect_encoding(string str [, mixed encoding_list [, bool strict]])",
+ "Encodings of the given string is returned (as a string)"
+ ],
+ "mb_detect_order": [
+ "bool|array mb_detect_order([mixed encoding-list])",
+ "Sets the current detect_order or Return the current detect_order as a array"
+ ],
+ "mb_encode_mimeheader": [
+ "string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed [, int indent]]]])",
+ "Converts the string to MIME \"encoded-word\" in the format of =?charset?(B|Q)?encoded_string?="
+ ],
+ "mb_encode_numericentity": [
+ "string mb_encode_numericentity(string string, array convmap [, string encoding])",
+ "Converts specified characters to HTML numeric entities"
+ ],
+ "mb_encoding_aliases": [
+ "array mb_encoding_aliases(string encoding)",
+ "Returns an array of the aliases of a given encoding name"
+ ],
+ "mb_ereg": [
+ "int mb_ereg(string pattern, string string [, array registers])",
+ "Regular expression match for multibyte string"
+ ],
+ "mb_ereg_match": [
+ "bool mb_ereg_match(string pattern, string string [,string option])",
+ "Regular expression match for multibyte string"
+ ],
+ "mb_ereg_replace": [
+ "string mb_ereg_replace(string pattern, string replacement, string string [, string option])",
+ "Replace regular expression for multibyte string"
+ ],
+ "mb_ereg_search": [
+ "bool mb_ereg_search([string pattern[, string option]])",
+ "Regular expression search for multibyte string"
+ ],
+ "mb_ereg_search_getpos": [
+ "int mb_ereg_search_getpos(void)",
+ "Get search start position"
+ ],
+ "mb_ereg_search_getregs": [
+ "array mb_ereg_search_getregs(void)",
+ "Get matched substring of the last time"
+ ],
+ "mb_ereg_search_init": [
+ "bool mb_ereg_search_init(string string [, string pattern[, string option]])",
+ "Initialize string and regular expression for search."
+ ],
+ "mb_ereg_search_pos": [
+ "array mb_ereg_search_pos([string pattern[, string option]])",
+ "Regular expression search for multibyte string"
+ ],
+ "mb_ereg_search_regs": [
+ "array mb_ereg_search_regs([string pattern[, string option]])",
+ "Regular expression search for multibyte string"
+ ],
+ "mb_ereg_search_setpos": [
+ "bool mb_ereg_search_setpos(int position)",
+ "Set search start position"
+ ],
+ "mb_eregi": [
+ "int mb_eregi(string pattern, string string [, array registers])",
+ "Case-insensitive regular expression match for multibyte string"
+ ],
+ "mb_eregi_replace": [
+ "string mb_eregi_replace(string pattern, string replacement, string string)",
+ "Case insensitive replace regular expression for multibyte string"
+ ],
+ "mb_get_info": [
+ "mixed mb_get_info([string type])",
+ "Returns the current settings of mbstring"
+ ],
+ "mb_http_input": [
+ "mixed mb_http_input([string type])",
+ "Returns the input encoding"
+ ],
+ "mb_http_output": [
+ "string mb_http_output([string encoding])",
+ "Sets the current output_encoding or returns the current output_encoding as a string"
+ ],
+ "mb_internal_encoding": [
+ "string mb_internal_encoding([string encoding])",
+ "Sets the current internal encoding or Returns the current internal encoding as a string"
+ ],
+ "mb_language": [
+ "string mb_language([string language])",
+ "Sets the current language or Returns the current language as a string"
+ ],
+ "mb_list_encodings": [
+ "mixed mb_list_encodings()",
+ "Returns an array of all supported entity encodings"
+ ],
+ "mb_output_handler": [
+ "string mb_output_handler(string contents, int status)",
+ "Returns string in output buffer converted to the http_output encoding"
+ ],
+ "mb_parse_str": [
+ "bool mb_parse_str(string encoded_string [, array result])",
+ "Parses GET/POST/COOKIE data and sets global variables"
+ ],
+ "mb_preferred_mime_name": [
+ "string mb_preferred_mime_name(string encoding)",
+ "Return the preferred MIME name (charset) as a string"
+ ],
+ "mb_regex_encoding": [
+ "string mb_regex_encoding([string encoding])",
+ "Returns the current encoding for regex as a string."
+ ],
+ "mb_regex_set_options": [
+ "string mb_regex_set_options([string options])",
+ "Set or get the default options for mbregex functions"
+ ],
+ "mb_send_mail": [
+ "int mb_send_mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])",
+ "* Sends an email message with MIME scheme"
+ ],
+ "mb_split": [
+ "array mb_split(string pattern, string string [, int limit])",
+ "split multibyte string into array by regular expression"
+ ],
+ "mb_strcut": [
+ "string mb_strcut(string str, int start [, int length [, string encoding]])",
+ "Returns part of a string"
+ ],
+ "mb_strimwidth": [
+ "string mb_strimwidth(string str, int start, int width [, string trimmarker [, string encoding]])",
+ "Trim the string in terminal width"
+ ],
+ "mb_stripos": [
+ "int mb_stripos(string haystack, string needle [, int offset [, string encoding]])",
+ "Finds position of first occurrence of a string within another, case insensitive"
+ ],
+ "mb_stristr": [
+ "string mb_stristr(string haystack, string needle[, bool part[, string encoding]])",
+ "Finds first occurrence of a string within another, case insensitive"
+ ],
+ "mb_strlen": [
+ "int mb_strlen(string str [, string encoding])",
+ "Get character numbers of a string"
+ ],
+ "mb_strpos": [
+ "int mb_strpos(string haystack, string needle [, int offset [, string encoding]])",
+ "Find position of first occurrence of a string within another"
+ ],
+ "mb_strrchr": [
+ "string mb_strrchr(string haystack, string needle[, bool part[, string encoding]])",
+ "Finds the last occurrence of a character in a string within another"
+ ],
+ "mb_strrichr": [
+ "string mb_strrichr(string haystack, string needle[, bool part[, string encoding]])",
+ "Finds the last occurrence of a character in a string within another, case insensitive"
+ ],
+ "mb_strripos": [
+ "int mb_strripos(string haystack, string needle [, int offset [, string encoding]])",
+ "Finds position of last occurrence of a string within another, case insensitive"
+ ],
+ "mb_strrpos": [
+ "int mb_strrpos(string haystack, string needle [, int offset [, string encoding]])",
+ "Find position of last occurrence of a string within another"
+ ],
+ "mb_strstr": [
+ "string mb_strstr(string haystack, string needle[, bool part[, string encoding]])",
+ "Finds first occurrence of a string within another"
+ ],
+ "mb_strtolower": [
+ "string mb_strtolower(string sourcestring [, string encoding])",
+ "* Returns a lowercased version of sourcestring"
+ ],
+ "mb_strtoupper": [
+ "string mb_strtoupper(string sourcestring [, string encoding])",
+ "* Returns a uppercased version of sourcestring"
+ ],
+ "mb_strwidth": [
+ "int mb_strwidth(string str [, string encoding])",
+ "Gets terminal width of a string"
+ ],
+ "mb_substitute_character": [
+ "mixed mb_substitute_character([mixed substchar])",
+ "Sets the current substitute_character or returns the current substitute_character"
+ ],
+ "mb_substr": [
+ "string mb_substr(string str, int start [, int length [, string encoding]])",
+ "Returns part of a string"
+ ],
+ "mb_substr_count": [
+ "int mb_substr_count(string haystack, string needle [, string encoding])",
+ "Count the number of substring occurrences"
+ ],
+ "mcrypt_cbc": [
+ "string mcrypt_cbc(int cipher, string key, string data, int mode, string iv)",
+ "CBC crypt/decrypt data using key key with cipher cipher starting with iv"
+ ],
+ "mcrypt_cfb": [
+ "string mcrypt_cfb(int cipher, string key, string data, int mode, string iv)",
+ "CFB crypt/decrypt data using key key with cipher cipher starting with iv"
+ ],
+ "mcrypt_create_iv": [
+ "string mcrypt_create_iv(int size, int source)",
+ "Create an initialization vector (IV)"
+ ],
+ "mcrypt_decrypt": [
+ "string mcrypt_decrypt(string cipher, string key, string data, string mode, string iv)",
+ "OFB crypt/decrypt data using key key with cipher cipher starting with iv"
+ ],
+ "mcrypt_ecb": [
+ "string mcrypt_ecb(int cipher, string key, string data, int mode, string iv)",
+ "ECB crypt/decrypt data using key key with cipher cipher starting with iv"
+ ],
+ "mcrypt_enc_get_algorithms_name": [
+ "string mcrypt_enc_get_algorithms_name(resource td)",
+ "Returns the name of the algorithm specified by the descriptor td"
+ ],
+ "mcrypt_enc_get_block_size": [
+ "int mcrypt_enc_get_block_size(resource td)",
+ "Returns the block size of the cipher specified by the descriptor td"
+ ],
+ "mcrypt_enc_get_iv_size": [
+ "int mcrypt_enc_get_iv_size(resource td)",
+ "Returns the size of the IV in bytes of the algorithm specified by the descriptor td"
+ ],
+ "mcrypt_enc_get_key_size": [
+ "int mcrypt_enc_get_key_size(resource td)",
+ "Returns the maximum supported key size in bytes of the algorithm specified by the descriptor td"
+ ],
+ "mcrypt_enc_get_modes_name": [
+ "string mcrypt_enc_get_modes_name(resource td)",
+ "Returns the name of the mode specified by the descriptor td"
+ ],
+ "mcrypt_enc_get_supported_key_sizes": [
+ "array mcrypt_enc_get_supported_key_sizes(resource td)",
+ "This function decrypts the crypttext"
+ ],
+ "mcrypt_enc_is_block_algorithm": [
+ "bool mcrypt_enc_is_block_algorithm(resource td)",
+ "Returns TRUE if the alrogithm is a block algorithms"
+ ],
+ "mcrypt_enc_is_block_algorithm_mode": [
+ "bool mcrypt_enc_is_block_algorithm_mode(resource td)",
+ "Returns TRUE if the mode is for use with block algorithms"
+ ],
+ "mcrypt_enc_is_block_mode": [
+ "bool mcrypt_enc_is_block_mode(resource td)",
+ "Returns TRUE if the mode outputs blocks"
+ ],
+ "mcrypt_enc_self_test": [
+ "int mcrypt_enc_self_test(resource td)",
+ "This function runs the self test on the algorithm specified by the descriptor td"
+ ],
+ "mcrypt_encrypt": [
+ "string mcrypt_encrypt(string cipher, string key, string data, string mode, string iv)",
+ "OFB crypt/decrypt data using key key with cipher cipher starting with iv"
+ ],
+ "mcrypt_generic": [
+ "string mcrypt_generic(resource td, string data)",
+ "This function encrypts the plaintext"
+ ],
+ "mcrypt_generic_deinit": [
+ "bool mcrypt_generic_deinit(resource td)",
+ "This function terminates encrypt specified by the descriptor td"
+ ],
+ "mcrypt_generic_init": [
+ "int mcrypt_generic_init(resource td, string key, string iv)",
+ "This function initializes all buffers for the specific module"
+ ],
+ "mcrypt_get_block_size": [
+ "int mcrypt_get_block_size(string cipher, string module)",
+ "Get the key size of cipher"
+ ],
+ "mcrypt_get_cipher_name": [
+ "string mcrypt_get_cipher_name(string cipher)",
+ "Get the key size of cipher"
+ ],
+ "mcrypt_get_iv_size": [
+ "int mcrypt_get_iv_size(string cipher, string module)",
+ "Get the IV size of cipher (Usually the same as the blocksize)"
+ ],
+ "mcrypt_get_key_size": [
+ "int mcrypt_get_key_size(string cipher, string module)",
+ "Get the key size of cipher"
+ ],
+ "mcrypt_list_algorithms": [
+ "array mcrypt_list_algorithms([string lib_dir])",
+ "List all algorithms in \"module_dir\""
+ ],
+ "mcrypt_list_modes": [
+ "array mcrypt_list_modes([string lib_dir])",
+ "List all modes \"module_dir\""
+ ],
+ "mcrypt_module_close": [
+ "bool mcrypt_module_close(resource td)",
+ "Free the descriptor td"
+ ],
+ "mcrypt_module_get_algo_block_size": [
+ "int mcrypt_module_get_algo_block_size(string algorithm [, string lib_dir])",
+ "Returns the block size of the algorithm"
+ ],
+ "mcrypt_module_get_algo_key_size": [
+ "int mcrypt_module_get_algo_key_size(string algorithm [, string lib_dir])",
+ "Returns the maximum supported key size of the algorithm"
+ ],
+ "mcrypt_module_get_supported_key_sizes": [
+ "array mcrypt_module_get_supported_key_sizes(string algorithm [, string lib_dir])",
+ "This function decrypts the crypttext"
+ ],
+ "mcrypt_module_is_block_algorithm": [
+ "bool mcrypt_module_is_block_algorithm(string algorithm [, string lib_dir])",
+ "Returns TRUE if the algorithm is a block algorithm"
+ ],
+ "mcrypt_module_is_block_algorithm_mode": [
+ "bool mcrypt_module_is_block_algorithm_mode(string mode [, string lib_dir])",
+ "Returns TRUE if the mode is for use with block algorithms"
+ ],
+ "mcrypt_module_is_block_mode": [
+ "bool mcrypt_module_is_block_mode(string mode [, string lib_dir])",
+ "Returns TRUE if the mode outputs blocks of bytes"
+ ],
+ "mcrypt_module_open": [
+ "resource mcrypt_module_open(string cipher, string cipher_directory, string mode, string mode_directory)",
+ "Opens the module of the algorithm and the mode to be used"
+ ],
+ "mcrypt_module_self_test": [
+ "bool mcrypt_module_self_test(string algorithm [, string lib_dir])",
+ "Does a self test of the module \"module\""
+ ],
+ "mcrypt_ofb": [
+ "string mcrypt_ofb(int cipher, string key, string data, int mode, string iv)",
+ "OFB crypt/decrypt data using key key with cipher cipher starting with iv"
+ ],
+ "md5": [
+ "string md5(string str, [ bool raw_output])",
+ "Calculate the md5 hash of a string"
+ ],
+ "md5_file": [
+ "string md5_file(string filename [, bool raw_output])",
+ "Calculate the md5 hash of given filename"
+ ],
+ "mdecrypt_generic": [
+ "string mdecrypt_generic(resource td, string data)",
+ "This function decrypts the plaintext"
+ ],
+ "memory_get_peak_usage": [
+ "int memory_get_peak_usage([real_usage])",
+ "Returns the peak allocated by PHP memory"
+ ],
+ "memory_get_usage": [
+ "int memory_get_usage([real_usage])",
+ "Returns the allocated by PHP memory"
+ ],
+ "metaphone": [
+ "string metaphone(string text[, int phones])",
+ "Break english phrases down into their phonemes"
+ ],
+ "method_exists": [
+ "bool method_exists(object object, string method)",
+ "Checks if the class method exists"
+ ],
+ "mhash": [
+ "string mhash(int hash, string data [, string key])",
+ "Hash data with hash"
+ ],
+ "mhash_count": [
+ "int mhash_count(void)",
+ "Gets the number of available hashes"
+ ],
+ "mhash_get_block_size": [
+ "int mhash_get_block_size(int hash)",
+ "Gets the block size of hash"
+ ],
+ "mhash_get_hash_name": [
+ "string mhash_get_hash_name(int hash)",
+ "Gets the name of hash"
+ ],
+ "mhash_keygen_s2k": [
+ "string mhash_keygen_s2k(int hash, string input_password, string salt, int bytes)",
+ "Generates a key using hash functions"
+ ],
+ "microtime": [
+ "mixed microtime([bool get_as_float])",
+ "Returns either a string or a float containing the current time in seconds and microseconds"
+ ],
+ "mime_content_type": [
+ "string mime_content_type(string filename|resource stream)",
+ "Return content-type for file"
+ ],
+ "min": [
+ "mixed min(mixed arg1 [, mixed arg2 [, mixed ...]])",
+ "Return the lowest value in an array or a series of arguments"
+ ],
+ "mkdir": [
+ "bool mkdir(string pathname [, int mode [, bool recursive [, resource context]]])",
+ "Create a directory"
+ ],
+ "mktime": [
+ "int mktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])",
+ "Get UNIX timestamp for a date"
+ ],
+ "money_format": [
+ "string money_format(string format , float value)",
+ "Convert monetary value(s) to string"
+ ],
+ "move_uploaded_file": [
+ "bool move_uploaded_file(string path, string new_path)",
+ "Move a file if and only if it was created by an upload"
+ ],
+ "msg_get_queue": [
+ "resource msg_get_queue(int key [, int perms])",
+ "Attach to a message queue"
+ ],
+ "msg_queue_exists": [
+ "bool msg_queue_exists(int key)",
+ "Check wether a message queue exists"
+ ],
+ "msg_receive": [
+ "mixed msg_receive(resource queue, int desiredmsgtype, int &msgtype, int maxsize, mixed message [, bool unserialize=true [, int flags=0 [, int errorcode]]])",
+ "Send a message of type msgtype (must be > 0) to a message queue"
+ ],
+ "msg_remove_queue": [
+ "bool msg_remove_queue(resource queue)",
+ "Destroy the queue"
+ ],
+ "msg_send": [
+ "bool msg_send(resource queue, int msgtype, mixed message [, bool serialize=true [, bool blocking=true [, int errorcode]]])",
+ "Send a message of type msgtype (must be > 0) to a message queue"
+ ],
+ "msg_set_queue": [
+ "bool msg_set_queue(resource queue, array data)",
+ "Set information for a message queue"
+ ],
+ "msg_stat_queue": [
+ "array msg_stat_queue(resource queue)",
+ "Returns information about a message queue"
+ ],
+ "msgfmt_create": [
+ "MessageFormatter msgfmt_create( string $locale, string $pattern )",
+ "* Create formatter."
+ ],
+ "msgfmt_format": [
+ "mixed msgfmt_format( MessageFormatter $nf, array $args )",
+ "* Format a message."
+ ],
+ "msgfmt_format_message": [
+ "mixed msgfmt_format_message( string $locale, string $pattern, array $args )",
+ "* Format a message."
+ ],
+ "msgfmt_get_error_code": [
+ "int msgfmt_get_error_code( MessageFormatter $nf )",
+ "* Get formatter's last error code."
+ ],
+ "msgfmt_get_error_message": [
+ "string msgfmt_get_error_message( MessageFormatter $coll )",
+ "* Get text description for formatter's last error code."
+ ],
+ "msgfmt_get_locale": [
+ "string msgfmt_get_locale(MessageFormatter $mf)",
+ "* Get formatter locale."
+ ],
+ "msgfmt_get_pattern": [
+ "string msgfmt_get_pattern( MessageFormatter $mf )",
+ "* Get formatter pattern."
+ ],
+ "msgfmt_parse": [
+ "array msgfmt_parse( MessageFormatter $nf, string $source )",
+ "* Parse a message."
+ ],
+ "msgfmt_set_pattern": [
+ "bool msgfmt_set_pattern( MessageFormatter $mf, string $pattern )",
+ "* Set formatter pattern."
+ ],
+ "mssql_bind": [
+ "bool mssql_bind(resource stmt, string param_name, mixed var, int type [, bool is_output [, bool is_null [, int maxlen]]])",
+ "Adds a parameter to a stored procedure or a remote stored procedure"
+ ],
+ "mssql_close": [
+ "bool mssql_close([resource conn_id])",
+ "Closes a connection to a MS-SQL server"
+ ],
+ "mssql_connect": [
+ "int mssql_connect([string servername [, string username [, string password [, bool new_link]]]])",
+ "Establishes a connection to a MS-SQL server"
+ ],
+ "mssql_data_seek": [
+ "bool mssql_data_seek(resource result_id, int offset)",
+ "Moves the internal row pointer of the MS-SQL result associated with the specified result identifier to pointer to the specified row number"
+ ],
+ "mssql_execute": [
+ "mixed mssql_execute(resource stmt [, bool skip_results = false])",
+ "Executes a stored procedure on a MS-SQL server database"
+ ],
+ "mssql_fetch_array": [
+ "array mssql_fetch_array(resource result_id [, int result_type])",
+ "Returns an associative array of the current row in the result set specified by result_id"
+ ],
+ "mssql_fetch_assoc": [
+ "array mssql_fetch_assoc(resource result_id)",
+ "Returns an associative array of the current row in the result set specified by result_id"
+ ],
+ "mssql_fetch_batch": [
+ "int mssql_fetch_batch(resource result_index)",
+ "Returns the next batch of records"
+ ],
+ "mssql_fetch_field": [
+ "object mssql_fetch_field(resource result_id [, int offset])",
+ "Gets information about certain fields in a query result"
+ ],
+ "mssql_fetch_object": [
+ "object mssql_fetch_object(resource result_id)",
+ "Returns a pseudo-object of the current row in the result set specified by result_id"
+ ],
+ "mssql_fetch_row": [
+ "array mssql_fetch_row(resource result_id)",
+ "Returns an array of the current row in the result set specified by result_id"
+ ],
+ "mssql_field_length": [
+ "int mssql_field_length(resource result_id [, int offset])",
+ "Get the length of a MS-SQL field"
+ ],
+ "mssql_field_name": [
+ "string mssql_field_name(resource result_id [, int offset])",
+ "Returns the name of the field given by offset in the result set given by result_id"
+ ],
+ "mssql_field_seek": [
+ "bool mssql_field_seek(resource result_id, int offset)",
+ "Seeks to the specified field offset"
+ ],
+ "mssql_field_type": [
+ "string mssql_field_type(resource result_id [, int offset])",
+ "Returns the type of a field"
+ ],
+ "mssql_free_result": [
+ "bool mssql_free_result(resource result_index)",
+ "Free a MS-SQL result index"
+ ],
+ "mssql_free_statement": [
+ "bool mssql_free_statement(resource result_index)",
+ "Free a MS-SQL statement index"
+ ],
+ "mssql_get_last_message": [
+ "string mssql_get_last_message(void)",
+ "Gets the last message from the MS-SQL server"
+ ],
+ "mssql_guid_string": [
+ "string mssql_guid_string(string binary [,bool short_format])",
+ "Converts a 16 byte binary GUID to a string"
+ ],
+ "mssql_init": [
+ "int mssql_init(string sp_name [, resource conn_id])",
+ "Initializes a stored procedure or a remote stored procedure"
+ ],
+ "mssql_min_error_severity": [
+ "void mssql_min_error_severity(int severity)",
+ "Sets the lower error severity"
+ ],
+ "mssql_min_message_severity": [
+ "void mssql_min_message_severity(int severity)",
+ "Sets the lower message severity"
+ ],
+ "mssql_next_result": [
+ "bool mssql_next_result(resource result_id)",
+ "Move the internal result pointer to the next result"
+ ],
+ "mssql_num_fields": [
+ "int mssql_num_fields(resource mssql_result_index)",
+ "Returns the number of fields fetched in from the result id specified"
+ ],
+ "mssql_num_rows": [
+ "int mssql_num_rows(resource mssql_result_index)",
+ "Returns the number of rows fetched in from the result id specified"
+ ],
+ "mssql_pconnect": [
+ "int mssql_pconnect([string servername [, string username [, string password [, bool new_link]]]])",
+ "Establishes a persistent connection to a MS-SQL server"
+ ],
+ "mssql_query": [
+ "resource mssql_query(string query [, resource conn_id [, int batch_size]])",
+ "Perform an SQL query on a MS-SQL server database"
+ ],
+ "mssql_result": [
+ "string mssql_result(resource result_id, int row, mixed field)",
+ "Returns the contents of one cell from a MS-SQL result set"
+ ],
+ "mssql_rows_affected": [
+ "int mssql_rows_affected(resource conn_id)",
+ "Returns the number of records affected by the query"
+ ],
+ "mssql_select_db": [
+ "bool mssql_select_db(string database_name [, resource conn_id])",
+ "Select a MS-SQL database"
+ ],
+ "mt_getrandmax": [
+ "int mt_getrandmax(void)",
+ "Returns the maximum value a random number from Mersenne Twister can have"
+ ],
+ "mt_rand": [
+ "int mt_rand([int min, int max])",
+ "Returns a random number from Mersenne Twister"
+ ],
+ "mt_srand": [
+ "void mt_srand([int seed])",
+ "Seeds Mersenne Twister random number generator"
+ ],
+ "mysql_affected_rows": [
+ "int mysql_affected_rows([int link_identifier])",
+ "Gets number of affected rows in previous MySQL operation"
+ ],
+ "mysql_client_encoding": [
+ "string mysql_client_encoding([int link_identifier])",
+ "Returns the default character set for the current connection"
+ ],
+ "mysql_close": [
+ "bool mysql_close([int link_identifier])",
+ "Close a MySQL connection"
+ ],
+ "mysql_connect": [
+ "resource mysql_connect([string hostname[:port][:/path/to/socket] [, string username [, string password [, bool new [, int flags]]]]])",
+ "Opens a connection to a MySQL Server"
+ ],
+ "mysql_create_db": [
+ "bool mysql_create_db(string database_name [, int link_identifier])",
+ "Create a MySQL database"
+ ],
+ "mysql_data_seek": [
+ "bool mysql_data_seek(resource result, int row_number)",
+ "Move internal result pointer"
+ ],
+ "mysql_db_query": [
+ "resource mysql_db_query(string database_name, string query [, int link_identifier])",
+ "Sends an SQL query to MySQL"
+ ],
+ "mysql_drop_db": [
+ "bool mysql_drop_db(string database_name [, int link_identifier])",
+ "Drops (delete) a MySQL database"
+ ],
+ "mysql_errno": [
+ "int mysql_errno([int link_identifier])",
+ "Returns the number of the error message from previous MySQL operation"
+ ],
+ "mysql_error": [
+ "string mysql_error([int link_identifier])",
+ "Returns the text of the error message from previous MySQL operation"
+ ],
+ "mysql_escape_string": [
+ "string mysql_escape_string(string to_be_escaped)",
+ "Escape string for mysql query"
+ ],
+ "mysql_fetch_array": [
+ "array mysql_fetch_array(resource result [, int result_type])",
+ "Fetch a result row as an array (associative, numeric or both)"
+ ],
+ "mysql_fetch_assoc": [
+ "array mysql_fetch_assoc(resource result)",
+ "Fetch a result row as an associative array"
+ ],
+ "mysql_fetch_field": [
+ "object mysql_fetch_field(resource result [, int field_offset])",
+ "Gets column information from a result and return as an object"
+ ],
+ "mysql_fetch_lengths": [
+ "array mysql_fetch_lengths(resource result)",
+ "Gets max data size of each column in a result"
+ ],
+ "mysql_fetch_object": [
+ "object mysql_fetch_object(resource result [, string class_name [, NULL|array ctor_params]])",
+ "Fetch a result row as an object"
+ ],
+ "mysql_fetch_row": [
+ "array mysql_fetch_row(resource result)",
+ "Gets a result row as an enumerated array"
+ ],
+ "mysql_field_flags": [
+ "string mysql_field_flags(resource result, int field_offset)",
+ "Gets the flags associated with the specified field in a result"
+ ],
+ "mysql_field_len": [
+ "int mysql_field_len(resource result, int field_offset)",
+ "Returns the length of the specified field"
+ ],
+ "mysql_field_name": [
+ "string mysql_field_name(resource result, int field_index)",
+ "Gets the name of the specified field in a result"
+ ],
+ "mysql_field_seek": [
+ "bool mysql_field_seek(resource result, int field_offset)",
+ "Sets result pointer to a specific field offset"
+ ],
+ "mysql_field_table": [
+ "string mysql_field_table(resource result, int field_offset)",
+ "Gets name of the table the specified field is in"
+ ],
+ "mysql_field_type": [
+ "string mysql_field_type(resource result, int field_offset)",
+ "Gets the type of the specified field in a result"
+ ],
+ "mysql_free_result": [
+ "bool mysql_free_result(resource result)",
+ "Free result memory"
+ ],
+ "mysql_get_client_info": [
+ "string mysql_get_client_info(void)",
+ "Returns a string that represents the client library version"
+ ],
+ "mysql_get_host_info": [
+ "string mysql_get_host_info([int link_identifier])",
+ "Returns a string describing the type of connection in use, including the server host name"
+ ],
+ "mysql_get_proto_info": [
+ "int mysql_get_proto_info([int link_identifier])",
+ "Returns the protocol version used by current connection"
+ ],
+ "mysql_get_server_info": [
+ "string mysql_get_server_info([int link_identifier])",
+ "Returns a string that represents the server version number"
+ ],
+ "mysql_info": [
+ "string mysql_info([int link_identifier])",
+ "Returns a string containing information about the most recent query"
+ ],
+ "mysql_insert_id": [
+ "int mysql_insert_id([int link_identifier])",
+ "Gets the ID generated from the previous INSERT operation"
+ ],
+ "mysql_list_dbs": [
+ "resource mysql_list_dbs([int link_identifier])",
+ "List databases available on a MySQL server"
+ ],
+ "mysql_list_fields": [
+ "resource mysql_list_fields(string database_name, string table_name [, int link_identifier])",
+ "List MySQL result fields"
+ ],
+ "mysql_list_processes": [
+ "resource mysql_list_processes([int link_identifier])",
+ "Returns a result set describing the current server threads"
+ ],
+ "mysql_list_tables": [
+ "resource mysql_list_tables(string database_name [, int link_identifier])",
+ "List tables in a MySQL database"
+ ],
+ "mysql_num_fields": [
+ "int mysql_num_fields(resource result)",
+ "Gets number of fields in a result"
+ ],
+ "mysql_num_rows": [
+ "int mysql_num_rows(resource result)",
+ "Gets number of rows in a result"
+ ],
+ "mysql_pconnect": [
+ "resource mysql_pconnect([string hostname[:port][:/path/to/socket] [, string username [, string password [, int flags]]]])",
+ "Opens a persistent connection to a MySQL Server"
+ ],
+ "mysql_ping": [
+ "bool mysql_ping([int link_identifier])",
+ "Ping a server connection. If no connection then reconnect."
+ ],
+ "mysql_query": [
+ "resource mysql_query(string query [, int link_identifier])",
+ "Sends an SQL query to MySQL"
+ ],
+ "mysql_real_escape_string": [
+ "string mysql_real_escape_string(string to_be_escaped [, int link_identifier])",
+ "Escape special characters in a string for use in a SQL statement, taking into account the current charset of the connection"
+ ],
+ "mysql_result": [
+ "mixed mysql_result(resource result, int row [, mixed field])",
+ "Gets result data"
+ ],
+ "mysql_select_db": [
+ "bool mysql_select_db(string database_name [, int link_identifier])",
+ "Selects a MySQL database"
+ ],
+ "mysql_set_charset": [
+ "bool mysql_set_charset(string csname [, int link_identifier])",
+ "sets client character set"
+ ],
+ "mysql_stat": [
+ "string mysql_stat([int link_identifier])",
+ "Returns a string containing status information"
+ ],
+ "mysql_thread_id": [
+ "int mysql_thread_id([int link_identifier])",
+ "Returns the thread id of current connection"
+ ],
+ "mysql_unbuffered_query": [
+ "resource mysql_unbuffered_query(string query [, int link_identifier])",
+ "Sends an SQL query to MySQL, without fetching and buffering the result rows"
+ ],
+ "mysqli_affected_rows": [
+ "mixed mysqli_affected_rows(object link)",
+ "Get number of affected rows in previous MySQL operation"
+ ],
+ "mysqli_autocommit": [
+ "bool mysqli_autocommit(object link, bool mode)",
+ "Turn auto commit on or of"
+ ],
+ "mysqli_cache_stats": [
+ "array mysqli_cache_stats(void)",
+ "Returns statistics about the zval cache"
+ ],
+ "mysqli_change_user": [
+ "bool mysqli_change_user(object link, string user, string password, string database)",
+ "Change logged-in user of the active connection"
+ ],
+ "mysqli_character_set_name": [
+ "string mysqli_character_set_name(object link)",
+ "Returns the name of the character set used for this connection"
+ ],
+ "mysqli_close": [
+ "bool mysqli_close(object link)",
+ "Close connection"
+ ],
+ "mysqli_commit": [
+ "bool mysqli_commit(object link)",
+ "Commit outstanding actions and close transaction"
+ ],
+ "mysqli_connect": [
+ "object mysqli_connect([string hostname [,string username [,string passwd [,string dbname [,int port [,string socket]]]]]])",
+ "Open a connection to a mysql server"
+ ],
+ "mysqli_connect_errno": [
+ "int mysqli_connect_errno(void)",
+ "Returns the numerical value of the error message from last connect command"
+ ],
+ "mysqli_connect_error": [
+ "string mysqli_connect_error(void)",
+ "Returns the text of the error message from previous MySQL operation"
+ ],
+ "mysqli_data_seek": [
+ "bool mysqli_data_seek(object result, int offset)",
+ "Move internal result pointer"
+ ],
+ "mysqli_debug": [
+ "void mysqli_debug(string debug)",
+ ""
+ ],
+ "mysqli_dump_debug_info": [
+ "bool mysqli_dump_debug_info(object link)",
+ ""
+ ],
+ "mysqli_embedded_server_end": [
+ "void mysqli_embedded_server_end(void)",
+ ""
+ ],
+ "mysqli_embedded_server_start": [
+ "bool mysqli_embedded_server_start(bool start, array arguments, array groups)",
+ "initialize and start embedded server"
+ ],
+ "mysqli_errno": [
+ "int mysqli_errno(object link)",
+ "Returns the numerical value of the error message from previous MySQL operation"
+ ],
+ "mysqli_error": [
+ "string mysqli_error(object link)",
+ "Returns the text of the error message from previous MySQL operation"
+ ],
+ "mysqli_fetch_all": [
+ "mixed mysqli_fetch_all (object result [,int resulttype])",
+ "Fetches all result rows as an associative array, a numeric array, or both"
+ ],
+ "mysqli_fetch_array": [
+ "mixed mysqli_fetch_array (object result [,int resulttype])",
+ "Fetch a result row as an associative array, a numeric array, or both"
+ ],
+ "mysqli_fetch_assoc": [
+ "mixed mysqli_fetch_assoc (object result)",
+ "Fetch a result row as an associative array"
+ ],
+ "mysqli_fetch_field": [
+ "mixed mysqli_fetch_field (object result)",
+ "Get column information from a result and return as an object"
+ ],
+ "mysqli_fetch_field_direct": [
+ "mixed mysqli_fetch_field_direct (object result, int offset)",
+ "Fetch meta-data for a single field"
+ ],
+ "mysqli_fetch_fields": [
+ "mixed mysqli_fetch_fields (object result)",
+ "Return array of objects containing field meta-data"
+ ],
+ "mysqli_fetch_lengths": [
+ "mixed mysqli_fetch_lengths (object result)",
+ "Get the length of each output in a result"
+ ],
+ "mysqli_fetch_object": [
+ "mixed mysqli_fetch_object (object result [, string class_name [, NULL|array ctor_params]])",
+ "Fetch a result row as an object"
+ ],
+ "mysqli_fetch_row": [
+ "array mysqli_fetch_row (object result)",
+ "Get a result row as an enumerated array"
+ ],
+ "mysqli_field_count": [
+ "int mysqli_field_count(object link)",
+ "Fetch the number of fields returned by the last query for the given link"
+ ],
+ "mysqli_field_seek": [
+ "int mysqli_field_seek(object result, int fieldnr)",
+ "Set result pointer to a specified field offset"
+ ],
+ "mysqli_field_tell": [
+ "int mysqli_field_tell(object result)",
+ "Get current field offset of result pointer"
+ ],
+ "mysqli_free_result": [
+ "void mysqli_free_result(object result)",
+ "Free query result memory for the given result handle"
+ ],
+ "mysqli_get_charset": [
+ "object mysqli_get_charset(object link)",
+ "returns a character set object"
+ ],
+ "mysqli_get_client_info": [
+ "string mysqli_get_client_info(void)",
+ "Get MySQL client info"
+ ],
+ "mysqli_get_client_stats": [
+ "array mysqli_get_client_stats(void)",
+ "Returns statistics about the zval cache"
+ ],
+ "mysqli_get_client_version": [
+ "int mysqli_get_client_version(void)",
+ "Get MySQL client info"
+ ],
+ "mysqli_get_connection_stats": [
+ "array mysqli_get_connection_stats(void)",
+ "Returns statistics about the zval cache"
+ ],
+ "mysqli_get_host_info": [
+ "string mysqli_get_host_info (object link)",
+ "Get MySQL host info"
+ ],
+ "mysqli_get_proto_info": [
+ "int mysqli_get_proto_info(object link)",
+ "Get MySQL protocol information"
+ ],
+ "mysqli_get_server_info": [
+ "string mysqli_get_server_info(object link)",
+ "Get MySQL server info"
+ ],
+ "mysqli_get_server_version": [
+ "int mysqli_get_server_version(object link)",
+ "Return the MySQL version for the server referenced by the given link"
+ ],
+ "mysqli_get_warnings": [
+ "object mysqli_get_warnings(object link) */",
+ "PHP_FUNCTION(mysqli_get_warnings) { MY_MYSQL *mysql; zval *mysql_link; MYSQLI_RESOURCE *mysqli_resource; MYSQLI_WARNING *w; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), \"O\", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL*, &mysql_link, \"mysqli_link\", MYSQLI_STATUS_VALID); if (mysql_warning_count(mysql->mysql)) { w = php_get_warnings(mysql->mysql TSRMLS_CC); } else { RETURN_FALSE; } mysqli_resource = (MYSQLI_RESOURCE *)ecalloc (1, sizeof(MYSQLI_RESOURCE)); mysqli_resource->ptr = mysqli_resource->info = (void *)w; mysqli_resource->status = MYSQLI_STATUS_VALID; MYSQLI_RETURN_RESOURCE(mysqli_resource, mysqli_warning_class_entry); } /* }}}"
+ ],
+ "mysqli_info": [
+ "string mysqli_info(object link)",
+ "Get information about the most recent query"
+ ],
+ "mysqli_init": [
+ "resource mysqli_init(void)",
+ "Initialize mysqli and return a resource for use with mysql_real_connect"
+ ],
+ "mysqli_insert_id": [
+ "mixed mysqli_insert_id(object link)",
+ "Get the ID generated from the previous INSERT operation"
+ ],
+ "mysqli_kill": [
+ "bool mysqli_kill(object link, int processid)",
+ "Kill a mysql process on the server"
+ ],
+ "mysqli_link_construct": [
+ "object mysqli_link_construct()",
+ ""
+ ],
+ "mysqli_more_results": [
+ "bool mysqli_more_results(object link)",
+ "check if there any more query results from a multi query"
+ ],
+ "mysqli_multi_query": [
+ "bool mysqli_multi_query(object link, string query)",
+ "allows to execute multiple queries"
+ ],
+ "mysqli_next_result": [
+ "bool mysqli_next_result(object link)",
+ "read next result from multi_query"
+ ],
+ "mysqli_num_fields": [
+ "int mysqli_num_fields(object result)",
+ "Get number of fields in result"
+ ],
+ "mysqli_num_rows": [
+ "mixed mysqli_num_rows(object result)",
+ "Get number of rows in result"
+ ],
+ "mysqli_options": [
+ "bool mysqli_options(object link, int flags, mixed values)",
+ "Set options"
+ ],
+ "mysqli_ping": [
+ "bool mysqli_ping(object link)",
+ "Ping a server connection or reconnect if there is no connection"
+ ],
+ "mysqli_poll": [
+ "int mysqli_poll(array read, array write, array error, long sec [, long usec])",
+ "Poll connections"
+ ],
+ "mysqli_prepare": [
+ "mixed mysqli_prepare(object link, string query)",
+ "Prepare a SQL statement for execution"
+ ],
+ "mysqli_query": [
+ "mixed mysqli_query(object link, string query [,int resultmode]) */",
+ "PHP_FUNCTION(mysqli_query) { MY_MYSQL *mysql; zval *mysql_link; MYSQLI_RESOURCE *mysqli_resource; MYSQL_RES *result; char *query = NULL; unsigned int query_len; unsigned long resultmode = MYSQLI_STORE_RESULT; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), \"Os|l\", &mysql_link, mysqli_link_class_entry, &query, &query_len, &resultmode) == FAILURE) { return; } if (!query_len) { php_error_docref(NULL TSRMLS_CC, E_WARNING, \"Empty query\"); RETURN_FALSE; } if ((resultmode & ~MYSQLI_ASYNC) != MYSQLI_USE_RESULT && (resultmode & ~MYSQLI_ASYNC) != MYSQLI_STORE_RESULT) { php_error_docref(NULL TSRMLS_CC, E_WARNING, \"Invalid value for resultmode\"); RETURN_FALSE; } MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL*, &mysql_link, \"mysqli_link\", MYSQLI_STATUS_VALID); MYSQLI_DISABLE_MQ; #ifdef MYSQLI_USE_MYSQLND if (resultmode & MYSQLI_ASYNC) { if (mysqli_async_query(mysql->mysql, query, query_len)) { MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); RETURN_FALSE; } mysql->async_result_fetch_type = resultmode & ~MYSQLI_ASYNC; RETURN_TRUE; } #endif if (mysql_real_query(mysql->mysql, query, query_len)) { MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); RETURN_FALSE; } if (!mysql_field_count(mysql->mysql)) { /* no result set - not a SELECT"
+ ],
+ "mysqli_real_connect": [
+ "bool mysqli_real_connect(object link [,string hostname [,string username [,string passwd [,string dbname [,int port [,string socket [,int flags]]]]]]])",
+ "Open a connection to a mysql server"
+ ],
+ "mysqli_real_escape_string": [
+ "string mysqli_real_escape_string(object link, string escapestr)",
+ "Escapes special characters in a string for use in a SQL statement, taking into account the current charset of the connection"
+ ],
+ "mysqli_real_query": [
+ "bool mysqli_real_query(object link, string query)",
+ "Binary-safe version of mysql_query()"
+ ],
+ "mysqli_reap_async_query": [
+ "int mysqli_reap_async_query(object link)",
+ "Poll connections"
+ ],
+ "mysqli_refresh": [
+ "bool mysqli_refresh(object link, long options)",
+ "Flush tables or caches, or reset replication server information"
+ ],
+ "mysqli_report": [
+ "bool mysqli_report(int flags)",
+ "sets report level"
+ ],
+ "mysqli_rollback": [
+ "bool mysqli_rollback(object link)",
+ "Undo actions from current transaction"
+ ],
+ "mysqli_select_db": [
+ "bool mysqli_select_db(object link, string dbname)",
+ "Select a MySQL database"
+ ],
+ "mysqli_set_charset": [
+ "bool mysqli_set_charset(object link, string csname)",
+ "sets client character set"
+ ],
+ "mysqli_set_local_infile_default": [
+ "void mysqli_set_local_infile_default(object link)",
+ "unsets user defined handler for load local infile command"
+ ],
+ "mysqli_set_local_infile_handler": [
+ "bool mysqli_set_local_infile_handler(object link, callback read_func)",
+ "Set callback functions for LOAD DATA LOCAL INFILE"
+ ],
+ "mysqli_sqlstate": [
+ "string mysqli_sqlstate(object link)",
+ "Returns the SQLSTATE error from previous MySQL operation"
+ ],
+ "mysqli_ssl_set": [
+ "bool mysqli_ssl_set(object link ,string key ,string cert ,string ca ,string capath ,string cipher])",
+ ""
+ ],
+ "mysqli_stat": [
+ "mixed mysqli_stat(object link)",
+ "Get current system status"
+ ],
+ "mysqli_stmt_affected_rows": [
+ "mixed mysqli_stmt_affected_rows(object stmt)",
+ "Return the number of rows affected in the last query for the given link"
+ ],
+ "mysqli_stmt_attr_get": [
+ "int mysqli_stmt_attr_get(object stmt, long attr)",
+ ""
+ ],
+ "mysqli_stmt_attr_set": [
+ "int mysqli_stmt_attr_set(object stmt, long attr, long mode)",
+ ""
+ ],
+ "mysqli_stmt_bind_param": [
+ "bool mysqli_stmt_bind_param(object stmt, string types, mixed variable [,mixed,....])",
+ "Bind variables to a prepared statement as parameters"
+ ],
+ "mysqli_stmt_bind_result": [
+ "bool mysqli_stmt_bind_result(object stmt, mixed var, [,mixed, ...])",
+ "Bind variables to a prepared statement for result storage"
+ ],
+ "mysqli_stmt_close": [
+ "bool mysqli_stmt_close(object stmt)",
+ "Close statement"
+ ],
+ "mysqli_stmt_data_seek": [
+ "void mysqli_stmt_data_seek(object stmt, int offset)",
+ "Move internal result pointer"
+ ],
+ "mysqli_stmt_errno": [
+ "int mysqli_stmt_errno(object stmt)",
+ ""
+ ],
+ "mysqli_stmt_error": [
+ "string mysqli_stmt_error(object stmt)",
+ ""
+ ],
+ "mysqli_stmt_execute": [
+ "bool mysqli_stmt_execute(object stmt)",
+ "Execute a prepared statement"
+ ],
+ "mysqli_stmt_fetch": [
+ "mixed mysqli_stmt_fetch(object stmt)",
+ "Fetch results from a prepared statement into the bound variables"
+ ],
+ "mysqli_stmt_field_count": [
+ "int mysqli_stmt_field_count(object stmt) {",
+ "Return the number of result columns for the given statement"
+ ],
+ "mysqli_stmt_free_result": [
+ "void mysqli_stmt_free_result(object stmt)",
+ "Free stored result memory for the given statement handle"
+ ],
+ "mysqli_stmt_get_result": [
+ "object mysqli_stmt_get_result(object link)",
+ "Buffer result set on client"
+ ],
+ "mysqli_stmt_get_warnings": [
+ "object mysqli_stmt_get_warnings(object link) */",
+ "PHP_FUNCTION(mysqli_stmt_get_warnings) { MY_STMT *stmt; zval *stmt_link; MYSQLI_RESOURCE *mysqli_resource; MYSQLI_WARNING *w; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), \"O\", &stmt_link, mysqli_stmt_class_entry) == FAILURE) { return; } MYSQLI_FETCH_RESOURCE(stmt, MY_STMT*, &stmt_link, \"mysqli_stmt\", MYSQLI_STATUS_VALID); if (mysqli_stmt_warning_count(stmt->stmt)) { w = php_get_warnings(mysqli_stmt_get_connection(stmt->stmt) TSRMLS_CC); } else { RETURN_FALSE; } mysqli_resource = (MYSQLI_RESOURCE *)ecalloc (1, sizeof(MYSQLI_RESOURCE)); mysqli_resource->ptr = mysqli_resource->info = (void *)w; mysqli_resource->status = MYSQLI_STATUS_VALID; MYSQLI_RETURN_RESOURCE(mysqli_resource, mysqli_warning_class_entry); } /* }}}"
+ ],
+ "mysqli_stmt_init": [
+ "mixed mysqli_stmt_init(object link)",
+ "Initialize statement object"
+ ],
+ "mysqli_stmt_insert_id": [
+ "mixed mysqli_stmt_insert_id(object stmt)",
+ "Get the ID generated from the previous INSERT operation"
+ ],
+ "mysqli_stmt_next_result": [
+ "bool mysqli_stmt_next_result(object link)",
+ "read next result from multi_query"
+ ],
+ "mysqli_stmt_num_rows": [
+ "mixed mysqli_stmt_num_rows(object stmt)",
+ "Return the number of rows in statements result set"
+ ],
+ "mysqli_stmt_param_count": [
+ "int mysqli_stmt_param_count(object stmt)",
+ "Return the number of parameter for the given statement"
+ ],
+ "mysqli_stmt_prepare": [
+ "bool mysqli_stmt_prepare(object stmt, string query)",
+ "prepare server side statement with query"
+ ],
+ "mysqli_stmt_reset": [
+ "bool mysqli_stmt_reset(object stmt)",
+ "reset a prepared statement"
+ ],
+ "mysqli_stmt_result_metadata": [
+ "mixed mysqli_stmt_result_metadata(object stmt)",
+ "return result set from statement"
+ ],
+ "mysqli_stmt_send_long_data": [
+ "bool mysqli_stmt_send_long_data(object stmt, int param_nr, string data)",
+ ""
+ ],
+ "mysqli_stmt_sqlstate": [
+ "string mysqli_stmt_sqlstate(object stmt)",
+ ""
+ ],
+ "mysqli_stmt_store_result": [
+ "bool mysqli_stmt_store_result(stmt)",
+ ""
+ ],
+ "mysqli_store_result": [
+ "object mysqli_store_result(object link)",
+ "Buffer result set on client"
+ ],
+ "mysqli_thread_id": [
+ "int mysqli_thread_id(object link)",
+ "Return the current thread ID"
+ ],
+ "mysqli_thread_safe": [
+ "bool mysqli_thread_safe(void)",
+ "Return whether thread safety is given or not"
+ ],
+ "mysqli_use_result": [
+ "mixed mysqli_use_result(object link)",
+ "Directly retrieve query results - do not buffer results on client side"
+ ],
+ "mysqli_warning_count": [
+ "int mysqli_warning_count (object link)",
+ "Return number of warnings from the last query for the given link"
+ ],
+ "natcasesort": [
+ "void natcasesort(array &array_arg)",
+ "Sort an array using case-insensitive natural sort"
+ ],
+ "natsort": [
+ "void natsort(array &array_arg)",
+ "Sort an array using natural sort"
+ ],
+ "next": [
+ "mixed next(array array_arg)",
+ "Move array argument's internal pointer to the next element and return it"
+ ],
+ "ngettext": [
+ "string ngettext(string MSGID1, string MSGID2, int N)",
+ "Plural version of gettext()"
+ ],
+ "nl2br": [
+ "string nl2br(string str [, bool is_xhtml])",
+ "Converts newlines to HTML line breaks"
+ ],
+ "nl_langinfo": [
+ "string nl_langinfo(int item)",
+ "Query language and locale information"
+ ],
+ "normalizer_is_normalize": [
+ "bool normalizer_is_normalize( string $input [, string $form = FORM_C] )",
+ "* Test if a string is in a given normalization form."
+ ],
+ "normalizer_normalize": [
+ "string normalizer_normalize( string $input [, string $form = FORM_C] )",
+ "* Normalize a string."
+ ],
+ "nsapi_request_headers": [
+ "array nsapi_request_headers(void)",
+ "Get all headers from the request"
+ ],
+ "nsapi_response_headers": [
+ "array nsapi_response_headers(void)",
+ "Get all headers from the response"
+ ],
+ "nsapi_virtual": [
+ "bool nsapi_virtual(string uri)",
+ "Perform an NSAPI sub-request"
+ ],
+ "number_format": [
+ "string number_format(float number [, int num_decimal_places [, string dec_seperator, string thousands_seperator]])",
+ "Formats a number with grouped thousands"
+ ],
+ "numfmt_create": [
+ "NumberFormatter numfmt_create( string $locale, int style[, string $pattern ] )",
+ "* Create number formatter."
+ ],
+ "numfmt_format": [
+ "mixed numfmt_format( NumberFormatter $nf, mixed $num[, int type] )",
+ "* Format a number."
+ ],
+ "numfmt_format_currency": [
+ "mixed numfmt_format_currency( NumberFormatter $nf, double $num, string $currency )",
+ "* Format a number as currency."
+ ],
+ "numfmt_get_attribute": [
+ "mixed numfmt_get_attribute( NumberFormatter $nf, int $attr )",
+ "* Get formatter attribute value."
+ ],
+ "numfmt_get_error_code": [
+ "int numfmt_get_error_code( NumberFormatter $nf )",
+ "* Get formatter's last error code."
+ ],
+ "numfmt_get_error_message": [
+ "string numfmt_get_error_message( NumberFormatter $nf )",
+ "* Get text description for formatter's last error code."
+ ],
+ "numfmt_get_locale": [
+ "string numfmt_get_locale( NumberFormatter $nf[, int type] )",
+ "* Get formatter locale."
+ ],
+ "numfmt_get_pattern": [
+ "string numfmt_get_pattern( NumberFormatter $nf )",
+ "* Get formatter pattern."
+ ],
+ "numfmt_get_symbol": [
+ "string numfmt_get_symbol( NumberFormatter $nf, int $attr )",
+ "* Get formatter symbol value."
+ ],
+ "numfmt_get_text_attribute": [
+ "string numfmt_get_text_attribute( NumberFormatter $nf, int $attr )",
+ "* Get formatter attribute value."
+ ],
+ "numfmt_parse": [
+ "mixed numfmt_parse( NumberFormatter $nf, string $str[, int $type, int &$position ])",
+ "* Parse a number."
+ ],
+ "numfmt_parse_currency": [
+ "double numfmt_parse_currency( NumberFormatter $nf, string $str, string $&currency[, int $&position] )",
+ "* Parse a number as currency."
+ ],
+ "numfmt_parse_message": [
+ "array numfmt_parse_message( string $locale, string $pattern, string $source )",
+ "* Parse a message."
+ ],
+ "numfmt_set_attribute": [
+ "bool numfmt_set_attribute( NumberFormatter $nf, int $attr, mixed $value )",
+ "* Get formatter attribute value."
+ ],
+ "numfmt_set_pattern": [
+ "bool numfmt_set_pattern( NumberFormatter $nf, string $pattern )",
+ "* Set formatter pattern."
+ ],
+ "numfmt_set_symbol": [
+ "bool numfmt_set_symbol( NumberFormatter $nf, int $attr, string $symbol )",
+ "* Set formatter symbol value."
+ ],
+ "numfmt_set_text_attribute": [
+ "bool numfmt_set_text_attribute( NumberFormatter $nf, int $attr, string $value )",
+ "* Get formatter attribute value."
+ ],
+ "ob_clean": [
+ "bool ob_clean(void)",
+ "Clean (delete) the current output buffer"
+ ],
+ "ob_end_clean": [
+ "bool ob_end_clean(void)",
+ "Clean the output buffer, and delete current output buffer"
+ ],
+ "ob_end_flush": [
+ "bool ob_end_flush(void)",
+ "Flush (send) the output buffer, and delete current output buffer"
+ ],
+ "ob_flush": [
+ "bool ob_flush(void)",
+ "Flush (send) contents of the output buffer. The last buffer content is sent to next buffer"
+ ],
+ "ob_get_clean": [
+ "bool ob_get_clean(void)",
+ "Get current buffer contents and delete current output buffer"
+ ],
+ "ob_get_contents": [
+ "string ob_get_contents(void)",
+ "Return the contents of the output buffer"
+ ],
+ "ob_get_flush": [
+ "bool ob_get_flush(void)",
+ "Get current buffer contents, flush (send) the output buffer, and delete current output buffer"
+ ],
+ "ob_get_length": [
+ "int ob_get_length(void)",
+ "Return the length of the output buffer"
+ ],
+ "ob_get_level": [
+ "int ob_get_level(void)",
+ "Return the nesting level of the output buffer"
+ ],
+ "ob_get_status": [
+ "false|array ob_get_status([bool full_status])",
+ "Return the status of the active or all output buffers"
+ ],
+ "ob_gzhandler": [
+ "string ob_gzhandler(string str, int mode)",
+ "Encode str based on accept-encoding setting - designed to be called from ob_start()"
+ ],
+ "ob_iconv_handler": [
+ "string ob_iconv_handler(string contents, int status)",
+ "Returns str in output buffer converted to the iconv.output_encoding character set"
+ ],
+ "ob_implicit_flush": [
+ "void ob_implicit_flush([int flag])",
+ "Turn implicit flush on/off and is equivalent to calling flush() after every output call"
+ ],
+ "ob_list_handlers": [
+ "false|array ob_list_handlers()",
+ "* List all output_buffers in an array"
+ ],
+ "ob_start": [
+ "bool ob_start([ string|array user_function [, int chunk_size [, bool erase]]])",
+ "Turn on Output Buffering (specifying an optional output handler)."
+ ],
+ "oci_bind_array_by_name": [
+ "bool oci_bind_array_by_name(resource stmt, string name, array &var, int max_table_length [, int max_item_length [, int type ]])",
+ "Bind a PHP array to an Oracle PL/SQL type by name"
+ ],
+ "oci_bind_by_name": [
+ "bool oci_bind_by_name(resource stmt, string name, mixed &var, [, int maxlength [, int type]])",
+ "Bind a PHP variable to an Oracle placeholder by name"
+ ],
+ "oci_cancel": [
+ "bool oci_cancel(resource stmt)",
+ "Cancel reading from a cursor"
+ ],
+ "oci_close": [
+ "bool oci_close(resource connection)",
+ "Disconnect from database"
+ ],
+ "oci_collection_append": [
+ "bool oci_collection_append(string value)",
+ "Append an object to the collection"
+ ],
+ "oci_collection_assign": [
+ "bool oci_collection_assign(object from)",
+ "Assign a collection from another existing collection"
+ ],
+ "oci_collection_element_assign": [
+ "bool oci_collection_element_assign(int index, string val)",
+ "Assign element val to collection at index ndx"
+ ],
+ "oci_collection_element_get": [
+ "string oci_collection_element_get(int ndx)",
+ "Retrieve the value at collection index ndx"
+ ],
+ "oci_collection_max": [
+ "int oci_collection_max()",
+ "Return the max value of a collection. For a varray this is the maximum length of the array"
+ ],
+ "oci_collection_size": [
+ "int oci_collection_size()",
+ "Return the size of a collection"
+ ],
+ "oci_collection_trim": [
+ "bool oci_collection_trim(int num)",
+ "Trim num elements from the end of a collection"
+ ],
+ "oci_commit": [
+ "bool oci_commit(resource connection)",
+ "Commit the current context"
+ ],
+ "oci_connect": [
+ "resource oci_connect(string user, string pass [, string db [, string charset [, int session_mode ]])",
+ "Connect to an Oracle database and log on. Returns a new session."
+ ],
+ "oci_define_by_name": [
+ "bool oci_define_by_name(resource stmt, string name, mixed &var [, int type])",
+ "Define a PHP variable to an Oracle column by name"
+ ],
+ "oci_error": [
+ "array oci_error([resource stmt|connection|global])",
+ "Return the last error of stmt|connection|global. If no error happened returns false."
+ ],
+ "oci_execute": [
+ "bool oci_execute(resource stmt [, int mode])",
+ "Execute a parsed statement"
+ ],
+ "oci_fetch": [
+ "bool oci_fetch(resource stmt)",
+ "Prepare a new row of data for reading"
+ ],
+ "oci_fetch_all": [
+ "int oci_fetch_all(resource stmt, array &output[, int skip[, int maxrows[, int flags]]])",
+ "Fetch all rows of result data into an array"
+ ],
+ "oci_fetch_array": [
+ "array oci_fetch_array( resource stmt [, int mode ])",
+ "Fetch a result row as an array"
+ ],
+ "oci_fetch_assoc": [
+ "array oci_fetch_assoc( resource stmt )",
+ "Fetch a result row as an associative array"
+ ],
+ "oci_fetch_object": [
+ "object oci_fetch_object( resource stmt )",
+ "Fetch a result row as an object"
+ ],
+ "oci_fetch_row": [
+ "array oci_fetch_row( resource stmt )",
+ "Fetch a result row as an enumerated array"
+ ],
+ "oci_field_is_null": [
+ "bool oci_field_is_null(resource stmt, int col)",
+ "Tell whether a column is NULL"
+ ],
+ "oci_field_name": [
+ "string oci_field_name(resource stmt, int col)",
+ "Tell the name of a column"
+ ],
+ "oci_field_precision": [
+ "int oci_field_precision(resource stmt, int col)",
+ "Tell the precision of a column"
+ ],
+ "oci_field_scale": [
+ "int oci_field_scale(resource stmt, int col)",
+ "Tell the scale of a column"
+ ],
+ "oci_field_size": [
+ "int oci_field_size(resource stmt, int col)",
+ "Tell the maximum data size of a column"
+ ],
+ "oci_field_type": [
+ "mixed oci_field_type(resource stmt, int col)",
+ "Tell the data type of a column"
+ ],
+ "oci_field_type_raw": [
+ "int oci_field_type_raw(resource stmt, int col)",
+ "Tell the raw oracle data type of a column"
+ ],
+ "oci_free_collection": [
+ "bool oci_free_collection()",
+ "Deletes collection object"
+ ],
+ "oci_free_descriptor": [
+ "bool oci_free_descriptor()",
+ "Deletes large object description"
+ ],
+ "oci_free_statement": [
+ "bool oci_free_statement(resource stmt)",
+ "Free all resources associated with a statement"
+ ],
+ "oci_internal_debug": [
+ "void oci_internal_debug(int onoff)",
+ "Toggle internal debugging output for the OCI extension"
+ ],
+ "oci_lob_append": [
+ "bool oci_lob_append( object lob )",
+ "Appends data from a LOB to another LOB"
+ ],
+ "oci_lob_close": [
+ "bool oci_lob_close()",
+ "Closes lob descriptor"
+ ],
+ "oci_lob_copy": [
+ "bool oci_lob_copy( object lob_to, object lob_from [, int length ] )",
+ "Copies data from a LOB to another LOB"
+ ],
+ "oci_lob_eof": [
+ "bool oci_lob_eof()",
+ "Checks if EOF is reached"
+ ],
+ "oci_lob_erase": [
+ "int oci_lob_erase( [ int offset [, int length ] ] )",
+ "Erases a specified portion of the internal LOB, starting at a specified offset"
+ ],
+ "oci_lob_export": [
+ "bool oci_lob_export([string filename [, int start [, int length]]])",
+ "Writes a large object into a file"
+ ],
+ "oci_lob_flush": [
+ "bool oci_lob_flush( [ int flag ] )",
+ "Flushes the LOB buffer"
+ ],
+ "oci_lob_import": [
+ "bool oci_lob_import( string filename )",
+ "Loads file into a LOB"
+ ],
+ "oci_lob_is_equal": [
+ "bool oci_lob_is_equal( object lob1, object lob2 )",
+ "Tests to see if two LOB/FILE locators are equal"
+ ],
+ "oci_lob_load": [
+ "string oci_lob_load()",
+ "Loads a large object"
+ ],
+ "oci_lob_read": [
+ "string oci_lob_read( int length )",
+ "Reads particular part of a large object"
+ ],
+ "oci_lob_rewind": [
+ "bool oci_lob_rewind()",
+ "Rewind pointer of a LOB"
+ ],
+ "oci_lob_save": [
+ "bool oci_lob_save( string data [, int offset ])",
+ "Saves a large object"
+ ],
+ "oci_lob_seek": [
+ "bool oci_lob_seek( int offset [, int whence ])",
+ "Moves the pointer of a LOB"
+ ],
+ "oci_lob_size": [
+ "int oci_lob_size()",
+ "Returns size of a large object"
+ ],
+ "oci_lob_tell": [
+ "int oci_lob_tell()",
+ "Tells LOB pointer position"
+ ],
+ "oci_lob_truncate": [
+ "bool oci_lob_truncate( [ int length ])",
+ "Truncates a LOB"
+ ],
+ "oci_lob_write": [
+ "int oci_lob_write( string string [, int length ])",
+ "Writes data to current position of a LOB"
+ ],
+ "oci_lob_write_temporary": [
+ "bool oci_lob_write_temporary(string var [, int lob_type])",
+ "Writes temporary blob"
+ ],
+ "oci_new_collection": [
+ "object oci_new_collection(resource connection, string tdo [, string schema])",
+ "Initialize a new collection"
+ ],
+ "oci_new_connect": [
+ "resource oci_new_connect(string user, string pass [, string db])",
+ "Connect to an Oracle database and log on. Returns a new session."
+ ],
+ "oci_new_cursor": [
+ "resource oci_new_cursor(resource connection)",
+ "Return a new cursor (Statement-Handle) - use this to bind ref-cursors!"
+ ],
+ "oci_new_descriptor": [
+ "object oci_new_descriptor(resource connection [, int type])",
+ "Initialize a new empty descriptor LOB/FILE (LOB is default)"
+ ],
+ "oci_num_fields": [
+ "int oci_num_fields(resource stmt)",
+ "Return the number of result columns in a statement"
+ ],
+ "oci_num_rows": [
+ "int oci_num_rows(resource stmt)",
+ "Return the row count of an OCI statement"
+ ],
+ "oci_parse": [
+ "resource oci_parse(resource connection, string query)",
+ "Parse a query and return a statement"
+ ],
+ "oci_password_change": [
+ "bool oci_password_change(resource connection, string username, string old_password, string new_password)",
+ "Changes the password of an account"
+ ],
+ "oci_pconnect": [
+ "resource oci_pconnect(string user, string pass [, string db [, string charset ]])",
+ "Connect to an Oracle database using a persistent connection and log on. Returns a new session."
+ ],
+ "oci_result": [
+ "string oci_result(resource stmt, mixed column)",
+ "Return a single column of result data"
+ ],
+ "oci_rollback": [
+ "bool oci_rollback(resource connection)",
+ "Rollback the current context"
+ ],
+ "oci_server_version": [
+ "string oci_server_version(resource connection)",
+ "Return a string containing server version information"
+ ],
+ "oci_set_action": [
+ "bool oci_set_action(resource connection, string value)",
+ "Sets the action attribute on the connection"
+ ],
+ "oci_set_client_identifier": [
+ "bool oci_set_client_identifier(resource connection, string value)",
+ "Sets the client identifier attribute on the connection"
+ ],
+ "oci_set_client_info": [
+ "bool oci_set_client_info(resource connection, string value)",
+ "Sets the client info attribute on the connection"
+ ],
+ "oci_set_edition": [
+ "bool oci_set_edition(string value)",
+ "Sets the edition attribute for all subsequent connections created"
+ ],
+ "oci_set_module_name": [
+ "bool oci_set_module_name(resource connection, string value)",
+ "Sets the module attribute on the connection"
+ ],
+ "oci_set_prefetch": [
+ "bool oci_set_prefetch(resource stmt, int prefetch_rows)",
+ "Sets the number of rows to be prefetched on execute to prefetch_rows for stmt"
+ ],
+ "oci_statement_type": [
+ "string oci_statement_type(resource stmt)",
+ "Return the query type of an OCI statement"
+ ],
+ "ocifetchinto": [
+ "int ocifetchinto(resource stmt, array &output [, int mode])",
+ "Fetch a row of result data into an array"
+ ],
+ "ocigetbufferinglob": [
+ "bool ocigetbufferinglob()",
+ "Returns current state of buffering for a LOB"
+ ],
+ "ocisetbufferinglob": [
+ "bool ocisetbufferinglob( boolean flag )",
+ "Enables/disables buffering for a LOB"
+ ],
+ "octdec": [
+ "int octdec(string octal_number)",
+ "Returns the decimal equivalent of an octal string"
+ ],
+ "odbc_autocommit": [
+ "mixed odbc_autocommit(resource connection_id [, int OnOff])",
+ "Toggle autocommit mode or get status"
+ ],
+ "odbc_binmode": [
+ "bool odbc_binmode(int result_id, int mode)",
+ "Handle binary column data"
+ ],
+ "odbc_close": [
+ "void odbc_close(resource connection_id)",
+ "Close an ODBC connection"
+ ],
+ "odbc_close_all": [
+ "void odbc_close_all(void)",
+ "Close all ODBC connections"
+ ],
+ "odbc_columnprivileges": [
+ "resource odbc_columnprivileges(resource connection_id, string catalog, string schema, string table, string column)",
+ "Returns a result identifier that can be used to fetch a list of columns and associated privileges for the specified table"
+ ],
+ "odbc_columns": [
+ "resource odbc_columns(resource connection_id [, string qualifier [, string owner [, string table_name [, string column_name]]]])",
+ "Returns a result identifier that can be used to fetch a list of column names in specified tables"
+ ],
+ "odbc_commit": [
+ "bool odbc_commit(resource connection_id)",
+ "Commit an ODBC transaction"
+ ],
+ "odbc_connect": [
+ "resource odbc_connect(string DSN, string user, string password [, int cursor_option])",
+ "Connect to a datasource"
+ ],
+ "odbc_cursor": [
+ "string odbc_cursor(resource result_id)",
+ "Get cursor name"
+ ],
+ "odbc_data_source": [
+ "array odbc_data_source(resource connection_id, int fetch_type)",
+ "Return information about the currently connected data source"
+ ],
+ "odbc_error": [
+ "string odbc_error([resource connection_id])",
+ "Get the last error code"
+ ],
+ "odbc_errormsg": [
+ "string odbc_errormsg([resource connection_id])",
+ "Get the last error message"
+ ],
+ "odbc_exec": [
+ "resource odbc_exec(resource connection_id, string query [, int flags])",
+ "Prepare and execute an SQL statement"
+ ],
+ "odbc_execute": [
+ "bool odbc_execute(resource result_id [, array parameters_array])",
+ "Execute a prepared statement"
+ ],
+ "odbc_fetch_array": [
+ "array odbc_fetch_array(int result [, int rownumber])",
+ "Fetch a result row as an associative array"
+ ],
+ "odbc_fetch_into": [
+ "int odbc_fetch_into(resource result_id, array &result_array, [, int rownumber])",
+ "Fetch one result row into an array"
+ ],
+ "odbc_fetch_object": [
+ "object odbc_fetch_object(int result [, int rownumber])",
+ "Fetch a result row as an object"
+ ],
+ "odbc_fetch_row": [
+ "bool odbc_fetch_row(resource result_id [, int row_number])",
+ "Fetch a row"
+ ],
+ "odbc_field_len": [
+ "int odbc_field_len(resource result_id, int field_number)",
+ "Get the length (precision) of a column"
+ ],
+ "odbc_field_name": [
+ "string odbc_field_name(resource result_id, int field_number)",
+ "Get a column name"
+ ],
+ "odbc_field_num": [
+ "int odbc_field_num(resource result_id, string field_name)",
+ "Return column number"
+ ],
+ "odbc_field_scale": [
+ "int odbc_field_scale(resource result_id, int field_number)",
+ "Get the scale of a column"
+ ],
+ "odbc_field_type": [
+ "string odbc_field_type(resource result_id, int field_number)",
+ "Get the datatype of a column"
+ ],
+ "odbc_foreignkeys": [
+ "resource odbc_foreignkeys(resource connection_id, string pk_qualifier, string pk_owner, string pk_table, string fk_qualifier, string fk_owner, string fk_table)",
+ "Returns a result identifier to either a list of foreign keys in the specified table or a list of foreign keys in other tables that refer to the primary key in the specified table"
+ ],
+ "odbc_free_result": [
+ "bool odbc_free_result(resource result_id)",
+ "Free resources associated with a result"
+ ],
+ "odbc_gettypeinfo": [
+ "resource odbc_gettypeinfo(resource connection_id [, int data_type])",
+ "Returns a result identifier containing information about data types supported by the data source"
+ ],
+ "odbc_longreadlen": [
+ "bool odbc_longreadlen(int result_id, int length)",
+ "Handle LONG columns"
+ ],
+ "odbc_next_result": [
+ "bool odbc_next_result(resource result_id)",
+ "Checks if multiple results are avaiable"
+ ],
+ "odbc_num_fields": [
+ "int odbc_num_fields(resource result_id)",
+ "Get number of columns in a result"
+ ],
+ "odbc_num_rows": [
+ "int odbc_num_rows(resource result_id)",
+ "Get number of rows in a result"
+ ],
+ "odbc_pconnect": [
+ "resource odbc_pconnect(string DSN, string user, string password [, int cursor_option])",
+ "Establish a persistent connection to a datasource"
+ ],
+ "odbc_prepare": [
+ "resource odbc_prepare(resource connection_id, string query)",
+ "Prepares a statement for execution"
+ ],
+ "odbc_primarykeys": [
+ "resource odbc_primarykeys(resource connection_id, string qualifier, string owner, string table)",
+ "Returns a result identifier listing the column names that comprise the primary key for a table"
+ ],
+ "odbc_procedurecolumns": [
+ "resource odbc_procedurecolumns(resource connection_id [, string qualifier, string owner, string proc, string column])",
+ "Returns a result identifier containing the list of input and output parameters, as well as the columns that make up the result set for the specified procedures"
+ ],
+ "odbc_procedures": [
+ "resource odbc_procedures(resource connection_id [, string qualifier, string owner, string name])",
+ "Returns a result identifier containg the list of procedure names in a datasource"
+ ],
+ "odbc_result": [
+ "mixed odbc_result(resource result_id, mixed field)",
+ "Get result data"
+ ],
+ "odbc_result_all": [
+ "int odbc_result_all(resource result_id [, string format])",
+ "Print result as HTML table"
+ ],
+ "odbc_rollback": [
+ "bool odbc_rollback(resource connection_id)",
+ "Rollback a transaction"
+ ],
+ "odbc_setoption": [
+ "bool odbc_setoption(resource conn_id|result_id, int which, int option, int value)",
+ "Sets connection or statement options"
+ ],
+ "odbc_specialcolumns": [
+ "resource odbc_specialcolumns(resource connection_id, int type, string qualifier, string owner, string table, int scope, int nullable)",
+ "Returns a result identifier containing either the optimal set of columns that uniquely identifies a row in the table or columns that are automatically updated when any value in the row is updated by a transaction"
+ ],
+ "odbc_statistics": [
+ "resource odbc_statistics(resource connection_id, string qualifier, string owner, string name, int unique, int accuracy)",
+ "Returns a result identifier that contains statistics about a single table and the indexes associated with the table"
+ ],
+ "odbc_tableprivileges": [
+ "resource odbc_tableprivileges(resource connection_id, string qualifier, string owner, string name)",
+ "Returns a result identifier containing a list of tables and the privileges associated with each table"
+ ],
+ "odbc_tables": [
+ "resource odbc_tables(resource connection_id [, string qualifier [, string owner [, string name [, string table_types]]]])",
+ "Call the SQLTables function"
+ ],
+ "opendir": [
+ "mixed opendir(string path[, resource context])",
+ "Open a directory and return a dir_handle"
+ ],
+ "openlog": [
+ "bool openlog(string ident, int option, int facility)",
+ "Open connection to system logger"
+ ],
+ "openssl_csr_export": [
+ "bool openssl_csr_export(resource csr, string &out [, bool notext=true])",
+ "Exports a CSR to file or a var"
+ ],
+ "openssl_csr_export_to_file": [
+ "bool openssl_csr_export_to_file(resource csr, string outfilename [, bool notext=true])",
+ "Exports a CSR to file"
+ ],
+ "openssl_csr_get_public_key": [
+ "mixed openssl_csr_get_public_key(mixed csr)",
+ "Returns the subject of a CERT or FALSE on error"
+ ],
+ "openssl_csr_get_subject": [
+ "mixed openssl_csr_get_subject(mixed csr)",
+ "Returns the subject of a CERT or FALSE on error"
+ ],
+ "openssl_csr_new": [
+ "bool openssl_csr_new(array dn, resource &privkey [, array configargs [, array extraattribs]])",
+ "Generates a privkey and CSR"
+ ],
+ "openssl_csr_sign": [
+ "resource openssl_csr_sign(mixed csr, mixed x509, mixed priv_key, long days [, array config_args [, long serial]])",
+ "Signs a cert with another CERT"
+ ],
+ "openssl_decrypt": [
+ "string openssl_decrypt(string data, string method, string password [, bool raw_input=false])",
+ "Takes raw or base64 encoded string and dectupt it using given method and key"
+ ],
+ "openssl_dh_compute_key": [
+ "string openssl_dh_compute_key(string pub_key, resource dh_key)",
+ "Computes shared sicret for public value of remote DH key and local DH key"
+ ],
+ "openssl_digest": [
+ "string openssl_digest(string data, string method [, bool raw_output=false])",
+ "Computes digest hash value for given data using given method, returns raw or binhex encoded string"
+ ],
+ "openssl_encrypt": [
+ "string openssl_encrypt(string data, string method, string password [, bool raw_output=false])",
+ "Encrypts given data with given method and key, returns raw or base64 encoded string"
+ ],
+ "openssl_error_string": [
+ "mixed openssl_error_string(void)",
+ "Returns a description of the last error, and alters the index of the error messages. Returns false when the are no more messages"
+ ],
+ "openssl_get_cipher_methods": [
+ "array openssl_get_cipher_methods([bool aliases = false])",
+ "Return array of available cipher methods"
+ ],
+ "openssl_get_md_methods": [
+ "array openssl_get_md_methods([bool aliases = false])",
+ "Return array of available digest methods"
+ ],
+ "openssl_open": [
+ "bool openssl_open(string data, &string opendata, string ekey, mixed privkey)",
+ "Opens data"
+ ],
+ "openssl_pkcs12_export": [
+ "bool openssl_pkcs12_export(mixed x509, string &out, mixed priv_key, string pass[, array args])",
+ "Creates and exports a PKCS12 to a var"
+ ],
+ "openssl_pkcs12_export_to_file": [
+ "bool openssl_pkcs12_export_to_file(mixed x509, string filename, mixed priv_key, string pass[, array args])",
+ "Creates and exports a PKCS to file"
+ ],
+ "openssl_pkcs12_read": [
+ "bool openssl_pkcs12_read(string PKCS12, array &certs, string pass)",
+ "Parses a PKCS12 to an array"
+ ],
+ "openssl_pkcs7_decrypt": [
+ "bool openssl_pkcs7_decrypt(string infilename, string outfilename, mixed recipcert [, mixed recipkey])",
+ "Decrypts the S/MIME message in the file name infilename and output the results to the file name outfilename. recipcert is a CERT for one of the recipients. recipkey specifies the private key matching recipcert, if recipcert does not include the key"
+ ],
+ "openssl_pkcs7_encrypt": [
+ "bool openssl_pkcs7_encrypt(string infile, string outfile, mixed recipcerts, array headers [, long flags [, long cipher]])",
+ "Encrypts the message in the file named infile with the certificates in recipcerts and output the result to the file named outfile"
+ ],
+ "openssl_pkcs7_sign": [
+ "bool openssl_pkcs7_sign(string infile, string outfile, mixed signcert, mixed signkey, array headers [, long flags [, string extracertsfilename]])",
+ "Signs the MIME message in the file named infile with signcert/signkey and output the result to file name outfile. headers lists plain text headers to exclude from the signed portion of the message, and should include to, from and subject as a minimum"
+ ],
+ "openssl_pkcs7_verify": [
+ "bool openssl_pkcs7_verify(string filename, long flags [, string signerscerts [, array cainfo [, string extracerts [, string content]]]])",
+ "Verifys that the data block is intact, the signer is who they say they are, and returns the CERTs of the signers"
+ ],
+ "openssl_pkey_export": [
+ "bool openssl_pkey_export(mixed key, &mixed out [, string passphrase [, array config_args]])",
+ "Gets an exportable representation of a key into a string or file"
+ ],
+ "openssl_pkey_export_to_file": [
+ "bool openssl_pkey_export_to_file(mixed key, string outfilename [, string passphrase, array config_args)",
+ "Gets an exportable representation of a key into a file"
+ ],
+ "openssl_pkey_free": [
+ "void openssl_pkey_free(int key)",
+ "Frees a key"
+ ],
+ "openssl_pkey_get_details": [
+ "resource openssl_pkey_get_details(resource key)",
+ "returns an array with the key details (bits, pkey, type)"
+ ],
+ "openssl_pkey_get_private": [
+ "int openssl_pkey_get_private(string key [, string passphrase])",
+ "Gets private keys"
+ ],
+ "openssl_pkey_get_public": [
+ "int openssl_pkey_get_public(mixed cert)",
+ "Gets public key from X.509 certificate"
+ ],
+ "openssl_pkey_new": [
+ "resource openssl_pkey_new([array configargs])",
+ "Generates a new private key"
+ ],
+ "openssl_private_decrypt": [
+ "bool openssl_private_decrypt(string data, string &decrypted, mixed key [, int padding])",
+ "Decrypts data with private key"
+ ],
+ "openssl_private_encrypt": [
+ "bool openssl_private_encrypt(string data, string &crypted, mixed key [, int padding])",
+ "Encrypts data with private key"
+ ],
+ "openssl_public_decrypt": [
+ "bool openssl_public_decrypt(string data, string &crypted, resource key [, int padding])",
+ "Decrypts data with public key"
+ ],
+ "openssl_public_encrypt": [
+ "bool openssl_public_encrypt(string data, string &crypted, mixed key [, int padding])",
+ "Encrypts data with public key"
+ ],
+ "openssl_random_pseudo_bytes": [
+ "string openssl_random_pseudo_bytes(integer length [, &bool returned_strong_result])",
+ "Returns a string of the length specified filled with random pseudo bytes"
+ ],
+ "openssl_seal": [
+ "int openssl_seal(string data, &string sealdata, &array ekeys, array pubkeys)",
+ "Seals data"
+ ],
+ "openssl_sign": [
+ "bool openssl_sign(string data, &string signature, mixed key[, mixed method])",
+ "Signs data"
+ ],
+ "openssl_verify": [
+ "int openssl_verify(string data, string signature, mixed key[, mixed method])",
+ "Verifys data"
+ ],
+ "openssl_x509_check_private_key": [
+ "bool openssl_x509_check_private_key(mixed cert, mixed key)",
+ "Checks if a private key corresponds to a CERT"
+ ],
+ "openssl_x509_checkpurpose": [
+ "int openssl_x509_checkpurpose(mixed x509cert, int purpose, array cainfo [, string untrustedfile])",
+ "Checks the CERT to see if it can be used for the purpose in purpose. cainfo holds information about trusted CAs"
+ ],
+ "openssl_x509_export": [
+ "bool openssl_x509_export(mixed x509, string &out [, bool notext = true])",
+ "Exports a CERT to file or a var"
+ ],
+ "openssl_x509_export_to_file": [
+ "bool openssl_x509_export_to_file(mixed x509, string outfilename [, bool notext = true])",
+ "Exports a CERT to file or a var"
+ ],
+ "openssl_x509_free": [
+ "void openssl_x509_free(resource x509)",
+ "Frees X.509 certificates"
+ ],
+ "openssl_x509_parse": [
+ "array openssl_x509_parse(mixed x509 [, bool shortnames=true])",
+ "Returns an array of the fields/values of the CERT"
+ ],
+ "openssl_x509_read": [
+ "resource openssl_x509_read(mixed cert)",
+ "Reads X.509 certificates"
+ ],
+ "ord": [
+ "int ord(string character)",
+ "Returns ASCII value of character"
+ ],
+ "output_add_rewrite_var": [
+ "bool output_add_rewrite_var(string name, string value)",
+ "Add URL rewriter values"
+ ],
+ "output_reset_rewrite_vars": [
+ "bool output_reset_rewrite_vars(void)",
+ "Reset(clear) URL rewriter values"
+ ],
+ "pack": [
+ "string pack(string format, mixed arg1 [, mixed arg2 [, mixed ...]])",
+ "Takes one or more arguments and packs them into a binary string according to the format argument"
+ ],
+ "parse_ini_file": [
+ "array parse_ini_file(string filename [, bool process_sections [, int scanner_mode]])",
+ "Parse configuration file"
+ ],
+ "parse_ini_string": [
+ "array parse_ini_string(string ini_string [, bool process_sections [, int scanner_mode]])",
+ "Parse configuration string"
+ ],
+ "parse_locale": [
+ "static array parse_locale($locale)",
+ "* parses a locale-id into an array the different parts of it"
+ ],
+ "parse_str": [
+ "void parse_str(string encoded_string [, array result])",
+ "Parses GET/POST/COOKIE data and sets global variables"
+ ],
+ "parse_url": [
+ "mixed parse_url(string url, [int url_component])",
+ "Parse a URL and return its components"
+ ],
+ "passthru": [
+ "void passthru(string command [, int &return_value])",
+ "Execute an external program and display raw output"
+ ],
+ "pathinfo": [
+ "array pathinfo(string path[, int options])",
+ "Returns information about a certain string"
+ ],
+ "pclose": [
+ "int pclose(resource fp)",
+ "Close a file pointer opened by popen()"
+ ],
+ "pcnlt_sigwaitinfo": [
+ "int pcnlt_sigwaitinfo(array set[, array &siginfo])",
+ "Synchronously wait for queued signals"
+ ],
+ "pcntl_alarm": [
+ "int pcntl_alarm(int seconds)",
+ "Set an alarm clock for delivery of a signal"
+ ],
+ "pcntl_exec": [
+ "bool pcntl_exec(string path [, array args [, array envs]])",
+ "Executes specified program in current process space as defined by exec(2)"
+ ],
+ "pcntl_fork": [
+ "int pcntl_fork(void)",
+ "Forks the currently running process following the same behavior as the UNIX fork() system call"
+ ],
+ "pcntl_getpriority": [
+ "int pcntl_getpriority([int pid [, int process_identifier]])",
+ "Get the priority of any process"
+ ],
+ "pcntl_setpriority": [
+ "bool pcntl_setpriority(int priority [, int pid [, int process_identifier]])",
+ "Change the priority of any process"
+ ],
+ "pcntl_signal": [
+ "bool pcntl_signal(int signo, callback handle [, bool restart_syscalls])",
+ "Assigns a system signal handler to a PHP function"
+ ],
+ "pcntl_signal_dispatch": [
+ "bool pcntl_signal_dispatch()",
+ "Dispatch signals to signal handlers"
+ ],
+ "pcntl_sigprocmask": [
+ "bool pcntl_sigprocmask(int how, array set[, array &oldset])",
+ "Examine and change blocked signals"
+ ],
+ "pcntl_sigtimedwait": [
+ "int pcntl_sigtimedwait(array set[, array &siginfo[, int seconds[, int nanoseconds]]])",
+ "Wait for queued signals"
+ ],
+ "pcntl_wait": [
+ "int pcntl_wait(int &status)",
+ "Waits on or returns the status of a forked child as defined by the waitpid() system call"
+ ],
+ "pcntl_waitpid": [
+ "int pcntl_waitpid(int pid, int &status, int options)",
+ "Waits on or returns the status of a forked child as defined by the waitpid() system call"
+ ],
+ "pcntl_wexitstatus": [
+ "int pcntl_wexitstatus(int status)",
+ "Returns the status code of a child's exit"
+ ],
+ "pcntl_wifexited": [
+ "bool pcntl_wifexited(int status)",
+ "Returns true if the child status code represents a successful exit"
+ ],
+ "pcntl_wifsignaled": [
+ "bool pcntl_wifsignaled(int status)",
+ "Returns true if the child status code represents a process that was terminated due to a signal"
+ ],
+ "pcntl_wifstopped": [
+ "bool pcntl_wifstopped(int status)",
+ "Returns true if the child status code represents a stopped process (WUNTRACED must have been used with waitpid)"
+ ],
+ "pcntl_wstopsig": [
+ "int pcntl_wstopsig(int status)",
+ "Returns the number of the signal that caused the process to stop who's status code is passed"
+ ],
+ "pcntl_wtermsig": [
+ "int pcntl_wtermsig(int status)",
+ "Returns the number of the signal that terminated the process who's status code is passed"
+ ],
+ "pdo_drivers": [
+ "array pdo_drivers()",
+ "Return array of available PDO drivers"
+ ],
+ "pfsockopen": [
+ "resource pfsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]])",
+ "Open persistent Internet or Unix domain socket connection"
+ ],
+ "pg_affected_rows": [
+ "int pg_affected_rows(resource result)",
+ "Returns the number of affected tuples"
+ ],
+ "pg_cancel_query": [
+ "bool pg_cancel_query(resource connection)",
+ "Cancel request"
+ ],
+ "pg_client_encoding": [
+ "string pg_client_encoding([resource connection])",
+ "Get the current client encoding"
+ ],
+ "pg_close": [
+ "bool pg_close([resource connection])",
+ "Close a PostgreSQL connection"
+ ],
+ "pg_connect": [
+ "resource pg_connect(string connection_string[, int connect_type] | [string host, string port [, string options [, string tty,]]] string database)",
+ "Open a PostgreSQL connection"
+ ],
+ "pg_connection_busy": [
+ "bool pg_connection_busy(resource connection)",
+ "Get connection is busy or not"
+ ],
+ "pg_connection_reset": [
+ "bool pg_connection_reset(resource connection)",
+ "Reset connection (reconnect)"
+ ],
+ "pg_connection_status": [
+ "int pg_connection_status(resource connnection)",
+ "Get connection status"
+ ],
+ "pg_convert": [
+ "array pg_convert(resource db, string table, array values[, int options])",
+ "Check and convert values for PostgreSQL SQL statement"
+ ],
+ "pg_copy_from": [
+ "bool pg_copy_from(resource connection, string table_name , array rows [, string delimiter [, string null_as]])",
+ "Copy table from array"
+ ],
+ "pg_copy_to": [
+ "array pg_copy_to(resource connection, string table_name [, string delimiter [, string null_as]])",
+ "Copy table to array"
+ ],
+ "pg_dbname": [
+ "string pg_dbname([resource connection])",
+ "Get the database name"
+ ],
+ "pg_delete": [
+ "mixed pg_delete(resource db, string table, array ids[, int options])",
+ "Delete records has ids (id=>value)"
+ ],
+ "pg_end_copy": [
+ "bool pg_end_copy([resource connection])",
+ "Sync with backend. Completes the Copy command"
+ ],
+ "pg_escape_bytea": [
+ "string pg_escape_bytea([resource connection,] string data)",
+ "Escape binary for bytea type"
+ ],
+ "pg_escape_string": [
+ "string pg_escape_string([resource connection,] string data)",
+ "Escape string for text/char type"
+ ],
+ "pg_execute": [
+ "resource pg_execute([resource connection,] string stmtname, array params)",
+ "Execute a prepared query"
+ ],
+ "pg_fetch_all": [
+ "array pg_fetch_all(resource result)",
+ "Fetch all rows into array"
+ ],
+ "pg_fetch_all_columns": [
+ "array pg_fetch_all_columns(resource result [, int column_number])",
+ "Fetch all rows into array"
+ ],
+ "pg_fetch_array": [
+ "array pg_fetch_array(resource result [, int row [, int result_type]])",
+ "Fetch a row as an array"
+ ],
+ "pg_fetch_assoc": [
+ "array pg_fetch_assoc(resource result [, int row])",
+ "Fetch a row as an assoc array"
+ ],
+ "pg_fetch_object": [
+ "object pg_fetch_object(resource result [, int row [, string class_name [, NULL|array ctor_params]]])",
+ "Fetch a row as an object"
+ ],
+ "pg_fetch_result": [
+ "mixed pg_fetch_result(resource result, [int row_number,] mixed field_name)",
+ "Returns values from a result identifier"
+ ],
+ "pg_fetch_row": [
+ "array pg_fetch_row(resource result [, int row [, int result_type]])",
+ "Get a row as an enumerated array"
+ ],
+ "pg_field_is_null": [
+ "int pg_field_is_null(resource result, [int row,] mixed field_name_or_number)",
+ "Test if a field is NULL"
+ ],
+ "pg_field_name": [
+ "string pg_field_name(resource result, int field_number)",
+ "Returns the name of the field"
+ ],
+ "pg_field_num": [
+ "int pg_field_num(resource result, string field_name)",
+ "Returns the field number of the named field"
+ ],
+ "pg_field_prtlen": [
+ "int pg_field_prtlen(resource result, [int row,] mixed field_name_or_number)",
+ "Returns the printed length"
+ ],
+ "pg_field_size": [
+ "int pg_field_size(resource result, int field_number)",
+ "Returns the internal size of the field"
+ ],
+ "pg_field_table": [
+ "mixed pg_field_table(resource result, int field_number[, bool oid_only])",
+ "Returns the name of the table field belongs to, or table's oid if oid_only is true"
+ ],
+ "pg_field_type": [
+ "string pg_field_type(resource result, int field_number)",
+ "Returns the type name for the given field"
+ ],
+ "pg_field_type_oid": [
+ "string pg_field_type_oid(resource result, int field_number)",
+ "Returns the type oid for the given field"
+ ],
+ "pg_free_result": [
+ "bool pg_free_result(resource result)",
+ "Free result memory"
+ ],
+ "pg_get_notify": [
+ "array pg_get_notify([resource connection[, result_type]])",
+ "Get asynchronous notification"
+ ],
+ "pg_get_pid": [
+ "int pg_get_pid([resource connection)",
+ "Get backend(server) pid"
+ ],
+ "pg_get_result": [
+ "resource pg_get_result(resource connection)",
+ "Get asynchronous query result"
+ ],
+ "pg_host": [
+ "string pg_host([resource connection])",
+ "Returns the host name associated with the connection"
+ ],
+ "pg_insert": [
+ "mixed pg_insert(resource db, string table, array values[, int options])",
+ "Insert values (filed=>value) to table"
+ ],
+ "pg_last_error": [
+ "string pg_last_error([resource connection])",
+ "Get the error message string"
+ ],
+ "pg_last_notice": [
+ "string pg_last_notice(resource connection)",
+ "Returns the last notice set by the backend"
+ ],
+ "pg_last_oid": [
+ "string pg_last_oid(resource result)",
+ "Returns the last object identifier"
+ ],
+ "pg_lo_close": [
+ "bool pg_lo_close(resource large_object)",
+ "Close a large object"
+ ],
+ "pg_lo_create": [
+ "mixed pg_lo_create([resource connection],[mixed large_object_oid])",
+ "Create a large object"
+ ],
+ "pg_lo_export": [
+ "bool pg_lo_export([resource connection, ] int objoid, string filename)",
+ "Export large object direct to filesystem"
+ ],
+ "pg_lo_import": [
+ "int pg_lo_import([resource connection, ] string filename [, mixed oid])",
+ "Import large object direct from filesystem"
+ ],
+ "pg_lo_open": [
+ "resource pg_lo_open([resource connection,] int large_object_oid, string mode)",
+ "Open a large object and return fd"
+ ],
+ "pg_lo_read": [
+ "string pg_lo_read(resource large_object [, int len])",
+ "Read a large object"
+ ],
+ "pg_lo_read_all": [
+ "int pg_lo_read_all(resource large_object)",
+ "Read a large object and send straight to browser"
+ ],
+ "pg_lo_seek": [
+ "bool pg_lo_seek(resource large_object, int offset [, int whence])",
+ "Seeks position of large object"
+ ],
+ "pg_lo_tell": [
+ "int pg_lo_tell(resource large_object)",
+ "Returns current position of large object"
+ ],
+ "pg_lo_unlink": [
+ "bool pg_lo_unlink([resource connection,] string large_object_oid)",
+ "Delete a large object"
+ ],
+ "pg_lo_write": [
+ "int pg_lo_write(resource large_object, string buf [, int len])",
+ "Write a large object"
+ ],
+ "pg_meta_data": [
+ "array pg_meta_data(resource db, string table)",
+ "Get meta_data"
+ ],
+ "pg_num_fields": [
+ "int pg_num_fields(resource result)",
+ "Return the number of fields in the result"
+ ],
+ "pg_num_rows": [
+ "int pg_num_rows(resource result)",
+ "Return the number of rows in the result"
+ ],
+ "pg_options": [
+ "string pg_options([resource connection])",
+ "Get the options associated with the connection"
+ ],
+ "pg_parameter_status": [
+ "string|false pg_parameter_status([resource connection,] string param_name)",
+ "Returns the value of a server parameter"
+ ],
+ "pg_pconnect": [
+ "resource pg_pconnect(string connection_string | [string host, string port [, string options [, string tty,]]] string database)",
+ "Open a persistent PostgreSQL connection"
+ ],
+ "pg_ping": [
+ "bool pg_ping([resource connection])",
+ "Ping database. If connection is bad, try to reconnect."
+ ],
+ "pg_port": [
+ "int pg_port([resource connection])",
+ "Return the port number associated with the connection"
+ ],
+ "pg_prepare": [
+ "resource pg_prepare([resource connection,] string stmtname, string query)",
+ "Prepare a query for future execution"
+ ],
+ "pg_put_line": [
+ "bool pg_put_line([resource connection,] string query)",
+ "Send null-terminated string to backend server"
+ ],
+ "pg_query": [
+ "resource pg_query([resource connection,] string query)",
+ "Execute a query"
+ ],
+ "pg_query_params": [
+ "resource pg_query_params([resource connection,] string query, array params)",
+ "Execute a query"
+ ],
+ "pg_result_error": [
+ "string pg_result_error(resource result)",
+ "Get error message associated with result"
+ ],
+ "pg_result_error_field": [
+ "string pg_result_error_field(resource result, int fieldcode)",
+ "Get error message field associated with result"
+ ],
+ "pg_result_seek": [
+ "bool pg_result_seek(resource result, int offset)",
+ "Set internal row offset"
+ ],
+ "pg_result_status": [
+ "mixed pg_result_status(resource result[, long result_type])",
+ "Get status of query result"
+ ],
+ "pg_select": [
+ "mixed pg_select(resource db, string table, array ids[, int options])",
+ "Select records that has ids (id=>value)"
+ ],
+ "pg_send_execute": [
+ "bool pg_send_execute(resource connection, string stmtname, array params)",
+ "Executes prevriously prepared stmtname asynchronously"
+ ],
+ "pg_send_prepare": [
+ "bool pg_send_prepare(resource connection, string stmtname, string query)",
+ "Asynchronously prepare a query for future execution"
+ ],
+ "pg_send_query": [
+ "bool pg_send_query(resource connection, string query)",
+ "Send asynchronous query"
+ ],
+ "pg_send_query_params": [
+ "bool pg_send_query_params(resource connection, string query, array params)",
+ "Send asynchronous parameterized query"
+ ],
+ "pg_set_client_encoding": [
+ "int pg_set_client_encoding([resource connection,] string encoding)",
+ "Set client encoding"
+ ],
+ "pg_set_error_verbosity": [
+ "int pg_set_error_verbosity([resource connection,] int verbosity)",
+ "Set error verbosity"
+ ],
+ "pg_trace": [
+ "bool pg_trace(string filename [, string mode [, resource connection]])",
+ "Enable tracing a PostgreSQL connection"
+ ],
+ "pg_transaction_status": [
+ "int pg_transaction_status(resource connnection)",
+ "Get transaction status"
+ ],
+ "pg_tty": [
+ "string pg_tty([resource connection])",
+ "Return the tty name associated with the connection"
+ ],
+ "pg_unescape_bytea": [
+ "string pg_unescape_bytea(string data)",
+ "Unescape binary for bytea type"
+ ],
+ "pg_untrace": [
+ "bool pg_untrace([resource connection])",
+ "Disable tracing of a PostgreSQL connection"
+ ],
+ "pg_update": [
+ "mixed pg_update(resource db, string table, array fields, array ids[, int options])",
+ "Update table using values (field=>value) and ids (id=>value)"
+ ],
+ "pg_version": [
+ "array pg_version([resource connection])",
+ "Returns an array with client, protocol and server version (when available)"
+ ],
+ "php_egg_logo_guid": [
+ "string php_egg_logo_guid(void)",
+ "Return the special ID used to request the PHP logo in phpinfo screens"
+ ],
+ "php_ini_loaded_file": [
+ "string php_ini_loaded_file(void)",
+ "Return the actual loaded ini filename"
+ ],
+ "php_ini_scanned_files": [
+ "string php_ini_scanned_files(void)",
+ "Return comma-separated string of .ini files parsed from the additional ini dir"
+ ],
+ "php_logo_guid": [
+ "string php_logo_guid(void)",
+ "Return the special ID used to request the PHP logo in phpinfo screens"
+ ],
+ "php_real_logo_guid": [
+ "string php_real_logo_guid(void)",
+ "Return the special ID used to request the PHP logo in phpinfo screens"
+ ],
+ "php_sapi_name": [
+ "string php_sapi_name(void)",
+ "Return the current SAPI module name"
+ ],
+ "php_snmpv3": [
+ "void php_snmpv3(INTERNAL_FUNCTION_PARAMETERS, int st)",
+ "* * Generic SNMPv3 object fetcher * From here is passed on the the common internal object fetcher. * * st=SNMP_CMD_GET snmp3_get() - query an agent and return a single value. * st=SNMP_CMD_GETNEXT snmp3_getnext() - query an agent and return the next single value. * st=SNMP_CMD_WALK snmp3_walk() - walk the mib and return a single dimensional array * containing the values. * st=SNMP_CMD_REALWALK snmp3_real_walk() - walk the mib and return an * array of oid,value pairs. * st=SNMP_CMD_SET snmp3_set() - query an agent and set a single value *"
+ ],
+ "php_strip_whitespace": [
+ "string php_strip_whitespace(string file_name)",
+ "Return source with stripped comments and whitespace"
+ ],
+ "php_uname": [
+ "string php_uname(void)",
+ "Return information about the system PHP was built on"
+ ],
+ "phpcredits": [
+ "void phpcredits([int flag])",
+ "Prints the list of people who've contributed to the PHP project"
+ ],
+ "phpinfo": [
+ "void phpinfo([int what])",
+ "Output a page of useful information about PHP and the current request"
+ ],
+ "phpversion": [
+ "string phpversion([string extension])",
+ "Return the current PHP version"
+ ],
+ "pi": [
+ "float pi(void)",
+ "Returns an approximation of pi"
+ ],
+ "png2wbmp": [
+ "bool png2wbmp (string f_org, string f_dest, int d_height, int d_width, int threshold)",
+ "Convert PNG image to WBMP image"
+ ],
+ "popen": [
+ "resource popen(string command, string mode)",
+ "Execute a command and open either a read or a write pipe to it"
+ ],
+ "posix_access": [
+ "bool posix_access(string file [, int mode])",
+ "Determine accessibility of a file (POSIX.1 5.6.3)"
+ ],
+ "posix_ctermid": [
+ "string posix_ctermid(void)",
+ "Generate terminal path name (POSIX.1, 4.7.1)"
+ ],
+ "posix_get_last_error": [
+ "int posix_get_last_error(void)",
+ "Retrieve the error number set by the last posix function which failed."
+ ],
+ "posix_getcwd": [
+ "string posix_getcwd(void)",
+ "Get working directory pathname (POSIX.1, 5.2.2)"
+ ],
+ "posix_getegid": [
+ "int posix_getegid(void)",
+ "Get the current effective group id (POSIX.1, 4.2.1)"
+ ],
+ "posix_geteuid": [
+ "int posix_geteuid(void)",
+ "Get the current effective user id (POSIX.1, 4.2.1)"
+ ],
+ "posix_getgid": [
+ "int posix_getgid(void)",
+ "Get the current group id (POSIX.1, 4.2.1)"
+ ],
+ "posix_getgrgid": [
+ "array posix_getgrgid(long gid)",
+ "Group database access (POSIX.1, 9.2.1)"
+ ],
+ "posix_getgrnam": [
+ "array posix_getgrnam(string groupname)",
+ "Group database access (POSIX.1, 9.2.1)"
+ ],
+ "posix_getgroups": [
+ "array posix_getgroups(void)",
+ "Get supplementary group id's (POSIX.1, 4.2.3)"
+ ],
+ "posix_getlogin": [
+ "string posix_getlogin(void)",
+ "Get user name (POSIX.1, 4.2.4)"
+ ],
+ "posix_getpgid": [
+ "int posix_getpgid(void)",
+ "Get the process group id of the specified process (This is not a POSIX function, but a SVR4ism, so we compile conditionally)"
+ ],
+ "posix_getpgrp": [
+ "int posix_getpgrp(void)",
+ "Get current process group id (POSIX.1, 4.3.1)"
+ ],
+ "posix_getpid": [
+ "int posix_getpid(void)",
+ "Get the current process id (POSIX.1, 4.1.1)"
+ ],
+ "posix_getppid": [
+ "int posix_getppid(void)",
+ "Get the parent process id (POSIX.1, 4.1.1)"
+ ],
+ "posix_getpwnam": [
+ "array posix_getpwnam(string groupname)",
+ "User database access (POSIX.1, 9.2.2)"
+ ],
+ "posix_getpwuid": [
+ "array posix_getpwuid(long uid)",
+ "User database access (POSIX.1, 9.2.2)"
+ ],
+ "posix_getrlimit": [
+ "array posix_getrlimit(void)",
+ "Get system resource consumption limits (This is not a POSIX function, but a BSDism and a SVR4ism. We compile conditionally)"
+ ],
+ "posix_getsid": [
+ "int posix_getsid(void)",
+ "Get process group id of session leader (This is not a POSIX function, but a SVR4ism, so be compile conditionally)"
+ ],
+ "posix_getuid": [
+ "int posix_getuid(void)",
+ "Get the current user id (POSIX.1, 4.2.1)"
+ ],
+ "posix_initgroups": [
+ "bool posix_initgroups(string name, int base_group_id)",
+ "Calculate the group access list for the user specified in name."
+ ],
+ "posix_isatty": [
+ "bool posix_isatty(int fd)",
+ "Determine if filedesc is a tty (POSIX.1, 4.7.1)"
+ ],
+ "posix_kill": [
+ "bool posix_kill(int pid, int sig)",
+ "Send a signal to a process (POSIX.1, 3.3.2)"
+ ],
+ "posix_mkfifo": [
+ "bool posix_mkfifo(string pathname, int mode)",
+ "Make a FIFO special file (POSIX.1, 5.4.2)"
+ ],
+ "posix_mknod": [
+ "bool posix_mknod(string pathname, int mode [, int major [, int minor]])",
+ "Make a special or ordinary file (POSIX.1)"
+ ],
+ "posix_setegid": [
+ "bool posix_setegid(long uid)",
+ "Set effective group id"
+ ],
+ "posix_seteuid": [
+ "bool posix_seteuid(long uid)",
+ "Set effective user id"
+ ],
+ "posix_setgid": [
+ "bool posix_setgid(int uid)",
+ "Set group id (POSIX.1, 4.2.2)"
+ ],
+ "posix_setpgid": [
+ "bool posix_setpgid(int pid, int pgid)",
+ "Set process group id for job control (POSIX.1, 4.3.3)"
+ ],
+ "posix_setsid": [
+ "int posix_setsid(void)",
+ "Create session and set process group id (POSIX.1, 4.3.2)"
+ ],
+ "posix_setuid": [
+ "bool posix_setuid(long uid)",
+ "Set user id (POSIX.1, 4.2.2)"
+ ],
+ "posix_strerror": [
+ "string posix_strerror(int errno)",
+ "Retrieve the system error message associated with the given errno."
+ ],
+ "posix_times": [
+ "array posix_times(void)",
+ "Get process times (POSIX.1, 4.5.2)"
+ ],
+ "posix_ttyname": [
+ "string posix_ttyname(int fd)",
+ "Determine terminal device name (POSIX.1, 4.7.2)"
+ ],
+ "posix_uname": [
+ "array posix_uname(void)",
+ "Get system name (POSIX.1, 4.4.1)"
+ ],
+ "pow": [
+ "number pow(number base, number exponent)",
+ "Returns base raised to the power of exponent. Returns integer result when possible"
+ ],
+ "preg_filter": [
+ "mixed preg_filter(mixed regex, mixed replace, mixed subject [, int limit [, int &count]])",
+ "Perform Perl-style regular expression replacement and only return matches."
+ ],
+ "preg_grep": [
+ "array preg_grep(string regex, array input [, int flags])",
+ "Searches array and returns entries which match regex"
+ ],
+ "preg_last_error": [
+ "int preg_last_error()",
+ "Returns the error code of the last regexp execution."
+ ],
+ "preg_match": [
+ "int preg_match(string pattern, string subject [, array &subpatterns [, int flags [, int offset]]])",
+ "Perform a Perl-style regular expression match"
+ ],
+ "preg_match_all": [
+ "int preg_match_all(string pattern, string subject, array &subpatterns [, int flags [, int offset]])",
+ "Perform a Perl-style global regular expression match"
+ ],
+ "preg_quote": [
+ "string preg_quote(string str [, string delim_char])",
+ "Quote regular expression characters plus an optional character"
+ ],
+ "preg_replace": [
+ "mixed preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, int &count]])",
+ "Perform Perl-style regular expression replacement."
+ ],
+ "preg_replace_callback": [
+ "mixed preg_replace_callback(mixed regex, mixed callback, mixed subject [, int limit [, int &count]])",
+ "Perform Perl-style regular expression replacement using replacement callback."
+ ],
+ "preg_split": [
+ "array preg_split(string pattern, string subject [, int limit [, int flags]])",
+ "Split string into an array using a perl-style regular expression as a delimiter"
+ ],
+ "prev": [
+ "mixed prev(array array_arg)",
+ "Move array argument's internal pointer to the previous element and return it"
+ ],
+ "print": [
+ "int print(string arg)",
+ "Output a string"
+ ],
+ "print_r": [
+ "mixed print_r(mixed var [, bool return])",
+ "Prints out or returns information about the specified variable"
+ ],
+ "printf": [
+ "int printf(string format [, mixed arg1 [, mixed ...]])",
+ "Output a formatted string"
+ ],
+ "proc_close": [
+ "int proc_close(resource process)",
+ "close a process opened by proc_open"
+ ],
+ "proc_get_status": [
+ "array proc_get_status(resource process)",
+ "get information about a process opened by proc_open"
+ ],
+ "proc_nice": [
+ "bool proc_nice(int priority)",
+ "Change the priority of the current process"
+ ],
+ "proc_open": [
+ "resource proc_open(string command, array descriptorspec, array &pipes [, string cwd [, array env [, array other_options]]])",
+ "Run a process with more control over it's file descriptors"
+ ],
+ "proc_terminate": [
+ "bool proc_terminate(resource process [, long signal])",
+ "kill a process opened by proc_open"
+ ],
+ "property_exists": [
+ "bool property_exists(mixed object_or_class, string property_name)",
+ "Checks if the object or class has a property"
+ ],
+ "pspell_add_to_personal": [
+ "bool pspell_add_to_personal(int pspell, string word)",
+ "Adds a word to a personal list"
+ ],
+ "pspell_add_to_session": [
+ "bool pspell_add_to_session(int pspell, string word)",
+ "Adds a word to the current session"
+ ],
+ "pspell_check": [
+ "bool pspell_check(int pspell, string word)",
+ "Returns true if word is valid"
+ ],
+ "pspell_clear_session": [
+ "bool pspell_clear_session(int pspell)",
+ "Clears the current session"
+ ],
+ "pspell_config_create": [
+ "int pspell_config_create(string language [, string spelling [, string jargon [, string encoding]]])",
+ "Create a new config to be used later to create a manager"
+ ],
+ "pspell_config_data_dir": [
+ "bool pspell_config_data_dir(int conf, string directory)",
+ "location of language data files"
+ ],
+ "pspell_config_dict_dir": [
+ "bool pspell_config_dict_dir(int conf, string directory)",
+ "location of the main word list"
+ ],
+ "pspell_config_ignore": [
+ "bool pspell_config_ignore(int conf, int ignore)",
+ "Ignore words <= n chars"
+ ],
+ "pspell_config_mode": [
+ "bool pspell_config_mode(int conf, long mode)",
+ "Select mode for config (PSPELL_FAST, PSPELL_NORMAL or PSPELL_BAD_SPELLERS)"
+ ],
+ "pspell_config_personal": [
+ "bool pspell_config_personal(int conf, string personal)",
+ "Use a personal dictionary for this config"
+ ],
+ "pspell_config_repl": [
+ "bool pspell_config_repl(int conf, string repl)",
+ "Use a personal dictionary with replacement pairs for this config"
+ ],
+ "pspell_config_runtogether": [
+ "bool pspell_config_runtogether(int conf, bool runtogether)",
+ "Consider run-together words as valid components"
+ ],
+ "pspell_config_save_repl": [
+ "bool pspell_config_save_repl(int conf, bool save)",
+ "Save replacement pairs when personal list is saved for this config"
+ ],
+ "pspell_new": [
+ "int pspell_new(string language [, string spelling [, string jargon [, string encoding [, int mode]]]])",
+ "Load a dictionary"
+ ],
+ "pspell_new_config": [
+ "int pspell_new_config(int config)",
+ "Load a dictionary based on the given config"
+ ],
+ "pspell_new_personal": [
+ "int pspell_new_personal(string personal, string language [, string spelling [, string jargon [, string encoding [, int mode]]]])",
+ "Load a dictionary with a personal wordlist"
+ ],
+ "pspell_save_wordlist": [
+ "bool pspell_save_wordlist(int pspell)",
+ "Saves the current (personal) wordlist"
+ ],
+ "pspell_store_replacement": [
+ "bool pspell_store_replacement(int pspell, string misspell, string correct)",
+ "Notify the dictionary of a user-selected replacement"
+ ],
+ "pspell_suggest": [
+ "array pspell_suggest(int pspell, string word)",
+ "Returns array of suggestions"
+ ],
+ "putenv": [
+ "bool putenv(string setting)",
+ "Set the value of an environment variable"
+ ],
+ "quoted_printable_decode": [
+ "string quoted_printable_decode(string str)",
+ "Convert a quoted-printable string to an 8 bit string"
+ ],
+ "quoted_printable_encode": [
+ "string quoted_printable_encode(string str) */",
+ "PHP_FUNCTION(quoted_printable_encode) { char *str, *new_str; int str_len; size_t new_str_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, \"s\", &str, &str_len) != SUCCESS) { return; } if (!str_len) { RETURN_EMPTY_STRING(); } new_str = (char *)php_quot_print_encode((unsigned char *)str, (size_t)str_len, &new_str_len); RETURN_STRINGL(new_str, new_str_len, 0); } /* }}}"
+ ],
+ "quotemeta": [
+ "string quotemeta(string str)",
+ "Quotes meta characters"
+ ],
+ "rad2deg": [
+ "float rad2deg(float number)",
+ "Converts the radian number to the equivalent number in degrees"
+ ],
+ "rand": [
+ "int rand([int min, int max])",
+ "Returns a random number"
+ ],
+ "range": [
+ "array range(mixed low, mixed high[, int step])",
+ "Create an array containing the range of integers or characters from low to high (inclusive)"
+ ],
+ "rawurldecode": [
+ "string rawurldecode(string str)",
+ "Decodes URL-encodes string"
+ ],
+ "rawurlencode": [
+ "string rawurlencode(string str)",
+ "URL-encodes string"
+ ],
+ "readdir": [
+ "string readdir([resource dir_handle])",
+ "Read directory entry from dir_handle"
+ ],
+ "readfile": [
+ "int readfile(string filename [, bool use_include_path[, resource context]])",
+ "Output a file or a URL"
+ ],
+ "readgzfile": [
+ "int readgzfile(string filename [, int use_include_path])",
+ "Output a .gz-file"
+ ],
+ "readline": [
+ "string readline([string prompt])",
+ "Reads a line"
+ ],
+ "readline_add_history": [
+ "bool readline_add_history(string prompt)",
+ "Adds a line to the history"
+ ],
+ "readline_callback_handler_install": [
+ "void readline_callback_handler_install(string prompt, mixed callback)",
+ "Initializes the readline callback interface and terminal, prints the prompt and returns immediately"
+ ],
+ "readline_callback_handler_remove": [
+ "bool readline_callback_handler_remove()",
+ "Removes a previously installed callback handler and restores terminal settings"
+ ],
+ "readline_callback_read_char": [
+ "void readline_callback_read_char()",
+ "Informs the readline callback interface that a character is ready for input"
+ ],
+ "readline_clear_history": [
+ "bool readline_clear_history(void)",
+ "Clears the history"
+ ],
+ "readline_completion_function": [
+ "bool readline_completion_function(string funcname)",
+ "Readline completion function?"
+ ],
+ "readline_info": [
+ "mixed readline_info([string varname [, string newvalue]])",
+ "Gets/sets various internal readline variables."
+ ],
+ "readline_list_history": [
+ "array readline_list_history(void)",
+ "Lists the history"
+ ],
+ "readline_on_new_line": [
+ "void readline_on_new_line(void)",
+ "Inform readline that the cursor has moved to a new line"
+ ],
+ "readline_read_history": [
+ "bool readline_read_history([string filename])",
+ "Reads the history"
+ ],
+ "readline_redisplay": [
+ "void readline_redisplay(void)",
+ "Ask readline to redraw the display"
+ ],
+ "readline_write_history": [
+ "bool readline_write_history([string filename])",
+ "Writes the history"
+ ],
+ "readlink": [
+ "string readlink(string filename)",
+ "Return the target of a symbolic link"
+ ],
+ "realpath": [
+ "string realpath(string path)",
+ "Return the resolved path"
+ ],
+ "realpath_cache_get": [
+ "bool realpath_cache_get()",
+ "Get current size of realpath cache"
+ ],
+ "realpath_cache_size": [
+ "bool realpath_cache_size()",
+ "Get current size of realpath cache"
+ ],
+ "recode_file": [
+ "bool recode_file(string request, resource input, resource output)",
+ "Recode file input into file output according to request"
+ ],
+ "recode_string": [
+ "string recode_string(string request, string str)",
+ "Recode string str according to request string"
+ ],
+ "register_shutdown_function": [
+ "void register_shutdown_function(string function_name)",
+ "Register a user-level function to be called on request termination"
+ ],
+ "register_tick_function": [
+ "bool register_tick_function(string function_name [, mixed arg [, mixed ... ]])",
+ "Registers a tick callback function"
+ ],
+ "rename": [
+ "bool rename(string old_name, string new_name[, resource context])",
+ "Rename a file"
+ ],
+ "require": [
+ "bool require(string path)",
+ "Includes and evaluates the specified file, erroring if the file cannot be included"
+ ],
+ "require_once": [
+ "bool require_once(string path)",
+ "Includes and evaluates the specified file, erroring if the file cannot be included"
+ ],
+ "reset": [
+ "mixed reset(array array_arg)",
+ "Set array argument's internal pointer to the first element and return it"
+ ],
+ "restore_error_handler": [
+ "void restore_error_handler(void)",
+ "Restores the previously defined error handler function"
+ ],
+ "restore_exception_handler": [
+ "void restore_exception_handler(void)",
+ "Restores the previously defined exception handler function"
+ ],
+ "restore_include_path": [
+ "void restore_include_path()",
+ "Restore the value of the include_path configuration option"
+ ],
+ "rewind": [
+ "bool rewind(resource fp)",
+ "Rewind the position of a file pointer"
+ ],
+ "rewinddir": [
+ "void rewinddir([resource dir_handle])",
+ "Rewind dir_handle back to the start"
+ ],
+ "rmdir": [
+ "bool rmdir(string dirname[, resource context])",
+ "Remove a directory"
+ ],
+ "round": [
+ "float round(float number [, int precision [, int mode]])",
+ "Returns the number rounded to specified precision"
+ ],
+ "rsort": [
+ "bool rsort(array &array_arg [, int sort_flags])",
+ "Sort an array in reverse order"
+ ],
+ "rtrim": [
+ "string rtrim(string str [, string character_mask])",
+ "Removes trailing whitespace"
+ ],
+ "scandir": [
+ "array scandir(string dir [, int sorting_order [, resource context]])",
+ "List files & directories inside the specified path"
+ ],
+ "sem_acquire": [
+ "bool sem_acquire(resource id)",
+ "Acquires the semaphore with the given id, blocking if necessary"
+ ],
+ "sem_get": [
+ "resource sem_get(int key [, int max_acquire [, int perm [, int auto_release]])",
+ "Return an id for the semaphore with the given key, and allow max_acquire (default 1) processes to acquire it simultaneously"
+ ],
+ "sem_release": [
+ "bool sem_release(resource id)",
+ "Releases the semaphore with the given id"
+ ],
+ "sem_remove": [
+ "bool sem_remove(resource id)",
+ "Removes semaphore from Unix systems"
+ ],
+ "serialize": [
+ "string serialize(mixed variable)",
+ "Returns a string representation of variable (which can later be unserialized)"
+ ],
+ "session_cache_expire": [
+ "int session_cache_expire([int new_cache_expire])",
+ "Return the current cache expire. If new_cache_expire is given, the current cache_expire is replaced with new_cache_expire"
+ ],
+ "session_cache_limiter": [
+ "string session_cache_limiter([string new_cache_limiter])",
+ "Return the current cache limiter. If new_cache_limited is given, the current cache_limiter is replaced with new_cache_limiter"
+ ],
+ "session_decode": [
+ "bool session_decode(string data)",
+ "Deserializes data and reinitializes the variables"
+ ],
+ "session_destroy": [
+ "bool session_destroy(void)",
+ "Destroy the current session and all data associated with it"
+ ],
+ "session_encode": [
+ "string session_encode(void)",
+ "Serializes the current setup and returns the serialized representation"
+ ],
+ "session_get_cookie_params": [
+ "array session_get_cookie_params(void)",
+ "Return the session cookie parameters"
+ ],
+ "session_id": [
+ "string session_id([string newid])",
+ "Return the current session id. If newid is given, the session id is replaced with newid"
+ ],
+ "session_is_registered": [
+ "bool session_is_registered(string varname)",
+ "Checks if a variable is registered in session"
+ ],
+ "session_module_name": [
+ "string session_module_name([string newname])",
+ "Return the current module name used for accessing session data. If newname is given, the module name is replaced with newname"
+ ],
+ "session_name": [
+ "string session_name([string newname])",
+ "Return the current session name. If newname is given, the session name is replaced with newname"
+ ],
+ "session_regenerate_id": [
+ "bool session_regenerate_id([bool delete_old_session])",
+ "Update the current session id with a newly generated one. If delete_old_session is set to true, remove the old session."
+ ],
+ "session_register": [
+ "bool session_register(mixed var_names [, mixed ...])",
+ "Adds varname(s) to the list of variables which are freezed at the session end"
+ ],
+ "session_save_path": [
+ "string session_save_path([string newname])",
+ "Return the current save path passed to module_name. If newname is given, the save path is replaced with newname"
+ ],
+ "session_set_cookie_params": [
+ "void session_set_cookie_params(int lifetime [, string path [, string domain [, bool secure[, bool httponly]]]])",
+ "Set session cookie parameters"
+ ],
+ "session_set_save_handler": [
+ "void session_set_save_handler(string open, string close, string read, string write, string destroy, string gc)",
+ "Sets user-level functions"
+ ],
+ "session_start": [
+ "bool session_start(void)",
+ "Begin session - reinitializes freezed variables, registers browsers etc"
+ ],
+ "session_unregister": [
+ "bool session_unregister(string varname)",
+ "Removes varname from the list of variables which are freezed at the session end"
+ ],
+ "session_unset": [
+ "void session_unset(void)",
+ "Unset all registered variables"
+ ],
+ "session_write_close": [
+ "void session_write_close(void)",
+ "Write session data and end session"
+ ],
+ "set_error_handler": [
+ "string set_error_handler(string error_handler [, int error_types])",
+ "Sets a user-defined error handler function. Returns the previously defined error handler, or false on error"
+ ],
+ "set_exception_handler": [
+ "string set_exception_handler(callable exception_handler)",
+ "Sets a user-defined exception handler function. Returns the previously defined exception handler, or false on error"
+ ],
+ "set_include_path": [
+ "string set_include_path(string new_include_path)",
+ "Sets the include_path configuration option"
+ ],
+ "set_magic_quotes_runtime": [
+ "bool set_magic_quotes_runtime(int new_setting)",
+ "Set the current active configuration setting of magic_quotes_runtime and return previous"
+ ],
+ "set_time_limit": [
+ "bool set_time_limit(int seconds)",
+ "Sets the maximum time a script can run"
+ ],
+ "setcookie": [
+ "bool setcookie(string name [, string value [, int expires [, string path [, string domain [, bool secure[, bool httponly]]]]]])",
+ "Send a cookie"
+ ],
+ "setlocale": [
+ "string setlocale(mixed category, string locale [, string ...])",
+ "Set locale information"
+ ],
+ "setrawcookie": [
+ "bool setrawcookie(string name [, string value [, int expires [, string path [, string domain [, bool secure[, bool httponly]]]]]])",
+ "Send a cookie with no url encoding of the value"
+ ],
+ "settype": [
+ "bool settype(mixed var, string type)",
+ "Set the type of the variable"
+ ],
+ "sha1": [
+ "string sha1(string str [, bool raw_output])",
+ "Calculate the sha1 hash of a string"
+ ],
+ "sha1_file": [
+ "string sha1_file(string filename [, bool raw_output])",
+ "Calculate the sha1 hash of given filename"
+ ],
+ "shell_exec": [
+ "string shell_exec(string cmd)",
+ "Execute command via shell and return complete output as string"
+ ],
+ "shm_attach": [
+ "int shm_attach(int key [, int memsize [, int perm]])",
+ "Creates or open a shared memory segment"
+ ],
+ "shm_detach": [
+ "bool shm_detach(resource shm_identifier)",
+ "Disconnects from shared memory segment"
+ ],
+ "shm_get_var": [
+ "mixed shm_get_var(resource id, int variable_key)",
+ "Returns a variable from shared memory"
+ ],
+ "shm_has_var": [
+ "bool shm_has_var(resource id, int variable_key)",
+ "Checks whether a specific entry exists"
+ ],
+ "shm_put_var": [
+ "bool shm_put_var(resource shm_identifier, int variable_key, mixed variable)",
+ "Inserts or updates a variable in shared memory"
+ ],
+ "shm_remove": [
+ "bool shm_remove(resource shm_identifier)",
+ "Removes shared memory from Unix systems"
+ ],
+ "shm_remove_var": [
+ "bool shm_remove_var(resource id, int variable_key)",
+ "Removes variable from shared memory"
+ ],
+ "shmop_close": [
+ "void shmop_close (int shmid)",
+ "closes a shared memory segment"
+ ],
+ "shmop_delete": [
+ "bool shmop_delete (int shmid)",
+ "mark segment for deletion"
+ ],
+ "shmop_open": [
+ "int shmop_open (int key, string flags, int mode, int size)",
+ "gets and attaches a shared memory segment"
+ ],
+ "shmop_read": [
+ "string shmop_read (int shmid, int start, int count)",
+ "reads from a shm segment"
+ ],
+ "shmop_size": [
+ "int shmop_size (int shmid)",
+ "returns the shm size"
+ ],
+ "shmop_write": [
+ "int shmop_write (int shmid, string data, int offset)",
+ "writes to a shared memory segment"
+ ],
+ "shuffle": [
+ "bool shuffle(array array_arg)",
+ "Randomly shuffle the contents of an array"
+ ],
+ "similar_text": [
+ "int similar_text(string str1, string str2 [, float percent])",
+ "Calculates the similarity between two strings"
+ ],
+ "simplexml_import_dom": [
+ "simplemxml_element simplexml_import_dom(domNode node [, string class_name])",
+ "Get a simplexml_element object from dom to allow for processing"
+ ],
+ "simplexml_load_file": [
+ "simplemxml_element simplexml_load_file(string filename [, string class_name [, int options [, string ns [, bool is_prefix]]]])",
+ "Load a filename and return a simplexml_element object to allow for processing"
+ ],
+ "simplexml_load_string": [
+ "simplemxml_element simplexml_load_string(string data [, string class_name [, int options [, string ns [, bool is_prefix]]]])",
+ "Load a string and return a simplexml_element object to allow for processing"
+ ],
+ "sin": [
+ "float sin(float number)",
+ "Returns the sine of the number in radians"
+ ],
+ "sinh": [
+ "float sinh(float number)",
+ "Returns the hyperbolic sine of the number, defined as (exp(number) - exp(-number))/2"
+ ],
+ "sleep": [
+ "void sleep(int seconds)",
+ "Delay for a given number of seconds"
+ ],
+ "smfi_addheader": [
+ "bool smfi_addheader(string headerf, string headerv)",
+ "Adds a header to the current message."
+ ],
+ "smfi_addrcpt": [
+ "bool smfi_addrcpt(string rcpt)",
+ "Add a recipient to the message envelope."
+ ],
+ "smfi_chgheader": [
+ "bool smfi_chgheader(string headerf, string headerv)",
+ "Changes a header's value for the current message."
+ ],
+ "smfi_delrcpt": [
+ "bool smfi_delrcpt(string rcpt)",
+ "Removes the named recipient from the current message's envelope."
+ ],
+ "smfi_getsymval": [
+ "string smfi_getsymval(string macro)",
+ "Returns the value of the given macro or NULL if the macro is not defined."
+ ],
+ "smfi_replacebody": [
+ "bool smfi_replacebody(string body)",
+ "Replaces the body of the current message. If called more than once, subsequent calls result in data being appended to the new body."
+ ],
+ "smfi_setflags": [
+ "void smfi_setflags(long flags)",
+ "Sets the flags describing the actions the filter may take."
+ ],
+ "smfi_setreply": [
+ "bool smfi_setreply(string rcode, string xcode, string message)",
+ "Directly set the SMTP error reply code for this connection. This code will be used on subsequent error replies resulting from actions taken by this filter."
+ ],
+ "smfi_settimeout": [
+ "void smfi_settimeout(long timeout)",
+ "Sets the number of seconds libmilter will wait for an MTA connection before timing out a socket."
+ ],
+ "snmp2_get": [
+ "string snmp2_get(string host, string community, string object_id [, int timeout [, int retries]])",
+ "Fetch a SNMP object"
+ ],
+ "snmp2_getnext": [
+ "string snmp2_getnext(string host, string community, string object_id [, int timeout [, int retries]])",
+ "Fetch a SNMP object"
+ ],
+ "snmp2_real_walk": [
+ "array snmp2_real_walk(string host, string community, string object_id [, int timeout [, int retries]])",
+ "Return all objects including their respective object id withing the specified one"
+ ],
+ "snmp2_set": [
+ "int snmp2_set(string host, string community, string object_id, string type, mixed value [, int timeout [, int retries]])",
+ "Set the value of a SNMP object"
+ ],
+ "snmp2_walk": [
+ "array snmp2_walk(string host, string community, string object_id [, int timeout [, int retries]])",
+ "Return all objects under the specified object id"
+ ],
+ "snmp3_get": [
+ "int snmp3_get(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])",
+ "Fetch the value of a SNMP object"
+ ],
+ "snmp3_getnext": [
+ "int snmp3_getnext(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])",
+ "Fetch the value of a SNMP object"
+ ],
+ "snmp3_real_walk": [
+ "int snmp3_real_walk(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])",
+ "Fetch the value of a SNMP object"
+ ],
+ "snmp3_set": [
+ "int snmp3_set(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id, string type, mixed value [, int timeout [, int retries]])",
+ "Fetch the value of a SNMP object"
+ ],
+ "snmp3_walk": [
+ "int snmp3_walk(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])",
+ "Fetch the value of a SNMP object"
+ ],
+ "snmp_get_quick_print": [
+ "bool snmp_get_quick_print(void)",
+ "Return the current status of quick_print"
+ ],
+ "snmp_get_valueretrieval": [
+ "int snmp_get_valueretrieval()",
+ "Return the method how the SNMP values will be returned"
+ ],
+ "snmp_read_mib": [
+ "int snmp_read_mib(string filename)",
+ "Reads and parses a MIB file into the active MIB tree."
+ ],
+ "snmp_set_enum_print": [
+ "void snmp_set_enum_print(int enum_print)",
+ "Return all values that are enums with their enum value instead of the raw integer"
+ ],
+ "snmp_set_oid_output_format": [
+ "void snmp_set_oid_output_format(int oid_format)",
+ "Set the OID output format."
+ ],
+ "snmp_set_quick_print": [
+ "void snmp_set_quick_print(int quick_print)",
+ "Return all objects including their respective object id withing the specified one"
+ ],
+ "snmp_set_valueretrieval": [
+ "void snmp_set_valueretrieval(int method)",
+ "Specify the method how the SNMP values will be returned"
+ ],
+ "snmpget": [
+ "string snmpget(string host, string community, string object_id [, int timeout [, int retries]])",
+ "Fetch a SNMP object"
+ ],
+ "snmpgetnext": [
+ "string snmpgetnext(string host, string community, string object_id [, int timeout [, int retries]])",
+ "Fetch a SNMP object"
+ ],
+ "snmprealwalk": [
+ "array snmprealwalk(string host, string community, string object_id [, int timeout [, int retries]])",
+ "Return all objects including their respective object id withing the specified one"
+ ],
+ "snmpset": [
+ "int snmpset(string host, string community, string object_id, string type, mixed value [, int timeout [, int retries]])",
+ "Set the value of a SNMP object"
+ ],
+ "snmpwalk": [
+ "array snmpwalk(string host, string community, string object_id [, int timeout [, int retries]])",
+ "Return all objects under the specified object id"
+ ],
+ "socket_accept": [
+ "resource socket_accept(resource socket)",
+ "Accepts a connection on the listening socket fd"
+ ],
+ "socket_bind": [
+ "bool socket_bind(resource socket, string addr [, int port])",
+ "Binds an open socket to a listening port, port is only specified in AF_INET family."
+ ],
+ "socket_clear_error": [
+ "void socket_clear_error([resource socket])",
+ "Clears the error on the socket or the last error code."
+ ],
+ "socket_close": [
+ "void socket_close(resource socket)",
+ "Closes a file descriptor"
+ ],
+ "socket_connect": [
+ "bool socket_connect(resource socket, string addr [, int port])",
+ "Opens a connection to addr:port on the socket specified by socket"
+ ],
+ "socket_create": [
+ "resource socket_create(int domain, int type, int protocol)",
+ "Creates an endpoint for communication in the domain specified by domain, of type specified by type"
+ ],
+ "socket_create_listen": [
+ "resource socket_create_listen(int port[, int backlog])",
+ "Opens a socket on port to accept connections"
+ ],
+ "socket_create_pair": [
+ "bool socket_create_pair(int domain, int type, int protocol, array &fd)",
+ "Creates a pair of indistinguishable sockets and stores them in fds."
+ ],
+ "socket_get_option": [
+ "mixed socket_get_option(resource socket, int level, int optname)",
+ "Gets socket options for the socket"
+ ],
+ "socket_getpeername": [
+ "bool socket_getpeername(resource socket, string &addr[, int &port])",
+ "Queries the remote side of the given socket which may either result in host/port or in a UNIX filesystem path, dependent on its type."
+ ],
+ "socket_getsockname": [
+ "bool socket_getsockname(resource socket, string &addr[, int &port])",
+ "Queries the remote side of the given socket which may either result in host/port or in a UNIX filesystem path, dependent on its type."
+ ],
+ "socket_last_error": [
+ "int socket_last_error([resource socket])",
+ "Returns the last socket error (either the last used or the provided socket resource)"
+ ],
+ "socket_listen": [
+ "bool socket_listen(resource socket[, int backlog])",
+ "Sets the maximum number of connections allowed to be waited for on the socket specified by fd"
+ ],
+ "socket_read": [
+ "string socket_read(resource socket, int length [, int type])",
+ "Reads a maximum of length bytes from socket"
+ ],
+ "socket_recv": [
+ "int socket_recv(resource socket, string &buf, int len, int flags)",
+ "Receives data from a connected socket"
+ ],
+ "socket_recvfrom": [
+ "int socket_recvfrom(resource socket, string &buf, int len, int flags, string &name [, int &port])",
+ "Receives data from a socket, connected or not"
+ ],
+ "socket_select": [
+ "int socket_select(array &read_fds, array &write_fds, array &except_fds, int tv_sec[, int tv_usec])",
+ "Runs the select() system call on the sets mentioned with a timeout specified by tv_sec and tv_usec"
+ ],
+ "socket_send": [
+ "int socket_send(resource socket, string buf, int len, int flags)",
+ "Sends data to a connected socket"
+ ],
+ "socket_sendto": [
+ "int socket_sendto(resource socket, string buf, int len, int flags, string addr [, int port])",
+ "Sends a message to a socket, whether it is connected or not"
+ ],
+ "socket_set_block": [
+ "bool socket_set_block(resource socket)",
+ "Sets blocking mode on a socket resource"
+ ],
+ "socket_set_nonblock": [
+ "bool socket_set_nonblock(resource socket)",
+ "Sets nonblocking mode on a socket resource"
+ ],
+ "socket_set_option": [
+ "bool socket_set_option(resource socket, int level, int optname, int|array optval)",
+ "Sets socket options for the socket"
+ ],
+ "socket_shutdown": [
+ "bool socket_shutdown(resource socket[, int how])",
+ "Shuts down a socket for receiving, sending, or both."
+ ],
+ "socket_strerror": [
+ "string socket_strerror(int errno)",
+ "Returns a string describing an error"
+ ],
+ "socket_write": [
+ "int socket_write(resource socket, string buf[, int length])",
+ "Writes the buffer to the socket resource, length is optional"
+ ],
+ "solid_fetch_prev": [
+ "bool solid_fetch_prev(resource result_id)",
+ ""
+ ],
+ "sort": [
+ "bool sort(array &array_arg [, int sort_flags])",
+ "Sort an array"
+ ],
+ "soundex": [
+ "string soundex(string str)",
+ "Calculate the soundex key of a string"
+ ],
+ "spl_autoload": [
+ "void spl_autoload(string class_name [, string file_extensions])",
+ "Default implementation for __autoload()"
+ ],
+ "spl_autoload_call": [
+ "void spl_autoload_call(string class_name)",
+ "Try all registerd autoload function to load the requested class"
+ ],
+ "spl_autoload_extensions": [
+ "string spl_autoload_extensions([string file_extensions])",
+ "Register and return default file extensions for spl_autoload"
+ ],
+ "spl_autoload_functions": [
+ "false|array spl_autoload_functions()",
+ "Return all registered __autoload() functionns"
+ ],
+ "spl_autoload_register": [
+ "bool spl_autoload_register([mixed autoload_function = \"spl_autoload\" [, throw = true [, prepend]]])",
+ "Register given function as __autoload() implementation"
+ ],
+ "spl_autoload_unregister": [
+ "bool spl_autoload_unregister(mixed autoload_function)",
+ "Unregister given function as __autoload() implementation"
+ ],
+ "spl_classes": [
+ "array spl_classes()",
+ "Return an array containing the names of all clsses and interfaces defined in SPL"
+ ],
+ "spl_object_hash": [
+ "string spl_object_hash(object obj)",
+ "Return hash id for given object"
+ ],
+ "split": [
+ "array split(string pattern, string string [, int limit])",
+ "Split string into array by regular expression"
+ ],
+ "spliti": [
+ "array spliti(string pattern, string string [, int limit])",
+ "Split string into array by regular expression case-insensitive"
+ ],
+ "sprintf": [
+ "string sprintf(string format [, mixed arg1 [, mixed ...]])",
+ "Return a formatted string"
+ ],
+ "sql_regcase": [
+ "string sql_regcase(string string)",
+ "Make regular expression for case insensitive match"
+ ],
+ "sqlite_array_query": [
+ "array sqlite_array_query(resource db, string query [ , int result_type [, bool decode_binary]])",
+ "Executes a query against a given database and returns an array of arrays."
+ ],
+ "sqlite_busy_timeout": [
+ "void sqlite_busy_timeout(resource db, int ms)",
+ "Set busy timeout duration. If ms <= 0, all busy handlers are disabled."
+ ],
+ "sqlite_changes": [
+ "int sqlite_changes(resource db)",
+ "Returns the number of rows that were changed by the most recent SQL statement."
+ ],
+ "sqlite_close": [
+ "void sqlite_close(resource db)",
+ "Closes an open sqlite database."
+ ],
+ "sqlite_column": [
+ "mixed sqlite_column(resource result, mixed index_or_name [, bool decode_binary])",
+ "Fetches a column from the current row of a result set."
+ ],
+ "sqlite_create_aggregate": [
+ "bool sqlite_create_aggregate(resource db, string funcname, mixed step_func, mixed finalize_func[, long num_args])",
+ "Registers an aggregate function for queries."
+ ],
+ "sqlite_create_function": [
+ "bool sqlite_create_function(resource db, string funcname, mixed callback[, long num_args])",
+ "Registers a \"regular\" function for queries."
+ ],
+ "sqlite_current": [
+ "array sqlite_current(resource result [, int result_type [, bool decode_binary]])",
+ "Fetches the current row from a result set as an array."
+ ],
+ "sqlite_error_string": [
+ "string sqlite_error_string(int error_code)",
+ "Returns the textual description of an error code."
+ ],
+ "sqlite_escape_string": [
+ "string sqlite_escape_string(string item)",
+ "Escapes a string for use as a query parameter."
+ ],
+ "sqlite_exec": [
+ "boolean sqlite_exec(string query, resource db[, string &error_message])",
+ "Executes a result-less query against a given database"
+ ],
+ "sqlite_factory": [
+ "object sqlite_factory(string filename [, int mode [, string &error_message]])",
+ "Opens a SQLite database and creates an object for it. Will create the database if it does not exist."
+ ],
+ "sqlite_fetch_all": [
+ "array sqlite_fetch_all(resource result [, int result_type [, bool decode_binary]])",
+ "Fetches all rows from a result set as an array of arrays."
+ ],
+ "sqlite_fetch_array": [
+ "array sqlite_fetch_array(resource result [, int result_type [, bool decode_binary]])",
+ "Fetches the next row from a result set as an array."
+ ],
+ "sqlite_fetch_column_types": [
+ "resource sqlite_fetch_column_types(string table_name, resource db [, int result_type])",
+ "Return an array of column types from a particular table."
+ ],
+ "sqlite_fetch_object": [
+ "object sqlite_fetch_object(resource result [, string class_name [, NULL|array ctor_params [, bool decode_binary]]])",
+ "Fetches the next row from a result set as an object."
+ ],
+ "sqlite_fetch_single": [
+ "string sqlite_fetch_single(resource result [, bool decode_binary])",
+ "Fetches the first column of a result set as a string."
+ ],
+ "sqlite_field_name": [
+ "string sqlite_field_name(resource result, int field_index)",
+ "Returns the name of a particular field of a result set."
+ ],
+ "sqlite_has_prev": [
+ "bool sqlite_has_prev(resource result)",
+ "* Returns whether a previous row is available."
+ ],
+ "sqlite_key": [
+ "int sqlite_key(resource result)",
+ "Return the current row index of a buffered result."
+ ],
+ "sqlite_last_error": [
+ "int sqlite_last_error(resource db)",
+ "Returns the error code of the last error for a database."
+ ],
+ "sqlite_last_insert_rowid": [
+ "int sqlite_last_insert_rowid(resource db)",
+ "Returns the rowid of the most recently inserted row."
+ ],
+ "sqlite_libencoding": [
+ "string sqlite_libencoding()",
+ "Returns the encoding (iso8859 or UTF-8) of the linked SQLite library."
+ ],
+ "sqlite_libversion": [
+ "string sqlite_libversion()",
+ "Returns the version of the linked SQLite library."
+ ],
+ "sqlite_next": [
+ "bool sqlite_next(resource result)",
+ "Seek to the next row number of a result set."
+ ],
+ "sqlite_num_fields": [
+ "int sqlite_num_fields(resource result)",
+ "Returns the number of fields in a result set."
+ ],
+ "sqlite_num_rows": [
+ "int sqlite_num_rows(resource result)",
+ "Returns the number of rows in a buffered result set."
+ ],
+ "sqlite_open": [
+ "resource sqlite_open(string filename [, int mode [, string &error_message]])",
+ "Opens a SQLite database. Will create the database if it does not exist."
+ ],
+ "sqlite_popen": [
+ "resource sqlite_popen(string filename [, int mode [, string &error_message]])",
+ "Opens a persistent handle to a SQLite database. Will create the database if it does not exist."
+ ],
+ "sqlite_prev": [
+ "bool sqlite_prev(resource result)",
+ "* Seek to the previous row number of a result set."
+ ],
+ "sqlite_query": [
+ "resource sqlite_query(string query, resource db [, int result_type [, string &error_message]])",
+ "Executes a query against a given database and returns a result handle."
+ ],
+ "sqlite_rewind": [
+ "bool sqlite_rewind(resource result)",
+ "Seek to the first row number of a buffered result set."
+ ],
+ "sqlite_seek": [
+ "bool sqlite_seek(resource result, int row)",
+ "Seek to a particular row number of a buffered result set."
+ ],
+ "sqlite_single_query": [
+ "array sqlite_single_query(resource db, string query [, bool first_row_only [, bool decode_binary]])",
+ "Executes a query and returns either an array for one single column or the value of the first row."
+ ],
+ "sqlite_udf_decode_binary": [
+ "string sqlite_udf_decode_binary(string data)",
+ "Decode binary encoding on a string parameter passed to an UDF."
+ ],
+ "sqlite_udf_encode_binary": [
+ "string sqlite_udf_encode_binary(string data)",
+ "Apply binary encoding (if required) to a string to return from an UDF."
+ ],
+ "sqlite_unbuffered_query": [
+ "resource sqlite_unbuffered_query(string query, resource db [ , int result_type [, string &error_message]])",
+ "Executes a query that does not prefetch and buffer all data."
+ ],
+ "sqlite_valid": [
+ "bool sqlite_valid(resource result)",
+ "Returns whether more rows are available."
+ ],
+ "sqrt": [
+ "float sqrt(float number)",
+ "Returns the square root of the number"
+ ],
+ "srand": [
+ "void srand([int seed])",
+ "Seeds random number generator"
+ ],
+ "sscanf": [
+ "mixed sscanf(string str, string format [, string ...])",
+ "Implements an ANSI C compatible sscanf"
+ ],
+ "stat": [
+ "array stat(string filename)",
+ "Give information about a file"
+ ],
+ "str_getcsv": [
+ "array str_getcsv(string input[, string delimiter[, string enclosure[, string escape]]])",
+ "Parse a CSV string into an array"
+ ],
+ "str_ireplace": [
+ "mixed str_ireplace(mixed search, mixed replace, mixed subject [, int &replace_count])",
+ "Replaces all occurrences of search in haystack with replace / case-insensitive"
+ ],
+ "str_pad": [
+ "string str_pad(string input, int pad_length [, string pad_string [, int pad_type]])",
+ "Returns input string padded on the left or right to specified length with pad_string"
+ ],
+ "str_repeat": [
+ "string str_repeat(string input, int mult)",
+ "Returns the input string repeat mult times"
+ ],
+ "str_replace": [
+ "mixed str_replace(mixed search, mixed replace, mixed subject [, int &replace_count])",
+ "Replaces all occurrences of search in haystack with replace"
+ ],
+ "str_rot13": [
+ "string str_rot13(string str)",
+ "Perform the rot13 transform on a string"
+ ],
+ "str_shuffle": [
+ "void str_shuffle(string str)",
+ "Shuffles string. One permutation of all possible is created"
+ ],
+ "str_split": [
+ "array str_split(string str [, int split_length])",
+ "Convert a string to an array. If split_length is specified, break the string down into chunks each split_length characters long."
+ ],
+ "str_word_count": [
+ "mixed str_word_count(string str, [int format [, string charlist]])",
+ "Counts the number of words inside a string. If format of 1 is specified, then the function will return an array containing all the words found inside the string. If format of 2 is specified, then the function will return an associated array where the position of the word is the key and the word itself is the value. For the purpose of this function, 'word' is defined as a locale dependent string containing alphabetic characters, which also may contain, but not start with \"'\" and \"-\" characters."
+ ],
+ "strcasecmp": [
+ "int strcasecmp(string str1, string str2)",
+ "Binary safe case-insensitive string comparison"
+ ],
+ "strchr": [
+ "string strchr(string haystack, string needle)",
+ "An alias for strstr"
+ ],
+ "strcmp": [
+ "int strcmp(string str1, string str2)",
+ "Binary safe string comparison"
+ ],
+ "strcoll": [
+ "int strcoll(string str1, string str2)",
+ "Compares two strings using the current locale"
+ ],
+ "strcspn": [
+ "int strcspn(string str, string mask [, start [, len]])",
+ "Finds length of initial segment consisting entirely of characters not found in mask. If start or/and length is provide works like strcspn(substr($s,$start,$len),$bad_chars)"
+ ],
+ "stream_bucket_append": [
+ "void stream_bucket_append(resource brigade, resource bucket)",
+ "Append bucket to brigade"
+ ],
+ "stream_bucket_make_writeable": [
+ "object stream_bucket_make_writeable(resource brigade)",
+ "Return a bucket object from the brigade for operating on"
+ ],
+ "stream_bucket_new": [
+ "resource stream_bucket_new(resource stream, string buffer)",
+ "Create a new bucket for use on the current stream"
+ ],
+ "stream_bucket_prepend": [
+ "void stream_bucket_prepend(resource brigade, resource bucket)",
+ "Prepend bucket to brigade"
+ ],
+ "stream_context_create": [
+ "resource stream_context_create([array options[, array params]])",
+ "Create a file context and optionally set parameters"
+ ],
+ "stream_context_get_default": [
+ "resource stream_context_get_default([array options])",
+ "Get a handle on the default file/stream context and optionally set parameters"
+ ],
+ "stream_context_get_options": [
+ "array stream_context_get_options(resource context|resource stream)",
+ "Retrieve options for a stream/wrapper/context"
+ ],
+ "stream_context_get_params": [
+ "array stream_context_get_params(resource context|resource stream)",
+ "Get parameters of a file context"
+ ],
+ "stream_context_set_default": [
+ "resource stream_context_set_default(array options)",
+ "Set default file/stream context, returns the context as a resource"
+ ],
+ "stream_context_set_option": [
+ "bool stream_context_set_option(resource context|resource stream, string wrappername, string optionname, mixed value)",
+ "Set an option for a wrapper"
+ ],
+ "stream_context_set_params": [
+ "bool stream_context_set_params(resource context|resource stream, array options)",
+ "Set parameters for a file context"
+ ],
+ "stream_copy_to_stream": [
+ "long stream_copy_to_stream(resource source, resource dest [, long maxlen [, long pos]])",
+ "Reads up to maxlen bytes from source stream and writes them to dest stream."
+ ],
+ "stream_filter_append": [
+ "resource stream_filter_append(resource stream, string filtername[, int read_write[, string filterparams]])",
+ "Append a filter to a stream"
+ ],
+ "stream_filter_prepend": [
+ "resource stream_filter_prepend(resource stream, string filtername[, int read_write[, string filterparams]])",
+ "Prepend a filter to a stream"
+ ],
+ "stream_filter_register": [
+ "bool stream_filter_register(string filtername, string classname)",
+ "Registers a custom filter handler class"
+ ],
+ "stream_filter_remove": [
+ "bool stream_filter_remove(resource stream_filter)",
+ "Flushes any data in the filter's internal buffer, removes it from the chain, and frees the resource"
+ ],
+ "stream_get_contents": [
+ "string stream_get_contents(resource source [, long maxlen [, long offset]])",
+ "Reads all remaining bytes (or up to maxlen bytes) from a stream and returns them as a string."
+ ],
+ "stream_get_filters": [
+ "array stream_get_filters(void)",
+ "Returns a list of registered filters"
+ ],
+ "stream_get_line": [
+ "string stream_get_line(resource stream, int maxlen [, string ending])",
+ "Read up to maxlen bytes from a stream or until the ending string is found"
+ ],
+ "stream_get_meta_data": [
+ "array stream_get_meta_data(resource fp)",
+ "Retrieves header/meta data from streams/file pointers"
+ ],
+ "stream_get_transports": [
+ "array stream_get_transports()",
+ "Retrieves list of registered socket transports"
+ ],
+ "stream_get_wrappers": [
+ "array stream_get_wrappers()",
+ "Retrieves list of registered stream wrappers"
+ ],
+ "stream_is_local": [
+ "bool stream_is_local(resource stream|string url)",
+ ""
+ ],
+ "stream_resolve_include_path": [
+ "string stream_resolve_include_path(string filename)",
+ "Determine what file will be opened by calls to fopen() with a relative path"
+ ],
+ "stream_select": [
+ "int stream_select(array &read_streams, array &write_streams, array &except_streams, int tv_sec[, int tv_usec])",
+ "Runs the select() system call on the sets of streams with a timeout specified by tv_sec and tv_usec"
+ ],
+ "stream_set_blocking": [
+ "bool stream_set_blocking(resource socket, int mode)",
+ "Set blocking/non-blocking mode on a socket or stream"
+ ],
+ "stream_set_timeout": [
+ "bool stream_set_timeout(resource stream, int seconds [, int microseconds])",
+ "Set timeout on stream read to seconds + microseonds"
+ ],
+ "stream_set_write_buffer": [
+ "int stream_set_write_buffer(resource fp, int buffer)",
+ "Set file write buffer"
+ ],
+ "stream_socket_accept": [
+ "resource stream_socket_accept(resource serverstream, [ double timeout [, string &peername ]])",
+ "Accept a client connection from a server socket"
+ ],
+ "stream_socket_client": [
+ "resource stream_socket_client(string remoteaddress [, long &errcode [, string &errstring [, double timeout [, long flags [, resource context]]]]])",
+ "Open a client connection to a remote address"
+ ],
+ "stream_socket_enable_crypto": [
+ "int stream_socket_enable_crypto(resource stream, bool enable [, int cryptokind [, resource sessionstream]])",
+ "Enable or disable a specific kind of crypto on the stream"
+ ],
+ "stream_socket_get_name": [
+ "string stream_socket_get_name(resource stream, bool want_peer)",
+ "Returns either the locally bound or remote name for a socket stream"
+ ],
+ "stream_socket_pair": [
+ "array stream_socket_pair(int domain, int type, int protocol)",
+ "Creates a pair of connected, indistinguishable socket streams"
+ ],
+ "stream_socket_recvfrom": [
+ "string stream_socket_recvfrom(resource stream, long amount [, long flags [, string &remote_addr]])",
+ "Receives data from a socket stream"
+ ],
+ "stream_socket_sendto": [
+ "long stream_socket_sendto(resouce stream, string data [, long flags [, string target_addr]])",
+ "Send data to a socket stream. If target_addr is specified it must be in dotted quad (or [ipv6]) format"
+ ],
+ "stream_socket_server": [
+ "resource stream_socket_server(string localaddress [, long &errcode [, string &errstring [, long flags [, resource context]]]])",
+ "Create a server socket bound to localaddress"
+ ],
+ "stream_socket_shutdown": [
+ "int stream_socket_shutdown(resource stream, int how)",
+ "causes all or part of a full-duplex connection on the socket associated with stream to be shut down. If how is SHUT_RD, further receptions will be disallowed. If how is SHUT_WR, further transmissions will be disallowed. If how is SHUT_RDWR, further receptions and transmissions will be disallowed."
+ ],
+ "stream_supports_lock": [
+ "bool stream_supports_lock(resource stream)",
+ "Tells wether the stream supports locking through flock()."
+ ],
+ "stream_wrapper_register": [
+ "bool stream_wrapper_register(string protocol, string classname[, integer flags])",
+ "Registers a custom URL protocol handler class"
+ ],
+ "stream_wrapper_restore": [
+ "bool stream_wrapper_restore(string protocol)",
+ "Restore the original protocol handler, overriding if necessary"
+ ],
+ "stream_wrapper_unregister": [
+ "bool stream_wrapper_unregister(string protocol)",
+ "Unregister a wrapper for the life of the current request."
+ ],
+ "strftime": [
+ "string strftime(string format [, int timestamp])",
+ "Format a local time/date according to locale settings"
+ ],
+ "strip_tags": [
+ "string strip_tags(string str [, string allowable_tags])",
+ "Strips HTML and PHP tags from a string"
+ ],
+ "stripcslashes": [
+ "string stripcslashes(string str)",
+ "Strips backslashes from a string. Uses C-style conventions"
+ ],
+ "stripos": [
+ "int stripos(string haystack, string needle [, int offset])",
+ "Finds position of first occurrence of a string within another, case insensitive"
+ ],
+ "stripslashes": [
+ "string stripslashes(string str)",
+ "Strips backslashes from a string"
+ ],
+ "stristr": [
+ "string stristr(string haystack, string needle[, bool part])",
+ "Finds first occurrence of a string within another, case insensitive"
+ ],
+ "strlen": [
+ "int strlen(string str)",
+ "Get string length"
+ ],
+ "strnatcasecmp": [
+ "int strnatcasecmp(string s1, string s2)",
+ "Returns the result of case-insensitive string comparison using 'natural' algorithm"
+ ],
+ "strnatcmp": [
+ "int strnatcmp(string s1, string s2)",
+ "Returns the result of string comparison using 'natural' algorithm"
+ ],
+ "strncasecmp": [
+ "int strncasecmp(string str1, string str2, int len)",
+ "Binary safe string comparison"
+ ],
+ "strncmp": [
+ "int strncmp(string str1, string str2, int len)",
+ "Binary safe string comparison"
+ ],
+ "strpbrk": [
+ "array strpbrk(string haystack, string char_list)",
+ "Search a string for any of a set of characters"
+ ],
+ "strpos": [
+ "int strpos(string haystack, string needle [, int offset])",
+ "Finds position of first occurrence of a string within another"
+ ],
+ "strptime": [
+ "string strptime(string timestamp, string format)",
+ "Parse a time/date generated with strftime()"
+ ],
+ "strrchr": [
+ "string strrchr(string haystack, string needle)",
+ "Finds the last occurrence of a character in a string within another"
+ ],
+ "strrev": [
+ "string strrev(string str)",
+ "Reverse a string"
+ ],
+ "strripos": [
+ "int strripos(string haystack, string needle [, int offset])",
+ "Finds position of last occurrence of a string within another string"
+ ],
+ "strrpos": [
+ "int strrpos(string haystack, string needle [, int offset])",
+ "Finds position of last occurrence of a string within another string"
+ ],
+ "strspn": [
+ "int strspn(string str, string mask [, start [, len]])",
+ "Finds length of initial segment consisting entirely of characters found in mask. If start or/and length is provided works like strspn(substr($s,$start,$len),$good_chars)"
+ ],
+ "strstr": [
+ "string strstr(string haystack, string needle[, bool part])",
+ "Finds first occurrence of a string within another"
+ ],
+ "strtok": [
+ "string strtok([string str,] string token)",
+ "Tokenize a string"
+ ],
+ "strtolower": [
+ "string strtolower(string str)",
+ "Makes a string lowercase"
+ ],
+ "strtotime": [
+ "int strtotime(string time [, int now ])",
+ "Convert string representation of date and time to a timestamp"
+ ],
+ "strtoupper": [
+ "string strtoupper(string str)",
+ "Makes a string uppercase"
+ ],
+ "strtr": [
+ "string strtr(string str, string from[, string to])",
+ "Translates characters in str using given translation tables"
+ ],
+ "strval": [
+ "string strval(mixed var)",
+ "Get the string value of a variable"
+ ],
+ "substr": [
+ "string substr(string str, int start [, int length])",
+ "Returns part of a string"
+ ],
+ "substr_compare": [
+ "int substr_compare(string main_str, string str, int offset [, int length [, bool case_sensitivity]])",
+ "Binary safe optionally case insensitive comparison of 2 strings from an offset, up to length characters"
+ ],
+ "substr_count": [
+ "int substr_count(string haystack, string needle [, int offset [, int length]])",
+ "Returns the number of times a substring occurs in the string"
+ ],
+ "substr_replace": [
+ "mixed substr_replace(mixed str, mixed repl, mixed start [, mixed length])",
+ "Replaces part of a string with another string"
+ ],
+ "sybase_affected_rows": [
+ "int sybase_affected_rows([resource link_id])",
+ "Get number of affected rows in last query"
+ ],
+ "sybase_close": [
+ "bool sybase_close([resource link_id])",
+ "Close Sybase connection"
+ ],
+ "sybase_connect": [
+ "int sybase_connect([string host [, string user [, string password [, string charset [, string appname [, bool new]]]]]])",
+ "Open Sybase server connection"
+ ],
+ "sybase_data_seek": [
+ "bool sybase_data_seek(resource result, int offset)",
+ "Move internal row pointer"
+ ],
+ "sybase_deadlock_retry_count": [
+ "void sybase_deadlock_retry_count(int retry_count)",
+ "Sets deadlock retry count"
+ ],
+ "sybase_fetch_array": [
+ "array sybase_fetch_array(resource result)",
+ "Fetch row as array"
+ ],
+ "sybase_fetch_assoc": [
+ "array sybase_fetch_assoc(resource result)",
+ "Fetch row as array without numberic indices"
+ ],
+ "sybase_fetch_field": [
+ "object sybase_fetch_field(resource result [, int offset])",
+ "Get field information"
+ ],
+ "sybase_fetch_object": [
+ "object sybase_fetch_object(resource result [, mixed object])",
+ "Fetch row as object"
+ ],
+ "sybase_fetch_row": [
+ "array sybase_fetch_row(resource result)",
+ "Get row as enumerated array"
+ ],
+ "sybase_field_seek": [
+ "bool sybase_field_seek(resource result, int offset)",
+ "Set field offset"
+ ],
+ "sybase_free_result": [
+ "bool sybase_free_result(resource result)",
+ "Free result memory"
+ ],
+ "sybase_get_last_message": [
+ "string sybase_get_last_message(void)",
+ "Returns the last message from server (over min_message_severity)"
+ ],
+ "sybase_min_client_severity": [
+ "void sybase_min_client_severity(int severity)",
+ "Sets minimum client severity"
+ ],
+ "sybase_min_server_severity": [
+ "void sybase_min_server_severity(int severity)",
+ "Sets minimum server severity"
+ ],
+ "sybase_num_fields": [
+ "int sybase_num_fields(resource result)",
+ "Get number of fields in result"
+ ],
+ "sybase_num_rows": [
+ "int sybase_num_rows(resource result)",
+ "Get number of rows in result"
+ ],
+ "sybase_pconnect": [
+ "int sybase_pconnect([string host [, string user [, string password [, string charset [, string appname]]]]])",
+ "Open persistent Sybase connection"
+ ],
+ "sybase_query": [
+ "int sybase_query(string query [, resource link_id])",
+ "Send Sybase query"
+ ],
+ "sybase_result": [
+ "string sybase_result(resource result, int row, mixed field)",
+ "Get result data"
+ ],
+ "sybase_select_db": [
+ "bool sybase_select_db(string database [, resource link_id])",
+ "Select Sybase database"
+ ],
+ "sybase_set_message_handler": [
+ "bool sybase_set_message_handler(mixed error_func [, resource connection])",
+ "Set the error handler, to be called when a server message is raised. If error_func is NULL the handler will be deleted"
+ ],
+ "sybase_unbuffered_query": [
+ "int sybase_unbuffered_query(string query [, resource link_id])",
+ "Send Sybase query"
+ ],
+ "symlink": [
+ "int symlink(string target, string link)",
+ "Create a symbolic link"
+ ],
+ "sys_get_temp_dir": [
+ "string sys_get_temp_dir()",
+ "Returns directory path used for temporary files"
+ ],
+ "sys_getloadavg": [
+ "array sys_getloadavg()",
+ ""
+ ],
+ "syslog": [
+ "bool syslog(int priority, string message)",
+ "Generate a system log message"
+ ],
+ "system": [
+ "int system(string command [, int &return_value])",
+ "Execute an external program and display output"
+ ],
+ "tan": [
+ "float tan(float number)",
+ "Returns the tangent of the number in radians"
+ ],
+ "tanh": [
+ "float tanh(float number)",
+ "Returns the hyperbolic tangent of the number, defined as sinh(number)/cosh(number)"
+ ],
+ "tempnam": [
+ "string tempnam(string dir, string prefix)",
+ "Create a unique filename in a directory"
+ ],
+ "textdomain": [
+ "string textdomain(string domain)",
+ "Set the textdomain to \"domain\". Returns the current domain"
+ ],
+ "tidy_access_count": [
+ "int tidy_access_count()",
+ "Returns the Number of Tidy accessibility warnings encountered for specified document."
+ ],
+ "tidy_clean_repair": [
+ "boolean tidy_clean_repair()",
+ "Execute configured cleanup and repair operations on parsed markup"
+ ],
+ "tidy_config_count": [
+ "int tidy_config_count()",
+ "Returns the Number of Tidy configuration errors encountered for specified document."
+ ],
+ "tidy_diagnose": [
+ "boolean tidy_diagnose()",
+ "Run configured diagnostics on parsed and repaired markup."
+ ],
+ "tidy_error_count": [
+ "int tidy_error_count()",
+ "Returns the Number of Tidy errors encountered for specified document."
+ ],
+ "tidy_get_body": [
+ "TidyNode tidy_get_body(resource tidy)",
+ "Returns a TidyNode Object starting from the <BODY> tag of the tidy parse tree"
+ ],
+ "tidy_get_config": [
+ "array tidy_get_config()",
+ "Get current Tidy configuarion"
+ ],
+ "tidy_get_error_buffer": [
+ "string tidy_get_error_buffer([boolean detailed])",
+ "Return warnings and errors which occured parsing the specified document"
+ ],
+ "tidy_get_head": [
+ "TidyNode tidy_get_head()",
+ "Returns a TidyNode Object starting from the <HEAD> tag of the tidy parse tree"
+ ],
+ "tidy_get_html": [
+ "TidyNode tidy_get_html()",
+ "Returns a TidyNode Object starting from the <HTML> tag of the tidy parse tree"
+ ],
+ "tidy_get_html_ver": [
+ "int tidy_get_html_ver()",
+ "Get the Detected HTML version for the specified document."
+ ],
+ "tidy_get_opt_doc": [
+ "string tidy_get_opt_doc(tidy resource, string optname)",
+ "Returns the documentation for the given option name"
+ ],
+ "tidy_get_output": [
+ "string tidy_get_output()",
+ "Return a string representing the parsed tidy markup"
+ ],
+ "tidy_get_release": [
+ "string tidy_get_release()",
+ "Get release date (version) for Tidy library"
+ ],
+ "tidy_get_root": [
+ "TidyNode tidy_get_root()",
+ "Returns a TidyNode Object representing the root of the tidy parse tree"
+ ],
+ "tidy_get_status": [
+ "int tidy_get_status()",
+ "Get status of specfied document."
+ ],
+ "tidy_getopt": [
+ "mixed tidy_getopt(string option)",
+ "Returns the value of the specified configuration option for the tidy document."
+ ],
+ "tidy_is_xhtml": [
+ "boolean tidy_is_xhtml()",
+ "Indicates if the document is a XHTML document."
+ ],
+ "tidy_is_xml": [
+ "boolean tidy_is_xml()",
+ "Indicates if the document is a generic (non HTML/XHTML) XML document."
+ ],
+ "tidy_parse_file": [
+ "boolean tidy_parse_file(string file [, mixed config_options [, string encoding [, bool use_include_path]]])",
+ "Parse markup in file or URI"
+ ],
+ "tidy_parse_string": [
+ "bool tidy_parse_string(string input [, mixed config_options [, string encoding]])",
+ "Parse a document stored in a string"
+ ],
+ "tidy_repair_file": [
+ "boolean tidy_repair_file(string filename [, mixed config_file [, string encoding [, bool use_include_path]]])",
+ "Repair a file using an optionally provided configuration file"
+ ],
+ "tidy_repair_string": [
+ "boolean tidy_repair_string(string data [, mixed config_file [, string encoding]])",
+ "Repair a string using an optionally provided configuration file"
+ ],
+ "tidy_warning_count": [
+ "int tidy_warning_count()",
+ "Returns the Number of Tidy warnings encountered for specified document."
+ ],
+ "time": [
+ "int time(void)",
+ "Return current UNIX timestamp"
+ ],
+ "time_nanosleep": [
+ "mixed time_nanosleep(long seconds, long nanoseconds)",
+ "Delay for a number of seconds and nano seconds"
+ ],
+ "time_sleep_until": [
+ "mixed time_sleep_until(float timestamp)",
+ "Make the script sleep until the specified time"
+ ],
+ "timezone_abbreviations_list": [
+ "array timezone_abbreviations_list()",
+ "Returns associative array containing dst, offset and the timezone name"
+ ],
+ "timezone_identifiers_list": [
+ "array timezone_identifiers_list([long what[, string country]])",
+ "Returns numerically index array with all timezone identifiers."
+ ],
+ "timezone_location_get": [
+ "array timezone_location_get()",
+ "Returns location information for a timezone, including country code, latitude/longitude and comments"
+ ],
+ "timezone_name_from_abbr": [
+ "string timezone_name_from_abbr(string abbr[, long gmtOffset[, long isdst]])",
+ "Returns the timezone name from abbrevation"
+ ],
+ "timezone_name_get": [
+ "string timezone_name_get(DateTimeZone object)",
+ "Returns the name of the timezone."
+ ],
+ "timezone_offset_get": [
+ "long timezone_offset_get(DateTimeZone object, DateTime object)",
+ "Returns the timezone offset."
+ ],
+ "timezone_open": [
+ "DateTimeZone timezone_open(string timezone)",
+ "Returns new DateTimeZone object"
+ ],
+ "timezone_transitions_get": [
+ "array timezone_transitions_get(DateTimeZone object [, long timestamp_begin [, long timestamp_end ]])",
+ "Returns numerically indexed array containing associative array for all transitions in the specified range for the timezone."
+ ],
+ "timezone_version_get": [
+ "array timezone_version_get()",
+ "Returns the Olson database version number."
+ ],
+ "tmpfile": [
+ "resource tmpfile(void)",
+ "Create a temporary file that will be deleted automatically after use"
+ ],
+ "token_get_all": [
+ "array token_get_all(string source)",
+ ""
+ ],
+ "token_name": [
+ "string token_name(int type)",
+ ""
+ ],
+ "touch": [
+ "bool touch(string filename [, int time [, int atime]])",
+ "Set modification time of file"
+ ],
+ "trigger_error": [
+ "void trigger_error(string messsage [, int error_type])",
+ "Generates a user-level error/warning/notice message"
+ ],
+ "trim": [
+ "string trim(string str [, string character_mask])",
+ "Strips whitespace from the beginning and end of a string"
+ ],
+ "uasort": [
+ "bool uasort(array array_arg, string cmp_function)",
+ "Sort an array with a user-defined comparison function and maintain index association"
+ ],
+ "ucfirst": [
+ "string ucfirst(string str)",
+ "Make a string's first character lowercase"
+ ],
+ "ucwords": [
+ "string ucwords(string str)",
+ "Uppercase the first character of every word in a string"
+ ],
+ "uksort": [
+ "bool uksort(array array_arg, string cmp_function)",
+ "Sort an array by keys using a user-defined comparison function"
+ ],
+ "umask": [
+ "int umask([int mask])",
+ "Return or change the umask"
+ ],
+ "uniqid": [
+ "string uniqid([string prefix [, bool more_entropy]])",
+ "Generates a unique ID"
+ ],
+ "unixtojd": [
+ "int unixtojd([int timestamp])",
+ "Convert UNIX timestamp to Julian Day"
+ ],
+ "unlink": [
+ "bool unlink(string filename[, context context])",
+ "Delete a file"
+ ],
+ "unpack": [
+ "array unpack(string format, string input)",
+ "Unpack binary string into named array elements according to format argument"
+ ],
+ "unregister_tick_function": [
+ "void unregister_tick_function(string function_name)",
+ "Unregisters a tick callback function"
+ ],
+ "unserialize": [
+ "mixed unserialize(string variable_representation)",
+ "Takes a string representation of variable and recreates it"
+ ],
+ "unset": [
+ "void unset (mixed var [, mixed var])",
+ "Unset a given variable"
+ ],
+ "urldecode": [
+ "string urldecode(string str)",
+ "Decodes URL-encoded string"
+ ],
+ "urlencode": [
+ "string urlencode(string str)",
+ "URL-encodes string"
+ ],
+ "usleep": [
+ "void usleep(int micro_seconds)",
+ "Delay for a given number of micro seconds"
+ ],
+ "usort": [
+ "bool usort(array array_arg, string cmp_function)",
+ "Sort an array by values using a user-defined comparison function"
+ ],
+ "utf8_decode": [
+ "string utf8_decode(string data)",
+ "Converts a UTF-8 encoded string to ISO-8859-1"
+ ],
+ "utf8_encode": [
+ "string utf8_encode(string data)",
+ "Encodes an ISO-8859-1 string to UTF-8"
+ ],
+ "var_dump": [
+ "void var_dump(mixed var)",
+ "Dumps a string representation of variable to output"
+ ],
+ "var_export": [
+ "mixed var_export(mixed var [, bool return])",
+ "Outputs or returns a string representation of a variable"
+ ],
+ "variant_abs": [
+ "mixed variant_abs(mixed left)",
+ "Returns the absolute value of a variant"
+ ],
+ "variant_add": [
+ "mixed variant_add(mixed left, mixed right)",
+ "\"Adds\" two variant values together and returns the result"
+ ],
+ "variant_and": [
+ "mixed variant_and(mixed left, mixed right)",
+ "performs a bitwise AND operation between two variants and returns the result"
+ ],
+ "variant_cast": [
+ "object variant_cast(object variant, int type)",
+ "Convert a variant into a new variant object of another type"
+ ],
+ "variant_cat": [
+ "mixed variant_cat(mixed left, mixed right)",
+ "concatenates two variant values together and returns the result"
+ ],
+ "variant_cmp": [
+ "int variant_cmp(mixed left, mixed right [, int lcid [, int flags]])",
+ "Compares two variants"
+ ],
+ "variant_date_from_timestamp": [
+ "object variant_date_from_timestamp(int timestamp)",
+ "Returns a variant date representation of a unix timestamp"
+ ],
+ "variant_date_to_timestamp": [
+ "int variant_date_to_timestamp(object variant)",
+ "Converts a variant date/time value to unix timestamp"
+ ],
+ "variant_div": [
+ "mixed variant_div(mixed left, mixed right)",
+ "Returns the result from dividing two variants"
+ ],
+ "variant_eqv": [
+ "mixed variant_eqv(mixed left, mixed right)",
+ "Performs a bitwise equivalence on two variants"
+ ],
+ "variant_fix": [
+ "mixed variant_fix(mixed left)",
+ "Returns the integer part ? of a variant"
+ ],
+ "variant_get_type": [
+ "int variant_get_type(object variant)",
+ "Returns the VT_XXX type code for a variant"
+ ],
+ "variant_idiv": [
+ "mixed variant_idiv(mixed left, mixed right)",
+ "Converts variants to integers and then returns the result from dividing them"
+ ],
+ "variant_imp": [
+ "mixed variant_imp(mixed left, mixed right)",
+ "Performs a bitwise implication on two variants"
+ ],
+ "variant_int": [
+ "mixed variant_int(mixed left)",
+ "Returns the integer portion of a variant"
+ ],
+ "variant_mod": [
+ "mixed variant_mod(mixed left, mixed right)",
+ "Divides two variants and returns only the remainder"
+ ],
+ "variant_mul": [
+ "mixed variant_mul(mixed left, mixed right)",
+ "multiplies the values of the two variants and returns the result"
+ ],
+ "variant_neg": [
+ "mixed variant_neg(mixed left)",
+ "Performs logical negation on a variant"
+ ],
+ "variant_not": [
+ "mixed variant_not(mixed left)",
+ "Performs bitwise not negation on a variant"
+ ],
+ "variant_or": [
+ "mixed variant_or(mixed left, mixed right)",
+ "Performs a logical disjunction on two variants"
+ ],
+ "variant_pow": [
+ "mixed variant_pow(mixed left, mixed right)",
+ "Returns the result of performing the power function with two variants"
+ ],
+ "variant_round": [
+ "mixed variant_round(mixed left, int decimals)",
+ "Rounds a variant to the specified number of decimal places"
+ ],
+ "variant_set": [
+ "void variant_set(object variant, mixed value)",
+ "Assigns a new value for a variant object"
+ ],
+ "variant_set_type": [
+ "void variant_set_type(object variant, int type)",
+ "Convert a variant into another type. Variant is modified \"in-place\""
+ ],
+ "variant_sub": [
+ "mixed variant_sub(mixed left, mixed right)",
+ "subtracts the value of the right variant from the left variant value and returns the result"
+ ],
+ "variant_xor": [
+ "mixed variant_xor(mixed left, mixed right)",
+ "Performs a logical exclusion on two variants"
+ ],
+ "version_compare": [
+ "int version_compare(string ver1, string ver2 [, string oper])",
+ "Compares two \"PHP-standardized\" version number strings"
+ ],
+ "vfprintf": [
+ "int vfprintf(resource stream, string format, array args)",
+ "Output a formatted string into a stream"
+ ],
+ "virtual": [
+ "bool virtual(string filename)",
+ "Perform an Apache sub-request"
+ ],
+ "vprintf": [
+ "int vprintf(string format, array args)",
+ "Output a formatted string"
+ ],
+ "vsprintf": [
+ "string vsprintf(string format, array args)",
+ "Return a formatted string"
+ ],
+ "wddx_add_vars": [
+ "int wddx_add_vars(resource packet_id, mixed var_names [, mixed ...])",
+ "Serializes given variables and adds them to packet given by packet_id"
+ ],
+ "wddx_deserialize": [
+ "mixed wddx_deserialize(mixed packet)",
+ "Deserializes given packet and returns a PHP value"
+ ],
+ "wddx_packet_end": [
+ "string wddx_packet_end(resource packet_id)",
+ "Ends specified WDDX packet and returns the string containing the packet"
+ ],
+ "wddx_packet_start": [
+ "resource wddx_packet_start([string comment])",
+ "Starts a WDDX packet with optional comment and returns the packet id"
+ ],
+ "wddx_serialize_value": [
+ "string wddx_serialize_value(mixed var [, string comment])",
+ "Creates a new packet and serializes the given value"
+ ],
+ "wddx_serialize_vars": [
+ "string wddx_serialize_vars(mixed var_name [, mixed ...])",
+ "Creates a new packet and serializes given variables into a struct"
+ ],
+ "wordwrap": [
+ "string wordwrap(string str [, int width [, string break [, boolean cut]]])",
+ "Wraps buffer to selected number of characters using string break char"
+ ],
+ "xml_error_string": [
+ "string xml_error_string(int code)",
+ "Get XML parser error string"
+ ],
+ "xml_get_current_byte_index": [
+ "int xml_get_current_byte_index(resource parser)",
+ "Get current byte index for an XML parser"
+ ],
+ "xml_get_current_column_number": [
+ "int xml_get_current_column_number(resource parser)",
+ "Get current column number for an XML parser"
+ ],
+ "xml_get_current_line_number": [
+ "int xml_get_current_line_number(resource parser)",
+ "Get current line number for an XML parser"
+ ],
+ "xml_get_error_code": [
+ "int xml_get_error_code(resource parser)",
+ "Get XML parser error code"
+ ],
+ "xml_parse": [
+ "int xml_parse(resource parser, string data [, int isFinal])",
+ "Start parsing an XML document"
+ ],
+ "xml_parse_into_struct": [
+ "int xml_parse_into_struct(resource parser, string data, array &values [, array &index ])",
+ "Parsing a XML document"
+ ],
+ "xml_parser_create": [
+ "resource xml_parser_create([string encoding])",
+ "Create an XML parser"
+ ],
+ "xml_parser_create_ns": [
+ "resource xml_parser_create_ns([string encoding [, string sep]])",
+ "Create an XML parser"
+ ],
+ "xml_parser_free": [
+ "int xml_parser_free(resource parser)",
+ "Free an XML parser"
+ ],
+ "xml_parser_get_option": [
+ "int xml_parser_get_option(resource parser, int option)",
+ "Get options from an XML parser"
+ ],
+ "xml_parser_set_option": [
+ "int xml_parser_set_option(resource parser, int option, mixed value)",
+ "Set options in an XML parser"
+ ],
+ "xml_set_character_data_handler": [
+ "int xml_set_character_data_handler(resource parser, string hdl)",
+ "Set up character data handler"
+ ],
+ "xml_set_default_handler": [
+ "int xml_set_default_handler(resource parser, string hdl)",
+ "Set up default handler"
+ ],
+ "xml_set_element_handler": [
+ "int xml_set_element_handler(resource parser, string shdl, string ehdl)",
+ "Set up start and end element handlers"
+ ],
+ "xml_set_end_namespace_decl_handler": [
+ "int xml_set_end_namespace_decl_handler(resource parser, string hdl)",
+ "Set up character data handler"
+ ],
+ "xml_set_external_entity_ref_handler": [
+ "int xml_set_external_entity_ref_handler(resource parser, string hdl)",
+ "Set up external entity reference handler"
+ ],
+ "xml_set_notation_decl_handler": [
+ "int xml_set_notation_decl_handler(resource parser, string hdl)",
+ "Set up notation declaration handler"
+ ],
+ "xml_set_object": [
+ "int xml_set_object(resource parser, object &obj)",
+ "Set up object which should be used for callbacks"
+ ],
+ "xml_set_processing_instruction_handler": [
+ "int xml_set_processing_instruction_handler(resource parser, string hdl)",
+ "Set up processing instruction (PI) handler"
+ ],
+ "xml_set_start_namespace_decl_handler": [
+ "int xml_set_start_namespace_decl_handler(resource parser, string hdl)",
+ "Set up character data handler"
+ ],
+ "xml_set_unparsed_entity_decl_handler": [
+ "int xml_set_unparsed_entity_decl_handler(resource parser, string hdl)",
+ "Set up unparsed entity declaration handler"
+ ],
+ "xmlrpc_decode": [
+ "array xmlrpc_decode(string xml [, string encoding])",
+ "Decodes XML into native PHP types"
+ ],
+ "xmlrpc_decode_request": [
+ "array xmlrpc_decode_request(string xml, string& method [, string encoding])",
+ "Decodes XML into native PHP types"
+ ],
+ "xmlrpc_encode": [
+ "string xmlrpc_encode(mixed value)",
+ "Generates XML for a PHP value"
+ ],
+ "xmlrpc_encode_request": [
+ "string xmlrpc_encode_request(string method, mixed params [, array output_options])",
+ "Generates XML for a method request"
+ ],
+ "xmlrpc_get_type": [
+ "string xmlrpc_get_type(mixed value)",
+ "Gets xmlrpc type for a PHP value. Especially useful for base64 and datetime strings"
+ ],
+ "xmlrpc_is_fault": [
+ "bool xmlrpc_is_fault(array)",
+ "Determines if an array value represents an XMLRPC fault."
+ ],
+ "xmlrpc_parse_method_descriptions": [
+ "array xmlrpc_parse_method_descriptions(string xml)",
+ "Decodes XML into a list of method descriptions"
+ ],
+ "xmlrpc_server_add_introspection_data": [
+ "int xmlrpc_server_add_introspection_data(resource server, array desc)",
+ "Adds introspection documentation"
+ ],
+ "xmlrpc_server_call_method": [
+ "mixed xmlrpc_server_call_method(resource server, string xml, mixed user_data [, array output_options])",
+ "Parses XML requests and call methods"
+ ],
+ "xmlrpc_server_create": [
+ "resource xmlrpc_server_create(void)",
+ "Creates an xmlrpc server"
+ ],
+ "xmlrpc_server_destroy": [
+ "int xmlrpc_server_destroy(resource server)",
+ "Destroys server resources"
+ ],
+ "xmlrpc_server_register_introspection_callback": [
+ "bool xmlrpc_server_register_introspection_callback(resource server, string function)",
+ "Register a PHP function to generate documentation"
+ ],
+ "xmlrpc_server_register_method": [
+ "bool xmlrpc_server_register_method(resource server, string method_name, string function)",
+ "Register a PHP function to handle method matching method_name"
+ ],
+ "xmlrpc_set_type": [
+ "bool xmlrpc_set_type(string value, string type)",
+ "Sets xmlrpc type, base64 or datetime, for a PHP string value"
+ ],
+ "xmlwriter_end_attribute": [
+ "bool xmlwriter_end_attribute(resource xmlwriter)",
+ "End attribute - returns FALSE on error"
+ ],
+ "xmlwriter_end_cdata": [
+ "bool xmlwriter_end_cdata(resource xmlwriter)",
+ "End current CDATA - returns FALSE on error"
+ ],
+ "xmlwriter_end_comment": [
+ "bool xmlwriter_end_comment(resource xmlwriter)",
+ "Create end comment - returns FALSE on error"
+ ],
+ "xmlwriter_end_document": [
+ "bool xmlwriter_end_document(resource xmlwriter)",
+ "End current document - returns FALSE on error"
+ ],
+ "xmlwriter_end_dtd": [
+ "bool xmlwriter_end_dtd(resource xmlwriter)",
+ "End current DTD - returns FALSE on error"
+ ],
+ "xmlwriter_end_dtd_attlist": [
+ "bool xmlwriter_end_dtd_attlist(resource xmlwriter)",
+ "End current DTD AttList - returns FALSE on error"
+ ],
+ "xmlwriter_end_dtd_element": [
+ "bool xmlwriter_end_dtd_element(resource xmlwriter)",
+ "End current DTD element - returns FALSE on error"
+ ],
+ "xmlwriter_end_dtd_entity": [
+ "bool xmlwriter_end_dtd_entity(resource xmlwriter)",
+ "End current DTD Entity - returns FALSE on error"
+ ],
+ "xmlwriter_end_element": [
+ "bool xmlwriter_end_element(resource xmlwriter)",
+ "End current element - returns FALSE on error"
+ ],
+ "xmlwriter_end_pi": [
+ "bool xmlwriter_end_pi(resource xmlwriter)",
+ "End current PI - returns FALSE on error"
+ ],
+ "xmlwriter_flush": [
+ "mixed xmlwriter_flush(resource xmlwriter [,bool empty])",
+ "Output current buffer"
+ ],
+ "xmlwriter_full_end_element": [
+ "bool xmlwriter_full_end_element(resource xmlwriter)",
+ "End current element - returns FALSE on error"
+ ],
+ "xmlwriter_open_memory": [
+ "resource xmlwriter_open_memory()",
+ "Create new xmlwriter using memory for string output"
+ ],
+ "xmlwriter_open_uri": [
+ "resource xmlwriter_open_uri(resource xmlwriter, string source)",
+ "Create new xmlwriter using source uri for output"
+ ],
+ "xmlwriter_output_memory": [
+ "string xmlwriter_output_memory(resource xmlwriter [,bool flush])",
+ "Output current buffer as string"
+ ],
+ "xmlwriter_set_indent": [
+ "bool xmlwriter_set_indent(resource xmlwriter, bool indent)",
+ "Toggle indentation on/off - returns FALSE on error"
+ ],
+ "xmlwriter_set_indent_string": [
+ "bool xmlwriter_set_indent_string(resource xmlwriter, string indentString)",
+ "Set string used for indenting - returns FALSE on error"
+ ],
+ "xmlwriter_start_attribute": [
+ "bool xmlwriter_start_attribute(resource xmlwriter, string name)",
+ "Create start attribute - returns FALSE on error"
+ ],
+ "xmlwriter_start_attribute_ns": [
+ "bool xmlwriter_start_attribute_ns(resource xmlwriter, string prefix, string name, string uri)",
+ "Create start namespaced attribute - returns FALSE on error"
+ ],
+ "xmlwriter_start_cdata": [
+ "bool xmlwriter_start_cdata(resource xmlwriter)",
+ "Create start CDATA tag - returns FALSE on error"
+ ],
+ "xmlwriter_start_comment": [
+ "bool xmlwriter_start_comment(resource xmlwriter)",
+ "Create start comment - returns FALSE on error"
+ ],
+ "xmlwriter_start_document": [
+ "bool xmlwriter_start_document(resource xmlwriter, string version, string encoding, string standalone)",
+ "Create document tag - returns FALSE on error"
+ ],
+ "xmlwriter_start_dtd": [
+ "bool xmlwriter_start_dtd(resource xmlwriter, string name, string pubid, string sysid)",
+ "Create start DTD tag - returns FALSE on error"
+ ],
+ "xmlwriter_start_dtd_attlist": [
+ "bool xmlwriter_start_dtd_attlist(resource xmlwriter, string name)",
+ "Create start DTD AttList - returns FALSE on error"
+ ],
+ "xmlwriter_start_dtd_element": [
+ "bool xmlwriter_start_dtd_element(resource xmlwriter, string name)",
+ "Create start DTD element - returns FALSE on error"
+ ],
+ "xmlwriter_start_dtd_entity": [
+ "bool xmlwriter_start_dtd_entity(resource xmlwriter, string name, bool isparam)",
+ "Create start DTD Entity - returns FALSE on error"
+ ],
+ "xmlwriter_start_element": [
+ "bool xmlwriter_start_element(resource xmlwriter, string name)",
+ "Create start element tag - returns FALSE on error"
+ ],
+ "xmlwriter_start_element_ns": [
+ "bool xmlwriter_start_element_ns(resource xmlwriter, string prefix, string name, string uri)",
+ "Create start namespaced element tag - returns FALSE on error"
+ ],
+ "xmlwriter_start_pi": [
+ "bool xmlwriter_start_pi(resource xmlwriter, string target)",
+ "Create start PI tag - returns FALSE on error"
+ ],
+ "xmlwriter_text": [
+ "bool xmlwriter_text(resource xmlwriter, string content)",
+ "Write text - returns FALSE on error"
+ ],
+ "xmlwriter_write_attribute": [
+ "bool xmlwriter_write_attribute(resource xmlwriter, string name, string content)",
+ "Write full attribute - returns FALSE on error"
+ ],
+ "xmlwriter_write_attribute_ns": [
+ "bool xmlwriter_write_attribute_ns(resource xmlwriter, string prefix, string name, string uri, string content)",
+ "Write full namespaced attribute - returns FALSE on error"
+ ],
+ "xmlwriter_write_cdata": [
+ "bool xmlwriter_write_cdata(resource xmlwriter, string content)",
+ "Write full CDATA tag - returns FALSE on error"
+ ],
+ "xmlwriter_write_comment": [
+ "bool xmlwriter_write_comment(resource xmlwriter, string content)",
+ "Write full comment tag - returns FALSE on error"
+ ],
+ "xmlwriter_write_dtd": [
+ "bool xmlwriter_write_dtd(resource xmlwriter, string name, string pubid, string sysid, string subset)",
+ "Write full DTD tag - returns FALSE on error"
+ ],
+ "xmlwriter_write_dtd_attlist": [
+ "bool xmlwriter_write_dtd_attlist(resource xmlwriter, string name, string content)",
+ "Write full DTD AttList tag - returns FALSE on error"
+ ],
+ "xmlwriter_write_dtd_element": [
+ "bool xmlwriter_write_dtd_element(resource xmlwriter, string name, string content)",
+ "Write full DTD element tag - returns FALSE on error"
+ ],
+ "xmlwriter_write_dtd_entity": [
+ "bool xmlwriter_write_dtd_entity(resource xmlwriter, string name, string content [, int pe [, string pubid [, string sysid [, string ndataid]]]])",
+ "Write full DTD Entity tag - returns FALSE on error"
+ ],
+ "xmlwriter_write_element": [
+ "bool xmlwriter_write_element(resource xmlwriter, string name[, string content])",
+ "Write full element tag - returns FALSE on error"
+ ],
+ "xmlwriter_write_element_ns": [
+ "bool xmlwriter_write_element_ns(resource xmlwriter, string prefix, string name, string uri[, string content])",
+ "Write full namesapced element tag - returns FALSE on error"
+ ],
+ "xmlwriter_write_pi": [
+ "bool xmlwriter_write_pi(resource xmlwriter, string target, string content)",
+ "Write full PI tag - returns FALSE on error"
+ ],
+ "xmlwriter_write_raw": [
+ "bool xmlwriter_write_raw(resource xmlwriter, string content)",
+ "Write text - returns FALSE on error"
+ ],
+ "xsl_xsltprocessor_get_parameter": [
+ "string xsl_xsltprocessor_get_parameter(string namespace, string name);",
+ ""
+ ],
+ "xsl_xsltprocessor_has_exslt_support": [
+ "bool xsl_xsltprocessor_has_exslt_support();",
+ ""
+ ],
+ "xsl_xsltprocessor_import_stylesheet": [
+ "void xsl_xsltprocessor_import_stylesheet(domdocument doc);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html# Since:"
+ ],
+ "xsl_xsltprocessor_register_php_functions": [
+ "void xsl_xsltprocessor_register_php_functions([mixed $restrict]);",
+ ""
+ ],
+ "xsl_xsltprocessor_remove_parameter": [
+ "bool xsl_xsltprocessor_remove_parameter(string namespace, string name);",
+ ""
+ ],
+ "xsl_xsltprocessor_set_parameter": [
+ "bool xsl_xsltprocessor_set_parameter(string namespace, mixed name [, string value]);",
+ ""
+ ],
+ "xsl_xsltprocessor_set_profiling": [
+ "bool xsl_xsltprocessor_set_profiling(string filename) */",
+ "PHP_FUNCTION(xsl_xsltprocessor_set_profiling) { zval *id; xsl_object *intern; char *filename = NULL; int filename_len; DOM_GET_THIS(id); if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, \"s!\", &filename, &filename_len) == SUCCESS) { intern = (xsl_object *)zend_object_store_get_object(id TSRMLS_CC); if (intern->profiling) { efree(intern->profiling); } if (filename != NULL) { intern->profiling = estrndup(filename,filename_len); } else { intern->profiling = NULL; } RETURN_TRUE; } else { WRONG_PARAM_COUNT; } } /* }}} end xsl_xsltprocessor_set_profiling"
+ ],
+ "xsl_xsltprocessor_transform_to_doc": [
+ "domdocument xsl_xsltprocessor_transform_to_doc(domnode doc);",
+ "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html# Since:"
+ ],
+ "xsl_xsltprocessor_transform_to_uri": [
+ "int xsl_xsltprocessor_transform_to_uri(domdocument doc, string uri);",
+ ""
+ ],
+ "xsl_xsltprocessor_transform_to_xml": [
+ "string xsl_xsltprocessor_transform_to_xml(domdocument doc);",
+ ""
+ ],
+ "zend_logo_guid": [
+ "string zend_logo_guid(void)",
+ "Return the special ID used to request the Zend logo in phpinfo screens"
+ ],
+ "zend_version": [
+ "string zend_version(void)",
+ "Get the version of the Zend Engine"
+ ],
+ "zip_close": [
+ "void zip_close(resource zip)",
+ "Close a Zip archive"
+ ],
+ "zip_entry_close": [
+ "void zip_entry_close(resource zip_ent)",
+ "Close a zip entry"
+ ],
+ "zip_entry_compressedsize": [
+ "int zip_entry_compressedsize(resource zip_entry)",
+ "Return the compressed size of a ZZip entry"
+ ],
+ "zip_entry_compressionmethod": [
+ "string zip_entry_compressionmethod(resource zip_entry)",
+ "Return a string containing the compression method used on a particular entry"
+ ],
+ "zip_entry_filesize": [
+ "int zip_entry_filesize(resource zip_entry)",
+ "Return the actual filesize of a ZZip entry"
+ ],
+ "zip_entry_name": [
+ "string zip_entry_name(resource zip_entry)",
+ "Return the name given a ZZip entry"
+ ],
+ "zip_entry_open": [
+ "bool zip_entry_open(resource zip_dp, resource zip_entry [, string mode])",
+ "Open a Zip File, pointed by the resource entry"
+ ],
+ "zip_entry_read": [
+ "mixed zip_entry_read(resource zip_entry [, int len])",
+ "Read from an open directory entry"
+ ],
+ "zip_open": [
+ "resource zip_open(string filename)",
+ "Create new zip using source uri for output"
+ ],
+ "zip_read": [
+ "resource zip_read(resource zip)",
+ "Returns the next file in the archive"
+ ],
+ "zlib_get_coding_type": [
+ "string zlib_get_coding_type(void)",
+ "Returns the coding type used for output compression"
+ ]
+};
+
+var variableMap = {
+ "$_COOKIE": {
+ type: "array"
+ },
+ "$_ENV": {
+ type: "array"
+ },
+ "$_FILES": {
+ type: "array"
+ },
+ "$_GET": {
+ type: "array"
+ },
+ "$_POST": {
+ type: "array"
+ },
+ "$_REQUEST": {
+ type: "array"
+ },
+ "$_SERVER": {
+ type: "array",
+ value: {
+ "DOCUMENT_ROOT": 1,
+ "GATEWAY_INTERFACE": 1,
+ "HTTP_ACCEPT": 1,
+ "HTTP_ACCEPT_CHARSET": 1,
+ "HTTP_ACCEPT_ENCODING": 1 ,
+ "HTTP_ACCEPT_LANGUAGE": 1,
+ "HTTP_CONNECTION": 1,
+ "HTTP_HOST": 1,
+ "HTTP_REFERER": 1,
+ "HTTP_USER_AGENT": 1,
+ "PATH_TRANSLATED": 1,
+ "PHP_SELF": 1,
+ "QUERY_STRING": 1,
+ "REMOTE_ADDR": 1,
+ "REMOTE_PORT": 1,
+ "REQUEST_METHOD": 1,
+ "REQUEST_URI": 1,
+ "SCRIPT_FILENAME": 1,
+ "SCRIPT_NAME": 1,
+ "SERVER_ADMIN": 1,
+ "SERVER_NAME": 1,
+ "SERVER_PORT": 1,
+ "SERVER_PROTOCOL": 1,
+ "SERVER_SIGNATURE": 1,
+ "SERVER_SOFTWARE": 1
+ }
+ },
+ "$_SESSION": {
+ type: "array"
+ },
+ "$GLOBALS": {
+ type: "array"
+ }
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type) > -1;
+}
+
+var PhpCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (token.type==='identifier')
+ return this.getFunctionCompletions(state, session, pos, prefix);
+ if (is(token, "variable"))
+ return this.getVariableCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (token.type==='string' && /(\$[\w]*)\[["']([^'"]*)$/i.test(line))
+ return this.getArrayKeyCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getFunctionCompletions = function(state, session, pos, prefix) {
+ var functions = Object.keys(functionMap);
+ return functions.map(function(func){
+ return {
+ caption: func,
+ snippet: func + '($0)',
+ meta: "php function",
+ score: Number.MAX_VALUE,
+ docHTML: functionMap[func][1]
+ };
+ });
+ };
+
+ this.getVariableCompletions = function(state, session, pos, prefix) {
+ var variables = Object.keys(variableMap);
+ return variables.map(function(variable){
+ return {
+ caption: variable,
+ value: variable,
+ meta: "php variable",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getArrayKeyCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var variable = line.match(/(\$[\w]*)\[["']([^'"]*)$/i)[1];
+
+ if (!variableMap[variable]) {
+ return [];
+ }
+
+ var keys = [];
+ if (variableMap[variable].type==='array' && variableMap[variable].value)
+ keys = Object.keys(variableMap[variable].value);
+
+ return keys.map(function(key) {
+ return {
+ caption: key,
+ value: key,
+ meta: "php array key",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(PhpCompletions.prototype);
+
+exports.PhpCompletions = PhpCompletions;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+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(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": {"manifest": 1},
+ "head": {},
+ "title": {},
+ "base": {"href": 1, "target": 1},
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
+ "noscript": {"href": 1},
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
+ "section": {},
+ "nav": {},
+ "article": {"pubdate": 1},
+ "aside": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "header": {},
+ "footer": {},
+ "address": {},
+ "main": {},
+ "p": {},
+ "hr": {},
+ "pre": {},
+ "blockquote": {"cite": 1},
+ "ol": {"start": 1, "reversed": 1},
+ "ul": {},
+ "li": {"value": 1},
+ "dl": {},
+ "dt": {},
+ "dd": {},
+ "figure": {},
+ "figcaption": {},
+ "div": {},
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
+ "em": {},
+ "strong": {},
+ "small": {},
+ "s": {},
+ "cite": {},
+ "q": {"cite": 1},
+ "dfn": {},
+ "abbr": {},
+ "data": {},
+ "time": {"datetime": 1},
+ "code": {},
+ "var": {},
+ "samp": {},
+ "kbd": {},
+ "sub": {},
+ "sup": {},
+ "i": {},
+ "b": {},
+ "u": {},
+ "mark": {},
+ "ruby": {},
+ "rt": {},
+ "rp": {},
+ "bdi": {},
+ "bdo": {},
+ "span": {},
+ "br": {},
+ "wbr": {},
+ "ins": {"cite": 1, "datetime": 1},
+ "del": {"cite": 1, "datetime": 1},
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
+ "param": {"name": 1, "value": 1},
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
+ "source": {"src": 1, "type": 1, "media": 1},
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
+ "canvas": {"width": 1, "height": 1},
+ "map": {"name": 1},
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
+ "svg": {},
+ "math": {},
+ "table": {"summary": 1},
+ "caption": {},
+ "colgroup": {"span": 1},
+ "col": {"span": 1},
+ "tbody": {},
+ "thead": {},
+ "tfoot": {},
+ "tr": {},
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
+ "legend": {},
+ "label": {"form": 1, "for": 1},
+ "input": {
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
+ "datalist": {},
+ "optgroup": {"disabled": 1, "label": 1},
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
+ "output": {"for": 1, "form": 1, "name": 1},
+ "progress": {"value": 1, "max": 1},
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
+ "details": {"open": 1},
+ "summary": {},
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
+ "menu": {"type": 1, "label": 1},
+ "dialog": {"open": 1}
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+function findAttributeName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "attribute-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompletions(state, session, pos, prefix);
+ if (is(token, "attribute-value"))
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/&[a-z]*$/i.test(line))
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ var attributeName = findAttributeName(session, pos);
+
+ if (!tagName)
+ return [];
+ var values = [];
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
+ values = Object.keys(attributeMap[tagName][attributeName]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "attribute value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
+
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "html entity",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/php",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/php_highlight_rules","ace/mode/php_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/php_completions","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/unicode","ace/mode/html","ace/mode/javascript","ace/mode/css"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules;
+var PhpLangHighlightRules = require("./php_highlight_rules").PhpLangHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var PhpCompletions = require("./php_completions").PhpCompletions;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var unicode = require("../unicode");
+var HtmlMode = require("./html").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+
+var PhpMode = function(opts) {
+ this.HighlightRules = PhpLangHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.$completer = new PhpCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(PhpMode, 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.lineCommentStart = ["//", "#"];
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 != "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);
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.$id = "ace/mode/php-inline";
+}).call(PhpMode.prototype);
+
+var Mode = function(opts) {
+ if (opts && opts.inline) {
+ var mode = new PhpMode();
+ mode.createWorker = this.createWorker;
+ mode.inlinePhp = true;
+ return mode;
+ }
+ HtmlMode.call(this);
+ this.HighlightRules = PhpHighlightRules;
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode,
+ "php-": PhpMode
+ });
+ this.foldingRules.subModes["php-"] = new CStyleFoldMode();
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/php_worker", "PhpWorker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.inlinePhp)
+ worker.call("setOptions", [{inline: true}]);
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/php";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-pig.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-pig.js
new file mode 100644
index 00000000..e251e384
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-pig.js
@@ -0,0 +1,303 @@
+ace.define("ace/mode/pig_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 PigHighlightRules = function() {
+
+ this.$rules = {
+ start: [{
+ token: "comment.block.pig",
+ regex: /\/\*/,
+ push: [{
+ token: "comment.block.pig",
+ regex: /\*\//,
+ next: "pop"
+ }, {
+ defaultToken: "comment.block.pig"
+ }]
+ }, {
+ token: "comment.line.double-dash.asciidoc",
+ regex: /--.*$/
+ }, {
+ token: "keyword.control.pig",
+ regex: /\b(?:ASSERT|LOAD|STORE|DUMP|FILTER|DISTINCT|FOREACH|GENERATE|STREAM|JOIN|COGROUP|GROUP|CROSS|ORDER|LIMIT|UNION|SPLIT|DESCRIBE|EXPLAIN|ILLUSTRATE|AS|BY|INTO|USING|LIMIT|PARALLEL|OUTER|INNER|DEFAULT|LEFT|SAMPLE|RANK|CUBE|ALL|KILL|QUIT|MAPREDUCE|ASC|DESC|THROUGH|SHIP|CACHE|DECLARE|CASE|WHEN|THEN|END|IN|PARTITION|FULL|IMPORT|IF|ONSCHEMA|INPUT|OUTPUT)\b/,
+ caseInsensitive: true
+ }, {
+ token: "storage.datatypes.pig",
+ regex: /\b(?:int|long|float|double|chararray|bytearray|boolean|datetime|biginteger|bigdecimal|tuple|bag|map)\b/,
+ caseInsensitive: true
+ }, {
+ token: "support.function.storage.pig",
+ regex: /\b(?:PigStorage|BinStorage|BinaryStorage|PigDump|HBaseStorage|JsonLoader|JsonStorage|AvroStorage|TextLoader|PigStreaming|TrevniStorage|AccumuloStorage)\b/
+ }, {
+ token: "support.function.udf.pig",
+ regex: /\b(?:DIFF|TOBAG|TOMAP|TOP|TOTUPLE|RANDOM|FLATTEN|flatten|CUBE|ROLLUP|IsEmpty|ARITY|PluckTuple|SUBTRACT|BagToString)\b/
+ }, {
+ token: "support.function.udf.math.pig",
+ regex: /\b(?:ABS|ACOS|ASIN|ATAN|CBRT|CEIL|COS|COSH|EXP|FLOOR|LOG|LOG10|ROUND|ROUND_TO|SIN|SINH|SQRT|TAN|TANH|AVG|COUNT|COUNT_STAR|MAX|MIN|SUM|COR|COV)\b/
+ }, {
+ token: "support.function.udf.string.pig",
+ regex: /\b(?:CONCAT|INDEXOF|LAST_INDEX_OF|LCFIRST|LOWER|REGEX_EXTRACT|REGEX_EXTRACT_ALL|REPLACE|SIZE|STRSPLIT|SUBSTRING|TOKENIZE|TRIM|UCFIRST|UPPER|LTRIM|RTRIM|ENDSWITH|STARTSWITH|TRIM)\b/
+ }, {
+ token: "support.function.udf.datetime.pig",
+ regex: /\b(?:AddDuration|CurrentTime|DaysBetween|GetDay|GetHour|GetMilliSecond|GetMinute|GetMonth|GetSecond|GetWeek|GetWeekYear|GetYear|HoursBetween|MilliSecondsBetween|MinutesBetween|MonthsBetween|SecondsBetween|SubtractDuration|ToDate|WeeksBetween|YearsBetween|ToMilliSeconds|ToString|ToUnixTime)\b/
+ }, {
+ token: "support.function.command.pig",
+ regex: /\b(?:cat|cd|copyFromLocal|copyToLocal|cp|ls|mkdir|mv|pwd|rm)\b/
+ }, {
+ token: "variable.pig",
+ regex: /\$[a_zA-Z0-9_]+/
+ }, {
+ token: "constant.language.pig",
+ regex: /\b(?:NULL|true|false|stdin|stdout|stderr)\b/,
+ caseInsensitive: true
+ }, {
+ token: "constant.numeric.pig",
+ regex: /\b\d+(?:\.\d+)?\b/
+ }, {
+ token: "keyword.operator.comparison.pig",
+ regex: /!=|==|<|>|<=|>=|\b(?:MATCHES|IS|OR|AND|NOT)\b/,
+ caseInsensitive: true
+ }, {
+ token: "keyword.operator.arithmetic.pig",
+ regex: /\+|\-|\*|\/|\%|\?|:|::|\.\.|#/
+ }, {
+ token: "string.quoted.double.pig",
+ regex: /"/,
+ push: [{
+ token: "string.quoted.double.pig",
+ regex: /"/,
+ next: "pop"
+ }, {
+ token: "constant.character.escape.pig",
+ regex: /\\./
+ }, {
+ defaultToken: "string.quoted.double.pig"
+ }]
+ }, {
+ token: "string.quoted.single.pig",
+ regex: /'/,
+ push: [{
+ token: "string.quoted.single.pig",
+ regex: /'/,
+ next: "pop"
+ }, {
+ token: "constant.character.escape.pig",
+ regex: /\\./
+ }, {
+ defaultToken: "string.quoted.single.pig"
+ }]
+ }, {
+ todo: {
+ token: [
+ "text",
+ "keyword.parameter.pig",
+ "text",
+ "storage.type.parameter.pig"
+ ],
+ regex: /^(\s*)(set)(\s+)(\S+)/,
+ caseInsensitive: true,
+ push: [{
+ token: "text",
+ regex: /$/,
+ next: "pop"
+ }, {
+ include: "$self"
+ }]
+ }
+ }, {
+ token: [
+ "text",
+ "keyword.alias.pig",
+ "text",
+ "storage.type.alias.pig"
+ ],
+ regex: /(\s*)(DEFINE|DECLARE|REGISTER)(\s+)(\S+)/,
+ caseInsensitive: true,
+ push: [{
+ token: "text",
+ regex: /;?$/,
+ next: "pop"
+ }]
+ }]
+ }
+
+ this.normalizeRules();
+};
+
+PigHighlightRules.metaData = {
+ fileTypes: ["pig"],
+ name: "Pig",
+ scopeName: "source.pig"
+}
+
+
+oop.inherits(PigHighlightRules, TextHighlightRules);
+
+exports.PigHighlightRules = PigHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/pig",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pig_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var PigHighlightRules = require("./pig_highlight_rules").PigHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = PigHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/pig"
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-plain_text.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-plain_text.js
new file mode 100644
index 00000000..0f0c9380
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-plain_text.js
@@ -0,0 +1,25 @@
+ace.define("ace/mode/plain_text",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/behaviour"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var Behaviour = require("./behaviour").Behaviour;
+
+var Mode = function() {
+ this.HighlightRules = TextHighlightRules;
+ this.$behaviour = new Behaviour();
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.type = "text";
+ this.getNextLineIndent = function(state, line, tab) {
+ return '';
+ };
+ this.$id = "ace/mode/plain_text";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-powershell.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-powershell.js
new file mode 100644
index 00000000..0b43a83e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-powershell.js
@@ -0,0 +1,411 @@
+ace.define("ace/mode/powershell_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 PowershellHighlightRules = function() {
+ var keywords = (
+ "begin|break|catch|continue|data|do|dynamicparam|else|elseif|end|exit|filter|" +
+ "finally|for|foreach|from|function|if|in|inlinescript|hidden|parallel|param|" +
+ "process|return|sequence|switch|throw|trap|try|until|while|workflow"
+ );
+ var builtinFunctions = (
+ "Get-AppBackgroundTask|Start-AppBackgroundTask|Unregister-AppBackgroundTask|Disable-AppBackgroundTaskDiagnosticLog|Enable-AppBackgroundTaskDiagnosticLog|Set-AppBackgroundTaskResourcePolicy|" +
+ "Get-AppLockerFileInformation|Get-AppLockerPolicy|New-AppLockerPolicy|Set-AppLockerPolicy|Test-AppLockerPolicy|" +
+ "Get-AppxLastError|Get-AppxLog|Add-AppxPackage|Add-AppxVolume|Dismount-AppxVolume|Get-AppxDefaultVolume|Get-AppxPackage|Get-AppxPackageManifest|Get-AppxVolume|Mount-AppxVolume|Move-AppxPackage|Remove-AppxPackage|Remove-AppxVolume|Set-AppxDefaultVolume|" +
+ "Clear-AssignedAccess|Get-AssignedAccess|Set-AssignedAccess|" +
+ "Add-BitLockerKeyProtector|Backup-BitLockerKeyProtector|Clear-BitLockerAutoUnlock|Disable-BitLocker|Disable-BitLockerAutoUnlock|Enable-BitLocker|Enable-BitLockerAutoUnlock|Get-BitLockerVolume|Lock-BitLocker|Remove-BitLockerKeyProtector|Resume-BitLocker|Suspend-BitLocker|Unlock-BitLocker|" +
+ "Add-BitsFile|Complete-BitsTransfer|Get-BitsTransfer|Remove-BitsTransfer|Resume-BitsTransfer|Set-BitsTransfer|Start-BitsTransfer|Suspend-BitsTransfer|" +
+ "Add-BCDataCacheExtension|Clear-BCCache|Disable-BC|Disable-BCDowngrading|Disable-BCServeOnBattery|Enable-BCDistributed|Enable-BCDowngrading|Enable-BCHostedClient|Enable-BCHostedServer|Enable-BCLocal|Enable-BCServeOnBattery|Export-BCCachePackage|Export-BCSecretKey|Get-BCClientConfiguration|Get-BCContentServerConfiguration|Get-BCDataCache|Get-BCDataCacheExtension|Get-BCHashCache|Get-BCHostedCacheServerConfiguration|Get-BCNetworkConfiguration|Get-BCStatus|Import-BCCachePackage|Import-BCSecretKey|Publish-BCFileContent|Publish-BCWebContent|Remove-BCDataCacheExtension|Reset-BC|Set-BCAuthentication|Set-BCCache|Set-BCDataCacheEntryMaxAge|Set-BCMinSMBLatency|Set-BCSecretKey|" +
+ "Export-BinaryMiLog|Get-CimAssociatedInstance|Get-CimClass|Get-CimInstance|Get-CimSession|Import-BinaryMiLog|Invoke-CimMethod|New-CimInstance|New-CimSession|New-CimSessionOption|Register-CimIndicationEvent|Remove-CimInstance|Remove-CimSession|Set-CimInstance|" +
+ "ConvertFrom-CIPolicy|" +
+ "Add-SignerRule|Edit-CIPolicyRule|Get-CIPolicy|Get-CIPolicyInfo|Get-SystemDriver|Merge-CIPolicy|New-CIPolicy|New-CIPolicyRule|Remove-CIPolicyRule|Set-CIPolicyVersion|Set-HVCIOptions|Set-RuleOption|" +
+ "Add-MpPreference|Get-MpComputerStatus|Get-MpPreference|Get-MpThreat|Get-MpThreatCatalog|Get-MpThreatDetection|Remove-MpPreference|Remove-MpThreat|Set-MpPreference|Start-MpScan|Start-MpWDOScan|Update-MpSignature|" +
+ "Disable-DAManualEntryPointSelection|Enable-DAManualEntryPointSelection|Get-DAClientExperienceConfiguration|Get-DAEntryPointTableItem|New-DAEntryPointTableItem|Remove-DAEntryPointTableItem|Rename-DAEntryPointTableItem|Reset-DAClientExperienceConfiguration|Reset-DAEntryPointTableItem|Set-DAClientExperienceConfiguration|Set-DAEntryPointTableItem|" +
+ "Add-ProvisionedAppxPackage|Apply-WindowsUnattend|Get-ProvisionedAppxPackage|Remove-ProvisionedAppxPackage|Add-AppxProvisionedPackage|Add-WindowsCapability|Add-WindowsDriver|Add-WindowsImage|Add-WindowsPackage|Clear-WindowsCorruptMountPoint|Disable-WindowsOptionalFeature|Dismount-WindowsImage|Enable-WindowsOptionalFeature|Expand-WindowsCustomDataImage|Expand-WindowsImage|Export-WindowsDriver|Export-WindowsImage|Get-AppxProvisionedPackage|Get-WIMBootEntry|Get-WindowsCapability|Get-WindowsDriver|Get-WindowsEdition|Get-WindowsImage|Get-WindowsImageContent|Get-WindowsOptionalFeature|Get-WindowsPackage|Mount-WindowsImage|New-WindowsCustomImage|New-WindowsImage|Optimize-WindowsImage|Remove-AppxProvisionedPackage|Remove-WindowsCapability|Remove-WindowsDriver|Remove-WindowsImage|Remove-WindowsPackage|Repair-WindowsImage|Save-WindowsImage|Set-AppXProvisionedDataFile|Set-WindowsEdition|Set-WindowsProductKey|Split-WindowsImage|Update-WIMBootEntry|Use-WindowsUnattend|" +
+ "Add-DnsClientNrptRule|Clear-DnsClientCache|Get-DnsClient|Get-DnsClientCache|Get-DnsClientGlobalSetting|Get-DnsClientNrptGlobal|Get-DnsClientNrptPolicy|Get-DnsClientNrptRule|Get-DnsClientServerAddress|Register-DnsClient|Remove-DnsClientNrptRule|Set-DnsClient|Set-DnsClientGlobalSetting|Set-DnsClientNrptGlobal|Set-DnsClientNrptRule|Set-DnsClientServerAddress|Resolve-DnsName|" +
+ "Add-EtwTraceProvider|Get-AutologgerConfig|Get-EtwTraceProvider|Get-EtwTraceSession|New-AutologgerConfig|New-EtwTraceSession|Remove-AutologgerConfig|Remove-EtwTraceProvider|Remove-EtwTraceSession|Send-EtwTraceSession|Set-AutologgerConfig|Set-EtwTraceProvider|Set-EtwTraceSession|" +
+ "Get-WinAcceptLanguageFromLanguageListOptOut|Get-WinCultureFromLanguageListOptOut|Get-WinDefaultInputMethodOverride|Get-WinHomeLocation|Get-WinLanguageBarOption|Get-WinSystemLocale|Get-WinUILanguageOverride|Get-WinUserLanguageList|New-WinUserLanguageList|Set-Culture|Set-WinAcceptLanguageFromLanguageListOptOut|Set-WinCultureFromLanguageListOptOut|Set-WinDefaultInputMethodOverride|Set-WinHomeLocation|Set-WinLanguageBarOption|Set-WinSystemLocale|Set-WinUILanguageOverride|Set-WinUserLanguageList|" +
+ "Connect-IscsiTarget|Disconnect-IscsiTarget|Get-IscsiConnection|Get-IscsiSession|Get-IscsiTarget|Get-IscsiTargetPortal|New-IscsiTargetPortal|Register-IscsiSession|Remove-IscsiTargetPortal|Set-IscsiChapSecret|Unregister-IscsiSession|Update-IscsiTarget|Update-IscsiTargetPortal|" +
+ "Get-IseSnippet|Import-IseSnippet|New-IseSnippet|" +
+ "Add-KdsRootKey|Clear-KdsCache|Get-KdsConfiguration|Get-KdsRootKey|Set-KdsConfiguration|Test-KdsRootKey|" +
+ "Compress-Archive|Expand-Archive|" +
+ "Export-Counter|Get-Counter|Get-WinEvent|Import-Counter|New-WinEvent|" +
+ "Start-Transcript|Stop-Transcript|" +
+ "Add-Computer|Add-Content|Checkpoint-Computer|Clear-Content|Clear-EventLog|Clear-Item|Clear-ItemProperty|Clear-RecycleBin|Complete-Transaction|Convert-Path|Copy-Item|Copy-ItemProperty|Debug-Process|Disable-ComputerRestore|Enable-ComputerRestore|Get-ChildItem|Get-Clipboard|Get-ComputerRestorePoint|Get-Content|Get-ControlPanelItem|Get-EventLog|Get-HotFix|Get-Item|Get-ItemProperty|Get-ItemPropertyValue|Get-Location|Get-Process|Get-PSDrive|Get-PSProvider|Get-Service|Get-Transaction|Get-WmiObject|Invoke-Item|Invoke-WmiMethod|Join-Path|Limit-EventLog|Move-Item|Move-ItemProperty|New-EventLog|New-Item|New-ItemProperty|New-PSDrive|New-Service|New-WebServiceProxy|Pop-Location|Push-Location|Register-WmiEvent|Remove-Computer|Remove-EventLog|Remove-Item|Remove-ItemProperty|Remove-PSDrive|Remove-WmiObject|Rename-Computer|Rename-Item|Rename-ItemProperty|Reset-ComputerMachinePassword|Resolve-Path|Restart-Computer|Restart-Service|Restore-Computer|Resume-Service|Set-Clipboard|Set-Content|Set-Item|Set-ItemProperty|Set-Location|Set-Service|Set-WmiInstance|Show-ControlPanelItem|Show-EventLog|Split-Path|Start-Process|Start-Service|Start-Transaction|Stop-Computer|Stop-Process|Stop-Service|Suspend-Service|Test-ComputerSecureChannel|Test-Connection|Test-Path|Undo-Transaction|Use-Transaction|Wait-Process|Write-EventLog|" +
+ "Export-ODataEndpointProxy|" +
+ "ConvertFrom-SecureString|ConvertTo-SecureString|Get-Acl|Get-AuthenticodeSignature|Get-CmsMessage|Get-Credential|Get-ExecutionPolicy|Get-PfxCertificate|Protect-CmsMessage|Set-Acl|Set-AuthenticodeSignature|Set-ExecutionPolicy|Unprotect-CmsMessage|" +
+ "ConvertFrom-SddlString|Format-Hex|Get-FileHash|Import-PowerShellDataFile|New-Guid|New-TemporaryFile|Add-Member|Add-Type|Clear-Variable|Compare-Object|ConvertFrom-Csv|ConvertFrom-Json|ConvertFrom-String|ConvertFrom-StringData|Convert-String|ConvertTo-Csv|ConvertTo-Html|ConvertTo-Json|ConvertTo-Xml|Debug-Runspace|Disable-PSBreakpoint|Disable-RunspaceDebug|Enable-PSBreakpoint|Enable-RunspaceDebug|Export-Alias|Export-Clixml|Export-Csv|Export-FormatData|Export-PSSession|Format-Custom|Format-List|Format-Table|Format-Wide|Get-Alias|Get-Culture|Get-Date|Get-Event|Get-EventSubscriber|Get-FormatData|Get-Host|Get-Member|Get-PSBreakpoint|Get-PSCallStack|Get-Random|Get-Runspace|Get-RunspaceDebug|Get-TraceSource|Get-TypeData|Get-UICulture|Get-Unique|Get-Variable|Group-Object|Import-Alias|Import-Clixml|Import-Csv|Import-LocalizedData|Import-PSSession|Invoke-Expression|Invoke-RestMethod|Invoke-WebRequest|Measure-Command|Measure-Object|New-Alias|New-Event|New-Object|New-TimeSpan|New-Variable|Out-File|Out-GridView|Out-Printer|Out-String|Read-Host|Register-EngineEvent|Register-ObjectEvent|Remove-Event|Remove-PSBreakpoint|Remove-TypeData|Remove-Variable|Select-Object|Select-String|Select-Xml|Send-MailMessage|Set-Alias|Set-Date|Set-PSBreakpoint|Set-TraceSource|Set-Variable|Show-Command|Sort-Object|Start-Sleep|Tee-Object|Trace-Command|Unblock-File|Unregister-Event|Update-FormatData|Update-List|Update-TypeData|Wait-Debugger|Wait-Event|Write-Debug|Write-Error|Write-Host|Write-Information|Write-Output|Write-Progress|Write-Verbose|Write-Warning|" +
+ "Connect-WSMan|Disable-WSManCredSSP|Disconnect-WSMan|Enable-WSManCredSSP|Get-WSManCredSSP|Get-WSManInstance|Invoke-WSManAction|New-WSManInstance|New-WSManSessionOption|Remove-WSManInstance|Set-WSManInstance|Set-WSManQuickConfig|Test-WSMan|" +
+ "Debug-MMAppPrelaunch|Disable-MMAgent|Enable-MMAgent|Get-MMAgent|Set-MMAgent|" +
+ "Add-DtcClusterTMMapping|Get-Dtc|Get-DtcAdvancedHostSetting|Get-DtcAdvancedSetting|Get-DtcClusterDefault|Get-DtcClusterTMMapping|Get-DtcDefault|Get-DtcLog|Get-DtcNetworkSetting|Get-DtcTransaction|Get-DtcTransactionsStatistics|Get-DtcTransactionsTraceSession|Get-DtcTransactionsTraceSetting|Install-Dtc|Remove-DtcClusterTMMapping|Reset-DtcLog|Set-DtcAdvancedHostSetting|Set-DtcAdvancedSetting|Set-DtcClusterDefault|Set-DtcClusterTMMapping|Set-DtcDefault|Set-DtcLog|Set-DtcNetworkSetting|Set-DtcTransaction|Set-DtcTransactionsTraceSession|Set-DtcTransactionsTraceSetting|Start-Dtc|Start-DtcTransactionsTraceSession|Stop-Dtc|Stop-DtcTransactionsTraceSession|Test-Dtc|Uninstall-Dtc|Write-DtcTransactionsTraceSession|Complete-DtcDiagnosticTransaction|Join-DtcDiagnosticResourceManager|New-DtcDiagnosticTransaction|Receive-DtcDiagnosticTransaction|Send-DtcDiagnosticTransaction|Start-DtcDiagnosticResourceManager|Stop-DtcDiagnosticResourceManager|Undo-DtcDiagnosticTransaction|" +
+ "Disable-NetAdapter|Disable-NetAdapterBinding|Disable-NetAdapterChecksumOffload|Disable-NetAdapterEncapsulatedPacketTaskOffload|Disable-NetAdapterIPsecOffload|Disable-NetAdapterLso|Disable-NetAdapterPacketDirect|Disable-NetAdapterPowerManagement|Disable-NetAdapterQos|Disable-NetAdapterRdma|Disable-NetAdapterRsc|Disable-NetAdapterRss|Disable-NetAdapterSriov|Disable-NetAdapterVmq|Enable-NetAdapter|Enable-NetAdapterBinding|Enable-NetAdapterChecksumOffload|Enable-NetAdapterEncapsulatedPacketTaskOffload|Enable-NetAdapterIPsecOffload|Enable-NetAdapterLso|Enable-NetAdapterPacketDirect|Enable-NetAdapterPowerManagement|Enable-NetAdapterQos|Enable-NetAdapterRdma|Enable-NetAdapterRsc|Enable-NetAdapterRss|Enable-NetAdapterSriov|Enable-NetAdapterVmq|Get-NetAdapter|Get-NetAdapterAdvancedProperty|Get-NetAdapterBinding|Get-NetAdapterChecksumOffload|Get-NetAdapterEncapsulatedPacketTaskOffload|Get-NetAdapterHardwareInfo|Get-NetAdapterIPsecOffload|Get-NetAdapterLso|Get-NetAdapterPacketDirect|Get-NetAdapterPowerManagement|Get-NetAdapterQos|Get-NetAdapterRdma|Get-NetAdapterRsc|Get-NetAdapterRss|Get-NetAdapterSriov|Get-NetAdapterSriovVf|Get-NetAdapterStatistics|Get-NetAdapterVmq|Get-NetAdapterVmqQueue|Get-NetAdapterVPort|New-NetAdapterAdvancedProperty|Remove-NetAdapterAdvancedProperty|Rename-NetAdapter|Reset-NetAdapterAdvancedProperty|Restart-NetAdapter|Set-NetAdapter|Set-NetAdapterAdvancedProperty|Set-NetAdapterBinding|Set-NetAdapterChecksumOffload|Set-NetAdapterEncapsulatedPacketTaskOffload|Set-NetAdapterIPsecOffload|Set-NetAdapterLso|Set-NetAdapterPacketDirect|Set-NetAdapterPowerManagement|Set-NetAdapterQos|Set-NetAdapterRdma|Set-NetAdapterRsc|Set-NetAdapterRss|Set-NetAdapterSriov|Set-NetAdapterVmq|" +
+ "Get-NetConnectionProfile|Set-NetConnectionProfile|" +
+ "Add-NetEventNetworkAdapter|Add-NetEventPacketCaptureProvider|Add-NetEventProvider|Add-NetEventVmNetworkAdapter|Add-NetEventVmSwitch|Add-NetEventWFPCaptureProvider|Get-NetEventNetworkAdapter|Get-NetEventPacketCaptureProvider|Get-NetEventProvider|Get-NetEventSession|Get-NetEventVmNetworkAdapter|Get-NetEventVmSwitch|Get-NetEventWFPCaptureProvider|New-NetEventSession|Remove-NetEventNetworkAdapter|Remove-NetEventPacketCaptureProvider|Remove-NetEventProvider|Remove-NetEventSession|Remove-NetEventVmNetworkAdapter|Remove-NetEventVmSwitch|Remove-NetEventWFPCaptureProvider|Set-NetEventPacketCaptureProvider|Set-NetEventProvider|Set-NetEventSession|Set-NetEventWFPCaptureProvider|Start-NetEventSession|Stop-NetEventSession|" +
+ "Add-NetLbfoTeamMember|Add-NetLbfoTeamNic|Get-NetLbfoTeam|Get-NetLbfoTeamMember|Get-NetLbfoTeamNic|New-NetLbfoTeam|Remove-NetLbfoTeam|Remove-NetLbfoTeamMember|Remove-NetLbfoTeamNic|Rename-NetLbfoTeam|Set-NetLbfoTeam|Set-NetLbfoTeamMember|Set-NetLbfoTeamNic|" +
+ "Add-NetNatExternalAddress|Add-NetNatStaticMapping|Get-NetNat|Get-NetNatExternalAddress|Get-NetNatGlobal|Get-NetNatSession|Get-NetNatStaticMapping|New-NetNat|Remove-NetNat|Remove-NetNatExternalAddress|Remove-NetNatStaticMapping|Set-NetNat|Set-NetNatGlobal|" +
+ "Get-NetQosPolicy|New-NetQosPolicy|Remove-NetQosPolicy|Set-NetQosPolicy|" +
+ "Copy-NetFirewallRule|Copy-NetIPsecMainModeCryptoSet|Copy-NetIPsecMainModeRule|Copy-NetIPsecPhase1AuthSet|Copy-NetIPsecPhase2AuthSet|Copy-NetIPsecQuickModeCryptoSet|Copy-NetIPsecRule|Disable-NetFirewallRule|Disable-NetIPsecMainModeRule|Disable-NetIPsecRule|Enable-NetFirewallRule|Enable-NetIPsecMainModeRule|Enable-NetIPsecRule|Find-NetIPsecRule|Get-NetFirewallAddressFilter|Get-NetFirewallApplicationFilter|Get-NetFirewallInterfaceFilter|Get-NetFirewallInterfaceTypeFilter|Get-NetFirewallPortFilter|Get-NetFirewallProfile|Get-NetFirewallRule|Get-NetFirewallSecurityFilter|Get-NetFirewallServiceFilter|Get-NetFirewallSetting|Get-NetIPsecDospSetting|Get-NetIPsecMainModeCryptoSet|Get-NetIPsecMainModeRule|Get-NetIPsecMainModeSA|Get-NetIPsecPhase1AuthSet|Get-NetIPsecPhase2AuthSet|Get-NetIPsecQuickModeCryptoSet|Get-NetIPsecQuickModeSA|Get-NetIPsecRule|New-NetFirewallRule|New-NetIPsecDospSetting|New-NetIPsecMainModeCryptoSet|New-NetIPsecMainModeRule|New-NetIPsecPhase1AuthSet|New-NetIPsecPhase2AuthSet|New-NetIPsecQuickModeCryptoSet|New-NetIPsecRule|Open-NetGPO|Remove-NetFirewallRule|Remove-NetIPsecDospSetting|Remove-NetIPsecMainModeCryptoSet|Remove-NetIPsecMainModeRule|Remove-NetIPsecMainModeSA|Remove-NetIPsecPhase1AuthSet|Remove-NetIPsecPhase2AuthSet|Remove-NetIPsecQuickModeCryptoSet|Remove-NetIPsecQuickModeSA|Remove-NetIPsecRule|Rename-NetFirewallRule|Rename-NetIPsecMainModeCryptoSet|Rename-NetIPsecMainModeRule|Rename-NetIPsecPhase1AuthSet|Rename-NetIPsecPhase2AuthSet|Rename-NetIPsecQuickModeCryptoSet|Rename-NetIPsecRule|Save-NetGPO|Set-NetFirewallAddressFilter|Set-NetFirewallApplicationFilter|Set-NetFirewallInterfaceFilter|Set-NetFirewallInterfaceTypeFilter|Set-NetFirewallPortFilter|Set-NetFirewallProfile|Set-NetFirewallRule|Set-NetFirewallSecurityFilter|Set-NetFirewallServiceFilter|Set-NetFirewallSetting|Set-NetIPsecDospSetting|Set-NetIPsecMainModeCryptoSet|Set-NetIPsecMainModeRule|Set-NetIPsecPhase1AuthSet|Set-NetIPsecPhase2AuthSet|Set-NetIPsecQuickModeCryptoSet|Set-NetIPsecRule|Show-NetFirewallRule|Show-NetIPsecRule|Sync-NetIPsecRule|Update-NetIPsecRule|Get-DAPolicyChange|New-NetIPsecAuthProposal|New-NetIPsecMainModeCryptoProposal|New-NetIPsecQuickModeCryptoProposal|" +
+ "Add-NetSwitchTeamMember|Get-NetSwitchTeam|Get-NetSwitchTeamMember|New-NetSwitchTeam|Remove-NetSwitchTeam|Remove-NetSwitchTeamMember|Rename-NetSwitchTeam|" +
+ "Find-NetRoute|Get-NetCompartment|Get-NetIPAddress|Get-NetIPConfiguration|Get-NetIPInterface|Get-NetIPv4Protocol|Get-NetIPv6Protocol|Get-NetNeighbor|Get-NetOffloadGlobalSetting|Get-NetPrefixPolicy|Get-NetRoute|Get-NetTCPConnection|Get-NetTCPSetting|Get-NetTransportFilter|Get-NetUDPEndpoint|Get-NetUDPSetting|New-NetIPAddress|New-NetNeighbor|New-NetRoute|New-NetTransportFilter|Remove-NetIPAddress|Remove-NetNeighbor|Remove-NetRoute|Remove-NetTransportFilter|Set-NetIPAddress|Set-NetIPInterface|Set-NetIPv4Protocol|Set-NetIPv6Protocol|Set-NetNeighbor|Set-NetOffloadGlobalSetting|Set-NetRoute|Set-NetTCPSetting|Set-NetUDPSetting|Test-NetConnection|" +
+ "Get-DAConnectionStatus|Get-NCSIPolicyConfiguration|Reset-NCSIPolicyConfiguration|Set-NCSIPolicyConfiguration|" +
+ "Disable-NetworkSwitchEthernetPort|Disable-NetworkSwitchFeature|Disable-NetworkSwitchVlan|Enable-NetworkSwitchEthernetPort|Enable-NetworkSwitchFeature|Enable-NetworkSwitchVlan|Get-NetworkSwitchEthernetPort|Get-NetworkSwitchFeature|Get-NetworkSwitchGlobalData|Get-NetworkSwitchVlan|New-NetworkSwitchVlan|Remove-NetworkSwitchEthernetPortIPAddress|Remove-NetworkSwitchVlan|Restore-NetworkSwitchConfiguration|Save-NetworkSwitchConfiguration|Set-NetworkSwitchEthernetPortIPAddress|Set-NetworkSwitchPortMode|Set-NetworkSwitchPortProperty|Set-NetworkSwitchVlanProperty|" +
+ "Add-NetIPHttpsCertBinding|Disable-NetDnsTransitionConfiguration|Disable-NetIPHttpsProfile|Disable-NetNatTransitionConfiguration|Enable-NetDnsTransitionConfiguration|Enable-NetIPHttpsProfile|Enable-NetNatTransitionConfiguration|Get-Net6to4Configuration|Get-NetDnsTransitionConfiguration|Get-NetDnsTransitionMonitoring|Get-NetIPHttpsConfiguration|Get-NetIPHttpsState|Get-NetIsatapConfiguration|Get-NetNatTransitionConfiguration|Get-NetNatTransitionMonitoring|Get-NetTeredoConfiguration|Get-NetTeredoState|New-NetIPHttpsConfiguration|New-NetNatTransitionConfiguration|Remove-NetIPHttpsCertBinding|Remove-NetIPHttpsConfiguration|Remove-NetNatTransitionConfiguration|Rename-NetIPHttpsConfiguration|Reset-Net6to4Configuration|Reset-NetDnsTransitionConfiguration|Reset-NetIPHttpsConfiguration|Reset-NetIsatapConfiguration|Reset-NetTeredoConfiguration|Set-Net6to4Configuration|Set-NetDnsTransitionConfiguration|Set-NetIPHttpsConfiguration|Set-NetIsatapConfiguration|Set-NetNatTransitionConfiguration|Set-NetTeredoConfiguration|" +
+ "Find-Package|Find-PackageProvider|Get-Package|Get-PackageProvider|Get-PackageSource|Import-PackageProvider|Install-Package|Install-PackageProvider|Register-PackageSource|Save-Package|Set-PackageSource|Uninstall-Package|Unregister-PackageSource|" +
+ "Clear-PcsvDeviceLog|Get-PcsvDevice|Get-PcsvDeviceLog|Restart-PcsvDevice|Set-PcsvDeviceBootConfiguration|Set-PcsvDeviceNetworkConfiguration|Set-PcsvDeviceUserPassword|Start-PcsvDevice|Stop-PcsvDevice|" +
+ "AfterAll|AfterEach|Assert-MockCalled|Assert-VerifiableMocks|BeforeAll|BeforeEach|Context|Describe|Get-MockDynamicParameters|Get-TestDriveItem|In|InModuleScope|Invoke-Mock|Invoke-Pester|It|Mock|New-Fixture|Set-DynamicParameterVariables|Setup|Should|" +
+ "Add-CertificateEnrollmentPolicyServer|Export-Certificate|Export-PfxCertificate|Get-Certificate|Get-CertificateAutoEnrollmentPolicy|Get-CertificateEnrollmentPolicyServer|Get-CertificateNotificationTask|Get-PfxData|Import-Certificate|Import-PfxCertificate|New-CertificateNotificationTask|New-SelfSignedCertificate|Remove-CertificateEnrollmentPolicyServer|Remove-CertificateNotificationTask|Set-CertificateAutoEnrollmentPolicy|Switch-Certificate|Test-Certificate|" +
+ "Disable-PnpDevice|Enable-PnpDevice|Get-PnpDevice|Get-PnpDeviceProperty|" +
+ "Find-DscResource|Find-Module|Find-Script|Get-InstalledModule|Get-InstalledScript|Get-PSRepository|Install-Module|Install-Script|New-ScriptFileInfo|Publish-Module|Publish-Script|Register-PSRepository|Save-Module|Save-Script|Set-PSRepository|Test-ScriptFileInfo|Uninstall-Module|Uninstall-Script|Unregister-PSRepository|Update-Module|Update-ModuleManifest|Update-Script|Update-ScriptFileInfo|" +
+ "Add-Printer|Add-PrinterDriver|Add-PrinterPort|Get-PrintConfiguration|Get-Printer|Get-PrinterDriver|Get-PrinterPort|Get-PrinterProperty|Get-PrintJob|Read-PrinterNfcTag|Remove-Printer|Remove-PrinterDriver|Remove-PrinterPort|Remove-PrintJob|Rename-Printer|Restart-PrintJob|Resume-PrintJob|Set-PrintConfiguration|Set-Printer|Set-PrinterProperty|Suspend-PrintJob|Write-PrinterNfcTag|" +
+ "Configuration|Disable-DscDebug|Enable-DscDebug|Get-DscConfiguration|Get-DscConfigurationStatus|Get-DscLocalConfigurationManager|Get-DscResource|New-DscChecksum|Remove-DscConfigurationDocument|Restore-DscConfiguration|Stop-DscConfiguration|Invoke-DscResource|Publish-DscConfiguration|Set-DscLocalConfigurationManager|Start-DscConfiguration|Test-DscConfiguration|Update-DscConfiguration|" +
+ "Disable-PSTrace|Disable-PSWSManCombinedTrace|Disable-WSManTrace|Enable-PSTrace|Enable-PSWSManCombinedTrace|Enable-WSManTrace|Get-LogProperties|Set-LogProperties|Start-Trace|Stop-Trace|" +
+ "PSConsoleHostReadline|Get-PSReadlineKeyHandler|Get-PSReadlineOption|Remove-PSReadlineKeyHandler|Set-PSReadlineKeyHandler|Set-PSReadlineOption|" +
+ "Add-JobTrigger|Disable-JobTrigger|Disable-ScheduledJob|Enable-JobTrigger|Enable-ScheduledJob|Get-JobTrigger|Get-ScheduledJob|Get-ScheduledJobOption|New-JobTrigger|New-ScheduledJobOption|Register-ScheduledJob|Remove-JobTrigger|Set-JobTrigger|Set-ScheduledJob|Set-ScheduledJobOption|Unregister-ScheduledJob|" +
+ "New-PSWorkflowSession|New-PSWorkflowExecutionOption|" +
+ "Invoke-AsWorkflow|" +
+ "Disable-ScheduledTask|Enable-ScheduledTask|Export-ScheduledTask|Get-ClusteredScheduledTask|Get-ScheduledTask|Get-ScheduledTaskInfo|New-ScheduledTask|New-ScheduledTaskAction|New-ScheduledTaskPrincipal|New-ScheduledTaskSettingsSet|New-ScheduledTaskTrigger|Register-ClusteredScheduledTask|Register-ScheduledTask|Set-ClusteredScheduledTask|Set-ScheduledTask|Start-ScheduledTask|Stop-ScheduledTask|Unregister-ClusteredScheduledTask|Unregister-ScheduledTask|" +
+ "Confirm-SecureBootUEFI|Format-SecureBootUEFI|Get-SecureBootPolicy|Get-SecureBootUEFI|Set-SecureBootUEFI|" +
+ "Block-SmbShareAccess|Close-SmbOpenFile|Close-SmbSession|Disable-SmbDelegation|Enable-SmbDelegation|Get-SmbBandwidthLimit|Get-SmbClientConfiguration|Get-SmbClientNetworkInterface|Get-SmbConnection|Get-SmbDelegation|Get-SmbMapping|Get-SmbMultichannelConnection|Get-SmbMultichannelConstraint|Get-SmbOpenFile|Get-SmbServerConfiguration|Get-SmbServerNetworkInterface|Get-SmbSession|Get-SmbShare|Get-SmbShareAccess|Grant-SmbShareAccess|New-SmbMapping|New-SmbMultichannelConstraint|New-SmbShare|Remove-SmbBandwidthLimit|Remove-SmbMapping|Remove-SmbMultichannelConstraint|Remove-SmbShare|Revoke-SmbShareAccess|Set-SmbBandwidthLimit|Set-SmbClientConfiguration|Set-SmbPathAcl|Set-SmbServerConfiguration|Set-SmbShare|Unblock-SmbShareAccess|Update-SmbMultichannelConnection|" +
+ "Move-SmbClient|Get-SmbWitnessClient|Move-SmbWitnessClient|" +
+ "Get-StartApps|Export-StartLayout|Import-StartLayout|" +
+ "Disable-PhysicalDiskIndication|Disable-StorageDiagnosticLog|Enable-PhysicalDiskIndication|Enable-StorageDiagnosticLog|Flush-Volume|Get-DiskSNV|Get-PhysicalDiskSNV|Get-StorageEnclosureSNV|Initialize-Volume|Write-FileSystemCache|Add-InitiatorIdToMaskingSet|Add-PartitionAccessPath|Add-PhysicalDisk|Add-TargetPortToMaskingSet|Add-VirtualDiskToMaskingSet|Block-FileShareAccess|Clear-Disk|Clear-FileStorageTier|Clear-StorageDiagnosticInfo|Connect-VirtualDisk|Debug-FileShare|Debug-StorageSubSystem|Debug-Volume|Disable-PhysicalDiskIdentification|Disable-StorageEnclosureIdentification|Disable-StorageHighAvailability|Disconnect-VirtualDisk|Dismount-DiskImage|Enable-PhysicalDiskIdentification|Enable-StorageEnclosureIdentification|Enable-StorageHighAvailability|Format-Volume|Get-DedupProperties|Get-Disk|Get-DiskImage|Get-DiskStorageNodeView|Get-FileIntegrity|Get-FileShare|Get-FileShareAccessControlEntry|Get-FileStorageTier|Get-InitiatorId|Get-InitiatorPort|Get-MaskingSet|Get-OffloadDataTransferSetting|Get-Partition|Get-PartitionSupportedSize|Get-PhysicalDisk|Get-PhysicalDiskStorageNodeView|Get-ResiliencySetting|Get-StorageAdvancedProperty|Get-StorageDiagnosticInfo|Get-StorageEnclosure|Get-StorageEnclosureStorageNodeView|Get-StorageEnclosureVendorData|Get-StorageFaultDomain|Get-StorageFileServer|Get-StorageFirmwareInformation|Get-StorageHealthAction|Get-StorageHealthReport|Get-StorageHealthSetting|Get-StorageJob|Get-StorageNode|Get-StoragePool|Get-StorageProvider|Get-StorageReliabilityCounter|Get-StorageSetting|Get-StorageSubSystem|Get-StorageTier|Get-StorageTierSupportedSize|Get-SupportedClusterSizes|Get-SupportedFileSystems|Get-TargetPort|Get-TargetPortal|Get-VirtualDisk|Get-VirtualDiskSupportedSize|Get-Volume|Get-VolumeCorruptionCount|Get-VolumeScrubPolicy|Grant-FileShareAccess|Hide-VirtualDisk|Initialize-Disk|Mount-DiskImage|New-FileShare|New-MaskingSet|New-Partition|New-StorageFileServer|New-StoragePool|New-StorageSubsystemVirtualDisk|New-StorageTier|New-VirtualDisk|New-VirtualDiskClone|New-VirtualDiskSnapshot|New-Volume|Optimize-StoragePool|Optimize-Volume|Register-StorageSubsystem|Remove-FileShare|Remove-InitiatorId|Remove-InitiatorIdFromMaskingSet|Remove-MaskingSet|Remove-Partition|Remove-PartitionAccessPath|Remove-PhysicalDisk|Remove-StorageFileServer|Remove-StorageHealthSetting|Remove-StoragePool|Remove-StorageTier|Remove-TargetPortFromMaskingSet|Remove-VirtualDisk|Remove-VirtualDiskFromMaskingSet|Rename-MaskingSet|Repair-FileIntegrity|Repair-VirtualDisk|Repair-Volume|Reset-PhysicalDisk|Reset-StorageReliabilityCounter|Resize-Partition|Resize-StorageTier|Resize-VirtualDisk|Revoke-FileShareAccess|Set-Disk|Set-FileIntegrity|Set-FileShare|Set-FileStorageTier|Set-InitiatorPort|Set-Partition|Set-PhysicalDisk|Set-ResiliencySetting|Set-StorageFileServer|Set-StorageHealthSetting|Set-StoragePool|Set-StorageProvider|Set-StorageSetting|Set-StorageSubSystem|Set-StorageTier|Set-VirtualDisk|Set-Volume|Set-VolumeScrubPolicy|Show-VirtualDisk|Start-StorageDiagnosticLog|Stop-StorageDiagnosticLog|Stop-StorageJob|Unblock-FileShareAccess|Unregister-StorageSubsystem|Update-Disk|Update-HostStorageCache|Update-StorageFirmware|Update-StoragePool|Update-StorageProviderCache|Write-VolumeCache|" +
+ "Disable-TlsCipherSuite|Disable-TlsSessionTicketKey|Enable-TlsCipherSuite|Enable-TlsSessionTicketKey|Export-TlsSessionTicketKey|Get-TlsCipherSuite|New-TlsSessionTicketKey|" +
+ "Get-TroubleshootingPack|Invoke-TroubleshootingPack|" +
+ "Clear-Tpm|ConvertTo-TpmOwnerAuth|Disable-TpmAutoProvisioning|Enable-TpmAutoProvisioning|Get-Tpm|Get-TpmEndorsementKeyInfo|Get-TpmSupportedFeature|Import-TpmOwnerAuth|Initialize-Tpm|Set-TpmOwnerAuth|Unblock-Tpm|" +
+ "Add-VpnConnection|Add-VpnConnectionRoute|Add-VpnConnectionTriggerApplication|Add-VpnConnectionTriggerDnsConfiguration|Add-VpnConnectionTriggerTrustedNetwork|Get-VpnConnection|Get-VpnConnectionTrigger|New-EapConfiguration|New-VpnServerAddress|Remove-VpnConnection|Remove-VpnConnectionRoute|Remove-VpnConnectionTriggerApplication|Remove-VpnConnectionTriggerDnsConfiguration|Remove-VpnConnectionTriggerTrustedNetwork|Set-VpnConnection|Set-VpnConnectionIPsecConfiguration|Set-VpnConnectionProxy|Set-VpnConnectionTriggerDnsConfiguration|Set-VpnConnectionTriggerTrustedNetwork|" +
+ "Add-OdbcDsn|Disable-OdbcPerfCounter|Disable-WdacBidTrace|Enable-OdbcPerfCounter|Enable-WdacBidTrace|Get-OdbcDriver|Get-OdbcDsn|Get-OdbcPerfCounter|Get-WdacBidTrace|Remove-OdbcDsn|Set-OdbcDriver|Set-OdbcDsn|" +
+ "Get-WindowsDeveloperLicense|Show-WindowsDeveloperLicenseRegistration|Unregister-WindowsDeveloperLicense|" +
+ "Disable-WindowsErrorReporting|Enable-WindowsErrorReporting|Get-WindowsErrorReporting|" +
+ "Get-WindowsSearchSetting|Set-WindowsSearchSetting|" +
+ "Get-WindowsUpdateLog"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtinFunctions,
+ "keyword": keywords
+ }, "identifier");
+ var binaryOperatorsRe = (
+ "eq|ne|gt|lt|le|ge|like|notlike|match|notmatch|contains|notcontains|in|notin|band|bor|bxor|bnot|" +
+ "ceq|cne|cgt|clt|cle|cge|clike|cnotlike|cmatch|cnotmatch|ccontains|cnotcontains|cin|cnotin|" +
+ "ieq|ine|igt|ilt|ile|ige|ilike|inotlike|imatch|inotmatch|icontains|inotcontains|iin|inotin|" +
+ "and|or|xor|not|" +
+ "split|join|replace|f|" +
+ "csplit|creplace|" +
+ "isplit|ireplace|" +
+ "is|isnot|as|" +
+ "shl|shr"
+ );
+
+ 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+"
+ }, {
+ defaultToken : "comment"
+ }
+ ]
+ };
+};
+
+oop.inherits(PowershellHighlightRules, TextHighlightRules);
+
+exports.PowershellHighlightRules = PowershellHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/powershell",["require","exports","module","ace/lib/oop","ace/mode/text","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 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.HighlightRules = PowershellHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode({start: "^\\s*(<#)", end: "^[#\\s]>\\s*$"});
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+ this.blockComment = {start: "<#", end: "#>"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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;
+ };
+
+ this.$id = "ace/mode/powershell";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-praat.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-praat.js
new file mode 100644
index 00000000..a3a50f7e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-praat.js
@@ -0,0 +1,468 @@
+ace.define("ace/mode/praat_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 PraatHighlightRules = function() {
+
+ var keywords = (
+ "if|then|else|elsif|elif|endif|fi|" +
+ "endfor|endproc|" + // related keywords specified below
+ "while|endwhile|" +
+ "repeat|until|" +
+ "select|plus|minus|" +
+ "assert|asserterror"
+ );
+
+ var predefinedVariables = (
+ "macintosh|windows|unix|" +
+ "praatVersion|praatVersion\\$" +
+ "pi|undefined|" +
+ "newline\\$|tab\\$|" +
+ "shellDirectory\\$|homeDirectory\\$|preferencesDirectory\\$|" +
+ "temporaryDirectory\\$|defaultDirectory\\$"
+ );
+ var directives = (
+ "clearinfo|endSendPraat"
+ );
+
+ var functions = (
+ "writeInfo|writeInfoLine|appendInfo|appendInfoLine|info\\$|" +
+ "writeFile|writeFileLine|appendFile|appendFileLine|" +
+ "abs|round|floor|ceiling|min|max|imin|imax|" +
+ "sqrt|sin|cos|tan|arcsin|arccos|arctan|arctan2|sinc|sincpi|" +
+ "exp|ln|lnBeta|lnGamma|log10|log2|" +
+ "sinh|cosh|tanh|arcsinh|arccosh|arctanh|" +
+ "sigmoid|invSigmoid|erf|erfc|" +
+ "random(?:Uniform|Integer|Gauss|Poisson|Binomial)|" +
+ "gaussP|gaussQ|invGaussQ|incompleteGammaP|incompleteBeta|" +
+ "chiSquareP|chiSquareQ|invChiSquareQ|studentP|studentQ|invStudentQ|" +
+ "fisherP|fisherQ|invFisherQ|" +
+ "binomialP|binomialQ|invBinomialP|invBinomialQ|" +
+ "hertzToBark|barkToHerz|" +
+ "hertzToMel|melToHertz|" +
+ "hertzToSemitones|semitonesToHerz|" +
+ "erb|hertzToErb|erbToHertz|" +
+ "phonToDifferenceLimens|differenceLimensToPhon|" +
+ "soundPressureToPhon|" +
+ "beta|beta2|besselI|besselK|" +
+ "numberOfColumns|numberOfRows|" +
+ "selected|selected\\$|numberOfSelected|variableExists|"+
+ "index|rindex|startsWith|endsWith|"+
+ "index_regex|rindex_regex|replace_regex\\$|"+
+ "length|extractWord\\$|extractLine\\$|extractNumber|" +
+ "left\\$|right\\$|mid\\$|replace\\$|" +
+ "date\\$|fixed\\$|percent\\$|" +
+ "zero#|linear#|randomUniform#|randomInteger#|randomGauss#|" +
+ "beginPause|endPause|" +
+ "demoShow|demoWindowTitle|demoInput|demoWaitForInput|" +
+ "demoClicked|demoClickedIn|demoX|demoY|" +
+ "demoKeyPressed|demoKey\\$|" +
+ "demoExtraControlKeyPressed|demoShiftKeyPressed|"+
+ "demoCommandKeyPressed|demoOptionKeyPressed|" +
+ "environment\\$|chooseReadFile\\$|" +
+ "chooseDirectory\\$|createDirectory|fileReadable|deleteFile|" +
+ "selectObject|removeObject|plusObject|minusObject|" +
+ "runScript|exitScript|" +
+ "beginSendPraat|endSendPraat|" +
+ "objectsAreIdentical"
+ );
+
+ var objectTypes = (
+ "Activation|AffineTransform|AmplitudeTier|Art|Artword|Autosegment|" +
+ "BarkFilter|CCA|Categories|Cepstrum|Cepstrumc|ChebyshevSeries|" +
+ "ClassificationTable|Cochleagram|Collection|Configuration|" +
+ "Confusion|ContingencyTable|Corpus|Correlation|Covariance|" +
+ "CrossCorrelationTable|CrossCorrelationTables|DTW|Diagonalizer|" +
+ "Discriminant|Dissimilarity|Distance|Distributions|DurationTier|" +
+ "EEG|ERP|ERPTier|Eigen|Excitation|Excitations|ExperimentMFC|FFNet|" +
+ "FeatureWeights|Formant|FormantFilter|FormantGrid|FormantPoint|" +
+ "FormantTier|GaussianMixture|HMM|HMM_Observation|" +
+ "HMM_ObservationSequence|HMM_State|HMM_StateSequence|Harmonicity|" +
+ "ISpline|Index|Intensity|IntensityTier|IntervalTier|KNN|KlattGrid|" +
+ "KlattTable|LFCC|LPC|Label|LegendreSeries|LinearRegression|" +
+ "LogisticRegression|LongSound|Ltas|MFCC|MSpline|ManPages|" +
+ "Manipulation|Matrix|MelFilter|MixingMatrix|Movie|Network|" +
+ "OTGrammar|OTHistory|OTMulti|PCA|PairDistribution|ParamCurve|" +
+ "Pattern|Permutation|Pitch|PitchTier|PointProcess|Polygon|" +
+ "Polynomial|Procrustes|RealPoint|RealTier|ResultsMFC|Roots|SPINET|" +
+ "SSCP|SVD|Salience|ScalarProduct|Similarity|SimpleString|" +
+ "SortedSetOfString|Sound|Speaker|Spectrogram|Spectrum|SpectrumTier|" +
+ "SpeechSynthesizer|SpellingChecker|Strings|StringsIndex|Table|" +
+ "TableOfReal|TextGrid|TextInterval|TextPoint|TextTier|Tier|" +
+ "Transition|VocalTract|Weight|WordList"
+ );
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "string.interpolated",
+ regex : /'((?:[a-z][a-zA-Z0-9_]*)(?:\$|#|:[0-9]+)?)'/
+ }, {
+ token : ["text", "text", "keyword.operator", "text", "keyword"],
+ regex : /(^\s*)(?:([a-z][a-zA-Z0-9_]*\$?\s+)(=)(\s+))?(stopwatch)/
+ }, {
+ token : ["text", "keyword", "text", "string"],
+ regex : /(^\s*)(print(?:line|tab)?|echo|exit|pause|send(?:praat|socket)|include|execute|system(?:_nocheck)?)(\s+)(.*)/
+ }, {
+ token : ["text", "keyword"],
+ regex : "(^\\s*)(" + directives + ")$"
+ }, {
+ token : ["text", "keyword.operator", "text"],
+ regex : /(\s+)((?:\+|-|\/|\*|<|>)=?|==?|!=|%|\^|\||and|or|not)(\s+)/
+ }, {
+ token : ["text", "text", "keyword.operator", "text", "keyword", "text", "keyword"],
+ regex : /(^\s*)(?:([a-z][a-zA-Z0-9_]*\$?\s+)(=)(\s+))?(?:((?:no)?warn|(?:unix_)?nocheck|noprogress)(\s+))?((?:[A-Z][^.:"]+)(?:$|(?:\.{3}|:)))/
+ }, {
+ token : ["text", "keyword", "text", "keyword"],
+ regex : /(^\s*)(?:(demo)?(\s+))((?:[A-Z][^.:"]+)(?:$|(?:\.{3}|:)))/
+ }, {
+ token : ["text", "keyword", "text", "keyword"],
+ regex : /^(\s*)(?:(demo)(\s+))?(10|12|14|16|24)$/
+ }, {
+ token : ["text", "support.function", "text"],
+ regex : /(\s*)(do\$?)(\s*:\s*|\s*\(\s*)/
+ }, {
+ token : "entity.name.type",
+ regex : "(" + objectTypes + ")"
+ }, {
+ token : "variable.language",
+ regex : "(" + predefinedVariables + ")"
+ }, {
+ token : ["support.function", "text"],
+ regex : "((?:" + functions + ")\\$?)(\\s*(?::|\\())"
+ }, {
+ token : "keyword",
+ regex : /(\bfor\b)/,
+ next : "for"
+ }, {
+ token : "keyword",
+ regex : "(\\b(?:" + keywords + ")\\b)"
+ }, {
+ token : "string",
+ regex : /"[^"]*"/
+ }, {
+ token : "string",
+ regex : /"[^"]*$/,
+ next : "brokenstring"
+ }, {
+ token : ["text", "keyword", "text", "entity.name.section"],
+ regex : /(^\s*)(\bform\b)(\s+)(.*)/,
+ next : "form"
+ }, {
+ token : "constant.numeric",
+ regex : /\b[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/
+ }, {
+ token : ["keyword", "text", "entity.name.function"],
+ regex : /(procedure)(\s+)(\S+)/
+ }, {
+ token : ["entity.name.function", "text"],
+ regex : /(@\S+)(:|\s*\()/
+ }, {
+ token : ["text", "keyword", "text", "entity.name.function"],
+ regex : /(^\s*)(call)(\s+)(\S+)/
+ }, {
+ token : "comment",
+ regex : /(^\s*#|;).*$/
+ }, {
+ token : "text",
+ regex : /\s+/
+ }
+ ],
+ "form" : [
+ {
+ token : ["keyword", "text", "constant.numeric"],
+ regex : /((?:optionmenu|choice)\s+)(\S+:\s+)([0-9]+)/
+ }, {
+ token : ["keyword", "constant.numeric"],
+ regex : /((?:option|button)\s+)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b)/
+ }, {
+ token : ["keyword", "string"],
+ regex : /((?:option|button)\s+)(.*)/
+ }, {
+ token : ["keyword", "text", "string"],
+ regex : /((?:sentence|text)\s+)(\S+\s*)(.*)/
+ }, {
+ token : ["keyword", "text", "string", "invalid.illegal"],
+ regex : /(word\s+)(\S+\s*)(\S+)?(\s.*)?/
+ }, {
+ token : ["keyword", "text", "constant.language"],
+ regex : /(boolean\s+)(\S+\s*)(0|1|"?(?:yes|no)"?)/
+ }, {
+ token : ["keyword", "text", "constant.numeric"],
+ regex : /((?:real|natural|positive|integer)\s+)(\S+\s*)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b)/
+ }, {
+ token : ["keyword", "string"],
+ regex : /(comment\s+)(.*)/
+ }, {
+ token : "keyword",
+ regex : 'endform',
+ next : "start"
+ }
+ ],
+ "for" : [
+ {
+ token : ["keyword", "text", "constant.numeric", "text"],
+ regex : /(from|to)(\s+)([+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?)(\s*)/
+ }, {
+ token : ["keyword", "text"],
+ regex : /(from|to)(\s+\S+\s*)/
+ }, {
+ token : "text",
+ regex : /$/,
+ next : "start"
+ }
+ ],
+ "brokenstring" : [
+ {
+ token : ["text", "string"],
+ regex : /(\s*\.{3})([^"]*)/
+ }, {
+ token : "string",
+ regex : /"/,
+ next : "start"
+ }
+ ]
+ };
+};
+
+oop.inherits(PraatHighlightRules, TextHighlightRules);
+
+exports.PraatHighlightRules = PraatHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/praat",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/praat_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 PraatHighlightRules = require("./praat_highlight_rules").PraatHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = PraatHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new CStyleFoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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.$id = "ace/mode/praat";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-prolog.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-prolog.js
new file mode 100644
index 00000000..6bf01adb
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-prolog.js
@@ -0,0 +1,364 @@
+ace.define("ace/mode/prolog_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 PrologHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { include: '#comment' },
+ { include: '#basic_fact' },
+ { include: '#rule' },
+ { include: '#directive' },
+ { include: '#fact' } ],
+ '#atom':
+ [ { token: 'constant.other.atom.prolog',
+ regex: '\\b[a-z][a-zA-Z0-9_]*\\b' },
+ { token: 'constant.numeric.prolog',
+ regex: '-?\\d+(?:\\.\\d+)?' },
+ { include: '#string' } ],
+ '#basic_elem':
+ [ { include: '#comment' },
+ { include: '#statement' },
+ { include: '#constants' },
+ { include: '#operators' },
+ { include: '#builtins' },
+ { include: '#list' },
+ { include: '#atom' },
+ { include: '#variable' } ],
+ '#basic_fact':
+ [ { token:
+ [ 'entity.name.function.fact.basic.prolog',
+ 'punctuation.end.fact.basic.prolog' ],
+ regex: '([a-z]\\w*)(\\.)' } ],
+ '#builtins':
+ [ { token: 'support.function.builtin.prolog',
+ regex: '\\b(?:abolish|abort|ancestors|arg|ascii|assert[az]|atom(?:ic)?|body|char|close|conc|concat|consult|define|definition|dynamic|dump|fail|file|free|free_proc|functor|getc|goal|halt|head|head|integer|length|listing|match_args|member|next_clause|nl|nonvar|nth|number|cvars|nvars|offset|op|print?|prompt|putc|quoted|ratom|read|redefine|rename|retract(?:all)?|see|seeing|seen|skip|spy|statistics|system|tab|tell|telling|term|time|told|univ|unlink_clause|unspy_predicate|var|write)\\b' } ],
+ '#comment':
+ [ { token:
+ [ 'punctuation.definition.comment.prolog',
+ 'comment.line.percentage.prolog' ],
+ regex: '(%)(.*$)' },
+ { token: 'punctuation.definition.comment.prolog',
+ regex: '/\\*',
+ push:
+ [ { token: 'punctuation.definition.comment.prolog',
+ regex: '\\*/',
+ next: 'pop' },
+ { defaultToken: 'comment.block.prolog' } ] } ],
+ '#constants':
+ [ { token: 'constant.language.prolog',
+ regex: '\\b(?:true|false|yes|no)\\b' } ],
+ '#directive':
+ [ { token: 'keyword.operator.directive.prolog',
+ regex: ':-',
+ push:
+ [ { token: 'meta.directive.prolog', regex: '\\.', next: 'pop' },
+ { include: '#comment' },
+ { include: '#statement' },
+ { defaultToken: 'meta.directive.prolog' } ] } ],
+ '#expr':
+ [ { include: '#comments' },
+ { token: 'meta.expression.prolog',
+ regex: '\\(',
+ push:
+ [ { token: 'meta.expression.prolog', regex: '\\)', next: 'pop' },
+ { include: '#expr' },
+ { defaultToken: 'meta.expression.prolog' } ] },
+ { token: 'keyword.control.cutoff.prolog', regex: '!' },
+ { token: 'punctuation.control.and.prolog', regex: ',' },
+ { token: 'punctuation.control.or.prolog', regex: ';' },
+ { include: '#basic_elem' } ],
+ '#fact':
+ [ { token:
+ [ 'entity.name.function.fact.prolog',
+ 'punctuation.begin.fact.parameters.prolog' ],
+ regex: '([a-z]\\w*)(\\()(?!.*:-)',
+ push:
+ [ { token:
+ [ 'punctuation.end.fact.parameters.prolog',
+ 'punctuation.end.fact.prolog' ],
+ regex: '(\\))(\\.?)',
+ next: 'pop' },
+ { include: '#parameter' },
+ { defaultToken: 'meta.fact.prolog' } ] } ],
+ '#list':
+ [ { token: 'punctuation.begin.list.prolog',
+ regex: '\\[(?=.*\\])',
+ push:
+ [ { token: 'punctuation.end.list.prolog',
+ regex: '\\]',
+ next: 'pop' },
+ { include: '#comment' },
+ { token: 'punctuation.separator.list.prolog', regex: ',' },
+ { token: 'punctuation.concat.list.prolog',
+ regex: '\\|',
+ push:
+ [ { token: 'meta.list.concat.prolog',
+ regex: '(?=\\s*\\])',
+ next: 'pop' },
+ { include: '#basic_elem' },
+ { defaultToken: 'meta.list.concat.prolog' } ] },
+ { include: '#basic_elem' },
+ { defaultToken: 'meta.list.prolog' } ] } ],
+ '#operators':
+ [ { token: 'keyword.operator.prolog',
+ regex: '\\\\\\+|\\bnot\\b|\\bis\\b|->|[><]|[><\\\\:=]?=|(?:=\\\\|\\\\=)=' } ],
+ '#parameter':
+ [ { token: 'variable.language.anonymous.prolog',
+ regex: '\\b_\\b' },
+ { token: 'variable.parameter.prolog',
+ regex: '\\b[A-Z_]\\w*\\b' },
+ { token: 'punctuation.separator.parameters.prolog', regex: ',' },
+ { include: '#basic_elem' },
+ { token: 'text', regex: '[^\\s]' } ],
+ '#rule':
+ [ { token: 'meta.rule.prolog',
+ regex: '(?=[a-z]\\w*.*:-)',
+ push:
+ [ { token: 'punctuation.rule.end.prolog',
+ regex: '\\.',
+ next: 'pop' },
+ { token: 'meta.rule.signature.prolog',
+ regex: '(?=[a-z]\\w*.*:-)',
+ push:
+ [ { token: 'meta.rule.signature.prolog',
+ regex: '(?=:-)',
+ next: 'pop' },
+ { token: 'entity.name.function.rule.prolog',
+ regex: '[a-z]\\w*(?=\\(|\\s*:-)' },
+ { token: 'punctuation.rule.parameters.begin.prolog',
+ regex: '\\(',
+ push:
+ [ { token: 'punctuation.rule.parameters.end.prolog',
+ regex: '\\)',
+ next: 'pop' },
+ { include: '#parameter' },
+ { defaultToken: 'meta.rule.parameters.prolog' } ] },
+ { defaultToken: 'meta.rule.signature.prolog' } ] },
+ { token: 'keyword.operator.definition.prolog',
+ regex: ':-',
+ push:
+ [ { token: 'meta.rule.definition.prolog',
+ regex: '(?=\\.)',
+ next: 'pop' },
+ { include: '#comment' },
+ { include: '#expr' },
+ { defaultToken: 'meta.rule.definition.prolog' } ] },
+ { defaultToken: 'meta.rule.prolog' } ] } ],
+ '#statement':
+ [ { token: 'meta.statement.prolog',
+ regex: '(?=[a-z]\\w*\\()',
+ push:
+ [ { token: 'punctuation.end.statement.parameters.prolog',
+ regex: '\\)',
+ next: 'pop' },
+ { include: '#builtins' },
+ { include: '#atom' },
+ { token: 'punctuation.begin.statement.parameters.prolog',
+ regex: '\\(',
+ push:
+ [ { token: 'meta.statement.parameters.prolog',
+ regex: '(?=\\))',
+ next: 'pop' },
+ { token: 'punctuation.separator.statement.prolog', regex: ',' },
+ { include: '#basic_elem' },
+ { defaultToken: 'meta.statement.parameters.prolog' } ] },
+ { defaultToken: 'meta.statement.prolog' } ] } ],
+ '#string':
+ [ { token: 'punctuation.definition.string.begin.prolog',
+ regex: '\'',
+ push:
+ [ { token: 'punctuation.definition.string.end.prolog',
+ regex: '\'',
+ next: 'pop' },
+ { token: 'constant.character.escape.prolog', regex: '\\\\.' },
+ { token: 'constant.character.escape.quote.prolog',
+ regex: '\'\'' },
+ { defaultToken: 'string.quoted.single.prolog' } ] } ],
+ '#variable':
+ [ { token: 'variable.language.anonymous.prolog',
+ regex: '\\b_\\b' },
+ { token: 'variable.other.prolog',
+ regex: '\\b[A-Z_][a-zA-Z0-9_]*\\b' } ] }
+
+ this.normalizeRules();
+};
+
+PrologHighlightRules.metaData = { fileTypes: [ 'plg', 'prolog' ],
+ foldingStartMarker: '(%\\s*region \\w*)|([a-z]\\w*.*:- ?)',
+ foldingStopMarker: '(%\\s*end(\\s*region)?)|(?=\\.)',
+ keyEquivalent: '^~P',
+ name: 'Prolog',
+ scopeName: 'source.prolog' }
+
+
+oop.inherits(PrologHighlightRules, TextHighlightRules);
+
+exports.PrologHighlightRules = PrologHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/prolog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/prolog_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var PrologHighlightRules = require("./prolog_highlight_rules").PrologHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = PrologHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "%";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/prolog";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-properties.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-properties.js
new file mode 100644
index 00000000..2e9ba725
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-properties.js
@@ -0,0 +1,73 @@
+ace.define("ace/mode/properties_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 PropertiesHighlightRules = function() {
+
+ var escapeRe = /\\u[0-9a-fA-F]{4}|\\/;
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : /[!#].*$/
+ }, {
+ token : "keyword",
+ regex : /[=:]$/
+ }, {
+ token : "keyword",
+ regex : /[=:]/,
+ next : "value"
+ }, {
+ token : "constant.language.escape",
+ regex : escapeRe
+ }, {
+ defaultToken: "variable"
+ }
+ ],
+ "value" : [
+ {
+ regex : /\\$/,
+ token : "string",
+ next : "value"
+ }, {
+ regex : /$/,
+ token : "string",
+ next : "start"
+ }, {
+ token : "constant.language.escape",
+ regex : escapeRe
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+};
+
+oop.inherits(PropertiesHighlightRules, TextHighlightRules);
+
+exports.PropertiesHighlightRules = PropertiesHighlightRules;
+});
+
+ace.define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var PropertiesHighlightRules = require("./properties_highlight_rules").PropertiesHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = PropertiesHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.$id = "ace/mode/properties";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-protobuf.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-protobuf.js
new file mode 100644
index 00000000..8cef6576
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-protobuf.js
@@ -0,0 +1,577 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var cFunctions = exports.cFunctions = "\\b(?:hypot(?: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|char16_t|char32_t"
+ );
+
+ var storageModifiers = (
+ "const|extern|register|restrict|static|volatile|inline|private|" +
+ "protected|public|friend|explicit|virtual|export|mutable|typename|" +
+ "constexpr|new|delete|alignas|alignof|decltype|noexcept|thread_local"
+ );
+
+ 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|nullptr"
+ );
+
+ 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";
+ var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source;
+
+ this.$rules = {
+ "start" : [
+ {
+ token : "comment",
+ regex : "//$",
+ next : "start"
+ }, {
+ token : "comment",
+ regex : "//",
+ next : "singleLineComment"
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment", // multi line comment
+ regex : "\\/\\*",
+ next : "comment"
+ }, {
+ token : "string", // character
+ regex : "'(?:" + escapeRe + "|.)?'"
+ }, {
+ token : "string.start",
+ regex : '"',
+ stateName: "qqstring",
+ next: [
+ { token: "string", regex: /\\\s*$/, next: "qqstring" },
+ { token: "constant.language.escape", regex: escapeRe },
+ { token: "constant.language.escape", regex: /%[^'"\\]/ },
+ { token: "string.end", regex: '"|$', next: "start" },
+ { defaultToken: "string"}
+ ]
+ }, {
+ token : "string.start",
+ regex : 'R"\\(',
+ stateName: "rawString",
+ next: [
+ { token: "string.end", regex: '\\)"', next: "start" },
+ { defaultToken: "string"}
+ ]
+ }, {
+ 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 : "keyword", // pre-compiler directives
+ regex : "#\\s*(?:include|import|pragma|line|define|undef)\\b",
+ next : "directive"
+ }, {
+ token : "keyword", // special case pre-compiler directive
+ regex : "#\\s*(?:endif|if|ifdef|else|elif|ifndef)\\b"
+ }, {
+ token : "support.function.C99.c",
+ regex : cFunctions
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*"
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|<<=|>>=|>>>=|<>|&&|\|\||\?:|[*%\/+\-&\^|~!<>=]=?/
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "singleLineComment" : [
+ {
+ token : "comment",
+ regex : /\\$/,
+ next : "singleLineComment"
+ }, {
+ token : "comment",
+ regex : /$/,
+ next : "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ],
+ "directive" : [
+ {
+ token : "constant.other.multiline",
+ regex : /\\/
+ },
+ {
+ 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",
+ regex : /[^\\\/]+/,
+ next : "start"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+ this.normalizeRules();
+};
+
+oop.inherits(c_cppHighlightRules, TextHighlightRules);
+
+exports.c_cppHighlightRules = c_cppHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","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 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.HighlightRules = c_cppHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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);
+ };
+
+ this.$id = "ace/mode/c_cpp";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/protobuf_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 ProtobufHighlightRules = function() {
+
+ var builtinTypes = "double|float|int32|int64|uint32|uint64|sint32|" +
+ "sint64|fixed32|fixed64|sfixed32|sfixed64|bool|" +
+ "string|bytes";
+ var keywordDeclaration = "message|required|optional|repeated|package|" +
+ "import|option|enum";
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword.declaration.protobuf": keywordDeclaration,
+ "support.type": builtinTypes
+ }, "identifier");
+
+ this.$rules = {
+ "start": [{
+ token: "comment",
+ regex: /\/\/.*$/
+ }, {
+ token: "comment",
+ regex: /\/\*/,
+ next: "comment"
+ }, {
+ token: "constant",
+ regex: "<[^>]+>"
+ }, {
+ regex: "=",
+ token: "keyword.operator.assignment.protobuf"
+ }, {
+ 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: keywordMapper,
+ regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }],
+ "comment": [{
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }]
+ };
+
+ this.normalizeRules();
+ };
+
+ oop.inherits(ProtobufHighlightRules, TextHighlightRules);
+
+ exports.ProtobufHighlightRules = ProtobufHighlightRules;
+});
+
+ace.define("ace/mode/protobuf",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/protobuf_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var CMode = require("./c_cpp").Mode;
+var ProtobufHighlightRules = require("./protobuf_highlight_rules").ProtobufHighlightRules;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ CMode.call(this);
+ this.foldingRules = new CStyleFoldMode();
+ this.HighlightRules = ProtobufHighlightRules;
+};
+oop.inherits(Mode, CMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/protobuf";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-python.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-python.js
new file mode 100644
index 00000000..19efccb6
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-python.js
@@ -0,0 +1,265 @@
+ace.define("ace/mode/python_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 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 + ")";
+
+ var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})";
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "#.*$"
+ }, {
+ token : "string", // multi line """ string start
+ regex : strPre + '"{3}',
+ next : "qqstring3"
+ }, {
+ token : "string", // " string
+ regex : strPre + '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "string", // multi line ''' string start
+ regex : strPre + "'{3}",
+ next : "qstring3"
+ }, {
+ token : "string", // ' string
+ regex : strPre + "'(?=.)",
+ next : "qstring"
+ }, {
+ 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+"
+ } ],
+ "qqstring3" : [ {
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string", // multi line """ string end
+ regex : '"{3}',
+ next : "start"
+ }, {
+ defaultToken : "string"
+ } ],
+ "qstring3" : [ {
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string", // multi line ''' string end
+ regex : "'{3}",
+ next : "start"
+ }, {
+ defaultToken : "string"
+ } ],
+ "qqstring" : [{
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "start"
+ }, {
+ defaultToken: "string"
+ }],
+ "qstring" : [{
+ token : "constant.language.escape",
+ regex : stringEscape
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "start"
+ }, {
+ defaultToken: "string"
+ }]
+ };
+};
+
+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) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","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 PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules;
+var PythonFoldMode = require("./folding/pythonic").FoldMode;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = PythonHighlightRules;
+ this.foldingRules = new PythonFoldMode("\\:");
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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.getTokenizer().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));
+ };
+
+ this.$id = "ace/mode/python";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-r.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-r.js
new file mode 100644
index 00000000..297d7e05
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-r.js
@@ -0,0 +1,301 @@
+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) {
+"use strict";
+
+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/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 : "`.*?`"
+ },
+ {
+ onMatch : 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/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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/r",["require","exports","module","ace/range","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/r_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) {
+ "use strict";
+
+ var Range = require("../range").Range;
+ var oop = require("../lib/oop");
+ var TextMode = require("./text").Mode;
+ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+ var RHighlightRules = require("./r_highlight_rules").RHighlightRules;
+ var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+ var Mode = function(){
+ this.HighlightRules = RHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = this.$defaultBehaviour;
+ };
+ oop.inherits(Mode, TextMode);
+
+ (function()
+ {
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/r";
+ }).call(Mode.prototype);
+ exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-razor.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-razor.js
new file mode 100644
index 00000000..c19ec55f
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-razor.js
@@ -0,0 +1,2845 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+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(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": {"manifest": 1},
+ "head": {},
+ "title": {},
+ "base": {"href": 1, "target": 1},
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
+ "noscript": {"href": 1},
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
+ "section": {},
+ "nav": {},
+ "article": {"pubdate": 1},
+ "aside": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "header": {},
+ "footer": {},
+ "address": {},
+ "main": {},
+ "p": {},
+ "hr": {},
+ "pre": {},
+ "blockquote": {"cite": 1},
+ "ol": {"start": 1, "reversed": 1},
+ "ul": {},
+ "li": {"value": 1},
+ "dl": {},
+ "dt": {},
+ "dd": {},
+ "figure": {},
+ "figcaption": {},
+ "div": {},
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
+ "em": {},
+ "strong": {},
+ "small": {},
+ "s": {},
+ "cite": {},
+ "q": {"cite": 1},
+ "dfn": {},
+ "abbr": {},
+ "data": {},
+ "time": {"datetime": 1},
+ "code": {},
+ "var": {},
+ "samp": {},
+ "kbd": {},
+ "sub": {},
+ "sup": {},
+ "i": {},
+ "b": {},
+ "u": {},
+ "mark": {},
+ "ruby": {},
+ "rt": {},
+ "rp": {},
+ "bdi": {},
+ "bdo": {},
+ "span": {},
+ "br": {},
+ "wbr": {},
+ "ins": {"cite": 1, "datetime": 1},
+ "del": {"cite": 1, "datetime": 1},
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
+ "param": {"name": 1, "value": 1},
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
+ "source": {"src": 1, "type": 1, "media": 1},
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
+ "canvas": {"width": 1, "height": 1},
+ "map": {"name": 1},
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
+ "svg": {},
+ "math": {},
+ "table": {"summary": 1},
+ "caption": {},
+ "colgroup": {"span": 1},
+ "col": {"span": 1},
+ "tbody": {},
+ "thead": {},
+ "tfoot": {},
+ "tr": {},
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
+ "legend": {},
+ "label": {"form": 1, "for": 1},
+ "input": {
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
+ "datalist": {},
+ "optgroup": {"disabled": 1, "label": 1},
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
+ "output": {"for": 1, "form": 1, "name": 1},
+ "progress": {"value": 1, "max": 1},
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
+ "details": {"open": 1},
+ "summary": {},
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
+ "menu": {"type": 1, "label": 1},
+ "dialog": {"open": 1}
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+function findAttributeName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "attribute-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompletions(state, session, pos, prefix);
+ if (is(token, "attribute-value"))
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/&[a-z]*$/i.test(line))
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ var attributeName = findAttributeName(session, pos);
+
+ if (!tagName)
+ return [];
+ var values = [];
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
+ values = Object.keys(attributeMap[tagName][attributeName]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "attribute value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
+
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "html entity",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).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) {
+"use strict";
+
+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", // character
+ regex : /'(?:.|\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n]))?'/
+ }, {
+ token : "string", start : '"', end : '"|$', next: [
+ {token: "constant.language.escape", regex: /\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n])/},
+ {token: "invalid", regex: /\\./}
+ ]
+ }, {
+ token : "string", start : '@"', end : '"', next:[
+ {token: "constant.language.escape", regex: '""'}
+ ]
+ }, {
+ token : "string", start : /\$"/, end : '"|$', next: [
+ {token: "constant.language.escape", regex: /\\(:?$)|{{/},
+ {token: "constant.language.escape", regex: /\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n])/},
+ {token: "invalid", 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 : "keyword",
+ regex : "^\\s*#(if|else|elif|endif|define|undef|warning|error|line|region|endregion|pragma)"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\?|\\:|\\,|\\;|\\."
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+ this.normalizeRules();
+};
+
+oop.inherits(CSharpHighlightRules, TextHighlightRules);
+
+exports.CSharpHighlightRules = CSharpHighlightRules;
+});
+
+ace.define("ace/mode/razor_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/html_highlight_rules","ace/mode/csharp_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 HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var CSharpHighlightRules = require("./csharp_highlight_rules").CSharpHighlightRules;
+
+var blockPrefix = 'razor-block-';
+var RazorLangHighlightRules = function() {
+ CSharpHighlightRules.call(this);
+
+ var processPotentialCallback = function(value, stackItem) {
+ if (typeof stackItem === "function")
+ return stackItem(value);
+
+ return stackItem;
+ };
+
+ var inBraces = 'in-braces';
+ this.$rules.start.unshift({
+ regex: '[\\[({]',
+ onMatch: function(value, state, stack) {
+ var prefix = /razor-[^\-]+-/.exec(state)[0];
+
+ stack.unshift(value);
+ stack.unshift(prefix + inBraces);
+ this.next = prefix + inBraces;
+ return 'paren.lparen';
+ }
+ }, {
+ start: "@\\*",
+ end: "\\*@",
+ token: "comment"
+ });
+
+ var parentCloseMap = {
+ '{': '}',
+ '[': ']',
+ '(': ')'
+ };
+
+ this.$rules[inBraces] = lang.deepCopy(this.$rules.start);
+ this.$rules[inBraces].unshift({
+ regex: '[\\])}]',
+ onMatch: function(value, state, stack) {
+ var open = stack[1];
+ if (parentCloseMap[open] !== value)
+ return 'invalid.illegal';
+
+ stack.shift(); // exit in-braces block
+ stack.shift(); // exit brace marker
+ this.next = processPotentialCallback(value, stack[0]) || 'start';
+ return 'paren.rparen';
+ }
+ });
+};
+
+oop.inherits(RazorLangHighlightRules, CSharpHighlightRules);
+
+var RazorHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var blockStartRule = {
+ regex: '@[({]|@functions{',
+ onMatch: function(value, state, stack) {
+ stack.unshift(value);
+ stack.unshift('razor-block-start');
+ this.next = 'razor-block-start';
+ return 'punctuation.block.razor';
+ }
+ };
+
+ var blockEndMap = {
+ '@{': '}',
+ '@(': ')',
+ '@functions{':'}'
+ };
+
+ var blockEndRule = {
+ regex: '[})]',
+ onMatch: function(value, state, stack) {
+ var blockStart = stack[1];
+ if (blockEndMap[blockStart] !== value)
+ return 'invalid.illegal';
+
+ stack.shift(); // exit razor block
+ stack.shift(); // remove block type marker
+ this.next = stack.shift() || 'start';
+ return 'punctuation.block.razor';
+ }
+ };
+
+ var shortStartRule = {
+ regex: "@(?![{(])",
+ onMatch: function(value, state, stack) {
+ stack.unshift("razor-short-start");
+ this.next = "razor-short-start";
+ return 'punctuation.short.razor';
+ }
+ };
+
+ var shortEndRule = {
+ token: "",
+ regex: "(?=[^A-Za-z_\\.()\\[\\]])",
+ next: 'pop'
+ };
+
+ var ifStartRule = {
+ regex: "@(?=if)",
+ onMatch: function(value, state, stack) {
+ stack.unshift(function(value) {
+ if (value !== '}')
+ return 'start';
+
+ return stack.shift() || 'start';
+ });
+ this.next = 'razor-block-start';
+ return 'punctuation.control.razor';
+ }
+ };
+
+ var razorStartRules = [
+ {
+ start: "@\\*",
+ end: "\\*@",
+ token: "comment"
+ },
+ {
+ token: ["meta.directive.razor", "text", "identifier"],
+ regex: "^(\\s*@model)(\\s+)(.+)$"
+ },
+ blockStartRule,
+ shortStartRule
+ ];
+
+ for (var key in this.$rules)
+ this.$rules[key].unshift.apply(this.$rules[key], razorStartRules);
+
+ this.embedRules(RazorLangHighlightRules, "razor-block-", [blockEndRule], ["start"]);
+ this.embedRules(RazorLangHighlightRules, "razor-short-", [shortEndRule], ["start"]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(RazorHighlightRules, HtmlHighlightRules);
+
+exports.RazorHighlightRules = RazorHighlightRules;
+exports.RazorLangHighlightRules = RazorLangHighlightRules;
+});
+
+ace.define("ace/mode/razor_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var keywords = [
+ "abstract", "as", "base", "bool",
+ "break", "byte", "case", "catch",
+ "char", "checked", "class", "const",
+ "continue", "decimal", "default", "delegate",
+ "do", "double","else","enum",
+ "event", "explicit", "extern", "false",
+ "finally", "fixed", "float", "for",
+ "foreach", "goto", "if", "implicit",
+ "in", "int", "interface", "internal",
+ "is", "lock", "long", "namespace",
+ "new", "null", "object", "operator",
+ "out", "override", "params", "private",
+ "protected", "public", "readonly", "ref",
+ "return", "sbyte", "sealed", "short",
+ "sizeof", "stackalloc", "static", "string",
+ "struct", "switch", "this", "throw",
+ "true", "try", "typeof", "uint",
+ "ulong", "unchecked", "unsafe", "ushort",
+ "using", "var", "virtual", "void",
+ "volatile", "while"];
+
+var shortHands = [
+ "Html", "Model", "Url", "Layout"
+];
+
+var RazorCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+
+ if(state.lastIndexOf("razor-short-start") == -1 && state.lastIndexOf("razor-block-start") == -1)
+ return [];
+
+ var token = session.getTokenAt(pos.row, pos.column);
+ if (!token)
+ return [];
+
+ if(state.lastIndexOf("razor-short-start") != -1) {
+ return this.getShortStartCompletions(state, session, pos, prefix);
+ }
+
+ if(state.lastIndexOf("razor-block-start") != -1) {
+ return this.getKeywordCompletions(state, session, pos, prefix);
+ }
+
+
+ };
+
+ this.getShortStartCompletions = function(state, session, pos, prefix) {
+ return shortHands.map(function(element){
+ return {
+ value: element,
+ meta: "keyword",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getKeywordCompletions = function(state, session, pos, prefix) {
+ return shortHands.concat(keywords).map(function(element){
+ return {
+ value: element,
+ meta: "keyword",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(RazorCompletions.prototype);
+
+exports.RazorCompletions = RazorCompletions;
+
+});
+
+ace.define("ace/mode/razor",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/razor_highlight_rules","ace/mode/razor_completions","ace/mode/html_completions"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var RazorHighlightRules = require("./razor_highlight_rules").RazorHighlightRules;
+var RazorCompletions = require("./razor_completions").RazorCompletions;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.$highlightRules = new RazorHighlightRules();
+ this.$completer = new RazorCompletions();
+ this.$htmlCompleter = new HtmlCompletions();
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.getCompletions = function(state, session, pos, prefix) {
+ var razorToken = this.$completer.getCompletions(state, session, pos, prefix);
+ var htmlToken = this.$htmlCompleter.getCompletions(state, session, pos, prefix);
+ return razorToken.concat(htmlToken);
+ };
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+ this.$id = "ace/mode/razor";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-rdoc.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-rdoc.js
new file mode 100644
index 00000000..fe118c48
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-rdoc.js
@@ -0,0 +1,236 @@
+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" : [{
+ token : "comment",
+ regex : "%.*$"
+ }, {
+ token : ["keyword", "lparen", "variable.parameter", "rparen", "lparen", "storage.type", "rparen"],
+ regex : "(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})"
+ }, {
+ token : ["keyword","lparen", "variable.parameter", "rparen"],
+ regex : "(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?"
+ }, {
+ token : ["storage.type", "lparen", "variable.parameter", "rparen"],
+ regex : "(\\\\begin)({)(verbatim)(})",
+ next : "verbatim"
+ }, {
+ token : ["storage.type", "lparen", "variable.parameter", "rparen"],
+ regex : "(\\\\begin)({)(lstlisting)(})",
+ next : "lstlisting"
+ }, {
+ token : ["storage.type", "lparen", "variable.parameter", "rparen"],
+ regex : "(\\\\(?:begin|end))({)([\\w*]*)(})"
+ }, {
+ token : "storage.type",
+ regex : /\\verb\b\*?/,
+ next : [{
+ token : ["keyword.operator", "string", "keyword.operator"],
+ regex : "(.)(.*?)(\\1|$)|",
+ next : "start"
+ }]
+ }, {
+ token : "storage.type",
+ regex : "\\\\[a-zA-Z]+"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "constant.character.escape",
+ regex : "\\\\[^a-zA-Z]?"
+ }, {
+ token : "string",
+ regex : "\\${1,2}",
+ next : "equation"
+ }],
+ "equation" : [{
+ token : "comment",
+ regex : "%.*$"
+ }, {
+ token : "string",
+ regex : "\\${1,2}",
+ next : "start"
+ }, {
+ token : "constant.character.escape",
+ regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"
+ }, {
+ token : "error",
+ regex : "^\\s*$",
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }],
+ "verbatim": [{
+ token : ["storage.type", "lparen", "variable.parameter", "rparen"],
+ regex : "(\\\\end)({)(verbatim)(})",
+ next : "start"
+ }, {
+ defaultToken : "text"
+ }],
+ "lstlisting": [{
+ token : ["storage.type", "lparen", "variable.parameter", "rparen"],
+ regex : "(\\\\end)({)(lstlisting)(})",
+ next : "start"
+ }, {
+ defaultToken : "text"
+ }]
+ };
+
+ this.normalizeRules();
+};
+oop.inherits(LatexHighlightRules, TextHighlightRules);
+
+exports.LatexHighlightRules = LatexHighlightRules;
+
+});
+
+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) {
+"use strict";
+
+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/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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/rdoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rdoc_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var RDocHighlightRules = require("./rdoc_highlight_rules").RDocHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function(suppressHighlighting) {
+ this.HighlightRules = RDocHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+ this.$id = "ace/mode/rdoc";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-rhtml.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-rhtml.js
new file mode 100644
index 00000000..aae0378d
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-rhtml.js
@@ -0,0 +1,2779 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+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(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": {"manifest": 1},
+ "head": {},
+ "title": {},
+ "base": {"href": 1, "target": 1},
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
+ "noscript": {"href": 1},
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
+ "section": {},
+ "nav": {},
+ "article": {"pubdate": 1},
+ "aside": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "header": {},
+ "footer": {},
+ "address": {},
+ "main": {},
+ "p": {},
+ "hr": {},
+ "pre": {},
+ "blockquote": {"cite": 1},
+ "ol": {"start": 1, "reversed": 1},
+ "ul": {},
+ "li": {"value": 1},
+ "dl": {},
+ "dt": {},
+ "dd": {},
+ "figure": {},
+ "figcaption": {},
+ "div": {},
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
+ "em": {},
+ "strong": {},
+ "small": {},
+ "s": {},
+ "cite": {},
+ "q": {"cite": 1},
+ "dfn": {},
+ "abbr": {},
+ "data": {},
+ "time": {"datetime": 1},
+ "code": {},
+ "var": {},
+ "samp": {},
+ "kbd": {},
+ "sub": {},
+ "sup": {},
+ "i": {},
+ "b": {},
+ "u": {},
+ "mark": {},
+ "ruby": {},
+ "rt": {},
+ "rp": {},
+ "bdi": {},
+ "bdo": {},
+ "span": {},
+ "br": {},
+ "wbr": {},
+ "ins": {"cite": 1, "datetime": 1},
+ "del": {"cite": 1, "datetime": 1},
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
+ "param": {"name": 1, "value": 1},
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
+ "source": {"src": 1, "type": 1, "media": 1},
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
+ "canvas": {"width": 1, "height": 1},
+ "map": {"name": 1},
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
+ "svg": {},
+ "math": {},
+ "table": {"summary": 1},
+ "caption": {},
+ "colgroup": {"span": 1},
+ "col": {"span": 1},
+ "tbody": {},
+ "thead": {},
+ "tfoot": {},
+ "tr": {},
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
+ "legend": {},
+ "label": {"form": 1, "for": 1},
+ "input": {
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
+ "datalist": {},
+ "optgroup": {"disabled": 1, "label": 1},
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
+ "output": {"for": 1, "form": 1, "name": 1},
+ "progress": {"value": 1, "max": 1},
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
+ "details": {"open": 1},
+ "summary": {},
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
+ "menu": {"type": 1, "label": 1},
+ "dialog": {"open": 1}
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+function findAttributeName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "attribute-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompletions(state, session, pos, prefix);
+ if (is(token, "attribute-value"))
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/&[a-z]*$/i.test(line))
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ var attributeName = findAttributeName(session, pos);
+
+ if (!tagName)
+ return [];
+ var values = [];
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
+ values = Object.keys(attributeMap[tagName][attributeName]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "attribute value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
+
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "html entity",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).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) {
+"use strict";
+
+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/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 : "`.*?`"
+ },
+ {
+ onMatch : 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/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) {
+"use strict";
+
+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() {
+ HtmlHighlightRules.call(this);
+
+ this.$rules["start"].unshift({
+ token: "support.function.codebegin",
+ regex: "^<" + "!--\\s*begin.rcode\\s*(?:.*)",
+ next: "r-start"
+ });
+
+ this.embedRules(RHighlightRules, "r-", [{
+ token: "support.function.codeend",
+ regex: "^\\s*end.rcode\\s*-->",
+ next: "start"
+ }], ["start"]);
+
+ this.normalizeRules();
+};
+oop.inherits(RHtmlHighlightRules, TextHighlightRules);
+
+exports.RHtmlHighlightRules = RHtmlHighlightRules;
+});
+
+ace.define("ace/mode/rhtml",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/rhtml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+
+var RHtmlHighlightRules = require("./rhtml_highlight_rules").RHtmlHighlightRules;
+
+var Mode = function(doc, session) {
+ HtmlMode.call(this);
+ this.$session = session;
+ this.HighlightRules = RHtmlHighlightRules;
+};
+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.$id = "ace/mode/rhtml";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-rst.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-rst.js
new file mode 100644
index 00000000..235d31a2
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-rst.js
@@ -0,0 +1,249 @@
+ace.define("ace/mode/rst_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 RSTHighlightRules = function() {
+
+ var tokens = {
+ title: "markup.heading",
+ list: "markup.heading",
+ table: "constant",
+ directive: "keyword.operator",
+ entity: "string",
+ link: "markup.underline.list",
+ bold: "markup.bold",
+ italic: "markup.italic",
+ literal: "support.function",
+ comment: "comment"
+ };
+
+ var startStringPrefix = "(^|\\s|[\"'(<\\[{\\-/:])";
+ var endStringSuffix = "(?:$|(?=\\s|[\\\\.,;!?\\-/:\"')>\\]}]))";
+
+ this.$rules = {
+ "start": [
+ {
+ token : tokens.title,
+ regex : "(^)([\\=\\-`:\\.'\"~\\^_\\*\\+#])(\\2{2,}\\s*$)"
+ },
+ {
+ token : ["text", tokens.directive, tokens.literal],
+ regex : "(^\\s*\\.\\. )([^: ]+::)(.*$)",
+ next : "codeblock"
+ },
+ {
+ token : tokens.directive,
+ regex : "::$",
+ next : "codeblock"
+ },
+ {
+ token : [tokens.entity, tokens.link],
+ regex : "(^\\.\\. _[^:]+:)(.*$)"
+ },
+ {
+ token : [tokens.entity, tokens.link],
+ regex : "(^__ )(https?://.*$)"
+ },
+ {
+ token : tokens.entity,
+ regex : "^\\.\\. \\[[^\\]]+\\] "
+ },
+ {
+ token : tokens.comment,
+ regex : "^\\.\\. .*$",
+ next : "comment"
+ },
+ {
+ token : tokens.list,
+ regex : "^\\s*[\\*\\+-] "
+ },
+ {
+ token : tokens.list,
+ regex : "^\\s*(?:[A-Za-z]|[0-9]+|[ivxlcdmIVXLCDM]+)\\. "
+ },
+ {
+ token : tokens.list,
+ regex : "^\\s*\\(?(?:[A-Za-z]|[0-9]+|[ivxlcdmIVXLCDM]+)\\) "
+ },
+ {
+ token : tokens.table,
+ regex : "^={2,}(?: +={2,})+$"
+ },
+ {
+ token : tokens.table,
+ regex : "^\\+-{2,}(?:\\+-{2,})+\\+$"
+ },
+ {
+ token : tokens.table,
+ regex : "^\\+={2,}(?:\\+={2,})+\\+$"
+ },
+ {
+ token : ["text", tokens.literal],
+ regex : startStringPrefix + "(``)(?=\\S)",
+ next : "code"
+ },
+ {
+ token : ["text", tokens.bold],
+ regex : startStringPrefix + "(\\*\\*)(?=\\S)",
+ next : "bold"
+ },
+ {
+ token : ["text", tokens.italic],
+ regex : startStringPrefix + "(\\*)(?=\\S)",
+ next : "italic"
+ },
+ {
+ token : tokens.entity,
+ regex : "\\|[\\w\\-]+?\\|"
+ },
+ {
+ token : tokens.entity,
+ regex : ":[\\w-:]+:`\\S",
+ next : "entity"
+ },
+ {
+ token : ["text", tokens.entity],
+ regex : startStringPrefix + "(_`)(?=\\S)",
+ next : "entity"
+ },
+ {
+ token : tokens.entity,
+ regex : "_[A-Za-z0-9\\-]+?"
+ },
+ {
+ token : ["text", tokens.link],
+ regex : startStringPrefix + "(`)(?=\\S)",
+ next : "link"
+ },
+ {
+ token : tokens.link,
+ regex : "[A-Za-z0-9\\-]+?__?"
+ },
+ {
+ token : tokens.link,
+ regex : "\\[[^\\]]+?\\]_"
+ },
+ {
+ token : tokens.link,
+ regex : "https?://\\S+"
+ },
+ {
+ token : tokens.table,
+ regex : "\\|"
+ }
+ ],
+ "codeblock": [
+ {
+ token : tokens.literal,
+ regex : "^ +.+$",
+ next : "codeblock"
+ },
+ {
+ token : tokens.literal,
+ regex : '^$',
+ next: "codeblock"
+ },
+ {
+ token : "empty",
+ regex : "",
+ next : "start"
+ }
+ ],
+ "code": [
+ {
+ token : tokens.literal,
+ regex : "\\S``" + endStringSuffix,
+ next : "start"
+ },
+ {
+ defaultToken: tokens.literal
+ }
+ ],
+ "bold": [
+ {
+ token : tokens.bold,
+ regex : "\\S\\*\\*" + endStringSuffix,
+ next : "start"
+ },
+ {
+ defaultToken: tokens.bold
+ }
+ ],
+ "italic": [
+ {
+ token : tokens.italic,
+ regex : "\\S\\*" + endStringSuffix,
+ next : "start"
+ },
+ {
+ defaultToken: tokens.italic
+ }
+ ],
+ "entity": [
+ {
+ token : tokens.entity,
+ regex : "\\S`" + endStringSuffix,
+ next : "start"
+ },
+ {
+ defaultToken: tokens.entity
+ }
+ ],
+ "link": [
+ {
+ token : tokens.link,
+ regex : "\\S`__?" + endStringSuffix,
+ next : "start"
+ },
+ {
+ defaultToken: tokens.link
+ }
+ ],
+ "comment": [
+ {
+ token : tokens.comment,
+ regex : "^ +.+$",
+ next : "comment"
+ },
+ {
+ token : tokens.comment,
+ regex : '^$',
+ next: "comment"
+ },
+ {
+ token : "empty",
+ regex : "",
+ next : "start"
+ }
+ ]
+ };
+};
+oop.inherits(RSTHighlightRules, TextHighlightRules);
+
+exports.RSTHighlightRules = RSTHighlightRules;
+});
+
+ace.define("ace/mode/rst",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rst_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var RSTHighlightRules = require("./rst_highlight_rules").RSTHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = RSTHighlightRules;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.type = "text";
+
+ this.$id = "ace/mode/rst";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-ruby.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-ruby.js
new file mode 100644
index 00000000..6732c68b
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-ruby.js
@@ -0,0 +1,491 @@
+ace.define("ace/mode/ruby_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 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 instanceVariable = exports.instanceVariable = {
+ token : "variable.instance", // instance variable
+ regex : "@{1,2}[a-zA-Z_\\d]+"
+};
+
+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|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|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*(?=[).,;]|$)"
+ },
+
+ [{
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ return "paren.lparen";
+ }
+ if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.start",
+ regex : /"/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+ }, {
+ token : "paren.start",
+ regex : /#{/,
+ push : "start"
+ }, {
+ token : "string.end",
+ regex : /"/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/
+ }, {
+ token : "paren.start",
+ regex : /#{/,
+ push : "start"
+ }, {
+ token : "string.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : /'/,
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\['\\]/
+ }, {
+ token : "string.end",
+ regex : /'/,
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ {
+ 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 : "=>"
+ }, {
+ stateName: "heredoc",
+ onMatch : function(value, currentState, stack) {
+ var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
+ var tokens = value.split(this.splitRegex);
+ stack.push(next, tokens[3]);
+ return [
+ {type:"constant", value: tokens[1]},
+ {type:"string", value: tokens[2]},
+ {type:"support.class", value: tokens[3]},
+ {type:"string", value: tokens[4]}
+ ];
+ },
+ regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)",
+ rules: {
+ heredoc: [{
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }],
+ indentedHeredoc: [{
+ token: "string",
+ regex: "^ +"
+ }, {
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }]
+ }
+ }, {
+ regex : "$",
+ token : "empty",
+ next : function(currentState, stack) {
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
+ return stack[0];
+ return currentState;
+ }
+ }, {
+ token : "string.character",
+ regex : "\\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(?:$|\\s.*$)",
+ next : "start"
+ }, {
+ token : "comment", // comment spanning whole line
+ regex : ".+"
+ }
+ ]
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(RubyHighlightRules, TextHighlightRules);
+
+exports.RubyHighlightRules = RubyHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var Range = require("../range").Range;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = RubyHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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*$/);
+ var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/);
+ var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/);
+ var startingConditional = line.match(/^\s*(if|else|when)\s*/)
+ if (match || startingClassOrMethod || startingDoBlock || startingConditional) {
+ indent += tab;
+ }
+ }
+
+ return indent;
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return /^\s+(end|else)$/.test(line + input) || this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, session, row) {
+ var line = session.getLine(row);
+ if (/}/.test(line))
+ return this.$outdent.autoOutdent(session, row);
+ var indent = this.$getIndent(line);
+ var prevLine = session.getLine(row - 1);
+ var prevIndent = this.$getIndent(prevLine);
+ var tab = session.getTabString();
+ if (prevIndent.length <= indent.length) {
+ if (indent.slice(-tab.length) == tab)
+ session.remove(new Range(row, indent.length-tab.length, row, indent.length));
+ }
+ };
+
+ this.$id = "ace/mode/ruby";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-rust.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-rust.js
new file mode 100644
index 00000000..0802f6b4
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-rust.js
@@ -0,0 +1,272 @@
+ace.define("ace/mode/rust_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 stringEscape = /\\(?:[nrt0'"\\]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\})/.source;
+var RustHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { token: 'variable.other.source.rust',
+ regex: '\'[a-zA-Z_][a-zA-Z0-9_]*(?![\\\'])' },
+ { token: 'string.quoted.single.source.rust',
+ regex: "'(?:[^'\\\\]|" + stringEscape + ")'" },
+ {
+ stateName: "bracketedComment",
+ onMatch : function(value, currentState, stack){
+ stack.unshift(this.next, value.length - 1, currentState);
+ return "string.quoted.raw.source.rust";
+ },
+ regex : /r#*"/,
+ next : [
+ {
+ onMatch : function(value, currentState, stack) {
+ var token = "string.quoted.raw.source.rust";
+ if (value.length >= stack[1]) {
+ if (value.length > stack[1])
+ token = "invalid";
+ stack.shift();
+ stack.shift();
+ this.next = stack.shift();
+ } else {
+ this.next = "";
+ }
+ return token;
+ },
+ regex : /"#*/,
+ next : "start"
+ }, {
+ defaultToken : "string.quoted.raw.source.rust"
+ }
+ ]
+ },
+ { token: 'string.quoted.double.source.rust',
+ regex: '"',
+ push:
+ [ { token: 'string.quoted.double.source.rust',
+ regex: '"',
+ next: 'pop' },
+ { token: 'constant.character.escape.source.rust',
+ regex: stringEscape },
+ { defaultToken: 'string.quoted.double.source.rust' } ] },
+ { token: [ 'keyword.source.rust', 'text', 'entity.name.function.source.rust' ],
+ regex: '\\b(fn)(\\s+)([a-zA-Z_][a-zA-Z0-9_]*)' },
+ { token: 'support.constant', regex: '\\b[a-zA-Z_][\\w\\d]*::' },
+ { token: 'keyword.source.rust',
+ regex: '\\b(?:abstract|alignof|as|box|break|continue|const|crate|do|else|enum|extern|for|final|if|impl|in|let|loop|macro|match|mod|move|mut|offsetof|override|priv|proc|pub|pure|ref|return|self|sizeof|static|struct|super|trait|type|typeof|unsafe|unsized|use|virtual|where|while|yield)\\b' },
+ { token: 'storage.type.source.rust',
+ regex: '\\b(?:Self|isize|usize|char|bool|u8|u16|u32|u64|u128|f16|f32|f64|i8|i16|i32|i64|i128|str|option|either|c_float|c_double|c_void|FILE|fpos_t|DIR|dirent|c_char|c_schar|c_uchar|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|size_t|ptrdiff_t|clock_t|time_t|c_longlong|c_ulonglong|intptr_t|uintptr_t|off_t|dev_t|ino_t|pid_t|mode_t|ssize_t)\\b' },
+ { token: 'variable.language.source.rust', regex: '\\bself\\b' },
+
+ { token: 'comment.line.doc.source.rust',
+ regex: '//!.*$' },
+ { token: 'comment.line.double-dash.source.rust',
+ regex: '//.*$' },
+ { token: 'comment.start.block.source.rust',
+ regex: '/\\*',
+ stateName: 'comment',
+ push:
+ [ { token: 'comment.start.block.source.rust',
+ regex: '/\\*',
+ push: 'comment' },
+ { token: 'comment.end.block.source.rust',
+ regex: '\\*/',
+ next: 'pop' },
+ { defaultToken: 'comment.block.source.rust' } ] },
+
+ { token: 'keyword.operator',
+ regex: /\$|[-=]>|[-+%^=!&|<>]=?|[*/](?![*/])=?/ },
+ { token : "punctuation.operator", regex : /[?:,;.]/ },
+ { token : "paren.lparen", regex : /[\[({]/ },
+ { token : "paren.rparen", regex : /[\])}]/ },
+ { token: 'constant.language.source.rust',
+ regex: '\\b(?:true|false|Some|None|Ok|Err)\\b' },
+ { token: 'support.constant.source.rust',
+ regex: '\\b(?:EXIT_FAILURE|EXIT_SUCCESS|RAND_MAX|EOF|SEEK_SET|SEEK_CUR|SEEK_END|_IOFBF|_IONBF|_IOLBF|BUFSIZ|FOPEN_MAX|FILENAME_MAX|L_tmpnam|TMP_MAX|O_RDONLY|O_WRONLY|O_RDWR|O_APPEND|O_CREAT|O_EXCL|O_TRUNC|S_IFIFO|S_IFCHR|S_IFBLK|S_IFDIR|S_IFREG|S_IFMT|S_IEXEC|S_IWRITE|S_IREAD|S_IRWXU|S_IXUSR|S_IWUSR|S_IRUSR|F_OK|R_OK|W_OK|X_OK|STDIN_FILENO|STDOUT_FILENO|STDERR_FILENO)\\b' },
+ { token: 'meta.preprocessor.source.rust',
+ regex: '\\b\\w\\(\\w\\)*!|#\\[[\\w=\\(\\)_]+\\]\\b' },
+ { token: 'constant.numeric.source.rust',
+ regex: /\b(?:0x[a-fA-F0-9_]+|0o[0-7_]+|0b[01_]+|[0-9][0-9_]*(?!\.))(?:[iu](?:size|8|16|32|64|128))?\b/ },
+ { token: 'constant.numeric.source.rust',
+ regex: /\b(?:[0-9][0-9_]*)(?:\.[0-9][0-9_]*)?(?:[Ee][+-][0-9][0-9_]*)?(?:f32|f64)?\b/ } ] }
+
+ this.normalizeRules();
+};
+
+RustHighlightRules.metaData = { fileTypes: [ 'rs', 'rc' ],
+ foldingStartMarker: '^.*\\bfn\\s*(\\w+\\s*)?\\([^\\)]*\\)(\\s*\\{[^\\}]*)?\\s*$',
+ foldingStopMarker: '^\\s*\\}',
+ name: 'Rust',
+ scopeName: 'source.rust' }
+
+
+oop.inherits(RustHighlightRules, TextHighlightRules);
+
+exports.RustHighlightRules = RustHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/rust",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/rust_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var RustHighlightRules = require("./rust_highlight_rules").RustHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = RustHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/", nestable: true};
+ this.$quotes = { '"': '"' };
+ this.$id = "ace/mode/rust";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-sass.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-sass.js
new file mode 100644
index 00000000..bd181705
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-sass.js
@@ -0,0 +1,434 @@
+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-shadow|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|unquote").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(
+ ("aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|" +
+ "blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|" +
+ "chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|" +
+ "darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|" +
+ "darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|" +
+ "darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|" +
+ "darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|" +
+ "dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|" +
+ "ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|" +
+ "hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|" +
+ "lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|" +
+ "lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|" +
+ "lightsalmon|lightseagreen|lightskyblue|lightslategray|" +
+ "lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|" +
+ "magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|" +
+ "mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|" +
+ "mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|" +
+ "moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|" +
+ "orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|" +
+ "papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|" +
+ "red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|" +
+ "seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|" +
+ "springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|" +
+ "wheat|white|whitesmoke|yellow|yellowgreen").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 : ["support.function", "string", "support.function"],
+ regex : "(url\\()(.*)(\\))"
+ }, {
+ 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+"
+ }, {
+ caseInsensitive: true
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "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/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
+
+var SassHighlightRules = function() {
+ ScssHighlightRules.call(this);
+ var start = this.$rules.start;
+ if (start[1].token == "comment") {
+ start.splice(1, 1, {
+ onMatch: function(value, currentState, stack) {
+ stack.unshift(this.next, -1, value.length - 2, currentState);
+ return "comment";
+ },
+ regex: /^\s*\/\*/,
+ next: "comment"
+ }, {
+ token: "error.invalid",
+ regex: "/\\*|[{;}]"
+ }, {
+ token: "support.type",
+ regex: /^\s*:[\w\-]+\s/
+ });
+
+ this.$rules.comment = [
+ {regex: /^\s*/, onMatch: function(value, currentState, stack) {
+ if (stack[1] === -1)
+ stack[1] = Math.max(stack[2], value.length - 1);
+ if (value.length <= stack[1]) {stack.shift();stack.shift();stack.shift();
+ this.next = stack.shift();
+ return "text";
+ } else {
+ this.next = "";
+ return "comment";
+ }
+ }, next: "start"},
+ {defaultToken: "comment"}
+ ]
+ }
+};
+
+oop.inherits(SassHighlightRules, ScssHighlightRules);
+
+exports.SassHighlightRules = SassHighlightRules;
+
+});
+
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/sass",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sass_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = SassHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.$id = "ace/mode/sass";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-scad.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-scad.js
new file mode 100644
index 00000000..c9a767b9
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-scad.js
@@ -0,0 +1,407 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/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 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"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "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/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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/scad",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scad_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 scadHighlightRules = require("./scad_highlight_rules").scadHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = scadHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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);
+ };
+
+ this.$id = "ace/mode/scad";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-scala.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-scala.js
new file mode 100644
index 00000000..94c645c1
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-scala.js
@@ -0,0 +1,975 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+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) {
+"use strict";
+
+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|trye|catch|finally|yield|" +
+ "abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|null|" +
+ "override|package|private|protected|sealed|super|this|trait|type|val|var|with|" +
+ "assert|assume|require|print|println|printf|readLine|readBoolean|readByte|readShort|" + // package scala
+ "readChar|readInt|readLong|readFloat|readDouble" // package scala
+ );
+
+ 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|Int|Long|Nothing|" +
+
+ "App|Application|BufferedIterator|BigDecimal|BigInt|Console|Either|" +
+ "Enumeration|Equiv|Fractional|Function|IndexedSeq|Integral|Iterator|" +
+ "Map|Numeric|Nil|NotNull|Ordered|Ordering|PartialFunction|PartialOrdering|" +
+ "Product|Proxy|Range|Responder|Seq|Serializable|Set|Specializable|Stream|" +
+ "StringContext|Symbol|Traversable|TraversableOnce|Tuple|Vector|Pair|Triple"
+
+
+ );
+
+ 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"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "string" : [
+ {
+ token : "escape",
+ regex : '\\\\"'
+ }, {
+ token : "string",
+ regex : '"',
+ next : "start"
+ }, {
+ token : "string.invalid",
+ regex : '[^"\\\\]*$',
+ next : "start"
+ }, {
+ token : "string",
+ regex : '[^"\\\\]+'
+ }
+ ],
+ "tstring" : [
+ {
+ token : "string",
+ regex : '"{3,5}',
+ next : "start"
+ }, {
+ defaultToken : "string"
+ }
+ ]
+ };
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+};
+
+oop.inherits(ScalaHighlightRules, TextHighlightRules);
+
+exports.ScalaHighlightRules = ScalaHighlightRules;
+});
+
+ace.define("ace/mode/scala",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/scala_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptMode = require("./javascript").Mode;
+var ScalaHighlightRules = require("./scala_highlight_rules").ScalaHighlightRules;
+
+var Mode = function() {
+ JavaScriptMode.call(this);
+ this.HighlightRules = ScalaHighlightRules;
+};
+oop.inherits(Mode, JavaScriptMode);
+
+(function() {
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+ this.$id = "ace/mode/scala";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-scheme.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-scheme.js
new file mode 100644
index 00000000..2e6b7fff
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-scheme.js
@@ -0,0 +1,225 @@
+ace.define("ace/mode/scheme_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 SchemeHighlightRules = function() {
+ var keywordControl = "case|do|let|loop|if|else|when";
+ var keywordOperator = "eq?|eqv?|equal?|and|or|not|null?";
+ var constantLanguage = "#t|#f";
+ var supportFunctions = "cons|car|cdr|cond|lambda|lambda*|syntax-rules|format|set!|quote|eval|append|list|list?|member?|load";
+
+ 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.scheme", "text", "entity.name.function.scheme"],
+ "regex": "(?:\\b(?:(define|define-syntax|define-macro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)"
+ },
+ {
+ "token": "punctuation.definition.constant.character.scheme",
+ "regex": "#:\\S+"
+ },
+ {
+ "token": ["punctuation.definition.variable.scheme", "variable.other.global.scheme", "punctuation.definition.variable.scheme"],
+ "regex": "(\\*)(\\S*)(\\*)"
+ },
+ {
+ "token" : "constant.numeric", // hex
+ "regex" : "#[xXoObB][0-9a-fA-F]+"
+ },
+ {
+ "token" : "constant.numeric", // float
+ "regex" : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?"
+ },
+ {
+ "token" : keywordMapper,
+ "regex" : "[a-zA-Z_#][a-zA-Z0-9_\\-\\?\\!\\*]*"
+ },
+ {
+ "token" : "string",
+ "regex" : '"(?=.)',
+ "next" : "qqstring"
+ }
+ ],
+ "qqstring": [
+ {
+ "token": "constant.character.escape.scheme",
+ "regex": "\\\\."
+ },
+ {
+ "token" : "string",
+ "regex" : '[^"\\\\]+',
+ "merge" : true
+ }, {
+ "token" : "string",
+ "regex" : "\\\\$",
+ "next" : "qqstring",
+ "merge" : true
+ }, {
+ "token" : "string",
+ "regex" : '"|$',
+ "next" : "start",
+ "merge" : true
+ }
+ ]
+}
+
+};
+
+oop.inherits(SchemeHighlightRules, TextHighlightRules);
+
+exports.SchemeHighlightRules = SchemeHighlightRules;
+});
+
+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;
+});
+
+ace.define("ace/mode/scheme",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scheme_highlight_rules","ace/mode/matching_parens_outdent"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var SchemeHighlightRules = require("./scheme_highlight_rules").SchemeHighlightRules;
+var MatchingParensOutdent = require("./matching_parens_outdent").MatchingParensOutdent;
+
+var Mode = function() {
+ this.HighlightRules = SchemeHighlightRules;
+ this.$outdent = new MatchingParensOutdent();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ";";
+ this.minorIndentFunctions = ["define", "lambda", "define-macro", "define-syntax", "syntax-rules", "define-record-type", "define-structure"];
+
+ this.$toIndent = function(str) {
+ return str.split('').map(function(ch) {
+ if (/\s/.exec(ch)) {
+ return ch;
+ } else {
+ return ' ';
+ }
+ }).join('');
+ };
+
+ this.$calculateIndent = function(line, tab) {
+ var baseIndent = this.$getIndent(line);
+ var delta = 0;
+ var isParen, ch;
+ for (var i = line.length - 1; i >= 0; i--) {
+ ch = line[i];
+ if (ch === '(') {
+ delta--;
+ isParen = true;
+ } else if (ch === '(' || ch === '[' || ch === '{') {
+ delta--;
+ isParen = false;
+ } else if (ch === ')' || ch === ']' || ch === '}') {
+ delta++;
+ }
+ if (delta < 0) {
+ break;
+ }
+ }
+ if (delta < 0 && isParen) {
+ i += 1;
+ var iBefore = i;
+ var fn = '';
+ while (true) {
+ ch = line[i];
+ if (ch === ' ' || ch === '\t') {
+ if(this.minorIndentFunctions.indexOf(fn) !== -1) {
+ return this.$toIndent(line.substring(0, iBefore - 1) + tab);
+ } else {
+ return this.$toIndent(line.substring(0, i + 1));
+ }
+ } else if (ch === undefined) {
+ return this.$toIndent(line.substring(0, iBefore - 1) + tab);
+ }
+ fn += line[i];
+ i++;
+ }
+ } else if(delta < 0 && !isParen) {
+ return this.$toIndent(line.substring(0, i+1));
+ } else if(delta > 0) {
+ baseIndent = baseIndent.substring(0, baseIndent.length - tab.length);
+ return baseIndent;
+ } else {
+ return baseIndent;
+ }
+ };
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$calculateIndent(line, tab);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return this.$outdent.checkOutdent(line, input);
+ };
+
+ this.autoOutdent = function(state, doc, row) {
+ this.$outdent.autoOutdent(doc, row);
+ };
+
+ this.$id = "ace/mode/scheme";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-scss.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-scss.js
new file mode 100644
index 00000000..4785dc36
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-scss.js
@@ -0,0 +1,586 @@
+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-shadow|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|unquote").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(
+ ("aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|" +
+ "blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|" +
+ "chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|" +
+ "darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|" +
+ "darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|" +
+ "darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|" +
+ "darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|" +
+ "dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|" +
+ "ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|" +
+ "hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|" +
+ "lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|" +
+ "lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|" +
+ "lightsalmon|lightseagreen|lightskyblue|lightslategray|" +
+ "lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|" +
+ "magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|" +
+ "mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|" +
+ "mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|" +
+ "moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|" +
+ "orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|" +
+ "papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|" +
+ "red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|" +
+ "seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|" +
+ "springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|" +
+ "wheat|white|whitesmoke|yellow|yellowgreen").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 : ["support.function", "string", "support.function"],
+ regex : "(url\\()(.*)(\\))"
+ }, {
+ 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+"
+ }, {
+ caseInsensitive: true
+ }
+ ],
+ "comment" : [
+ {
+ token : "comment", // closing comment
+ regex : "\\*\\/",
+ next : "start"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "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) {
+"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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = ScssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.$id = "ace/mode/scss";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-sh.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-sh.js
new file mode 100644
index 00000000..6db3e296
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-sh.js
@@ -0,0 +1,441 @@
+ace.define("ace/mode/sh_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 reservedKeywords = exports.reservedKeywords = (
+ '!|{|}|case|do|done|elif|else|'+
+ 'esac|fi|for|if|in|then|until|while|'+
+ '&|;|export|local|read|typeset|unset|'+
+ 'elif|select|set|function|declare|readonly'
+ );
+
+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 + "(?==))";
+
+ var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))";
+
+ var func = "(?:" + variableName + "\\s*\\(\\))";
+
+ this.$rules = {
+ "start" : [{
+ token : "constant",
+ regex : /\\./
+ }, {
+ token : ["text", "comment"],
+ regex : /(^|\s)(#.*)$/
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[$`"\\]|$)/
+ }, {
+ include : "variables"
+ }, {
+ token : "keyword.operator",
+ regex : /`/ // TODO highlight `
+ }, {
+ token : "string.end",
+ regex : '"',
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string",
+ regex : "\\$'",
+ push : [{
+ token : "constant.language.escape",
+ regex : /\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/
+ }, {
+ token : "string",
+ regex : "'",
+ next: "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ regex : "<<<",
+ token : "keyword.operator"
+ }, {
+ stateName: "heredoc",
+ regex : "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)",
+ onMatch : function(value, currentState, stack) {
+ var next = value[2] == '-' ? "indentedHeredoc" : "heredoc";
+ var tokens = value.split(this.splitRegex);
+ stack.push(next, tokens[4]);
+ return [
+ {type:"constant", value: tokens[1]},
+ {type:"text", value: tokens[2]},
+ {type:"string", value: tokens[3]},
+ {type:"support.class", value: tokens[4]},
+ {type:"string", value: tokens[5]}
+ ];
+ },
+ rules: {
+ heredoc: [{
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }],
+ indentedHeredoc: [{
+ token: "string",
+ regex: "^\t+"
+ }, {
+ onMatch: function(value, currentState, stack) {
+ if (value === stack[1]) {
+ stack.shift();
+ stack.shift();
+ this.next = stack[0] || "start";
+ return "support.class";
+ }
+ this.next = "";
+ return "string";
+ },
+ regex: ".*$",
+ next: "start"
+ }]
+ }
+ }, {
+ regex : "$",
+ token : "empty",
+ next : function(currentState, stack) {
+ if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc")
+ return stack[0];
+ return currentState;
+ }
+ }, {
+ token : ["keyword", "text", "text", "text", "variable"],
+ regex : /(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/
+ }, {
+ token : "variable.language",
+ regex : builtinVariable
+ }, {
+ token : "variable",
+ regex : variable
+ }, {
+ include : "variables"
+ }, {
+ token : "support.function",
+ regex : func
+ }, {
+ token : "support.function",
+ regex : fileDescriptor
+ }, {
+ token : "string", // ' string
+ start : "'", end : "'"
+ }, {
+ 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 : "punctuation.operator",
+ regex : ";"
+ }, {
+ token : "paren.lparen",
+ regex : "[\\[\\(\\{]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\]]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\)\\}]",
+ next : "pop"
+ }],
+ variables: [{
+ token : "variable",
+ regex : /(\$)(\w+)/
+ }, {
+ token : ["variable", "paren.lparen"],
+ regex : /(\$)(\()/,
+ push : "start"
+ }, {
+ token : ["variable", "paren.lparen", "keyword.operator", "variable", "keyword.operator"],
+ regex : /(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/,
+ push : "start"
+ }, {
+ token : "variable",
+ regex : /\$[*@#?\-$!0_]/
+ }, {
+ token : ["variable", "paren.lparen"],
+ regex : /(\$)(\{)/,
+ push : "start"
+ }]
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(ShHighlightRules, TextHighlightRules);
+
+exports.ShHighlightRules = ShHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules;
+var Range = require("../range").Range;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+
+var Mode = function() {
+ this.HighlightRules = ShHighlightRules;
+ this.foldingRules = new CStyleFoldMode();
+ this.$behaviour = new CstyleBehaviour();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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.getTokenizer().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));
+ };
+
+ this.$id = "ace/mode/sh";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-sjs.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-sjs.js
new file mode 100644
index 00000000..6bcd0bce
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-sjs.js
@@ -0,0 +1,1006 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/sjs_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var SJSHighlightRules = function() {
+ var parent = new JavaScriptHighlightRules({noES6: true});
+ 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
+ ".)";
+
+ var contextAware = function(f) {
+ f.isContextAware = true;
+ return f;
+ };
+
+ var ctxBegin = function(opts) {
+ return {
+ token: opts.token,
+ regex: opts.regex,
+ next: contextAware(function(currentState, stack) {
+ if (stack.length === 0)
+ stack.unshift(currentState);
+ stack.unshift(opts.next);
+ return opts.next;
+ })
+ };
+ };
+
+ var ctxEnd = function(opts) {
+ return {
+ token: opts.token,
+ regex: opts.regex,
+ next: contextAware(function(currentState, stack) {
+ stack.shift();
+ return stack[0] || "start";
+ })
+ };
+ };
+
+ this.$rules = parent.$rules;
+ this.$rules.no_regex = [
+ {
+ token: "keyword",
+ regex: "(waitfor|or|and|collapse|spawn|retract)\\b"
+ },
+ {
+ token: "keyword.operator",
+ regex: "(->|=>|\\.\\.)"
+ },
+ {
+ token: "variable.language",
+ regex: "(hold|default)\\b"
+ },
+ ctxBegin({
+ token: "string",
+ regex: "`",
+ next: "bstring"
+ }),
+ ctxBegin({
+ token: "string",
+ regex: '"',
+ next: "qqstring"
+ }),
+ ctxBegin({
+ token: "string",
+ regex: '"',
+ next: "qqstring"
+ }),
+ {
+ token: ["paren.lparen", "text", "paren.rparen"],
+ regex: "(\\{)(\\s*)(\\|)",
+ next: "block_arguments"
+ }
+
+ ].concat(this.$rules.no_regex);
+
+ this.$rules.block_arguments = [
+ {
+ token: "paren.rparen",
+ regex: "\\|",
+ next: "no_regex"
+ }
+ ].concat(this.$rules.function_arguments);
+
+ this.$rules.bstring = [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ },
+ {
+ token : "string",
+ regex : "\\\\$",
+ next: "bstring"
+ },
+ ctxBegin({
+ token : "paren.lparen",
+ regex : "\\$\\{",
+ next: "string_interp"
+ }),
+ ctxBegin({
+ token : "paren.lparen",
+ regex : "\\$",
+ next: "bstring_interp_single"
+ }),
+ ctxEnd({
+ token : "string",
+ regex : "`"
+ }),
+ {
+ defaultToken: "string"
+ }
+ ];
+
+ this.$rules.qqstring = [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ },
+ {
+ token : "string",
+ regex : "\\\\$",
+ next: "qqstring"
+ },
+ ctxBegin({
+ token : "paren.lparen",
+ regex : "#\\{",
+ next: "string_interp"
+ }),
+ ctxEnd({
+ token : "string",
+ regex : '"'
+ }),
+ {
+ defaultToken: "string"
+ }
+ ];
+ var embeddableRules = [];
+ for (var i=0; i < this.$rules.no_regex.length; i++) {
+ var rule = this.$rules.no_regex[i];
+ var token = String(rule.token);
+ if (token.indexOf('paren') == -1 && (!rule.next || rule.next.isContextAware)) {
+ embeddableRules.push(rule);
+ }
+ }
+
+ this.$rules.string_interp = [
+ ctxEnd({
+ token: "paren.rparen",
+ regex: "\\}"
+ }),
+ ctxBegin({
+ token: "paren.lparen",
+ regex: '{',
+ next: "string_interp"
+ })
+ ].concat(embeddableRules);
+ this.$rules.bstring_interp_single = [
+ {
+ token: ["identifier", "paren.lparen"],
+ regex: '(\\w+)(\\()',
+ next: 'bstring_interp_single_call'
+ },
+ ctxEnd({
+ token : "identifier",
+ regex : "\\w*"
+ })
+ ];
+ this.$rules.bstring_interp_single_call = [
+ ctxBegin({
+ token: "paren.lparen",
+ regex: "\\(",
+ next: "bstring_interp_single_call"
+ }),
+ ctxEnd({
+ token: "paren.rparen",
+ regex: "\\)"
+ })
+ ].concat(embeddableRules);
+}
+oop.inherits(SJSHighlightRules, TextHighlightRules);
+
+exports.SJSHighlightRules = SJSHighlightRules;
+});
+
+ace.define("ace/mode/sjs",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/sjs_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 JSMode = require("./javascript").Mode;
+var SJSHighlightRules = require("./sjs_highlight_rules").SJSHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = SJSHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, JSMode);
+(function() {
+ this.createWorker = function(session) {
+ return null;
+ }
+ this.$id = "ace/mode/sjs";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-smarty.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-smarty.js
new file mode 100644
index 00000000..448ced33
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-smarty.js
@@ -0,0 +1,2606 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+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(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": {"manifest": 1},
+ "head": {},
+ "title": {},
+ "base": {"href": 1, "target": 1},
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
+ "noscript": {"href": 1},
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
+ "section": {},
+ "nav": {},
+ "article": {"pubdate": 1},
+ "aside": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "header": {},
+ "footer": {},
+ "address": {},
+ "main": {},
+ "p": {},
+ "hr": {},
+ "pre": {},
+ "blockquote": {"cite": 1},
+ "ol": {"start": 1, "reversed": 1},
+ "ul": {},
+ "li": {"value": 1},
+ "dl": {},
+ "dt": {},
+ "dd": {},
+ "figure": {},
+ "figcaption": {},
+ "div": {},
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
+ "em": {},
+ "strong": {},
+ "small": {},
+ "s": {},
+ "cite": {},
+ "q": {"cite": 1},
+ "dfn": {},
+ "abbr": {},
+ "data": {},
+ "time": {"datetime": 1},
+ "code": {},
+ "var": {},
+ "samp": {},
+ "kbd": {},
+ "sub": {},
+ "sup": {},
+ "i": {},
+ "b": {},
+ "u": {},
+ "mark": {},
+ "ruby": {},
+ "rt": {},
+ "rp": {},
+ "bdi": {},
+ "bdo": {},
+ "span": {},
+ "br": {},
+ "wbr": {},
+ "ins": {"cite": 1, "datetime": 1},
+ "del": {"cite": 1, "datetime": 1},
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
+ "param": {"name": 1, "value": 1},
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
+ "source": {"src": 1, "type": 1, "media": 1},
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
+ "canvas": {"width": 1, "height": 1},
+ "map": {"name": 1},
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
+ "svg": {},
+ "math": {},
+ "table": {"summary": 1},
+ "caption": {},
+ "colgroup": {"span": 1},
+ "col": {"span": 1},
+ "tbody": {},
+ "thead": {},
+ "tfoot": {},
+ "tr": {},
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
+ "legend": {},
+ "label": {"form": 1, "for": 1},
+ "input": {
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
+ "datalist": {},
+ "optgroup": {"disabled": 1, "label": 1},
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
+ "output": {"for": 1, "form": 1, "name": 1},
+ "progress": {"value": 1, "max": 1},
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
+ "details": {"open": 1},
+ "summary": {},
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
+ "menu": {"type": 1, "label": 1},
+ "dialog": {"open": 1}
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+function findAttributeName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "attribute-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompletions(state, session, pos, prefix);
+ if (is(token, "attribute-value"))
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/&[a-z]*$/i.test(line))
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ var attributeName = findAttributeName(session, pos);
+
+ if (!tagName)
+ return [];
+ var values = [];
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
+ values = Object.keys(attributeMap[tagName][attributeName]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "attribute value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
+
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "html entity",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/smarty_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var SmartyHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+ var smartyRules = { start:
+ [ { include: '#comments' },
+ { include: '#blocks' } ],
+ '#blocks':
+ [ { token: 'punctuation.section.embedded.begin.smarty',
+ regex: '\\{%?',
+ push:
+ [ { token: 'punctuation.section.embedded.end.smarty',
+ regex: '%?\\}',
+ next: 'pop' },
+ { include: '#strings' },
+ { include: '#variables' },
+ { include: '#lang' },
+ { defaultToken: 'source.smarty' } ] } ],
+ '#comments':
+ [ { token:
+ [ 'punctuation.definition.comment.smarty',
+ 'comment.block.smarty' ],
+ regex: '(\\{%?)(\\*)',
+ push:
+ [ { token: 'comment.block.smarty', regex: '\\*%?\\}', next: 'pop' },
+ { defaultToken: 'comment.block.smarty' } ] } ],
+ '#lang':
+ [ { token: 'keyword.operator.smarty',
+ regex: '(?:!=|!|<=|>=|<|>|===|==|%|&&|\\|\\|)|\\b(?:and|or|eq|neq|ne|gte|gt|ge|lte|lt|le|not|mod)\\b' },
+ { token: 'constant.language.smarty',
+ regex: '\\b(?:TRUE|FALSE|true|false)\\b' },
+ { token: 'keyword.control.smarty',
+ regex: '\\b(?:if|else|elseif|foreach|foreachelse|section|switch|case|break|default)\\b' },
+ { token: 'variable.parameter.smarty', regex: '\\b[a-zA-Z]+=' },
+ { token: 'support.function.built-in.smarty',
+ regex: '\\b(?:capture|config_load|counter|cycle|debug|eval|fetch|include_php|include|insert|literal|math|strip|rdelim|ldelim|assign|constant|block|html_[a-z_]*)\\b' },
+ { token: 'support.function.variable-modifier.smarty',
+ regex: '\\|(?:capitalize|cat|count_characters|count_paragraphs|count_sentences|count_words|date_format|default|escape|indent|lower|nl2br|regex_replace|replace|spacify|string_format|strip_tags|strip|truncate|upper|wordwrap)' } ],
+ '#strings':
+ [ { token: 'punctuation.definition.string.begin.smarty',
+ regex: '\'',
+ push:
+ [ { token: 'punctuation.definition.string.end.smarty',
+ regex: '\'',
+ next: 'pop' },
+ { token: 'constant.character.escape.smarty', regex: '\\\\.' },
+ { defaultToken: 'string.quoted.single.smarty' } ] },
+ { token: 'punctuation.definition.string.begin.smarty',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.smarty',
+ regex: '"',
+ next: 'pop' },
+ { token: 'constant.character.escape.smarty', regex: '\\\\.' },
+ { defaultToken: 'string.quoted.double.smarty' } ] } ],
+ '#variables':
+ [ { token:
+ [ 'punctuation.definition.variable.smarty',
+ 'variable.other.global.smarty' ],
+ regex: '\\b(\\$)(Smarty\\.)' },
+ { token:
+ [ 'punctuation.definition.variable.smarty',
+ 'variable.other.smarty' ],
+ regex: '(\\$)([a-zA-Z_][a-zA-Z0-9_]*)\\b' },
+ { token: [ 'keyword.operator.smarty', 'variable.other.property.smarty' ],
+ regex: '(->)([a-zA-Z_][a-zA-Z0-9_]*)\\b' },
+ { token:
+ [ 'keyword.operator.smarty',
+ 'meta.function-call.object.smarty',
+ 'punctuation.definition.variable.smarty',
+ 'variable.other.smarty',
+ 'punctuation.definition.variable.smarty' ],
+ regex: '(->)([a-zA-Z_][a-zA-Z0-9_]*)(\\()(.*?)(\\))' } ] }
+
+ var smartyStart = smartyRules.start;
+
+ for (var rule in this.$rules) {
+ this.$rules[rule].unshift.apply(this.$rules[rule], smartyStart);
+ }
+
+ Object.keys(smartyRules).forEach(function(x) {
+ if (!this.$rules[x])
+ this.$rules[x] = smartyRules[x];
+ }, this);
+
+ this.normalizeRules();
+};
+
+SmartyHighlightRules.metaData = { fileTypes: [ 'tpl' ],
+ foldingStartMarker: '\\{%?',
+ foldingStopMarker: '%?\\}',
+ name: 'Smarty',
+ scopeName: 'text.html.smarty' }
+
+
+oop.inherits(SmartyHighlightRules, HtmlHighlightRules);
+
+exports.SmartyHighlightRules = SmartyHighlightRules;
+});
+
+ace.define("ace/mode/smarty",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/smarty_highlight_rules"], function(require, exports, module) {
+ "use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var SmartyHighlightRules = require("./smarty_highlight_rules").SmartyHighlightRules;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = SmartyHighlightRules;
+};
+
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+
+ this.$id = "ace/mode/smarty";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-snippets.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-snippets.js
new file mode 100644
index 00000000..a528501f
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-snippets.js
@@ -0,0 +1,199 @@
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/snippets",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var SnippetHighlightRules = function() {
+
+ var builtins = "SELECTION|CURRENT_WORD|SELECTED_TEXT|CURRENT_LINE|LINE_INDEX|" +
+ "LINE_NUMBER|SOFT_TABS|TAB_SIZE|FILENAME|FILEPATH|FULLNAME";
+
+ this.$rules = {
+ "start" : [
+ {token:"constant.language.escape", regex: /\\[\$}`\\]/},
+ {token:"keyword", regex: "\\$(?:TM_)?(?:" + builtins + ")\\b"},
+ {token:"variable", regex: "\\$\\w+"},
+ {onMatch: function(value, state, stack) {
+ if (stack[1])
+ stack[1]++;
+ else
+ stack.unshift(state, 1);
+ return this.tokenName;
+ }, tokenName: "markup.list", regex: "\\${", next: "varDecl"},
+ {onMatch: function(value, state, stack) {
+ if (!stack[1])
+ return "text";
+ stack[1]--;
+ if (!stack[1])
+ stack.splice(0,2);
+ return this.tokenName;
+ }, tokenName: "markup.list", regex: "}"},
+ {token: "doc.comment", regex:/^\${2}-{5,}$/}
+ ],
+ "varDecl" : [
+ {regex: /\d+\b/, token: "constant.numeric"},
+ {token:"keyword", regex: "(?:TM_)?(?:" + builtins + ")\\b"},
+ {token:"variable", regex: "\\w+"},
+ {regex: /:/, token: "punctuation.operator", next: "start"},
+ {regex: /\//, token: "string.regex", next: "regexp"},
+ {regex: "", next: "start"}
+ ],
+ "regexp" : [
+ {regex: /\\./, token: "escape"},
+ {regex: /\[/, token: "regex.start", next: "charClass"},
+ {regex: "/", token: "string.regex", next: "format"},
+ {"token": "string.regex", regex:"."}
+ ],
+ charClass : [
+ {regex: "\\.", token: "escape"},
+ {regex: "\\]", token: "regex.end", next: "regexp"},
+ {"token": "string.regex", regex:"."}
+ ],
+ "format" : [
+ {regex: /\\[ulULE]/, token: "keyword"},
+ {regex: /\$\d+/, token: "variable"},
+ {regex: "/[gim]*:?", token: "string.regex", next: "start"},
+ {"token": "string", regex:"."}
+ ]
+ };
+};
+oop.inherits(SnippetHighlightRules, TextHighlightRules);
+
+exports.SnippetHighlightRules = SnippetHighlightRules;
+
+var SnippetGroupHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {token: "text", regex: "^\\t", next: "sn-start"},
+ {token:"invalid", regex: /^ \s*/},
+ {token:"comment", regex: /^#.*/},
+ {token:"constant.language.escape", regex: "^regex ", next: "regex"},
+ {token:"constant.language.escape", regex: "^(trigger|endTrigger|name|snippet|guard|endGuard|tabTrigger|key)\\b"}
+ ],
+ "regex" : [
+ {token:"text", regex: "\\."},
+ {token:"keyword", regex: "/"},
+ {token:"empty", regex: "$", next: "start"}
+ ]
+ };
+ this.embedRules(SnippetHighlightRules, "sn-", [
+ {token: "text", regex: "^\\t", next: "sn-start"},
+ {onMatch: function(value, state, stack) {
+ stack.splice(stack.length);
+ return this.tokenName;
+ }, tokenName: "text", regex: "^(?!\t)", next: "start"}
+ ])
+
+};
+
+oop.inherits(SnippetGroupHighlightRules, TextHighlightRules);
+
+exports.SnippetGroupHighlightRules = SnippetGroupHighlightRules;
+
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = SnippetGroupHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.$indentWithTabs = true;
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/snippets";
+}).call(Mode.prototype);
+exports.Mode = Mode;
+
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-soy_template.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-soy_template.js
new file mode 100644
index 00000000..df831bb3
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-soy_template.js
@@ -0,0 +1,2819 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+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(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": {"manifest": 1},
+ "head": {},
+ "title": {},
+ "base": {"href": 1, "target": 1},
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
+ "noscript": {"href": 1},
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
+ "section": {},
+ "nav": {},
+ "article": {"pubdate": 1},
+ "aside": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "header": {},
+ "footer": {},
+ "address": {},
+ "main": {},
+ "p": {},
+ "hr": {},
+ "pre": {},
+ "blockquote": {"cite": 1},
+ "ol": {"start": 1, "reversed": 1},
+ "ul": {},
+ "li": {"value": 1},
+ "dl": {},
+ "dt": {},
+ "dd": {},
+ "figure": {},
+ "figcaption": {},
+ "div": {},
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
+ "em": {},
+ "strong": {},
+ "small": {},
+ "s": {},
+ "cite": {},
+ "q": {"cite": 1},
+ "dfn": {},
+ "abbr": {},
+ "data": {},
+ "time": {"datetime": 1},
+ "code": {},
+ "var": {},
+ "samp": {},
+ "kbd": {},
+ "sub": {},
+ "sup": {},
+ "i": {},
+ "b": {},
+ "u": {},
+ "mark": {},
+ "ruby": {},
+ "rt": {},
+ "rp": {},
+ "bdi": {},
+ "bdo": {},
+ "span": {},
+ "br": {},
+ "wbr": {},
+ "ins": {"cite": 1, "datetime": 1},
+ "del": {"cite": 1, "datetime": 1},
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
+ "param": {"name": 1, "value": 1},
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
+ "source": {"src": 1, "type": 1, "media": 1},
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
+ "canvas": {"width": 1, "height": 1},
+ "map": {"name": 1},
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
+ "svg": {},
+ "math": {},
+ "table": {"summary": 1},
+ "caption": {},
+ "colgroup": {"span": 1},
+ "col": {"span": 1},
+ "tbody": {},
+ "thead": {},
+ "tfoot": {},
+ "tr": {},
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
+ "legend": {},
+ "label": {"form": 1, "for": 1},
+ "input": {
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
+ "datalist": {},
+ "optgroup": {"disabled": 1, "label": 1},
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
+ "output": {"for": 1, "form": 1, "name": 1},
+ "progress": {"value": 1, "max": 1},
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
+ "details": {"open": 1},
+ "summary": {},
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
+ "menu": {"type": 1, "label": 1},
+ "dialog": {"open": 1}
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+function findAttributeName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "attribute-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompletions(state, session, pos, prefix);
+ if (is(token, "attribute-value"))
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/&[a-z]*$/i.test(line))
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ var attributeName = findAttributeName(session, pos);
+
+ if (!tagName)
+ return [];
+ var values = [];
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
+ values = Object.keys(attributeMap[tagName][attributeName]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "attribute value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
+
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "html entity",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/soy_template_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var SoyTemplateHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var soyRules = { start:
+ [ { include: '#template' },
+ { include: '#if' },
+ { include: '#comment-line' },
+ { include: '#comment-block' },
+ { include: '#comment-doc' },
+ { include: '#call' },
+ { include: '#css' },
+ { include: '#param' },
+ { include: '#print' },
+ { include: '#msg' },
+ { include: '#for' },
+ { include: '#foreach' },
+ { include: '#switch' },
+ { include: '#tag' },
+ { include: 'text.html.basic' } ],
+ '#call':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.call.soy' ],
+ regex: '(\\{/?)(\\s*)(?=call|delcall)',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#string-quoted-single' },
+ { include: '#string-quoted-double' },
+ { token: ['entity.name.tag.soy', 'variable.parameter.soy'],
+ regex: '(call|delcall)(\\s+[\\.\\w]+)'},
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy' ],
+ regex: '\\b(data)(\\s*)(=)' },
+ { defaultToken: 'meta.tag.call.soy' } ] } ],
+ '#comment-line':
+ [ { token:
+ [ 'comment.line.double-slash.soy',
+ 'comment.line.double-slash.soy' ],
+ regex: '(//)(.*$)' } ],
+ '#comment-block':
+ [ { token: 'punctuation.definition.comment.begin.soy',
+ regex: '/\\*(?!\\*)',
+ push:
+ [ { token: 'punctuation.definition.comment.end.soy',
+ regex: '\\*/',
+ next: 'pop' },
+ { defaultToken: 'comment.block.soy' } ] } ],
+ '#comment-doc':
+ [ { token: 'punctuation.definition.comment.begin.soy',
+ regex: '/\\*\\*(?!/)',
+ push:
+ [ { token: 'punctuation.definition.comment.end.soy',
+ regex: '\\*/',
+ next: 'pop' },
+ { token: [ 'support.type.soy', 'text', 'variable.parameter.soy' ],
+ regex: '(@param|@param\\?)(\\s+)(\\w+)' },
+ { defaultToken: 'comment.block.documentation.soy' } ] } ],
+ '#css':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.css.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(css)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { token: 'support.constant.soy',
+ regex: '\\b(?:LITERAL|REFERENCE|BACKEND_SPECIFIC|GOOG)\\b' },
+ { defaultToken: 'meta.tag.css.soy' } ] } ],
+ '#for':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.for.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(for)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { token: 'keyword.operator.soy', regex: '\\bin\\b' },
+ { token: 'support.function.soy', regex: '\\brange\\b' },
+ { include: '#variable' },
+ { include: '#number' },
+ { include: '#primitive' },
+ { defaultToken: 'meta.tag.for.soy' } ] } ],
+ '#foreach':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.foreach.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(foreach)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { token: 'keyword.operator.soy', regex: '\\bin\\b' },
+ { include: '#variable' },
+ { defaultToken: 'meta.tag.foreach.soy' } ] } ],
+ '#function':
+ [ { token: 'support.function.soy',
+ regex: '\\b(?:isFirst|isLast|index|hasData|length|keys|round|floor|ceiling|min|max|randomInt)\\b' } ],
+ '#if':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.if.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(if|elseif)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#variable' },
+ { include: '#operator' },
+ { include: '#function' },
+ { include: '#string-quoted-single' },
+ { include: '#string-quoted-double' },
+ { defaultToken: 'meta.tag.if.soy' } ] } ],
+ '#namespace':
+ [ { token: [ 'entity.name.tag.soy', 'text', 'variable.parameter.soy' ],
+ regex: '(namespace|delpackage)(\\s+)([\\w\\.]+)' } ],
+ '#number': [ { token: 'constant.numeric', regex: '[\\d]+' } ],
+ '#operator':
+ [ { token: 'keyword.operator.soy',
+ regex: '==|!=|\\band\\b|\\bor\\b|\\bnot\\b|-|\\+|/|\\?:' } ],
+ '#param':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.param.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(param)',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#variable' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy' ],
+ regex: '\\b([\\w]+)(\\s*)((?::)?)' },
+ { defaultToken: 'meta.tag.param.soy' } ] } ],
+ '#primitive':
+ [ { token: 'constant.language.soy',
+ regex: '\\b(?:null|false|true)\\b' } ],
+ '#msg':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.msg.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(msg)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#string-quoted-single' },
+ { include: '#string-quoted-double' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy' ],
+ regex: '\\b(meaning|desc)(\\s*)(=)' },
+ { defaultToken: 'meta.tag.msg.soy' } ] } ],
+ '#print':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.print.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(print)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#variable' },
+ { include: '#print-parameter' },
+ { include: '#number' },
+ { include: '#primitive' },
+ { include: '#attribute-lookup' },
+ { defaultToken: 'meta.tag.print.soy' } ] } ],
+ '#print-parameter':
+ [ { token: 'keyword.operator.soy', regex: '\\|' },
+ { token: 'variable.parameter.soy',
+ regex: 'noAutoescape|id|escapeHtml|escapeJs|insertWorkBreaks|truncate' } ],
+ '#special-character':
+ [ { token: 'support.constant.soy',
+ regex: '\\bsp\\b|\\bnil\\b|\\\\r|\\\\n|\\\\t|\\blb\\b|\\brb\\b' } ],
+ '#string-quoted-double': [ { token: 'string.quoted.double', regex: '"[^"]*"' } ],
+ '#string-quoted-single': [ { token: 'string.quoted.single', regex: '\'[^\']*\'' } ],
+ '#switch':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.switch.soy',
+ 'entity.name.tag.soy' ],
+ regex: '(\\{/?)(\\s*)(switch|case)\\b',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#variable' },
+ { include: '#function' },
+ { include: '#number' },
+ { include: '#string-quoted-single' },
+ { include: '#string-quoted-double' },
+ { defaultToken: 'meta.tag.switch.soy' } ] } ],
+ '#attribute-lookup':
+ [ { token: 'punctuation.definition.attribute-lookup.begin.soy',
+ regex: '\\[',
+ push:
+ [ { token: 'punctuation.definition.attribute-lookup.end.soy',
+ regex: '\\]',
+ next: 'pop' },
+ { include: '#variable' },
+ { include: '#function' },
+ { include: '#operator' },
+ { include: '#number' },
+ { include: '#primitive' },
+ { include: '#string-quoted-single' },
+ { include: '#string-quoted-double' } ] } ],
+ '#tag':
+ [ { token: 'punctuation.definition.tag.begin.soy',
+ regex: '\\{',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { include: '#namespace' },
+ { include: '#variable' },
+ { include: '#special-character' },
+ { include: '#tag-simple' },
+ { include: '#function' },
+ { include: '#operator' },
+ { include: '#attribute-lookup' },
+ { include: '#number' },
+ { include: '#primitive' },
+ { include: '#print-parameter' } ] } ],
+ '#tag-simple':
+ [ { token: 'entity.name.tag.soy',
+ regex: '{{\\s*(?:literal|else|ifempty|default)\\s*(?=\\})'} ],
+ '#template':
+ [ { token:
+ [ 'punctuation.definition.tag.begin.soy',
+ 'meta.tag.template.soy' ],
+ regex: '(\\{/?)(\\s*)(?=template|deltemplate)',
+ push:
+ [ { token: 'punctuation.definition.tag.end.soy',
+ regex: '\\}',
+ next: 'pop' },
+ { token: ['entity.name.tag.soy', 'text', 'entity.name.function.soy' ],
+ regex: '(template|deltemplate)(\\s+)([\\.\\w]+)',
+ originalRegex: '(?<=template|deltemplate)\\s+([\\.\\w]+)' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy',
+ 'text',
+ 'string.quoted.double.soy' ],
+ regex: '\\b(private)(\\s*)(=)(\\s*)("true"|"false")' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy',
+ 'text',
+ 'string.quoted.single.soy' ],
+ regex: '\\b(private)(\\s*)(=)(\\s*)(\'true\'|\'false\')' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy',
+ 'text',
+ 'string.quoted.double.soy' ],
+ regex: '\\b(autoescape)(\\s*)(=)(\\s*)("true"|"false"|"contextual")' },
+ { token:
+ [ 'entity.other.attribute-name.soy',
+ 'text',
+ 'keyword.operator.soy',
+ 'text',
+ 'string.quoted.single.soy' ],
+ regex: '\\b(autoescape)(\\s*)(=)(\\s*)(\'true\'|\'false\'|\'contextual\')' },
+ { defaultToken: 'meta.tag.template.soy' } ] } ],
+ '#variable': [ { token: 'variable.other.soy', regex: '\\$[\\w\\.]+' } ] }
+
+
+ for (var i in soyRules) {
+ if (this.$rules[i]) {
+ this.$rules[i].unshift.apply(this.$rules[i], soyRules[i]);
+ } else {
+ this.$rules[i] = soyRules[i];
+ }
+ }
+
+ this.normalizeRules();
+};
+
+SoyTemplateHighlightRules.metaData = { comment: 'SoyTemplate',
+ fileTypes: [ 'soy' ],
+ firstLineMatch: '\\{\\s*namespace\\b',
+ foldingStartMarker: '\\{\\s*template\\s+[^\\}]*\\}',
+ foldingStopMarker: '\\{\\s*/\\s*template\\s*\\}',
+ name: 'SoyTemplate',
+ scopeName: 'source.soy' }
+
+
+oop.inherits(SoyTemplateHighlightRules, HtmlHighlightRules);
+
+exports.SoyTemplateHighlightRules = SoyTemplateHighlightRules;
+});
+
+ace.define("ace/mode/soy_template",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/soy_template_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var SoyTemplateHighlightRules = require("./soy_template_highlight_rules").SoyTemplateHighlightRules;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = SoyTemplateHighlightRules;
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$id = "ace/mode/soy_template";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-space.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-space.js
new file mode 100644
index 00000000..5bbeb482
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-space.js
@@ -0,0 +1,160 @@
+ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/space_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 SpaceHighlightRules = function() {
+ this.$rules = {
+ "start" : [
+ {
+ token : "empty_line",
+ regex : / */,
+ next : "key"
+ },
+ {
+ token : "empty_line",
+ regex : /$/,
+ next : "key"
+ }
+ ],
+ "key" : [
+ {
+ token : "variable",
+ regex : /\S+/
+ },
+ {
+ token : "empty_line",
+ regex : /$/,
+ next : "start"
+ },{
+ token : "keyword.operator",
+ regex : / /,
+ next : "value"
+ }
+ ],
+ "value" : [
+ {
+ token : "keyword.operator",
+ regex : /$/,
+ next : "start"
+ },
+ {
+ token : "string",
+ regex : /[^$]/
+ }
+ ]
+ };
+
+};
+
+oop.inherits(SpaceHighlightRules, TextHighlightRules);
+
+exports.SpaceHighlightRules = SpaceHighlightRules;
+});
+
+ace.define("ace/mode/space",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/folding/coffee","ace/mode/space_highlight_rules"], function(require, exports, module) {
+"use strict";
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var FoldMode = require("./folding/coffee").FoldMode;
+var SpaceHighlightRules = require("./space_highlight_rules").SpaceHighlightRules;
+var Mode = function() {
+ this.HighlightRules = SpaceHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+(function() {
+
+ this.$id = "ace/mode/space";
+}).call(Mode.prototype);
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-sparql.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-sparql.js
new file mode 100644
index 00000000..e5a58542
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-sparql.js
@@ -0,0 +1,313 @@
+ace.define("ace/mode/sparql_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 SPARQLHighlightRules = function() {
+
+ this.$rules = {
+ start: [{
+ include: "#comments"
+ }, {
+ include: "#strings"
+ }, {
+ include: "#string-language-suffixes"
+ }, {
+ include: "#string-datatype-suffixes"
+ }, {
+ include: "#logic-operators"
+ }, {
+ include: "#relative-urls"
+ }, {
+ include: "#xml-schema-types"
+ }, {
+ include: "#rdf-schema-types"
+ }, {
+ include: "#owl-types"
+ }, {
+ include: "#qnames"
+ }, {
+ include: "#keywords"
+ }, {
+ include: "#built-in-functions"
+ }, {
+ include: "#variables"
+ }, {
+ include: "#boolean-literal"
+ }, {
+ include: "#punctuation-operators"
+ }],
+ "#boolean-literal": [{
+ token: "constant.language.boolean.sparql",
+ regex: /true|false/
+ }],
+ "#built-in-functions": [{
+ token: "support.function.sparql",
+ regex: /[Aa][Bb][Ss]|[Aa][Vv][Gg]|[Bb][Nn][Oo][Dd][Ee]|[Bb][Oo][Uu][Nn][Dd]|[Cc][Ee][Ii][Ll]|[Cc][Oo][Aa][Ll][Ee][Ss][Cc][Ee]|[Cc][Oo][Nn][Cc][Aa][Tt]|[Cc][Oo][Nn][Tt][Aa][Ii][Nn][Ss]|[Cc][Oo][Uu][Nn][Tt]|[Dd][Aa][Tt][Aa][Tt][Yy][Pp][Ee]|[Dd][Aa][Yy]|[Ee][Nn][Cc][Oo][Dd][Ee]_[Ff][Oo][Rr]_[Uu][Rr][Ii]|[Ee][Xx][Ii][Ss][Tt][Ss]|[Ff][Ll][Oo][Oo][Rr]|[Gg][Rr][Oo][Uu][Pp]_[Cc][Oo][Nn][Cc][Aa][Tt]|[Hh][Oo][Uu][Rr][Ss]|[Ii][Ff]|[Ii][Rr][Ii]|[Ii][Ss][Bb][Ll][Aa][Nn][Kk]|[Ii][Ss][Ii][Rr][Ii]|[Ii][Ss][Ll][Ii][Tt][Ee][Rr][Aa][Ll]|[Ii][Ss][Nn][Uu][Mm][Ee][Rr][Ii][Cc]|[Ii][Ss][Uu][Rr][Ii]|[Ll][Aa][Nn][Gg]|[Ll][Aa][Nn][Gg][Mm][Aa][Tt][Cc][Hh][Ee][Ss]|[Ll][Cc][Aa][Ss][Ee]|[Mm][Aa][Xx]|[Mm][Dd]5|[Mm][Ii][Nn]|[Mm][Ii][Nn][Uu][Tt][Ee][Ss]|[Mm][Oo][Nn][Tt][Hh]|[Nn][Oo][Ww]|[Rr][Aa][Nn][Dd]|[Rr][Ee][Gg][Ee][Xx]|[Rr][Ee][Pp][Ll][Aa][Cc][Ee]|[Rr][Oo][Uu][Nn][Dd]|[Ss][Aa][Mm][Ee][Tt][Ee][Rr][Mm]|[Ss][Aa][Mm][Pp][Ll][Ee]|[Ss][Ee][Cc][Oo][Nn][Dd][Ss]|[Ss][Ee][Pp][Aa][Rr][Aa][Tt][Oo][Rr]|[Ss][Hh][Aa](?:1|256|384|512)|[Ss][Tt][Rr]|[Ss][Tt][Rr][Aa][Ff][Tt][Ee][Rr]|[Ss][Tt][Rr][Bb][Ee][Ff][Oo][Rr][Ee]|[Ss][Tt][Rr][Dd][Tt]|[Ss][Tt][Rr][Ee][Nn][Dd][Ss]|[Ss][Tt][Rr][Ll][Aa][Nn][Gg]|[Ss][Tt][Rr][Ll][Ee][Nn]|[Ss][Tt][Rr][Ss][Tt][Aa][Rr][Tt][Ss]|[Ss][Tt][Rr][Uu][Uu][Ii][Dd]|[Ss][Uu][Bb][Ss][Tt][Rr]|[Ss][Uu][Mm]|[Tt][Ii][Mm][Ee][Zz][Oo][Nn][Ee]|[Tt][Zz]|[Uu][Cc][Aa][Ss][Ee]|[Uu][Rr][Ii]|[Uu][Uu][Ii][Dd]|[Yy][Ee][Aa][Rr]/
+ }],
+ "#comments": [{
+ token: [
+ "punctuation.definition.comment.sparql",
+ "comment.line.hash.sparql"
+ ],
+ regex: /(#)(.*$)/
+ }],
+ "#keywords": [{
+ token: "keyword.other.sparql",
+ regex: /[Aa][Dd][Dd]|[Aa][Ll][Ll]|[Aa][Ss]|[As][Ss][Cc]|[Aa][Ss][Kk]|[Bb][Aa][Ss][Ee]|[Bb][Ii][Nn][Dd]|[Bb][Yy]|[Cc][Ll][Ee][Aa][Rr]|[Cc][Oo][Nn][Ss][Tt][Rr][Uu][Cc][Tt]|[Cc][Oo][Pp][Yy]|[Cc][Rr][Ee][Aa][Tt][Ee]|[Dd][Aa][Tt][Aa]|[Dd][Ee][Ff][Aa][Uu][Ll][Tt]|[Dd][Ee][Ll][Ee][Tt][Ee]|[Dd][Ee][Sc][Cc]|[Dd][Ee][Ss][Cc][Rr][Ii][Bb][Ee]|[Dd][Ii][Ss][Tt][Ii][Nn][Cc][Tt]|[Dd][Rr][Oo][Pp]|[Ff][Ii][Ll][Tt][Ee][Rr]|[Ff][Rr][Oo][Mm]|[Gg][Rr][Aa][Pp][Hh]|[Gg][Rr][Oo][Uu][Pp]|[Hh][Aa][Vv][Ii][Nn][Gg]|[Ii][Nn][Ss][Ee][Rr][Tt]|[Ll][Ii][Mm][Ii][Tt]|[Ll][Oo][Aa][Dd]|[Mm][Ii][Nn][Uu][Ss]|[Mm][Oo][Vv][Ee]|[Nn][Aa][Mm][Ee][Dd]|[Oo][Ff][Ff][Ss][Ee][Tt]|[Oo][Pp][Tt][Ii][Oo][Nn][Aa][Ll]|[Oo][Rr][Dd][Ee][Rr]|[Pp][Rr][Ee][Ff][Ii][Xx]|[Rr][Ee][Dd][Uu][Cc][Ee][Dd]|[Ss][Ee][Ll][Ee][Cc][Tt]|[Ss][Ee][Pp][Aa][Rr][Aa][Tt][Oo][Rr]|[Ss][Ee][Rr][Vv][Ii][Cc][Ee]|[Ss][Ii][Ll][Ee][Nn][Tt]|[Tt][Oo]|[Uu][Nn][Dd][Ee][Ff]|[Uu][Nn][Ii][Oo][Nn]|[Uu][Ss][Ii][Nn][Gg]|[Vv][Aa][Ll][Uu][Ee][Ss]|[Ww][He][Ee][Rr][Ee]|[Ww][Ii][Tt][Hh]/
+ }],
+ "#logic-operators": [{
+ token: "keyword.operator.logical.sparql",
+ regex: /\|\||&&|=|!=|<|>|<=|>=|(?:^|!?\s)IN(?:!?\s|$)|(?:^|!?\s)NOT(?:!?\s|$)|-|\+|\*|\/|\!/
+ }],
+ "#owl-types": [{
+ token: "support.type.datatype.owl.sparql",
+ regex: /owl:[a-zA-Z]+/
+ }],
+ "#punctuation-operators": [{
+ token: "keyword.operator.punctuation.sparql",
+ regex: /;|,|\.|\(|\)|\{|\}|\|/
+ }],
+ "#qnames": [{
+ token: "entity.name.other.qname.sparql",
+ regex: /(?:[a-zA-Z][-_a-zA-Z0-9]*)?:(?:[_a-zA-Z][-_a-zA-Z0-9]*)?/
+ }],
+ "#rdf-schema-types": [{
+ token: "support.type.datatype.rdf.schema.sparql",
+ regex: /rdfs?:[a-zA-Z]+|(?:^|\s)a(?:\s|$)/
+ }],
+ "#relative-urls": [{
+ token: "string.quoted.other.relative.url.sparql",
+ regex: /</,
+ push: [{
+ token: "string.quoted.other.relative.url.sparql",
+ regex: />/,
+ next: "pop"
+ }, {
+ defaultToken: "string.quoted.other.relative.url.sparql"
+ }]
+ }],
+ "#string-datatype-suffixes": [{
+ token: "keyword.operator.datatype.suffix.sparql",
+ regex: /\^\^/
+ }],
+ "#string-language-suffixes": [{
+ token: [
+ "keyword.operator.language.suffix.sparql",
+ "constant.language.suffix.sparql"
+ ],
+ regex: /(?!")(@)([a-z]+(?:\-[a-z0-9]+)*)/
+ }],
+ "#strings": [{
+ token: "string.quoted.triple.sparql",
+ regex: /"""/,
+ push: [{
+ token: "string.quoted.triple.sparql",
+ regex: /"""/,
+ next: "pop"
+ }, {
+ defaultToken: "string.quoted.triple.sparql"
+ }]
+ }, {
+ token: "string.quoted.double.sparql",
+ regex: /"/,
+ push: [{
+ token: "string.quoted.double.sparql",
+ regex: /"/,
+ next: "pop"
+ }, {
+ token: "invalid.string.newline",
+ regex: /$/
+ }, {
+ token: "constant.character.escape.sparql",
+ regex: /\\./
+ }, {
+ defaultToken: "string.quoted.double.sparql"
+ }]
+ }],
+ "#variables": [{
+ token: "variable.other.sparql",
+ regex: /(?:\?|\$)[-_a-zA-Z0-9]+/
+ }],
+ "#xml-schema-types": [{
+ token: "support.type.datatype.schema.sparql",
+ regex: /xsd?:[a-z][a-zA-Z]+/
+ }]
+ }
+
+ this.normalizeRules();
+};
+
+SPARQLHighlightRules.metaData = {
+ fileTypes: ["rq", "sparql"],
+ name: "SPARQL",
+ scopeName: "source.sparql"
+}
+
+
+oop.inherits(SPARQLHighlightRules, TextHighlightRules);
+
+exports.SPARQLHighlightRules = SPARQLHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/sparql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sparql_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var SPARQLHighlightRules = require("./sparql_highlight_rules").SPARQLHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = SPARQLHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.$id = "ace/mode/sparql"
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-sql.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-sql.js
new file mode 100644
index 00000000..9678787a
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-sql.js
@@ -0,0 +1,103 @@
+ace.define("ace/mode/sql_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 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|union|create|table|primary|key|if|" +
+ "foreign|not|references|default|null|inner|cross|natural|database|drop|grant"
+ );
+
+ var builtinConstants = (
+ "true|false"
+ );
+
+ var builtinFunctions = (
+ "avg|count|first|last|max|min|sum|ucase|lcase|mid|len|round|rank|now|format|" +
+ "coalesce|ifnull|isnull|nvl"
+ );
+
+ var dataTypes = (
+ "int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|" +
+ "money|real|number|integer"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtinFunctions,
+ "keyword": keywords,
+ "constant.language": builtinConstants,
+ "storage.type": dataTypes
+ }, "identifier", true);
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "--.*$"
+ }, {
+ token : "comment",
+ start : "/\\*",
+ end : "\\*/"
+ }, {
+ token : "string", // " string
+ regex : '".*?"'
+ }, {
+ token : "string", // ' string
+ regex : "'.*?'"
+ }, {
+ token : "string", // ` string (apache drill)
+ 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+"
+ } ]
+ };
+ this.normalizeRules();
+};
+
+oop.inherits(SqlHighlightRules, TextHighlightRules);
+
+exports.SqlHighlightRules = SqlHighlightRules;
+});
+
+ace.define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var SqlHighlightRules = require("./sql_highlight_rules").SqlHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = SqlHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+
+ this.$id = "ace/mode/sql";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-sqlserver.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-sqlserver.js
new file mode 100644
index 00000000..59e9b907
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-sqlserver.js
@@ -0,0 +1,437 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/sqlserver_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var SqlServerHighlightRules = function() {
+ var logicalOperators = "ALL|AND|ANY|BETWEEN|EXISTS|IN|LIKE|NOT|OR|SOME";
+ logicalOperators += "|NULL|IS|APPLY|INNER|OUTER|LEFT|RIGHT|JOIN|CROSS"; //SSMS colors these gray too
+
+
+ var builtinFunctions = (
+ "OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|" +
+ "AVG|CHECKSUM_AGG|COUNT|COUNT_BIG|GROUPING|GROUPING_ID|MAX|MIN|STDEV|STDEVP|SUM|VAR|VARP|" +
+ "DENSE_RANK|NTILE|RANK|ROW_NUMBER" +
+ "@@DATEFIRST|@@DBTS|@@LANGID|@@LANGUAGE|@@LOCK_TIMEOUT|@@MAX_CONNECTIONS|@@MAX_PRECISION|@@NESTLEVEL|@@OPTIONS|@@REMSERVER|@@SERVERNAME|@@SERVICENAME|@@SPID|@@TEXTSIZE|@@VERSION|" +
+ "CAST|CONVERT|PARSE|TRY_CAST|TRY_CONVERT|TRY_PARSE" +
+ "@@CURSOR_ROWS|@@FETCH_STATUS|CURSOR_STATUS|" +
+ "@@DATEFIRST|@@LANGUAGE|CURRENT_TIMESTAMP|DATEADD|DATEDIFF|DATEFROMPARTS|DATENAME|DATEPART|DATETIME2FROMPARTS|DATETIMEFROMPARTS|DATETIMEOFFSETFROMPARTS|DAY|EOMONTH|GETDATE|GETUTCDATE|ISDATE|MONTH|SET DATEFIRST|SET DATEFORMAT|SET LANGUAGE|SMALLDATETIMEFROMPARTS|SP_HELPLANGUAGE|SWITCHOFFSET|SYSDATETIME|SYSDATETIMEOFFSET|SYSUTCDATETIME|TIMEFROMPARTS|TODATETIMEOFFSET|YEAR|" +
+ "CHOOSE|IIF|" +
+ "ABS|ACOS|ASIN|ATAN|ATN2|CEILING|COS|COT|DEGREES|EXP|FLOOR|LOG|LOG10|PI|POWER|RADIANS|RAND|ROUND|SIGN|SIN|SQRT|SQUARE|TAN|" +
+ "@@PROCID|APPLOCK_MODE|APPLOCK_TEST|APP_NAME|ASSEMBLYPROPERTY|COLUMNPROPERTY|COL_LENGTH|COL_NAME|DATABASEPROPERTYEX|DATABASE_PRINCIPAL_ID|DB_ID|DB_NAME|FILEGROUPPROPERTY|FILEGROUP_ID|FILEGROUP_NAME|FILEPROPERTY|FILE_ID|FILE_IDEX|FILE_NAME|FULLTEXTCATALOGPROPERTY|FULLTEXTSERVICEPROPERTY|INDEXKEY_PROPERTY|INDEXPROPERTY|INDEX_COL|OBJECTPROPERTY|OBJECTPROPERTYEX|OBJECT_DEFINITION|OBJECT_ID|OBJECT_NAME|OBJECT_SCHEMA_NAME|ORIGINAL_DB_NAME|PARSENAME|SCHEMA_ID|SCHEMA_NAME|SCOPE_IDENTITY|SERVERPROPERTY|STATS_DATE|TYPEPROPERTY|TYPE_ID|TYPE_NAME|" +
+ "CERTENCODED|CERTPRIVATEKEY|CURRENT_USER|DATABASE_PRINCIPAL_ID|HAS_PERMS_BY_NAME|IS_MEMBER|IS_ROLEMEMBER|IS_SRVROLEMEMBER|ORIGINAL_LOGIN|PERMISSIONS|PWDCOMPARE|PWDENCRYPT|SCHEMA_ID|SCHEMA_NAME|SESSION_USER|SUSER_ID|SUSER_NAME|SUSER_SID|SUSER_SNAME|SYS.FN_BUILTIN_PERMISSIONS|SYS.FN_GET_AUDIT_FILE|SYS.FN_MY_PERMISSIONS|SYSTEM_USER|USER_ID|USER_NAME|" +
+ "ASCII|CHAR|CHARINDEX|CONCAT|DIFFERENCE|FORMAT|LEN|LOWER|LTRIM|NCHAR|PATINDEX|QUOTENAME|REPLACE|REPLICATE|REVERSE|RTRIM|SOUNDEX|SPACE|STR|STUFF|SUBSTRING|UNICODE|UPPER|" +
+ "$PARTITION|@@ERROR|@@IDENTITY|@@PACK_RECEIVED|@@ROWCOUNT|@@TRANCOUNT|BINARY_CHECKSUM|CHECKSUM|CONNECTIONPROPERTY|CONTEXT_INFO|CURRENT_REQUEST_ID|ERROR_LINE|ERROR_MESSAGE|ERROR_NUMBER|ERROR_PROCEDURE|ERROR_SEVERITY|ERROR_STATE|FORMATMESSAGE|GETANSINULL|GET_FILESTREAM_TRANSACTION_CONTEXT|HOST_ID|HOST_NAME|ISNULL|ISNUMERIC|MIN_ACTIVE_ROWVERSION|NEWID|NEWSEQUENTIALID|ROWCOUNT_BIG|XACT_STATE|" +
+ "@@CONNECTIONS|@@CPU_BUSY|@@IDLE|@@IO_BUSY|@@PACKET_ERRORS|@@PACK_RECEIVED|@@PACK_SENT|@@TIMETICKS|@@TOTAL_ERRORS|@@TOTAL_READ|@@TOTAL_WRITE|FN_VIRTUALFILESTATS|" +
+ "PATINDEX|TEXTPTR|TEXTVALID|" +
+ "COALESCE|NULLIF"
+ );
+ var dataTypes = ("BIGINT|BINARY|BIT|CHAR|CURSOR|DATE|DATETIME|DATETIME2|DATETIMEOFFSET|DECIMAL|FLOAT|HIERARCHYID|IMAGE|INTEGER|INT|MONEY|NCHAR|NTEXT|NUMERIC|NVARCHAR|REAL|SMALLDATETIME|SMALLINT|SMALLMONEY|SQL_VARIANT|TABLE|TEXT|TIME|TIMESTAMP|TINYINT|UNIQUEIDENTIFIER|VARBINARY|VARCHAR|XML");
+ var builtInStoredProcedures = "sp_addextendedproc|sp_addextendedproperty|sp_addmessage|sp_addtype|sp_addumpdevice|sp_add_data_file_recover_suspect_db|sp_add_log_file_recover_suspect_db|sp_altermessage|sp_attach_db|sp_attach_single_file_db|sp_autostats|sp_bindefault|sp_bindrule|sp_bindsession|sp_certify_removable|sp_clean_db_file_free_space|sp_clean_db_free_space|sp_configure|sp_control_plan_guide|sp_createstats|sp_create_plan_guide|sp_create_plan_guide_from_handle|sp_create_removable|sp_cycle_errorlog|sp_datatype_info|sp_dbcmptlevel|sp_dbmmonitoraddmonitoring|sp_dbmmonitorchangealert|sp_dbmmonitorchangemonitoring|sp_dbmmonitordropalert|sp_dbmmonitordropmonitoring|sp_dbmmonitorhelpalert|sp_dbmmonitorhelpmonitoring|sp_dbmmonitorresults|sp_db_increased_partitions|sp_delete_backuphistory|sp_depends|sp_describe_first_result_set|sp_describe_undeclared_parameters|sp_detach_db|sp_dropdevice|sp_dropextendedproc|sp_dropextendedproperty|sp_dropmessage|sp_droptype|sp_execute|sp_executesql|sp_getapplock|sp_getbindtoken|sp_help|sp_helpconstraint|sp_helpdb|sp_helpdevice|sp_helpextendedproc|sp_helpfile|sp_helpfilegroup|sp_helpindex|sp_helplanguage|sp_helpserver|sp_helpsort|sp_helpstats|sp_helptext|sp_helptrigger|sp_indexoption|sp_invalidate_textptr|sp_lock|sp_monitor|sp_prepare|sp_prepexec|sp_prepexecrpc|sp_procoption|sp_recompile|sp_refreshview|sp_releaseapplock|sp_rename|sp_renamedb|sp_resetstatus|sp_sequence_get_range|sp_serveroption|sp_setnetname|sp_settriggerorder|sp_spaceused|sp_tableoption|sp_unbindefault|sp_unbindrule|sp_unprepare|sp_updateextendedproperty|sp_updatestats|sp_validname|sp_who|sys.sp_merge_xtp_checkpoint_files|sys.sp_xtp_bind_db_resource_pool|sys.sp_xtp_checkpoint_force_garbage_collection|sys.sp_xtp_control_proc_exec_stats|sys.sp_xtp_control_query_exec_stats|sys.sp_xtp_unbind_db_resource_pool";
+ var keywords = "ABSOLUTE|ACTION|ADA|ADD|ADMIN|AFTER|AGGREGATE|ALIAS|ALL|ALLOCATE|ALTER|AND|ANY|ARE|ARRAY|AS|ASC|ASENSITIVE|ASSERTION|ASYMMETRIC|AT|ATOMIC|AUTHORIZATION|BACKUP|BEFORE|BEGIN|BETWEEN|BIT_LENGTH|BLOB|BOOLEAN|BOTH|BREADTH|BREAK|BROWSE|BULK|BY|CALL|CALLED|CARDINALITY|CASCADE|CASCADED|CASE|CATALOG|CHARACTER|CHARACTER_LENGTH|CHAR_LENGTH|CHECK|CHECKPOINT|CLASS|CLOB|CLOSE|CLUSTERED|COALESCE|COLLATE|COLLATION|COLLECT|COLUMN|COMMIT|COMPLETION|COMPUTE|CONDITION|CONNECT|CONNECTION|CONSTRAINT|CONSTRAINTS|CONSTRUCTOR|CONTAINS|CONTAINSTABLE|CONTINUE|CORR|CORRESPONDING|COVAR_POP|COVAR_SAMP|CREATE|CROSS|CUBE|CUME_DIST|CURRENT|CURRENT_CATALOG|CURRENT_DATE|CURRENT_DEFAULT_TRANSFORM_GROUP|CURRENT_PATH|CURRENT_ROLE|CURRENT_SCHEMA|CURRENT_TIME|CURRENT_TRANSFORM_GROUP_FOR_TYPE|CYCLE|DATA|DATABASE|DBCC|DEALLOCATE|DEC|DECLARE|DEFAULT|DEFERRABLE|DEFERRED|DELETE|DENY|DEPTH|DEREF|DESC|DESCRIBE|DESCRIPTOR|DESTROY|DESTRUCTOR|DETERMINISTIC|DIAGNOSTICS|DICTIONARY|DISCONNECT|DISK|DISTINCT|DISTRIBUTED|DOMAIN|DOUBLE|DROP|DUMP|DYNAMIC|EACH|ELEMENT|ELSE|END|END-EXEC|EQUALS|ERRLVL|ESCAPE|EVERY|EXCEPT|EXCEPTION|EXEC|EXECUTE|EXISTS|EXIT|EXTERNAL|EXTRACT|FETCH|FILE|FILLFACTOR|FILTER|FIRST|FOR|FOREIGN|FORTRAN|FOUND|FREE|FREETEXT|FREETEXTTABLE|FROM|FULL|FULLTEXTTABLE|FUNCTION|FUSION|GENERAL|GET|GLOBAL|GO|GOTO|GRANT|GROUP|HAVING|HOLD|HOLDLOCK|HOST|HOUR|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IGNORE|IMMEDIATE|IN|INCLUDE|INDEX|INDICATOR|INITIALIZE|INITIALLY|INNER|INOUT|INPUT|INSENSITIVE|INSERT|INTEGER|INTERSECT|INTERSECTION|INTERVAL|INTO|IS|ISOLATION|ITERATE|JOIN|KEY|KILL|LANGUAGE|LARGE|LAST|LATERAL|LEADING|LESS|LEVEL|LIKE|LIKE_REGEX|LIMIT|LINENO|LN|LOAD|LOCAL|LOCALTIME|LOCALTIMESTAMP|LOCATOR|MAP|MATCH|MEMBER|MERGE|METHOD|MINUTE|MOD|MODIFIES|MODIFY|MODULE|MULTISET|NAMES|NATIONAL|NATURAL|NCLOB|NEW|NEXT|NO|NOCHECK|NONCLUSTERED|NONE|NORMALIZE|NOT|NULL|NULLIF|OBJECT|OCCURRENCES_REGEX|OCTET_LENGTH|OF|OFF|OFFSETS|OLD|ON|ONLY|OPEN|OPERATION|OPTION|OR|ORDER|ORDINALITY|OUT|OUTER|OUTPUT|OVER|OVERLAPS|OVERLAY|PAD|PARAMETER|PARAMETERS|PARTIAL|PARTITION|PASCAL|PATH|PERCENT|PERCENTILE_CONT|PERCENTILE_DISC|PERCENT_RANK|PIVOT|PLAN|POSITION|POSITION_REGEX|POSTFIX|PRECISION|PREFIX|PREORDER|PREPARE|PRESERVE|PRIMARY|PRINT|PRIOR|PRIVILEGES|PROC|PROCEDURE|PUBLIC|RAISERROR|RANGE|READ|READS|READTEXT|RECONFIGURE|RECURSIVE|REF|REFERENCES|REFERENCING|REGR_AVGX|REGR_AVGY|REGR_COUNT|REGR_INTERCEPT|REGR_R2|REGR_SLOPE|REGR_SXX|REGR_SXY|REGR_SYY|RELATIVE|RELEASE|REPLICATION|RESTORE|RESTRICT|RESULT|RETURN|RETURNS|REVERT|REVOKE|ROLE|ROLLBACK|ROLLUP|ROUTINE|ROW|ROWCOUNT|ROWGUIDCOL|ROWS|RULE|SAVE|SAVEPOINT|SCHEMA|SCOPE|SCROLL|SEARCH|SECOND|SECTION|SECURITYAUDIT|SELECT|SEMANTICKEYPHRASETABLE|SEMANTICSIMILARITYDETAILSTABLE|SEMANTICSIMILARITYTABLE|SENSITIVE|SEQUENCE|SESSION|SET|SETS|SETUSER|SHUTDOWN|SIMILAR|SIZE|SOME|SPECIFIC|SPECIFICTYPE|SQL|SQLCA|SQLCODE|SQLERROR|SQLEXCEPTION|SQLSTATE|SQLWARNING|START|STATE|STATEMENT|STATIC|STATISTICS|STDDEV_POP|STDDEV_SAMP|STRUCTURE|SUBMULTISET|SUBSTRING_REGEX|SYMMETRIC|SYSTEM|TABLESAMPLE|TEMPORARY|TERMINATE|TEXTSIZE|THAN|THEN|TIMEZONE_HOUR|TIMEZONE_MINUTE|TO|TOP|TRAILING|TRAN|TRANSACTION|TRANSLATE|TRANSLATE_REGEX|TRANSLATION|TREAT|TRIGGER|TRIM|TRUNCATE|TSEQUAL|UESCAPE|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNPIVOT|UPDATE|UPDATETEXT|USAGE|USE|USER|USING|VALUE|VALUES|VARIABLE|VARYING|VAR_POP|VAR_SAMP|VIEW|WAITFOR|WHEN|WHENEVER|WHERE|WHILE|WIDTH_BUCKET|WINDOW|WITH|WITHIN|WITHIN GROUP|WITHOUT|WORK|WRITE|WRITETEXT|XMLAGG|XMLATTRIBUTES|XMLBINARY|XMLCAST|XMLCOMMENT|XMLCONCAT|XMLDOCUMENT|XMLELEMENT|XMLEXISTS|XMLFOREST|XMLITERATE|XMLNAMESPACES|XMLPARSE|XMLPI|XMLQUERY|XMLSERIALIZE|XMLTABLE|XMLTEXT|XMLVALIDATE|ZONE";
+ keywords += "|KEEPIDENTITY|KEEPDEFAULTS|IGNORE_CONSTRAINTS|IGNORE_TRIGGERS|XLOCK|FORCESCAN|FORCESEEK|HOLDLOCK|NOLOCK|NOWAIT|PAGLOCK|READCOMMITTED|READCOMMITTEDLOCK|READPAST|READUNCOMMITTED|REPEATABLEREAD|ROWLOCK|SERIALIZABLE|SNAPSHOT|SPATIAL_WINDOW_MAX_CELLS|TABLOCK|TABLOCKX|UPDLOCK|XLOCK|IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX|EXPAND|VIEWS|FAST|FORCE|KEEP|KEEPFIXED|MAXDOP|MAXRECURSION|OPTIMIZE|PARAMETERIZATION|SIMPLE|FORCED|RECOMPILE|ROBUST|PLAN|SPATIAL_WINDOW_MAX_CELLS|NOEXPAND|HINT";
+ keywords += "|LOOP|HASH|MERGE|REMOTE";
+ keywords += "|TRY|CATCH|THROW";
+ keywords += "|TYPE";
+ keywords = keywords.split('|');
+ keywords = keywords.filter(function(value, index, self) {
+ return logicalOperators.split('|').indexOf(value) === -1 && builtinFunctions.split('|').indexOf(value) === -1 && dataTypes.split('|').indexOf(value) === -1;
+ });
+ keywords = keywords.sort().join('|');
+
+
+ var keywordMapper = this.createKeywordMapper({
+ "constant.language": logicalOperators,
+ "storage.type": dataTypes,
+ "support.function": builtinFunctions,
+ "support.storedprocedure": builtInStoredProcedures,
+ "keyword": keywords
+ }, "identifier", true);
+ var setStatements = "SET ANSI_DEFAULTS|SET ANSI_NULLS|SET ANSI_NULL_DFLT_OFF|SET ANSI_NULL_DFLT_ON|SET ANSI_PADDING|SET ANSI_WARNINGS|SET ARITHABORT|SET ARITHIGNORE|SET CONCAT_NULL_YIELDS_NULL|SET CURSOR_CLOSE_ON_COMMIT|SET DATEFIRST|SET DATEFORMAT|SET DEADLOCK_PRIORITY|SET FIPS_FLAGGER|SET FMTONLY|SET FORCEPLAN|SET IDENTITY_INSERT|SET IMPLICIT_TRANSACTIONS|SET LANGUAGE|SET LOCK_TIMEOUT|SET NOCOUNT|SET NOEXEC|SET NUMERIC_ROUNDABORT|SET OFFSETS|SET PARSEONLY|SET QUERY_GOVERNOR_COST_LIMIT|SET QUOTED_IDENTIFIER|SET REMOTE_PROC_TRANSACTIONS|SET ROWCOUNT|SET SHOWPLAN_ALL|SET SHOWPLAN_TEXT|SET SHOWPLAN_XML|SET STATISTICS IO|SET STATISTICS PROFILE|SET STATISTICS TIME|SET STATISTICS XML|SET TEXTSIZE|SET XACT_ABORT".split('|');
+ var isolationLevels = "READ UNCOMMITTED|READ COMMITTED|REPEATABLE READ|SNAPSHOP|SERIALIZABLE".split('|');
+ for (var i = 0; i < isolationLevels.length; i++) {
+ setStatements.push('SET TRANSACTION ISOLATION LEVEL ' + isolationLevels[i]);
+ }
+
+
+ this.$rules = {
+ start: [{
+ token: "string.start",
+ regex: "'",
+ next: [{
+ token: "constant.language.escape",
+ regex: /''/
+ }, {
+ token: "string.end",
+ next: "start",
+ regex: "'"
+ }, {
+ defaultToken: "string"
+ }]
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"), {
+ token: "comment",
+ regex: "--.*$"
+ }, {
+ token: "comment",
+ start: "/\\*",
+ end: "\\*/"
+ }, {
+ token: "constant.numeric", // float
+ regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
+ }, {
+ token: keywordMapper,
+ regex: "@{0,2}[a-zA-Z_$][a-zA-Z0-9_$]*\\b(?!])" //up to 2 @symbols for some built in functions
+ }, {
+ token: "constant.class",
+ regex: "@@?[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token: "keyword.operator",
+ regex: "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=|\\*"
+ }, {
+ token: "paren.lparen",
+ regex: "[\\(]"
+ }, {
+ token: "paren.rparen",
+ regex: "[\\)]"
+ }, {
+ token: "punctuation",
+ regex: ",|;"
+ }, {
+ token: "text",
+ regex: "\\s+"
+ }],
+ comment: [
+ DocCommentHighlightRules.getTagRule(), {
+ token: "comment",
+ regex: "\\*\\/",
+ next: "no_regex"
+ }, {
+ defaultToken: "comment",
+ caseInsensitive: true
+ }]
+ };
+ for (var i = 0; i < setStatements.length; i++) {
+ this.$rules.start.unshift({
+ token: "set.statement",
+ regex: setStatements[i]
+ });
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-", [DocCommentHighlightRules.getEndRule("start")]);
+ this.normalizeRules();
+ var completions = [];
+ var addCompletions = function(arr, meta) {
+ arr.forEach(function(v) {
+ completions.push({
+ name: v,
+ value: v,
+ score: 0,
+ meta: meta
+ });
+ });
+ };
+ addCompletions(builtInStoredProcedures.split('|'), 'procedure');
+ addCompletions(logicalOperators.split('|'), 'operator');
+ addCompletions(builtinFunctions.split('|'), 'function');
+ addCompletions(dataTypes.split('|'), 'type');
+ addCompletions(setStatements, 'statement');
+ addCompletions(keywords.split('|'), 'keyword');
+
+ this.completions = completions;
+};
+
+oop.inherits(SqlServerHighlightRules, TextHighlightRules);
+
+exports.SqlHighlightRules = SqlServerHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/folding/sqlserver",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./cstyle").FoldMode;
+
+var FoldMode = exports.FoldMode = function() {};
+
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\bCASE\b|\bBEGIN\b)|^\s*(\/\*)/i;
+ this.startRegionRe = /^\s*(\/\*|--)#?region\b/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row);
+
+ var match = line.match(this.foldingStartMarker);
+ if (match) {
+ var i = match.index;
+ if (match[1]) return this.getBeginEndBlock(session, row, i, match[1]);
+
+ var range = session.getCommentFoldRange(row, i + match[0].length, 1);
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ }
+ else if (foldStyle != "all") range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin") return;
+ return;
+ };
+ this.getBeginEndBlock = function(session, row, column, matchSequence) {
+ var start = {
+ row: row,
+ column: column + matchSequence.length
+ };
+ var maxRow = session.getLength();
+ var line;
+
+ var depth = 1;
+ var re = /(\bCASE\b|\bBEGIN\b)|(\bEND\b)/i;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth++;
+ else depth--;
+
+ if (!depth) break;
+ }
+ var endRow = row;
+ if (endRow > start.row) {
+ return new Range(start.row, start.column, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/sqlserver",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sqlserver_highlight_rules","ace/mode/folding/sqlserver"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var SqlServerHighlightRules = require("./sqlserver_highlight_rules").SqlHighlightRules;
+var SqlServerFoldMode = require("./folding/sqlserver").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = SqlServerHighlightRules;
+ this.foldingRules = new SqlServerFoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "--";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.getCompletions = function(state, session, pos, prefix) {
+ return session.$mode.$highlightRules.completions;
+ };
+
+ this.$id = "ace/mode/sql";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-stylus.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-stylus.js
new file mode 100644
index 00000000..fed3f82f
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-stylus.js
@@ -0,0 +1,462 @@
+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 supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+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) {
+"use strict";
+
+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"
+ }, {
+ defaultToken : "comment"
+ }
+ ],
+ "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/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/stylus",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/stylus_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var StylusHighlightRules = require("./stylus_highlight_rules").StylusHighlightRules;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = StylusHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.$id = "ace/mode/stylus";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-svg.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-svg.js
new file mode 100644
index 00000000..25d879b3
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-svg.js
@@ -0,0 +1,1568 @@
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var XmlFoldMode = require("./folding/xml").FoldMode;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+
+var Mode = function() {
+ this.HighlightRules = XmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.foldingRules = new XmlFoldMode();
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.voidElements = lang.arrayToMap([]);
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/xml";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/svg_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], 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 SvgHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.embedTagRules(JavaScriptHighlightRules, "js-", "script");
+
+ this.normalizeRules();
+};
+
+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) {
+"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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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/svg",["require","exports","module","ace/lib/oop","ace/mode/xml","ace/mode/javascript","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 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.HighlightRules = SvgHighlightRules;
+
+ 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);
+ };
+
+
+ this.$id = "ace/mode/svg";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-swift.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-swift.js
new file mode 100644
index 00000000..dc5a4303
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-swift.js
@@ -0,0 +1,382 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/swift_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 SwiftHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "variable.language": "",
+ "keyword": "__COLUMN__|__FILE__|__FUNCTION__|__LINE__"
+ + "|as|associativity|break|case|class|continue|default|deinit|didSet"
+ + "|do|dynamicType|else|enum|extension|fallthrough|for|func|get|if|import"
+ + "|in|infix|init|inout|is|left|let|let|mutating|new|none|nonmutating"
+ + "|operator|override|postfix|precedence|prefix|protocol|return|right"
+ + "|safe|Self|self|set|struct|subscript|switch|Type|typealias"
+ + "|unowned|unsafe|var|weak|where|while|willSet"
+ + "|convenience|dynamic|final|infix|lazy|mutating|nonmutating|optional|override|postfix"
+ + "|prefix|required|static|guard|defer",
+ "storage.type": "bool|double|Double"
+ + "|extension|float|Float|int|Int|private|public|string|String",
+ "constant.language":
+ "false|Infinity|NaN|nil|no|null|null|off|on|super|this|true|undefined|yes",
+ "support.function":
+ ""
+ }, "identifier");
+
+ function string(start, options) {
+ var nestable = options.nestable || options.interpolation;
+ var interpStart = options.interpolation && options.interpolation.nextState || "start";
+ var mainRule = {
+ regex: start + (options.multiline ? "" : "(?=.)"),
+ token: "string.start"
+ };
+ var nextState = [
+ options.escape && {
+ regex: options.escape,
+ token: "character.escape"
+ },
+ options.interpolation && {
+ token : "paren.quasi.start",
+ regex : lang.escapeRegExp(options.interpolation.lead + options.interpolation.open),
+ push : interpStart
+ },
+ options.error && {
+ regex: options.error,
+ token: "error.invalid"
+ },
+ {
+ regex: start + (options.multiline ? "" : "|$"),
+ token: "string.end",
+ next: nestable ? "pop" : "start"
+ }, {
+ defaultToken: "string"
+ }
+ ].filter(Boolean);
+
+ if (nestable)
+ mainRule.push = nextState;
+ else
+ mainRule.next = nextState;
+
+ if (!options.interpolation)
+ return mainRule;
+
+ var open = options.interpolation.open;
+ var close = options.interpolation.close;
+ var counter = {
+ regex: "[" + lang.escapeRegExp(open + close) + "]",
+ onMatch: function(val, state, stack) {
+ this.next = val == open ? this.nextState : "";
+ if (val == open && stack.length) {
+ stack.unshift("start", state);
+ return "paren";
+ }
+ if (val == close && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1)
+ return "paren.quasi.end";
+ }
+ return val == open ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: interpStart
+ }
+ return [counter, mainRule];
+ }
+
+ function comments() {
+ return [{
+ token : "comment",
+ regex : "\\/\\/(?=.)",
+ next : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next: "start"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ },
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ {
+ token : "comment.start",
+ regex : /\/\*/,
+ stateName: "nested_comment",
+ push : [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment.start", regex : /\/\*/, push: "nested_comment"},
+ {token : "comment.end", regex : "\\*\\/", next : "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+ }
+
+
+ this.$rules = {
+ start: [
+ string('"', {
+ escape: /\\(?:[0\\tnr"']|u{[a-fA-F1-9]{0,8}})/,
+ interpolation: {lead: "\\", open: "(", close: ")"},
+ error: /\\./,
+ multiline: false
+ }),
+ comments({type: "c", nestable: true}),
+ {
+ regex: /@[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/,
+ token: "variable.parameter"
+ },
+ {
+ regex: /[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/,
+ token: keywordMapper
+ },
+ {
+ token : "constant.numeric",
+ regex : /[+-]?(?:0(?:b[01]+|o[0-7]+|x[\da-fA-F])|\d+(?:(?:\.\d*)?(?:[PpEe][+-]?\d+)?)\b)/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }
+
+ ]
+ };
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("start") ]);
+
+ this.normalizeRules();
+};
+
+
+oop.inherits(SwiftHighlightRules, TextHighlightRules);
+
+exports.HighlightRules = SwiftHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/swift",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/swift_highlight_rules","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 HighlightRules = require("./swift_highlight_rules").HighlightRules;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = HighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = new CstyleBehaviour();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/", nestable: true};
+
+ this.$id = "ace/mode/swift"
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-tcl.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-tcl.js
new file mode 100644
index 00000000..1f878c31
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-tcl.js
@@ -0,0 +1,376 @@
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).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) {
+"use strict";
+
+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.instance",
+ 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.instance",
+ 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 : "paren.rparen",
+ regex : "[\\])}]"
+ }, {
+ 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 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) {
+"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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/tcl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/folding/cstyle","ace/mode/tcl_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 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.HighlightRules = TclHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new CStyleFoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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.$id = "ace/mode/tcl";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-tex.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-tex.js
new file mode 100644
index 00000000..f4f13baa
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-tex.js
@@ -0,0 +1,152 @@
+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) {
+"use strict";
+
+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) {
+"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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/tex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+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.HighlightRules = TextHighlightRules;
+ else
+ this.HighlightRules = TexHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "%";
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.allowAutoInsert = function() {
+ return false;
+ };
+ this.$id = "ace/mode/tex";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-text.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-text.js
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-text.js
@@ -0,0 +1 @@
+
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-textile.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-textile.js
new file mode 100644
index 00000000..94ed5c77
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-textile.js
@@ -0,0 +1,142 @@
+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.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) {
+"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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/textile",["require","exports","module","ace/lib/oop","ace/mode/text","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 TextileHighlightRules = require("./textile_highlight_rules").TextileHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function() {
+ this.HighlightRules = TextileHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.type = "text";
+ 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);
+ };
+
+ this.$id = "ace/mode/textile";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-toml.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-toml.js
new file mode 100644
index 00000000..2f348937
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-toml.js
@@ -0,0 +1,146 @@
+ace.define("ace/mode/toml_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 TomlHighlightRules = function() {
+ var keywordMapper = this.createKeywordMapper({
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+
+ var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b";
+
+ this.$rules = {
+ "start": [
+ {
+ token: "comment.toml",
+ regex: /#.*$/
+ },
+ {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ },
+ {
+ token: ["variable.keygroup.toml"],
+ regex: "(?:^\\s*)(\\[\\[([^\\]]+)\\]\\])"
+ },
+ {
+ token: ["variable.keygroup.toml"],
+ regex: "(?:^\\s*)(\\[([^\\]]+)\\])"
+ },
+ {
+ token : keywordMapper,
+ regex : identifierRe
+ },
+ {
+ token : "support.date.toml",
+ regex: "\\d{4}-\\d{2}-\\d{2}(T)\\d{2}:\\d{2}:\\d{2}(Z)"
+ },
+ {
+ token: "constant.numeric.toml",
+ regex: "-?\\d+(\\.?\\d+)?"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "string",
+ regex : "\\\\$",
+ next : "qqstring"
+ },
+ {
+ token : "constant.language.escape",
+ regex : '\\\\[0tnr"\\\\]'
+ },
+ {
+ token : "string",
+ regex : '"|$',
+ next : "start"
+ },
+ {
+ defaultToken: "string"
+ }
+ ]
+ }
+
+};
+
+oop.inherits(TomlHighlightRules, TextHighlightRules);
+
+exports.TomlHighlightRules = TomlHighlightRules;
+});
+
+ace.define("ace/mode/folding/ini",["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*\[([^\])]*)]\s*(?:$|[;#])/;
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var re = this.foldingStartMarker;
+ var line = session.getLine(row);
+
+ var m = line.match(re);
+
+ if (!m) return;
+
+ var startName = m[1] + ".";
+
+ var startColumn = line.length;
+ var maxRow = session.getLength();
+ var startRow = row;
+ var endRow = row;
+
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ if (/^\s*$/.test(line))
+ continue;
+ m = line.match(re);
+ if (m && m[1].lastIndexOf(startName, 0) !== 0)
+ break;
+
+ endRow = row;
+ }
+
+ if (endRow > startRow) {
+ var endColumn = session.getLine(endRow).length;
+ return new Range(startRow, startColumn, endRow, endColumn);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/toml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/toml_highlight_rules","ace/mode/folding/ini"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var TomlHighlightRules = require("./toml_highlight_rules").TomlHighlightRules;
+var FoldMode = require("./folding/ini").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = TomlHighlightRules;
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "#";
+ this.$id = "ace/mode/toml";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-tsx.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-tsx.js
new file mode 100644
index 00000000..9db47ac0
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-tsx.js
@@ -0,0 +1,891 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+
+var TypeScriptHighlightRules = function(options) {
+
+ 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({jsx: (options && options.jsx) == true}).getRules();
+
+ JSRules.start = tsRules.concat(JSRules.start);
+ this.$rules = JSRules;
+};
+
+oop.inherits(TypeScriptHighlightRules, JavaScriptHighlightRules);
+
+exports.TypeScriptHighlightRules = TypeScriptHighlightRules;
+});
+
+ace.define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var jsMode = require("./javascript").Mode;
+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() {
+ this.HighlightRules = TypeScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, jsMode);
+
+(function() {
+ this.createWorker = function(session) {
+ return null;
+ };
+ this.$id = "ace/mode/typescript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/tsx",["require","exports","module","ace/lib/oop","ace/mode/typescript"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var tsMode = require("./typescript").Mode;
+
+var Mode = function() {
+ tsMode.call(this);
+ this.$highlightRuleConfig = {jsx: true};
+};
+oop.inherits(Mode, tsMode);
+
+(function() {
+ this.$id = "ace/mode/tsx";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-turtle.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-turtle.js
new file mode 100644
index 00000000..4eef543d
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-turtle.js
@@ -0,0 +1,289 @@
+ace.define("ace/mode/turtle_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 TurtleHighlightRules = function() {
+
+ this.$rules = {
+ start: [{
+ include: "#comments"
+ }, {
+ include: "#strings"
+ }, {
+ include: "#base-prefix-declarations"
+ }, {
+ include: "#string-language-suffixes"
+ }, {
+ include: "#string-datatype-suffixes"
+ }, {
+ include: "#relative-urls"
+ }, {
+ include: "#xml-schema-types"
+ }, {
+ include: "#rdf-schema-types"
+ }, {
+ include: "#owl-types"
+ }, {
+ include: "#qnames"
+ }, {
+ include: "#punctuation-operators"
+ }],
+ "#base-prefix-declarations": [{
+ token: "keyword.other.prefix.turtle",
+ regex: /@(?:base|prefix)/
+ }],
+ "#comments": [{
+ token: [
+ "punctuation.definition.comment.turtle",
+ "comment.line.hash.turtle"
+ ],
+ regex: /(#)(.*$)/
+ }],
+ "#owl-types": [{
+ token: "support.type.datatype.owl.turtle",
+ regex: /owl:[a-zA-Z]+/
+ }],
+ "#punctuation-operators": [{
+ token: "keyword.operator.punctuation.turtle",
+ regex: /;|,|\.|\(|\)|\[|\]/
+ }],
+ "#qnames": [{
+ token: "entity.name.other.qname.turtle",
+ regex: /(?:[a-zA-Z][-_a-zA-Z0-9]*)?:(?:[_a-zA-Z][-_a-zA-Z0-9]*)?/
+ }],
+ "#rdf-schema-types": [{
+ token: "support.type.datatype.rdf.schema.turtle",
+ regex: /rdfs?:[a-zA-Z]+|(?:^|\s)a(?:\s|$)/
+ }],
+ "#relative-urls": [{
+ token: "string.quoted.other.relative.url.turtle",
+ regex: /</,
+ push: [{
+ token: "string.quoted.other.relative.url.turtle",
+ regex: />/,
+ next: "pop"
+ }, {
+ defaultToken: "string.quoted.other.relative.url.turtle"
+ }]
+ }],
+ "#string-datatype-suffixes": [{
+ token: "keyword.operator.datatype.suffix.turtle",
+ regex: /\^\^/
+ }],
+ "#string-language-suffixes": [{
+ token: [
+ "keyword.operator.language.suffix.turtle",
+ "constant.language.suffix.turtle"
+ ],
+ regex: /(?!")(@)([a-z]+(?:\-[a-z0-9]+)*)/
+ }],
+ "#strings": [{
+ token: "string.quoted.triple.turtle",
+ regex: /"""/,
+ push: [{
+ token: "string.quoted.triple.turtle",
+ regex: /"""/,
+ next: "pop"
+ }, {
+ defaultToken: "string.quoted.triple.turtle"
+ }]
+ }, {
+ token: "string.quoted.double.turtle",
+ regex: /"/,
+ push: [{
+ token: "string.quoted.double.turtle",
+ regex: /"/,
+ next: "pop"
+ }, {
+ token: "invalid.string.newline",
+ regex: /$/
+ }, {
+ token: "constant.character.escape.turtle",
+ regex: /\\./
+ }, {
+ defaultToken: "string.quoted.double.turtle"
+ }]
+ }],
+ "#xml-schema-types": [{
+ token: "support.type.datatype.xml.schema.turtle",
+ regex: /xsd?:[a-z][a-zA-Z]+/
+ }]
+ }
+
+ this.normalizeRules();
+};
+
+TurtleHighlightRules.metaData = {
+ fileTypes: ["ttl", "nt"],
+ name: "Turtle",
+ scopeName: "source.turtle"
+}
+
+
+oop.inherits(TurtleHighlightRules, TextHighlightRules);
+
+exports.TurtleHighlightRules = TurtleHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/turtle",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/turtle_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var TurtleHighlightRules = require("./turtle_highlight_rules").TurtleHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = TurtleHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.$id = "ace/mode/turtle"
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-twig.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-twig.js
new file mode 100644
index 00000000..557c124b
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-twig.js
@@ -0,0 +1,2664 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+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(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": {"manifest": 1},
+ "head": {},
+ "title": {},
+ "base": {"href": 1, "target": 1},
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
+ "noscript": {"href": 1},
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
+ "section": {},
+ "nav": {},
+ "article": {"pubdate": 1},
+ "aside": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "header": {},
+ "footer": {},
+ "address": {},
+ "main": {},
+ "p": {},
+ "hr": {},
+ "pre": {},
+ "blockquote": {"cite": 1},
+ "ol": {"start": 1, "reversed": 1},
+ "ul": {},
+ "li": {"value": 1},
+ "dl": {},
+ "dt": {},
+ "dd": {},
+ "figure": {},
+ "figcaption": {},
+ "div": {},
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
+ "em": {},
+ "strong": {},
+ "small": {},
+ "s": {},
+ "cite": {},
+ "q": {"cite": 1},
+ "dfn": {},
+ "abbr": {},
+ "data": {},
+ "time": {"datetime": 1},
+ "code": {},
+ "var": {},
+ "samp": {},
+ "kbd": {},
+ "sub": {},
+ "sup": {},
+ "i": {},
+ "b": {},
+ "u": {},
+ "mark": {},
+ "ruby": {},
+ "rt": {},
+ "rp": {},
+ "bdi": {},
+ "bdo": {},
+ "span": {},
+ "br": {},
+ "wbr": {},
+ "ins": {"cite": 1, "datetime": 1},
+ "del": {"cite": 1, "datetime": 1},
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
+ "param": {"name": 1, "value": 1},
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
+ "source": {"src": 1, "type": 1, "media": 1},
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
+ "canvas": {"width": 1, "height": 1},
+ "map": {"name": 1},
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
+ "svg": {},
+ "math": {},
+ "table": {"summary": 1},
+ "caption": {},
+ "colgroup": {"span": 1},
+ "col": {"span": 1},
+ "tbody": {},
+ "thead": {},
+ "tfoot": {},
+ "tr": {},
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
+ "legend": {},
+ "label": {"form": 1, "for": 1},
+ "input": {
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
+ "datalist": {},
+ "optgroup": {"disabled": 1, "label": 1},
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
+ "output": {"for": 1, "form": 1, "name": 1},
+ "progress": {"value": 1, "max": 1},
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
+ "details": {"open": 1},
+ "summary": {},
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
+ "menu": {"type": 1, "label": 1},
+ "dialog": {"open": 1}
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+function findAttributeName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "attribute-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompletions(state, session, pos, prefix);
+ if (is(token, "attribute-value"))
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/&[a-z]*$/i.test(line))
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ var attributeName = findAttributeName(session, pos);
+
+ if (!tagName)
+ return [];
+ var values = [];
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
+ values = Object.keys(attributeMap[tagName][attributeName]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "attribute value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
+
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "html entity",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/twig_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var TwigHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var tags = "autoescape|block|do|embed|extends|filter|flush|for|from|if|import|include|macro|sandbox|set|spaceless|use|verbatim";
+ tags = tags + "|end" + tags.replace(/\|/g, "|end");
+ var filters = "abs|batch|capitalize|convert_encoding|date|date_modify|default|e|escape|first|format|join|json_encode|keys|last|length|lower|merge|nl2br|number_format|raw|replace|reverse|slice|sort|split|striptags|title|trim|upper|url_encode";
+ var functions = "attribute|constant|cycle|date|dump|parent|random|range|template_from_string";
+ var tests = "constant|divisibleby|sameas|defined|empty|even|iterable|odd";
+ var constants = "null|none|true|false";
+ var operators = "b-and|b-xor|b-or|in|is|and|or|not"
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword.control.twig": tags,
+ "support.function.twig": [filters, functions, tests].join("|"),
+ "keyword.operator.twig": operators,
+ "constant.language.twig": constants
+ }, "identifier");
+ for (var rule in this.$rules) {
+ this.$rules[rule].unshift({
+ token : "variable.other.readwrite.local.twig",
+ regex : "\\{\\{-?",
+ push : "twig-start"
+ }, {
+ token : "meta.tag.twig",
+ regex : "\\{%-?",
+ push : "twig-start"
+ }, {
+ token : "comment.block.twig",
+ regex : "\\{#-?",
+ push : "twig-comment"
+ });
+ }
+ this.$rules["twig-comment"] = [{
+ token : "comment.block.twig",
+ regex : ".*-?#\\}",
+ next : "pop"
+ }];
+
+ this.$rules["twig-start"] = [{
+ token : "variable.other.readwrite.local.twig",
+ regex : "-?\\}\\}",
+ next : "pop"
+ }, {
+ token : "meta.tag.twig",
+ regex : "-?%\\}",
+ next : "pop"
+ }, {
+ token : "string",
+ regex : "'",
+ next : "twig-qstring"
+ }, {
+ token : "string",
+ regex : '"',
+ next : "twig-qqstring"
+ }, {
+ 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.assignment",
+ regex : "=|~"
+ }, {
+ token : "keyword.operator.comparison",
+ regex : "==|!=|<|>|>=|<=|==="
+ }, {
+ token : "keyword.operator.arithmetic",
+ regex : "\\+|-|/|%|//|\\*|\\*\\*"
+ }, {
+ token : "keyword.operator.other",
+ regex : "\\.\\.|\\|"
+ }, {
+ token : "punctuation.operator",
+ regex : /\?|:|,|;|\./
+ }, {
+ token : "paren.lparen",
+ regex : /[\[\({]/
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ];
+
+ this.$rules["twig-qqstring"] = [{
+ token : "constant.language.escape",
+ regex : /\\[\\"$#ntr]|#{[^"}]*}/
+ }, {
+ token : "string",
+ regex : '"',
+ next : "twig-start"
+ }, {
+ defaultToken : "string"
+ }
+ ];
+
+ this.$rules["twig-qstring"] = [{
+ token : "constant.language.escape",
+ regex : /\\[\\'ntr]}/
+ }, {
+ token : "string",
+ regex : "'",
+ next : "twig-start"
+ }, {
+ defaultToken : "string"
+ }
+ ];
+
+ this.normalizeRules();
+};
+
+oop.inherits(TwigHighlightRules, TextHighlightRules);
+
+exports.TwigHighlightRules = TwigHighlightRules;
+});
+
+ace.define("ace/mode/twig",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/twig_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var TwigHighlightRules = require("./twig_highlight_rules").TwigHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = TwigHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.blockComment = {start: "{#", end: "#}"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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);
+ };
+ this.$id = "ace/mode/twig";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-typescript.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-typescript.js
new file mode 100644
index 00000000..1c1b697d
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-typescript.js
@@ -0,0 +1,872 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+
+var TypeScriptHighlightRules = function(options) {
+
+ 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({jsx: (options && options.jsx) == true}).getRules();
+
+ JSRules.start = tsRules.concat(JSRules.start);
+ this.$rules = JSRules;
+};
+
+oop.inherits(TypeScriptHighlightRules, JavaScriptHighlightRules);
+
+exports.TypeScriptHighlightRules = TypeScriptHighlightRules;
+});
+
+ace.define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var jsMode = require("./javascript").Mode;
+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() {
+ this.HighlightRules = TypeScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, jsMode);
+
+(function() {
+ this.createWorker = function(session) {
+ return null;
+ };
+ this.$id = "ace/mode/typescript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-vala.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-vala.js
new file mode 100644
index 00000000..75340fb4
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-vala.js
@@ -0,0 +1,669 @@
+ace.define("ace/mode/vala_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 ValaHighlightRules = function() {
+
+ this.$rules = { start:
+ [ { token:
+ [ 'meta.using.vala',
+ 'keyword.other.using.vala',
+ 'meta.using.vala',
+ 'storage.modifier.using.vala',
+ 'meta.using.vala',
+ 'punctuation.terminator.vala' ],
+ regex: '^(\\s*)(using)\\b(?:(\\s*)([^ ;$]+)(\\s*)((?:;)?))?' },
+ { include: '#code' } ],
+ '#all-types':
+ [ { include: '#primitive-arrays' },
+ { include: '#primitive-types' },
+ { include: '#object-types' } ],
+ '#annotations':
+ [ { token:
+ [ 'storage.type.annotation.vala',
+ 'punctuation.definition.annotation-arguments.begin.vala' ],
+ regex: '(@[^ (]+)(\\()',
+ push:
+ [ { token: 'punctuation.definition.annotation-arguments.end.vala',
+ regex: '\\)',
+ next: 'pop' },
+ { token:
+ [ 'constant.other.key.vala',
+ 'text',
+ 'keyword.operator.assignment.vala' ],
+ regex: '(\\w*)(\\s*)(=)' },
+ { include: '#code' },
+ { token: 'punctuation.seperator.property.vala', regex: ',' },
+ { defaultToken: 'meta.declaration.annotation.vala' } ] },
+ { token: 'storage.type.annotation.vala', regex: '@\\w*' } ],
+ '#anonymous-classes-and-new':
+ [ { token: 'keyword.control.new.vala',
+ regex: '\\bnew\\b',
+ push_disabled:
+ [ { token: 'text',
+ regex: '(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=;)',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<=\\)|\\])(?!\\s*{)|(?<=})|(?=;)',
+ next: 'pop' },
+ { token: [ 'storage.type.vala', 'text' ],
+ regex: '(\\w+)(\\s*)(?=\\[)',
+ push:
+ [ { token: 'text', regex: '}|(?=;|\\))', next: 'pop' },
+ { token: 'text',
+ regex: '\\[',
+ push:
+ [ { token: 'text', regex: '\\]', next: 'pop' },
+ { include: '#code' } ] },
+ { token: 'text',
+ regex: '{',
+ push:
+ [ { token: 'text', regex: '(?=})', next: 'pop' },
+ { include: '#code' } ] } ] },
+ { token: 'text',
+ regex: '(?=\\w.*\\()',
+ push:
+ [ { token: 'text',
+ regex: '(?<=\\))',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '(?<=\\))',
+ next: 'pop' },
+ { include: '#object-types' },
+ { token: 'text',
+ regex: '\\(',
+ push:
+ [ { token: 'text', regex: '\\)', next: 'pop' },
+ { include: '#code' } ] } ] },
+ { token: 'meta.inner-class.vala',
+ regex: '{',
+ push:
+ [ { token: 'meta.inner-class.vala', regex: '}', next: 'pop' },
+ { include: '#class-body' },
+ { defaultToken: 'meta.inner-class.vala' } ] } ] } ],
+ '#assertions':
+ [ { token:
+ [ 'keyword.control.assert.vala',
+ 'meta.declaration.assertion.vala' ],
+ regex: '\\b(assert|requires|ensures)(\\s)',
+ push:
+ [ { token: 'meta.declaration.assertion.vala',
+ regex: '$',
+ next: 'pop' },
+ { token: 'keyword.operator.assert.expression-seperator.vala',
+ regex: ':' },
+ { include: '#code' },
+ { defaultToken: 'meta.declaration.assertion.vala' } ] } ],
+ '#class':
+ [ { token: 'meta.class.vala',
+ regex: '(?=\\w?[\\w\\s]*(?:class|(?:@)?interface|enum|struct|namespace)\\s+\\w+)',
+ push:
+ [ { token: 'paren.vala',
+ regex: '}',
+ next: 'pop' },
+ { include: '#storage-modifiers' },
+ { include: '#comments' },
+ { token:
+ [ 'storage.modifier.vala',
+ 'meta.class.identifier.vala',
+ 'entity.name.type.class.vala' ],
+ regex: '(class|(?:@)?interface|enum|struct|namespace)(\\s+)([\\w\\.]+)' },
+ { token: 'storage.modifier.extends.vala',
+ regex: ':',
+ push:
+ [ { token: 'meta.definition.class.inherited.classes.vala',
+ regex: '(?={|,)',
+ next: 'pop' },
+ { include: '#object-types-inherited' },
+ { include: '#comments' },
+ { defaultToken: 'meta.definition.class.inherited.classes.vala' } ] },
+ { token:
+ [ 'storage.modifier.implements.vala',
+ 'meta.definition.class.implemented.interfaces.vala' ],
+ regex: '(,)(\\s)',
+ push:
+ [ { token: 'meta.definition.class.implemented.interfaces.vala',
+ regex: '(?=\\{)',
+ next: 'pop' },
+ { include: '#object-types-inherited' },
+ { include: '#comments' },
+ { defaultToken: 'meta.definition.class.implemented.interfaces.vala' } ] },
+ { token: 'paren.vala',
+ regex: '{',
+ push:
+ [ { token: 'paren.vala', regex: '(?=})', next: 'pop' },
+ { include: '#class-body' },
+ { defaultToken: 'meta.class.body.vala' } ] },
+ { defaultToken: 'meta.class.vala' } ],
+ comment: 'attempting to put namespace in here.' } ],
+ '#class-body':
+ [ { include: '#comments' },
+ { include: '#class' },
+ { include: '#enums' },
+ { include: '#methods' },
+ { include: '#annotations' },
+ { include: '#storage-modifiers' },
+ { include: '#code' } ],
+ '#code':
+ [ { include: '#comments' },
+ { include: '#class' },
+ { token: 'text',
+ regex: '{',
+ push:
+ [ { token: 'text', regex: '}', next: 'pop' },
+ { include: '#code' } ] },
+ { include: '#assertions' },
+ { include: '#parens' },
+ { include: '#constants-and-special-vars' },
+ { include: '#anonymous-classes-and-new' },
+ { include: '#keywords' },
+ { include: '#storage-modifiers' },
+ { include: '#strings' },
+ { include: '#all-types' } ],
+ '#comments':
+ [ { token: 'punctuation.definition.comment.vala',
+ regex: '/\\*\\*/' },
+ { include: 'text.html.javadoc' },
+ { include: '#comments-inline' } ],
+ '#comments-inline':
+ [ { token: 'punctuation.definition.comment.vala',
+ regex: '/\\*',
+ push:
+ [ { token: 'punctuation.definition.comment.vala',
+ regex: '\\*/',
+ next: 'pop' },
+ { defaultToken: 'comment.block.vala' } ] },
+ { token:
+ [ 'text',
+ 'punctuation.definition.comment.vala',
+ 'comment.line.double-slash.vala' ],
+ regex: '(\\s*)(//)(.*$)' } ],
+ '#constants-and-special-vars':
+ [ { token: 'constant.language.vala',
+ regex: '\\b(?:true|false|null)\\b' },
+ { token: 'variable.language.vala',
+ regex: '\\b(?:this|base)\\b' },
+ { token: 'constant.numeric.vala',
+ regex: '\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:[LlFfUuDd]|UL|ul)?\\b' },
+ { token: [ 'keyword.operator.dereference.vala', 'constant.other.vala' ],
+ regex: '((?:\\.)?)\\b([A-Z][A-Z0-9_]+)(?!<|\\.class|\\s*\\w+\\s*=)\\b' } ],
+ '#enums':
+ [ { token: 'text',
+ regex: '^(?=\\s*[A-Z0-9_]+\\s*(?:{|\\(|,))',
+ push:
+ [ { token: 'text', regex: '(?=;|})', next: 'pop' },
+ { token: 'constant.other.enum.vala',
+ regex: '\\w+',
+ push:
+ [ { token: 'meta.enum.vala', regex: '(?=,|;|})', next: 'pop' },
+ { include: '#parens' },
+ { token: 'text',
+ regex: '{',
+ push:
+ [ { token: 'text', regex: '}', next: 'pop' },
+ { include: '#class-body' } ] },
+ { defaultToken: 'meta.enum.vala' } ] } ] } ],
+ '#keywords':
+ [ { token: 'keyword.control.catch-exception.vala',
+ regex: '\\b(?:try|catch|finally|throw)\\b' },
+ { token: 'keyword.control.vala', regex: '\\?|:|\\?\\?' },
+ { token: 'keyword.control.vala',
+ regex: '\\b(?:return|break|case|continue|default|do|while|for|foreach|switch|if|else|in|yield|get|set|value)\\b' },
+ { token: 'keyword.operator.vala',
+ regex: '\\b(?:typeof|is|as)\\b' },
+ { token: 'keyword.operator.comparison.vala',
+ regex: '==|!=|<=|>=|<>|<|>' },
+ { token: 'keyword.operator.assignment.vala', regex: '=' },
+ { token: 'keyword.operator.increment-decrement.vala',
+ regex: '\\-\\-|\\+\\+' },
+ { token: 'keyword.operator.arithmetic.vala',
+ regex: '\\-|\\+|\\*|\\/|%' },
+ { token: 'keyword.operator.logical.vala', regex: '!|&&|\\|\\|' },
+ { token: 'keyword.operator.dereference.vala',
+ regex: '\\.(?=\\S)',
+ originalRegex: '(?<=\\S)\\.(?=\\S)' },
+ { token: 'punctuation.terminator.vala', regex: ';' },
+ { token: 'keyword.operator.ownership', regex: 'owned|unowned' } ],
+ '#methods':
+ [ { token: 'meta.method.vala',
+ regex: '(?!new)(?=\\w.*\\s+)(?=[^=]+\\()',
+ push:
+ [ { token: 'paren.vala', regex: '}|(?=;)', next: 'pop' },
+ { include: '#storage-modifiers' },
+ { token: [ 'entity.name.function.vala', 'meta.method.identifier.vala' ],
+ regex: '([\\~\\w\\.]+)(\\s*\\()',
+ push:
+ [ { token: 'meta.method.identifier.vala',
+ regex: '\\)',
+ next: 'pop' },
+ { include: '#parameters' },
+ { defaultToken: 'meta.method.identifier.vala' } ] },
+ { token: 'meta.method.return-type.vala',
+ regex: '(?=\\w.*\\s+\\w+\\s*\\()',
+ push:
+ [ { token: 'meta.method.return-type.vala',
+ regex: '(?=\\w+\\s*\\()',
+ next: 'pop' },
+ { include: '#all-types' },
+ { defaultToken: 'meta.method.return-type.vala' } ] },
+ { include: '#throws' },
+ { token: 'paren.vala',
+ regex: '{',
+ push:
+ [ { token: 'paren.vala', regex: '(?=})', next: 'pop' },
+ { include: '#code' },
+ { defaultToken: 'meta.method.body.vala' } ] },
+ { defaultToken: 'meta.method.vala' } ] } ],
+ '#namespace':
+ [ { token: 'text',
+ regex: '^(?=\\s*[A-Z0-9_]+\\s*(?:{|\\(|,))',
+ push:
+ [ { token: 'text', regex: '(?=;|})', next: 'pop' },
+ { token: 'constant.other.namespace.vala',
+ regex: '\\w+',
+ push:
+ [ { token: 'meta.namespace.vala', regex: '(?=,|;|})', next: 'pop' },
+ { include: '#parens' },
+ { token: 'text',
+ regex: '{',
+ push:
+ [ { token: 'text', regex: '}', next: 'pop' },
+ { include: '#code' } ] },
+ { defaultToken: 'meta.namespace.vala' } ] } ],
+ comment: 'This is not quite right. See the class grammar right now' } ],
+ '#object-types':
+ [ { token: 'storage.type.generic.vala',
+ regex: '\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*<',
+ push:
+ [ { token: 'storage.type.generic.vala',
+ regex: '>|[^\\w\\s,\\?<\\[()\\]]',
+ TODO: 'FIXME: regexp doesn\'t have js equivalent',
+ originalRegex: '>|[^\\w\\s,\\?<\\[(?:[,]+)\\]]',
+ next: 'pop' },
+ { include: '#object-types' },
+ { token: 'storage.type.generic.vala',
+ regex: '<',
+ push:
+ [ { token: 'storage.type.generic.vala',
+ regex: '>|[^\\w\\s,\\[\\]<]',
+ next: 'pop' },
+ { defaultToken: 'storage.type.generic.vala' } ],
+ comment: 'This is just to support <>\'s with no actual type prefix' },
+ { defaultToken: 'storage.type.generic.vala' } ] },
+ { token: 'storage.type.object.array.vala',
+ regex: '\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*(?=\\[)',
+ push:
+ [ { token: 'storage.type.object.array.vala',
+ regex: '(?=[^\\]\\s])',
+ next: 'pop' },
+ { token: 'text',
+ regex: '\\[',
+ push:
+ [ { token: 'text', regex: '\\]', next: 'pop' },
+ { include: '#code' } ] },
+ { defaultToken: 'storage.type.object.array.vala' } ] },
+ { token:
+ [ 'storage.type.vala',
+ 'keyword.operator.dereference.vala',
+ 'storage.type.vala' ],
+ regex: '\\b(?:([a-z]\\w*)(\\.))*([A-Z]+\\w*\\b)' } ],
+ '#object-types-inherited':
+ [ { token: 'entity.other.inherited-class.vala',
+ regex: '\\b(?:[a-z]\\w*\\.)*[A-Z]+\\w*<',
+ push:
+ [ { token: 'entity.other.inherited-class.vala',
+ regex: '>|[^\\w\\s,<]',
+ next: 'pop' },
+ { include: '#object-types' },
+ { token: 'storage.type.generic.vala',
+ regex: '<',
+ push:
+ [ { token: 'storage.type.generic.vala',
+ regex: '>|[^\\w\\s,<]',
+ next: 'pop' },
+ { defaultToken: 'storage.type.generic.vala' } ],
+ comment: 'This is just to support <>\'s with no actual type prefix' },
+ { defaultToken: 'entity.other.inherited-class.vala' } ] },
+ { token:
+ [ 'entity.other.inherited-class.vala',
+ 'keyword.operator.dereference.vala',
+ 'entity.other.inherited-class.vala' ],
+ regex: '\\b(?:([a-z]\\w*)(\\.))*([A-Z]+\\w*)' } ],
+ '#parameters':
+ [ { token: 'storage.modifier.vala', regex: 'final' },
+ { include: '#primitive-arrays' },
+ { include: '#primitive-types' },
+ { include: '#object-types' },
+ { token: 'variable.parameter.vala', regex: '\\w+' } ],
+ '#parens':
+ [ { token: 'text',
+ regex: '\\(',
+ push:
+ [ { token: 'text', regex: '\\)', next: 'pop' },
+ { include: '#code' } ] } ],
+ '#primitive-arrays':
+ [ { token: 'storage.type.primitive.array.vala',
+ regex: '\\b(?:bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|int8|int16|int32|int64|uint8|uint16|uint32|uint64)(?:\\[\\])*\\b' } ],
+ '#primitive-types':
+ [ { token: 'storage.type.primitive.vala',
+ regex: '\\b(?:var|bool|byte|sbyte|char|decimal|double|float|int|uint|long|ulong|object|short|ushort|string|void|signal|int8|int16|int32|int64|uint8|uint16|uint32|uint64)\\b',
+ comment: 'var is not really a primitive, but acts like one in most cases' } ],
+ '#storage-modifiers':
+ [ { token: 'storage.modifier.vala',
+ regex: '\\b(?:public|private|protected|internal|static|final|sealed|virtual|override|abstract|readonly|volatile|dynamic|async|unsafe|out|ref|weak|owned|unowned|const)\\b',
+ comment: 'Not sure about unsafe and readonly' } ],
+ '#strings':
+ [ { token: 'punctuation.definition.string.begin.vala',
+ regex: '@"',
+ push:
+ [ { token: 'punctuation.definition.string.end.vala',
+ regex: '"',
+ next: 'pop' },
+ { token: 'constant.character.escape.vala',
+ regex: '\\\\.|%[\\w\\.\\-]+|\\$(?:\\w+|\\([\\w\\s\\+\\-\\*\\/]+\\))' },
+ { defaultToken: 'string.quoted.interpolated.vala' } ] },
+ { token: 'punctuation.definition.string.begin.vala',
+ regex: '"',
+ push:
+ [ { token: 'punctuation.definition.string.end.vala',
+ regex: '"',
+ next: 'pop' },
+ { token: 'constant.character.escape.vala', regex: '\\\\.' },
+ { token: 'constant.character.escape.vala',
+ regex: '%[\\w\\.\\-]+' },
+ { defaultToken: 'string.quoted.double.vala' } ] },
+ { token: 'punctuation.definition.string.begin.vala',
+ regex: '\'',
+ push:
+ [ { token: 'punctuation.definition.string.end.vala',
+ regex: '\'',
+ next: 'pop' },
+ { token: 'constant.character.escape.vala', regex: '\\\\.' },
+ { defaultToken: 'string.quoted.single.vala' } ] },
+ { token: 'punctuation.definition.string.begin.vala',
+ regex: '"""',
+ push:
+ [ { token: 'punctuation.definition.string.end.vala',
+ regex: '"""',
+ next: 'pop' },
+ { token: 'constant.character.escape.vala',
+ regex: '%[\\w\\.\\-]+' },
+ { defaultToken: 'string.quoted.triple.vala' } ] } ],
+ '#throws':
+ [ { token: 'storage.modifier.vala',
+ regex: 'throws',
+ push:
+ [ { token: 'meta.throwables.vala', regex: '(?={|;)', next: 'pop' },
+ { include: '#object-types' },
+ { defaultToken: 'meta.throwables.vala' } ] } ],
+ '#values':
+ [ { include: '#strings' },
+ { include: '#object-types' },
+ { include: '#constants-and-special-vars' } ] }
+
+ this.normalizeRules();
+};
+
+ValaHighlightRules.metaData = {
+ comment: 'Based heavily on the Java bundle\'s language syntax. TODO:\n* Closures\n* Delegates\n* Properties: Better support for properties.\n* Annotations\n* Error domains\n* Named arguments\n* Array slicing, negative indexes, multidimensional\n* construct blocks\n* lock blocks?\n* regex literals\n* DocBlock syntax highlighting. (Currently importing javadoc)\n* Folding rule for comments.\n',
+ fileTypes: [ 'vala' ],
+ foldingStartMarker: '(\\{\\s*(//.*)?$|^\\s*// \\{\\{\\{)',
+ foldingStopMarker: '^\\s*(\\}|// \\}\\}\\}$)',
+ name: 'Vala',
+ scopeName: 'source.vala' }
+
+
+oop.inherits(ValaHighlightRules, TextHighlightRules);
+
+exports.ValaHighlightRules = ValaHighlightRules;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).call(MatchingBraceOutdent.prototype);
+
+exports.MatchingBraceOutdent = MatchingBraceOutdent;
+});
+
+ace.define("ace/mode/vala",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/vala_highlight_rules","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","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 ValaHighlightRules = require("./vala_highlight_rules").ValaHighlightRules;
+var FoldMode = require("./folding/cstyle").FoldMode;
+var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+
+var Mode = function() {
+ this.HighlightRules = ValaHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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.$id = "ace/mode/vala"
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-vbscript.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-vbscript.js
new file mode 100644
index 00000000..010be5be
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-vbscript.js
@@ -0,0 +1,199 @@
+ace.define("ace/mode/vbscript_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 VBScriptHighlightRules = function() {
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword.control.asp": "If|Then|Else|ElseIf|End|While|Wend|For|To|Each|Case|Select|Return"
+ + "|Continue|Do|Until|Loop|Next|With|Exit|Function|Property|Type|Enum|Sub|IIf",
+ "storage.type.asp": "Dim|Call|Class|Const|Dim|Redim|Set|Let|Get|New|Randomize|Option|Explicit",
+ "storage.modifier.asp": "Private|Public|Default",
+ "keyword.operator.asp": "Mod|And|Not|Or|Xor|as",
+ "constant.language.asp": "Empty|False|Nothing|Null|True",
+ "support.class.asp": "Application|ObjectContext|Request|Response|Server|Session",
+ "support.class.collection.asp": "Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables",
+ "support.constant.asp": "TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute"
+ + "|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout",
+ "support.function.asp": "Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog"
+ + "|BinaryWrite|Clear|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex",
+ "support.function.event.asp": "Application_OnEnd|Application_OnStart"
+ + "|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart",
+ "support.function.vb.asp": "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",
+ "support.type.vb.asp": "vbtrue|vbfalse|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"
+ }, "identifier", true);
+
+ this.$rules = {
+ "start": [
+ {
+ token: [
+ "meta.ending-space"
+ ],
+ regex: "$"
+ },
+ {
+ token: [null],
+ regex: "^(?=\\t)",
+ next: "state_3"
+ },
+ {
+ token: [null],
+ regex: "^(?= )",
+ next: "state_4"
+ },
+ {
+ token: [
+ "text",
+ "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*)(\\()([^)]*)(\\))"
+ },
+ {
+ token: "punctuation.definition.comment.asp",
+ regex: "'|REM(?=\\s|$)",
+ next: "comment",
+ caseInsensitive: true
+ },
+ {
+ token: "storage.type.asp",
+ regex: "On Error Resume Next|On Error GoTo",
+ caseInsensitive: true
+ },
+ {
+ 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: "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"
+ },
+ {
+ regex: "\\w+",
+ token: keywordMapper
+ },
+ {
+ 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"
+ },
+ {
+ defaultToken: "meta.leading-space"
+ }
+ ],
+ "comment": [
+ {
+ token: "comment.line.apostrophe.asp",
+ regex: "$|(?=(?:%>))",
+ next: "start"
+ },
+ {
+ defaultToken: "comment.line.apostrophe.asp"
+ }
+ ],
+ "string": [
+ {
+ token: "constant.character.escape.apostrophe.asp",
+ regex: '""'
+ },
+ {
+ token: "string.quoted.double.asp",
+ regex: '"',
+ next: "start"
+ },
+ {
+ defaultToken: "string.quoted.double.asp"
+ }
+ ]
+}
+
+};
+
+oop.inherits(VBScriptHighlightRules, TextHighlightRules);
+
+exports.VBScriptHighlightRules = VBScriptHighlightRules;
+});
+
+ace.define("ace/mode/vbscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vbscript_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var VBScriptHighlightRules = require("./vbscript_highlight_rules").VBScriptHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = VBScriptHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = ["'", "REM"];
+
+ this.$id = "ace/mode/vbscript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-velocity.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-velocity.js
new file mode 100644
index 00000000..2a420b66
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-velocity.js
@@ -0,0 +1,2762 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).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) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|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 = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen";
+var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace";
+
+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);
+
+ this.$rules = {
+ "start" : [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "ruleset"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}"
+ }, {
+ token: "string",
+ regex: "@",
+ next: "media"
+ }, {
+ token: "keyword",
+ regex: "#[a-z0-9-_]+"
+ }, {
+ token: "keyword",
+ regex: "%"
+ }, {
+ token: "variable",
+ regex: "\\.[a-z0-9-_]+"
+ }, {
+ token: "string",
+ regex: ":[a-z0-9-_]+"
+ }, {
+ token : "constant.numeric",
+ regex : numRe
+ }, {
+ token: "constant",
+ regex: "[a-z0-9-_]+"
+ }, {
+ caseInsensitive: true
+ }],
+
+ "media": [{
+ include : ["strings", "url", "comments"]
+ }, {
+ token: "paren.lparen",
+ regex: "\\{",
+ next: "start"
+ }, {
+ token: "paren.rparen",
+ regex: "\\}",
+ next: "start"
+ }, {
+ token: "string",
+ regex: ";",
+ next: "start"
+ }, {
+ token: "keyword",
+ regex: "(?:media|supports|document|charset|import|namespace|media|supports|document"
+ + "|page|font|keyframes|viewport|counter-style|font-feature-values"
+ + "|swash|ornaments|annotation|stylistic|styleset|character-variant)"
+ }],
+
+ "comments" : [{
+ token: "comment", // multi line comment
+ regex: "\\/\\*",
+ push: [{
+ token : "comment",
+ regex : "\\*\\/",
+ next : "pop"
+ }, {
+ defaultToken : "comment"
+ }]
+ }],
+
+ "ruleset" : [{
+ regex : "-(webkit|ms|moz|o)-",
+ token : "text"
+ }, {
+ token : "paren.rparen",
+ regex : "\\}",
+ next : "start"
+ }, {
+ include : ["strings", "url", "comments"]
+ }, {
+ 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
+ }, {
+ include: "url"
+ }, {
+ token : keywordMapper,
+ regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"
+ }, {
+ caseInsensitive: true
+ }],
+
+ url: [{
+ token : "support.function",
+ regex : "(?:url(:?-prefix)?|domain|regexp)\\(",
+ push: [{
+ token : "support.function",
+ regex : "\\)",
+ next : "pop"
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+
+ strings: [{
+ token : "string.start",
+ regex : "'",
+ push : [{
+ token : "string.end",
+ regex : "'|$",
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }, {
+ token : "string.start",
+ regex : '"',
+ push : [{
+ token : "string.end",
+ regex : '"|$',
+ next: "pop"
+ }, {
+ include : "escapes"
+ }, {
+ token : "constant.language.escape",
+ regex : /\\$/,
+ consumeLineEnd: true
+ }, {
+ defaultToken: "string"
+ }]
+ }],
+ escapes: [{
+ token : "constant.language.escape",
+ regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/
+ }]
+
+ };
+
+ this.normalizeRules();
+};
+
+oop.inherits(CssHighlightRules, TextHighlightRules);
+
+exports.CssHighlightRules = CssHighlightRules;
+
+});
+
+ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var propertyMap = {
+ "background": {"#$0": 1},
+ "background-color": {"#$0": 1, "transparent": 1, "fixed": 1},
+ "background-image": {"url('/$0')": 1},
+ "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1},
+ "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2},
+ "background-attachment": {"scroll": 1, "fixed": 1},
+ "background-size": {"cover": 1, "contain": 1},
+ "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1},
+ "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1},
+ "border-color": {"#$0": 1},
+ "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2},
+ "border-collapse": {"collapse": 1, "separate": 1},
+ "bottom": {"px": 1, "em": 1, "%": 1},
+ "clear": {"left": 1, "right": 1, "both": 1, "none": 1},
+ "color": {"#$0": 1, "rgb(#$00,0,0)": 1},
+ "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1},
+ "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1},
+ "empty-cells": {"show": 1, "hide": 1},
+ "float": {"left": 1, "right": 1, "none": 1},
+ "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1},
+ "font-size": {"px": 1, "em": 1, "%": 1},
+ "font-weight": {"bold": 1, "normal": 1},
+ "font-style": {"italic": 1, "normal": 1},
+ "font-variant": {"normal": 1, "small-caps": 1},
+ "height": {"px": 1, "em": 1, "%": 1},
+ "left": {"px": 1, "em": 1, "%": 1},
+ "letter-spacing": {"normal": 1},
+ "line-height": {"normal": 1},
+ "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1},
+ "margin": {"px": 1, "em": 1, "%": 1},
+ "margin-right": {"px": 1, "em": 1, "%": 1},
+ "margin-left": {"px": 1, "em": 1, "%": 1},
+ "margin-top": {"px": 1, "em": 1, "%": 1},
+ "margin-bottom": {"px": 1, "em": 1, "%": 1},
+ "max-height": {"px": 1, "em": 1, "%": 1},
+ "max-width": {"px": 1, "em": 1, "%": 1},
+ "min-height": {"px": 1, "em": 1, "%": 1},
+ "min-width": {"px": 1, "em": 1, "%": 1},
+ "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1},
+ "padding": {"px": 1, "em": 1, "%": 1},
+ "padding-top": {"px": 1, "em": 1, "%": 1},
+ "padding-right": {"px": 1, "em": 1, "%": 1},
+ "padding-bottom": {"px": 1, "em": 1, "%": 1},
+ "padding-left": {"px": 1, "em": 1, "%": 1},
+ "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1},
+ "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1},
+ "right": {"px": 1, "em": 1, "%": 1},
+ "table-layout": {"fixed": 1, "auto": 1},
+ "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1},
+ "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1},
+ "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1},
+ "top": {"px": 1, "em": 1, "%": 1},
+ "vertical-align": {"top": 1, "bottom": 1},
+ "visibility": {"hidden": 1, "visible": 1},
+ "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1},
+ "width": {"px": 1, "em": 1, "%": 1},
+ "word-spacing": {"normal": 1},
+ "filter": {"alpha(opacity=$0100)": 1},
+
+ "text-shadow": {"$02px 2px 2px #777": 1},
+ "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1},
+ "-moz-border-radius": 1,
+ "-moz-border-radius-topright": 1,
+ "-moz-border-radius-bottomright": 1,
+ "-moz-border-radius-topleft": 1,
+ "-moz-border-radius-bottomleft": 1,
+ "-webkit-border-radius": 1,
+ "-webkit-border-top-right-radius": 1,
+ "-webkit-border-top-left-radius": 1,
+ "-webkit-border-bottom-right-radius": 1,
+ "-webkit-border-bottom-left-radius": 1,
+ "-moz-box-shadow": 1,
+ "-webkit-box-shadow": 1,
+ "transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1},
+ "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 }
+};
+
+var CssCompletions = function() {
+
+};
+
+(function() {
+
+ this.completionsDefined = false;
+
+ this.defineCompletions = function() {
+ if (document) {
+ var style = document.createElement('c').style;
+
+ for (var i in style) {
+ if (typeof style[i] !== 'string')
+ continue;
+
+ var name = i.replace(/[A-Z]/g, function(x) {
+ return '-' + x.toLowerCase();
+ });
+
+ if (!propertyMap.hasOwnProperty(name))
+ propertyMap[name] = 1;
+ }
+ }
+
+ this.completionsDefined = true;
+ }
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ if (!this.completionsDefined) {
+ this.defineCompletions();
+ }
+
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (state==='ruleset'){
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/:[^;]+$/.test(line)) {
+ /([\w\-]+):[^:]*$/.test(line);
+
+ return this.getPropertyValueCompletions(state, session, pos, prefix);
+ } else {
+ return this.getPropertyCompletions(state, session, pos, prefix);
+ }
+ }
+
+ return [];
+ };
+
+ this.getPropertyCompletions = function(state, session, pos, prefix) {
+ var properties = Object.keys(propertyMap);
+ return properties.map(function(property){
+ return {
+ caption: property,
+ snippet: property + ': $0',
+ meta: "property",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getPropertyValueCompletions = function(state, session, pos, prefix) {
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1];
+
+ if (!property)
+ return [];
+ var values = [];
+ if (property in propertyMap && typeof propertyMap[property] === "object") {
+ values = Object.keys(propertyMap[property]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "property value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(CssCompletions.prototype);
+
+exports.CssCompletions = CssCompletions;
+});
+
+ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var CstyleBehaviour = require("./cstyle").CstyleBehaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+
+var CssBehaviour = function () {
+
+ this.inherit(CstyleBehaviour);
+
+ this.add("colon", "insertion", function (state, action, editor, session, text) {
+ if (text === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ':') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ if (!line.substring(cursor.column).match(/^\s*;/)) {
+ return {
+ text: ':;',
+ selection: [1, 1]
+ }
+ }
+ }
+ }
+ });
+
+ this.add("colon", "deletion", function (state, action, editor, session, range) {
+ var selected = session.doc.getTextRange(range);
+ if (!range.isMultiLine() && selected === ':') {
+ var cursor = editor.getCursorPosition();
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+ if (token && token.value.match(/\s+/)) {
+ token = iterator.stepBackward();
+ }
+ if (token && token.type === 'support.type') {
+ 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("semicolon", "insertion", function (state, action, editor, session, text) {
+ if (text === ';') {
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ if (rightChar === ';') {
+ return {
+ text: '',
+ selection: [1, 1]
+ }
+ }
+ }
+ });
+
+}
+oop.inherits(CssBehaviour, CstyleBehaviour);
+
+exports.CssBehaviour = CssBehaviour;
+});
+
+ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var CssCompletions = require("./css_completions").CssCompletions;
+var CssBehaviour = require("./behaviour/css").CssBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = CssHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CssBehaviour();
+ this.$completer = new CssCompletions();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.foldingRules = "cStyle";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+ var tokens = this.getTokenizer().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.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("annotate", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/css";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
+
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+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 XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+
+var tagMap = lang.createMap({
+ a : 'anchor',
+ button : 'form',
+ form : 'form',
+ img : 'image',
+ input : 'form',
+ label : 'form',
+ option : 'form',
+ script : 'script',
+ select : 'form',
+ textarea : 'form',
+ style : 'style',
+ table : 'table',
+ tbody : 'table',
+ td : 'table',
+ tfoot : 'table',
+ th : 'table',
+ tr : 'table'
+});
+
+var HtmlHighlightRules = function() {
+ XmlHighlightRules.call(this);
+
+ this.addRules({
+ attributes: [{
+ include : "tag_whitespace"
+ }, {
+ token : "entity.other.attribute-name.xml",
+ regex : "[-_a-zA-Z0-9:.]+"
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "=",
+ push : [{
+ include: "tag_whitespace"
+ }, {
+ token : "string.unquoted.attribute-value.html",
+ regex : "[^<>='\"`\\s]+",
+ next : "pop"
+ }, {
+ token : "empty",
+ regex : "",
+ next : "pop"
+ }]
+ }, {
+ include : "attribute_value"
+ }],
+ tag: [{
+ token : function(start, tag) {
+ var group = tagMap[tag];
+ return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml",
+ "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"];
+ },
+ regex : "(</?)([-_a-zA-Z0-9:.]+)",
+ next: "tag_stuff"
+ }],
+ tag_stuff: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ });
+
+ this.embedTagRules(CssHighlightRules, "css-", "style");
+ this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script");
+
+ if (this.constructor === HtmlHighlightRules)
+ this.normalizeRules();
+};
+
+oop.inherits(HtmlHighlightRules, XmlHighlightRules);
+
+exports.HtmlHighlightRules = HtmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+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) {
+ if (typeof state != "string")
+ state = state[0];
+ 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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+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(voidElements, optionalTags) {
+ MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), {
+ "js-": new CStyleFoldMode(),
+ "css-": new CStyleFoldMode()
+ });
+};
+
+oop.inherits(FoldMode, MixedFoldMode);
+
+});
+
+ace.define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+var TokenIterator = require("../token_iterator").TokenIterator;
+
+var commonAttributes = [
+ "accesskey",
+ "class",
+ "contenteditable",
+ "contextmenu",
+ "dir",
+ "draggable",
+ "dropzone",
+ "hidden",
+ "id",
+ "inert",
+ "itemid",
+ "itemprop",
+ "itemref",
+ "itemscope",
+ "itemtype",
+ "lang",
+ "spellcheck",
+ "style",
+ "tabindex",
+ "title",
+ "translate"
+];
+
+var eventAttributes = [
+ "onabort",
+ "onblur",
+ "oncancel",
+ "oncanplay",
+ "oncanplaythrough",
+ "onchange",
+ "onclick",
+ "onclose",
+ "oncontextmenu",
+ "oncuechange",
+ "ondblclick",
+ "ondrag",
+ "ondragend",
+ "ondragenter",
+ "ondragleave",
+ "ondragover",
+ "ondragstart",
+ "ondrop",
+ "ondurationchange",
+ "onemptied",
+ "onended",
+ "onerror",
+ "onfocus",
+ "oninput",
+ "oninvalid",
+ "onkeydown",
+ "onkeypress",
+ "onkeyup",
+ "onload",
+ "onloadeddata",
+ "onloadedmetadata",
+ "onloadstart",
+ "onmousedown",
+ "onmousemove",
+ "onmouseout",
+ "onmouseover",
+ "onmouseup",
+ "onmousewheel",
+ "onpause",
+ "onplay",
+ "onplaying",
+ "onprogress",
+ "onratechange",
+ "onreset",
+ "onscroll",
+ "onseeked",
+ "onseeking",
+ "onselect",
+ "onshow",
+ "onstalled",
+ "onsubmit",
+ "onsuspend",
+ "ontimeupdate",
+ "onvolumechange",
+ "onwaiting"
+];
+
+var globalAttributes = commonAttributes.concat(eventAttributes);
+
+var attributeMap = {
+ "html": {"manifest": 1},
+ "head": {},
+ "title": {},
+ "base": {"href": 1, "target": 1},
+ "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1},
+ "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1},
+ "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1},
+ "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1},
+ "noscript": {"href": 1},
+ "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1},
+ "section": {},
+ "nav": {},
+ "article": {"pubdate": 1},
+ "aside": {},
+ "h1": {},
+ "h2": {},
+ "h3": {},
+ "h4": {},
+ "h5": {},
+ "h6": {},
+ "header": {},
+ "footer": {},
+ "address": {},
+ "main": {},
+ "p": {},
+ "hr": {},
+ "pre": {},
+ "blockquote": {"cite": 1},
+ "ol": {"start": 1, "reversed": 1},
+ "ul": {},
+ "li": {"value": 1},
+ "dl": {},
+ "dt": {},
+ "dd": {},
+ "figure": {},
+ "figcaption": {},
+ "div": {},
+ "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1},
+ "em": {},
+ "strong": {},
+ "small": {},
+ "s": {},
+ "cite": {},
+ "q": {"cite": 1},
+ "dfn": {},
+ "abbr": {},
+ "data": {},
+ "time": {"datetime": 1},
+ "code": {},
+ "var": {},
+ "samp": {},
+ "kbd": {},
+ "sub": {},
+ "sup": {},
+ "i": {},
+ "b": {},
+ "u": {},
+ "mark": {},
+ "ruby": {},
+ "rt": {},
+ "rp": {},
+ "bdi": {},
+ "bdo": {},
+ "span": {},
+ "br": {},
+ "wbr": {},
+ "ins": {"cite": 1, "datetime": 1},
+ "del": {"cite": 1, "datetime": 1},
+ "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1},
+ "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}},
+ "embed": {"src": 1, "height": 1, "width": 1, "type": 1},
+ "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1},
+ "param": {"name": 1, "value": 1},
+ "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}},
+ "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }},
+ "source": {"src": 1, "type": 1, "media": 1},
+ "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1},
+ "canvas": {"width": 1, "height": 1},
+ "map": {"name": 1},
+ "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1},
+ "svg": {},
+ "math": {},
+ "table": {"summary": 1},
+ "caption": {},
+ "colgroup": {"span": 1},
+ "col": {"span": 1},
+ "tbody": {},
+ "thead": {},
+ "tfoot": {},
+ "tr": {},
+ "td": {"headers": 1, "rowspan": 1, "colspan": 1},
+ "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1},
+ "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}},
+ "fieldset": {"disabled": 1, "form": 1, "name": 1},
+ "legend": {},
+ "label": {"form": 1, "for": 1},
+ "input": {
+ "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1},
+ "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1},
+ "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}},
+ "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}},
+ "datalist": {},
+ "optgroup": {"disabled": 1, "label": 1},
+ "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1},
+ "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}},
+ "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1},
+ "output": {"for": 1, "form": 1, "name": 1},
+ "progress": {"value": 1, "max": 1},
+ "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1},
+ "details": {"open": 1},
+ "summary": {},
+ "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1},
+ "menu": {"type": 1, "label": 1},
+ "dialog": {"open": 1}
+};
+
+var elements = Object.keys(attributeMap);
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+function findTagName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "tag-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+function findAttributeName(session, pos) {
+ var iterator = new TokenIterator(session, pos.row, pos.column);
+ var token = iterator.getCurrentToken();
+ while (token && !is(token, "attribute-name")){
+ token = iterator.stepBackward();
+ }
+ if (token)
+ return token.value;
+}
+
+var HtmlCompletions = function() {
+
+};
+
+(function() {
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ var token = session.getTokenAt(pos.row, pos.column);
+
+ if (!token)
+ return [];
+ if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open"))
+ return this.getTagCompletions(state, session, pos, prefix);
+ if (is(token, "tag-whitespace") || is(token, "attribute-name"))
+ return this.getAttributeCompletions(state, session, pos, prefix);
+ if (is(token, "attribute-value"))
+ return this.getAttributeValueCompletions(state, session, pos, prefix);
+ var line = session.getLine(pos.row).substr(0, pos.column);
+ if (/&[a-z]*$/i.test(line))
+ return this.getHTMLEntityCompletions(state, session, pos, prefix);
+
+ return [];
+ };
+
+ this.getTagCompletions = function(state, session, pos, prefix) {
+ return elements.map(function(element){
+ return {
+ value: element,
+ meta: "tag",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ if (!tagName)
+ return [];
+ var attributes = globalAttributes;
+ if (tagName in attributeMap) {
+ attributes = attributes.concat(Object.keys(attributeMap[tagName]));
+ }
+ return attributes.map(function(attribute){
+ return {
+ caption: attribute,
+ snippet: attribute + '="$0"',
+ meta: "attribute",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getAttributeValueCompletions = function(state, session, pos, prefix) {
+ var tagName = findTagName(session, pos);
+ var attributeName = findAttributeName(session, pos);
+
+ if (!tagName)
+ return [];
+ var values = [];
+ if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") {
+ values = Object.keys(attributeMap[tagName][attributeName]);
+ }
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "attribute value",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+ this.getHTMLEntityCompletions = function(state, session, pos, prefix) {
+ var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;'];
+
+ return values.map(function(value){
+ return {
+ caption: value,
+ snippet: value,
+ meta: "html entity",
+ score: Number.MAX_VALUE
+ };
+ });
+ };
+
+}).call(HtmlCompletions.prototype);
+
+exports.HtmlCompletions = HtmlCompletions;
+});
+
+ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var JavaScriptMode = require("./javascript").Mode;
+var CssMode = require("./css").Mode;
+var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var HtmlFoldMode = require("./folding/html").FoldMode;
+var HtmlCompletions = require("./html_completions").HtmlCompletions;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"];
+var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"];
+
+var Mode = function(options) {
+ this.fragmentContext = options && options.fragmentContext;
+ this.HighlightRules = HtmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.$completer = new HtmlCompletions();
+
+ this.createModeDelegates({
+ "js-": JavaScriptMode,
+ "css-": CssMode
+ });
+
+ this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags));
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.voidElements = lang.arrayToMap(voidElements);
+
+ this.getNextLineIndent = function(state, line, tab) {
+ return this.$getIndent(line);
+ };
+
+ this.checkOutdent = function(state, line, input) {
+ return false;
+ };
+
+ this.getCompletions = function(state, session, pos, prefix) {
+ return this.$completer.getCompletions(state, session, pos, prefix);
+ };
+
+ this.createWorker = function(session) {
+ if (this.constructor != Mode)
+ return;
+ var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ if (this.fragmentContext)
+ worker.call("setOptions", [{context: this.fragmentContext}]);
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/html";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/velocity_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_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 HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules;
+
+var VelocityHighlightRules = function() {
+ HtmlHighlightRules.call(this);
+
+ var builtinConstants = lang.arrayToMap(
+ ('true|false|null').split('|')
+ );
+
+ var builtinFunctions = lang.arrayToMap(
+ ("_DateTool|_DisplayTool|_EscapeTool|_FieldTool|_MathTool|_NumberTool|_SerializerTool|_SortTool|_StringTool|_XPathTool").split('|')
+ );
+
+ var builtinVariables = lang.arrayToMap(
+ ('$contentRoot|$foreach').split('|')
+ );
+
+ var keywords = lang.arrayToMap(
+ ("#set|#macro|#include|#parse|" +
+ "#if|#elseif|#else|#foreach|" +
+ "#break|#end|#stop"
+ ).split('|')
+ );
+
+ this.$rules.start.push(
+ {
+ token : "comment",
+ regex : "##.*$"
+ },{
+ token : "comment.block", // multi line comment
+ regex : "#\\*",
+ next : "vm_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 (keywords.hasOwnProperty(value))
+ return "keyword";
+ else if (builtinConstants.hasOwnProperty(value))
+ return "constant.language";
+ else if (builtinVariables.hasOwnProperty(value))
+ return "variable.language";
+ else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1)))
+ return "support.function";
+ else if (value == "debugger")
+ return "invalid.deprecated";
+ else
+ if(value.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*)$/))
+ return "variable";
+ return "identifier";
+ },
+ regex : "[a-zA-Z$#][a-zA-Z0-9_]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ );
+
+ this.$rules["vm_comment"] = [
+ {
+ token : "comment", // closing comment
+ regex : "\\*#|-->",
+ next : "start"
+ }, {
+ defaultToken: "comment"
+ }
+ ];
+
+ this.$rules["vm_start"] = [
+ {
+ token: "variable",
+ regex: "}",
+ next: "pop"
+ }, {
+ 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 (keywords.hasOwnProperty(value))
+ return "keyword";
+ else if (builtinConstants.hasOwnProperty(value))
+ return "constant.language";
+ else if (builtinVariables.hasOwnProperty(value))
+ return "variable.language";
+ else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1)))
+ return "support.function";
+ else if (value == "debugger")
+ return "invalid.deprecated";
+ else
+ if(value.match(/^(\$[a-zA-Z_$][a-zA-Z0-9_]*)$/))
+ return "variable";
+ return "identifier";
+ },
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|"
+ }, {
+ token : "lparen",
+ regex : "[[({]"
+ }, {
+ token : "rparen",
+ regex : "[\\])}]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ }
+ ];
+
+ for (var i in this.$rules) {
+ this.$rules[i].unshift({
+ token: "variable",
+ regex: "\\${",
+ push: "vm_start"
+ });
+ }
+
+ this.normalizeRules();
+};
+
+oop.inherits(VelocityHighlightRules, TextHighlightRules);
+
+exports.VelocityHighlightRules = VelocityHighlightRules;
+});
+
+ace.define("ace/mode/folding/velocity",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/velocity",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/velocity_highlight_rules","ace/mode/folding/velocity"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var HtmlMode = require("./html").Mode;
+var VelocityHighlightRules = require("./velocity_highlight_rules").VelocityHighlightRules;
+var FoldMode = require("./folding/velocity").FoldMode;
+
+var Mode = function() {
+ HtmlMode.call(this);
+ this.HighlightRules = VelocityHighlightRules;
+ this.foldingRules = new FoldMode();
+};
+oop.inherits(Mode, HtmlMode);
+
+(function() {
+ this.lineCommentStart = "##";
+ this.blockComment = {start: "#*", end: "*#"};
+ this.$id = "ace/mode/velocity";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-verilog.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-verilog.js
new file mode 100644
index 00000000..7def13b9
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-verilog.js
@@ -0,0 +1,104 @@
+ace.define("ace/mode/verilog_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 VerilogHighlightRules = function() {
+var keywords = "always|and|assign|automatic|begin|buf|bufif0|bufif1|case|casex|casez|cell|cmos|config|" +
+ "deassign|default|defparam|design|disable|edge|else|end|endcase|endconfig|endfunction|endgenerate|endmodule|" +
+ "endprimitive|endspecify|endtable|endtask|event|for|force|forever|fork|function|generate|genvar|highz0|" +
+ "highz1|if|ifnone|incdir|include|initial|inout|input|instance|integer|join|large|liblist|library|localparam|" +
+ "macromodule|medium|module|nand|negedge|nmos|nor|noshowcancelled|not|notif0|notif1|or|output|parameter|pmos|" +
+ "posedge|primitive|pull0|pull1|pulldown|pullup|pulsestyle_onevent|pulsestyle_ondetect|rcmos|real|realtime|" +
+ "reg|release|repeat|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|showcancelled|signed|small|specify|specparam|" +
+ "strong0|strong1|supply0|supply1|table|task|time|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|" +
+ "unsigned|use|vectored|wait|wand|weak0|weak1|while|wire|wor|xnor|xor" +
+ "begin|bufif0|bufif1|case|casex|casez|config|else|end|endcase|endconfig|endfunction|" +
+ "endgenerate|endmodule|endprimitive|endspecify|endtable|endtask|for|forever|function|generate|if|ifnone|" +
+ "macromodule|module|primitive|repeat|specify|table|task|while";
+
+ var builtinConstants = (
+ "true|false|null"
+ );
+
+ var builtinFunctions = (
+ "count|min|max|avg|sum|rank|now|coalesce|main"
+ );
+
+ var keywordMapper = this.createKeywordMapper({
+ "support.function": builtinFunctions,
+ "keyword": keywords,
+ "constant.language": builtinConstants
+ }, "identifier", true);
+
+ this.$rules = {
+ "start" : [ {
+ token : "comment",
+ regex : "//.*$"
+ }, {
+ token : "comment.start",
+ regex : "/\\*",
+ next : [
+ { token : "comment.end", regex : "\\*/", next: "start" },
+ { defaultToken : "comment" }
+ ]
+ }, {
+ 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+"
+ } ]
+ };
+ this.normalizeRules();
+};
+
+oop.inherits(VerilogHighlightRules, TextHighlightRules);
+
+exports.VerilogHighlightRules = VerilogHighlightRules;
+});
+
+ace.define("ace/mode/verilog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/verilog_highlight_rules","ace/range"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var VerilogHighlightRules = require("./verilog_highlight_rules").VerilogHighlightRules;
+var Range = require("../range").Range;
+
+var Mode = function() {
+ this.HighlightRules = VerilogHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+
+ this.$id = "ace/mode/verilog";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-vhdl.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-vhdl.js
new file mode 100644
index 00000000..41dab579
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-vhdl.js
@@ -0,0 +1,110 @@
+ace.define("ace/mode/vhdl_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 VHDLHighlightRules = function() {
+
+
+
+ var keywords = "access|after|ailas|all|architecture|assert|attribute|"+
+ "begin|block|buffer|bus|case|component|configuration|"+
+ "disconnect|downto|else|elsif|end|entity|file|for|function|"+
+ "generate|generic|guarded|if|impure|in|inertial|inout|is|"+
+ "label|linkage|literal|loop|mapnew|next|of|on|open|"+
+ "others|out|port|process|pure|range|record|reject|"+
+ "report|return|select|shared|subtype|then|to|transport|"+
+ "type|unaffected|united|until|wait|when|while|with";
+
+ var storageType = "bit|bit_vector|boolean|character|integer|line|natural|"+
+ "positive|real|register|severity|signal|signed|"+
+ "std_logic|std_logic_vector|string||text|time|unsigned|"+
+ "variable";
+
+ var storageModifiers = "array|constant";
+
+ var keywordOperators = "abs|and|mod|nand|nor|not|rem|rol|ror|sla|sll|sra"+
+ "srl|xnor|xor";
+
+ var builtinConstants = (
+ "true|false|null"
+ );
+
+
+ var keywordMapper = this.createKeywordMapper({
+ "keyword.operator": keywordOperators,
+ "keyword": keywords,
+ "constant.language": builtinConstants,
+ "storage.modifier": storageModifiers,
+ "storage.type": storageType
+ }, "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 : "keyword", // pre-compiler directives
+ regex : "\\s*(?:library|package|use)\\b"
+ }, {
+ token : keywordMapper,
+ regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
+ }, {
+ token : "keyword.operator",
+ regex : "&|\\*|\\+|\\-|\\/|<|=|>|\\||=>|\\*\\*|:=|\\/=|>=|<=|<>"
+ }, {
+ token : "punctuation.operator",
+ regex : "\\'|\\:|\\,|\\;|\\."
+ },{
+ token : "paren.lparen",
+ regex : "[[(]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])]"
+ }, {
+ token : "text",
+ regex : "\\s+"
+ } ]
+
+
+ };
+};
+
+oop.inherits(VHDLHighlightRules, TextHighlightRules);
+
+exports.VHDLHighlightRules = VHDLHighlightRules;
+});
+
+ace.define("ace/mode/vhdl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vhdl_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var VHDLHighlightRules = require("./vhdl_highlight_rules").VHDLHighlightRules;
+
+var Mode = function() {
+ this.HighlightRules = VHDLHighlightRules;
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "--";
+
+ this.$id = "ace/mode/vhdl";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-wollok.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-wollok.js
new file mode 100644
index 00000000..22c64ac2
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-wollok.js
@@ -0,0 +1,905 @@
+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
+ },
+ DocCommentHighlightRules.getTagRule(),
+ {
+ defaultToken : "comment.doc",
+ caseInsensitive: true
+ }]
+ };
+};
+
+oop.inherits(DocCommentHighlightRules, TextHighlightRules);
+
+DocCommentHighlightRules.getTagRule = function(start) {
+ return {
+ token : "comment.doc.tag.storage.type",
+ regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b"
+ };
+}
+
+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/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*";
+
+var JavaScriptHighlightRules = function(options) {
+ 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|async|await|" +
+ "break|case|catch|continue|default|delete|do|else|finally|for|function|" +
+ "if|in|of|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",
+ "constant.language.boolean": "true|false"
+ }, "identifier");
+ var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void";
+
+ var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex
+ "u[0-9a-fA-F]{4}|" + // unicode
+ "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode
+ "[0-2][0-7]{0,2}|" + // oct
+ "3[0-7][0-7]?|" + // oct
+ "[4-7][0-7]?|" + //oct
+ ".)";
+
+ this.$rules = {
+ "no_regex" : [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("no_regex"),
+ {
+ token : "string",
+ regex : "'(?=.)",
+ next : "qstring"
+ }, {
+ token : "string",
+ regex : '"(?=.)',
+ next : "qqstring"
+ }, {
+ token : "constant.numeric", // hexadecimal, octal and binary
+ regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/
+ }, {
+ token : "constant.numeric", // decimal integers and floats
+ regex : /(?:\d\d*(?:\.\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 : "keyword",
+ regex : "from(?=\\s*('|\"))"
+ }, {
+ token : "keyword",
+ regex : "(?:" + kwBeforeRe + ")\\b",
+ next : "start"
+ }, {
+ token : ["support.constant"],
+ regex : /that\b/
+ }, {
+ token : ["storage.type", "punctuation.operator", "support.function.firebug"],
+ regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/
+ }, {
+ token : keywordMapper,
+ regex : identifierRe
+ }, {
+ token : "punctuation.operator",
+ regex : /[.](?![.])/,
+ next : "property"
+ }, {
+ token : "storage.type",
+ regex : /=>/
+ }, {
+ token : "keyword.operator",
+ regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,
+ next : "start"
+ }, {
+ token : "punctuation.operator",
+ regex : /[?:,;.]/,
+ next : "start"
+ }, {
+ token : "paren.lparen",
+ regex : /[\[({]/,
+ next : "start"
+ }, {
+ token : "paren.rparen",
+ regex : /[\])}]/
+ }, {
+ token: "comment",
+ regex: /^#!.*$/
+ }
+ ],
+ property: [{
+ token : "text",
+ regex : "\\s+"
+ }, {
+ 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 : "punctuation.operator",
+ regex : /[.](?![.])/
+ }, {
+ token : "support.function",
+ regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/
+ }, {
+ token : "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|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/
+ }, {
+ token : "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 : "identifier",
+ regex : identifierRe
+ }, {
+ regex: "",
+ token: "empty",
+ next: "no_regex"
+ }
+ ],
+ "start": [
+ DocCommentHighlightRules.getStartRule("doc-start"),
+ comments("start"),
+ {
+ token: "string.regexp",
+ regex: "\\/",
+ next: "regex"
+ }, {
+ token : "text",
+ regex : "\\s+|^$",
+ next : "start"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "regex": [
+ {
+ token: "regexp.keyword.operator",
+ regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"
+ }, {
+ token: "string.regexp",
+ regex: "/[sxngimy]*",
+ next: "no_regex"
+ }, {
+ token : "invalid",
+ regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/
+ }, {
+ token : "constant.language.escape",
+ regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/
+ }, {
+ token : "constant.language.delimiter",
+ regex: /\|/
+ }, {
+ token: "constant.language.escape",
+ regex: /\[\^?/,
+ next: "regex_character_class"
+ }, {
+ token: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp"
+ }
+ ],
+ "regex_character_class": [
+ {
+ token: "regexp.charclass.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: "empty",
+ regex: "$",
+ next: "no_regex"
+ }, {
+ defaultToken: "string.regexp.charachterclass"
+ }
+ ],
+ "function_arguments": [
+ {
+ token: "variable.parameter",
+ regex: identifierRe
+ }, {
+ token: "punctuation.operator",
+ regex: "[, ]+"
+ }, {
+ token: "punctuation.operator",
+ regex: "$"
+ }, {
+ token: "empty",
+ regex: "",
+ next: "no_regex"
+ }
+ ],
+ "qqstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : '"|$',
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ],
+ "qstring" : [
+ {
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "string",
+ regex : "\\\\$",
+ consumeLineEnd : true
+ }, {
+ token : "string",
+ regex : "'|$",
+ next : "no_regex"
+ }, {
+ defaultToken: "string"
+ }
+ ]
+ };
+
+
+ if (!options || !options.noES6) {
+ this.$rules.no_regex.unshift({
+ regex: "[{}]", onMatch: function(val, state, stack) {
+ this.next = val == "{" ? this.nextState : "";
+ if (val == "{" && stack.length) {
+ stack.unshift("start", state);
+ }
+ else if (val == "}" && stack.length) {
+ stack.shift();
+ this.next = stack.shift();
+ if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1)
+ return "paren.quasi.end";
+ }
+ return val == "{" ? "paren.lparen" : "paren.rparen";
+ },
+ nextState: "start"
+ }, {
+ token : "string.quasi.start",
+ regex : /`/,
+ push : [{
+ token : "constant.language.escape",
+ regex : escapedRe
+ }, {
+ token : "paren.quasi.start",
+ regex : /\${/,
+ push : "start"
+ }, {
+ token : "string.quasi.end",
+ regex : /`/,
+ next : "pop"
+ }, {
+ defaultToken: "string.quasi"
+ }]
+ });
+
+ if (!options || options.jsx != false)
+ JSX.call(this);
+ }
+
+ this.embedRules(DocCommentHighlightRules, "doc-",
+ [ DocCommentHighlightRules.getEndRule("no_regex") ]);
+
+ this.normalizeRules();
+};
+
+oop.inherits(JavaScriptHighlightRules, TextHighlightRules);
+
+function JSX() {
+ var tagRegex = identifierRe.replace("\\d", "\\d\\-");
+ var jsxTag = {
+ onMatch : function(val, state, stack) {
+ var offset = val.charAt(1) == "/" ? 2 : 1;
+ if (offset == 1) {
+ if (state != this.nextState)
+ stack.unshift(this.next, this.nextState, 0);
+ else
+ stack.unshift(this.next);
+ stack[2]++;
+ } else if (offset == 2) {
+ if (state == this.nextState) {
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.shift();
+ stack.shift();
+ }
+ }
+ }
+ return [{
+ type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml",
+ value: val.slice(0, offset)
+ }, {
+ type: "meta.tag.tag-name.xml",
+ value: val.substr(offset)
+ }];
+ },
+ regex : "</?" + tagRegex + "",
+ next: "jsxAttributes",
+ nextState: "jsx"
+ };
+ this.$rules.start.unshift(jsxTag);
+ var jsxJsRule = {
+ regex: "{",
+ token: "paren.quasi.start",
+ push: "start"
+ };
+ this.$rules.jsx = [
+ jsxJsRule,
+ jsxTag,
+ {include : "reference"},
+ {defaultToken: "string"}
+ ];
+ this.$rules.jsxAttributes = [{
+ token : "meta.tag.punctuation.tag-close.xml",
+ regex : "/?>",
+ onMatch : function(value, currentState, stack) {
+ if (currentState == stack[0])
+ stack.shift();
+ if (value.length == 2) {
+ if (stack[0] == this.nextState)
+ stack[1]--;
+ if (!stack[1] || stack[1] < 0) {
+ stack.splice(0, 2);
+ }
+ }
+ this.next = stack[0] || "start";
+ return [{type: this.token, value: value}];
+ },
+ nextState: "jsx"
+ },
+ jsxJsRule,
+ comments("jsxAttributes"),
+ {
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ token : "text.tag-whitespace.xml",
+ regex : "\\s+"
+ }, {
+ token : "string.attribute-value.xml",
+ regex : "'",
+ stateName : "jsx_attr_q",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ stateName : "jsx_attr_qq",
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ },
+ jsxTag
+ ];
+ this.$rules.reference = [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }];
+}
+
+function comments(next) {
+ return [
+ {
+ token : "comment", // multi line comment
+ regex : /\/\*/,
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "\\*\\/", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }, {
+ token : "comment",
+ regex : "\\/\\/",
+ next: [
+ DocCommentHighlightRules.getTagRule(),
+ {token : "comment", regex : "$|^", next : next || "pop"},
+ {defaultToken : "comment", caseInsensitive: true}
+ ]
+ }
+ ];
+}
+exports.JavaScriptHighlightRules = JavaScriptHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Range = require("../../range").Range;
+var BaseFoldMode = require("./fold_mode").FoldMode;
+
+var FoldMode = exports.FoldMode = function(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules;
+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.HighlightRules = JavaScriptHighlightRules;
+
+ this.$outdent = new MatchingBraceOutdent();
+ this.$behaviour = new CstyleBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "//";
+ this.blockComment = {start: "/*", end: "*/"};
+ this.$quotes = {'"': '"', "'": "'", "`": "`"};
+
+ this.getNextLineIndent = function(state, line, tab) {
+ var indent = this.$getIndent(line);
+
+ var tokenizedLine = this.getTokenizer().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 == "no_regex") {
+ var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);
+ if (match) {
+ indent += tab;
+ }
+ } else if (state == "doc-start") {
+ if (endState == "start" || endState == "no_regex") {
+ 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("annotate", function(results) {
+ session.setAnnotations(results.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/javascript";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
+
+ace.define("ace/mode/wollok_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+
+var WollokHighlightRules = function() {
+ var keywords = (
+ "test|package|inherits|false|import|else|or|class|and|not|native|override|program|this|try|val|var|catch|object|super|throw|if|null|return|true|new|method"
+ );
+
+ var buildinConstants = ("null|assert|console");
+
+
+ var langClasses = (
+ "Object|Pair|String|Boolean|Number|Integer|Double|Collection|Set|List|Exception|Range" +
+ "|StackTraceElement"
+ );
+
+ 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", // single line
+ regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'
+ }, {
+ token : "string", // single line
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // hex
+ regex : /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/
+ }, {
+ token : "constant.numeric", // float
+ regex : /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\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 : "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(WollokHighlightRules, TextHighlightRules);
+
+exports.WollokHighlightRules = WollokHighlightRules;
+});
+
+ace.define("ace/mode/wollok",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/wollok_highlight_rules"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var JavaScriptMode = require("./javascript").Mode;
+var WollokHighlightRules = require("./wollok_highlight_rules").WollokHighlightRules;
+
+var Mode = function() {
+ JavaScriptMode.call(this);
+ this.HighlightRules = WollokHighlightRules;
+};
+oop.inherits(Mode, JavaScriptMode);
+
+(function() {
+
+ this.createWorker = function(session) {
+ return null;
+ };
+
+ this.$id = "ace/mode/wollok";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-xml.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-xml.js
new file mode 100644
index 00000000..f5f840a9
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-xml.js
@@ -0,0 +1,664 @@
+ace.define("ace/mode/xml_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 XmlHighlightRules = function(normalize) {
+ var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*";
+
+ this.$rules = {
+ start : [
+ {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"},
+ {
+ token : ["punctuation.instruction.xml", "keyword.instruction.xml"],
+ regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction"
+ },
+ {token : "comment.start.xml", regex : "<\\!--", next : "comment"},
+ {
+ token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"],
+ regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true
+ },
+ {include : "tag"},
+ {token : "text.end-tag-open.xml", regex: "</"},
+ {token : "text.tag-open.xml", regex: "<"},
+ {include : "reference"},
+ {defaultToken : "text.xml"}
+ ],
+
+ processing_instruction : [{
+ token : "entity.other.attribute-name.decl-attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.decl-attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "whitespace"
+ }, {
+ include: "string"
+ }, {
+ token : "punctuation.xml-decl.xml",
+ regex : "\\?>",
+ next : "start"
+ }],
+
+ doctype : [
+ {include : "whitespace"},
+ {include : "string"},
+ {token : "xml-pe.doctype.xml", regex : ">", next : "start"},
+ {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"},
+ {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"}
+ ],
+
+ int_subset : [{
+ token : "text.xml",
+ regex : "\\s+"
+ }, {
+ token: "punctuation.int-subset.xml",
+ regex: "]",
+ next: "pop"
+ }, {
+ token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"],
+ regex : "(<\\!)(" + tagRegex + ")",
+ push : [{
+ token : "text",
+ regex : "\\s+"
+ },
+ {
+ token : "punctuation.markup-decl.xml",
+ regex : ">",
+ next : "pop"
+ },
+ {include : "string"}]
+ }],
+
+ cdata : [
+ {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"},
+ {token : "text.xml", regex : "\\s+"},
+ {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"}
+ ],
+
+ comment : [
+ {token : "comment.end.xml", regex : "-->", next : "start"},
+ {defaultToken : "comment.xml"}
+ ],
+
+ reference : [{
+ token : "constant.language.escape.reference.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ attr_reference : [{
+ token : "constant.language.escape.reference.attribute-value.xml",
+ regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"
+ }],
+
+ tag : [{
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"],
+ regex : "(?:(<)|(</))((?:" + tagRegex + ":)?" + tagRegex + ")",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : "start"}
+ ]
+ }],
+
+ tag_whitespace : [
+ {token : "text.tag-whitespace.xml", regex : "\\s+"}
+ ],
+ whitespace : [
+ {token : "text.whitespace.xml", regex : "\\s+"}
+ ],
+ string: [{
+ token : "string.xml",
+ regex : "'",
+ push : [
+ {token : "string.xml", regex: "'", next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }, {
+ token : "string.xml",
+ regex : '"',
+ push : [
+ {token : "string.xml", regex: '"', next: "pop"},
+ {defaultToken : "string.xml"}
+ ]
+ }],
+
+ attributes: [{
+ token : "entity.other.attribute-name.xml",
+ regex : tagRegex
+ }, {
+ token : "keyword.operator.attribute-equals.xml",
+ regex : "="
+ }, {
+ include: "tag_whitespace"
+ }, {
+ include: "attribute_value"
+ }],
+
+ attribute_value: [{
+ token : "string.attribute-value.xml",
+ regex : "'",
+ push : [
+ {token : "string.attribute-value.xml", regex: "'", next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }, {
+ token : "string.attribute-value.xml",
+ regex : '"',
+ push : [
+ {token : "string.attribute-value.xml", regex: '"', next: "pop"},
+ {include : "attr_reference"},
+ {defaultToken : "string.attribute-value.xml"}
+ ]
+ }]
+ };
+
+ if (this.constructor === XmlHighlightRules)
+ this.normalizeRules();
+};
+
+
+(function() {
+
+ this.embedTagRules = function(HighlightRules, prefix, tag){
+ this.$rules.tag.unshift({
+ token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(<)(" + tag + "(?=\\s|>|$))",
+ next: [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
+ ]
+ });
+
+ this.$rules[tag + "-end"] = [
+ {include : "attributes"},
+ {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start",
+ onMatch : function(value, currentState, stack) {
+ stack.splice(0);
+ return this.token;
+ }}
+ ]
+
+ this.embedRules(HighlightRules, prefix, [{
+ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
+ regex : "(</)(" + tag + "(?=\\s|>|$))",
+ next: tag + "-end"
+ }, {
+ token: "string.cdata.xml",
+ regex : "<\\!\\[CDATA\\["
+ }, {
+ token: "string.cdata.xml",
+ regex : "\\]\\]>"
+ }]);
+ };
+
+}).call(TextHighlightRules.prototype);
+
+oop.inherits(XmlHighlightRules, TextHighlightRules);
+
+exports.XmlHighlightRules = XmlHighlightRules;
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+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) {
+"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, optionalEndTags) {
+ BaseFoldMode.call(this);
+ this.voidElements = voidElements || {};
+ this.optionalEndTags = oop.mixin({}, this.voidElements);
+ if (optionalEndTags)
+ oop.mixin(this.optionalEndTags, optionalEndTags);
+
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+var Tag = function() {
+ this.tagName = "";
+ this.closing = false;
+ this.selfClosing = false;
+ this.start = {row: 0, column: 0};
+ this.end = {row: 0, column: 0};
+};
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+(function() {
+
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var tag = this._getFirstTagInLine(session, row);
+
+ if (!tag)
+ return this.getCommentFoldWidget(session, row);
+
+ if (tag.closing || (!tag.tagName && tag.selfClosing))
+ return foldStyle == "markbeginend" ? "end" : "";
+
+ if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase()))
+ return "";
+
+ if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column))
+ return "";
+
+ return "start";
+ };
+
+ this.getCommentFoldWidget = function(session, row) {
+ if (/comment/.test(session.getState(row)) && /<!-/.test(session.getLine(row)))
+ return "start";
+ return "";
+ }
+ this._getFirstTagInLine = function(session, row) {
+ var tokens = session.getTokens(row);
+ var tag = new Tag();
+
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ if (is(token, "tag-open")) {
+ tag.end.column = tag.start.column + token.value.length;
+ tag.closing = is(token, "end-tag-open");
+ token = tokens[++i];
+ if (!token)
+ return null;
+ tag.tagName = token.value;
+ tag.end.column += token.value.length;
+ for (i++; i < tokens.length; i++) {
+ token = tokens[i];
+ tag.end.column += token.value.length;
+ if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ break;
+ }
+ }
+ return tag;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == '/>';
+ return tag;
+ }
+ tag.start.column += token.value.length;
+ }
+
+ return null;
+ };
+
+ this._findEndTagInLine = function(session, row, tagName, startColumn) {
+ var tokens = session.getTokens(row);
+ var column = 0;
+ for (var i = 0; i < tokens.length; i++) {
+ var token = tokens[i];
+ column += token.value.length;
+ if (column < startColumn)
+ continue;
+ if (is(token, "end-tag-open")) {
+ token = tokens[i + 1];
+ if (token && token.value == tagName)
+ return true;
+ }
+ }
+ return false;
+ };
+ this._readTagForward = function(iterator) {
+ var token = iterator.getCurrentToken();
+ if (!token)
+ return null;
+
+ var tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.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 tag = new Tag();
+ do {
+ if (is(token, "tag-open")) {
+ tag.closing = is(token, "end-tag-open");
+ tag.start.row = iterator.getCurrentTokenRow();
+ tag.start.column = iterator.getCurrentTokenColumn();
+ iterator.stepBackward();
+ return tag;
+ } else if (is(token, "tag-name")) {
+ tag.tagName = token.value;
+ } else if (is(token, "tag-close")) {
+ tag.selfClosing = token.value == "/>";
+ tag.end.row = iterator.getCurrentTokenRow();
+ tag.end.column = iterator.getCurrentTokenColumn() + token.value.length;
+ }
+ } 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.optionalEndTags.hasOwnProperty(top.tagName)) {
+ stack.pop();
+ continue;
+ } else {
+ return null;
+ }
+ }
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row) {
+ var firstTag = this._getFirstTagInLine(session, row);
+
+ if (!firstTag) {
+ return this.getCommentFoldWidget(session, row)
+ && session.getCommentFoldRange(row, session.getLine(row).length);
+ }
+
+ var isBackward = firstTag.closing || firstTag.selfClosing;
+ var stack = [];
+ var tag;
+
+ if (!isBackward) {
+ var iterator = new TokenIterator(session, row, firstTag.start.column);
+ var start = {
+ row: row,
+ column: firstTag.start.column + firstTag.tagName.length + 2
+ };
+ if (firstTag.start.row == firstTag.end.row)
+ start.column = firstTag.end.column;
+ 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.end.column);
+ var end = {
+ row: row,
+ column: firstTag.start.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;
+ if (tag.start.row == tag.end.row && tag.start.column < tag.end.column)
+ tag.start.column = tag.end.column;
+ return Range.fromPoints(tag.start, end);
+ }
+ }
+ else {
+ stack.push(tag);
+ }
+ }
+ }
+
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var TextMode = require("./text").Mode;
+var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules;
+var XmlBehaviour = require("./behaviour/xml").XmlBehaviour;
+var XmlFoldMode = require("./folding/xml").FoldMode;
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+
+var Mode = function() {
+ this.HighlightRules = XmlHighlightRules;
+ this.$behaviour = new XmlBehaviour();
+ this.foldingRules = new XmlFoldMode();
+};
+
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.voidElements = lang.arrayToMap([]);
+
+ this.blockComment = {start: "<!--", end: "-->"};
+
+ this.createWorker = function(session) {
+ var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker");
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("error", function(e) {
+ session.setAnnotations(e.data);
+ });
+
+ worker.on("terminate", function() {
+ session.clearAnnotations();
+ });
+
+ return worker;
+ };
+
+ this.$id = "ace/mode/xml";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-xquery.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-xquery.js
new file mode 100644
index 00000000..3de4ec09
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-xquery.js
@@ -0,0 +1,2631 @@
+ace.define("ace/mode/xquery/xquery_lexer",["require","exports","module"], function(require, exports, module) {
+module.exports = (function outer (modules, cache, entry) {
+ var previousRequire = typeof require == "function" && require;
+ function newRequire(name, jumped){
+ if(!cache[name]) {
+ if(!modules[name]) {
+ var currentRequire = typeof require == "function" && require;
+ if (!jumped && currentRequire) return currentRequire(name, true);
+ if (previousRequire) return previousRequire(name, true);
+ var err = new Error('Cannot find module \'' + name + '\'');
+ err.code = 'MODULE_NOT_FOUND';
+ throw err;
+ }
+ var m = cache[name] = {exports:{}};
+ modules[name][0].call(m.exports, function(x){
+ var id = modules[name][1][x];
+ return newRequire(id ? id : x);
+ },m,m.exports,outer,modules,cache,entry);
+ }
+ return cache[name].exports;
+ }
+ for(var i=0;i<entry.length;i++) newRequire(entry[i]);
+ return newRequire(entry[0]);
+})
+({"/node_modules/xqlint/lib/lexers/XQueryTokenizer.js":[function(_dereq_,module,exports){
+ var XQueryTokenizer = exports.XQueryTokenizer = function XQueryTokenizer(string, parsingEventHandler)
+ {
+ init(string, parsingEventHandler);
+ var self = this;
+
+ this.ParseException = function(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;
+ end = e;
+ eventHandler.reset(input);
+ }
+
+ this.getOffendingToken = function(e)
+ {
+ var o = e.getOffending();
+ return o >= 0 ? XQueryTokenizer.TOKEN[o] : null;
+ };
+
+ this.getExpectedTokenSet = function(e)
+ {
+ var expected;
+ if (e.getExpected() < 0)
+ {
+ expected = XQueryTokenizer.getTokenSet(- e.getState());
+ }
+ else
+ {
+ expected = [XQueryTokenizer.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 = 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 || found != null ? "" : "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_start = function()
+ {
+ eventHandler.startNonterminal("start", e0);
+ lookahead1W(14); // ModuleDecl | Annotation | OptionDecl | Operator | Variable | Tag | AttrTest |
+ switch (l1)
+ {
+ case 55: // '<![CDATA['
+ shift(55); // '<![CDATA['
+ break;
+ case 54: // '<!--'
+ shift(54); // '<!--'
+ break;
+ case 56: // '<?'
+ shift(56); // '<?'
+ break;
+ case 40: // '(#'
+ shift(40); // '(#'
+ break;
+ case 42: // '(:~'
+ shift(42); // '(:~'
+ break;
+ case 41: // '(:'
+ shift(41); // '(:'
+ break;
+ case 35: // '"'
+ shift(35); // '"'
+ break;
+ case 38: // "'"
+ shift(38); // "'"
+ break;
+ case 274: // '}'
+ shift(274); // '}'
+ break;
+ case 271: // '{'
+ shift(271); // '{'
+ break;
+ case 39: // '('
+ shift(39); // '('
+ break;
+ case 43: // ')'
+ shift(43); // ')'
+ break;
+ case 49: // '/'
+ shift(49); // '/'
+ break;
+ case 62: // '['
+ shift(62); // '['
+ break;
+ case 63: // ']'
+ shift(63); // ']'
+ break;
+ case 46: // ','
+ shift(46); // ','
+ break;
+ case 48: // '.'
+ shift(48); // '.'
+ break;
+ case 53: // ';'
+ shift(53); // ';'
+ break;
+ case 51: // ':'
+ shift(51); // ':'
+ break;
+ case 34: // '!'
+ shift(34); // '!'
+ break;
+ case 273: // '|'
+ shift(273); // '|'
+ break;
+ case 2: // Annotation
+ shift(2); // Annotation
+ break;
+ case 1: // ModuleDecl
+ shift(1); // ModuleDecl
+ break;
+ case 3: // OptionDecl
+ shift(3); // OptionDecl
+ break;
+ case 12: // AttrTest
+ shift(12); // AttrTest
+ break;
+ case 13: // Wildcard
+ shift(13); // Wildcard
+ break;
+ case 15: // IntegerLiteral
+ shift(15); // IntegerLiteral
+ break;
+ case 16: // DecimalLiteral
+ shift(16); // DecimalLiteral
+ break;
+ case 17: // DoubleLiteral
+ shift(17); // DoubleLiteral
+ break;
+ case 5: // Variable
+ shift(5); // Variable
+ break;
+ case 6: // Tag
+ shift(6); // Tag
+ break;
+ case 4: // Operator
+ shift(4); // Operator
+ break;
+ case 33: // EOF
+ shift(33); // EOF
+ break;
+ default:
+ parse_EQName();
+ }
+ eventHandler.endNonterminal("start", e0);
+ };
+
+ this.parse_StartTag = function()
+ {
+ eventHandler.startNonterminal("StartTag", e0);
+ lookahead1W(8); // QName | S^WS | EOF | '"' | "'" | '/>' | '=' | '>'
+ switch (l1)
+ {
+ case 58: // '>'
+ shift(58); // '>'
+ break;
+ case 50: // '/>'
+ shift(50); // '/>'
+ break;
+ case 27: // QName
+ shift(27); // QName
+ break;
+ case 57: // '='
+ shift(57); // '='
+ break;
+ case 35: // '"'
+ shift(35); // '"'
+ break;
+ case 38: // "'"
+ shift(38); // "'"
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("StartTag", e0);
+ };
+
+ this.parse_TagContent = function()
+ {
+ eventHandler.startNonterminal("TagContent", e0);
+ lookahead1(11); // Tag | EndTag | PredefinedEntityRef | ElementContentChar | CharRef | EOF |
+ switch (l1)
+ {
+ case 23: // ElementContentChar
+ shift(23); // ElementContentChar
+ break;
+ case 6: // Tag
+ shift(6); // Tag
+ break;
+ case 7: // EndTag
+ shift(7); // EndTag
+ break;
+ case 55: // '<![CDATA['
+ shift(55); // '<![CDATA['
+ break;
+ case 54: // '<!--'
+ shift(54); // '<!--'
+ break;
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 272: // '{{'
+ shift(272); // '{{'
+ break;
+ case 275: // '}}'
+ shift(275); // '}}'
+ break;
+ case 271: // '{'
+ shift(271); // '{'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("TagContent", e0);
+ };
+
+ this.parse_AposAttr = function()
+ {
+ eventHandler.startNonterminal("AposAttr", e0);
+ lookahead1(10); // PredefinedEntityRef | EscapeApos | AposAttrContentChar | CharRef | EOF | "'" |
+ switch (l1)
+ {
+ case 20: // EscapeApos
+ shift(20); // EscapeApos
+ break;
+ case 25: // AposAttrContentChar
+ shift(25); // AposAttrContentChar
+ break;
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 272: // '{{'
+ shift(272); // '{{'
+ break;
+ case 275: // '}}'
+ shift(275); // '}}'
+ break;
+ case 271: // '{'
+ shift(271); // '{'
+ break;
+ case 38: // "'"
+ shift(38); // "'"
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("AposAttr", e0);
+ };
+
+ this.parse_QuotAttr = function()
+ {
+ eventHandler.startNonterminal("QuotAttr", e0);
+ lookahead1(9); // PredefinedEntityRef | EscapeQuot | QuotAttrContentChar | CharRef | EOF | '"' |
+ switch (l1)
+ {
+ case 19: // EscapeQuot
+ shift(19); // EscapeQuot
+ break;
+ case 24: // QuotAttrContentChar
+ shift(24); // QuotAttrContentChar
+ break;
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 272: // '{{'
+ shift(272); // '{{'
+ break;
+ case 275: // '}}'
+ shift(275); // '}}'
+ break;
+ case 271: // '{'
+ shift(271); // '{'
+ break;
+ case 35: // '"'
+ shift(35); // '"'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("QuotAttr", e0);
+ };
+
+ this.parse_CData = function()
+ {
+ eventHandler.startNonterminal("CData", e0);
+ lookahead1(1); // CDataSectionContents | EOF | ']]>'
+ switch (l1)
+ {
+ case 11: // CDataSectionContents
+ shift(11); // CDataSectionContents
+ break;
+ case 64: // ']]>'
+ shift(64); // ']]>'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("CData", e0);
+ };
+
+ this.parse_XMLComment = function()
+ {
+ eventHandler.startNonterminal("XMLComment", e0);
+ lookahead1(0); // DirCommentContents | EOF | '-->'
+ switch (l1)
+ {
+ case 9: // DirCommentContents
+ shift(9); // DirCommentContents
+ break;
+ case 47: // '-->'
+ shift(47); // '-->'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("XMLComment", e0);
+ };
+
+ this.parse_PI = function()
+ {
+ eventHandler.startNonterminal("PI", e0);
+ lookahead1(3); // DirPIContents | EOF | '?' | '?>'
+ switch (l1)
+ {
+ case 10: // DirPIContents
+ shift(10); // DirPIContents
+ break;
+ case 59: // '?'
+ shift(59); // '?'
+ break;
+ case 60: // '?>'
+ shift(60); // '?>'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("PI", e0);
+ };
+
+ this.parse_Pragma = function()
+ {
+ eventHandler.startNonterminal("Pragma", e0);
+ lookahead1(2); // PragmaContents | EOF | '#' | '#)'
+ switch (l1)
+ {
+ case 8: // PragmaContents
+ shift(8); // PragmaContents
+ break;
+ case 36: // '#'
+ shift(36); // '#'
+ break;
+ case 37: // '#)'
+ shift(37); // '#)'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("Pragma", e0);
+ };
+
+ this.parse_Comment = function()
+ {
+ eventHandler.startNonterminal("Comment", e0);
+ lookahead1(4); // CommentContents | EOF | '(:' | ':)'
+ switch (l1)
+ {
+ case 52: // ':)'
+ shift(52); // ':)'
+ break;
+ case 41: // '(:'
+ shift(41); // '(:'
+ break;
+ case 30: // CommentContents
+ shift(30); // CommentContents
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("Comment", e0);
+ };
+
+ this.parse_CommentDoc = function()
+ {
+ eventHandler.startNonterminal("CommentDoc", e0);
+ lookahead1(5); // DocTag | DocCommentContents | EOF | '(:' | ':)'
+ switch (l1)
+ {
+ case 31: // DocTag
+ shift(31); // DocTag
+ break;
+ case 32: // DocCommentContents
+ shift(32); // DocCommentContents
+ break;
+ case 52: // ':)'
+ shift(52); // ':)'
+ break;
+ case 41: // '(:'
+ shift(41); // '(:'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("CommentDoc", e0);
+ };
+
+ this.parse_QuotString = function()
+ {
+ eventHandler.startNonterminal("QuotString", e0);
+ lookahead1(6); // PredefinedEntityRef | EscapeQuot | QuotChar | CharRef | EOF | '"'
+ switch (l1)
+ {
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 19: // EscapeQuot
+ shift(19); // EscapeQuot
+ break;
+ case 21: // QuotChar
+ shift(21); // QuotChar
+ break;
+ case 35: // '"'
+ shift(35); // '"'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("QuotString", e0);
+ };
+
+ this.parse_AposString = function()
+ {
+ eventHandler.startNonterminal("AposString", e0);
+ lookahead1(7); // PredefinedEntityRef | EscapeApos | AposChar | CharRef | EOF | "'"
+ switch (l1)
+ {
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 20: // EscapeApos
+ shift(20); // EscapeApos
+ break;
+ case 22: // AposChar
+ shift(22); // AposChar
+ break;
+ case 38: // "'"
+ shift(38); // "'"
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("AposString", e0);
+ };
+
+ this.parse_Prefix = function()
+ {
+ eventHandler.startNonterminal("Prefix", e0);
+ lookahead1W(13); // NCName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ whitespace();
+ parse_NCName();
+ eventHandler.endNonterminal("Prefix", e0);
+ };
+
+ this.parse__EQName = function()
+ {
+ eventHandler.startNonterminal("_EQName", e0);
+ lookahead1W(12); // EQName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ whitespace();
+ parse_EQName();
+ eventHandler.endNonterminal("_EQName", e0);
+ };
+
+ function parse_EQName()
+ {
+ eventHandler.startNonterminal("EQName", e0);
+ switch (l1)
+ {
+ case 77: // 'attribute'
+ shift(77); // 'attribute'
+ break;
+ case 91: // 'comment'
+ shift(91); // 'comment'
+ break;
+ case 115: // 'document-node'
+ shift(115); // 'document-node'
+ break;
+ case 116: // 'element'
+ shift(116); // 'element'
+ break;
+ case 119: // 'empty-sequence'
+ shift(119); // 'empty-sequence'
+ break;
+ case 140: // 'function'
+ shift(140); // 'function'
+ break;
+ case 147: // 'if'
+ shift(147); // 'if'
+ break;
+ case 160: // 'item'
+ shift(160); // 'item'
+ break;
+ case 180: // 'namespace-node'
+ shift(180); // 'namespace-node'
+ break;
+ case 186: // 'node'
+ shift(186); // 'node'
+ break;
+ case 211: // 'processing-instruction'
+ shift(211); // 'processing-instruction'
+ break;
+ case 221: // 'schema-attribute'
+ shift(221); // 'schema-attribute'
+ break;
+ case 222: // 'schema-element'
+ shift(222); // 'schema-element'
+ break;
+ case 238: // 'switch'
+ shift(238); // 'switch'
+ break;
+ case 239: // 'text'
+ shift(239); // 'text'
+ break;
+ case 248: // 'typeswitch'
+ shift(248); // 'typeswitch'
+ break;
+ default:
+ parse_FunctionName();
+ }
+ eventHandler.endNonterminal("EQName", e0);
+ }
+
+ function parse_FunctionName()
+ {
+ eventHandler.startNonterminal("FunctionName", e0);
+ switch (l1)
+ {
+ case 14: // EQName^Token
+ shift(14); // EQName^Token
+ break;
+ case 65: // 'after'
+ shift(65); // 'after'
+ break;
+ case 68: // 'ancestor'
+ shift(68); // 'ancestor'
+ break;
+ case 69: // 'ancestor-or-self'
+ shift(69); // 'ancestor-or-self'
+ break;
+ case 70: // 'and'
+ shift(70); // 'and'
+ break;
+ case 74: // 'as'
+ shift(74); // 'as'
+ break;
+ case 75: // 'ascending'
+ shift(75); // 'ascending'
+ break;
+ case 79: // 'before'
+ shift(79); // 'before'
+ break;
+ case 83: // 'case'
+ shift(83); // 'case'
+ break;
+ case 84: // 'cast'
+ shift(84); // 'cast'
+ break;
+ case 85: // 'castable'
+ shift(85); // 'castable'
+ break;
+ case 88: // 'child'
+ shift(88); // 'child'
+ break;
+ case 89: // 'collation'
+ shift(89); // 'collation'
+ break;
+ case 98: // 'copy'
+ shift(98); // 'copy'
+ break;
+ case 100: // 'count'
+ shift(100); // 'count'
+ break;
+ case 103: // 'declare'
+ shift(103); // 'declare'
+ break;
+ case 104: // 'default'
+ shift(104); // 'default'
+ break;
+ case 105: // 'delete'
+ shift(105); // 'delete'
+ break;
+ case 106: // 'descendant'
+ shift(106); // 'descendant'
+ break;
+ case 107: // 'descendant-or-self'
+ shift(107); // 'descendant-or-self'
+ break;
+ case 108: // 'descending'
+ shift(108); // 'descending'
+ break;
+ case 113: // 'div'
+ shift(113); // 'div'
+ break;
+ case 114: // 'document'
+ shift(114); // 'document'
+ break;
+ case 117: // 'else'
+ shift(117); // 'else'
+ break;
+ case 118: // 'empty'
+ shift(118); // 'empty'
+ break;
+ case 121: // 'end'
+ shift(121); // 'end'
+ break;
+ case 123: // 'eq'
+ shift(123); // 'eq'
+ break;
+ case 124: // 'every'
+ shift(124); // 'every'
+ break;
+ case 126: // 'except'
+ shift(126); // 'except'
+ break;
+ case 129: // 'first'
+ shift(129); // 'first'
+ break;
+ case 130: // 'following'
+ shift(130); // 'following'
+ break;
+ case 131: // 'following-sibling'
+ shift(131); // 'following-sibling'
+ break;
+ case 132: // 'for'
+ shift(132); // 'for'
+ break;
+ case 141: // 'ge'
+ shift(141); // 'ge'
+ break;
+ case 143: // 'group'
+ shift(143); // 'group'
+ break;
+ case 145: // 'gt'
+ shift(145); // 'gt'
+ break;
+ case 146: // 'idiv'
+ shift(146); // 'idiv'
+ break;
+ case 148: // 'import'
+ shift(148); // 'import'
+ break;
+ case 154: // 'insert'
+ shift(154); // 'insert'
+ break;
+ case 155: // 'instance'
+ shift(155); // 'instance'
+ break;
+ case 157: // 'intersect'
+ shift(157); // 'intersect'
+ break;
+ case 158: // 'into'
+ shift(158); // 'into'
+ break;
+ case 159: // 'is'
+ shift(159); // 'is'
+ break;
+ case 165: // 'last'
+ shift(165); // 'last'
+ break;
+ case 167: // 'le'
+ shift(167); // 'le'
+ break;
+ case 169: // 'let'
+ shift(169); // 'let'
+ break;
+ case 173: // 'lt'
+ shift(173); // 'lt'
+ break;
+ case 175: // 'mod'
+ shift(175); // 'mod'
+ break;
+ case 176: // 'modify'
+ shift(176); // 'modify'
+ break;
+ case 177: // 'module'
+ shift(177); // 'module'
+ break;
+ case 179: // 'namespace'
+ shift(179); // 'namespace'
+ break;
+ case 181: // 'ne'
+ shift(181); // 'ne'
+ break;
+ case 193: // 'only'
+ shift(193); // 'only'
+ break;
+ case 195: // 'or'
+ shift(195); // 'or'
+ break;
+ case 196: // 'order'
+ shift(196); // 'order'
+ break;
+ case 197: // 'ordered'
+ shift(197); // 'ordered'
+ break;
+ case 201: // 'parent'
+ shift(201); // 'parent'
+ break;
+ case 207: // 'preceding'
+ shift(207); // 'preceding'
+ break;
+ case 208: // 'preceding-sibling'
+ shift(208); // 'preceding-sibling'
+ break;
+ case 213: // 'rename'
+ shift(213); // 'rename'
+ break;
+ case 214: // 'replace'
+ shift(214); // 'replace'
+ break;
+ case 215: // 'return'
+ shift(215); // 'return'
+ break;
+ case 219: // 'satisfies'
+ shift(219); // 'satisfies'
+ break;
+ case 224: // 'self'
+ shift(224); // 'self'
+ break;
+ case 230: // 'some'
+ shift(230); // 'some'
+ break;
+ case 231: // 'stable'
+ shift(231); // 'stable'
+ break;
+ case 232: // 'start'
+ shift(232); // 'start'
+ break;
+ case 243: // 'to'
+ shift(243); // 'to'
+ break;
+ case 244: // 'treat'
+ shift(244); // 'treat'
+ break;
+ case 245: // 'try'
+ shift(245); // 'try'
+ break;
+ case 249: // 'union'
+ shift(249); // 'union'
+ break;
+ case 251: // 'unordered'
+ shift(251); // 'unordered'
+ break;
+ case 255: // 'validate'
+ shift(255); // 'validate'
+ break;
+ case 261: // 'where'
+ shift(261); // 'where'
+ break;
+ case 265: // 'with'
+ shift(265); // 'with'
+ break;
+ case 269: // 'xquery'
+ shift(269); // 'xquery'
+ break;
+ case 67: // 'allowing'
+ shift(67); // 'allowing'
+ break;
+ case 76: // 'at'
+ shift(76); // 'at'
+ break;
+ case 78: // 'base-uri'
+ shift(78); // 'base-uri'
+ break;
+ case 80: // 'boundary-space'
+ shift(80); // 'boundary-space'
+ break;
+ case 81: // 'break'
+ shift(81); // 'break'
+ break;
+ case 86: // 'catch'
+ shift(86); // 'catch'
+ break;
+ case 93: // 'construction'
+ shift(93); // 'construction'
+ break;
+ case 96: // 'context'
+ shift(96); // 'context'
+ break;
+ case 97: // 'continue'
+ shift(97); // 'continue'
+ break;
+ case 99: // 'copy-namespaces'
+ shift(99); // 'copy-namespaces'
+ break;
+ case 101: // 'decimal-format'
+ shift(101); // 'decimal-format'
+ break;
+ case 120: // 'encoding'
+ shift(120); // 'encoding'
+ break;
+ case 127: // 'exit'
+ shift(127); // 'exit'
+ break;
+ case 128: // 'external'
+ shift(128); // 'external'
+ break;
+ case 136: // 'ft-option'
+ shift(136); // 'ft-option'
+ break;
+ case 149: // 'in'
+ shift(149); // 'in'
+ break;
+ case 150: // 'index'
+ shift(150); // 'index'
+ break;
+ case 156: // 'integrity'
+ shift(156); // 'integrity'
+ break;
+ case 166: // 'lax'
+ shift(166); // 'lax'
+ break;
+ case 187: // 'nodes'
+ shift(187); // 'nodes'
+ break;
+ case 194: // 'option'
+ shift(194); // 'option'
+ break;
+ case 198: // 'ordering'
+ shift(198); // 'ordering'
+ break;
+ case 217: // 'revalidation'
+ shift(217); // 'revalidation'
+ break;
+ case 220: // 'schema'
+ shift(220); // 'schema'
+ break;
+ case 223: // 'score'
+ shift(223); // 'score'
+ break;
+ case 229: // 'sliding'
+ shift(229); // 'sliding'
+ break;
+ case 235: // 'strict'
+ shift(235); // 'strict'
+ break;
+ case 246: // 'tumbling'
+ shift(246); // 'tumbling'
+ break;
+ case 247: // 'type'
+ shift(247); // 'type'
+ break;
+ case 252: // 'updating'
+ shift(252); // 'updating'
+ break;
+ case 256: // 'value'
+ shift(256); // 'value'
+ break;
+ case 257: // 'variable'
+ shift(257); // 'variable'
+ break;
+ case 258: // 'version'
+ shift(258); // 'version'
+ break;
+ case 262: // 'while'
+ shift(262); // 'while'
+ break;
+ case 92: // 'constraint'
+ shift(92); // 'constraint'
+ break;
+ case 171: // 'loop'
+ shift(171); // 'loop'
+ break;
+ default:
+ shift(216); // 'returning'
+ }
+ eventHandler.endNonterminal("FunctionName", e0);
+ }
+
+ function parse_NCName()
+ {
+ eventHandler.startNonterminal("NCName", e0);
+ switch (l1)
+ {
+ case 26: // NCName^Token
+ shift(26); // NCName^Token
+ break;
+ case 65: // 'after'
+ shift(65); // 'after'
+ break;
+ case 70: // 'and'
+ shift(70); // 'and'
+ break;
+ case 74: // 'as'
+ shift(74); // 'as'
+ break;
+ case 75: // 'ascending'
+ shift(75); // 'ascending'
+ break;
+ case 79: // 'before'
+ shift(79); // 'before'
+ break;
+ case 83: // 'case'
+ shift(83); // 'case'
+ break;
+ case 84: // 'cast'
+ shift(84); // 'cast'
+ break;
+ case 85: // 'castable'
+ shift(85); // 'castable'
+ break;
+ case 89: // 'collation'
+ shift(89); // 'collation'
+ break;
+ case 100: // 'count'
+ shift(100); // 'count'
+ break;
+ case 104: // 'default'
+ shift(104); // 'default'
+ break;
+ case 108: // 'descending'
+ shift(108); // 'descending'
+ break;
+ case 113: // 'div'
+ shift(113); // 'div'
+ break;
+ case 117: // 'else'
+ shift(117); // 'else'
+ break;
+ case 118: // 'empty'
+ shift(118); // 'empty'
+ break;
+ case 121: // 'end'
+ shift(121); // 'end'
+ break;
+ case 123: // 'eq'
+ shift(123); // 'eq'
+ break;
+ case 126: // 'except'
+ shift(126); // 'except'
+ break;
+ case 132: // 'for'
+ shift(132); // 'for'
+ break;
+ case 141: // 'ge'
+ shift(141); // 'ge'
+ break;
+ case 143: // 'group'
+ shift(143); // 'group'
+ break;
+ case 145: // 'gt'
+ shift(145); // 'gt'
+ break;
+ case 146: // 'idiv'
+ shift(146); // 'idiv'
+ break;
+ case 155: // 'instance'
+ shift(155); // 'instance'
+ break;
+ case 157: // 'intersect'
+ shift(157); // 'intersect'
+ break;
+ case 158: // 'into'
+ shift(158); // 'into'
+ break;
+ case 159: // 'is'
+ shift(159); // 'is'
+ break;
+ case 167: // 'le'
+ shift(167); // 'le'
+ break;
+ case 169: // 'let'
+ shift(169); // 'let'
+ break;
+ case 173: // 'lt'
+ shift(173); // 'lt'
+ break;
+ case 175: // 'mod'
+ shift(175); // 'mod'
+ break;
+ case 176: // 'modify'
+ shift(176); // 'modify'
+ break;
+ case 181: // 'ne'
+ shift(181); // 'ne'
+ break;
+ case 193: // 'only'
+ shift(193); // 'only'
+ break;
+ case 195: // 'or'
+ shift(195); // 'or'
+ break;
+ case 196: // 'order'
+ shift(196); // 'order'
+ break;
+ case 215: // 'return'
+ shift(215); // 'return'
+ break;
+ case 219: // 'satisfies'
+ shift(219); // 'satisfies'
+ break;
+ case 231: // 'stable'
+ shift(231); // 'stable'
+ break;
+ case 232: // 'start'
+ shift(232); // 'start'
+ break;
+ case 243: // 'to'
+ shift(243); // 'to'
+ break;
+ case 244: // 'treat'
+ shift(244); // 'treat'
+ break;
+ case 249: // 'union'
+ shift(249); // 'union'
+ break;
+ case 261: // 'where'
+ shift(261); // 'where'
+ break;
+ case 265: // 'with'
+ shift(265); // 'with'
+ break;
+ case 68: // 'ancestor'
+ shift(68); // 'ancestor'
+ break;
+ case 69: // 'ancestor-or-self'
+ shift(69); // 'ancestor-or-self'
+ break;
+ case 77: // 'attribute'
+ shift(77); // 'attribute'
+ break;
+ case 88: // 'child'
+ shift(88); // 'child'
+ break;
+ case 91: // 'comment'
+ shift(91); // 'comment'
+ break;
+ case 98: // 'copy'
+ shift(98); // 'copy'
+ break;
+ case 103: // 'declare'
+ shift(103); // 'declare'
+ break;
+ case 105: // 'delete'
+ shift(105); // 'delete'
+ break;
+ case 106: // 'descendant'
+ shift(106); // 'descendant'
+ break;
+ case 107: // 'descendant-or-self'
+ shift(107); // 'descendant-or-self'
+ break;
+ case 114: // 'document'
+ shift(114); // 'document'
+ break;
+ case 115: // 'document-node'
+ shift(115); // 'document-node'
+ break;
+ case 116: // 'element'
+ shift(116); // 'element'
+ break;
+ case 119: // 'empty-sequence'
+ shift(119); // 'empty-sequence'
+ break;
+ case 124: // 'every'
+ shift(124); // 'every'
+ break;
+ case 129: // 'first'
+ shift(129); // 'first'
+ break;
+ case 130: // 'following'
+ shift(130); // 'following'
+ break;
+ case 131: // 'following-sibling'
+ shift(131); // 'following-sibling'
+ break;
+ case 140: // 'function'
+ shift(140); // 'function'
+ break;
+ case 147: // 'if'
+ shift(147); // 'if'
+ break;
+ case 148: // 'import'
+ shift(148); // 'import'
+ break;
+ case 154: // 'insert'
+ shift(154); // 'insert'
+ break;
+ case 160: // 'item'
+ shift(160); // 'item'
+ break;
+ case 165: // 'last'
+ shift(165); // 'last'
+ break;
+ case 177: // 'module'
+ shift(177); // 'module'
+ break;
+ case 179: // 'namespace'
+ shift(179); // 'namespace'
+ break;
+ case 180: // 'namespace-node'
+ shift(180); // 'namespace-node'
+ break;
+ case 186: // 'node'
+ shift(186); // 'node'
+ break;
+ case 197: // 'ordered'
+ shift(197); // 'ordered'
+ break;
+ case 201: // 'parent'
+ shift(201); // 'parent'
+ break;
+ case 207: // 'preceding'
+ shift(207); // 'preceding'
+ break;
+ case 208: // 'preceding-sibling'
+ shift(208); // 'preceding-sibling'
+ break;
+ case 211: // 'processing-instruction'
+ shift(211); // 'processing-instruction'
+ break;
+ case 213: // 'rename'
+ shift(213); // 'rename'
+ break;
+ case 214: // 'replace'
+ shift(214); // 'replace'
+ break;
+ case 221: // 'schema-attribute'
+ shift(221); // 'schema-attribute'
+ break;
+ case 222: // 'schema-element'
+ shift(222); // 'schema-element'
+ break;
+ case 224: // 'self'
+ shift(224); // 'self'
+ break;
+ case 230: // 'some'
+ shift(230); // 'some'
+ break;
+ case 238: // 'switch'
+ shift(238); // 'switch'
+ break;
+ case 239: // 'text'
+ shift(239); // 'text'
+ break;
+ case 245: // 'try'
+ shift(245); // 'try'
+ break;
+ case 248: // 'typeswitch'
+ shift(248); // 'typeswitch'
+ break;
+ case 251: // 'unordered'
+ shift(251); // 'unordered'
+ break;
+ case 255: // 'validate'
+ shift(255); // 'validate'
+ break;
+ case 257: // 'variable'
+ shift(257); // 'variable'
+ break;
+ case 269: // 'xquery'
+ shift(269); // 'xquery'
+ break;
+ case 67: // 'allowing'
+ shift(67); // 'allowing'
+ break;
+ case 76: // 'at'
+ shift(76); // 'at'
+ break;
+ case 78: // 'base-uri'
+ shift(78); // 'base-uri'
+ break;
+ case 80: // 'boundary-space'
+ shift(80); // 'boundary-space'
+ break;
+ case 81: // 'break'
+ shift(81); // 'break'
+ break;
+ case 86: // 'catch'
+ shift(86); // 'catch'
+ break;
+ case 93: // 'construction'
+ shift(93); // 'construction'
+ break;
+ case 96: // 'context'
+ shift(96); // 'context'
+ break;
+ case 97: // 'continue'
+ shift(97); // 'continue'
+ break;
+ case 99: // 'copy-namespaces'
+ shift(99); // 'copy-namespaces'
+ break;
+ case 101: // 'decimal-format'
+ shift(101); // 'decimal-format'
+ break;
+ case 120: // 'encoding'
+ shift(120); // 'encoding'
+ break;
+ case 127: // 'exit'
+ shift(127); // 'exit'
+ break;
+ case 128: // 'external'
+ shift(128); // 'external'
+ break;
+ case 136: // 'ft-option'
+ shift(136); // 'ft-option'
+ break;
+ case 149: // 'in'
+ shift(149); // 'in'
+ break;
+ case 150: // 'index'
+ shift(150); // 'index'
+ break;
+ case 156: // 'integrity'
+ shift(156); // 'integrity'
+ break;
+ case 166: // 'lax'
+ shift(166); // 'lax'
+ break;
+ case 187: // 'nodes'
+ shift(187); // 'nodes'
+ break;
+ case 194: // 'option'
+ shift(194); // 'option'
+ break;
+ case 198: // 'ordering'
+ shift(198); // 'ordering'
+ break;
+ case 217: // 'revalidation'
+ shift(217); // 'revalidation'
+ break;
+ case 220: // 'schema'
+ shift(220); // 'schema'
+ break;
+ case 223: // 'score'
+ shift(223); // 'score'
+ break;
+ case 229: // 'sliding'
+ shift(229); // 'sliding'
+ break;
+ case 235: // 'strict'
+ shift(235); // 'strict'
+ break;
+ case 246: // 'tumbling'
+ shift(246); // 'tumbling'
+ break;
+ case 247: // 'type'
+ shift(247); // 'type'
+ break;
+ case 252: // 'updating'
+ shift(252); // 'updating'
+ break;
+ case 256: // 'value'
+ shift(256); // 'value'
+ break;
+ case 258: // 'version'
+ shift(258); // 'version'
+ break;
+ case 262: // 'while'
+ shift(262); // 'while'
+ break;
+ case 92: // 'constraint'
+ shift(92); // 'constraint'
+ break;
+ case 171: // 'loop'
+ shift(171); // 'loop'
+ break;
+ default:
+ shift(216); // 'returning'
+ }
+ eventHandler.endNonterminal("NCName", e0);
+ }
+
+ function shift(t)
+ {
+ if (l1 == t)
+ {
+ whitespace();
+ eventHandler.terminal(XQueryTokenizer.TOKEN[l1], b1, e1 > size ? size : e1);
+ b0 = b1; e0 = e1; l1 = 0;
+ }
+ else
+ {
+ error(b1, e1, 0, l1, t);
+ }
+ }
+
+ function whitespace()
+ {
+ if (e0 != b1)
+ {
+ b0 = e0;
+ e0 = b1;
+ eventHandler.whitespace(b0, e0);
+ }
+ }
+
+ function matchW(set)
+ {
+ var code;
+ for (;;)
+ {
+ code = match(set);
+ if (code != 28) // S^WS
+ {
+ break;
+ }
+ }
+ return code;
+ }
+
+ function lookahead1W(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = matchW(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function lookahead1(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = match(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function error(b, e, s, l, t)
+ {
+ throw new self.ParseException(b, e, s, l, t);
+ }
+
+ var lk, b0, e0;
+ var l1, b1, e1;
+ var eventHandler;
+
+ var input;
+ var size;
+ var begin;
+ var end;
+
+ function match(tokenSetId)
+ {
+ var nonbmp = false;
+ begin = end;
+ var current = end;
+ var result = XQueryTokenizer.INITIAL[tokenSetId];
+ var state = 0;
+
+ for (var code = result & 4095; code != 0; )
+ {
+ var charclass;
+ var c0 = current < size ? input.charCodeAt(current) : 0;
+ ++current;
+ if (c0 < 0x80)
+ {
+ charclass = XQueryTokenizer.MAP0[c0];
+ }
+ else if (c0 < 0xd800)
+ {
+ var c1 = c0 >> 4;
+ charclass = XQueryTokenizer.MAP1[(c0 & 15) + XQueryTokenizer.MAP1[(c1 & 31) + XQueryTokenizer.MAP1[c1 >> 5]]];
+ }
+ 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 (XQueryTokenizer.MAP2[m] > c0) hi = m - 1;
+ else if (XQueryTokenizer.MAP2[6 + m] < c0) lo = m + 1;
+ else {charclass = XQueryTokenizer.MAP2[12 + m]; break;}
+ if (lo > hi) {charclass = 0; break;}
+ }
+ }
+
+ state = code;
+ var i0 = (charclass << 12) + code - 1;
+ code = XQueryTokenizer.TRANSITION[(i0 & 15) + XQueryTokenizer.TRANSITION[i0 >> 4]];
+
+ 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;
+ return 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;
+ }
+}
+
+XQueryTokenizer.getTokenSet = function(tokenSetId)
+{
+ var set = [];
+ var s = tokenSetId < 0 ? - tokenSetId : INITIAL[tokenSetId] & 4095;
+ for (var i = 0; i < 276; i += 32)
+ {
+ var j = i;
+ var i0 = (i >> 5) * 2062 + s - 1;
+ var i1 = i0 >> 2;
+ var i2 = i1 >> 2;
+ var f = XQueryTokenizer.EXPECTED[(i0 & 3) + XQueryTokenizer.EXPECTED[(i1 & 3) + XQueryTokenizer.EXPECTED[(i2 & 3) + XQueryTokenizer.EXPECTED[i2 >> 2]]]];
+ for ( ; f != 0; f >>>= 1, ++j)
+ {
+ if ((f & 1) != 0)
+ {
+ set.push(XQueryTokenizer.TOKEN[j]);
+ }
+ }
+ }
+ return set;
+};
+
+XQueryTokenizer.MAP0 =
+[ 66, 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, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35
+];
+
+XQueryTokenizer.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, 347, 363, 379, 416, 416, 416, 408, 331, 323, 331, 323, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 433, 433, 433, 433, 433, 433, 433, 316, 331, 331, 331, 331, 331, 331, 331, 331, 394, 416, 416, 417, 415, 416, 416, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 330, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 66, 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, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 35, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 31, 31, 35, 35, 35, 35, 35, 35, 35, 65, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65
+];
+
+XQueryTokenizer.MAP2 =
+[ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 35, 31, 35, 31, 31, 35
+];
+
+XQueryTokenizer.INITIAL =
+[ 1, 2, 36867, 45060, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
+];
+
+XQueryTokenizer.TRANSITION =
+[ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22908, 18836, 17152, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17365, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 17470, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18157, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 17848, 17880, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18023, 36545, 18621, 18039, 18056, 18072, 18117, 18143, 18173, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17687, 18805, 18421, 18437, 18101, 17393, 18489, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18579, 21711, 17152, 19008, 19233, 20367, 19008, 28684, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17365, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 17470, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18157, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 17848, 17880, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18023, 36545, 18621, 18039, 18056, 18072, 18117, 18143, 18173, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17687, 18805, 18421, 18437, 18101, 17393, 18489, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 20116, 18836, 18637, 19008, 19233, 21267, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18763, 18778, 18794, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18821, 22923, 18906, 19008, 19233, 17431, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18937, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 19054, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 18953, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21843, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21696, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22429, 20131, 18720, 19008, 19233, 20367, 19008, 17173, 23559, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 18087, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 21242, 19111, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19024, 18836, 18609, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19081, 22444, 18987, 19008, 19233, 20367, 19008, 19065, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21992, 22007, 18987, 19008, 19233, 20367, 19008, 18690, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22414, 18836, 18987, 19008, 19233, 30651, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 19138, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 19280, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 19172, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21783, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 19218, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21651, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19249, 19265, 19307, 18888, 27857, 30536, 24401, 31444, 23357, 18888, 19351, 18888, 18890, 27211, 19370, 27211, 27211, 19392, 24401, 31911, 24401, 24401, 25467, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19440, 24401, 24401, 24401, 24401, 24036, 17994, 24060, 18888, 18888, 18888, 18890, 19468, 27211, 27211, 27211, 27211, 19484, 35367, 19520, 24401, 24401, 24401, 19628, 18888, 29855, 18888, 18888, 23086, 27211, 19538, 27211, 27211, 30756, 24012, 24401, 19560, 24401, 24401, 26750, 18888, 18888, 19327, 27855, 27211, 27211, 19580, 17590, 24017, 24401, 24401, 19600, 25665, 18888, 18888, 28518, 27211, 27212, 24016, 19620, 19868, 28435, 25722, 18889, 19644, 27211, 32888, 35852, 19868, 31018, 19694, 19376, 19717, 22215, 19735, 22098, 19751, 35203, 19776, 19797, 19817, 19840, 25783, 31738, 24135, 19701, 19856, 31015, 23516, 31008, 28311, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21768, 18836, 19307, 18888, 27857, 27904, 24401, 29183, 28015, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 19888, 24401, 24401, 24401, 24401, 22953, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19440, 24401, 24401, 24401, 24401, 24036, 18881, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22399, 18836, 19918, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21666, 18836, 19307, 18888, 27857, 27525, 24401, 29183, 21467, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 19946, 24401, 24401, 24401, 24401, 32382, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19998, 24401, 24401, 24401, 24401, 31500, 18467, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 20021, 24401, 24401, 24401, 24401, 24401, 34271, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 32926, 29908, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 20050, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 20101, 19039, 20191, 20412, 20903, 17569, 20309, 20872, 25633, 20623, 20505, 20218, 20242, 17189, 17208, 17281, 20355, 20265, 20306, 20328, 20383, 22490, 20796, 20619, 21354, 20654, 20410, 20956, 21232, 20765, 17421, 20535, 17192, 18127, 22459, 20312, 25531, 22470, 20309, 20428, 18964, 20466, 20491, 21342, 21070, 20521, 20682, 17714, 18326, 17543, 17559, 17585, 22497, 20559, 19504, 20279, 20575, 20290, 20475, 20604, 20639, 20226, 20670, 17661, 21190, 17703, 21176, 17730, 19494, 20698, 20711, 22480, 21046, 21116, 18971, 21130, 20727, 20755, 17675, 17753, 17832, 17590, 25518, 20394, 20781, 20831, 20202, 20847, 21401, 17292, 17934, 17979, 18549, 20863, 20588, 25542, 20888, 20919, 18072, 18117, 20935, 20972, 21032, 21062, 21086, 18239, 21102, 18563, 21146, 21162, 21206, 18351, 20949, 20902, 18340, 21222, 21258, 21283, 18360, 20249, 17405, 21295, 21311, 21327, 20739, 20343, 21370, 21386, 21417, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21977, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 21452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 21504, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 36501, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 28674, 21946, 17617, 36473, 18223, 17237, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 21575, 21534, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 21560, 30628, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21798, 18836, 21612, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21636, 18836, 18987, 19008, 19233, 17902, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21753, 19096, 21903, 19008, 19233, 20367, 19008, 19291, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17379, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 21931, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18280, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21962, 18594, 18987, 19008, 19233, 22043, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21681, 21858, 18987, 19008, 19233, 20367, 19008, 21544, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 32319, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 22231, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 31678, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 33588, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 35019, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22248, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22324, 18836, 22059, 18888, 27857, 30501, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 34365, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22354, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 27086, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 19930, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22309, 22513, 18987, 19008, 19233, 20367, 19008, 19122, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 22544, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22608, 18836, 22988, 23004, 27585, 23020, 23036, 23067, 22087, 18888, 18888, 18888, 23083, 27211, 27211, 27211, 23102, 22121, 24401, 24401, 24401, 23122, 31386, 26154, 19674, 18888, 28119, 28232, 19424, 23705, 27211, 27211, 23142, 23173, 23189, 23212, 24401, 24401, 23246, 34427, 31693, 23262, 18888, 23290, 23308, 27783, 27620, 23327, 35263, 35107, 33383, 23346, 18193, 23393, 32748, 23968, 24401, 23414, 35153, 23463, 18888, 33913, 23442, 23482, 27211, 27211, 23532, 23552, 21431, 23575, 24401, 24401, 23604, 26095, 23635, 23657, 18888, 33482, 23685, 33251, 27211, 22187, 18851, 23721, 35536, 24401, 18887, 23750, 32641, 27211, 23769, 23787, 20080, 33012, 24384, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 23803, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 28224, 31826, 23823, 26917, 34978, 23850, 26493, 25782, 23878, 23914, 23516, 31008, 22105, 19419, 27963, 19659, 29781, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22623, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 28909, 25783, 27211, 27211, 27211, 34048, 23933, 22164, 24401, 24401, 24401, 28409, 23949, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 26583, 18888, 18888, 18888, 35585, 23984, 27211, 27211, 27211, 24005, 22201, 24033, 24401, 24401, 24401, 24052, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 26496, 24076, 24126, 24151, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22638, 18836, 22059, 19678, 27857, 24185, 24401, 24201, 24217, 26592, 18888, 18888, 18890, 24252, 24268, 27211, 27211, 22121, 24287, 24303, 24401, 24401, 30613, 19781, 35432, 36007, 32649, 18888, 25783, 24322, 28966, 23771, 27211, 35072, 22164, 24358, 32106, 26829, 24400, 31500, 31693, 18888, 18888, 18888, 24801, 18890, 27211, 27211, 27211, 27211, 24418, 19484, 24401, 24401, 24401, 24401, 20167, 31181, 18888, 18888, 18888, 27833, 23086, 27211, 27211, 33540, 27211, 30756, 21431, 24401, 24401, 22972, 24401, 26095, 18888, 36131, 18888, 27855, 27211, 24440, 27211, 22187, 22968, 24401, 24459, 24401, 31699, 28454, 18888, 34528, 34570, 35779, 24478, 24402, 24494, 25659, 18888, 36228, 27211, 27211, 24515, 30981, 23734, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 24538, 31017, 27856, 31741, 30059, 23377, 24563, 19837, 25782, 19760, 31015, 23516, 25374, 22105, 19419, 29793, 24579, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22653, 18836, 22059, 25756, 19982, 34097, 23196, 29183, 24614, 24110, 23641, 24673, 26103, 24697, 24443, 24713, 28558, 22121, 24748, 24462, 24764, 23398, 30613, 18888, 18888, 18888, 18888, 24798, 25783, 27211, 27211, 27211, 34232, 35072, 22164, 24401, 24401, 24401, 33302, 31500, 22559, 24106, 24232, 18888, 18888, 34970, 24817, 30411, 27211, 27211, 32484, 19484, 29750, 35127, 24401, 24401, 19872, 31181, 24852, 18888, 18888, 24871, 29221, 27211, 27211, 32072, 27211, 30756, 34441, 24401, 24401, 31571, 24401, 26095, 33141, 27802, 27011, 27855, 25295, 25607, 24888, 22187, 22968, 19195, 34593, 24906, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 33663, 27211, 27211, 24924, 24947, 23588, 31018, 18890, 27211, 31833, 22135, 19447, 23086, 23330, 19828, 30904, 31042, 24972, 19840, 25000, 31738, 30898, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 25016, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22668, 18836, 25041, 25057, 31320, 25073, 25089, 25105, 22087, 34796, 24236, 36138, 34870, 34125, 25121, 23106, 35497, 22248, 36613, 25137, 30671, 27365, 30613, 25153, 26447, 25199, 25233, 22574, 23274, 25249, 25265, 25281, 25318, 25344, 25360, 25400, 25428, 25452, 26731, 25504, 31693, 23669, 25558, 27407, 25575, 28599, 25934, 25599, 27211, 28180, 27304, 25623, 25839, 25649, 24401, 34820, 25681, 25698, 22586, 27775, 30190, 25745, 25778, 25799, 25817, 28995, 33569, 30756, 21518, 33443, 25837, 25855, 25893, 26095, 31254, 26677, 30136, 27855, 25930, 25950, 27211, 22187, 22968, 25966, 25986, 24401, 23428, 27763, 36330, 26959, 26002, 26029, 26045, 26085, 26119, 26170, 26203, 26222, 26239, 30527, 26372, 26274, 28404, 31018, 33757, 27211, 34262, 26316, 36729, 26345, 26366, 35337, 31017, 26388, 26407, 30954, 26350, 33861, 26434, 26463, 26479, 26512, 23516, 33189, 26531, 26547, 27963, 31293, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22683, 18836, 26568, 26181, 26608, 34097, 26643, 29183, 22087, 26669, 18888, 18888, 18890, 26693, 27211, 27211, 27211, 22121, 26720, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 26774, 25783, 27211, 27211, 27211, 26619, 35072, 22164, 24401, 24401, 24401, 21596, 31500, 31693, 18888, 18888, 33978, 18888, 18890, 27211, 27211, 25801, 27211, 27211, 19484, 24401, 24401, 24401, 26792, 24401, 31181, 18888, 18888, 18888, 35464, 23086, 27211, 27211, 27211, 26809, 30756, 21431, 24401, 24401, 24401, 26828, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 31948, 18889, 35707, 27211, 19719, 26845, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 26905, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 24984, 31088, 19419, 26945, 27651, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22698, 18836, 26999, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 23051, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 27033, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 27056, 18888, 18890, 27211, 27211, 30320, 27211, 27211, 27075, 24401, 24401, 29032, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 33986, 27855, 27211, 27211, 27102, 17590, 24017, 24401, 24401, 27123, 27144, 36254, 27162, 27210, 27228, 28500, 18187, 34842, 33426, 27244, 35980, 27277, 27302, 27320, 36048, 34013, 20999, 31882, 21478, 27895, 27356, 30287, 27381, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 26329, 30087, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 27406, 27423, 27445, 35294, 27461, 22087, 18888, 18888, 30140, 18890, 27211, 27211, 27989, 27211, 22121, 24401, 24401, 25682, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 34042, 27211, 27211, 27211, 27211, 29700, 22164, 24401, 24401, 24401, 24401, 27128, 31693, 27477, 18888, 18888, 18888, 18890, 27194, 27211, 27211, 27211, 27211, 19484, 35299, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 27059, 23086, 27211, 27211, 27211, 33366, 30756, 24012, 24401, 24401, 24401, 35044, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 20815, 27211, 30818, 19960, 33969, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22713, 18836, 22059, 27496, 27516, 27541, 35231, 27557, 22087, 29662, 26292, 23292, 27573, 24836, 27601, 27211, 27636, 22121, 35544, 27686, 24401, 27721, 18866, 18888, 27799, 18888, 27818, 22071, 27853, 32260, 27211, 26013, 27873, 27920, 22164, 29419, 24401, 29946, 33413, 26742, 27751, 26881, 18888, 18888, 27261, 36776, 27936, 27211, 27211, 27211, 27988, 28005, 28031, 28052, 24401, 24401, 28069, 28088, 28135, 25488, 28152, 26069, 28167, 27211, 28340, 24657, 28196, 30756, 31523, 24401, 28212, 34176, 36174, 24956, 28248, 28266, 28290, 21488, 33077, 28327, 28356, 17590, 20986, 23126, 28391, 28425, 28102, 28451, 28470, 28490, 28516, 28534, 20034, 33728, 25868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 30241, 28274, 28553, 28574, 19406, 28590, 23086, 23330, 19828, 19452, 28615, 28660, 26147, 25783, 31738, 19837, 25782, 19760, 29613, 35958, 29276, 22105, 19419, 27963, 23157, 28700, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 22528, 18888, 18888, 18888, 18888, 18890, 27333, 27211, 27211, 27211, 27211, 19484, 30853, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22728, 18836, 28747, 28782, 28817, 28841, 28857, 28880, 28896, 24161, 28943, 32011, 36261, 27340, 28961, 29492, 28982, 29011, 24522, 29027, 25436, 29048, 23051, 27500, 29090, 29110, 30713, 18888, 23512, 29130, 25183, 27211, 29155, 28927, 27033, 29173, 23230, 24401, 29199, 35373, 31693, 18888, 18888, 25583, 32629, 29218, 27211, 27211, 31461, 30692, 29237, 27075, 24401, 24401, 24401, 29262, 29302, 19628, 18888, 34329, 18888, 18888, 23086, 27211, 29329, 27211, 27211, 30756, 24012, 35933, 24401, 24401, 24401, 27705, 31612, 18888, 18888, 29346, 29374, 27211, 35650, 17590, 21436, 29393, 24401, 25970, 18887, 33895, 18888, 27211, 32528, 27212, 24016, 32769, 19868, 25659, 18888, 26889, 27211, 27211, 29412, 23889, 24371, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31768, 19840, 25783, 31738, 19837, 29435, 29508, 31102, 29550, 29606, 22105, 30300, 29462, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22743, 18836, 22059, 29629, 29473, 34097, 33285, 29183, 29651, 27254, 18888, 29678, 33329, 32535, 27211, 29694, 29716, 22121, 19202, 24401, 32742, 29741, 18866, 26776, 33921, 28474, 18888, 18888, 25783, 29766, 27211, 29809, 27211, 35072, 22164, 35825, 24401, 29828, 24401, 24036, 36769, 25217, 18888, 18888, 29848, 18890, 27211, 29871, 27211, 26258, 27211, 29894, 24401, 29929, 24401, 36587, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 29725, 29962, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18473, 18888, 18888, 19584, 27211, 27212, 24016, 29982, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19902, 19447, 32052, 19544, 19828, 29998, 30097, 30031, 19840, 25783, 30047, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 30075, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22758, 18836, 30121, 30156, 30206, 30257, 30273, 30336, 22087, 35624, 32837, 25762, 18890, 29878, 34934, 26812, 27211, 22121, 24931, 23223, 29202, 24401, 18866, 34373, 30352, 18888, 18888, 18888, 23447, 24828, 27211, 27211, 27211, 35072, 30370, 35052, 24401, 24401, 24401, 24036, 29523, 18888, 18888, 27146, 18888, 31308, 30386, 27211, 27211, 30405, 30558, 19484, 30427, 24401, 24401, 29938, 35686, 19628, 28766, 30447, 34506, 35614, 23086, 28731, 30482, 30517, 30552, 30756, 24012, 20156, 30574, 30598, 30667, 26283, 33464, 28945, 27670, 30687, 32915, 33504, 25328, 17590, 23963, 20450, 33837, 21016, 32397, 26300, 30708, 30729, 27885, 30748, 21588, 36373, 30779, 26653, 24628, 33220, 32514, 30806, 31835, 25412, 25906, 26515, 18890, 28825, 31833, 26133, 19447, 28304, 31730, 23834, 26057, 30869, 30885, 32181, 30920, 30942, 32797, 25782, 30970, 31015, 23516, 31008, 30997, 31034, 27963, 19659, 29450, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22773, 18836, 31058, 31074, 32463, 31125, 31141, 31197, 22087, 18888, 29534, 35471, 36738, 27211, 24342, 31213, 24424, 22121, 24401, 20175, 31229, 31917, 27736, 31245, 34334, 27175, 18888, 29094, 27286, 27211, 31278, 31336, 27211, 31355, 31371, 24401, 31402, 31418, 24401, 31437, 31693, 18888, 31619, 32841, 18888, 18890, 27211, 27211, 31460, 31477, 27211, 19484, 24401, 24401, 31497, 36581, 24401, 33020, 18888, 18888, 18888, 18888, 30007, 27211, 27211, 27211, 27211, 31516, 32310, 24401, 24401, 24401, 24401, 31539, 18888, 28762, 18888, 24651, 35740, 27211, 27211, 28644, 31565, 35796, 24401, 24401, 19318, 32188, 18888, 24334, 28366, 27212, 29966, 29832, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 31587, 19868, 31635, 32435, 33693, 30105, 31663, 20005, 31715, 31757, 31784, 31812, 30015, 31851, 31878, 25783, 31898, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 31933, 30221, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22788, 18836, 22059, 25729, 30466, 31968, 24306, 31984, 32000, 32807, 35160, 27017, 29590, 34941, 19801, 29377, 33700, 22121, 27040, 30431, 29396, 28864, 29565, 18888, 18888, 18888, 32027, 18888, 25783, 27211, 27211, 23698, 27211, 35072, 22164, 24401, 24401, 30845, 24401, 24036, 32045, 18888, 26929, 18888, 18888, 18890, 27211, 31481, 32068, 27211, 27211, 32088, 24401, 33058, 32122, 24401, 24401, 33736, 18888, 18888, 33162, 18888, 23086, 27211, 27211, 29484, 27211, 28375, 32144, 24401, 24401, 33831, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 36704, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 33107, 22171, 33224, 24271, 32169, 31017, 27856, 31741, 19840, 25783, 31738, 30234, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 32204, 32232, 32252, 32677, 33295, 29074, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 23619, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 32276, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 32299, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 33886, 18889, 36065, 27211, 19719, 35326, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22803, 18836, 32335, 31647, 34666, 32351, 32367, 32417, 22087, 18888, 32433, 19335, 32451, 27211, 32479, 27107, 32500, 22121, 24401, 32551, 20085, 32572, 18866, 22287, 23753, 18888, 18888, 32602, 32665, 27211, 32693, 27211, 26972, 32713, 32729, 24401, 32764, 24401, 25877, 32785, 34768, 18888, 27390, 32823, 24594, 24855, 32857, 24890, 32878, 32904, 27211, 32942, 32977, 24401, 33000, 29313, 24401, 30790, 26206, 27666, 33904, 18888, 23086, 36353, 27211, 33036, 27211, 30756, 24012, 32153, 24401, 33056, 24401, 35861, 18888, 18888, 30354, 27972, 27211, 27211, 33800, 17590, 20145, 24401, 24401, 34638, 20811, 18888, 18888, 33074, 27211, 27212, 36167, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 34616, 24169, 33093, 33123, 33157, 27856, 31741, 23862, 26552, 34302, 19837, 25782, 19760, 31015, 23516, 31008, 33178, 19973, 27963, 23497, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22818, 18836, 33205, 28113, 33240, 34097, 33275, 29183, 22087, 33318, 35438, 18888, 18890, 33345, 26391, 33382, 27211, 22121, 33399, 28072, 33442, 24401, 18866, 22232, 18888, 33459, 18888, 18888, 33480, 33498, 25175, 27211, 27211, 26704, 22164, 24775, 35239, 24401, 24401, 25914, 29580, 18888, 18888, 31109, 25211, 33520, 33539, 27211, 27211, 33556, 36284, 19484, 33585, 24401, 24401, 33604, 32556, 19628, 18888, 18888, 31262, 33658, 23086, 27211, 27211, 33679, 27211, 30756, 24012, 24401, 24401, 33716, 24401, 26854, 27480, 18888, 33752, 27855, 33259, 34701, 27211, 17590, 32102, 24782, 23807, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 33773, 36105, 19868, 25659, 18888, 23368, 27211, 29157, 19719, 23889, 34454, 29286, 18890, 33794, 25302, 33816, 19447, 34079, 33853, 31862, 31017, 27856, 31741, 33877, 28920, 33937, 19837, 30461, 34002, 22276, 36041, 34029, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22833, 18836, 34064, 32616, 34113, 34141, 34157, 34192, 34208, 32216, 36013, 31549, 31952, 34224, 34248, 34287, 29330, 34350, 34389, 34413, 34481, 26793, 18866, 26187, 29635, 22293, 18888, 36654, 25783, 34522, 34544, 34566, 25821, 35072, 22164, 34586, 34609, 34632, 19604, 24036, 36644, 36674, 24681, 18888, 32401, 34654, 31339, 34682, 34698, 27211, 34717, 34753, 28053, 34812, 34836, 24401, 33619, 19628, 34858, 32236, 34906, 24598, 33523, 27612, 34890, 34922, 24732, 29246, 36717, 33634, 34465, 32984, 34168, 26750, 34957, 18888, 18888, 34994, 35010, 27211, 33040, 17590, 29913, 35035, 24401, 36304, 25482, 30171, 35883, 35068, 35088, 26627, 20441, 31173, 35123, 35143, 35176, 24640, 30492, 29358, 19719, 35192, 35219, 25384, 28801, 35255, 35279, 32586, 34496, 23086, 23330, 29061, 31017, 27856, 31741, 19840, 25783, 31738, 24547, 25164, 35315, 31796, 35353, 34316, 22105, 19419, 27963, 24091, 28630, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22848, 18836, 22059, 34782, 34088, 35389, 21008, 35405, 35421, 35454, 18888, 18888, 23466, 35487, 27211, 27211, 27211, 35513, 31154, 24401, 24401, 24401, 35560, 18888, 26863, 36664, 35601, 24872, 25783, 30389, 23536, 26250, 35647, 35666, 22164, 19522, 19564, 30582, 35682, 27697, 35575, 29114, 18888, 18888, 18888, 18890, 27211, 35702, 27211, 27211, 27211, 35723, 24401, 35527, 24401, 24401, 24401, 19628, 30184, 18888, 18888, 18888, 23086, 35739, 27211, 27211, 27211, 29139, 22938, 24401, 24401, 24401, 24401, 23898, 35756, 18888, 18888, 25025, 35778, 27211, 27211, 17590, 20064, 35795, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 23917, 18890, 34550, 31833, 22262, 19447, 23086, 23330, 26418, 31017, 27856, 31741, 19840, 25783, 35812, 19837, 27187, 35841, 33135, 23516, 31008, 22105, 22148, 28712, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22863, 18836, 22059, 35877, 28723, 34097, 31164, 29183, 22087, 26758, 18888, 22592, 18890, 23989, 27211, 29812, 27211, 22121, 33778, 24401, 31421, 24401, 18866, 18888, 18888, 26872, 18888, 18888, 25783, 27211, 30732, 27211, 27211, 35072, 22164, 24401, 24908, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22878, 18836, 22059, 27837, 27857, 35899, 24401, 35915, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31602, 18888, 18888, 18888, 18888, 26223, 27211, 27211, 27211, 27211, 27211, 19484, 35931, 24401, 24401, 24401, 24401, 19628, 18888, 28136, 18888, 18888, 35949, 27211, 32862, 27211, 32697, 30756, 24012, 24401, 32283, 24401, 32128, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22893, 18836, 22059, 35974, 34882, 34097, 33960, 29183, 35996, 18888, 23311, 18888, 36029, 27211, 27211, 36064, 36081, 22121, 24401, 24401, 36104, 33950, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 36121, 18888, 25559, 18888, 18888, 18890, 27211, 27211, 30313, 27211, 27211, 36154, 24401, 24401, 34397, 24401, 24401, 19628, 28250, 18888, 18888, 18888, 23086, 30926, 27211, 27211, 27211, 26983, 24012, 33642, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 19354, 27857, 36190, 24401, 36206, 22087, 18888, 18888, 18888, 18007, 27211, 27211, 27211, 24724, 22121, 24401, 24401, 24401, 30827, 18866, 18888, 36222, 18888, 28795, 18888, 25783, 35100, 27211, 27429, 27211, 35072, 22164, 30836, 24401, 24499, 24401, 24036, 31693, 18888, 36244, 18888, 18888, 18890, 27211, 36088, 27211, 27211, 27211, 19484, 24401, 28036, 24401, 24401, 24401, 19628, 18888, 18888, 35631, 18888, 35762, 27211, 27211, 36277, 27211, 34730, 24012, 24401, 24401, 36300, 24401, 36320, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 25712, 18888, 18888, 36346, 27211, 27212, 19184, 24402, 19868, 25659, 32029, 18889, 27211, 33359, 19719, 23889, 36369, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22384, 18836, 36389, 19008, 19233, 20367, 36434, 17173, 17595, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 36453, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20362, 21726, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22369, 18836, 18987, 19008, 19233, 20367, 19008, 21737, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21813, 18836, 36489, 19008, 19233, 20367, 19008, 17173, 17737, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17768, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20543, 22022, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 36517, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 19307, 18888, 27857, 30756, 24401, 29183, 28015, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 36567, 24401, 24401, 24401, 24401, 22953, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 36603, 24401, 24401, 24401, 24401, 24036, 18881, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 36629, 36690, 18720, 19008, 19233, 20367, 19008, 17454, 17595, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17223, 17308, 17327, 17346, 18918, 36754, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20362, 21726, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 0, 94242, 0, 118820, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2482176, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 2207744, 2404352, 2412544, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3104768, 2605056, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2678784, 2207744, 2695168, 2207744, 2703360, 2207744, 2711552, 2752512, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 139, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664, 2158592, 2158592, 2158592, 2863104, 2891776, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2785280, 2207744, 2809856, 2207744, 2207744, 2842624, 2207744, 2207744, 2207744, 2899968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2473984, 2207744, 2207744, 2494464, 2207744, 2207744, 2207744, 2523136, 2158592, 2404352, 2412544, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2564096, 2158592, 2158592, 2605056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2678784, 2158592, 2695168, 2158592, 2703360, 2158592, 2711552, 2752512, 2158592, 2158592, 2785280, 2158592, 2158592, 2785280, 2158592, 2809856, 2158592, 2158592, 2842624, 2158592, 2158592, 2158592, 2899968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 641, 0, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 32768, 0, 2158592, 0, 2158592, 2158592, 2158592, 2383872, 2158592, 2158592, 2158592, 2158592, 3006464, 2383872, 2207744, 2207744, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2572573, 2158877, 2158877, 0, 2207744, 2207744, 2596864, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2641920, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 167936, 0, 0, 2162688, 0, 0, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2146304, 2146304, 2224128, 2224128, 2232320, 2232320, 2232320, 641, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2531328, 2158592, 2158592, 2158592, 2158592, 2158592, 2617344, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2502656, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2699264, 2158592, 2158592, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664, 2207744, 2863104, 2891776, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3018752, 2207744, 3043328, 2207744, 2207744, 2207744, 2207744, 3080192, 2207744, 2207744, 3112960, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 172310, 279, 0, 2162688, 0, 0, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2404352, 2412544, 2158592, 2510848, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2584576, 2158592, 2609152, 2158592, 2158592, 2629632, 2158592, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2158592, 2158592, 3170304, 3174400, 2158592, 2367488, 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 0, 2207744, 2207744, 2207744, 2433024, 2207744, 2453504, 2461696, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2510848, 2207744, 2207744, 2207744, 2207744, 2207744, 2531328, 2207744, 2207744, 2207744, 2207744, 2207744, 2617344, 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 1508, 2715648, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2867200, 2207744, 2904064, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2580480, 2207744, 2207744, 2207744, 2207744, 2621440, 2207744, 2207744, 2207744, 3149824, 2207744, 2207744, 3170304, 3174400, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 2158592, 2158592, 2158592, 2404352, 2412544, 2707456, 2732032, 2207744, 2207744, 2207744, 2822144, 2826240, 2207744, 2895872, 2207744, 2207744, 2924544, 2207744, 2207744, 2973696, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 285, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 0, 0, 2535424, 2543616, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2572288, 2981888, 2207744, 2207744, 3002368, 2207744, 3047424, 3063808, 3076096, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3203072, 2708960, 2732032, 2158592, 2158592, 2158592, 2822144, 2827748, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2981888, 2158592, 2158592, 3002368, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2981888, 2158592, 2158592, 3003876, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 20480, 0, 0, 0, 0, 0, 2162688, 20480, 0, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2908160, 2527232, 2207744, 2207744, 2576384, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2908160, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592, 2158592, 0, 0, 2158592, 2158592, 2158592, 2158592, 2633728, 2658304, 0, 0, 2740224, 2744320, 0, 2834432, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 933, 45, 45, 45, 45, 442, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 2494464, 2158592, 2158592, 2158592, 2524757, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 1504, 2158592, 2498560, 2158592, 2158592, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 2736128, 2158592, 2158592, 0, 2158592, 2912256, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3108864, 2158592, 2158592, 3133440, 3145728, 3153920, 2375680, 2379776, 2207744, 2207744, 2420736, 2207744, 2449408, 2207744, 2207744, 2207744, 2498560, 2207744, 2207744, 2207744, 2207744, 2568192, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 551, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 2020, 2158592, 2592768, 2625536, 2207744, 2207744, 2674688, 2736128, 2207744, 2207744, 2207744, 2912256, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 542, 0, 544, 2207744, 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 641, 0, 0, 0, 0, 0, 0, 2367488, 2158592, 2498560, 2158592, 2158592, 1621, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 1608, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1107, 97, 97, 1110, 97, 97, 3133440, 3145728, 3153920, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3014656, 2158592, 2158592, 3051520, 2158592, 2158592, 3100672, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2416640, 2207744, 2465792, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2633728, 2658304, 2740224, 2744320, 2834432, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592, 2158592, 3129344, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744, 2207744, 3129344, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 32768, 0, 0, 0, 0, 0, 0, 2367488, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592, 2158592, 3129344, 2158592, 2158592, 2478080, 2158592, 2158592, 2158592, 2535424, 2543616, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3117056, 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 2699264, 2207744, 2207744, 2207744, 2207744, 2207744, 2748416, 2756608, 2777088, 2801664, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 0, 0, 2535709, 2543901, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2990365, 2158877, 2158877, 2158730, 2158730, 2158730, 2158730, 2158730, 2572426, 2207744, 2535424, 2543616, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158592, 2158592, 2478080, 2207744, 2207744, 2990080, 2207744, 2207744, 2158592, 2158592, 2482176, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 0, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 3010560, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158592, 2428928, 2158592, 2514944, 0, 0, 2158592, 2588672, 2158592, 0, 2838528, 2158592, 2158592, 2158592, 3010560, 2158592, 2506752, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 0, 29315, 922, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1539, 45, 3006464, 2383872, 0, 2020, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158592, 2637824, 2953216, 2158592, 2539520, 2158592, 2539520, 2207744, 0, 0, 2539520, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 0, 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2965504, 2965504, 2965504, 0, 0, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2474269, 2158877, 2158877, 0, 0, 2158877, 2158877, 2158877, 2158877, 2634013, 2658589, 0, 0, 2740509, 2744605, 0, 2834717, 40976, 18, 36884, 45078, 24, 28, 90143, 94242, 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18, 36884, 0, 0, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 86016, 0, 0, 2211840, 102439, 0, 0, 0, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 0, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 135, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2564096, 2158592, 2158592, 2158592, 2158592, 2158592, 2596864, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2641920, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472, 2494464, 2158592, 2158592, 2158592, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 0, 27, 27, 0, 2158592, 2498560, 2158592, 2158592, 0, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2494464, 2158592, 2158592, 2158592, 3006464, 2383872, 0, 0, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 40976, 18, 36884, 45078, 24, 27, 147488, 94242, 147456, 147488, 106538, 98347, 0, 0, 147456, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 81920, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2428928, 2158592, 2514944, 2158592, 2588672, 2158592, 2838528, 2158592, 2158592, 40976, 18, 151573, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1315, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1487, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 130, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3096576, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 644, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 1080, 0, 1084, 0, 1088, 0, 0, 0, 0, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2531466, 2158730, 2158730, 2158730, 2158730, 2158730, 2617482, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472, 2158592, 2818048, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143, 159779, 159744, 102439, 159779, 98347, 0, 0, 159744, 40976, 18, 18, 36884, 0, 45078, 0, 2224253, 172032, 2224253, 2232448, 2232448, 172032, 2232448, 90143, 0, 0, 2170880, 0, 0, 550, 829, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 124, 124, 127, 127, 127, 40976, 18, 36884, 45078, 25, 29, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 163931, 40976, 18, 18, 36884, 0, 45078, 249856, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 0, 827, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 4243810, 4243810, 24, 24, 27, 27, 27, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 57344, 286, 2158592, 2158592, 2158592, 2158592, 2707456, 2732032, 2158592, 2158592, 2158592, 2822144, 2826240, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 53248, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1613, 97, 97, 97, 97, 97, 97, 1495, 97, 97, 97, 97, 97, 97, 97, 97, 97, 566, 97, 97, 97, 97, 97, 97, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 546, 0, 0, 0, 0, 286, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 17, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 120, 121, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 53248, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 196608, 18, 266240, 24, 24, 27, 27, 27, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 0, 45, 45, 45, 45, 45, 45, 45, 1535, 45, 45, 45, 45, 45, 45, 45, 1416, 45, 45, 45, 45, 45, 45, 45, 45, 424, 45, 45, 45, 45, 45, 45, 45, 45, 45, 405, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 199, 45, 45, 67, 67, 67, 67, 67, 491, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1766, 67, 67, 67, 1767, 67, 24850, 24850, 12564, 12564, 0, 0, 2166784, 546, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 743, 57889, 0, 2170880, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1856, 45, 1858, 1859, 67, 67, 67, 1009, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1021, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367773, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2699549, 2158877, 2158877, 2158877, 2158877, 2158877, 2748701, 2756893, 2777373, 2801949, 97, 1115, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 857, 97, 67, 67, 67, 67, 67, 1258, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1826, 67, 97, 97, 97, 97, 97, 97, 1338, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 870, 97, 97, 67, 67, 67, 1463, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1579, 67, 67, 97, 97, 97, 1518, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 904, 905, 97, 97, 97, 97, 1620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0, 0, 0, 0, 45, 1679, 67, 67, 67, 1682, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1690, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 189, 45, 45, 45, 1748, 45, 45, 45, 1749, 1750, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1959, 67, 67, 67, 67, 1768, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1791, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1802, 67, 1817, 67, 67, 67, 67, 67, 67, 1823, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 1848, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 659, 45, 45, 45, 45, 45, 45, 45, 1863, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 495, 67, 67, 67, 67, 67, 1878, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 1973, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1165, 97, 1167, 67, 24850, 24850, 12564, 12564, 0, 0, 2166784, 0, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1789, 97, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 136, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 229376, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 67, 24850, 24850, 12564, 12564, 0, 0, 280, 547, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 1788, 97, 97, 0, 97, 2024, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 235, 67, 67, 67, 67, 67, 57889, 547, 547, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1799, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 1092, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1612, 97, 97, 97, 97, 1616, 97, 1297, 1472, 0, 0, 0, 0, 1303, 1474, 0, 0, 0, 0, 1309, 1476, 0, 0, 0, 0, 97, 97, 97, 1481, 97, 97, 97, 97, 97, 97, 1488, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 607, 97, 97, 97, 97, 40976, 18, 36884, 45078, 26, 30, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 213080, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 143448, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 0, 0, 0, 97, 97, 97, 97, 1482, 97, 1483, 97, 97, 97, 97, 97, 97, 1326, 97, 97, 1329, 1330, 97, 97, 97, 97, 97, 97, 1159, 1160, 97, 97, 97, 97, 97, 97, 97, 97, 590, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211974, 102439, 0, 0, 106538, 98347, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2474122, 2158730, 2158730, 2494602, 2158730, 2158730, 2158730, 2809994, 2158730, 2158730, 2842762, 2158730, 2158730, 2158730, 2900106, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3014794, 2158730, 2158730, 3051658, 2158730, 2158730, 3100810, 2158730, 2158730, 2158730, 2158730, 3096714, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 2207744, 541, 541, 543, 543, 0, 0, 2166784, 0, 548, 549, 549, 0, 286, 2158877, 2158877, 2158877, 2863389, 2892061, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3186973, 2158877, 0, 0, 0, 0, 0, 0, 0, 0, 2367626, 2158877, 2404637, 2412829, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2564381, 2158877, 2158877, 2605341, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2679069, 2158877, 2695453, 2158877, 2703645, 2158877, 2711837, 2752797, 2158877, 0, 2158877, 2158877, 2158877, 2384010, 2158730, 2158730, 2158730, 2158730, 3006602, 2383872, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3096576, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 2158877, 2785565, 2158877, 2810141, 2158877, 2158877, 2842909, 2158877, 2158877, 2158877, 2900253, 2158877, 2158877, 2158877, 2158877, 2158877, 2531613, 2158877, 2158877, 2158877, 2158877, 2158877, 2617629, 2158877, 2158877, 2158877, 2158877, 2158730, 2818186, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3105053, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 0, 0, 97, 97, 97, 1611, 97, 97, 97, 97, 97, 97, 97, 1496, 97, 97, 1499, 97, 97, 97, 97, 97, 2441354, 2445450, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2502794, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2433162, 2158730, 2453642, 2461834, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2580618, 2158730, 2158730, 2158730, 2158730, 2621578, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2699402, 2158730, 2158730, 2158730, 2158730, 2678922, 2158730, 2695306, 2158730, 2703498, 2158730, 2711690, 2752650, 2158730, 2158730, 2785418, 2158730, 2158730, 2158730, 3113098, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3186826, 2158730, 2207744, 2207744, 2207744, 2207744, 2781184, 2793472, 2207744, 2818048, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 541, 0, 543, 2158877, 2502941, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2580765, 2158877, 2158877, 2158877, 2158877, 2621725, 2158877, 3019037, 2158877, 3043613, 2158877, 2158877, 2158877, 2158877, 3080477, 2158877, 2158877, 3113245, 2158877, 2158877, 2158877, 2158877, 0, 2158877, 2908445, 2158877, 2158877, 2158877, 2978077, 2158877, 2158877, 2158877, 2158877, 3039517, 2158877, 2158730, 2510986, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2584714, 2158730, 2609290, 2158730, 2158730, 2629770, 2158730, 2158730, 2158730, 2388106, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2605194, 2158730, 2158730, 2158730, 2158730, 2687114, 2158730, 2715786, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2867338, 2158730, 2904202, 2158730, 2158730, 2158730, 2642058, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2781322, 2793610, 2158730, 3121290, 2158730, 2158730, 2158730, 3149962, 2158730, 2158730, 3170442, 3174538, 2158730, 2367488, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2441216, 2445312, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2502656, 2158877, 2433309, 2158877, 2453789, 2461981, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2511133, 2158877, 2158877, 2158877, 2158877, 2584861, 2158877, 2609437, 2158877, 2158877, 2629917, 2158877, 2158877, 2158877, 2687261, 2158877, 2715933, 2158877, 2158730, 2158730, 2973834, 2158730, 2982026, 2158730, 2158730, 3002506, 2158730, 3047562, 3063946, 3076234, 2158730, 2158730, 2158730, 2158730, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158877, 2507037, 0, 0, 2158877, 2158730, 2158730, 2158730, 3203210, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2564096, 2207744, 2207744, 2207744, 2707741, 2732317, 2158877, 2158877, 2158877, 2822429, 2826525, 2158877, 2896157, 2158877, 2158877, 2924829, 2158877, 2158877, 2973981, 2158877, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 642, 0, 2158592, 0, 45, 1529, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1755, 45, 67, 67, 2982173, 2158877, 2158877, 3002653, 2158877, 3047709, 3064093, 3076381, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3203357, 2523274, 2527370, 2158730, 2158730, 2576522, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2908298, 2494749, 2158877, 2158877, 2158877, 2523421, 2527517, 2158877, 2158877, 2576669, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 40976, 0, 18, 18, 4321280, 2224253, 2232448, 4329472, 2232448, 2158730, 2498698, 2158730, 2158730, 2158730, 2158730, 2568330, 2158730, 2592906, 2625674, 2158730, 2158730, 2674826, 2736266, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2158730, 2912394, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3109002, 2158730, 2158730, 3133578, 3145866, 3154058, 2375680, 2207744, 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375965, 2380061, 2158877, 2158877, 2421021, 2158877, 2449693, 2158877, 2158877, 2158877, 3117341, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3104906, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158877, 2498845, 2158877, 2158877, 0, 2158877, 2158877, 2568477, 2158877, 2593053, 2625821, 2158877, 2158877, 2674973, 0, 0, 0, 0, 97, 97, 1480, 97, 97, 97, 97, 97, 1485, 97, 97, 97, 0, 97, 97, 1729, 97, 1731, 97, 97, 97, 97, 97, 97, 97, 311, 97, 97, 97, 97, 97, 97, 97, 97, 1520, 97, 97, 1523, 97, 97, 1526, 97, 2736413, 2158877, 2158877, 0, 2158877, 2912541, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3109149, 2158877, 2158877, 3014941, 2158877, 2158877, 3051805, 2158877, 2158877, 3100957, 2158877, 2158877, 3121437, 2158877, 2158877, 2158877, 3150109, 3133725, 3146013, 3154205, 2158730, 2408586, 2416778, 2158730, 2465930, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3018890, 2158730, 3043466, 2158730, 2158730, 2158730, 2158730, 3080330, 2633866, 2658442, 2740362, 2744458, 2834570, 2949258, 2158730, 2986122, 2158730, 2998410, 2158730, 2158730, 2158730, 3129482, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744, 2207744, 3129344, 2158877, 2408733, 2416925, 2158877, 2466077, 2158877, 2158877, 3170589, 3174685, 2158877, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2424970, 2158730, 2158730, 2158730, 2158730, 2707594, 2732170, 2158730, 2158730, 2158730, 2822282, 2826378, 2158730, 2896010, 2158730, 2158730, 2924682, 2949405, 2158877, 2986269, 2158877, 2998557, 2158877, 2158877, 2158877, 3129629, 2158730, 2158730, 2478218, 2158730, 2158730, 2158730, 2535562, 2543754, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3117194, 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 3014656, 2207744, 2207744, 3051520, 2207744, 2207744, 3100672, 2207744, 2207744, 3121152, 2207744, 2207744, 2207744, 2207744, 2207744, 2584576, 2207744, 2609152, 2207744, 2207744, 2629632, 2207744, 2207744, 2207744, 2686976, 2207744, 2207744, 2535424, 2543616, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158877, 2158877, 2478365, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2158730, 2482314, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2387968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 823, 0, 825, 2158730, 2158730, 2158730, 2990218, 2158730, 2158730, 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 135, 0, 2207744, 2207744, 2990080, 2207744, 2207744, 2158877, 2158877, 2482461, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2429066, 2158730, 2515082, 2158730, 2588810, 2158730, 2838666, 2158730, 2158730, 2158730, 3010698, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158877, 2429213, 2158877, 2515229, 0, 0, 2158877, 2588957, 2158877, 0, 2838813, 2158877, 2158877, 2158877, 3010845, 2158730, 2506890, 2158730, 2158730, 2158730, 2748554, 2756746, 2777226, 2801802, 2158730, 2158730, 2158730, 2863242, 2891914, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2564234, 2158730, 2158730, 2158730, 2158730, 2158730, 2597002, 2158730, 2158730, 2158730, 3006464, 2384157, 0, 0, 2158877, 2158877, 2158877, 2158877, 3006749, 2158730, 2637962, 2953354, 2158730, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158877, 2638109, 2953501, 2158877, 2539658, 2158730, 2539520, 2207744, 0, 0, 2539805, 2158877, 2158730, 2158730, 2158730, 2977930, 2158730, 2158730, 2158730, 2158730, 3039370, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3158154, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2965642, 2965504, 2965789, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1484, 97, 97, 97, 97, 2158592, 18, 0, 122880, 0, 0, 0, 77824, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 356, 0, 0, 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 45, 1751, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1427, 67, 67, 67, 67, 67, 1432, 67, 67, 67, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 122880, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 1322, 550, 0, 286, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 4329472, 27, 27, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 542, 0, 0, 0, 542, 0, 544, 0, 0, 0, 544, 0, 550, 0, 0, 0, 0, 0, 97, 97, 1610, 97, 97, 97, 97, 97, 97, 97, 97, 898, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 237568, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 192512, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 94, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 96, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 12378, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 126, 126, 126, 126, 90143, 0, 0, 2170880, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 20480, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 241664, 102439, 106538, 98347, 0, 0, 20568, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 200797, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 0, 0, 44, 0, 0, 20575, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 41, 41, 41, 0, 0, 1126400, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 89, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 131201, 27, 27, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0, 208896, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 32768, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2433024, 2158592, 2453504, 2461696, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2510848, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 245783, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 221184, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 180224, 40976, 18, 18, 36884, 155648, 45078, 0, 24, 24, 217088, 27, 27, 27, 217088, 90143, 0, 0, 2170880, 0, 0, 828, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2387968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 233472, 0, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 718, 45, 45, 45, 45, 45, 45, 45, 45, 45, 727, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 45, 1808, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 0, 0, 97, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 1787, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 2029, 45, 67, 67, 67, 67, 2033, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 1798, 45, 45, 1800, 45, 45, 0, 1472, 0, 0, 0, 0, 0, 1474, 0, 0, 0, 0, 0, 1476, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 1320, 97, 97, 0, 0, 97, 97, 97, 97, 1786, 97, 0, 0, 97, 97, 0, 1790, 1527, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 663, 67, 24850, 24850, 12564, 12564, 0, 57889, 281, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 1785, 97, 97, 0, 0, 97, 97, 0, 97, 97, 1979, 97, 97, 45, 45, 1983, 45, 1984, 45, 45, 45, 45, 45, 652, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 690, 45, 45, 694, 45, 45, 40976, 19, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 262144, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 46, 67, 98, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 45, 67, 97, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 258048, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 1122423, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 1114152, 1114152, 1114152, 0, 0, 1114112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 37, 102439, 106538, 98347, 0, 0, 204800, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 57436, 40976, 18, 36884, 45078, 24, 27, 33, 33, 0, 33, 33, 33, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 124, 124, 124, 127, 127, 127, 127, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158877, 2158877, 2158877, 2388253, 2158877, 2158877, 2158877, 2158877, 2158877, 2781469, 2793757, 2158877, 2818333, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2867485, 2158877, 2904349, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3096861, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2441501, 2445597, 2158877, 2158877, 2158877, 2158877, 2158877, 40976, 122, 123, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 936, 2158592, 4243810, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 935, 45, 45, 45, 715, 45, 45, 45, 45, 45, 45, 45, 723, 45, 45, 45, 45, 45, 1182, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 430, 45, 45, 45, 45, 45, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 47, 68, 99, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 48, 69, 100, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 49, 70, 101, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 50, 71, 102, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 51, 72, 103, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 52, 73, 104, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 53, 74, 105, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 54, 75, 106, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 55, 76, 107, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 56, 77, 108, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 57, 78, 109, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 58, 79, 110, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 59, 80, 111, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 60, 81, 112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 61, 82, 113, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 62, 83, 114, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 63, 84, 115, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 64, 85, 116, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 65, 86, 117, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 66, 87, 118, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18, 0, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1314, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1321, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 0, 1315, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1360, 97, 97, 131, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 145, 149, 45, 45, 45, 45, 45, 174, 45, 179, 45, 185, 45, 188, 45, 45, 202, 67, 255, 67, 67, 269, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 292, 296, 97, 97, 97, 97, 97, 321, 97, 326, 97, 332, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 646, 335, 97, 97, 349, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 437, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 523, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 511, 67, 67, 67, 97, 97, 97, 620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1501, 1502, 97, 793, 67, 67, 796, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 808, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 2052, 67, 67, 67, 67, 813, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 830, 97, 97, 97, 97, 97, 97, 97, 97, 97, 315, 97, 97, 97, 97, 97, 97, 841, 97, 97, 97, 97, 97, 97, 97, 97, 97, 854, 97, 97, 97, 97, 97, 97, 589, 97, 97, 97, 97, 97, 97, 97, 97, 97, 867, 97, 97, 97, 97, 97, 97, 97, 891, 97, 97, 894, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 906, 45, 937, 45, 45, 940, 45, 45, 45, 45, 45, 45, 948, 45, 45, 45, 45, 45, 734, 735, 67, 737, 67, 738, 67, 740, 67, 67, 67, 45, 967, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 435, 45, 45, 45, 980, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 415, 45, 45, 67, 67, 1024, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1081, 13112, 1085, 54074, 1089, 0, 0, 0, 0, 0, 0, 363, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 45, 1674, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1913, 67, 1914, 67, 67, 67, 1918, 67, 67, 97, 97, 97, 97, 1118, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 630, 97, 97, 97, 97, 97, 1169, 97, 97, 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1534, 45, 45, 45, 45, 45, 1538, 45, 45, 45, 45, 1233, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 742, 67, 45, 45, 1191, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 454, 67, 67, 67, 67, 1243, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1251, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 2050, 0, 97, 97, 45, 45, 45, 732, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 67, 67, 67, 1284, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 772, 67, 67, 67, 1293, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 2158592, 2158592, 2158592, 2404352, 2412544, 1323, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1331, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1737, 97, 1364, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1373, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 647, 45, 45, 1387, 45, 45, 1391, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 410, 45, 45, 45, 45, 45, 1400, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1407, 45, 45, 45, 45, 45, 941, 45, 943, 45, 45, 45, 45, 45, 45, 951, 45, 67, 1438, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1447, 67, 67, 67, 67, 67, 67, 782, 67, 67, 67, 67, 67, 67, 67, 67, 67, 756, 67, 67, 67, 67, 67, 67, 97, 1491, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1500, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1736, 97, 45, 45, 1541, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 677, 45, 45, 67, 1581, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 791, 792, 67, 67, 67, 67, 1598, 67, 1600, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 97, 97, 97, 1727, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1513, 97, 97, 67, 67, 97, 1879, 97, 1881, 97, 0, 1884, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 1842, 97, 97, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1928, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1903, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 1971, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 1381, 45, 45, 45, 45, 1976, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1747, 809, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 907, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1478, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1150, 97, 97, 97, 97, 67, 67, 67, 67, 1244, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 477, 67, 67, 67, 67, 67, 67, 1294, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1324, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1374, 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 945, 45, 45, 45, 45, 45, 45, 45, 45, 1908, 45, 45, 1910, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1919, 67, 0, 0, 97, 97, 97, 97, 45, 2048, 67, 2049, 0, 0, 97, 2051, 45, 45, 45, 939, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 397, 45, 45, 45, 1921, 67, 67, 1923, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1947, 45, 1935, 0, 0, 0, 97, 1939, 97, 97, 1941, 97, 45, 45, 45, 45, 45, 45, 382, 389, 45, 45, 45, 45, 45, 45, 45, 45, 1810, 45, 45, 1812, 67, 67, 67, 67, 67, 256, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 336, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 371, 373, 45, 45, 45, 955, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 413, 45, 45, 45, 457, 459, 67, 67, 67, 67, 67, 67, 67, 67, 473, 67, 478, 67, 67, 482, 67, 67, 485, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 1828, 97, 554, 556, 97, 97, 97, 97, 97, 97, 97, 97, 570, 97, 575, 97, 97, 579, 97, 97, 582, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 330, 97, 97, 67, 746, 67, 67, 67, 67, 67, 67, 67, 67, 67, 758, 67, 67, 67, 67, 67, 67, 67, 1575, 67, 67, 67, 67, 67, 67, 67, 67, 493, 67, 67, 67, 67, 67, 67, 67, 97, 97, 844, 97, 97, 97, 97, 97, 97, 97, 97, 97, 856, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1735, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1642, 97, 1644, 97, 97, 890, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 67, 67, 67, 67, 1065, 1066, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 532, 67, 67, 67, 67, 67, 67, 67, 1451, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 496, 67, 67, 97, 97, 1505, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 593, 97, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1617, 97, 97, 1635, 0, 1637, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 885, 97, 97, 97, 97, 67, 67, 1704, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 565, 572, 97, 97, 97, 97, 97, 97, 97, 97, 1832, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1946, 45, 45, 67, 67, 67, 67, 67, 97, 1926, 97, 1927, 97, 0, 0, 0, 97, 97, 1934, 2043, 0, 0, 97, 97, 97, 2047, 45, 45, 67, 67, 0, 1832, 97, 97, 45, 45, 45, 981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1227, 45, 45, 45, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 372, 45, 45, 45, 45, 1661, 1662, 45, 45, 45, 45, 45, 1666, 45, 45, 45, 45, 45, 1673, 45, 1675, 45, 45, 45, 45, 45, 45, 45, 67, 1426, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1275, 67, 67, 67, 67, 67, 45, 418, 45, 45, 420, 45, 45, 423, 45, 45, 45, 45, 45, 45, 45, 45, 959, 45, 45, 962, 45, 45, 45, 45, 458, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 483, 67, 67, 67, 67, 504, 67, 67, 506, 67, 67, 509, 67, 67, 67, 67, 67, 67, 67, 528, 67, 67, 67, 67, 67, 67, 67, 67, 1287, 67, 67, 67, 67, 67, 67, 67, 555, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 580, 97, 97, 97, 97, 601, 97, 97, 603, 97, 97, 606, 97, 97, 97, 97, 97, 97, 848, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1498, 97, 97, 97, 97, 97, 97, 45, 45, 714, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 989, 990, 45, 67, 67, 67, 67, 67, 1011, 67, 67, 67, 67, 1015, 67, 67, 67, 67, 67, 67, 67, 753, 67, 67, 67, 67, 67, 67, 67, 67, 467, 67, 67, 67, 67, 67, 67, 67, 45, 45, 1179, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1003, 1004, 67, 1217, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 728, 67, 1461, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1034, 67, 97, 1516, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 871, 97, 67, 67, 67, 1705, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 567, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1715, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 1380, 45, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1887, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 2006, 45, 45, 1907, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1920, 67, 97, 0, 2035, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 1428, 67, 67, 67, 67, 67, 67, 1435, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 146, 45, 152, 45, 45, 165, 45, 175, 45, 180, 45, 45, 187, 190, 195, 45, 203, 254, 257, 262, 67, 270, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 97, 97, 97, 293, 97, 299, 97, 97, 312, 97, 322, 97, 327, 97, 97, 334, 337, 342, 97, 350, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 484, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 499, 97, 581, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 596, 648, 45, 650, 45, 651, 45, 653, 45, 45, 45, 657, 45, 45, 45, 45, 45, 45, 1954, 67, 67, 67, 1958, 67, 67, 67, 67, 67, 67, 67, 768, 67, 67, 67, 67, 67, 67, 67, 67, 769, 67, 67, 67, 67, 67, 67, 67, 680, 45, 45, 45, 45, 45, 45, 45, 45, 688, 689, 691, 45, 45, 45, 45, 45, 983, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 947, 45, 45, 45, 45, 952, 45, 45, 698, 699, 45, 45, 702, 703, 45, 45, 45, 45, 45, 45, 45, 711, 744, 67, 67, 67, 67, 67, 67, 67, 67, 67, 757, 67, 67, 67, 67, 761, 67, 67, 67, 67, 765, 67, 767, 67, 67, 67, 67, 67, 67, 67, 67, 775, 776, 778, 67, 67, 67, 67, 67, 67, 785, 786, 67, 67, 789, 790, 67, 67, 67, 67, 67, 67, 1442, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1775, 97, 97, 97, 67, 67, 67, 67, 67, 798, 67, 67, 67, 802, 67, 67, 67, 67, 67, 67, 67, 67, 1465, 67, 67, 1468, 67, 67, 1471, 67, 67, 810, 67, 67, 67, 67, 67, 67, 67, 67, 67, 821, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 833, 97, 835, 97, 836, 97, 838, 97, 97, 0, 0, 97, 97, 97, 2002, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1740, 45, 45, 45, 1744, 45, 45, 45, 97, 842, 97, 97, 97, 97, 97, 97, 97, 97, 97, 855, 97, 97, 97, 97, 0, 1717, 1718, 97, 97, 97, 97, 97, 1722, 97, 0, 0, 859, 97, 97, 97, 97, 863, 97, 865, 97, 97, 97, 97, 97, 97, 97, 97, 604, 97, 97, 97, 97, 97, 97, 97, 873, 874, 876, 97, 97, 97, 97, 97, 97, 883, 884, 97, 97, 887, 888, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 225280, 0, 365, 0, 367, 0, 45, 45, 45, 1531, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1199, 45, 45, 45, 45, 45, 97, 97, 908, 97, 97, 97, 97, 97, 97, 97, 97, 97, 919, 638, 0, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2425117, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2597149, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2642205, 2158877, 2158877, 2158877, 2158877, 2158877, 3158301, 0, 2375818, 2379914, 2158730, 2158730, 2420874, 2158730, 2449546, 2158730, 2158730, 953, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 965, 978, 45, 45, 45, 45, 45, 45, 985, 45, 45, 45, 45, 45, 45, 45, 45, 971, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1027, 67, 1029, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1455, 67, 67, 67, 67, 67, 67, 67, 1077, 1078, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 366, 0, 139, 2158730, 2158730, 2158730, 2404490, 2412682, 1113, 97, 97, 97, 97, 97, 97, 1121, 97, 1123, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1540, 1155, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 615, 1168, 97, 97, 1171, 1172, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 1533, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1663, 45, 45, 45, 45, 45, 45, 45, 45, 45, 183, 45, 45, 45, 45, 201, 45, 45, 45, 1219, 45, 45, 45, 45, 45, 45, 45, 1226, 45, 45, 45, 45, 45, 168, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 427, 45, 45, 45, 45, 45, 45, 45, 1231, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1242, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1046, 67, 67, 1254, 67, 1256, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 806, 807, 67, 67, 97, 1336, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1111, 97, 97, 97, 97, 97, 1351, 97, 97, 97, 1354, 97, 97, 97, 1359, 97, 97, 97, 0, 97, 97, 97, 97, 1640, 97, 97, 97, 97, 97, 97, 97, 897, 97, 97, 97, 902, 97, 97, 97, 97, 97, 97, 97, 97, 1366, 97, 97, 97, 97, 97, 97, 97, 1371, 97, 97, 97, 0, 97, 97, 97, 1730, 97, 97, 97, 97, 97, 97, 97, 97, 915, 97, 97, 97, 97, 0, 360, 0, 67, 67, 67, 1440, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1017, 67, 1019, 67, 67, 67, 67, 67, 1453, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1459, 97, 97, 97, 1493, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1525, 97, 97, 97, 97, 97, 97, 1507, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1514, 67, 67, 67, 67, 1584, 67, 67, 67, 67, 67, 1590, 67, 67, 67, 67, 67, 67, 67, 783, 67, 67, 67, 788, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1599, 1601, 67, 67, 67, 1604, 67, 1606, 1607, 67, 1472, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 1614, 97, 97, 97, 97, 45, 45, 1850, 45, 45, 45, 45, 1855, 45, 45, 45, 45, 45, 1222, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1229, 97, 1618, 97, 97, 97, 97, 97, 97, 97, 1625, 97, 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 447, 45, 45, 45, 45, 45, 67, 67, 1633, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1643, 1645, 97, 97, 0, 0, 97, 97, 1784, 97, 97, 97, 0, 0, 97, 97, 0, 97, 1894, 1895, 97, 1897, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 656, 45, 45, 45, 45, 45, 45, 97, 1648, 97, 1650, 1651, 97, 0, 45, 45, 45, 1654, 45, 45, 45, 45, 45, 169, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 658, 45, 45, 45, 45, 664, 45, 45, 1659, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1187, 45, 45, 1669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1005, 67, 67, 1681, 67, 67, 67, 67, 67, 67, 67, 1686, 67, 67, 67, 67, 67, 67, 67, 784, 67, 67, 67, 67, 67, 67, 67, 67, 1055, 67, 67, 67, 67, 1060, 67, 67, 97, 97, 1713, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1378, 45, 45, 45, 45, 45, 45, 45, 408, 45, 45, 45, 45, 45, 45, 45, 45, 1547, 45, 1549, 45, 45, 45, 45, 45, 97, 97, 1780, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 2027, 2028, 45, 45, 67, 67, 2031, 2032, 67, 45, 45, 1804, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1917, 67, 67, 67, 67, 67, 67, 67, 1819, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1708, 97, 97, 97, 97, 97, 45, 45, 1862, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 497, 67, 67, 67, 1877, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 1839, 0, 0, 97, 97, 97, 97, 1936, 0, 0, 97, 97, 97, 97, 97, 97, 1943, 1944, 1945, 45, 45, 45, 45, 670, 45, 45, 45, 45, 674, 45, 45, 45, 45, 678, 45, 1948, 45, 1950, 45, 45, 45, 45, 1955, 1956, 1957, 67, 67, 67, 1960, 67, 1962, 67, 67, 67, 67, 1967, 1968, 1969, 97, 0, 0, 0, 97, 97, 1974, 97, 0, 1936, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1906, 0, 1977, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1746, 45, 45, 45, 45, 2011, 67, 67, 2013, 67, 67, 67, 2017, 97, 97, 0, 0, 2021, 97, 8192, 97, 97, 2025, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1916, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 140, 45, 45, 45, 1180, 45, 45, 45, 45, 1184, 45, 45, 45, 45, 45, 45, 45, 387, 45, 392, 45, 45, 396, 45, 45, 399, 45, 45, 67, 207, 67, 67, 67, 67, 67, 67, 236, 67, 67, 67, 67, 67, 67, 67, 800, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1603, 67, 67, 67, 67, 67, 0, 97, 97, 287, 97, 97, 97, 97, 97, 97, 316, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 1656, 1657, 45, 376, 45, 45, 45, 45, 45, 388, 45, 45, 45, 45, 45, 45, 45, 45, 1406, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 462, 67, 67, 67, 67, 67, 474, 67, 67, 67, 67, 67, 67, 67, 817, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 97, 97, 559, 97, 97, 97, 97, 97, 571, 97, 97, 97, 97, 97, 97, 896, 97, 97, 97, 900, 97, 97, 97, 97, 97, 97, 912, 914, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 391, 45, 45, 45, 45, 45, 45, 45, 45, 713, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 662, 45, 1140, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 636, 67, 67, 1283, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 513, 67, 67, 1363, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 889, 97, 97, 97, 1714, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 926, 45, 45, 45, 45, 45, 45, 45, 45, 672, 45, 45, 45, 45, 45, 45, 45, 45, 686, 45, 45, 45, 45, 45, 45, 45, 45, 944, 45, 45, 45, 45, 45, 45, 45, 45, 1676, 45, 45, 45, 45, 45, 45, 67, 97, 97, 97, 1833, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1902, 45, 45, 45, 45, 45, 957, 45, 45, 45, 45, 961, 45, 963, 45, 45, 45, 67, 97, 2034, 0, 97, 97, 97, 97, 97, 2040, 45, 45, 45, 2042, 67, 67, 67, 67, 67, 67, 1574, 67, 67, 67, 67, 67, 1578, 67, 67, 67, 67, 67, 67, 799, 67, 67, 67, 804, 67, 67, 67, 67, 67, 67, 67, 1298, 0, 0, 0, 1304, 0, 0, 0, 1310, 132, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 1414, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 428, 45, 45, 45, 45, 45, 57889, 0, 0, 54074, 54074, 550, 831, 97, 97, 97, 97, 97, 97, 97, 97, 97, 568, 97, 97, 97, 97, 578, 97, 45, 45, 968, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1228, 45, 45, 67, 67, 67, 67, 67, 25398, 1082, 13112, 1086, 54074, 1090, 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352, 2412544, 67, 67, 67, 67, 1464, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 510, 67, 67, 67, 67, 97, 97, 97, 97, 1519, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 918, 97, 0, 0, 0, 0, 1528, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 976, 45, 1554, 45, 45, 45, 45, 45, 45, 45, 45, 1562, 45, 45, 1565, 45, 45, 45, 45, 683, 45, 45, 45, 687, 45, 45, 692, 45, 45, 45, 45, 45, 1953, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1014, 67, 67, 67, 67, 67, 67, 1568, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 67, 67, 67, 67, 67, 1585, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1594, 97, 97, 1649, 97, 97, 97, 0, 45, 45, 1653, 45, 45, 45, 45, 45, 45, 383, 45, 45, 45, 45, 45, 45, 45, 45, 45, 986, 45, 45, 45, 45, 45, 45, 45, 45, 1670, 45, 1672, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 736, 67, 67, 67, 67, 67, 741, 67, 67, 67, 1680, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1074, 67, 67, 67, 1692, 67, 67, 67, 67, 67, 67, 67, 1697, 67, 1699, 67, 67, 67, 67, 67, 67, 1012, 67, 67, 67, 67, 67, 67, 67, 67, 67, 468, 475, 67, 67, 67, 67, 67, 67, 1769, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 624, 97, 97, 97, 97, 97, 97, 634, 97, 97, 1792, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 958, 45, 45, 45, 45, 45, 45, 964, 45, 150, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 977, 204, 45, 67, 67, 67, 217, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 787, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 271, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 351, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 938, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1398, 45, 45, 45, 153, 45, 161, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 660, 661, 45, 45, 205, 45, 67, 67, 67, 67, 220, 67, 228, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 280, 94, 0, 0, 67, 67, 67, 67, 67, 272, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 352, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 439, 45, 45, 45, 45, 45, 445, 45, 45, 45, 452, 45, 45, 67, 67, 212, 216, 67, 67, 67, 67, 67, 241, 67, 246, 67, 252, 67, 67, 486, 67, 67, 67, 67, 67, 67, 67, 494, 67, 67, 67, 67, 67, 67, 67, 1245, 67, 67, 67, 67, 67, 67, 67, 67, 1013, 67, 67, 1016, 67, 67, 67, 67, 67, 521, 67, 67, 525, 67, 67, 67, 67, 67, 531, 67, 67, 67, 538, 67, 0, 0, 2046, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1192, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1418, 45, 45, 1421, 97, 97, 583, 97, 97, 97, 97, 97, 97, 97, 591, 97, 97, 97, 97, 97, 97, 913, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 1384, 97, 618, 97, 97, 622, 97, 97, 97, 97, 97, 628, 97, 97, 97, 635, 97, 18, 131427, 0, 0, 0, 639, 0, 132, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 932, 45, 45, 45, 45, 45, 1544, 45, 45, 45, 45, 45, 1550, 45, 45, 45, 45, 45, 1194, 45, 1196, 45, 45, 45, 45, 45, 45, 45, 45, 999, 45, 45, 45, 45, 45, 67, 67, 45, 45, 667, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1408, 45, 45, 45, 696, 45, 45, 45, 701, 45, 45, 45, 45, 45, 45, 45, 45, 710, 45, 45, 45, 1220, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 194, 45, 45, 45, 729, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 797, 67, 67, 67, 67, 67, 67, 805, 67, 67, 67, 67, 67, 67, 67, 1587, 67, 1589, 67, 67, 67, 67, 67, 67, 67, 67, 1763, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2162968, 0, 0, 67, 67, 67, 67, 67, 814, 816, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1008, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1020, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1429, 67, 1430, 67, 67, 67, 67, 67, 1062, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 518, 1076, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1102, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1124, 97, 1126, 97, 97, 1114, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1112, 97, 97, 1156, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 594, 97, 97, 97, 97, 1170, 97, 97, 97, 97, 0, 921, 0, 0, 0, 0, 0, 0, 45, 45, 45, 45, 1532, 45, 45, 45, 45, 1536, 45, 45, 45, 45, 45, 172, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 706, 45, 45, 709, 45, 45, 1177, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1202, 45, 1204, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1215, 45, 45, 45, 1232, 45, 45, 45, 45, 45, 45, 45, 67, 1237, 67, 67, 67, 67, 67, 67, 1053, 1054, 67, 67, 67, 67, 67, 67, 1061, 67, 67, 1282, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1289, 67, 67, 67, 1292, 97, 97, 97, 97, 1339, 97, 97, 97, 97, 97, 97, 1344, 97, 97, 97, 97, 45, 1849, 45, 1851, 45, 45, 45, 45, 45, 45, 45, 45, 721, 45, 45, 45, 45, 45, 726, 45, 1385, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1188, 45, 45, 1401, 1402, 45, 45, 45, 45, 1405, 45, 45, 45, 45, 45, 45, 45, 45, 1752, 45, 45, 45, 45, 45, 67, 67, 1410, 45, 45, 45, 1413, 45, 1415, 45, 45, 45, 45, 45, 45, 1419, 45, 45, 45, 45, 1806, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 2019, 0, 97, 67, 67, 67, 1452, 67, 67, 67, 67, 67, 67, 67, 67, 1457, 67, 67, 67, 67, 67, 67, 1259, 67, 67, 67, 67, 67, 67, 1264, 67, 67, 1460, 67, 1462, 67, 67, 67, 67, 67, 67, 1466, 67, 67, 67, 67, 67, 67, 67, 67, 1588, 67, 67, 67, 67, 67, 67, 67, 0, 1300, 0, 0, 0, 1306, 0, 0, 0, 97, 97, 97, 1506, 97, 97, 97, 97, 97, 97, 97, 97, 1512, 97, 97, 97, 0, 1728, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 901, 97, 97, 97, 97, 1515, 97, 1517, 97, 97, 97, 97, 97, 97, 1521, 97, 97, 97, 97, 97, 97, 0, 45, 1652, 45, 45, 45, 1655, 45, 45, 45, 45, 45, 1542, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1552, 1553, 45, 45, 45, 1556, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 693, 45, 45, 45, 67, 67, 67, 67, 1572, 67, 67, 67, 67, 1576, 67, 67, 67, 67, 67, 67, 67, 67, 1602, 67, 67, 1605, 67, 67, 67, 0, 67, 1582, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1580, 67, 67, 1596, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 542, 0, 544, 67, 67, 67, 67, 1759, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 533, 67, 67, 67, 67, 67, 67, 67, 1770, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 1777, 97, 97, 97, 1793, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 998, 45, 45, 1001, 1002, 45, 45, 67, 67, 45, 1861, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1871, 67, 1873, 1874, 67, 0, 97, 45, 67, 0, 97, 45, 67, 16384, 97, 45, 67, 97, 0, 0, 0, 1473, 0, 1082, 0, 0, 0, 1475, 0, 1086, 0, 0, 0, 1477, 1876, 67, 97, 97, 97, 97, 97, 1883, 0, 1885, 97, 97, 97, 1889, 0, 0, 0, 286, 0, 0, 0, 286, 0, 2367488, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 126, 126, 126, 2053, 0, 2055, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 2039, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 226, 67, 67, 67, 67, 67, 67, 67, 67, 1246, 67, 67, 1249, 1250, 67, 67, 67, 132, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 141, 45, 45, 45, 1403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1186, 45, 45, 1189, 45, 45, 155, 45, 45, 45, 45, 45, 45, 45, 45, 45, 191, 45, 45, 45, 45, 700, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1753, 45, 45, 45, 67, 67, 45, 45, 67, 208, 67, 67, 67, 222, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1764, 67, 67, 67, 67, 67, 67, 67, 258, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 288, 97, 97, 97, 302, 97, 97, 97, 97, 97, 97, 97, 97, 97, 627, 97, 97, 97, 97, 97, 97, 338, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 370, 45, 45, 45, 45, 716, 45, 45, 45, 45, 45, 722, 45, 45, 45, 45, 45, 45, 1912, 67, 67, 67, 67, 67, 67, 67, 67, 67, 819, 67, 67, 25398, 542, 13112, 544, 45, 403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1409, 45, 67, 67, 67, 67, 489, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 771, 67, 67, 67, 67, 520, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 534, 67, 67, 67, 67, 67, 67, 1271, 67, 67, 67, 1274, 67, 67, 67, 1279, 67, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 553, 97, 97, 97, 97, 586, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1138, 97, 97, 97, 97, 617, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 631, 97, 97, 97, 0, 1834, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 353, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 668, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 724, 45, 45, 45, 45, 45, 682, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 949, 45, 45, 45, 67, 67, 747, 748, 67, 67, 67, 67, 755, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 1302, 0, 0, 0, 1308, 0, 67, 794, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1701, 67, 97, 97, 97, 845, 846, 97, 97, 97, 97, 853, 97, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 97, 892, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 610, 97, 97, 45, 992, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1239, 67, 67, 67, 1063, 67, 67, 67, 67, 67, 1068, 67, 67, 67, 67, 67, 67, 67, 0, 0, 1301, 0, 0, 0, 1307, 0, 0, 97, 1141, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1152, 97, 97, 0, 0, 97, 97, 2001, 0, 97, 2003, 97, 97, 97, 45, 45, 45, 1739, 45, 45, 45, 1742, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1157, 97, 97, 97, 97, 97, 1162, 97, 97, 97, 97, 97, 97, 1145, 97, 97, 97, 97, 97, 1151, 97, 97, 97, 1253, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 539, 45, 1423, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1431, 67, 67, 67, 67, 67, 67, 67, 1695, 67, 67, 67, 67, 67, 1700, 67, 1702, 67, 67, 1439, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 514, 67, 67, 97, 97, 1492, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 611, 97, 97, 1703, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 852, 97, 97, 97, 97, 97, 97, 45, 1949, 45, 1951, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1961, 67, 0, 97, 45, 67, 0, 97, 2060, 2061, 0, 2062, 45, 67, 97, 0, 0, 2036, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 223, 67, 67, 237, 67, 67, 67, 67, 67, 67, 67, 1272, 67, 67, 67, 67, 67, 67, 67, 67, 507, 67, 67, 67, 67, 67, 67, 67, 1963, 67, 67, 67, 97, 97, 97, 97, 0, 1972, 0, 97, 97, 97, 1975, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 931, 45, 45, 45, 45, 45, 407, 45, 45, 45, 45, 45, 45, 45, 45, 45, 417, 45, 45, 1989, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1996, 97, 18, 131427, 0, 0, 360, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 930, 45, 45, 45, 45, 45, 45, 444, 45, 45, 45, 45, 45, 45, 45, 67, 67, 97, 97, 1998, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1985, 45, 1986, 45, 45, 45, 156, 45, 45, 170, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 675, 45, 45, 45, 45, 679, 131427, 0, 358, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 381, 45, 45, 45, 45, 45, 45, 45, 45, 45, 400, 45, 45, 419, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 436, 67, 67, 67, 67, 67, 505, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 820, 67, 25398, 542, 13112, 544, 67, 67, 522, 67, 67, 67, 67, 67, 529, 67, 67, 67, 67, 67, 67, 67, 0, 1299, 0, 0, 0, 1305, 0, 0, 0, 97, 97, 619, 97, 97, 97, 97, 97, 626, 97, 97, 97, 97, 97, 97, 97, 1105, 97, 97, 97, 97, 1109, 97, 97, 97, 67, 67, 67, 67, 749, 67, 67, 67, 67, 67, 67, 67, 67, 67, 760, 67, 0, 97, 45, 67, 2058, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 2041, 67, 67, 67, 67, 67, 780, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 516, 67, 67, 97, 97, 97, 878, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1629, 97, 0, 45, 979, 45, 45, 45, 45, 984, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1198, 45, 45, 45, 45, 45, 45, 67, 1023, 67, 67, 67, 67, 1028, 67, 67, 67, 67, 67, 67, 67, 67, 67, 470, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1094, 0, 0, 0, 1092, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1486, 97, 1489, 97, 97, 97, 1117, 97, 97, 97, 97, 1122, 97, 97, 97, 97, 97, 97, 97, 1146, 97, 97, 97, 97, 97, 97, 97, 97, 881, 97, 97, 97, 886, 97, 97, 97, 1311, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1615, 97, 97, 97, 97, 97, 1619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1631, 97, 97, 1847, 97, 45, 45, 45, 45, 1852, 45, 45, 45, 45, 45, 45, 45, 1235, 45, 45, 45, 67, 67, 67, 67, 67, 1868, 67, 67, 67, 1872, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1882, 0, 0, 0, 97, 97, 97, 97, 0, 1891, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 1929, 0, 0, 97, 97, 97, 97, 97, 97, 45, 1900, 45, 1901, 45, 45, 45, 1905, 45, 67, 2054, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 2037, 2038, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1867, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1774, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 142, 45, 45, 45, 1412, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 432, 45, 45, 45, 45, 45, 157, 45, 45, 171, 45, 45, 45, 182, 45, 45, 45, 45, 200, 45, 45, 45, 1543, 45, 45, 45, 45, 45, 45, 45, 45, 1551, 45, 45, 45, 45, 1181, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1211, 45, 45, 45, 1214, 45, 45, 45, 67, 209, 67, 67, 67, 224, 67, 67, 238, 67, 67, 67, 249, 67, 0, 97, 2056, 2057, 0, 2059, 45, 67, 0, 97, 45, 67, 97, 0, 0, 1937, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1741, 45, 45, 45, 45, 45, 45, 67, 67, 67, 267, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 289, 97, 97, 97, 304, 97, 97, 318, 97, 97, 97, 329, 97, 97, 0, 0, 97, 1783, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 2026, 45, 45, 45, 45, 67, 2030, 67, 67, 67, 67, 67, 67, 1041, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1044, 67, 67, 67, 67, 67, 67, 97, 97, 347, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 666, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1420, 45, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 840, 67, 1007, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 759, 67, 67, 67, 67, 67, 67, 67, 1052, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1031, 67, 67, 67, 67, 67, 97, 97, 97, 1101, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 592, 97, 97, 97, 1190, 45, 45, 45, 45, 45, 1195, 45, 1197, 45, 45, 45, 45, 1201, 45, 45, 45, 45, 1952, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 250, 67, 67, 67, 1255, 67, 1257, 67, 67, 67, 67, 1261, 67, 67, 67, 67, 67, 67, 67, 67, 1685, 67, 67, 67, 67, 67, 67, 67, 0, 24851, 12565, 0, 0, 0, 0, 28809, 53532, 67, 67, 1267, 67, 67, 67, 67, 67, 67, 1273, 67, 67, 67, 67, 67, 67, 67, 67, 1696, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 1281, 67, 67, 67, 67, 1285, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1070, 67, 67, 67, 67, 67, 1335, 97, 1337, 97, 97, 97, 97, 1341, 97, 97, 97, 97, 97, 97, 97, 97, 882, 97, 97, 97, 97, 97, 97, 97, 1347, 97, 97, 97, 97, 97, 97, 1353, 97, 97, 97, 97, 97, 97, 1361, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 544, 0, 550, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 53530, 97, 97, 97, 1365, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 608, 97, 97, 97, 45, 45, 1424, 45, 1425, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1058, 67, 67, 67, 67, 45, 1555, 45, 45, 1557, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 707, 45, 45, 45, 45, 67, 67, 1570, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 773, 67, 67, 1595, 67, 67, 1597, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352, 2412544, 97, 97, 97, 1636, 97, 97, 97, 1639, 97, 97, 1641, 97, 97, 97, 97, 97, 97, 1173, 0, 921, 0, 0, 0, 0, 0, 0, 45, 67, 67, 67, 1693, 67, 67, 67, 67, 67, 67, 67, 1698, 67, 67, 67, 67, 67, 67, 67, 1773, 67, 97, 97, 97, 97, 97, 97, 97, 625, 97, 97, 97, 97, 97, 97, 97, 97, 850, 97, 97, 97, 97, 97, 97, 97, 97, 880, 97, 97, 97, 97, 97, 97, 97, 97, 1106, 97, 97, 97, 97, 97, 97, 97, 1860, 45, 45, 67, 67, 1865, 67, 67, 67, 67, 1870, 67, 67, 67, 67, 1875, 67, 67, 97, 97, 1880, 97, 97, 0, 0, 0, 97, 97, 1888, 97, 0, 0, 0, 1938, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1854, 45, 45, 45, 45, 45, 45, 45, 1909, 45, 45, 1911, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1248, 67, 67, 67, 67, 67, 67, 1922, 67, 67, 1924, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 1898, 45, 45, 45, 45, 45, 45, 1904, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 16384, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1724, 2008, 2009, 45, 45, 67, 67, 67, 2014, 2015, 67, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 2022, 0, 2023, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1869, 67, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 147, 151, 154, 45, 162, 45, 45, 176, 178, 181, 45, 45, 45, 192, 196, 45, 45, 45, 45, 2012, 67, 67, 67, 67, 67, 67, 2018, 97, 0, 0, 97, 1978, 97, 97, 97, 1982, 45, 45, 45, 45, 45, 45, 45, 45, 45, 972, 973, 45, 45, 45, 45, 45, 67, 259, 263, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 294, 298, 301, 97, 309, 97, 97, 323, 325, 328, 97, 97, 97, 97, 97, 560, 97, 97, 97, 569, 97, 97, 97, 97, 97, 97, 306, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1624, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 339, 343, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 67, 503, 67, 67, 67, 67, 67, 67, 67, 67, 67, 512, 67, 67, 519, 97, 97, 600, 97, 97, 97, 97, 97, 97, 97, 97, 97, 609, 97, 97, 616, 45, 649, 45, 45, 45, 45, 45, 654, 45, 45, 45, 45, 45, 45, 45, 45, 1393, 45, 45, 45, 45, 45, 45, 45, 45, 1209, 45, 45, 45, 45, 45, 45, 45, 67, 763, 67, 67, 67, 67, 67, 67, 67, 67, 770, 67, 67, 67, 774, 67, 0, 2045, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 994, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 213, 67, 219, 67, 67, 232, 67, 242, 67, 247, 67, 67, 67, 779, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1018, 67, 67, 67, 67, 811, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 834, 97, 97, 97, 97, 97, 839, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 645, 97, 97, 861, 97, 97, 97, 97, 97, 97, 97, 97, 868, 97, 97, 97, 872, 97, 97, 877, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 613, 97, 97, 97, 97, 97, 909, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 18, 18, 24, 24, 27, 27, 27, 1036, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1047, 67, 67, 67, 1050, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1033, 67, 67, 67, 97, 97, 1130, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 67, 67, 67, 1295, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 1317, 97, 97, 97, 97, 97, 97, 1375, 97, 97, 97, 0, 0, 0, 45, 1379, 45, 45, 45, 45, 45, 45, 422, 45, 45, 45, 429, 431, 45, 45, 45, 45, 0, 1090, 0, 0, 97, 1479, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1357, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1716, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1723, 0, 921, 29315, 0, 0, 0, 0, 45, 929, 45, 45, 45, 45, 45, 45, 45, 1392, 45, 45, 45, 45, 45, 45, 45, 45, 45, 960, 45, 45, 45, 45, 45, 45, 97, 97, 97, 1738, 45, 45, 45, 45, 45, 45, 45, 1743, 45, 45, 45, 45, 166, 45, 45, 45, 45, 184, 186, 45, 45, 197, 45, 45, 97, 1779, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 640, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1537, 45, 45, 45, 45, 45, 1803, 45, 45, 45, 45, 45, 1809, 45, 45, 45, 67, 67, 67, 1814, 67, 67, 67, 67, 67, 67, 1821, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 67, 67, 67, 1818, 67, 67, 67, 67, 67, 1824, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 1890, 0, 1829, 97, 97, 0, 0, 97, 97, 1836, 97, 97, 0, 0, 0, 97, 97, 97, 97, 1981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1987, 1845, 97, 97, 97, 45, 45, 45, 45, 45, 1853, 45, 45, 45, 1857, 45, 45, 45, 67, 1864, 67, 1866, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 1710, 1711, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1886, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1838, 0, 0, 0, 97, 1843, 97, 0, 1893, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1745, 45, 45, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 1931, 97, 97, 97, 97, 97, 588, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 629, 97, 97, 97, 97, 97, 67, 2044, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1660, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 453, 45, 455, 67, 67, 67, 67, 268, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 348, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 359, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 421, 45, 45, 45, 45, 45, 45, 45, 434, 45, 45, 695, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1667, 45, 0, 921, 29315, 0, 925, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1811, 45, 67, 67, 67, 67, 67, 67, 1037, 67, 1039, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1277, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1095, 0, 0, 0, 1096, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 869, 97, 97, 97, 97, 97, 97, 1131, 97, 1133, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1370, 97, 97, 97, 97, 97, 1312, 0, 0, 0, 0, 1096, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1327, 97, 97, 97, 97, 97, 1332, 97, 97, 97, 1830, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1896, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1548, 45, 45, 45, 45, 45, 45, 133, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 380, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 401, 45, 45, 158, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1200, 45, 45, 45, 45, 206, 67, 67, 67, 67, 67, 225, 67, 67, 67, 67, 67, 67, 67, 67, 754, 67, 67, 67, 67, 67, 67, 67, 57889, 0, 0, 54074, 54074, 550, 832, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1342, 97, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1083, 13112, 1087, 54074, 1091, 0, 0, 0, 0, 0, 0, 1316, 0, 831, 97, 97, 97, 97, 97, 97, 97, 1174, 921, 0, 1175, 0, 0, 0, 0, 45, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 148, 67, 67, 264, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 295, 97, 97, 97, 97, 313, 97, 97, 97, 97, 331, 333, 97, 18, 131427, 356, 638, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 45, 45, 1530, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 988, 45, 45, 45, 97, 344, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 402, 404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1756, 67, 438, 45, 45, 45, 45, 45, 45, 45, 45, 449, 450, 45, 45, 45, 67, 67, 214, 218, 221, 67, 229, 67, 67, 243, 245, 248, 67, 67, 67, 67, 67, 488, 490, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1071, 67, 1073, 67, 67, 67, 67, 67, 524, 67, 67, 67, 67, 67, 67, 67, 67, 535, 536, 67, 67, 67, 67, 67, 67, 1683, 1684, 67, 67, 67, 67, 1688, 1689, 67, 67, 67, 67, 67, 67, 1586, 67, 67, 67, 67, 67, 67, 67, 67, 67, 469, 67, 67, 67, 67, 67, 67, 97, 97, 97, 585, 587, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1163, 97, 97, 97, 97, 97, 97, 97, 621, 97, 97, 97, 97, 97, 97, 97, 97, 632, 633, 97, 97, 0, 0, 1782, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 712, 45, 45, 45, 717, 45, 45, 45, 45, 45, 45, 45, 45, 725, 45, 45, 45, 163, 167, 173, 177, 45, 45, 45, 45, 45, 193, 45, 45, 45, 45, 982, 45, 45, 45, 45, 45, 45, 987, 45, 45, 45, 45, 45, 1558, 45, 1560, 45, 45, 45, 45, 45, 45, 45, 45, 704, 705, 45, 45, 45, 45, 45, 45, 45, 45, 731, 45, 45, 45, 67, 67, 67, 67, 67, 739, 67, 67, 67, 67, 67, 67, 273, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 67, 67, 67, 764, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1290, 67, 67, 67, 67, 67, 67, 812, 67, 67, 67, 67, 818, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 837, 97, 97, 97, 97, 97, 602, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1137, 97, 97, 97, 97, 97, 97, 97, 97, 97, 862, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1627, 97, 97, 97, 0, 97, 97, 97, 97, 910, 97, 97, 97, 97, 916, 97, 97, 97, 0, 0, 0, 97, 97, 1940, 97, 97, 1942, 45, 45, 45, 45, 45, 45, 385, 45, 45, 45, 45, 395, 45, 45, 45, 45, 966, 45, 969, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 975, 45, 45, 45, 406, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 974, 45, 45, 45, 67, 67, 67, 67, 1010, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1262, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1040, 67, 1042, 67, 1045, 67, 67, 67, 67, 67, 67, 67, 97, 1706, 97, 97, 97, 1709, 97, 97, 97, 67, 67, 67, 67, 1051, 67, 67, 67, 67, 67, 1057, 67, 67, 67, 67, 67, 67, 67, 1443, 67, 67, 1446, 67, 67, 67, 67, 67, 67, 67, 1297, 0, 0, 0, 1303, 0, 0, 0, 1309, 67, 67, 67, 67, 1079, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 1098, 97, 97, 97, 97, 97, 1104, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1356, 97, 97, 97, 97, 97, 97, 1128, 97, 97, 97, 97, 97, 97, 1134, 97, 1136, 97, 1139, 97, 97, 97, 97, 97, 97, 1622, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0, 1176, 0, 646, 45, 67, 67, 67, 1268, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1469, 67, 67, 67, 97, 1348, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1127, 97, 67, 1569, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1448, 1449, 67, 1816, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1825, 67, 67, 1827, 97, 97, 0, 1781, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 1831, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1980, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1395, 45, 45, 45, 45, 45, 97, 1846, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1212, 45, 45, 45, 45, 45, 45, 2010, 45, 67, 67, 67, 67, 67, 2016, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 2007, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 143, 45, 45, 45, 1671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1813, 67, 67, 1815, 45, 45, 67, 210, 67, 67, 67, 67, 67, 67, 239, 67, 67, 67, 67, 67, 67, 67, 1454, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1445, 67, 67, 67, 67, 67, 67, 97, 97, 290, 97, 97, 97, 97, 97, 97, 319, 97, 97, 97, 97, 97, 97, 303, 97, 97, 317, 97, 97, 97, 97, 97, 97, 305, 97, 97, 97, 97, 97, 97, 97, 97, 97, 899, 97, 97, 97, 97, 97, 97, 375, 45, 45, 45, 379, 45, 45, 390, 45, 45, 394, 45, 45, 45, 45, 45, 443, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 461, 67, 67, 67, 465, 67, 67, 476, 67, 67, 480, 67, 67, 67, 67, 67, 67, 1694, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1288, 67, 67, 67, 67, 67, 67, 500, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1075, 97, 97, 97, 558, 97, 97, 97, 562, 97, 97, 573, 97, 97, 577, 97, 97, 97, 97, 97, 895, 97, 97, 97, 97, 97, 97, 903, 97, 97, 97, 0, 97, 97, 1638, 97, 97, 97, 97, 97, 97, 97, 97, 1646, 597, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1334, 45, 681, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1396, 45, 45, 1399, 45, 45, 730, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1434, 67, 67, 67, 67, 67, 67, 750, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1456, 67, 67, 67, 67, 67, 45, 45, 993, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1238, 67, 67, 1006, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1280, 1048, 1049, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1059, 67, 67, 67, 67, 67, 67, 1286, 67, 67, 67, 67, 67, 67, 67, 1291, 67, 97, 97, 1100, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 920, 97, 97, 1142, 1143, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1153, 97, 97, 97, 97, 97, 1158, 97, 97, 97, 1161, 97, 97, 97, 97, 1166, 97, 97, 97, 97, 97, 1325, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1328, 97, 97, 97, 97, 97, 97, 97, 45, 1218, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1678, 45, 45, 45, 67, 67, 67, 67, 67, 1269, 67, 67, 67, 67, 67, 67, 67, 67, 1278, 67, 67, 67, 67, 67, 67, 1761, 67, 67, 67, 67, 67, 67, 67, 67, 67, 530, 67, 67, 67, 67, 67, 67, 97, 97, 1349, 97, 97, 97, 97, 97, 97, 97, 97, 1358, 97, 97, 97, 97, 97, 97, 1623, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 926, 0, 0, 0, 45, 45, 1411, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1754, 45, 45, 67, 67, 1301, 0, 1307, 0, 1313, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 21054, 97, 97, 97, 97, 67, 1757, 67, 67, 67, 1760, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1467, 67, 67, 67, 67, 67, 1778, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 97, 97, 1352, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1511, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 1820, 67, 1822, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1933, 97, 1892, 97, 97, 97, 97, 97, 97, 1899, 45, 45, 45, 45, 45, 45, 45, 45, 1664, 45, 45, 45, 45, 45, 45, 45, 45, 1546, 45, 45, 45, 45, 45, 45, 45, 45, 1208, 45, 45, 45, 45, 45, 45, 45, 45, 1224, 45, 45, 45, 45, 45, 45, 45, 45, 673, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1925, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 623, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 307, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1796, 97, 45, 45, 45, 45, 45, 45, 45, 970, 45, 45, 45, 45, 45, 45, 45, 45, 1417, 45, 45, 45, 45, 45, 45, 45, 67, 1964, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1721, 97, 97, 0, 0, 1997, 97, 0, 0, 2000, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 733, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 803, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 144, 45, 45, 45, 1805, 45, 1807, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 231, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 45, 45, 67, 211, 67, 67, 67, 67, 230, 234, 240, 244, 67, 67, 67, 67, 67, 67, 464, 67, 67, 67, 67, 67, 67, 479, 67, 67, 67, 260, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 291, 97, 97, 97, 97, 310, 314, 320, 324, 97, 97, 97, 97, 97, 97, 1367, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1355, 97, 97, 97, 97, 97, 97, 1362, 340, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 360, 0, 362, 0, 365, 28809, 367, 139, 369, 45, 45, 45, 374, 67, 67, 460, 67, 67, 67, 67, 466, 67, 67, 67, 67, 67, 67, 67, 67, 801, 67, 67, 67, 67, 67, 67, 67, 67, 67, 487, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 498, 67, 67, 67, 67, 67, 67, 1772, 67, 67, 97, 97, 97, 97, 97, 97, 97, 0, 921, 922, 1175, 0, 0, 0, 0, 45, 67, 502, 67, 67, 67, 67, 67, 67, 67, 508, 67, 67, 67, 515, 517, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1932, 97, 97, 0, 1999, 97, 97, 97, 0, 97, 97, 2004, 2005, 97, 45, 45, 45, 45, 1193, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 676, 45, 45, 45, 45, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 552, 97, 97, 97, 97, 97, 1377, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 655, 45, 45, 45, 45, 45, 45, 45, 97, 97, 557, 97, 97, 97, 97, 563, 97, 97, 97, 97, 97, 97, 97, 97, 1135, 97, 97, 97, 97, 97, 97, 97, 97, 97, 584, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 595, 97, 97, 97, 97, 97, 911, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 1319, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1733, 97, 97, 97, 97, 97, 97, 1340, 97, 97, 97, 1343, 97, 97, 1345, 97, 1346, 97, 599, 97, 97, 97, 97, 97, 97, 97, 605, 97, 97, 97, 612, 614, 97, 97, 97, 97, 97, 1794, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 1207, 45, 45, 45, 45, 45, 45, 1213, 45, 45, 745, 67, 67, 67, 67, 751, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1577, 67, 67, 67, 67, 67, 762, 67, 67, 67, 67, 766, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1765, 67, 67, 67, 67, 67, 777, 67, 67, 781, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1592, 1593, 67, 67, 97, 843, 97, 97, 97, 97, 849, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1510, 97, 97, 97, 97, 97, 97, 97, 860, 97, 97, 97, 97, 864, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1797, 45, 45, 45, 45, 1801, 45, 97, 875, 97, 97, 879, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1522, 97, 97, 97, 97, 97, 991, 45, 45, 45, 45, 996, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 215, 67, 67, 67, 67, 233, 67, 67, 67, 67, 251, 253, 1022, 67, 67, 67, 1026, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1035, 67, 67, 1038, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1458, 67, 67, 67, 67, 67, 1064, 67, 67, 67, 1067, 67, 67, 67, 67, 1072, 67, 67, 67, 67, 67, 67, 1296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 1096, 0, 921, 29315, 0, 0, 0, 0, 928, 45, 45, 45, 45, 45, 934, 45, 45, 45, 164, 45, 45, 45, 45, 45, 45, 45, 45, 45, 198, 45, 45, 45, 378, 45, 45, 45, 45, 45, 45, 393, 45, 45, 45, 398, 45, 97, 97, 1116, 97, 97, 97, 1120, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1147, 1148, 97, 97, 97, 97, 97, 97, 97, 1129, 97, 97, 1132, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1626, 97, 97, 97, 97, 0, 45, 1178, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1185, 45, 45, 45, 45, 441, 45, 45, 45, 45, 45, 45, 451, 45, 45, 67, 67, 67, 67, 67, 227, 67, 67, 67, 67, 67, 67, 67, 67, 1260, 67, 67, 67, 1263, 67, 67, 1265, 1203, 45, 45, 1205, 45, 1206, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1216, 67, 1266, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1276, 67, 67, 67, 67, 67, 67, 492, 67, 67, 67, 67, 67, 67, 67, 67, 67, 471, 67, 67, 67, 67, 481, 67, 45, 1386, 45, 1389, 45, 45, 45, 45, 1394, 45, 45, 45, 1397, 45, 45, 45, 45, 995, 45, 997, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1915, 67, 67, 67, 67, 67, 1422, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1433, 67, 1436, 67, 67, 67, 67, 1441, 67, 67, 67, 1444, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 97, 97, 97, 97, 1494, 97, 97, 97, 1497, 97, 97, 97, 97, 97, 97, 97, 1368, 97, 97, 97, 97, 97, 97, 97, 97, 851, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1571, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1583, 67, 67, 67, 67, 67, 67, 67, 67, 1591, 67, 67, 67, 67, 67, 67, 752, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1056, 67, 67, 67, 67, 67, 67, 97, 1634, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1125, 97, 97, 97, 1647, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1183, 45, 45, 45, 45, 45, 45, 45, 45, 45, 409, 45, 45, 45, 45, 45, 45, 1658, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1668, 1712, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 1835, 97, 97, 97, 97, 0, 0, 0, 97, 97, 1844, 97, 97, 1726, 0, 97, 97, 97, 97, 97, 1732, 97, 1734, 97, 97, 97, 97, 97, 300, 97, 308, 97, 97, 97, 97, 97, 97, 97, 97, 866, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1758, 67, 67, 67, 1762, 67, 67, 67, 67, 67, 67, 67, 67, 1043, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1771, 67, 67, 67, 97, 97, 97, 97, 97, 1776, 97, 97, 97, 97, 297, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1108, 97, 97, 97, 97, 67, 67, 67, 1966, 97, 97, 97, 1970, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 1720, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1837, 97, 0, 1840, 1841, 97, 97, 97, 1988, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1994, 1995, 67, 97, 97, 97, 97, 97, 1103, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 917, 97, 97, 0, 0, 0, 67, 67, 265, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 345, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 361, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 411, 45, 45, 414, 45, 45, 45, 45, 377, 45, 45, 45, 386, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1223, 45, 45, 45, 45, 45, 45, 45, 45, 45, 426, 45, 45, 433, 45, 45, 45, 67, 67, 67, 67, 67, 463, 67, 67, 67, 472, 67, 67, 67, 67, 67, 67, 67, 527, 67, 67, 67, 67, 67, 67, 537, 67, 540, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 97, 97, 97, 1119, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1509, 97, 97, 97, 97, 97, 97, 97, 97, 564, 97, 97, 97, 97, 97, 97, 97, 637, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 927, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1234, 45, 45, 45, 45, 67, 67, 67, 67, 1240, 45, 697, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 708, 45, 45, 45, 45, 1221, 45, 45, 45, 45, 1225, 45, 45, 45, 45, 45, 45, 384, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1210, 45, 45, 45, 45, 45, 45, 67, 67, 795, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1470, 67, 67, 67, 67, 67, 67, 67, 815, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 97, 893, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1164, 97, 97, 97, 67, 67, 67, 1025, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1687, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 1097, 1241, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1450, 45, 45, 1388, 45, 1390, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1236, 67, 67, 67, 67, 67, 1437, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 1490, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1503, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 1930, 0, 97, 97, 97, 97, 97, 847, 97, 97, 97, 97, 97, 97, 97, 97, 97, 858, 67, 67, 1965, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 1719, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 1382, 45, 1383, 45, 45, 45, 159, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1563, 45, 45, 45, 45, 45, 67, 261, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 341, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 1099, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1333, 97, 1230, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1992, 67, 1993, 67, 67, 67, 97, 97, 45, 45, 160, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1665, 45, 45, 45, 45, 45, 131427, 357, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 684, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 412, 45, 45, 45, 416, 45, 45, 45, 440, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1990, 67, 1991, 67, 67, 67, 67, 67, 67, 67, 97, 97, 1707, 97, 97, 97, 97, 97, 97, 501, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1691, 67, 67, 67, 67, 67, 526, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1030, 67, 1032, 67, 67, 67, 67, 598, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1632, 0, 921, 29315, 923, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 425, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 1093, 0, 0, 0, 0, 0, 97, 1609, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1369, 97, 97, 97, 1372, 97, 97, 67, 67, 266, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 346, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 665, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1677, 45, 45, 45, 45, 67, 45, 45, 954, 45, 956, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1545, 45, 45, 45, 45, 45, 45, 45, 45, 45, 448, 45, 45, 45, 45, 67, 456, 67, 67, 67, 67, 67, 1270, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1069, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1350, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1524, 97, 97, 97, 97, 97, 97, 97, 1376, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 1559, 1561, 45, 45, 45, 1564, 45, 1566, 1567, 45, 67, 67, 67, 67, 67, 1573, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1247, 67, 67, 67, 67, 67, 1252, 97, 1725, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1628, 97, 1630, 0, 0, 94242, 0, 0, 0, 2211840, 0, 1118208, 0, 0, 0, 0, 2158592, 2158731, 2158592, 2158592, 2158592, 3117056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3018752, 2158592, 3043328, 2158592, 2158592, 2158592, 2158592, 3080192, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158878, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2605056, 2158592, 2158592, 2207744, 0, 542, 0, 544, 0, 0, 2166784, 0, 0, 0, 550, 0, 0, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2867200, 2158592, 2904064, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0, 0, 2211840, 0, 0, 1130496, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 139, 0, 0, 0, 139, 0, 2367488, 2207744, 0, 0, 0, 0, 176128, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 1508, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 67, 24850, 24850, 12564, 12564, 0, 0, 0, 0, 0, 53531, 53531, 0, 286, 97, 97, 97, 97, 97, 1144, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1149, 97, 97, 97, 97, 1154, 57889, 0, 0, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 561, 97, 97, 97, 97, 97, 97, 576, 97, 97, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 0, 0, 139264, 0, 921, 29315, 0, 0, 926, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 719, 720, 45, 45, 45, 45, 45, 45, 45, 45, 685, 45, 45, 45, 45, 45, 45, 45, 45, 45, 942, 45, 45, 946, 45, 45, 45, 950, 45, 45, 0, 2146304, 2146304, 0, 0, 0, 0, 2224128, 2224128, 2224128, 2232320, 2232320, 2232320, 2232320, 0, 0, 1301, 0, 0, 0, 0, 0, 1307, 0, 0, 0, 0, 0, 1313, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1318, 97, 97, 97, 97, 97, 97, 1795, 97, 97, 45, 45, 45, 45, 45, 45, 45, 446, 45, 45, 45, 45, 45, 45, 67, 67, 2158592, 2146304, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 924, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1000, 45, 45, 45, 45, 67, 67
+];
+
+XQueryTokenizer.EXPECTED =
+[ 290, 300, 304, 353, 296, 309, 305, 319, 315, 324, 328, 352, 354, 334, 338, 330, 320, 345, 349, 293, 358, 362, 341, 366, 312, 370, 374, 378, 382, 386, 390, 394, 398, 737, 402, 634, 439, 604, 634, 634, 634, 634, 408, 634, 634, 634, 404, 634, 634, 634, 457, 634, 634, 963, 634, 634, 413, 634, 634, 634, 634, 634, 634, 634, 663, 418, 422, 903, 902, 426, 431, 548, 634, 437, 521, 919, 443, 615, 409, 449, 455, 624, 731, 751, 634, 461, 465, 672, 470, 469, 474, 481, 485, 477, 489, 493, 629, 542, 497, 505, 603, 602, 991, 648, 510, 804, 634, 515, 958, 526, 525, 530, 768, 634, 546, 552, 711, 710, 593, 558, 562, 618, 566, 570, 574, 578, 582, 586, 590, 608, 612, 660, 822, 821, 634, 622, 596, 444, 628, 533, 724, 633, 640, 653, 647, 652, 536, 1008, 451, 450, 445, 657, 670, 676, 685, 689, 693, 697, 701, 704, 707, 715, 719, 798, 815, 634, 723, 762, 996, 634, 728, 969, 730, 735, 908, 634, 741, 679, 889, 511, 747, 634, 750, 755, 499, 666, 499, 501, 759, 772, 776, 780, 634, 787, 784, 797, 802, 809, 808, 427, 814, 1006, 517, 634, 519, 853, 634, 813, 850, 793, 634, 819, 826, 833, 832, 837, 843, 847, 857, 861, 863, 867, 871, 875, 879, 883, 643, 887, 539, 980, 979, 634, 893, 944, 634, 900, 896, 634, 907, 933, 506, 912, 917, 828, 433, 636, 635, 554, 961, 923, 930, 927, 937, 941, 634, 634, 634, 974, 948, 952, 985, 913, 968, 967, 743, 634, 973, 839, 634, 978, 599, 634, 984, 989, 765, 444, 995, 1000, 634, 1003, 790, 955, 1012, 681, 634, 634, 634, 634, 634, 414, 1016, 1020, 1024, 1085, 1027, 1090, 1090, 1046, 1080, 1137, 1108, 1215, 1049, 1032, 1039, 1085, 1085, 1085, 1085, 1058, 1062, 1068, 1085, 1086, 1090, 1090, 1091, 1072, 1064, 1107, 1090, 1090, 1090, 1118, 1123, 1138, 1078, 1074, 1084, 1085, 1085, 1085, 1087, 1090, 1062, 1052, 1060, 1114, 1062, 1104, 1085, 1085, 1090, 1090, 1028, 1122, 1063, 1128, 1139, 1127, 1158, 1085, 1085, 1151, 1090, 1090, 1090, 1095, 1090, 1132, 1073, 1136, 1143, 1061, 1150, 1085, 1155, 1098, 1101, 1146, 1162, 1169, 1101, 1185, 1151, 1090, 1110, 1173, 1054, 1087, 1109, 1177, 1165, 1089, 1204, 1184, 1107, 1189, 1193, 1088, 1197, 1180, 1201, 1208, 1042, 1212, 1219, 1223, 1227, 1231, 1235, 1245, 1777, 1527, 1686, 1686, 1238, 1686, 1254, 1686, 1686, 1686, 1294, 1669, 1686, 1686, 1686, 1322, 1625, 1534, 1268, 1624, 1275, 1281, 1443, 1292, 1300, 1686, 1686, 1686, 1350, 1826, 1306, 1686, 1686, 1240, 2032, 1317, 1321, 1686, 1686, 1253, 1686, 1326, 1686, 1686, 1686, 1418, 1709, 1446, 1686, 1686, 1686, 1492, 1686, 1295, 1447, 1686, 1686, 1258, 1686, 1736, 1686, 1686, 1520, 1355, 1686, 1288, 1348, 1361, 1686, 1359, 1686, 1364, 1498, 1368, 1302, 1362, 1381, 1389, 1395, 1486, 1686, 1371, 1377, 1370, 1686, 1375, 1382, 1384, 1402, 1408, 1385, 1383, 1619, 1413, 1423, 1428, 1433, 1686, 1686, 1270, 1686, 1338, 1686, 1440, 1686, 1686, 1686, 1499, 1465, 1686, 1686, 1686, 1639, 1473, 1884, 1686, 1686, 1293, 1864, 1686, 1686, 1296, 1321, 1483, 1686, 1686, 1686, 1646, 1686, 1748, 1496, 1686, 1418, 1675, 1686, 1418, 1702, 1686, 1418, 1981, 1686, 1429, 1409, 1427, 1504, 1692, 1686, 1686, 1313, 1448, 1651, 1508, 1686, 1686, 1340, 1686, 1903, 1686, 1686, 1435, 1513, 1686, 1283, 1287, 1519, 1686, 1524, 1363, 1568, 1938, 1539, 1566, 1579, 1479, 1533, 1538, 1553, 1544, 1552, 1557, 1563, 1574, 1557, 1583, 1589, 1590, 1759, 1594, 1603, 1607, 1611, 1686, 1436, 1514, 1686, 1434, 1656, 1686, 1434, 1680, 1686, 1453, 1686, 1686, 1686, 1559, 1617, 1686, 1770, 1418, 1623, 1769, 1629, 1686, 1515, 1335, 1686, 1285, 1686, 1671, 1921, 1650, 1686, 1686, 1344, 1308, 1666, 1686, 1686, 1686, 1659, 1685, 1686, 1686, 1686, 1686, 1241, 1686, 1686, 1844, 1691, 1686, 1630, 1977, 1970, 1362, 1686, 1686, 1686, 1693, 1698, 1686, 1686, 1686, 1697, 1686, 1764, 1715, 1686, 1634, 1638, 1686, 1599, 1585, 1686, 1271, 1686, 1269, 1686, 1721, 1686, 1686, 1354, 1686, 1801, 1686, 1799, 1686, 1640, 1686, 1686, 1461, 1686, 1686, 1732, 1686, 1944, 1686, 1740, 1686, 1746, 1415, 1396, 1686, 1598, 1547, 1417, 1597, 1416, 1577, 1546, 1397, 1577, 1547, 1548, 1570, 1398, 1753, 1686, 1652, 1509, 1686, 1686, 1686, 1757, 1686, 1419, 1686, 1763, 1418, 1768, 1781, 1686, 1686, 1686, 1705, 1686, 2048, 1792, 1686, 1686, 1686, 1735, 1686, 1797, 1686, 1686, 1404, 1686, 1639, 1815, 1686, 1686, 1418, 2017, 1820, 1686, 1686, 1803, 1686, 1686, 1686, 1736, 1489, 1686, 1686, 1825, 1338, 1260, 1263, 1686, 1686, 1785, 1686, 1686, 1728, 1686, 1686, 1749, 1497, 1830, 1830, 1262, 1248, 1261, 1329, 1260, 1264, 1329, 1248, 1249, 1259, 1540, 1849, 1842, 1686, 1686, 1835, 1686, 1686, 1816, 1686, 1686, 1831, 1882, 1848, 1686, 1686, 1686, 1774, 2071, 1854, 1686, 1686, 1469, 1884, 1686, 1821, 1859, 1686, 1686, 1350, 1883, 1686, 1686, 1686, 1781, 1391, 1875, 1686, 1686, 1613, 1644, 1686, 1686, 1889, 1686, 1686, 1662, 1884, 1686, 1885, 1890, 1686, 1686, 1686, 1894, 1686, 1686, 1678, 1686, 1907, 1686, 1686, 1529, 1914, 1686, 1838, 1686, 1686, 1881, 1686, 1686, 1872, 1876, 1836, 1919, 1686, 1837, 1692, 1910, 1686, 1925, 1928, 1742, 1686, 1811, 1811, 1930, 1810, 1929, 1935, 1928, 1900, 1942, 1867, 1868, 1931, 1035, 1788, 1948, 1952, 1956, 1960, 1964, 1686, 1976, 1686, 1686, 1686, 2065, 1686, 1992, 2037, 1686, 1686, 1998, 2009, 1972, 2002, 1686, 1686, 1686, 2077, 1300, 2023, 1686, 1686, 1686, 1807, 2031, 1686, 1686, 1686, 1860, 1500, 2032, 1686, 1686, 1686, 2083, 1686, 2036, 1686, 1277, 1276, 2042, 1877, 1686, 1686, 2041, 1686, 1686, 2027, 2037, 2012, 1686, 2012, 1855, 1850, 1686, 2046, 1686, 1686, 2054, 1996, 1686, 1897, 1309, 2059, 2052, 1686, 2058, 1686, 1686, 2081, 1686, 1717, 1477, 1686, 1331, 1686, 1686, 1687, 1686, 1860, 1681, 1686, 1686, 1686, 1966, 1724, 1686, 1686, 1686, 1984, 2015, 1686, 1686, 1686, 1988, 1686, 2063, 1686, 1686, 1686, 2005, 1686, 1727, 1686, 1686, 1711, 1457, 2069, 1686, 1686, 1686, 2019, 2075, 1686, 1686, 1915, 1686, 1686, 1793, 1874, 1686, 1686, 1491, 1362, 1449, 1686, 1686, 1460, 2098, 2087, 2091, 2095, 2184, 2102, 2113, 2780, 2117, 2134, 2142, 2281, 2146, 2146, 2146, 2304, 2296, 2181, 2639, 2591, 2872, 2592, 2873, 2313, 2195, 2200, 2281, 2146, 2273, 2226, 2204, 2152, 2219, 2276, 2167, 2177, 2276, 2235, 2276, 2276, 2230, 2281, 2276, 2296, 2276, 2293, 2276, 2276, 2276, 2276, 2234, 2276, 2311, 2314, 2210, 2199, 2217, 2222, 2276, 2276, 2276, 2240, 2276, 2294, 2276, 2276, 2173, 2276, 2198, 2281, 2281, 2281, 2281, 2282, 2146, 2146, 2146, 2146, 2205, 2146, 2204, 2248, 2276, 2235, 2276, 2297, 2276, 2276, 2276, 2277, 2256, 2281, 2283, 2146, 2146, 2146, 2275, 2276, 2295, 2276, 2276, 2293, 2146, 2304, 2264, 2269, 2221, 2276, 2276, 2276, 2293, 2295, 2276, 2276, 2276, 2295, 2263, 2205, 2268, 2220, 2172, 2276, 2276, 2276, 2296, 2276, 2276, 2296, 2294, 2276, 2276, 2278, 2281, 2281, 2280, 2281, 2281, 2281, 2283, 2206, 2223, 2276, 2276, 2279, 2281, 2281, 2146, 2273, 2276, 2276, 2281, 2281, 2281, 2276, 2292, 2276, 2298, 2225, 2276, 2298, 2169, 2224, 2292, 2298, 2171, 2229, 2281, 2281, 2171, 2236, 2281, 2281, 2281, 2146, 2275, 2225, 2292, 2299, 2276, 2229, 2281, 2146, 2276, 2290, 2297, 2283, 2146, 2146, 2274, 2224, 2227, 2298, 2225, 2297, 2276, 2230, 2170, 2230, 2282, 2146, 2147, 2151, 2156, 2288, 2276, 2230, 2303, 2308, 2236, 2284, 2228, 2318, 2318, 2318, 2326, 2335, 2339, 2343, 2349, 2416, 2693, 2357, 2592, 2109, 2592, 2592, 2162, 2943, 2823, 2646, 2592, 2361, 2592, 2122, 2592, 2592, 2122, 2470, 2592, 2592, 2592, 2109, 2107, 2592, 2592, 2592, 2123, 2592, 2592, 2592, 2125, 2592, 2413, 2592, 2592, 2592, 2127, 2592, 2592, 2414, 2592, 2592, 2592, 2130, 2952, 2592, 2594, 2592, 2592, 2212, 2609, 2252, 2592, 2592, 2592, 2446, 2434, 2592, 2592, 2592, 2212, 2446, 2450, 2456, 2431, 2435, 2592, 2592, 2243, 2478, 2448, 2439, 2946, 2592, 2592, 2592, 2368, 2809, 2813, 2450, 2441, 2212, 2812, 2449, 2440, 2947, 2592, 2592, 2592, 2345, 2451, 2457, 2948, 2592, 2124, 2592, 2592, 2650, 2823, 2449, 2455, 2946, 2592, 2128, 2592, 2592, 2649, 2952, 2592, 2810, 2448, 2461, 2991, 2467, 2592, 2592, 2329, 2817, 2474, 2990, 2466, 2592, 2592, 2373, 2447, 2992, 2469, 2592, 2592, 2592, 2373, 2447, 2477, 2468, 2592, 2592, 2353, 2469, 2592, 2495, 2592, 2592, 2415, 2483, 2592, 2415, 2496, 2592, 2592, 2352, 2592, 2592, 2352, 2352, 2469, 2592, 2592, 2363, 2331, 2494, 2592, 2592, 2592, 2375, 2592, 2375, 2415, 2504, 2592, 2592, 2367, 2372, 2503, 2592, 2592, 2592, 2389, 2418, 2415, 2592, 2592, 2373, 2592, 2592, 2592, 2593, 2732, 2417, 2415, 2592, 2417, 2520, 2592, 2592, 2592, 2390, 2521, 2521, 2592, 2592, 2592, 2401, 2599, 2585, 2526, 2531, 2120, 2592, 2212, 2426, 2450, 2463, 2948, 2592, 2592, 2592, 2213, 2389, 2527, 2532, 2121, 2542, 2551, 2105, 2592, 2213, 2592, 2592, 2592, 2558, 2538, 2544, 2553, 2557, 2537, 2543, 2552, 2421, 2572, 2576, 2546, 2543, 2547, 2592, 2592, 2373, 2615, 2575, 2545, 2105, 2592, 2244, 2479, 2592, 2129, 2592, 2592, 2628, 2690, 2469, 2562, 2566, 2592, 2592, 2592, 2415, 2928, 2934, 2401, 2570, 2574, 2564, 2572, 2585, 2590, 2592, 2592, 2585, 2965, 2592, 2592, 2592, 2445, 2251, 2592, 2592, 2592, 2474, 2592, 2609, 2892, 2592, 2362, 2592, 2592, 2138, 2851, 2159, 2592, 2592, 2592, 2509, 2888, 2892, 2592, 2592, 2592, 2490, 2418, 2891, 2592, 2592, 2376, 2592, 2592, 2374, 2592, 2889, 2388, 2592, 2373, 2373, 2890, 2592, 2592, 2387, 2592, 2887, 2505, 2892, 2592, 2373, 2610, 2388, 2592, 2592, 2376, 2373, 2592, 2887, 2891, 2592, 2374, 2592, 2592, 2608, 2159, 2614, 2620, 2592, 2592, 2394, 2594, 2887, 2399, 2592, 2887, 2397, 2508, 2374, 2507, 2592, 2375, 2592, 2592, 2592, 2595, 2508, 2506, 2592, 2506, 2505, 2505, 2592, 2507, 2637, 2505, 2592, 2592, 2401, 2661, 2592, 2643, 2592, 2592, 2417, 2592, 2655, 2592, 2592, 2592, 2510, 2414, 2656, 2592, 2592, 2592, 2516, 2592, 2593, 2660, 2665, 2880, 2592, 2592, 2592, 2522, 2767, 2666, 2881, 2592, 2592, 2420, 2571, 2696, 2592, 2592, 2592, 2580, 2572, 2686, 2632, 2698, 2592, 2383, 2514, 2592, 2163, 2932, 2465, 2685, 2631, 2697, 2592, 2388, 2592, 2592, 2212, 2604, 2671, 2632, 2678, 2592, 2401, 2405, 2409, 2592, 2592, 2592, 2679, 2592, 2592, 2592, 2592, 2108, 2677, 2591, 2592, 2592, 2592, 2419, 2592, 2683, 2187, 2191, 2469, 2671, 2189, 2467, 2592, 2401, 2629, 2633, 2702, 2468, 2592, 2592, 2421, 2536, 2703, 2469, 2592, 2592, 2422, 2573, 2593, 2672, 2467, 2592, 2402, 2406, 2592, 2402, 2979, 2592, 2592, 2626, 2673, 2467, 2592, 2446, 2259, 2947, 2592, 2377, 2709, 2592, 2592, 2522, 2862, 2713, 2468, 2592, 2592, 2581, 2572, 2562, 2374, 2374, 2592, 2376, 2721, 2724, 2592, 2592, 2624, 2373, 2731, 2592, 2592, 2592, 2626, 2732, 2592, 2592, 2592, 2755, 2656, 2726, 2736, 2741, 2592, 2486, 2593, 2381, 2592, 2727, 2737, 2742, 2715, 2747, 2753, 2592, 2498, 2469, 2873, 2743, 2592, 2592, 2592, 2791, 2759, 2763, 2592, 2592, 2627, 2704, 2592, 2592, 2522, 2789, 2593, 2761, 2753, 2592, 2498, 2863, 2592, 2592, 2767, 2592, 2592, 2592, 2792, 2789, 2592, 2592, 2592, 2803, 2126, 2592, 2592, 2592, 2811, 2122, 2592, 2592, 2592, 2834, 2777, 2592, 2592, 2592, 2848, 2936, 2591, 2489, 2797, 2592, 2592, 2670, 2631, 2490, 2798, 2592, 2592, 2592, 2963, 2807, 2592, 2592, 2592, 2965, 2838, 2592, 2592, 2592, 2975, 2330, 2818, 2829, 2592, 2498, 2939, 2592, 2498, 2592, 2791, 2331, 2819, 2830, 2592, 2592, 2592, 2982, 2834, 2817, 2828, 2106, 2592, 2592, 2592, 2405, 2405, 2817, 2828, 2592, 2592, 2415, 2849, 2842, 2592, 2522, 2773, 2592, 2522, 2868, 2592, 2580, 2600, 2586, 2137, 2850, 2843, 2592, 2592, 2855, 2937, 2844, 2592, 2592, 2592, 2987, 2936, 2591, 2592, 2592, 2684, 2630, 2592, 2856, 2938, 2592, 2592, 2860, 2939, 2592, 2592, 2872, 2592, 2861, 2591, 2592, 2592, 2887, 2616, 2592, 2867, 2592, 2592, 2708, 2592, 2498, 2469, 2498, 2497, 2785, 2773, 2499, 2783, 2770, 2877, 2877, 2877, 2772, 2592, 2592, 2345, 2885, 2592, 2592, 2592, 2715, 2762, 2515, 2896, 2592, 2592, 2715, 2917, 2516, 2897, 2592, 2592, 2592, 2901, 2906, 2911, 2592, 2592, 2956, 2960, 2715, 2902, 2907, 2912, 2593, 2916, 2920, 2820, 2922, 2822, 2592, 2592, 2715, 2927, 2921, 2821, 2106, 2592, 2592, 2974, 2408, 2321, 2821, 2106, 2592, 2592, 2983, 2592, 2593, 2404, 2408, 2592, 2592, 2717, 2749, 2716, 2928, 2322, 2822, 2593, 2926, 2919, 2820, 2934, 2823, 2592, 2592, 2592, 2651, 2824, 2592, 2592, 2592, 2130, 2952, 2592, 2592, 2592, 2592, 2964, 2592, 2592, 2716, 2748, 2592, 2969, 2592, 2592, 2716, 2918, 2368, 2970, 2592, 2592, 2592, 2403, 2407, 2592, 2592, 2787, 2211, 2404, 2409, 2592, 2592, 2802, 2837, 2987, 2592, 2592, 2592, 2809, 2427, 2592, 2793, 2592, 2592, 2809, 2447, 1073741824, 0x80000000, 539754496, 542375936, 402653184, 554434560, 571736064, 545521856, 268451840, 335544320, 268693630, 512, 2048, 256, 1024, 0, 1024, 0, 1073741824, 0x80000000, 0, 0, 0, 8388608, 0, 0, 1073741824, 1073741824, 0, 0x80000000, 537133056, 4194304, 1048576, 268435456, -1073741824, 0, 0, 0, 1048576, 0, 0, 0, 1572864, 0, 0, 0, 4194304, 0, 134217728, 16777216, 0, 0, 32, 64, 98304, 0, 33554432, 8388608, 192, 67108864, 67108864, 67108864, 67108864, 16, 32, 4, 0, 8192, 196608, 196608, 229376, 80, 4096, 524288, 8388608, 0, 0, 32, 128, 256, 24576, 24600, 24576, 24576, 2, 24576, 24576, 24576, 24584, 24592, 24576, 24578, 24576, 24578, 24576, 24576, 16, 512, 2048, 2048, 256, 4096, 32768, 1048576, 4194304, 67108864, 134217728, 268435456, 262144, 134217728, 0, 128, 128, 64, 16384, 16384, 16384, 67108864, 32, 32, 4, 4, 4096, 262144, 134217728, 0, 0, 0, 2, 0, 8192, 131072, 131072, 4096, 4096, 4096, 4096, 24576, 24576, 24576, 8, 8, 24576, 24576, 16384, 16384, 16384, 24576, 24584, 24576, 24576, 24576, 16384, 24576, 536870912, 262144, 0, 0, 32, 2048, 8192, 4, 4096, 4096, 4096, 786432, 8388608, 16777216, 0, 128, 16384, 16384, 16384, 32768, 65536, 2097152, 32, 32, 32, 32, 4, 4, 4, 4, 4, 4096, 67108864, 67108864, 67108864, 24576, 24576, 24576, 24576, 0, 16384, 16384, 16384, 16384, 67108864, 67108864, 8, 67108864, 24576, 8, 8, 8, 24576, 24576, 24576, 24578, 24576, 24576, 24576, 2, 2, 2, 16384, 67108864, 67108864, 67108864, 32, 67108864, 8, 8, 24576, 2048, 0x80000000, 536870912, 262144, 262144, 262144, 67108864, 8, 24576, 16384, 32768, 1048576, 4194304, 25165824, 67108864, 24576, 32770, 2, 4, 112, 512, 98304, 524288, 50, 402653186, 1049090, 1049091, 10, 66, 100925514, 10, 66, 12582914, 0, 0, -1678194207, -1678194207, -1041543218, 0, 32768, 0, 0, 32, 65536, 268435456, 1, 1, 513, 1048577, 0, 12582912, 0, 0, 0, 4, 1792, 0, 0, 0, 7, 29360128, 0, 0, 0, 8, 0, 0, 0, 12, 1, 1, 0, 0, -604102721, -604102721, 4194304, 8388608, 0, 0, 0, 31, 925600, 997981306, 997981306, 997981306, 0, 0, 2048, 8388608, 0, 0, 1, 2, 4, 32, 64, 512, 8192, 0, 0, 0, 245760, 997720064, 0, 0, 0, 32, 0, 0, 0, 3, 12, 16, 32, 8, 112, 3072, 12288, 16384, 32768, 65536, 131072, 7864320, 16777216, 973078528, 0, 0, 65536, 131072, 3670016, 4194304, 16777216, 33554432, 2, 8, 48, 2048, 8192, 16384, 32768, 65536, 131072, 524288, 131072, 524288, 3145728, 4194304, 16777216, 33554432, 65536, 131072, 2097152, 4194304, 16777216, 33554432, 134217728, 268435456, 536870912, 0, 0, 0, 1024, 0, 8, 48, 2048, 8192, 65536, 33554432, 268435456, 536870912, 65536, 268435456, 536870912, 0, 0, 32768, 0, 0, 126, 623104, 65011712, 0, 32, 65536, 536870912, 0, 0, 65536, 524288, 0, 32, 65536, 0, 0, 0, 2048, 0, 0, 0, 15482, 245760, -604102721, 0, 0, 0, 18913, 33062912, 925600, -605028352, 0, 0, 0, 65536, 31, 8096, 131072, 786432, 3145728, 3145728, 12582912, 50331648, 134217728, 268435456, 160, 256, 512, 7168, 131072, 786432, 131072, 786432, 1048576, 2097152, 12582912, 16777216, 268435456, 1073741824, 0x80000000, 12582912, 16777216, 33554432, 268435456, 1073741824, 0x80000000, 3, 12, 16, 160, 256, 7168, 786432, 1048576, 12582912, 16777216, 268435456, 1073741824, 0, 8, 16, 32, 128, 256, 512, 7168, 786432, 1048576, 2097152, 0, 1, 2, 8, 16, 7168, 786432, 1048576, 8388608, 16777216, 16777216, 1073741824, 0, 0, 0, 0, 1, 0, 0, 8, 32, 128, 256, 7168, 8, 32, 0, 3072, 0, 8, 32, 3072, 4096, 524288, 8, 32, 0, 0, 3072, 4096, 0, 2048, 524288, 8388608, 8, 2048, 0, 0, 1, 12, 256, 4096, 32768, 262144, 1048576, 4194304, 67108864, 0, 2048, 0, 2048, 2048, 1073741824, -58805985, -58805985, -58805985, 0, 0, 262144, 0, 0, 32, 4194304, 16777216, 134217728, 4382, 172032, -58982400, 0, 0, 2, 28, 256, 4096, 8192, 8192, 32768, 131072, 262144, 524288, 1, 2, 12, 256, 4096, 0, 0, 4194304, 67108864, 134217728, 805306368, 1073741824, 0, 0, 1, 2, 12, 16, 256, 4096, 1048576, 67108864, 134217728, 268435456, 0, 512, 1048576, 4194304, 201326592, 1879048192, 0, 0, 12, 256, 4096, 134217728, 268435456, 536870912, 12, 256, 268435456, 536870912, 0, 12, 256, 0, 0, 1, 32, 64, 512, 0, 0, 205236961, 205236961, 0, 0, 0, 1, 96, 640, 1, 10976, 229376, 204996608, 0, 640, 2048, 8192, 229376, 1572864, 1572864, 2097152, 201326592, 0, 0, 0, 64, 512, 2048, 229376, 1572864, 201326592, 1572864, 201326592, 0, 0, 1, 4382, 0, 1, 32, 2048, 65536, 131072, 1572864, 201326592, 131072, 1572864, 134217728, 0, 0, 524288, 524288, 0, 0, 0, -68582786, -68582786, -68582786, 0, 0, 2097152, 524288, 0, 524288, 0, 0, 65536, 131072, 1572864, 0, 0, 2, 4, 0, 0, 65011712, -134217728, 0, 0, 0, 0, 2, 4, 120, 512, -268435456, 0, 0, 0, 2, 8, 48, 64, 2048, 8192, 98304, 524288, 2097152, 4194304, 25165824, 33554432, 134217728, 268435456, 0x80000000, 0, 0, 25165824, 33554432, 134217728, 1879048192, 0x80000000, 0, 0, 4, 112, 512, 622592, 65011712, 134217728, -268435456, 16777216, 33554432, 134217728, 1610612736, 0, 0, 0, 64, 98304, 524288, 4194304, 16777216, 33554432, 0, 98304, 524288, 16777216, 33554432, 0, 65536, 524288, 33554432, 536870912, 1073741824, 0, 65536, 524288, 536870912, 1073741824, 0, 0, 65536, 524288, 536870912, 0, 524288, 0, 524288, 524288, 1048576, 2086666240, 0x80000000, 0, -1678194207, 0, 0, 0, 8, 32, 2048, 524288, 8388608, 0, 0, 33062912, 436207616, 0x80000000, 0, 0, 32, 64, 2432, 16384, 32768, 32768, 524288, 3145728, 4194304, 25165824, 25165824, 167772160, 268435456, 0x80000000, 0, 32, 64, 384, 2048, 16384, 32768, 1048576, 2097152, 4194304, 25165824, 32, 64, 128, 256, 2048, 16384, 2048, 16384, 1048576, 4194304, 16777216, 33554432, 134217728, 536870912, 1073741824, 0, 0, 2048, 16384, 4194304, 16777216, 33554432, 134217728, 805306368, 0, 0, 16777216, 134217728, 268435456, 0x80000000, 0, 622592, 622592, 622592, 8807, 8807, 434791, 0, 0, 16777216, 0, 0, 0, 7, 608, 8192, 0, 0, 0, 3, 4, 96, 512, 32, 64, 8192, 0, 0, 16777216, 134217728, 0, 0, 2, 4, 8192, 16384, 65536, 2097152, 33554432, 268435456
+];
+
+XQueryTokenizer.TOKEN =
+[
+ "(0)",
+ "ModuleDecl",
+ "Annotation",
+ "OptionDecl",
+ "Operator",
+ "Variable",
+ "Tag",
+ "EndTag",
+ "PragmaContents",
+ "DirCommentContents",
+ "DirPIContents",
+ "CDataSectionContents",
+ "AttrTest",
+ "Wildcard",
+ "EQName",
+ "IntegerLiteral",
+ "DecimalLiteral",
+ "DoubleLiteral",
+ "PredefinedEntityRef",
+ "'\"\"'",
+ "EscapeApos",
+ "QuotChar",
+ "AposChar",
+ "ElementContentChar",
+ "QuotAttrContentChar",
+ "AposAttrContentChar",
+ "NCName",
+ "QName",
+ "S",
+ "CharRef",
+ "CommentContents",
+ "DocTag",
+ "DocCommentContents",
+ "EOF",
+ "'!'",
+ "'\"'",
+ "'#'",
+ "'#)'",
+ "''''",
+ "'('",
+ "'(#'",
+ "'(:'",
+ "'(:~'",
+ "')'",
+ "'*'",
+ "'*'",
+ "','",
+ "'-->'",
+ "'.'",
+ "'/'",
+ "'/>'",
+ "':'",
+ "':)'",
+ "';'",
+ "'<!--'",
+ "'<![CDATA['",
+ "'<?'",
+ "'='",
+ "'>'",
+ "'?'",
+ "'?>'",
+ "'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'",
+ "'{'",
+ "'{{'",
+ "'|'",
+ "'}'",
+ "'}}'"
+];
+
+},{}],"/node_modules/xqlint/lib/lexers/lexer.js":[function(_dereq_,module,exports){
+'use strict';
+
+var TokenHandler = function(code) {
+ var input = code;
+ this.tokens = [];
+
+ this.reset = function() {
+ input = input;
+ this.tokens = [];
+ };
+
+ this.startNonterminal = function() {};
+ this.endNonterminal = function() {};
+
+ this.terminal = function(name, begin, end) {
+ this.tokens.push({
+ name: name,
+ value: input.substring(begin, end)
+ });
+ };
+
+ this.whitespace = function(begin, end) {
+ this.tokens.push({
+ name: 'WS',
+ value: input.substring(begin, end)
+ });
+ };
+};
+
+exports.Lexer = function(Tokenizer, Rules) {
+
+ this.tokens = [];
+
+ this.getLineTokens = function(line, state) {
+ state = (state === 'start' || !state) ? '["start"]' : state;
+ var stack = JSON.parse(state);
+ var h = new TokenHandler(line);
+ var tokenizer = new Tokenizer(line, h);
+ var tokens = [];
+
+ while(true) {
+ var currentState = stack[stack.length - 1];
+ try {
+ h.tokens = [];
+ tokenizer['parse_' + currentState]();
+ var info = null;
+
+ if(h.tokens.length > 1 && h.tokens[0].name === 'WS') {
+ tokens.push({
+ type: 'text',
+ value: h.tokens[0].value
+ });
+ h.tokens.splice(0, 1);
+ }
+
+ var token = h.tokens[0];
+ var rules = Rules[currentState];
+ for(var k = 0; k < rules.length; k++) {
+ var rule = Rules[currentState][k];
+ if((typeof(rule.name) === 'function' && rule.name(token)) || rule.name === token.name) {
+ info = rule;
+ break;
+ }
+ }
+
+ if(token.name === 'EOF') { break; }
+ if(token.value === '') { throw 'Encountered empty string lexical rule.'; }
+
+ tokens.push({
+ type: info === null ? 'text' : (typeof(info.token) === 'function' ? info.token(token.value) : info.token),
+ value: token.value
+ });
+
+ if(info && info.next) {
+ info.next(stack);
+ }
+
+ } catch(e) {
+ if(e instanceof tokenizer.ParseException) {
+ var index = 0;
+ for(var i=0; i < tokens.length; i++) {
+ index += tokens[i].value.length;
+ }
+ tokens.push({ type: 'text', value: line.substring(index) });
+ return {
+ tokens: tokens,
+ state: JSON.stringify(['start'])
+ };
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ return {
+ tokens: tokens,
+ state: JSON.stringify(stack)
+ };
+ };
+};
+},{}],"/node_modules/xqlint/lib/lexers/xquery_lexer.js":[function(_dereq_,module,exports){
+'use strict';
+
+var XQueryTokenizer = _dereq_('./XQueryTokenizer').XQueryTokenizer;
+var Lexer = _dereq_('./lexer').Lexer;
+
+var keys = '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|strict'.split('|');
+
+var keywords = keys.map(function(val) { return { name: '\'' + val + '\'', token: 'keyword' }; });
+var ncnames = keys.map(function(val) { return { name: '\'' + val + '\'', token: 'text', next: function(stack){ stack.pop(); } }; });
+
+var cdata = 'constant.language';
+var number = 'constant';
+var xmlcomment = 'comment';
+var pi = 'xml-pe';
+var pragma = 'constant.buildin';
+var n = function(name){
+ return '\'' + name + '\'';
+};
+var Rules = {
+ start: [
+ { name: n('(#'), token: pragma, next: function(stack){ stack.push('Pragma'); } },
+ { name: n('(:'), token: 'comment', next: function(stack){ stack.push('Comment'); } },
+ { name: n('(:~'), token: 'comment.doc', next: function(stack){ stack.push('CommentDoc'); } },
+ { name: n('<!--'), token: xmlcomment, next: function(stack){ stack.push('XMLComment'); } },
+ { name: n('<?'), token: pi, next: function(stack) { stack.push('PI'); } },
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.push('AposString'); } },
+ { name: n('"'), token: 'string', next: function(stack){ stack.push('QuotString'); } },
+ { name: 'Annotation', token: 'support.function' },
+ { name: 'ModuleDecl', token: 'keyword', next: function(stack){ stack.push('Prefix'); } },
+ { name: 'OptionDecl', token: 'keyword', next: function(stack){ stack.push('_EQName'); } },
+ { name: 'AttrTest', token: 'support.type' },
+ { name: 'Variable', token: 'variable' },
+ { name: n('<![CDATA['), token: cdata, next: function(stack){ stack.push('CData'); } },
+ { name: 'IntegerLiteral', token: number },
+ { name: 'DecimalLiteral', token: number },
+ { name: 'DoubleLiteral', token: number },
+ { name: 'Operator', token: 'keyword.operator' },
+ { name: 'EQName', token: function(val) { return keys.indexOf(val) !== -1 ? 'keyword' : 'support.function'; } },
+ { name: n('('), token: 'lparen' },
+ { name: n(')'), token: 'rparen' },
+ { name: 'Tag', token: 'meta.tag', next: function(stack){ stack.push('StartTag'); } },
+ { name: n('}'), token: 'text', next: function(stack){ if(stack.length > 1) { stack.pop(); } } },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } } //, next: function(stack){ if(stack.length > 1) { stack.pop(); } } }
+ ].concat(keywords),
+ _EQName: [
+ { name: 'EQName', token: 'text', next: function(stack) { stack.pop(); } }
+ ].concat(ncnames),
+ Prefix: [
+ { name: 'NCName', token: 'text', next: function(stack) { stack.pop(); } }
+ ].concat(ncnames),
+ StartTag: [
+ { name: n('>'), token: 'meta.tag', next: function(stack){ stack.push('TagContent'); } },
+ { name: 'QName', token: 'entity.other.attribute-name' },
+ { name: n('='), token: 'text' },
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.push('AposAttr'); } },
+ { name: n('"'), token: 'string', next: function(stack){ stack.push('QuotAttr'); } },
+ { name: n('/>'), token: 'meta.tag.r', next: function(stack){ stack.pop(); } }
+ ],
+ TagContent: [
+ { name: 'ElementContentChar', token: 'text' },
+ { name: n('<![CDATA['), token: cdata, next: function(stack){ stack.push('CData'); } },
+ { name: n('<!--'), token: xmlcomment, next: function(stack){ stack.push('XMLComment'); } },
+ { name: 'Tag', token: 'meta.tag', next: function(stack){ stack.push('StartTag'); } },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'text' },
+ { name: n('}}'), token: 'text' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } },
+ { name: 'EndTag', token: 'meta.tag', next: function(stack){ stack.pop(); stack.pop(); } }
+ ],
+ AposAttr: [
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'EscapeApos', token: 'constant.language.escape' },
+ { name: 'AposAttrContentChar', token: 'string' },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'string' },
+ { name: n('}}'), token: 'string' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } }
+ ],
+ QuotAttr: [
+ { name: n('\"'), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'EscapeQuot', token: 'constant.language.escape' },
+ { name: 'QuotAttrContentChar', token: 'string' },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'string' },
+ { name: n('}}'), token: 'string' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } }
+ ],
+ Pragma: [
+ { name: 'PragmaContents', token: pragma },
+ { name: n('#'), token: pragma },
+ { name: n('#)'), token: pragma, next: function(stack){ stack.pop(); } }
+ ],
+ Comment: [
+ { name: 'CommentContents', token: 'comment' },
+ { name: n('(:'), token: 'comment', next: function(stack){ stack.push('Comment'); } },
+ { name: n(':)'), token: 'comment', next: function(stack){ stack.pop(); } }
+ ],
+ CommentDoc: [
+ { name: 'DocCommentContents', token: 'comment.doc' },
+ { name: 'DocTag', token: 'comment.doc.tag' },
+ { name: n('(:'), token: 'comment.doc', next: function(stack){ stack.push('CommentDoc'); } },
+ { name: n(':)'), token: 'comment.doc', next: function(stack){ stack.pop(); } }
+ ],
+ XMLComment: [
+ { name: 'DirCommentContents', token: xmlcomment },
+ { name: n('-->'), token: xmlcomment, next: function(stack){ stack.pop(); } }
+ ],
+ CData: [
+ { name: 'CDataSectionContents', token: cdata },
+ { name: n(']]>'), token: cdata, next: function(stack){ stack.pop(); } }
+ ],
+ PI: [
+ { name: 'DirPIContents', token: pi },
+ { name: n('?'), token: pi },
+ { name: n('?>'), token: pi, next: function(stack){ stack.pop(); } }
+ ],
+ AposString: [
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: 'EscapeApos', token: 'constant.language.escape' },
+ { name: 'AposChar', token: 'string' }
+ ],
+ QuotString: [
+ { name: n('"'), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: 'EscapeQuot', token: 'constant.language.escape' },
+ { name: 'QuotChar', token: 'string' }
+ ]
+};
+
+exports.XQueryLexer = function(){ return new Lexer(XQueryTokenizer, Rules); };
+},{"./XQueryTokenizer":"/node_modules/xqlint/lib/lexers/XQueryTokenizer.js","./lexer":"/node_modules/xqlint/lib/lexers/lexer.js"}]},{},["/node_modules/xqlint/lib/lexers/xquery_lexer.js"]);
+
+});
+
+ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../../lib/oop");
+var Behaviour = require("../behaviour").Behaviour;
+var TokenIterator = require("../../token_iterator").TokenIterator;
+var lang = require("../../lib/lang");
+
+function is(token, type) {
+ return token.type.lastIndexOf(type + ".xml") > -1;
+}
+
+var XmlBehaviour = function () {
+
+ this.add("string_dquotes", "insertion", function (state, action, editor, session, text) {
+ if (text == '"' || text == "'") {
+ var quote = text;
+ var selected = session.doc.getTextRange(editor.getSelectionRange());
+ if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) {
+ return {
+ text: quote + selected + quote,
+ selection: false
+ };
+ }
+
+ var cursor = editor.getCursorPosition();
+ var line = session.doc.getLine(cursor.row);
+ var rightChar = line.substring(cursor.column, cursor.column + 1);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) {
+ return {
+ text: "",
+ selection: [1, 1]
+ };
+ }
+
+ if (!token)
+ token = iterator.stepBackward();
+
+ if (!token)
+ return;
+
+ while (is(token, "tag-whitespace") || is(token, "whitespace")) {
+ token = iterator.stepBackward();
+ }
+ var rightSpace = !rightChar || rightChar.match(/\s/);
+ if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) {
+ return {
+ text: quote + quote,
+ 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 == selected) {
+ range.end.column++;
+ return range;
+ }
+ }
+ });
+
+ this.add("autoclosing", "insertion", function (state, action, editor, session, text) {
+ if (text == '>') {
+ var position = editor.getSelectionRange().start;
+ var iterator = new TokenIterator(session, position.row, position.column);
+ var token = iterator.getCurrentToken() || iterator.stepBackward();
+ if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value")))
+ return;
+ if (is(token, "reference.attribute-value"))
+ return;
+ if (is(token, "attribute-value")) {
+ var firstChar = token.value.charAt(0);
+ if (firstChar == '"' || firstChar == "'") {
+ var lastChar = token.value.charAt(token.value.length - 1);
+ var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length;
+ if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar)
+ return;
+ }
+ }
+ while (!is(token, "tag-name")) {
+ token = iterator.stepBackward();
+ if (token.value == "<") {
+ token = iterator.stepForward();
+ break;
+ }
+ }
+
+ var tokenRow = iterator.getCurrentTokenRow();
+ var tokenColumn = iterator.getCurrentTokenColumn();
+ if (is(iterator.stepBackward(), "end-tag-open"))
+ return;
+
+ var element = token.value;
+ if (tokenRow == position.row)
+ element = element.substring(0, position.column - tokenColumn);
+
+ if (this.voidElements.hasOwnProperty(element.toLowerCase()))
+ return;
+
+ return {
+ text: ">" + "</" + element + ">",
+ selection: [1, 1]
+ };
+ }
+ });
+
+ this.add("autoindent", "insertion", function (state, action, editor, session, text) {
+ if (text == "\n") {
+ var cursor = editor.getCursorPosition();
+ var line = session.getLine(cursor.row);
+ var iterator = new TokenIterator(session, cursor.row, cursor.column);
+ var token = iterator.getCurrentToken();
+
+ if (token && token.type.indexOf("tag-close") !== -1) {
+ if (token.value == "/>")
+ return;
+ while (token && token.type.indexOf("tag-name") === -1) {
+ token = iterator.stepBackward();
+ }
+
+ if (!token) {
+ return;
+ }
+
+ var tag = token.value;
+ var row = iterator.getCurrentTokenRow();
+ token = iterator.stepBackward();
+ if (!token || token.type.indexOf("end-tag") !== -1) {
+ return;
+ }
+
+ if (this.voidElements && !this.voidElements[tag]) {
+ var nextToken = session.getTokenAt(cursor.row, cursor.column+1);
+ var line = session.getLine(row);
+ var nextIndent = this.$getIndent(line);
+ var indent = nextIndent + session.getTabString();
+
+ if (nextToken && nextToken.value === "</") {
+ return {
+ text: "\n" + indent + "\n" + nextIndent,
+ selection: [1, indent.length, 1, indent.length]
+ };
+ } else {
+ return {
+ text: "\n" + indent
+ };
+ }
+ }
+ }
+ }
+ });
+
+};
+
+oop.inherits(XmlBehaviour, Behaviour);
+
+exports.XmlBehaviour = XmlBehaviour;
+});
+
+ace.define("ace/mode/behaviour/xquery",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml","ace/token_iterator"], function(require, exports, module) {
+"use strict";
+
+ var oop = require("../../lib/oop");
+ var Behaviour = require('../behaviour').Behaviour;
+ var CstyleBehaviour = require('./cstyle').CstyleBehaviour;
+ var XmlBehaviour = require("../behaviour/xml").XmlBehaviour;
+ 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 XQueryBehaviour = function () {
+
+ this.inherit(CstyleBehaviour, ["braces", "parens", "string_dquotes"]); // Get string behaviour
+ 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;
+ var state = JSON.parse(state).pop();
+ if ((token && token.value === '>') || state !== "StartTag") return;
+ 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;
+ }
+ var previous = iterator.stepBackward();
+ if (!token || !hasType(token, 'meta.tag') || (previous !== null && previous.value.match('/'))) {
+ return
+ }
+ var tag = token.value.substring(1);
+ if (atCursor){
+ var tag = tag.substring(0, position.column - token.start);
+ }
+
+ return {
+ text: '>' + '</' + tag + '>',
+ selection: [1, 1]
+ }
+ }
+ });
+
+ }
+ oop.inherits(XQueryBehaviour, Behaviour);
+
+ exports.XQueryBehaviour = XQueryBehaviour;
+});
+
+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(commentRegex) {
+ if (commentRegex) {
+ this.foldingStartMarker = new RegExp(
+ this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start)
+ );
+ this.foldingStopMarker = new RegExp(
+ this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end)
+ );
+ }
+};
+oop.inherits(FoldMode, BaseFoldMode);
+
+(function() {
+
+ this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
+ this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
+ this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
+ this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
+ this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
+ this._getFoldWidgetBase = this.getFoldWidget;
+ this.getFoldWidget = function(session, foldStyle, row) {
+ var line = session.getLine(row);
+
+ if (this.singleLineBlockCommentRe.test(line)) {
+ if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line))
+ return "";
+ }
+
+ var fw = this._getFoldWidgetBase(session, foldStyle, row);
+
+ if (!fw && this.startRegionRe.test(line))
+ return "start"; // lineCommentRegionStart
+
+ return fw;
+ };
+
+ this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) {
+ var line = session.getLine(row);
+
+ if (this.startRegionRe.test(line))
+ return this.getCommentRegionBlock(session, line, 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, 1);
+
+ if (range && !range.isMultiLine()) {
+ if (forceMultiline) {
+ range = this.getSectionRange(session, row);
+ } else if (foldStyle != "all")
+ range = null;
+ }
+
+ return range;
+ }
+
+ if (foldStyle === "markbegin")
+ 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);
+ }
+ };
+
+ this.getSectionRange = function(session, row) {
+ var line = session.getLine(row);
+ var startIndent = line.search(/\S/);
+ var startRow = row;
+ var startColumn = line.length;
+ row = row + 1;
+ var endRow = row;
+ var maxRow = session.getLength();
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var indent = line.search(/\S/);
+ if (indent === -1)
+ continue;
+ if (startIndent > indent)
+ break;
+ var subRange = this.getFoldWidgetRange(session, "all", row);
+
+ if (subRange) {
+ if (subRange.start.row <= startRow) {
+ break;
+ } else if (subRange.isMultiLine()) {
+ row = subRange.end.row;
+ } else if (startIndent == indent) {
+ break;
+ }
+ }
+ endRow = row;
+ }
+
+ return new Range(startRow, startColumn, endRow, session.getLine(endRow).length);
+ };
+ this.getCommentRegionBlock = function(session, line, row) {
+ var startColumn = line.search(/\s*$/);
+ var maxRow = session.getLength();
+ var startRow = row;
+
+ var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/;
+ var depth = 1;
+ while (++row < maxRow) {
+ line = session.getLine(row);
+ var m = re.exec(line);
+ if (!m) continue;
+ if (m[1]) depth--;
+ else depth++;
+
+ if (!depth) break;
+ }
+
+ var endRow = row;
+ if (endRow > startRow) {
+ return new Range(startRow, startColumn, endRow, line.length);
+ }
+ };
+
+}).call(FoldMode.prototype);
+
+});
+
+ace.define("ace/mode/xquery",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/xquery_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var WorkerClient = require("../worker/worker_client").WorkerClient;
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
+var XQueryLexer = require("./xquery/xquery_lexer").XQueryLexer;
+var Range = require("../range").Range;
+var XQueryBehaviour = require("./behaviour/xquery").XQueryBehaviour;
+var CStyleFoldMode = require("./folding/cstyle").FoldMode;
+var Anchor = require("../anchor").Anchor;
+
+var Mode = function() {
+ this.$tokenizer = new XQueryLexer();
+ this.$behaviour = new XQueryBehaviour();
+ this.foldingRules = new CStyleFoldMode();
+ this.$highlightRules = new TextHighlightRules();
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.completer = {
+ getCompletions: function(editor, session, pos, prefix, callback) {
+ if (!session.$worker)
+ return callback();
+ session.$worker.emit("complete", { data: { pos: pos, prefix: prefix } });
+ session.$worker.on("complete", function(e){
+ callback(null, e.data);
+ });
+ }
+ };
+
+ 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.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) {
+
+ var worker = new WorkerClient(["ace"], "ace/mode/xquery_worker", "XQueryWorker");
+ var that = this;
+
+ worker.attachToDocument(session.getDocument());
+
+ worker.on("ok", function(e) {
+ session.clearAnnotations();
+ });
+
+ worker.on("markers", function(e) {
+ session.clearAnnotations();
+ that.addMarkers(e.data, session);
+ });
+
+ worker.on("highlight", function(tokens) {
+ that.$tokenizer.tokens = tokens.data.tokens;
+ that.$tokenizer.lines = session.getDocument().getAllLines();
+
+ var rows = Object.keys(that.$tokenizer.tokens);
+ for(var i=0; i < rows.length; i++) {
+ var row = parseInt(rows[i]);
+ delete session.bgTokenizer.lines[row];
+ delete session.bgTokenizer.states[row];
+ session.bgTokenizer.fireUpdateEvent(row, row);
+ }
+ });
+
+ return worker;
+ };
+
+ this.removeMarkers = function(session) {
+ var markers = session.getMarkers(false);
+ for (var id in markers) {
+ if (markers[id].clazz.indexOf('language_highlight_') === 0) {
+ session.removeMarker(id);
+ }
+ }
+ for (var i = 0; i < session.markerAnchors.length; i++) {
+ session.markerAnchors[i].detach();
+ }
+ session.markerAnchors = [];
+ };
+
+ this.addMarkers = function(annos, mySession) {
+ var _self = this;
+
+ if (!mySession.markerAnchors) mySession.markerAnchors = [];
+ this.removeMarkers(mySession);
+ mySession.languageAnnos = [];
+ annos.forEach(function(anno) {
+ var anchor = new Anchor(mySession.getDocument(), anno.pos.sl, anno.pos.sc || 0);
+ mySession.markerAnchors.push(anchor);
+ var markerId;
+ var colDiff = anno.pos.ec - anno.pos.sc;
+ var rowDiff = anno.pos.el - anno.pos.sl;
+ var gutterAnno = {
+ guttertext: anno.message,
+ type: anno.level || "warning",
+ text: anno.message
+ };
+
+ function updateFloat(single) {
+ if (markerId)
+ mySession.removeMarker(markerId);
+ gutterAnno.row = anchor.row;
+ if (anno.pos.sc !== undefined && anno.pos.ec !== undefined) {
+ var range = new Range(anno.pos.sl, anno.pos.sc, anno.pos.el, anno.pos.ec);
+ markerId = mySession.addMarker(range, "language_highlight_" + (anno.type ? anno.type : "default"));
+ }
+ if (single) mySession.setAnnotations(mySession.languageAnnos);
+ }
+ updateFloat();
+ anchor.on("change", function() {
+ updateFloat(true);
+ });
+ if (anno.message) mySession.languageAnnos.push(gutterAnno);
+ });
+ mySession.setAnnotations(mySession.languageAnnos);
+ };
+
+ this.$id = "ace/mode/xquery";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/mode-yaml.js b/www/wiki/extensions/CodeEditor/modules/ace/mode-yaml.js
new file mode 100644
index 00000000..8fbc403f
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/mode-yaml.js
@@ -0,0 +1,289 @@
+ace.define("ace/mode/yaml_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 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 : /[|>][-+\d\s]*$/,
+ onMatch: function(val, state, stack, line) {
+ var indent = /^\s*/.exec(line)[0];
+ if (stack.length < 1) {
+ stack.push(this.next);
+ } else {
+ stack[0] = "mlString";
+ }
+
+ if (stack.length < 2) {
+ stack.push(indent.length);
+ }
+ else {
+ stack[1] = indent.length;
+ }
+ return this.token;
+ },
+ next : "mlString"
+ }, {
+ token : "string", // single quoted string
+ regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"
+ }, {
+ token : "constant.numeric", // float
+ regex : /(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)/
+ }, {
+ token : "constant.numeric", // other number
+ regex : /[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/
+ }, {
+ token : "constant.language.boolean",
+ regex : "\\b(?:true|false|TRUE|FALSE|True|False|yes|no)\\b"
+ }, {
+ token : "paren.lparen",
+ regex : "[[({]"
+ }, {
+ token : "paren.rparen",
+ regex : "[\\])}]"
+ }
+ ],
+ "mlString" : [
+ {
+ token : "indent",
+ regex : /^\s*$/
+ }, {
+ token : "indent",
+ regex : /^\s*/,
+ onMatch: function(val, state, stack) {
+ var curIndent = stack[1];
+
+ if (curIndent >= val.length) {
+ this.next = "start";
+ stack.splice(0);
+ }
+ else {
+ this.next = "mlString";
+ }
+ return this.token;
+ },
+ next : "mlString"
+ }, {
+ token : "string",
+ regex : '.+'
+ }
+ ]};
+ this.normalizeRules();
+
+};
+
+oop.inherits(YamlHighlightRules, TextHighlightRules);
+
+exports.YamlHighlightRules = YamlHighlightRules;
+});
+
+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) {
+ return line.match(/^\s*/)[0];
+ };
+
+}).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) {
+"use strict";
+
+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);
+
+});
+
+ace.define("ace/mode/yaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/yaml_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var TextMode = require("./text").Mode;
+var YamlHighlightRules = require("./yaml_highlight_rules").YamlHighlightRules;
+var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent;
+var FoldMode = require("./folding/coffee").FoldMode;
+
+var Mode = function() {
+ this.HighlightRules = YamlHighlightRules;
+ this.$outdent = new MatchingBraceOutdent();
+ this.foldingRules = new FoldMode();
+ this.$behaviour = this.$defaultBehaviour;
+};
+oop.inherits(Mode, TextMode);
+
+(function() {
+
+ this.lineCommentStart = "#";
+
+ 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.$id = "ace/mode/yaml";
+}).call(Mode.prototype);
+
+exports.Mode = Mode;
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/abap.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/abap.js
new file mode 100644
index 00000000..0ef29119
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/abap.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/abap",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "abap";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/abc.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/abc.js
new file mode 100644
index 00000000..17030761
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/abc.js
@@ -0,0 +1,38 @@
+ace.define("ace/snippets/abc",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "\n\
+snippet zupfnoter.print\n\
+ %%%%hn.print {\"startpos\": ${1:pos_y}, \"t\":\"${2:title}\", \"v\":[${3:voices}], \"s\":[[${4:syncvoices}1,2]], \"f\":[${5:flowlines}], \"sf\":[${6:subflowlines}], \"j\":[${7:jumplines}]}\n\
+\n\
+snippet zupfnoter.note\n\
+ %%%%hn.note {\"pos\": [${1:pos_x},${2:pos_y}], \"text\": \"${3:text}\", \"style\": \"${4:style}\"}\n\
+\n\
+snippet zupfnoter.annotation\n\
+ %%%%hn.annotation {\"id\": \"${1:id}\", \"pos\": [${2:pos}], \"text\": \"${3:text}\"}\n\
+\n\
+snippet zupfnoter.lyrics\n\
+ %%%%hn.lyrics {\"pos\": [${1:x_pos},${2:y_pos}]}\n\
+\n\
+snippet zupfnoter.legend\n\
+ %%%%hn.legend {\"pos\": [${1:x_pos},${2:y_pos}]}\n\
+\n\
+\n\
+\n\
+snippet zupfnoter.target\n\
+ \"^:${1:target}\"\n\
+\n\
+snippet zupfnoter.goto\n\
+ \"^@${1:target}@${2:distance}\"\n\
+\n\
+snippet zupfnoter.annotationref\n\
+ \"^#${1:target}\"\n\
+\n\
+snippet zupfnoter.annotation\n\
+ \"^!${1:text}@${2:x_offset},${3:y_offset}\"\n\
+\n\
+\n\
+";
+exports.scope = "abc";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/actionscript.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/actionscript.js
new file mode 100644
index 00000000..bc899d16
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/actionscript.js
@@ -0,0 +1,164 @@
+ace.define("ace/snippets/actionscript",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet main\n\
+ package {\n\
+ import flash.display.*;\n\
+ import flash.Events.*;\n\
+ \n\
+ public class Main extends Sprite {\n\
+ public function Main ( ) {\n\
+ trace(\"start\");\n\
+ stage.scaleMode = StageScaleMode.NO_SCALE;\n\
+ stage.addEventListener(Event.RESIZE, resizeListener);\n\
+ }\n\
+ \n\
+ private function resizeListener (e:Event):void {\n\
+ trace(\"The application window changed size!\");\n\
+ trace(\"New width: \" + stage.stageWidth);\n\
+ trace(\"New height: \" + stage.stageHeight);\n\
+ }\n\
+ \n\
+ }\n\
+ \n\
+ }\n\
+snippet class\n\
+ ${1:public|internal} class ${2:name} ${3:extends } {\n\
+ public function $2 ( ) {\n\
+ (\"start\");\n\
+ }\n\
+ }\n\
+snippet all\n\
+ package name {\n\
+\n\
+ ${1:public|internal|final} class ${2:name} ${3:extends } {\n\
+ private|public| static const FOO = \"abc\";\n\
+ private|public| static var BAR = \"abc\";\n\
+\n\
+ // class initializer - no JIT !! one time setup\n\
+ if Cababilities.os == \"Linux|MacOS\" {\n\
+ FOO = \"other\";\n\
+ }\n\
+\n\
+ // constructor:\n\
+ public function $2 ( ){\n\
+ super2();\n\
+ trace(\"start\");\n\
+ }\n\
+ public function name (a, b...){\n\
+ super.name(..);\n\
+ lable:break\n\
+ }\n\
+ }\n\
+ }\n\
+\n\
+ function A(){\n\
+ // A can only be accessed within this file\n\
+ }\n\
+snippet switch\n\
+ switch(${1}){\n\
+ case ${2}:\n\
+ ${3}\n\
+ break;\n\
+ default:\n\
+ }\n\
+snippet case\n\
+ case ${1}:\n\
+ ${2}\n\
+ break;\n\
+snippet package\n\
+ package ${1:package}{\n\
+ ${2}\n\
+ }\n\
+snippet wh\n\
+ while ${1:cond}{\n\
+ ${2}\n\
+ }\n\
+snippet do\n\
+ do {\n\
+ ${2}\n\
+ } while (${1:cond})\n\
+snippet while\n\
+ while ${1:cond}{\n\
+ ${2}\n\
+ }\n\
+snippet for enumerate names\n\
+ for (${1:var} in ${2:object}){\n\
+ ${3}\n\
+ }\n\
+snippet for enumerate values\n\
+ for each (${1:var} in ${2:object}){\n\
+ ${3}\n\
+ }\n\
+snippet get_set\n\
+ function get ${1:name} {\n\
+ return ${2}\n\
+ }\n\
+ function set $1 (newValue) {\n\
+ ${3}\n\
+ }\n\
+snippet interface\n\
+ interface name {\n\
+ function method(${1}):${2:returntype};\n\
+ }\n\
+snippet try\n\
+ try {\n\
+ ${1}\n\
+ } catch (error:ErrorType) {\n\
+ ${2}\n\
+ } finally {\n\
+ ${3}\n\
+ }\n\
+# For Loop (same as c.snippet)\n\
+snippet for for (..) {..}\n\
+ for (${2:i} = 0; $2 < ${1:count}; $2${3:++}) {\n\
+ ${4:/* code */}\n\
+ }\n\
+# Custom For Loop\n\
+snippet forr\n\
+ for (${1:i} = ${2:0}; ${3:$1 < 10}; $1${4:++}) {\n\
+ ${5:/* code */}\n\
+ }\n\
+# If Condition\n\
+snippet if\n\
+ if (${1:/* condition */}) {\n\
+ ${2:/* code */}\n\
+ }\n\
+snippet el\n\
+ else {\n\
+ ${1}\n\
+ }\n\
+# Ternary conditional\n\
+snippet t\n\
+ ${1:/* condition */} ? ${2:a} : ${3:b}\n\
+snippet fun\n\
+ function ${1:function_name}(${2})${3}\n\
+ {\n\
+ ${4:/* code */}\n\
+ }\n\
+# FlxSprite (usefull when using the flixel library)\n\
+snippet FlxSprite\n\
+ package\n\
+ {\n\
+ import org.flixel.*\n\
+\n\
+ public class ${1:ClassName} extends ${2:FlxSprite}\n\
+ {\n\
+ public function $1(${3: X:Number, Y:Number}):void\n\
+ {\n\
+ super(X,Y);\n\
+ ${4: //code...}\n\
+ }\n\
+\n\
+ override public function update():void\n\
+ {\n\
+ super.update();\n\
+ ${5: //code...}\n\
+ }\n\
+ }\n\
+ }\n\
+\n\
+";
+exports.scope = "actionscript";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/ada.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/ada.js
new file mode 100644
index 00000000..656608aa
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/ada.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/ada",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "ada";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/apache_conf.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/apache_conf.js
new file mode 100644
index 00000000..0f38e54c
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/apache_conf.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/apache_conf",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "apache_conf";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/applescript.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/applescript.js
new file mode 100644
index 00000000..6b59011a
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/applescript.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/applescript",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "applescript";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/asciidoc.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/asciidoc.js
new file mode 100644
index 00000000..ef22c020
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/asciidoc.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/asciidoc",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "asciidoc";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/assembly_x86.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/assembly_x86.js
new file mode 100644
index 00000000..b3c3cd3d
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/assembly_x86.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/assembly_x86",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "assembly_x86";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/autohotkey.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/autohotkey.js
new file mode 100644
index 00000000..61c8ad4e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/autohotkey.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/autohotkey",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "autohotkey";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/batchfile.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/batchfile.js
new file mode 100644
index 00000000..619f57da
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/batchfile.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/batchfile",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "batchfile";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/bro.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/bro.js
new file mode 100644
index 00000000..2f2e2e12
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/bro.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/bro",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/c9search.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/c9search.js
new file mode 100644
index 00000000..78ea3dab
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/c9search.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/c9search",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "c9search";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/c_cpp.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/c_cpp.js
new file mode 100644
index 00000000..a232b56f
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/c_cpp.js
@@ -0,0 +1,138 @@
+ace.define("ace/snippets/c_cpp",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "## STL Collections\n\
+# std::array\n\
+snippet array\n\
+ std::array<${1:T}, ${2:N}> ${3};${4}\n\
+# std::vector\n\
+snippet vector\n\
+ std::vector<${1:T}> ${2};${3}\n\
+# std::deque\n\
+snippet deque\n\
+ std::deque<${1:T}> ${2};${3}\n\
+# std::forward_list\n\
+snippet flist\n\
+ std::forward_list<${1:T}> ${2};${3}\n\
+# std::list\n\
+snippet list\n\
+ std::list<${1:T}> ${2};${3}\n\
+# std::set\n\
+snippet set\n\
+ std::set<${1:T}> ${2};${3}\n\
+# std::map\n\
+snippet map\n\
+ std::map<${1:Key}, ${2:T}> ${3};${4}\n\
+# std::multiset\n\
+snippet mset\n\
+ std::multiset<${1:T}> ${2};${3}\n\
+# std::multimap\n\
+snippet mmap\n\
+ std::multimap<${1:Key}, ${2:T}> ${3};${4}\n\
+# std::unordered_set\n\
+snippet uset\n\
+ std::unordered_set<${1:T}> ${2};${3}\n\
+# std::unordered_map\n\
+snippet umap\n\
+ std::unordered_map<${1:Key}, ${2:T}> ${3};${4}\n\
+# std::unordered_multiset\n\
+snippet umset\n\
+ std::unordered_multiset<${1:T}> ${2};${3}\n\
+# std::unordered_multimap\n\
+snippet ummap\n\
+ std::unordered_multimap<${1:Key}, ${2:T}> ${3};${4}\n\
+# std::stack\n\
+snippet stack\n\
+ std::stack<${1:T}> ${2};${3}\n\
+# std::queue\n\
+snippet queue\n\
+ std::queue<${1:T}> ${2};${3}\n\
+# std::priority_queue\n\
+snippet pqueue\n\
+ std::priority_queue<${1:T}> ${2};${3}\n\
+##\n\
+## Access Modifiers\n\
+# private\n\
+snippet pri\n\
+ private\n\
+# protected\n\
+snippet pro\n\
+ protected\n\
+# public\n\
+snippet pub\n\
+ public\n\
+# friend\n\
+snippet fr\n\
+ friend\n\
+# mutable\n\
+snippet mu\n\
+ mutable\n\
+## \n\
+## Class\n\
+# class\n\
+snippet cl\n\
+ class ${1:`Filename('$1', 'name')`} \n\
+ {\n\
+ public:\n\
+ $1(${2});\n\
+ ~$1();\n\
+\n\
+ private:\n\
+ ${3:/* data */}\n\
+ };\n\
+# member function implementation\n\
+snippet mfun\n\
+ ${4:void} ${1:`Filename('$1', 'ClassName')`}::${2:memberFunction}(${3}) {\n\
+ ${5:/* code */}\n\
+ }\n\
+# namespace\n\
+snippet ns\n\
+ namespace ${1:`Filename('', 'my')`} {\n\
+ ${2}\n\
+ } /* namespace $1 */\n\
+##\n\
+## Input/Output\n\
+# std::cout\n\
+snippet cout\n\
+ std::cout << ${1} << std::endl;${2}\n\
+# std::cin\n\
+snippet cin\n\
+ std::cin >> ${1};${2}\n\
+##\n\
+## Iteration\n\
+# for i \n\
+snippet fori\n\
+ for (int ${2:i} = 0; $2 < ${1:count}; $2${3:++}) {\n\
+ ${4:/* code */}\n\
+ }${5}\n\
+\n\
+# foreach\n\
+snippet fore\n\
+ for (${1:auto} ${2:i} : ${3:container}) {\n\
+ ${4:/* code */}\n\
+ }${5}\n\
+# iterator\n\
+snippet iter\n\
+ for (${1:std::vector}<${2:type}>::${3:const_iterator} ${4:i} = ${5:container}.begin(); $4 != $5.end(); ++$4) {\n\
+ ${6}\n\
+ }${7}\n\
+\n\
+# auto iterator\n\
+snippet itera\n\
+ for (auto ${1:i} = $1.begin(); $1 != $1.end(); ++$1) {\n\
+ ${2:std::cout << *$1 << std::endl;}\n\
+ }${3}\n\
+##\n\
+## Lambdas\n\
+# lamda (one line)\n\
+snippet ld\n\
+ [${1}](${2}){${3:/* code */}}${4}\n\
+# lambda (multi-line)\n\
+snippet lld\n\
+ [${1}](${2}){\n\
+ ${3:/* code */}\n\
+ }${4}\n\
+";
+exports.scope = "c_cpp";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/cirru.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/cirru.js
new file mode 100644
index 00000000..02ef1f30
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/cirru.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/cirru",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "cirru";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/clojure.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/clojure.js
new file mode 100644
index 00000000..49f23cac
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/clojure.js
@@ -0,0 +1,97 @@
+ace.define("ace/snippets/clojure",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet comm\n\
+ (comment\n\
+ ${1}\n\
+ )\n\
+snippet condp\n\
+ (condp ${1:pred} ${2:expr}\n\
+ ${3})\n\
+snippet def\n\
+ (def ${1})\n\
+snippet defm\n\
+ (defmethod ${1:multifn} \"${2:doc-string}\" ${3:dispatch-val} [${4:args}]\n\
+ ${5})\n\
+snippet defmm\n\
+ (defmulti ${1:name} \"${2:doc-string}\" ${3:dispatch-fn})\n\
+snippet defma\n\
+ (defmacro ${1:name} \"${2:doc-string}\" ${3:dispatch-fn})\n\
+snippet defn\n\
+ (defn ${1:name} \"${2:doc-string}\" [${3:arg-list}]\n\
+ ${4})\n\
+snippet defp\n\
+ (defprotocol ${1:name}\n\
+ ${2})\n\
+snippet defr\n\
+ (defrecord ${1:name} [${2:fields}]\n\
+ ${3:protocol}\n\
+ ${4})\n\
+snippet deft\n\
+ (deftest ${1:name}\n\
+ (is (= ${2:assertion})))\n\
+ ${3})\n\
+snippet is\n\
+ (is (= ${1} ${2}))\n\
+snippet defty\n\
+ (deftype ${1:Name} [${2:fields}]\n\
+ ${3:Protocol}\n\
+ ${4})\n\
+snippet doseq\n\
+ (doseq [${1:elem} ${2:coll}]\n\
+ ${3})\n\
+snippet fn\n\
+ (fn [${1:arg-list}] ${2})\n\
+snippet if\n\
+ (if ${1:test-expr}\n\
+ ${2:then-expr}\n\
+ ${3:else-expr})\n\
+snippet if-let \n\
+ (if-let [${1:result} ${2:test-expr}]\n\
+ (${3:then-expr} $1)\n\
+ (${4:else-expr}))\n\
+snippet imp\n\
+ (:import [${1:package}])\n\
+ & {:keys [${1:keys}] :or {${2:defaults}}}\n\
+snippet let\n\
+ (let [${1:name} ${2:expr}]\n\
+ ${3})\n\
+snippet letfn\n\
+ (letfn [(${1:name) [${2:args}]\n\
+ ${3})])\n\
+snippet map\n\
+ (map ${1:func} ${2:coll})\n\
+snippet mapl\n\
+ (map #(${1:lambda}) ${2:coll})\n\
+snippet met\n\
+ (${1:name} [${2:this} ${3:args}]\n\
+ ${4})\n\
+snippet ns\n\
+ (ns ${1:name}\n\
+ ${2})\n\
+snippet dotimes\n\
+ (dotimes [_ 10]\n\
+ (time\n\
+ (dotimes [_ ${1:times}]\n\
+ ${2})))\n\
+snippet pmethod\n\
+ (${1:name} [${2:this} ${3:args}])\n\
+snippet refer\n\
+ (:refer-clojure :exclude [${1}])\n\
+snippet require\n\
+ (:require [${1:namespace} :as [${2}]])\n\
+snippet use\n\
+ (:use [${1:namespace} :only [${2}]])\n\
+snippet print\n\
+ (println ${1})\n\
+snippet reduce\n\
+ (reduce ${1:(fn [p n] ${3})} ${2})\n\
+snippet when\n\
+ (when ${1:test} ${2:body})\n\
+snippet when-let\n\
+ (when-let [${1:result} ${2:test}]\n\
+ ${3:body})\n\
+";
+exports.scope = "clojure";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/cobol.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/cobol.js
new file mode 100644
index 00000000..760727ce
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/cobol.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/cobol",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "cobol";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/coffee.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/coffee.js
new file mode 100644
index 00000000..eb1a76d7
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/coffee.js
@@ -0,0 +1,102 @@
+ace.define("ace/snippets/coffee",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# Closure loop\n\
+snippet forindo\n\
+ for ${1:name} in ${2:array}\n\
+ do ($1) ->\n\
+ ${3:// body}\n\
+# Array comprehension\n\
+snippet fora\n\
+ for ${1:name} in ${2:array}\n\
+ ${3:// body...}\n\
+# Object comprehension\n\
+snippet foro\n\
+ for ${1:key}, ${2:value} of ${3:object}\n\
+ ${4:// body...}\n\
+# Range comprehension (inclusive)\n\
+snippet forr\n\
+ for ${1:name} in [${2:start}..${3:finish}]\n\
+ ${4:// body...}\n\
+snippet forrb\n\
+ for ${1:name} in [${2:start}..${3:finish}] by ${4:step}\n\
+ ${5:// body...}\n\
+# Range comprehension (exclusive)\n\
+snippet forrex\n\
+ for ${1:name} in [${2:start}...${3:finish}]\n\
+ ${4:// body...}\n\
+snippet forrexb\n\
+ for ${1:name} in [${2:start}...${3:finish}] by ${4:step}\n\
+ ${5:// body...}\n\
+# Function\n\
+snippet fun\n\
+ (${1:args}) ->\n\
+ ${2:// body...}\n\
+# Function (bound)\n\
+snippet bfun\n\
+ (${1:args}) =>\n\
+ ${2:// body...}\n\
+# Class\n\
+snippet cla class ..\n\
+ class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\
+ ${2}\n\
+snippet cla class .. constructor: ..\n\
+ class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\
+ constructor: (${2:args}) ->\n\
+ ${3}\n\
+\n\
+ ${4}\n\
+snippet cla class .. extends ..\n\
+ class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n\
+ ${3}\n\
+snippet cla class .. extends .. constructor: ..\n\
+ class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} extends ${2:ParentClass}\n\
+ constructor: (${3:args}) ->\n\
+ ${4}\n\
+\n\
+ ${5}\n\
+# If\n\
+snippet if\n\
+ if ${1:condition}\n\
+ ${2:// body...}\n\
+# If __ Else\n\
+snippet ife\n\
+ if ${1:condition}\n\
+ ${2:// body...}\n\
+ else\n\
+ ${3:// body...}\n\
+# Else if\n\
+snippet elif\n\
+ else if ${1:condition}\n\
+ ${2:// body...}\n\
+# Ternary If\n\
+snippet ifte\n\
+ if ${1:condition} then ${2:value} else ${3:other}\n\
+# Unless\n\
+snippet unl\n\
+ ${1:action} unless ${2:condition}\n\
+# Switch\n\
+snippet swi\n\
+ switch ${1:object}\n\
+ when ${2:value}\n\
+ ${3:// body...}\n\
+\n\
+# Log\n\
+snippet log\n\
+ console.log ${1}\n\
+# Try __ Catch\n\
+snippet try\n\
+ try\n\
+ ${1}\n\
+ catch ${2:error}\n\
+ ${3}\n\
+# Require\n\
+snippet req\n\
+ ${2:$1} = require '${1:sys}'${3}\n\
+# Export\n\
+snippet exp\n\
+ ${1:root} = exports ? this\n\
+";
+exports.scope = "coffee";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/coldfusion.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/coldfusion.js
new file mode 100644
index 00000000..1a91f967
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/coldfusion.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/coldfusion",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "coldfusion";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/csharp.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/csharp.js
new file mode 100644
index 00000000..96b9174a
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/csharp.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/csharp",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "csharp";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/css.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/css.js
new file mode 100644
index 00000000..db5a8c0a
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/css.js
@@ -0,0 +1,974 @@
+ace.define("ace/snippets/css",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet .\n\
+ ${1} {\n\
+ ${2}\n\
+ }\n\
+snippet !\n\
+ !important\n\
+snippet bdi:m+\n\
+ -moz-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\n\
+snippet bdi:m\n\
+ -moz-border-image: ${1};\n\
+snippet bdrz:m\n\
+ -moz-border-radius: ${1};\n\
+snippet bxsh:m+\n\
+ -moz-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\n\
+snippet bxsh:m\n\
+ -moz-box-shadow: ${1};\n\
+snippet bdi:w+\n\
+ -webkit-border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\n\
+snippet bdi:w\n\
+ -webkit-border-image: ${1};\n\
+snippet bdrz:w\n\
+ -webkit-border-radius: ${1};\n\
+snippet bxsh:w+\n\
+ -webkit-box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\n\
+snippet bxsh:w\n\
+ -webkit-box-shadow: ${1};\n\
+snippet @f\n\
+ @font-face {\n\
+ font-family: ${1};\n\
+ src: url(${2});\n\
+ }\n\
+snippet @i\n\
+ @import url(${1});\n\
+snippet @m\n\
+ @media ${1:print} {\n\
+ ${2}\n\
+ }\n\
+snippet bg+\n\
+ background: #${1:FFF} url(${2}) ${3:0} ${4:0} ${5:no-repeat};\n\
+snippet bga\n\
+ background-attachment: ${1};\n\
+snippet bga:f\n\
+ background-attachment: fixed;\n\
+snippet bga:s\n\
+ background-attachment: scroll;\n\
+snippet bgbk\n\
+ background-break: ${1};\n\
+snippet bgbk:bb\n\
+ background-break: bounding-box;\n\
+snippet bgbk:c\n\
+ background-break: continuous;\n\
+snippet bgbk:eb\n\
+ background-break: each-box;\n\
+snippet bgcp\n\
+ background-clip: ${1};\n\
+snippet bgcp:bb\n\
+ background-clip: border-box;\n\
+snippet bgcp:cb\n\
+ background-clip: content-box;\n\
+snippet bgcp:nc\n\
+ background-clip: no-clip;\n\
+snippet bgcp:pb\n\
+ background-clip: padding-box;\n\
+snippet bgc\n\
+ background-color: #${1:FFF};\n\
+snippet bgc:t\n\
+ background-color: transparent;\n\
+snippet bgi\n\
+ background-image: url(${1});\n\
+snippet bgi:n\n\
+ background-image: none;\n\
+snippet bgo\n\
+ background-origin: ${1};\n\
+snippet bgo:bb\n\
+ background-origin: border-box;\n\
+snippet bgo:cb\n\
+ background-origin: content-box;\n\
+snippet bgo:pb\n\
+ background-origin: padding-box;\n\
+snippet bgpx\n\
+ background-position-x: ${1};\n\
+snippet bgpy\n\
+ background-position-y: ${1};\n\
+snippet bgp\n\
+ background-position: ${1:0} ${2:0};\n\
+snippet bgr\n\
+ background-repeat: ${1};\n\
+snippet bgr:n\n\
+ background-repeat: no-repeat;\n\
+snippet bgr:x\n\
+ background-repeat: repeat-x;\n\
+snippet bgr:y\n\
+ background-repeat: repeat-y;\n\
+snippet bgr:r\n\
+ background-repeat: repeat;\n\
+snippet bgz\n\
+ background-size: ${1};\n\
+snippet bgz:a\n\
+ background-size: auto;\n\
+snippet bgz:ct\n\
+ background-size: contain;\n\
+snippet bgz:cv\n\
+ background-size: cover;\n\
+snippet bg\n\
+ background: ${1};\n\
+snippet bg:ie\n\
+ filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1}',sizingMethod='${2:crop}');\n\
+snippet bg:n\n\
+ background: none;\n\
+snippet bd+\n\
+ border: ${1:1px} ${2:solid} #${3:000};\n\
+snippet bdb+\n\
+ border-bottom: ${1:1px} ${2:solid} #${3:000};\n\
+snippet bdbc\n\
+ border-bottom-color: #${1:000};\n\
+snippet bdbi\n\
+ border-bottom-image: url(${1});\n\
+snippet bdbi:n\n\
+ border-bottom-image: none;\n\
+snippet bdbli\n\
+ border-bottom-left-image: url(${1});\n\
+snippet bdbli:c\n\
+ border-bottom-left-image: continue;\n\
+snippet bdbli:n\n\
+ border-bottom-left-image: none;\n\
+snippet bdblrz\n\
+ border-bottom-left-radius: ${1};\n\
+snippet bdbri\n\
+ border-bottom-right-image: url(${1});\n\
+snippet bdbri:c\n\
+ border-bottom-right-image: continue;\n\
+snippet bdbri:n\n\
+ border-bottom-right-image: none;\n\
+snippet bdbrrz\n\
+ border-bottom-right-radius: ${1};\n\
+snippet bdbs\n\
+ border-bottom-style: ${1};\n\
+snippet bdbs:n\n\
+ border-bottom-style: none;\n\
+snippet bdbw\n\
+ border-bottom-width: ${1};\n\
+snippet bdb\n\
+ border-bottom: ${1};\n\
+snippet bdb:n\n\
+ border-bottom: none;\n\
+snippet bdbk\n\
+ border-break: ${1};\n\
+snippet bdbk:c\n\
+ border-break: close;\n\
+snippet bdcl\n\
+ border-collapse: ${1};\n\
+snippet bdcl:c\n\
+ border-collapse: collapse;\n\
+snippet bdcl:s\n\
+ border-collapse: separate;\n\
+snippet bdc\n\
+ border-color: #${1:000};\n\
+snippet bdci\n\
+ border-corner-image: url(${1});\n\
+snippet bdci:c\n\
+ border-corner-image: continue;\n\
+snippet bdci:n\n\
+ border-corner-image: none;\n\
+snippet bdf\n\
+ border-fit: ${1};\n\
+snippet bdf:c\n\
+ border-fit: clip;\n\
+snippet bdf:of\n\
+ border-fit: overwrite;\n\
+snippet bdf:ow\n\
+ border-fit: overwrite;\n\
+snippet bdf:r\n\
+ border-fit: repeat;\n\
+snippet bdf:sc\n\
+ border-fit: scale;\n\
+snippet bdf:sp\n\
+ border-fit: space;\n\
+snippet bdf:st\n\
+ border-fit: stretch;\n\
+snippet bdi\n\
+ border-image: url(${1}) ${2:0} ${3:0} ${4:0} ${5:0} ${6:stretch} ${7:stretch};\n\
+snippet bdi:n\n\
+ border-image: none;\n\
+snippet bdl+\n\
+ border-left: ${1:1px} ${2:solid} #${3:000};\n\
+snippet bdlc\n\
+ border-left-color: #${1:000};\n\
+snippet bdli\n\
+ border-left-image: url(${1});\n\
+snippet bdli:n\n\
+ border-left-image: none;\n\
+snippet bdls\n\
+ border-left-style: ${1};\n\
+snippet bdls:n\n\
+ border-left-style: none;\n\
+snippet bdlw\n\
+ border-left-width: ${1};\n\
+snippet bdl\n\
+ border-left: ${1};\n\
+snippet bdl:n\n\
+ border-left: none;\n\
+snippet bdlt\n\
+ border-length: ${1};\n\
+snippet bdlt:a\n\
+ border-length: auto;\n\
+snippet bdrz\n\
+ border-radius: ${1};\n\
+snippet bdr+\n\
+ border-right: ${1:1px} ${2:solid} #${3:000};\n\
+snippet bdrc\n\
+ border-right-color: #${1:000};\n\
+snippet bdri\n\
+ border-right-image: url(${1});\n\
+snippet bdri:n\n\
+ border-right-image: none;\n\
+snippet bdrs\n\
+ border-right-style: ${1};\n\
+snippet bdrs:n\n\
+ border-right-style: none;\n\
+snippet bdrw\n\
+ border-right-width: ${1};\n\
+snippet bdr\n\
+ border-right: ${1};\n\
+snippet bdr:n\n\
+ border-right: none;\n\
+snippet bdsp\n\
+ border-spacing: ${1};\n\
+snippet bds\n\
+ border-style: ${1};\n\
+snippet bds:ds\n\
+ border-style: dashed;\n\
+snippet bds:dtds\n\
+ border-style: dot-dash;\n\
+snippet bds:dtdtds\n\
+ border-style: dot-dot-dash;\n\
+snippet bds:dt\n\
+ border-style: dotted;\n\
+snippet bds:db\n\
+ border-style: double;\n\
+snippet bds:g\n\
+ border-style: groove;\n\
+snippet bds:h\n\
+ border-style: hidden;\n\
+snippet bds:i\n\
+ border-style: inset;\n\
+snippet bds:n\n\
+ border-style: none;\n\
+snippet bds:o\n\
+ border-style: outset;\n\
+snippet bds:r\n\
+ border-style: ridge;\n\
+snippet bds:s\n\
+ border-style: solid;\n\
+snippet bds:w\n\
+ border-style: wave;\n\
+snippet bdt+\n\
+ border-top: ${1:1px} ${2:solid} #${3:000};\n\
+snippet bdtc\n\
+ border-top-color: #${1:000};\n\
+snippet bdti\n\
+ border-top-image: url(${1});\n\
+snippet bdti:n\n\
+ border-top-image: none;\n\
+snippet bdtli\n\
+ border-top-left-image: url(${1});\n\
+snippet bdtli:c\n\
+ border-corner-image: continue;\n\
+snippet bdtli:n\n\
+ border-corner-image: none;\n\
+snippet bdtlrz\n\
+ border-top-left-radius: ${1};\n\
+snippet bdtri\n\
+ border-top-right-image: url(${1});\n\
+snippet bdtri:c\n\
+ border-top-right-image: continue;\n\
+snippet bdtri:n\n\
+ border-top-right-image: none;\n\
+snippet bdtrrz\n\
+ border-top-right-radius: ${1};\n\
+snippet bdts\n\
+ border-top-style: ${1};\n\
+snippet bdts:n\n\
+ border-top-style: none;\n\
+snippet bdtw\n\
+ border-top-width: ${1};\n\
+snippet bdt\n\
+ border-top: ${1};\n\
+snippet bdt:n\n\
+ border-top: none;\n\
+snippet bdw\n\
+ border-width: ${1};\n\
+snippet bd\n\
+ border: ${1};\n\
+snippet bd:n\n\
+ border: none;\n\
+snippet b\n\
+ bottom: ${1};\n\
+snippet b:a\n\
+ bottom: auto;\n\
+snippet bxsh+\n\
+ box-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\n\
+snippet bxsh\n\
+ box-shadow: ${1};\n\
+snippet bxsh:n\n\
+ box-shadow: none;\n\
+snippet bxz\n\
+ box-sizing: ${1};\n\
+snippet bxz:bb\n\
+ box-sizing: border-box;\n\
+snippet bxz:cb\n\
+ box-sizing: content-box;\n\
+snippet cps\n\
+ caption-side: ${1};\n\
+snippet cps:b\n\
+ caption-side: bottom;\n\
+snippet cps:t\n\
+ caption-side: top;\n\
+snippet cl\n\
+ clear: ${1};\n\
+snippet cl:b\n\
+ clear: both;\n\
+snippet cl:l\n\
+ clear: left;\n\
+snippet cl:n\n\
+ clear: none;\n\
+snippet cl:r\n\
+ clear: right;\n\
+snippet cp\n\
+ clip: ${1};\n\
+snippet cp:a\n\
+ clip: auto;\n\
+snippet cp:r\n\
+ clip: rect(${1:0} ${2:0} ${3:0} ${4:0});\n\
+snippet c\n\
+ color: #${1:000};\n\
+snippet ct\n\
+ content: ${1};\n\
+snippet ct:a\n\
+ content: attr(${1});\n\
+snippet ct:cq\n\
+ content: close-quote;\n\
+snippet ct:c\n\
+ content: counter(${1});\n\
+snippet ct:cs\n\
+ content: counters(${1});\n\
+snippet ct:ncq\n\
+ content: no-close-quote;\n\
+snippet ct:noq\n\
+ content: no-open-quote;\n\
+snippet ct:n\n\
+ content: normal;\n\
+snippet ct:oq\n\
+ content: open-quote;\n\
+snippet coi\n\
+ counter-increment: ${1};\n\
+snippet cor\n\
+ counter-reset: ${1};\n\
+snippet cur\n\
+ cursor: ${1};\n\
+snippet cur:a\n\
+ cursor: auto;\n\
+snippet cur:c\n\
+ cursor: crosshair;\n\
+snippet cur:d\n\
+ cursor: default;\n\
+snippet cur:ha\n\
+ cursor: hand;\n\
+snippet cur:he\n\
+ cursor: help;\n\
+snippet cur:m\n\
+ cursor: move;\n\
+snippet cur:p\n\
+ cursor: pointer;\n\
+snippet cur:t\n\
+ cursor: text;\n\
+snippet d\n\
+ display: ${1};\n\
+snippet d:mib\n\
+ display: -moz-inline-box;\n\
+snippet d:mis\n\
+ display: -moz-inline-stack;\n\
+snippet d:b\n\
+ display: block;\n\
+snippet d:cp\n\
+ display: compact;\n\
+snippet d:ib\n\
+ display: inline-block;\n\
+snippet d:itb\n\
+ display: inline-table;\n\
+snippet d:i\n\
+ display: inline;\n\
+snippet d:li\n\
+ display: list-item;\n\
+snippet d:n\n\
+ display: none;\n\
+snippet d:ri\n\
+ display: run-in;\n\
+snippet d:tbcp\n\
+ display: table-caption;\n\
+snippet d:tbc\n\
+ display: table-cell;\n\
+snippet d:tbclg\n\
+ display: table-column-group;\n\
+snippet d:tbcl\n\
+ display: table-column;\n\
+snippet d:tbfg\n\
+ display: table-footer-group;\n\
+snippet d:tbhg\n\
+ display: table-header-group;\n\
+snippet d:tbrg\n\
+ display: table-row-group;\n\
+snippet d:tbr\n\
+ display: table-row;\n\
+snippet d:tb\n\
+ display: table;\n\
+snippet ec\n\
+ empty-cells: ${1};\n\
+snippet ec:h\n\
+ empty-cells: hide;\n\
+snippet ec:s\n\
+ empty-cells: show;\n\
+snippet exp\n\
+ expression()\n\
+snippet fl\n\
+ float: ${1};\n\
+snippet fl:l\n\
+ float: left;\n\
+snippet fl:n\n\
+ float: none;\n\
+snippet fl:r\n\
+ float: right;\n\
+snippet f+\n\
+ font: ${1:1em} ${2:Arial},${3:sans-serif};\n\
+snippet fef\n\
+ font-effect: ${1};\n\
+snippet fef:eb\n\
+ font-effect: emboss;\n\
+snippet fef:eg\n\
+ font-effect: engrave;\n\
+snippet fef:n\n\
+ font-effect: none;\n\
+snippet fef:o\n\
+ font-effect: outline;\n\
+snippet femp\n\
+ font-emphasize-position: ${1};\n\
+snippet femp:a\n\
+ font-emphasize-position: after;\n\
+snippet femp:b\n\
+ font-emphasize-position: before;\n\
+snippet fems\n\
+ font-emphasize-style: ${1};\n\
+snippet fems:ac\n\
+ font-emphasize-style: accent;\n\
+snippet fems:c\n\
+ font-emphasize-style: circle;\n\
+snippet fems:ds\n\
+ font-emphasize-style: disc;\n\
+snippet fems:dt\n\
+ font-emphasize-style: dot;\n\
+snippet fems:n\n\
+ font-emphasize-style: none;\n\
+snippet fem\n\
+ font-emphasize: ${1};\n\
+snippet ff\n\
+ font-family: ${1};\n\
+snippet ff:c\n\
+ font-family: ${1:'Monotype Corsiva','Comic Sans MS'},cursive;\n\
+snippet ff:f\n\
+ font-family: ${1:Capitals,Impact},fantasy;\n\
+snippet ff:m\n\
+ font-family: ${1:Monaco,'Courier New'},monospace;\n\
+snippet ff:ss\n\
+ font-family: ${1:Helvetica,Arial},sans-serif;\n\
+snippet ff:s\n\
+ font-family: ${1:Georgia,'Times New Roman'},serif;\n\
+snippet fza\n\
+ font-size-adjust: ${1};\n\
+snippet fza:n\n\
+ font-size-adjust: none;\n\
+snippet fz\n\
+ font-size: ${1};\n\
+snippet fsm\n\
+ font-smooth: ${1};\n\
+snippet fsm:aw\n\
+ font-smooth: always;\n\
+snippet fsm:a\n\
+ font-smooth: auto;\n\
+snippet fsm:n\n\
+ font-smooth: never;\n\
+snippet fst\n\
+ font-stretch: ${1};\n\
+snippet fst:c\n\
+ font-stretch: condensed;\n\
+snippet fst:e\n\
+ font-stretch: expanded;\n\
+snippet fst:ec\n\
+ font-stretch: extra-condensed;\n\
+snippet fst:ee\n\
+ font-stretch: extra-expanded;\n\
+snippet fst:n\n\
+ font-stretch: normal;\n\
+snippet fst:sc\n\
+ font-stretch: semi-condensed;\n\
+snippet fst:se\n\
+ font-stretch: semi-expanded;\n\
+snippet fst:uc\n\
+ font-stretch: ultra-condensed;\n\
+snippet fst:ue\n\
+ font-stretch: ultra-expanded;\n\
+snippet fs\n\
+ font-style: ${1};\n\
+snippet fs:i\n\
+ font-style: italic;\n\
+snippet fs:n\n\
+ font-style: normal;\n\
+snippet fs:o\n\
+ font-style: oblique;\n\
+snippet fv\n\
+ font-variant: ${1};\n\
+snippet fv:n\n\
+ font-variant: normal;\n\
+snippet fv:sc\n\
+ font-variant: small-caps;\n\
+snippet fw\n\
+ font-weight: ${1};\n\
+snippet fw:b\n\
+ font-weight: bold;\n\
+snippet fw:br\n\
+ font-weight: bolder;\n\
+snippet fw:lr\n\
+ font-weight: lighter;\n\
+snippet fw:n\n\
+ font-weight: normal;\n\
+snippet f\n\
+ font: ${1};\n\
+snippet h\n\
+ height: ${1};\n\
+snippet h:a\n\
+ height: auto;\n\
+snippet l\n\
+ left: ${1};\n\
+snippet l:a\n\
+ left: auto;\n\
+snippet lts\n\
+ letter-spacing: ${1};\n\
+snippet lh\n\
+ line-height: ${1};\n\
+snippet lisi\n\
+ list-style-image: url(${1});\n\
+snippet lisi:n\n\
+ list-style-image: none;\n\
+snippet lisp\n\
+ list-style-position: ${1};\n\
+snippet lisp:i\n\
+ list-style-position: inside;\n\
+snippet lisp:o\n\
+ list-style-position: outside;\n\
+snippet list\n\
+ list-style-type: ${1};\n\
+snippet list:c\n\
+ list-style-type: circle;\n\
+snippet list:dclz\n\
+ list-style-type: decimal-leading-zero;\n\
+snippet list:dc\n\
+ list-style-type: decimal;\n\
+snippet list:d\n\
+ list-style-type: disc;\n\
+snippet list:lr\n\
+ list-style-type: lower-roman;\n\
+snippet list:n\n\
+ list-style-type: none;\n\
+snippet list:s\n\
+ list-style-type: square;\n\
+snippet list:ur\n\
+ list-style-type: upper-roman;\n\
+snippet lis\n\
+ list-style: ${1};\n\
+snippet lis:n\n\
+ list-style: none;\n\
+snippet mb\n\
+ margin-bottom: ${1};\n\
+snippet mb:a\n\
+ margin-bottom: auto;\n\
+snippet ml\n\
+ margin-left: ${1};\n\
+snippet ml:a\n\
+ margin-left: auto;\n\
+snippet mr\n\
+ margin-right: ${1};\n\
+snippet mr:a\n\
+ margin-right: auto;\n\
+snippet mt\n\
+ margin-top: ${1};\n\
+snippet mt:a\n\
+ margin-top: auto;\n\
+snippet m\n\
+ margin: ${1};\n\
+snippet m:4\n\
+ margin: ${1:0} ${2:0} ${3:0} ${4:0};\n\
+snippet m:3\n\
+ margin: ${1:0} ${2:0} ${3:0};\n\
+snippet m:2\n\
+ margin: ${1:0} ${2:0};\n\
+snippet m:0\n\
+ margin: 0;\n\
+snippet m:a\n\
+ margin: auto;\n\
+snippet mah\n\
+ max-height: ${1};\n\
+snippet mah:n\n\
+ max-height: none;\n\
+snippet maw\n\
+ max-width: ${1};\n\
+snippet maw:n\n\
+ max-width: none;\n\
+snippet mih\n\
+ min-height: ${1};\n\
+snippet miw\n\
+ min-width: ${1};\n\
+snippet op\n\
+ opacity: ${1};\n\
+snippet op:ie\n\
+ filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100});\n\
+snippet op:ms\n\
+ -ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=${1:100})';\n\
+snippet orp\n\
+ orphans: ${1};\n\
+snippet o+\n\
+ outline: ${1:1px} ${2:solid} #${3:000};\n\
+snippet oc\n\
+ outline-color: ${1:#000};\n\
+snippet oc:i\n\
+ outline-color: invert;\n\
+snippet oo\n\
+ outline-offset: ${1};\n\
+snippet os\n\
+ outline-style: ${1};\n\
+snippet ow\n\
+ outline-width: ${1};\n\
+snippet o\n\
+ outline: ${1};\n\
+snippet o:n\n\
+ outline: none;\n\
+snippet ovs\n\
+ overflow-style: ${1};\n\
+snippet ovs:a\n\
+ overflow-style: auto;\n\
+snippet ovs:mq\n\
+ overflow-style: marquee;\n\
+snippet ovs:mv\n\
+ overflow-style: move;\n\
+snippet ovs:p\n\
+ overflow-style: panner;\n\
+snippet ovs:s\n\
+ overflow-style: scrollbar;\n\
+snippet ovx\n\
+ overflow-x: ${1};\n\
+snippet ovx:a\n\
+ overflow-x: auto;\n\
+snippet ovx:h\n\
+ overflow-x: hidden;\n\
+snippet ovx:s\n\
+ overflow-x: scroll;\n\
+snippet ovx:v\n\
+ overflow-x: visible;\n\
+snippet ovy\n\
+ overflow-y: ${1};\n\
+snippet ovy:a\n\
+ overflow-y: auto;\n\
+snippet ovy:h\n\
+ overflow-y: hidden;\n\
+snippet ovy:s\n\
+ overflow-y: scroll;\n\
+snippet ovy:v\n\
+ overflow-y: visible;\n\
+snippet ov\n\
+ overflow: ${1};\n\
+snippet ov:a\n\
+ overflow: auto;\n\
+snippet ov:h\n\
+ overflow: hidden;\n\
+snippet ov:s\n\
+ overflow: scroll;\n\
+snippet ov:v\n\
+ overflow: visible;\n\
+snippet pb\n\
+ padding-bottom: ${1};\n\
+snippet pl\n\
+ padding-left: ${1};\n\
+snippet pr\n\
+ padding-right: ${1};\n\
+snippet pt\n\
+ padding-top: ${1};\n\
+snippet p\n\
+ padding: ${1};\n\
+snippet p:4\n\
+ padding: ${1:0} ${2:0} ${3:0} ${4:0};\n\
+snippet p:3\n\
+ padding: ${1:0} ${2:0} ${3:0};\n\
+snippet p:2\n\
+ padding: ${1:0} ${2:0};\n\
+snippet p:0\n\
+ padding: 0;\n\
+snippet pgba\n\
+ page-break-after: ${1};\n\
+snippet pgba:aw\n\
+ page-break-after: always;\n\
+snippet pgba:a\n\
+ page-break-after: auto;\n\
+snippet pgba:l\n\
+ page-break-after: left;\n\
+snippet pgba:r\n\
+ page-break-after: right;\n\
+snippet pgbb\n\
+ page-break-before: ${1};\n\
+snippet pgbb:aw\n\
+ page-break-before: always;\n\
+snippet pgbb:a\n\
+ page-break-before: auto;\n\
+snippet pgbb:l\n\
+ page-break-before: left;\n\
+snippet pgbb:r\n\
+ page-break-before: right;\n\
+snippet pgbi\n\
+ page-break-inside: ${1};\n\
+snippet pgbi:a\n\
+ page-break-inside: auto;\n\
+snippet pgbi:av\n\
+ page-break-inside: avoid;\n\
+snippet pos\n\
+ position: ${1};\n\
+snippet pos:a\n\
+ position: absolute;\n\
+snippet pos:f\n\
+ position: fixed;\n\
+snippet pos:r\n\
+ position: relative;\n\
+snippet pos:s\n\
+ position: static;\n\
+snippet q\n\
+ quotes: ${1};\n\
+snippet q:en\n\
+ quotes: '\\201C' '\\201D' '\\2018' '\\2019';\n\
+snippet q:n\n\
+ quotes: none;\n\
+snippet q:ru\n\
+ quotes: '\\00AB' '\\00BB' '\\201E' '\\201C';\n\
+snippet rz\n\
+ resize: ${1};\n\
+snippet rz:b\n\
+ resize: both;\n\
+snippet rz:h\n\
+ resize: horizontal;\n\
+snippet rz:n\n\
+ resize: none;\n\
+snippet rz:v\n\
+ resize: vertical;\n\
+snippet r\n\
+ right: ${1};\n\
+snippet r:a\n\
+ right: auto;\n\
+snippet tbl\n\
+ table-layout: ${1};\n\
+snippet tbl:a\n\
+ table-layout: auto;\n\
+snippet tbl:f\n\
+ table-layout: fixed;\n\
+snippet tal\n\
+ text-align-last: ${1};\n\
+snippet tal:a\n\
+ text-align-last: auto;\n\
+snippet tal:c\n\
+ text-align-last: center;\n\
+snippet tal:l\n\
+ text-align-last: left;\n\
+snippet tal:r\n\
+ text-align-last: right;\n\
+snippet ta\n\
+ text-align: ${1};\n\
+snippet ta:c\n\
+ text-align: center;\n\
+snippet ta:l\n\
+ text-align: left;\n\
+snippet ta:r\n\
+ text-align: right;\n\
+snippet td\n\
+ text-decoration: ${1};\n\
+snippet td:l\n\
+ text-decoration: line-through;\n\
+snippet td:n\n\
+ text-decoration: none;\n\
+snippet td:o\n\
+ text-decoration: overline;\n\
+snippet td:u\n\
+ text-decoration: underline;\n\
+snippet te\n\
+ text-emphasis: ${1};\n\
+snippet te:ac\n\
+ text-emphasis: accent;\n\
+snippet te:a\n\
+ text-emphasis: after;\n\
+snippet te:b\n\
+ text-emphasis: before;\n\
+snippet te:c\n\
+ text-emphasis: circle;\n\
+snippet te:ds\n\
+ text-emphasis: disc;\n\
+snippet te:dt\n\
+ text-emphasis: dot;\n\
+snippet te:n\n\
+ text-emphasis: none;\n\
+snippet th\n\
+ text-height: ${1};\n\
+snippet th:a\n\
+ text-height: auto;\n\
+snippet th:f\n\
+ text-height: font-size;\n\
+snippet th:m\n\
+ text-height: max-size;\n\
+snippet th:t\n\
+ text-height: text-size;\n\
+snippet ti\n\
+ text-indent: ${1};\n\
+snippet ti:-\n\
+ text-indent: -9999px;\n\
+snippet tj\n\
+ text-justify: ${1};\n\
+snippet tj:a\n\
+ text-justify: auto;\n\
+snippet tj:d\n\
+ text-justify: distribute;\n\
+snippet tj:ic\n\
+ text-justify: inter-cluster;\n\
+snippet tj:ii\n\
+ text-justify: inter-ideograph;\n\
+snippet tj:iw\n\
+ text-justify: inter-word;\n\
+snippet tj:k\n\
+ text-justify: kashida;\n\
+snippet tj:t\n\
+ text-justify: tibetan;\n\
+snippet to+\n\
+ text-outline: ${1:0} ${2:0} #${3:000};\n\
+snippet to\n\
+ text-outline: ${1};\n\
+snippet to:n\n\
+ text-outline: none;\n\
+snippet tr\n\
+ text-replace: ${1};\n\
+snippet tr:n\n\
+ text-replace: none;\n\
+snippet tsh+\n\
+ text-shadow: ${1:0} ${2:0} ${3:0} #${4:000};\n\
+snippet tsh\n\
+ text-shadow: ${1};\n\
+snippet tsh:n\n\
+ text-shadow: none;\n\
+snippet tt\n\
+ text-transform: ${1};\n\
+snippet tt:c\n\
+ text-transform: capitalize;\n\
+snippet tt:l\n\
+ text-transform: lowercase;\n\
+snippet tt:n\n\
+ text-transform: none;\n\
+snippet tt:u\n\
+ text-transform: uppercase;\n\
+snippet tw\n\
+ text-wrap: ${1};\n\
+snippet tw:no\n\
+ text-wrap: none;\n\
+snippet tw:n\n\
+ text-wrap: normal;\n\
+snippet tw:s\n\
+ text-wrap: suppress;\n\
+snippet tw:u\n\
+ text-wrap: unrestricted;\n\
+snippet t\n\
+ top: ${1};\n\
+snippet t:a\n\
+ top: auto;\n\
+snippet va\n\
+ vertical-align: ${1};\n\
+snippet va:bl\n\
+ vertical-align: baseline;\n\
+snippet va:b\n\
+ vertical-align: bottom;\n\
+snippet va:m\n\
+ vertical-align: middle;\n\
+snippet va:sub\n\
+ vertical-align: sub;\n\
+snippet va:sup\n\
+ vertical-align: super;\n\
+snippet va:tb\n\
+ vertical-align: text-bottom;\n\
+snippet va:tt\n\
+ vertical-align: text-top;\n\
+snippet va:t\n\
+ vertical-align: top;\n\
+snippet v\n\
+ visibility: ${1};\n\
+snippet v:c\n\
+ visibility: collapse;\n\
+snippet v:h\n\
+ visibility: hidden;\n\
+snippet v:v\n\
+ visibility: visible;\n\
+snippet whsc\n\
+ white-space-collapse: ${1};\n\
+snippet whsc:ba\n\
+ white-space-collapse: break-all;\n\
+snippet whsc:bs\n\
+ white-space-collapse: break-strict;\n\
+snippet whsc:k\n\
+ white-space-collapse: keep-all;\n\
+snippet whsc:l\n\
+ white-space-collapse: loose;\n\
+snippet whsc:n\n\
+ white-space-collapse: normal;\n\
+snippet whs\n\
+ white-space: ${1};\n\
+snippet whs:n\n\
+ white-space: normal;\n\
+snippet whs:nw\n\
+ white-space: nowrap;\n\
+snippet whs:pl\n\
+ white-space: pre-line;\n\
+snippet whs:pw\n\
+ white-space: pre-wrap;\n\
+snippet whs:p\n\
+ white-space: pre;\n\
+snippet wid\n\
+ widows: ${1};\n\
+snippet w\n\
+ width: ${1};\n\
+snippet w:a\n\
+ width: auto;\n\
+snippet wob\n\
+ word-break: ${1};\n\
+snippet wob:ba\n\
+ word-break: break-all;\n\
+snippet wob:bs\n\
+ word-break: break-strict;\n\
+snippet wob:k\n\
+ word-break: keep-all;\n\
+snippet wob:l\n\
+ word-break: loose;\n\
+snippet wob:n\n\
+ word-break: normal;\n\
+snippet wos\n\
+ word-spacing: ${1};\n\
+snippet wow\n\
+ word-wrap: ${1};\n\
+snippet wow:no\n\
+ word-wrap: none;\n\
+snippet wow:n\n\
+ word-wrap: normal;\n\
+snippet wow:s\n\
+ word-wrap: suppress;\n\
+snippet wow:u\n\
+ word-wrap: unrestricted;\n\
+snippet z\n\
+ z-index: ${1};\n\
+snippet z:a\n\
+ z-index: auto;\n\
+snippet zoo\n\
+ zoom: 1;\n\
+";
+exports.scope = "css";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/curly.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/curly.js
new file mode 100644
index 00000000..1b2b6873
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/curly.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/curly",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "curly";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/d.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/d.js
new file mode 100644
index 00000000..729741cc
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/d.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/d",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "d";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/dart.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/dart.js
new file mode 100644
index 00000000..e96cc5d2
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/dart.js
@@ -0,0 +1,90 @@
+ace.define("ace/snippets/dart",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet lib\n\
+ library ${1};\n\
+ ${2}\n\
+snippet im\n\
+ import '${1}';\n\
+ ${2}\n\
+snippet pa\n\
+ part '${1}';\n\
+ ${2}\n\
+snippet pao\n\
+ part of ${1};\n\
+ ${2}\n\
+snippet main\n\
+ void main() {\n\
+ ${1:/* code */}\n\
+ }\n\
+snippet st\n\
+ static ${1}\n\
+snippet fi\n\
+ final ${1}\n\
+snippet re\n\
+ return ${1}\n\
+snippet br\n\
+ break;\n\
+snippet th\n\
+ throw ${1}\n\
+snippet cl\n\
+ class ${1:`Filename(\"\", \"untitled\")`} ${2}\n\
+snippet imp\n\
+ implements ${1}\n\
+snippet ext\n\
+ extends ${1}\n\
+snippet if\n\
+ if (${1:true}) {\n\
+ ${2}\n\
+ }\n\
+snippet ife\n\
+ if (${1:true}) {\n\
+ ${2}\n\
+ } else {\n\
+ ${3}\n\
+ }\n\
+snippet el\n\
+ else\n\
+snippet sw\n\
+ switch (${1}) {\n\
+ ${2}\n\
+ }\n\
+snippet cs\n\
+ case ${1}:\n\
+ ${2}\n\
+snippet de\n\
+ default:\n\
+ ${1}\n\
+snippet for\n\
+ for (var ${2:i} = 0, len = ${1:things}.length; $2 < len; ${3:++}$2) {\n\
+ ${4:$1[$2]}\n\
+ }\n\
+snippet fore\n\
+ for (final ${2:item} in ${1:itemList}) {\n\
+ ${3:/* code */}\n\
+ }\n\
+snippet wh\n\
+ while (${1:/* condition */}) {\n\
+ ${2:/* code */}\n\
+ }\n\
+snippet dowh\n\
+ do {\n\
+ ${2:/* code */}\n\
+ } while (${1:/* condition */});\n\
+snippet as\n\
+ assert(${1:/* condition */});\n\
+snippet try\n\
+ try {\n\
+ ${2}\n\
+ } catch (${1:Exception e}) {\n\
+ }\n\
+snippet tryf\n\
+ try {\n\
+ ${2}\n\
+ } catch (${1:Exception e}) {\n\
+ } finally {\n\
+ }\n\
+";
+exports.scope = "dart";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/diff.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/diff.js
new file mode 100644
index 00000000..8fe075ec
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/diff.js
@@ -0,0 +1,18 @@
+ace.define("ace/snippets/diff",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# DEP-3 (http://dep.debian.net/deps/dep3/) style patch header\n\
+snippet header DEP-3 style header\n\
+ Description: ${1}\n\
+ Origin: ${2:vendor|upstream|other}, ${3:url of the original patch}\n\
+ Bug: ${4:url in upstream bugtracker}\n\
+ Forwarded: ${5:no|not-needed|url}\n\
+ Author: ${6:`g:snips_author`}\n\
+ Reviewed-by: ${7:name and email}\n\
+ Last-Update: ${8:`strftime(\"%Y-%m-%d\")`}\n\
+ Applied-Upstream: ${9:upstream version|url|commit}\n\
+\n\
+";
+exports.scope = "diff";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/django.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/django.js
new file mode 100644
index 00000000..c1dacbed
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/django.js
@@ -0,0 +1,115 @@
+ace.define("ace/snippets/django",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# Model Fields\n\
+\n\
+# Note: Optional arguments are using defaults that match what Django will use\n\
+# as a default, e.g. with max_length fields. Doing this as a form of self\n\
+# documentation and to make it easy to know whether you should override the\n\
+# default or not.\n\
+\n\
+# Note: Optional arguments that are booleans will use the opposite since you\n\
+# can either not specify them, or override them, e.g. auto_now_add=False.\n\
+\n\
+snippet auto\n\
+ ${1:FIELDNAME} = models.AutoField(${2})\n\
+snippet bool\n\
+ ${1:FIELDNAME} = models.BooleanField(${2:default=True})\n\
+snippet char\n\
+ ${1:FIELDNAME} = models.CharField(max_length=${2}${3:, blank=True})\n\
+snippet comma\n\
+ ${1:FIELDNAME} = models.CommaSeparatedIntegerField(max_length=${2}${3:, blank=True})\n\
+snippet date\n\
+ ${1:FIELDNAME} = models.DateField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})\n\
+snippet datetime\n\
+ ${1:FIELDNAME} = models.DateTimeField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})\n\
+snippet decimal\n\
+ ${1:FIELDNAME} = models.DecimalField(max_digits=${2}, decimal_places=${3})\n\
+snippet email\n\
+ ${1:FIELDNAME} = models.EmailField(max_length=${2:75}${3:, blank=True})\n\
+snippet file\n\
+ ${1:FIELDNAME} = models.FileField(upload_to=${2:path/for/upload}${3:, max_length=100})\n\
+snippet filepath\n\
+ ${1:FIELDNAME} = models.FilePathField(path=${2:\"/abs/path/to/dir\"}${3:, max_length=100}${4:, match=\"*.ext\"}${5:, recursive=True}${6:, blank=True, })\n\
+snippet float\n\
+ ${1:FIELDNAME} = models.FloatField(${2})\n\
+snippet image\n\
+ ${1:FIELDNAME} = models.ImageField(upload_to=${2:path/for/upload}${3:, height_field=height, width_field=width}${4:, max_length=100})\n\
+snippet int\n\
+ ${1:FIELDNAME} = models.IntegerField(${2})\n\
+snippet ip\n\
+ ${1:FIELDNAME} = models.IPAddressField(${2})\n\
+snippet nullbool\n\
+ ${1:FIELDNAME} = models.NullBooleanField(${2})\n\
+snippet posint\n\
+ ${1:FIELDNAME} = models.PositiveIntegerField(${2})\n\
+snippet possmallint\n\
+ ${1:FIELDNAME} = models.PositiveSmallIntegerField(${2})\n\
+snippet slug\n\
+ ${1:FIELDNAME} = models.SlugField(max_length=${2:50}${3:, blank=True})\n\
+snippet smallint\n\
+ ${1:FIELDNAME} = models.SmallIntegerField(${2})\n\
+snippet text\n\
+ ${1:FIELDNAME} = models.TextField(${2:blank=True})\n\
+snippet time\n\
+ ${1:FIELDNAME} = models.TimeField(${2:auto_now_add=True, auto_now=True}${3:, blank=True, null=True})\n\
+snippet url\n\
+ ${1:FIELDNAME} = models.URLField(${2:verify_exists=False}${3:, max_length=200}${4:, blank=True})\n\
+snippet xml\n\
+ ${1:FIELDNAME} = models.XMLField(schema_path=${2:None}${3:, blank=True})\n\
+# Relational Fields\n\
+snippet fk\n\
+ ${1:FIELDNAME} = models.ForeignKey(${2:OtherModel}${3:, related_name=''}${4:, limit_choices_to=}${5:, to_field=''})\n\
+snippet m2m\n\
+ ${1:FIELDNAME} = models.ManyToManyField(${2:OtherModel}${3:, related_name=''}${4:, limit_choices_to=}${5:, symmetrical=False}${6:, through=''}${7:, db_table=''})\n\
+snippet o2o\n\
+ ${1:FIELDNAME} = models.OneToOneField(${2:OtherModel}${3:, parent_link=True}${4:, related_name=''}${5:, limit_choices_to=}${6:, to_field=''})\n\
+\n\
+# Code Skeletons\n\
+\n\
+snippet form\n\
+ class ${1:FormName}(forms.Form):\n\
+ \"\"\"${2:docstring}\"\"\"\n\
+ ${3}\n\
+\n\
+snippet model\n\
+ class ${1:ModelName}(models.Model):\n\
+ \"\"\"${2:docstring}\"\"\"\n\
+ ${3}\n\
+ \n\
+ class Meta:\n\
+ ${4}\n\
+ \n\
+ def __unicode__(self):\n\
+ ${5}\n\
+ \n\
+ def save(self, force_insert=False, force_update=False):\n\
+ ${6}\n\
+ \n\
+ @models.permalink\n\
+ def get_absolute_url(self):\n\
+ return ('${7:view_or_url_name}' ${8})\n\
+\n\
+snippet modeladmin\n\
+ class ${1:ModelName}Admin(admin.ModelAdmin):\n\
+ ${2}\n\
+ \n\
+ admin.site.register($1, $1Admin)\n\
+ \n\
+snippet tabularinline\n\
+ class ${1:ModelName}Inline(admin.TabularInline):\n\
+ model = $1\n\
+\n\
+snippet stackedinline\n\
+ class ${1:ModelName}Inline(admin.StackedInline):\n\
+ model = $1\n\
+\n\
+snippet r2r\n\
+ return render_to_response('${1:template.html}', {\n\
+ ${2}\n\
+ }${3:, context_instance=RequestContext(request)}\n\
+ )\n\
+";
+exports.scope = "django";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/dockerfile.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/dockerfile.js
new file mode 100644
index 00000000..981cee8a
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/dockerfile.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/dockerfile",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "dockerfile";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/dot.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/dot.js
new file mode 100644
index 00000000..3a09fc77
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/dot.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/dot",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "dot";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/drools.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/drools.js
new file mode 100644
index 00000000..a8dd859a
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/drools.js
@@ -0,0 +1,26 @@
+ace.define("ace/snippets/drools",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "\n\
+snippet rule\n\
+ rule \"${1?:rule_name}\"\n\
+ when\n\
+ ${2:// when...} \n\
+ then\n\
+ ${3:// then...}\n\
+ end\n\
+\n\
+snippet query\n\
+ query ${1?:query_name}\n\
+ ${2:// find} \n\
+ end\n\
+ \n\
+snippet declare\n\
+ declare ${1?:type_name}\n\
+ ${2:// attributes} \n\
+ end\n\
+\n\
+";
+exports.scope = "drools";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/eiffel.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/eiffel.js
new file mode 100644
index 00000000..25672785
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/eiffel.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/eiffel",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "eiffel";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/ejs.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/ejs.js
new file mode 100644
index 00000000..fd38fa09
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/ejs.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/ejs",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "ejs";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/elixir.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/elixir.js
new file mode 100644
index 00000000..d9326275
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/elixir.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/elixir",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/elm.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/elm.js
new file mode 100644
index 00000000..a9d06b59
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/elm.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/elm",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "elm";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/erlang.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/erlang.js
new file mode 100644
index 00000000..d04ee117
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/erlang.js
@@ -0,0 +1,167 @@
+ace.define("ace/snippets/erlang",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# module and export all\n\
+snippet mod\n\
+ -module(${1:`Filename('', 'my')`}).\n\
+ \n\
+ -compile([export_all]).\n\
+ \n\
+ start() ->\n\
+ ${2}\n\
+ \n\
+ stop() ->\n\
+ ok.\n\
+# define directive\n\
+snippet def\n\
+ -define(${1:macro}, ${2:body}).${3}\n\
+# export directive\n\
+snippet exp\n\
+ -export([${1:function}/${2:arity}]).\n\
+# include directive\n\
+snippet inc\n\
+ -include(\"${1:file}\").${2}\n\
+# behavior directive\n\
+snippet beh\n\
+ -behaviour(${1:behaviour}).${2}\n\
+# if expression\n\
+snippet if\n\
+ if\n\
+ ${1:guard} ->\n\
+ ${2:body}\n\
+ end\n\
+# case expression\n\
+snippet case\n\
+ case ${1:expression} of\n\
+ ${2:pattern} ->\n\
+ ${3:body};\n\
+ end\n\
+# anonymous function\n\
+snippet fun\n\
+ fun (${1:Parameters}) -> ${2:body} end${3}\n\
+# try...catch\n\
+snippet try\n\
+ try\n\
+ ${1}\n\
+ catch\n\
+ ${2:_:_} -> ${3:got_some_exception}\n\
+ end\n\
+# record directive\n\
+snippet rec\n\
+ -record(${1:record}, {\n\
+ ${2:field}=${3:value}}).${4}\n\
+# todo comment\n\
+snippet todo\n\
+ %% TODO: ${1}\n\
+## Snippets below (starting with '%') are in EDoc format.\n\
+## See http://www.erlang.org/doc/apps/edoc/chapter.html#id56887 for more details\n\
+# doc comment\n\
+snippet %d\n\
+ %% @doc ${1}\n\
+# end of doc comment\n\
+snippet %e\n\
+ %% @end\n\
+# specification comment\n\
+snippet %s\n\
+ %% @spec ${1}\n\
+# private function marker\n\
+snippet %p\n\
+ %% @private\n\
+# OTP application\n\
+snippet application\n\
+ -module(${1:`Filename('', 'my')`}).\n\
+\n\
+ -behaviour(application).\n\
+\n\
+ -export([start/2, stop/1]).\n\
+\n\
+ start(_Type, _StartArgs) ->\n\
+ case ${2:root_supervisor}:start_link() of\n\
+ {ok, Pid} ->\n\
+ {ok, Pid};\n\
+ Other ->\n\
+ {error, Other}\n\
+ end.\n\
+\n\
+ stop(_State) ->\n\
+ ok. \n\
+# OTP supervisor\n\
+snippet supervisor\n\
+ -module(${1:`Filename('', 'my')`}).\n\
+\n\
+ -behaviour(supervisor).\n\
+\n\
+ %% API\n\
+ -export([start_link/0]).\n\
+\n\
+ %% Supervisor callbacks\n\
+ -export([init/1]).\n\
+\n\
+ -define(SERVER, ?MODULE).\n\
+\n\
+ start_link() ->\n\
+ supervisor:start_link({local, ?SERVER}, ?MODULE, []).\n\
+\n\
+ init([]) ->\n\
+ Server = {${2:my_server}, {$2, start_link, []},\n\
+ permanent, 2000, worker, [$2]},\n\
+ Children = [Server],\n\
+ RestartStrategy = {one_for_one, 0, 1},\n\
+ {ok, {RestartStrategy, Children}}.\n\
+# OTP gen_server\n\
+snippet gen_server\n\
+ -module(${1:`Filename('', 'my')`}).\n\
+\n\
+ -behaviour(gen_server).\n\
+\n\
+ %% API\n\
+ -export([\n\
+ start_link/0\n\
+ ]).\n\
+\n\
+ %% gen_server callbacks\n\
+ -export([init/1, handle_call/3, handle_cast/2, handle_info/2,\n\
+ terminate/2, code_change/3]).\n\
+\n\
+ -define(SERVER, ?MODULE).\n\
+\n\
+ -record(state, {}).\n\
+\n\
+ %%%===================================================================\n\
+ %%% API\n\
+ %%%===================================================================\n\
+\n\
+ start_link() ->\n\
+ gen_server:start_link({local, ?SERVER}, ?MODULE, [], []).\n\
+\n\
+ %%%===================================================================\n\
+ %%% gen_server callbacks\n\
+ %%%===================================================================\n\
+\n\
+ init([]) ->\n\
+ {ok, #state{}}.\n\
+\n\
+ handle_call(_Request, _From, State) ->\n\
+ Reply = ok,\n\
+ {reply, Reply, State}.\n\
+\n\
+ handle_cast(_Msg, State) ->\n\
+ {noreply, State}.\n\
+\n\
+ handle_info(_Info, State) ->\n\
+ {noreply, State}.\n\
+\n\
+ terminate(_Reason, _State) ->\n\
+ ok.\n\
+\n\
+ code_change(_OldVsn, State, _Extra) ->\n\
+ {ok, State}.\n\
+\n\
+ %%%===================================================================\n\
+ %%% Internal functions\n\
+ %%%===================================================================\n\
+\n\
+";
+exports.scope = "erlang";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/forth.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/forth.js
new file mode 100644
index 00000000..afb1f8a4
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/forth.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/forth",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "forth";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/fortran.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/fortran.js
new file mode 100644
index 00000000..b4605929
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/fortran.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/fortran",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "fortran";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/ftl.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/ftl.js
new file mode 100644
index 00000000..3b53ad41
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/ftl.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/ftl",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "ftl";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/gcode.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/gcode.js
new file mode 100644
index 00000000..0ed4a102
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/gcode.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/gcode",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "gcode";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/gherkin.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/gherkin.js
new file mode 100644
index 00000000..20446471
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/gherkin.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/gherkin",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "gherkin";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/gitignore.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/gitignore.js
new file mode 100644
index 00000000..6da54aa5
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/gitignore.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/gitignore",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "gitignore";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/glsl.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/glsl.js
new file mode 100644
index 00000000..bb8e40d8
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/glsl.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/glsl",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "glsl";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/gobstones.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/gobstones.js
new file mode 100644
index 00000000..4e36e531
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/gobstones.js
@@ -0,0 +1,41 @@
+ace.define("ace/snippets/gobstones",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# Procedure\n\
+snippet proc\n\
+ procedure ${1?:name}(${2:argument}) {\n\
+ ${3:// body...}\n\
+ }\n\
+\n\
+# Function\n\
+snippet fun\n\
+ function ${1?:name}(${2:argument}) {\n\
+ return ${3:// body...}\n\
+ }\n\
+\n\
+# Repeat\n\
+snippet rep\n\
+ repeat ${1?:times} {\n\
+ ${2:// body...}\n\
+ }\n\
+\n\
+# For\n\
+snippet for\n\
+ foreach ${1?:e} in ${2?:list} {\n\
+ ${3:// body...} \n\
+ }\n\
+\n\
+# If\n\
+snippet if\n\
+ if (${1?:condition}) {\n\
+ ${3:// body...} \n\
+ }\n\
+\n\
+# While\n\
+ while (${1?:condition}) {\n\
+ ${2:// body...} \n\
+ }\n\
+";
+exports.scope = "gobstones";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/golang.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/golang.js
new file mode 100644
index 00000000..0a2411d5
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/golang.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/golang",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "golang";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/graphqlschema.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/graphqlschema.js
new file mode 100644
index 00000000..6b1e49f9
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/graphqlschema.js
@@ -0,0 +1,39 @@
+ace.define("ace/snippets/graphqlschema",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# Type Snippet\n\
+trigger type\n\
+snippet type\n\
+ type ${1:type_name} {\n\
+ ${2:type_siblings}\n\
+ }\n\
+\n\
+# Input Snippet\n\
+trigger input\n\
+snippet input\n\
+ input ${1:input_name} {\n\
+ ${2:input_siblings}\n\
+ }\n\
+\n\
+# Interface Snippet\n\
+trigger interface\n\
+snippet interface\n\
+ interface ${1:interface_name} {\n\
+ ${2:interface_siblings}\n\
+ }\n\
+\n\
+# Interface Snippet\n\
+trigger union\n\
+snippet union\n\
+ union ${1:union_name} = ${2:type} | ${3: type}\n\
+\n\
+# Enum Snippet\n\
+trigger enum\n\
+snippet enum\n\
+ enum ${1:enum_name} {\n\
+ ${2:enum_siblings}\n\
+ }\n\
+";
+exports.scope = "graphqlschema";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/groovy.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/groovy.js
new file mode 100644
index 00000000..ddeab2c8
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/groovy.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/groovy",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "groovy";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/haml.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/haml.js
new file mode 100644
index 00000000..2d1c68aa
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/haml.js
@@ -0,0 +1,27 @@
+ace.define("ace/snippets/haml",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet t\n\
+ %table\n\
+ %tr\n\
+ %th\n\
+ ${1:headers}\n\
+ %tr\n\
+ %td\n\
+ ${2:headers}\n\
+snippet ul\n\
+ %ul\n\
+ %li\n\
+ ${1:item}\n\
+ %li\n\
+snippet =rp\n\
+ = render :partial => '${1:partial}'\n\
+snippet =rpl\n\
+ = render :partial => '${1:partial}', :locals => {}\n\
+snippet =rpc\n\
+ = render :partial => '${1:partial}', :collection => @$1\n\
+\n\
+";
+exports.scope = "haml";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/handlebars.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/handlebars.js
new file mode 100644
index 00000000..1764b754
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/handlebars.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/handlebars",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "handlebars";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/haskell.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/haskell.js
new file mode 100644
index 00000000..2bd8b5af
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/haskell.js
@@ -0,0 +1,89 @@
+ace.define("ace/snippets/haskell",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet lang\n\
+ {-# LANGUAGE ${1:OverloadedStrings} #-}\n\
+snippet info\n\
+ -- |\n\
+ -- Module : ${1:Module.Namespace}\n\
+ -- Copyright : ${2:Author} ${3:2011-2012}\n\
+ -- License : ${4:BSD3}\n\
+ --\n\
+ -- Maintainer : ${5:email@something.com}\n\
+ -- Stability : ${6:experimental}\n\
+ -- Portability : ${7:unknown}\n\
+ --\n\
+ -- ${8:Description}\n\
+ --\n\
+snippet import\n\
+ import ${1:Data.Text}\n\
+snippet import2\n\
+ import ${1:Data.Text} (${2:head})\n\
+snippet importq\n\
+ import qualified ${1:Data.Text} as ${2:T}\n\
+snippet inst\n\
+ instance ${1:Monoid} ${2:Type} where\n\
+ ${3}\n\
+snippet type\n\
+ type ${1:Type} = ${2:Type}\n\
+snippet data\n\
+ data ${1:Type} = ${2:$1} ${3:Int}\n\
+snippet newtype\n\
+ newtype ${1:Type} = ${2:$1} ${3:Int}\n\
+snippet class\n\
+ class ${1:Class} a where\n\
+ ${2}\n\
+snippet module\n\
+ module `substitute(substitute(expand('%:r'), '[/\\\\]','.','g'),'^\\%(\\l*\\.\\)\\?','','')` (\n\
+ ) where\n\
+ `expand('%') =~ 'Main' ? \"\\n\\nmain = do\\n print \\\"hello world\\\"\" : \"\"`\n\
+\n\
+snippet const\n\
+ ${1:name} :: ${2:a}\n\
+ $1 = ${3:undefined}\n\
+snippet fn\n\
+ ${1:fn} :: ${2:a} -> ${3:a}\n\
+ $1 ${4} = ${5:undefined}\n\
+snippet fn2\n\
+ ${1:fn} :: ${2:a} -> ${3:a} -> ${4:a}\n\
+ $1 ${5} = ${6:undefined}\n\
+snippet ap\n\
+ ${1:map} ${2:fn} ${3:list}\n\
+snippet do\n\
+ do\n\
+ \n\
+snippet λ\n\
+ \\${1:x} -> ${2}\n\
+snippet \\\n\
+ \\${1:x} -> ${2}\n\
+snippet <-\n\
+ ${1:a} <- ${2:m a}\n\
+snippet ←\n\
+ ${1:a} <- ${2:m a}\n\
+snippet ->\n\
+ ${1:m a} -> ${2:a}\n\
+snippet →\n\
+ ${1:m a} -> ${2:a}\n\
+snippet tup\n\
+ (${1:a}, ${2:b})\n\
+snippet tup2\n\
+ (${1:a}, ${2:b}, ${3:c})\n\
+snippet tup3\n\
+ (${1:a}, ${2:b}, ${3:c}, ${4:d})\n\
+snippet rec\n\
+ ${1:Record} { ${2:recFieldA} = ${3:undefined}\n\
+ , ${4:recFieldB} = ${5:undefined}\n\
+ }\n\
+snippet case\n\
+ case ${1:something} of\n\
+ ${2} -> ${3}\n\
+snippet let\n\
+ let ${1} = ${2}\n\
+ in ${3}\n\
+snippet where\n\
+ where\n\
+ ${1:fn} = ${2:undefined}\n\
+";
+exports.scope = "haskell";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/haskell_cabal.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/haskell_cabal.js
new file mode 100644
index 00000000..56d6e875
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/haskell_cabal.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/haskell_cabal",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "haskell_cabal";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/haxe.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/haxe.js
new file mode 100644
index 00000000..37695471
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/haxe.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/haxe",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "haxe";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/hjson.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/hjson.js
new file mode 100644
index 00000000..b31e5563
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/hjson.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/hjson",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/html.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/html.js
new file mode 100644
index 00000000..b94132fa
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/html.js
@@ -0,0 +1,862 @@
+ace.define("ace/snippets/html",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# Some useful Unicode entities\n\
+# Non-Breaking Space\n\
+snippet nbs\n\
+ &nbsp;\n\
+# ←\n\
+snippet left\n\
+ &#x2190;\n\
+# →\n\
+snippet right\n\
+ &#x2192;\n\
+# ↑\n\
+snippet up\n\
+ &#x2191;\n\
+# ↓\n\
+snippet down\n\
+ &#x2193;\n\
+# ↩\n\
+snippet return\n\
+ &#x21A9;\n\
+# ⇤\n\
+snippet backtab\n\
+ &#x21E4;\n\
+# ⇥\n\
+snippet tab\n\
+ &#x21E5;\n\
+# ⇧\n\
+snippet shift\n\
+ &#x21E7;\n\
+# ⌃\n\
+snippet ctrl\n\
+ &#x2303;\n\
+# ⌅\n\
+snippet enter\n\
+ &#x2305;\n\
+# ⌘\n\
+snippet cmd\n\
+ &#x2318;\n\
+# ⌥\n\
+snippet option\n\
+ &#x2325;\n\
+# ⌦\n\
+snippet delete\n\
+ &#x2326;\n\
+# ⌫\n\
+snippet backspace\n\
+ &#x232B;\n\
+# ⎋\n\
+snippet esc\n\
+ &#x238B;\n\
+# Generic Doctype\n\
+snippet doctype HTML 4.01 Strict\n\
+ <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\n\
+ \"http://www.w3.org/TR/html4/strict.dtd\">\n\
+snippet doctype HTML 4.01 Transitional\n\
+ <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\
+ \"http://www.w3.org/TR/html4/loose.dtd\">\n\
+snippet doctype HTML 5\n\
+ <!DOCTYPE HTML>\n\
+snippet doctype XHTML 1.0 Frameset\n\
+ <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n\
+ \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n\
+snippet doctype XHTML 1.0 Strict\n\
+ <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n\
+ \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n\
+snippet doctype XHTML 1.0 Transitional\n\
+ <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\
+ \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\
+snippet doctype XHTML 1.1\n\
+ <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\n\
+ \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n\
+# HTML Doctype 4.01 Strict\n\
+snippet docts\n\
+ <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\n\
+ \"http://www.w3.org/TR/html4/strict.dtd\">\n\
+# HTML Doctype 4.01 Transitional\n\
+snippet doct\n\
+ <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\
+ \"http://www.w3.org/TR/html4/loose.dtd\">\n\
+# HTML Doctype 5\n\
+snippet doct5\n\
+ <!DOCTYPE html>\n\
+# XHTML Doctype 1.0 Frameset\n\
+snippet docxf\n\
+ <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\"\n\
+ \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">\n\
+# XHTML Doctype 1.0 Strict\n\
+snippet docxs\n\
+ <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n\
+ \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n\
+# XHTML Doctype 1.0 Transitional\n\
+snippet docxt\n\
+ <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\
+ \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\
+# XHTML Doctype 1.1\n\
+snippet docx\n\
+ <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\n\
+ \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n\
+# html5shiv\n\
+snippet html5shiv\n\
+ <!--[if lte IE 8]>\n\
+ <script src=\"https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js\"></script>\n\
+ <![endif]-->\n\
+snippet html5printshiv\n\
+ <!--[if lte IE 8]>\n\
+ <script src=\"https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js\"></script>\n\
+ <![endif]-->\n\
+# Attributes\n\
+snippet attr\n\
+ ${1:attribute}=\"${2:property}\"\n\
+snippet attr+\n\
+ ${1:attribute}=\"${2:property}\" attr+${3}\n\
+snippet .\n\
+ class=\"${1}\"${2}\n\
+snippet #\n\
+ id=\"${1}\"${2}\n\
+snippet alt\n\
+ alt=\"${1}\"${2}\n\
+snippet charset\n\
+ charset=\"${1:utf-8}\"${2}\n\
+snippet data\n\
+ data-${1}=\"${2:$1}\"${3}\n\
+snippet for\n\
+ for=\"${1}\"${2}\n\
+snippet height\n\
+ height=\"${1}\"${2}\n\
+snippet href\n\
+ href=\"${1:#}\"${2}\n\
+snippet lang\n\
+ lang=\"${1:en}\"${2}\n\
+snippet media\n\
+ media=\"${1}\"${2}\n\
+snippet name\n\
+ name=\"${1}\"${2}\n\
+snippet rel\n\
+ rel=\"${1}\"${2}\n\
+snippet scope\n\
+ scope=\"${1:row}\"${2}\n\
+snippet src\n\
+ src=\"${1}\"${2}\n\
+snippet title=\n\
+ title=\"${1}\"${2}\n\
+snippet type\n\
+ type=\"${1}\"${2}\n\
+snippet value\n\
+ value=\"${1}\"${2}\n\
+snippet width\n\
+ width=\"${1}\"${2}\n\
+# Elements\n\
+snippet a\n\
+ <a href=\"${1:#}\">${2:$1}</a>\n\
+snippet a.\n\
+ <a class=\"${1}\" href=\"${2:#}\">${3:$1}</a>\n\
+snippet a#\n\
+ <a id=\"${1}\" href=\"${2:#}\">${3:$1}</a>\n\
+snippet a:ext\n\
+ <a href=\"http://${1:example.com}\">${2:$1}</a>\n\
+snippet a:mail\n\
+ <a href=\"mailto:${1:joe@example.com}?subject=${2:feedback}\">${3:email me}</a>\n\
+snippet abbr\n\
+ <abbr title=\"${1}\">${2}</abbr>\n\
+snippet address\n\
+ <address>\n\
+ ${1}\n\
+ </address>\n\
+snippet area\n\
+ <area shape=\"${1:rect}\" coords=\"${2}\" href=\"${3}\" alt=\"${4}\" />\n\
+snippet area+\n\
+ <area shape=\"${1:rect}\" coords=\"${2}\" href=\"${3}\" alt=\"${4}\" />\n\
+ area+${5}\n\
+snippet area:c\n\
+ <area shape=\"circle\" coords=\"${1}\" href=\"${2}\" alt=\"${3}\" />\n\
+snippet area:d\n\
+ <area shape=\"default\" coords=\"${1}\" href=\"${2}\" alt=\"${3}\" />\n\
+snippet area:p\n\
+ <area shape=\"poly\" coords=\"${1}\" href=\"${2}\" alt=\"${3}\" />\n\
+snippet area:r\n\
+ <area shape=\"rect\" coords=\"${1}\" href=\"${2}\" alt=\"${3}\" />\n\
+snippet article\n\
+ <article>\n\
+ ${1}\n\
+ </article>\n\
+snippet article.\n\
+ <article class=\"${1}\">\n\
+ ${2}\n\
+ </article>\n\
+snippet article#\n\
+ <article id=\"${1}\">\n\
+ ${2}\n\
+ </article>\n\
+snippet aside\n\
+ <aside>\n\
+ ${1}\n\
+ </aside>\n\
+snippet aside.\n\
+ <aside class=\"${1}\">\n\
+ ${2}\n\
+ </aside>\n\
+snippet aside#\n\
+ <aside id=\"${1}\">\n\
+ ${2}\n\
+ </aside>\n\
+snippet audio\n\
+ <audio src=\"${1}>${2}</audio>\n\
+snippet b\n\
+ <b>${1}</b>\n\
+snippet base\n\
+ <base href=\"${1}\" target=\"${2}\" />\n\
+snippet bdi\n\
+ <bdi>${1}</bdo>\n\
+snippet bdo\n\
+ <bdo dir=\"${1}\">${2}</bdo>\n\
+snippet bdo:l\n\
+ <bdo dir=\"ltr\">${1}</bdo>\n\
+snippet bdo:r\n\
+ <bdo dir=\"rtl\">${1}</bdo>\n\
+snippet blockquote\n\
+ <blockquote>\n\
+ ${1}\n\
+ </blockquote>\n\
+snippet body\n\
+ <body>\n\
+ ${1}\n\
+ </body>\n\
+snippet br\n\
+ <br />${1}\n\
+snippet button\n\
+ <button type=\"${1:submit}\">${2}</button>\n\
+snippet button.\n\
+ <button class=\"${1:button}\" type=\"${2:submit}\">${3}</button>\n\
+snippet button#\n\
+ <button id=\"${1}\" type=\"${2:submit}\">${3}</button>\n\
+snippet button:s\n\
+ <button type=\"submit\">${1}</button>\n\
+snippet button:r\n\
+ <button type=\"reset\">${1}</button>\n\
+snippet canvas\n\
+ <canvas>\n\
+ ${1}\n\
+ </canvas>\n\
+snippet caption\n\
+ <caption>${1}</caption>\n\
+snippet cite\n\
+ <cite>${1}</cite>\n\
+snippet code\n\
+ <code>${1}</code>\n\
+snippet col\n\
+ <col />${1}\n\
+snippet col+\n\
+ <col />\n\
+ col+${1}\n\
+snippet colgroup\n\
+ <colgroup>\n\
+ ${1}\n\
+ </colgroup>\n\
+snippet colgroup+\n\
+ <colgroup>\n\
+ <col />\n\
+ col+${1}\n\
+ </colgroup>\n\
+snippet command\n\
+ <command type=\"command\" label=\"${1}\" icon=\"${2}\" />\n\
+snippet command:c\n\
+ <command type=\"checkbox\" label=\"${1}\" icon=\"${2}\" />\n\
+snippet command:r\n\
+ <command type=\"radio\" radiogroup=\"${1}\" label=\"${2}\" icon=\"${3}\" />\n\
+snippet datagrid\n\
+ <datagrid>\n\
+ ${1}\n\
+ </datagrid>\n\
+snippet datalist\n\
+ <datalist>\n\
+ ${1}\n\
+ </datalist>\n\
+snippet datatemplate\n\
+ <datatemplate>\n\
+ ${1}\n\
+ </datatemplate>\n\
+snippet dd\n\
+ <dd>${1}</dd>\n\
+snippet dd.\n\
+ <dd class=\"${1}\">${2}</dd>\n\
+snippet dd#\n\
+ <dd id=\"${1}\">${2}</dd>\n\
+snippet del\n\
+ <del>${1}</del>\n\
+snippet details\n\
+ <details>${1}</details>\n\
+snippet dfn\n\
+ <dfn>${1}</dfn>\n\
+snippet dialog\n\
+ <dialog>\n\
+ ${1}\n\
+ </dialog>\n\
+snippet div\n\
+ <div>\n\
+ ${1}\n\
+ </div>\n\
+snippet div.\n\
+ <div class=\"${1}\">\n\
+ ${2}\n\
+ </div>\n\
+snippet div#\n\
+ <div id=\"${1}\">\n\
+ ${2}\n\
+ </div>\n\
+snippet dl\n\
+ <dl>\n\
+ ${1}\n\
+ </dl>\n\
+snippet dl.\n\
+ <dl class=\"${1}\">\n\
+ ${2}\n\
+ </dl>\n\
+snippet dl#\n\
+ <dl id=\"${1}\">\n\
+ ${2}\n\
+ </dl>\n\
+snippet dl+\n\
+ <dl>\n\
+ <dt>${1}</dt>\n\
+ <dd>${2}</dd>\n\
+ dt+${3}\n\
+ </dl>\n\
+snippet dt\n\
+ <dt>${1}</dt>\n\
+snippet dt.\n\
+ <dt class=\"${1}\">${2}</dt>\n\
+snippet dt#\n\
+ <dt id=\"${1}\">${2}</dt>\n\
+snippet dt+\n\
+ <dt>${1}</dt>\n\
+ <dd>${2}</dd>\n\
+ dt+${3}\n\
+snippet em\n\
+ <em>${1}</em>\n\
+snippet embed\n\
+ <embed src=${1} type=\"${2} />\n\
+snippet fieldset\n\
+ <fieldset>\n\
+ ${1}\n\
+ </fieldset>\n\
+snippet fieldset.\n\
+ <fieldset class=\"${1}\">\n\
+ ${2}\n\
+ </fieldset>\n\
+snippet fieldset#\n\
+ <fieldset id=\"${1}\">\n\
+ ${2}\n\
+ </fieldset>\n\
+snippet fieldset+\n\
+ <fieldset>\n\
+ <legend><span>${1}</span></legend>\n\
+ ${2}\n\
+ </fieldset>\n\
+ fieldset+${3}\n\
+snippet figcaption\n\
+ <figcaption>${1}</figcaption>\n\
+snippet figure\n\
+ <figure>${1}</figure>\n\
+snippet footer\n\
+ <footer>\n\
+ ${1}\n\
+ </footer>\n\
+snippet footer.\n\
+ <footer class=\"${1}\">\n\
+ ${2}\n\
+ </footer>\n\
+snippet footer#\n\
+ <footer id=\"${1}\">\n\
+ ${2}\n\
+ </footer>\n\
+snippet form\n\
+ <form action=\"${1}\" method=\"${2:get}\" accept-charset=\"utf-8\">\n\
+ ${3}\n\
+ </form>\n\
+snippet form.\n\
+ <form class=\"${1}\" action=\"${2}\" method=\"${3:get}\" accept-charset=\"utf-8\">\n\
+ ${4}\n\
+ </form>\n\
+snippet form#\n\
+ <form id=\"${1}\" action=\"${2}\" method=\"${3:get}\" accept-charset=\"utf-8\">\n\
+ ${4}\n\
+ </form>\n\
+snippet h1\n\
+ <h1>${1}</h1>\n\
+snippet h1.\n\
+ <h1 class=\"${1}\">${2}</h1>\n\
+snippet h1#\n\
+ <h1 id=\"${1}\">${2}</h1>\n\
+snippet h2\n\
+ <h2>${1}</h2>\n\
+snippet h2.\n\
+ <h2 class=\"${1}\">${2}</h2>\n\
+snippet h2#\n\
+ <h2 id=\"${1}\">${2}</h2>\n\
+snippet h3\n\
+ <h3>${1}</h3>\n\
+snippet h3.\n\
+ <h3 class=\"${1}\">${2}</h3>\n\
+snippet h3#\n\
+ <h3 id=\"${1}\">${2}</h3>\n\
+snippet h4\n\
+ <h4>${1}</h4>\n\
+snippet h4.\n\
+ <h4 class=\"${1}\">${2}</h4>\n\
+snippet h4#\n\
+ <h4 id=\"${1}\">${2}</h4>\n\
+snippet h5\n\
+ <h5>${1}</h5>\n\
+snippet h5.\n\
+ <h5 class=\"${1}\">${2}</h5>\n\
+snippet h5#\n\
+ <h5 id=\"${1}\">${2}</h5>\n\
+snippet h6\n\
+ <h6>${1}</h6>\n\
+snippet h6.\n\
+ <h6 class=\"${1}\">${2}</h6>\n\
+snippet h6#\n\
+ <h6 id=\"${1}\">${2}</h6>\n\
+snippet head\n\
+ <head>\n\
+ <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n\
+\n\
+ <title>${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}</title>\n\
+ ${2}\n\
+ </head>\n\
+snippet header\n\
+ <header>\n\
+ ${1}\n\
+ </header>\n\
+snippet header.\n\
+ <header class=\"${1}\">\n\
+ ${2}\n\
+ </header>\n\
+snippet header#\n\
+ <header id=\"${1}\">\n\
+ ${2}\n\
+ </header>\n\
+snippet hgroup\n\
+ <hgroup>\n\
+ ${1}\n\
+ </hgroup>\n\
+snippet hgroup.\n\
+ <hgroup class=\"${1}>\n\
+ ${2}\n\
+ </hgroup>\n\
+snippet hr\n\
+ <hr />${1}\n\
+snippet html\n\
+ <html>\n\
+ ${1}\n\
+ </html>\n\
+snippet xhtml\n\
+ <html xmlns=\"http://www.w3.org/1999/xhtml\">\n\
+ ${1}\n\
+ </html>\n\
+snippet html5\n\
+ <!DOCTYPE html>\n\
+ <html>\n\
+ <head>\n\
+ <meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />\n\
+ <title>${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}</title>\n\
+ ${2:meta}\n\
+ </head>\n\
+ <body>\n\
+ ${3:body}\n\
+ </body>\n\
+ </html>\n\
+snippet xhtml5\n\
+ <!DOCTYPE html>\n\
+ <html xmlns=\"http://www.w3.org/1999/xhtml\">\n\
+ <head>\n\
+ <meta http-equiv=\"content-type\" content=\"application/xhtml+xml; charset=utf-8\" />\n\
+ <title>${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}</title>\n\
+ ${2:meta}\n\
+ </head>\n\
+ <body>\n\
+ ${3:body}\n\
+ </body>\n\
+ </html>\n\
+snippet i\n\
+ <i>${1}</i>\n\
+snippet iframe\n\
+ <iframe src=\"${1}\" frameborder=\"0\"></iframe>${2}\n\
+snippet iframe.\n\
+ <iframe class=\"${1}\" src=\"${2}\" frameborder=\"0\"></iframe>${3}\n\
+snippet iframe#\n\
+ <iframe id=\"${1}\" src=\"${2}\" frameborder=\"0\"></iframe>${3}\n\
+snippet img\n\
+ <img src=\"${1}\" alt=\"${2}\" />${3}\n\
+snippet img.\n\
+ <img class=\"${1}\" src=\"${2}\" alt=\"${3}\" />${4}\n\
+snippet img#\n\
+ <img id=\"${1}\" src=\"${2}\" alt=\"${3}\" />${4}\n\
+snippet input\n\
+ <input type=\"${1:text/submit/hidden/button/image}\" name=\"${2}\" id=\"${3:$2}\" value=\"${4}\" />${5}\n\
+snippet input.\n\
+ <input class=\"${1}\" type=\"${2:text/submit/hidden/button/image}\" name=\"${3}\" id=\"${4:$3}\" value=\"${5}\" />${6}\n\
+snippet input:text\n\
+ <input type=\"text\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:submit\n\
+ <input type=\"submit\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:hidden\n\
+ <input type=\"hidden\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:button\n\
+ <input type=\"button\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:image\n\
+ <input type=\"image\" name=\"${1}\" id=\"${2:$1}\" src=\"${3}\" alt=\"${4}\" />${5}\n\
+snippet input:checkbox\n\
+ <input type=\"checkbox\" name=\"${1}\" id=\"${2:$1}\" />${3}\n\
+snippet input:radio\n\
+ <input type=\"radio\" name=\"${1}\" id=\"${2:$1}\" />${3}\n\
+snippet input:color\n\
+ <input type=\"color\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:date\n\
+ <input type=\"date\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:datetime\n\
+ <input type=\"datetime\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:datetime-local\n\
+ <input type=\"datetime-local\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:email\n\
+ <input type=\"email\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:file\n\
+ <input type=\"file\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:month\n\
+ <input type=\"month\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:number\n\
+ <input type=\"number\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:password\n\
+ <input type=\"password\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:range\n\
+ <input type=\"range\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:reset\n\
+ <input type=\"reset\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:search\n\
+ <input type=\"search\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:time\n\
+ <input type=\"time\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:url\n\
+ <input type=\"url\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet input:week\n\
+ <input type=\"week\" name=\"${1}\" id=\"${2:$1}\" value=\"${3}\" />${4}\n\
+snippet ins\n\
+ <ins>${1}</ins>\n\
+snippet kbd\n\
+ <kbd>${1}</kbd>\n\
+snippet keygen\n\
+ <keygen>${1}</keygen>\n\
+snippet label\n\
+ <label for=\"${2:$1}\">${1}</label>\n\
+snippet label:i\n\
+ <label for=\"${2:$1}\">${1}</label>\n\
+ <input type=\"${3:text/submit/hidden/button}\" name=\"${4:$2}\" id=\"${5:$2}\" value=\"${6}\" />${7}\n\
+snippet label:s\n\
+ <label for=\"${2:$1}\">${1}</label>\n\
+ <select name=\"${3:$2}\" id=\"${4:$2}\">\n\
+ <option value=\"${5}\">${6:$5}</option>\n\
+ </select>\n\
+snippet legend\n\
+ <legend>${1}</legend>\n\
+snippet legend+\n\
+ <legend><span>${1}</span></legend>\n\
+snippet li\n\
+ <li>${1}</li>\n\
+snippet li.\n\
+ <li class=\"${1}\">${2}</li>\n\
+snippet li+\n\
+ <li>${1}</li>\n\
+ li+${2}\n\
+snippet lia\n\
+ <li><a href=\"${2:#}\">${1}</a></li>\n\
+snippet lia+\n\
+ <li><a href=\"${2:#}\">${1}</a></li>\n\
+ lia+${3}\n\
+snippet link\n\
+ <link rel=\"${1}\" href=\"${2}\" title=\"${3}\" type=\"${4}\" />${5}\n\
+snippet link:atom\n\
+ <link rel=\"alternate\" href=\"${1:atom.xml}\" title=\"Atom\" type=\"application/atom+xml\" />${2}\n\
+snippet link:css\n\
+ <link rel=\"stylesheet\" href=\"${2:style.css}\" type=\"text/css\" media=\"${3:all}\" />${4}\n\
+snippet link:favicon\n\
+ <link rel=\"shortcut icon\" href=\"${1:favicon.ico}\" type=\"image/x-icon\" />${2}\n\
+snippet link:rss\n\
+ <link rel=\"alternate\" href=\"${1:rss.xml}\" title=\"RSS\" type=\"application/atom+xml\" />${2}\n\
+snippet link:touch\n\
+ <link rel=\"apple-touch-icon\" href=\"${1:favicon.png}\" />${2}\n\
+snippet map\n\
+ <map name=\"${1}\">\n\
+ ${2}\n\
+ </map>\n\
+snippet map.\n\
+ <map class=\"${1}\" name=\"${2}\">\n\
+ ${3}\n\
+ </map>\n\
+snippet map#\n\
+ <map name=\"${1}\" id=\"${2:$1}>\n\
+ ${3}\n\
+ </map>\n\
+snippet map+\n\
+ <map name=\"${1}\">\n\
+ <area shape=\"${2}\" coords=\"${3}\" href=\"${4}\" alt=\"${5}\" />${6}\n\
+ </map>${7}\n\
+snippet mark\n\
+ <mark>${1}</mark>\n\
+snippet menu\n\
+ <menu>\n\
+ ${1}\n\
+ </menu>\n\
+snippet menu:c\n\
+ <menu type=\"context\">\n\
+ ${1}\n\
+ </menu>\n\
+snippet menu:t\n\
+ <menu type=\"toolbar\">\n\
+ ${1}\n\
+ </menu>\n\
+snippet meta\n\
+ <meta http-equiv=\"${1}\" content=\"${2}\" />${3}\n\
+snippet meta:compat\n\
+ <meta http-equiv=\"X-UA-Compatible\" content=\"IE=${1:7,8,edge}\" />${3}\n\
+snippet meta:refresh\n\
+ <meta http-equiv=\"refresh\" content=\"text/html;charset=UTF-8\" />${3}\n\
+snippet meta:utf\n\
+ <meta http-equiv=\"content-type\" content=\"text/html;charset=UTF-8\" />${3}\n\
+snippet meter\n\
+ <meter>${1}</meter>\n\
+snippet nav\n\
+ <nav>\n\
+ ${1}\n\
+ </nav>\n\
+snippet nav.\n\
+ <nav class=\"${1}\">\n\
+ ${2}\n\
+ </nav>\n\
+snippet nav#\n\
+ <nav id=\"${1}\">\n\
+ ${2}\n\
+ </nav>\n\
+snippet noscript\n\
+ <noscript>\n\
+ ${1}\n\
+ </noscript>\n\
+snippet object\n\
+ <object data=\"${1}\" type=\"${2}\">\n\
+ ${3}\n\
+ </object>${4}\n\
+# Embed QT Movie\n\
+snippet movie\n\
+ <object width=\"$2\" height=\"$3\" classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\"\n\
+ codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\">\n\
+ <param name=\"src\" value=\"$1\" />\n\
+ <param name=\"controller\" value=\"$4\" />\n\
+ <param name=\"autoplay\" value=\"$5\" />\n\
+ <embed src=\"${1:movie.mov}\"\n\
+ width=\"${2:320}\" height=\"${3:240}\"\n\
+ controller=\"${4:true}\" autoplay=\"${5:true}\"\n\
+ scale=\"tofit\" cache=\"true\"\n\
+ pluginspage=\"http://www.apple.com/quicktime/download/\" />\n\
+ </object>${6}\n\
+snippet ol\n\
+ <ol>\n\
+ ${1}\n\
+ </ol>\n\
+snippet ol.\n\
+ <ol class=\"${1}>\n\
+ ${2}\n\
+ </ol>\n\
+snippet ol#\n\
+ <ol id=\"${1}>\n\
+ ${2}\n\
+ </ol>\n\
+snippet ol+\n\
+ <ol>\n\
+ <li>${1}</li>\n\
+ li+${2}\n\
+ </ol>\n\
+snippet opt\n\
+ <option value=\"${1}\">${2:$1}</option>\n\
+snippet opt+\n\
+ <option value=\"${1}\">${2:$1}</option>\n\
+ opt+${3}\n\
+snippet optt\n\
+ <option>${1}</option>\n\
+snippet optgroup\n\
+ <optgroup>\n\
+ <option value=\"${1}\">${2:$1}</option>\n\
+ opt+${3}\n\
+ </optgroup>\n\
+snippet output\n\
+ <output>${1}</output>\n\
+snippet p\n\
+ <p>${1}</p>\n\
+snippet param\n\
+ <param name=\"${1}\" value=\"${2}\" />${3}\n\
+snippet pre\n\
+ <pre>\n\
+ ${1}\n\
+ </pre>\n\
+snippet progress\n\
+ <progress>${1}</progress>\n\
+snippet q\n\
+ <q>${1}</q>\n\
+snippet rp\n\
+ <rp>${1}</rp>\n\
+snippet rt\n\
+ <rt>${1}</rt>\n\
+snippet ruby\n\
+ <ruby>\n\
+ <rp><rt>${1}</rt></rp>\n\
+ </ruby>\n\
+snippet s\n\
+ <s>${1}</s>\n\
+snippet samp\n\
+ <samp>\n\
+ ${1}\n\
+ </samp>\n\
+snippet script\n\
+ <script type=\"text/javascript\" charset=\"utf-8\">\n\
+ ${1}\n\
+ </script>\n\
+snippet scriptsrc\n\
+ <script src=\"${1}.js\" type=\"text/javascript\" charset=\"utf-8\"></script>\n\
+snippet newscript\n\
+ <script type=\"application/javascript\" charset=\"utf-8\">\n\
+ ${1}\n\
+ </script>\n\
+snippet newscriptsrc\n\
+ <script src=\"${1}.js\" type=\"application/javascript\" charset=\"utf-8\"></script>\n\
+snippet section\n\
+ <section>\n\
+ ${1}\n\
+ </section>\n\
+snippet section.\n\
+ <section class=\"${1}\">\n\
+ ${2}\n\
+ </section>\n\
+snippet section#\n\
+ <section id=\"${1}\">\n\
+ ${2}\n\
+ </section>\n\
+snippet select\n\
+ <select name=\"${1}\" id=\"${2:$1}\">\n\
+ ${3}\n\
+ </select>\n\
+snippet select.\n\
+ <select name=\"${1}\" id=\"${2:$1}\" class=\"${3}>\n\
+ ${4}\n\
+ </select>\n\
+snippet select+\n\
+ <select name=\"${1}\" id=\"${2:$1}\">\n\
+ <option value=\"${3}\">${4:$3}</option>\n\
+ opt+${5}\n\
+ </select>\n\
+snippet small\n\
+ <small>${1}</small>\n\
+snippet source\n\
+ <source src=\"${1}\" type=\"${2}\" media=\"${3}\" />\n\
+snippet span\n\
+ <span>${1}</span>\n\
+snippet strong\n\
+ <strong>${1}</strong>\n\
+snippet style\n\
+ <style type=\"text/css\" media=\"${1:all}\">\n\
+ ${2}\n\
+ </style>\n\
+snippet sub\n\
+ <sub>${1}</sub>\n\
+snippet summary\n\
+ <summary>\n\
+ ${1}\n\
+ </summary>\n\
+snippet sup\n\
+ <sup>${1}</sup>\n\
+snippet table\n\
+ <table border=\"${1:0}\">\n\
+ ${2}\n\
+ </table>\n\
+snippet table.\n\
+ <table class=\"${1}\" border=\"${2:0}\">\n\
+ ${3}\n\
+ </table>\n\
+snippet table#\n\
+ <table id=\"${1}\" border=\"${2:0}\">\n\
+ ${3}\n\
+ </table>\n\
+snippet tbody\n\
+ <tbody>\n\
+ ${1}\n\
+ </tbody>\n\
+snippet td\n\
+ <td>${1}</td>\n\
+snippet td.\n\
+ <td class=\"${1}\">${2}</td>\n\
+snippet td#\n\
+ <td id=\"${1}\">${2}</td>\n\
+snippet td+\n\
+ <td>${1}</td>\n\
+ td+${2}\n\
+snippet textarea\n\
+ <textarea name=\"${1}\" id=${2:$1} rows=\"${3:8}\" cols=\"${4:40}\">${5}</textarea>${6}\n\
+snippet tfoot\n\
+ <tfoot>\n\
+ ${1}\n\
+ </tfoot>\n\
+snippet th\n\
+ <th>${1}</th>\n\
+snippet th.\n\
+ <th class=\"${1}\">${2}</th>\n\
+snippet th#\n\
+ <th id=\"${1}\">${2}</th>\n\
+snippet th+\n\
+ <th>${1}</th>\n\
+ th+${2}\n\
+snippet thead\n\
+ <thead>\n\
+ ${1}\n\
+ </thead>\n\
+snippet time\n\
+ <time datetime=\"${1}\" pubdate=\"${2:$1}>${3:$1}</time>\n\
+snippet title\n\
+ <title>${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}</title>\n\
+snippet tr\n\
+ <tr>\n\
+ ${1}\n\
+ </tr>\n\
+snippet tr+\n\
+ <tr>\n\
+ <td>${1}</td>\n\
+ td+${2}\n\
+ </tr>\n\
+snippet track\n\
+ <track src=\"${1}\" srclang=\"${2}\" label=\"${3}\" default=\"${4:default}>${5}</track>${6}\n\
+snippet ul\n\
+ <ul>\n\
+ ${1}\n\
+ </ul>\n\
+snippet ul.\n\
+ <ul class=\"${1}\">\n\
+ ${2}\n\
+ </ul>\n\
+snippet ul#\n\
+ <ul id=\"${1}\">\n\
+ ${2}\n\
+ </ul>\n\
+snippet ul+\n\
+ <ul>\n\
+ <li>${1}</li>\n\
+ li+${2}\n\
+ </ul>\n\
+snippet var\n\
+ <var>${1}</var>\n\
+snippet video\n\
+ <video src=\"${1} height=\"${2}\" width=\"${3}\" preload=\"${5:none}\" autoplay=\"${6:autoplay}>${7}</video>${8}\n\
+snippet wbr\n\
+ <wbr />${1}\n\
+";
+exports.scope = "html";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/html_elixir.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/html_elixir.js
new file mode 100644
index 00000000..66d9eb38
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/html_elixir.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/html_elixir",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "html_elixir";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/html_ruby.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/html_ruby.js
new file mode 100644
index 00000000..83676f79
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/html_ruby.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/html_ruby",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "html_ruby";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/ini.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/ini.js
new file mode 100644
index 00000000..ad9bf52f
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/ini.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/ini",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "ini";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/io.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/io.js
new file mode 100644
index 00000000..431002b4
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/io.js
@@ -0,0 +1,69 @@
+ace.define("ace/snippets/io",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippets = [
+ {
+ "content": "assertEquals(${1:expected}, ${2:expr})",
+ "name": "assertEquals",
+ "scope": "io",
+ "tabTrigger": "ae"
+ },
+ {
+ "content": "${1:${2:newValue} := ${3:Object} }clone do(\n\t$0\n)",
+ "name": "clone do",
+ "scope": "io",
+ "tabTrigger": "cdo"
+ },
+ {
+ "content": "docSlot(\"${1:slotName}\", \"${2:documentation}\")",
+ "name": "docSlot",
+ "scope": "io",
+ "tabTrigger": "ds"
+ },
+ {
+ "content": "(${1:header,}\n\t${2:body}\n)$0",
+ "keyEquivalent": "@(",
+ "name": "Indented Bracketed Line",
+ "scope": "io",
+ "tabTrigger": "("
+ },
+ {
+ "content": "\n\t$0\n",
+ "keyEquivalent": "\r",
+ "name": "Special: Return Inside Empty Parenthesis",
+ "scope": "io meta.empty-parenthesis.io, io meta.comma-parenthesis.io"
+ },
+ {
+ "content": "${1:methodName} := method(${2:args,}\n\t$0\n)",
+ "name": "method",
+ "scope": "io",
+ "tabTrigger": "m"
+ },
+ {
+ "content": "newSlot(\"${1:slotName}\", ${2:defaultValue}, \"${3:docString}\")$0",
+ "name": "newSlot",
+ "scope": "io",
+ "tabTrigger": "ns"
+ },
+ {
+ "content": "${1:name} := Object clone do(\n\t$0\n)",
+ "name": "Object clone do",
+ "scope": "io",
+ "tabTrigger": "ocdo"
+ },
+ {
+ "content": "test${1:SomeFeature} := method(\n\t$0\n)",
+ "name": "testMethod",
+ "scope": "io",
+ "tabTrigger": "ts"
+ },
+ {
+ "content": "${1:Something}Test := ${2:UnitTest} clone do(\n\t$0\n)",
+ "name": "UnitTest",
+ "scope": "io",
+ "tabTrigger": "ut"
+ }
+];
+exports.scope = "io";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/jack.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/jack.js
new file mode 100644
index 00000000..eca7f293
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/jack.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/jack",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "jack";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/jade.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/jade.js
new file mode 100644
index 00000000..f516d0c0
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/jade.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/jade",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "jade";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/java.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/java.js
new file mode 100644
index 00000000..1bc92aca
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/java.js
@@ -0,0 +1,247 @@
+ace.define("ace/snippets/java",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "## Access Modifiers\n\
+snippet po\n\
+ protected\n\
+snippet pu\n\
+ public\n\
+snippet pr\n\
+ private\n\
+##\n\
+## Annotations\n\
+snippet before\n\
+ @Before\n\
+ static void ${1:intercept}(${2:args}) { ${3} }\n\
+snippet mm\n\
+ @ManyToMany\n\
+ ${1}\n\
+snippet mo\n\
+ @ManyToOne\n\
+ ${1}\n\
+snippet om\n\
+ @OneToMany${1:(cascade=CascadeType.ALL)}\n\
+ ${2}\n\
+snippet oo\n\
+ @OneToOne\n\
+ ${1}\n\
+##\n\
+## Basic Java packages and import\n\
+snippet im\n\
+ import\n\
+snippet j.b\n\
+ java.beans.\n\
+snippet j.i\n\
+ java.io.\n\
+snippet j.m\n\
+ java.math.\n\
+snippet j.n\n\
+ java.net.\n\
+snippet j.u\n\
+ java.util.\n\
+##\n\
+## Class\n\
+snippet cl\n\
+ class ${1:`Filename(\"\", \"untitled\")`} ${2}\n\
+snippet in\n\
+ interface ${1:`Filename(\"\", \"untitled\")`} ${2:extends Parent}${3}\n\
+snippet tc\n\
+ public class ${1:`Filename()`} extends ${2:TestCase}\n\
+##\n\
+## Class Enhancements\n\
+snippet ext\n\
+ extends \n\
+snippet imp\n\
+ implements\n\
+##\n\
+## Comments\n\
+snippet /*\n\
+ /*\n\
+ * ${1}\n\
+ */\n\
+##\n\
+## Constants\n\
+snippet co\n\
+ static public final ${1:String} ${2:var} = ${3};${4}\n\
+snippet cos\n\
+ static public final String ${1:var} = \"${2}\";${3}\n\
+##\n\
+## Control Statements\n\
+snippet case\n\
+ case ${1}:\n\
+ ${2}\n\
+snippet def\n\
+ default:\n\
+ ${2}\n\
+snippet el\n\
+ else\n\
+snippet elif\n\
+ else if (${1}) ${2}\n\
+snippet if\n\
+ if (${1}) ${2}\n\
+snippet sw\n\
+ switch (${1}) {\n\
+ ${2}\n\
+ }\n\
+##\n\
+## Create a Method\n\
+snippet m\n\
+ ${1:void} ${2:method}(${3}) ${4:throws }${5}\n\
+##\n\
+## Create a Variable\n\
+snippet v\n\
+ ${1:String} ${2:var}${3: = null}${4};${5}\n\
+##\n\
+## Enhancements to Methods, variables, classes, etc.\n\
+snippet ab\n\
+ abstract\n\
+snippet fi\n\
+ final\n\
+snippet st\n\
+ static\n\
+snippet sy\n\
+ synchronized\n\
+##\n\
+## Error Methods\n\
+snippet err\n\
+ System.err.print(\"${1:Message}\");\n\
+snippet errf\n\
+ System.err.printf(\"${1:Message}\", ${2:exception});\n\
+snippet errln\n\
+ System.err.println(\"${1:Message}\");\n\
+##\n\
+## Exception Handling\n\
+snippet as\n\
+ assert ${1:test} : \"${2:Failure message}\";${3}\n\
+snippet ca\n\
+ catch(${1:Exception} ${2:e}) ${3}\n\
+snippet thr\n\
+ throw\n\
+snippet ths\n\
+ throws\n\
+snippet try\n\
+ try {\n\
+ ${3}\n\
+ } catch(${1:Exception} ${2:e}) {\n\
+ }\n\
+snippet tryf\n\
+ try {\n\
+ ${3}\n\
+ } catch(${1:Exception} ${2:e}) {\n\
+ } finally {\n\
+ }\n\
+##\n\
+## Find Methods\n\
+snippet findall\n\
+ List<${1:listName}> ${2:items} = ${1}.findAll();${3}\n\
+snippet findbyid\n\
+ ${1:var} ${2:item} = ${1}.findById(${3});${4}\n\
+##\n\
+## Javadocs\n\
+snippet /**\n\
+ /**\n\
+ * ${1}\n\
+ */\n\
+snippet @au\n\
+ @author `system(\"grep \\`id -un\\` /etc/passwd | cut -d \\\":\\\" -f5 | cut -d \\\",\\\" -f1\")`\n\
+snippet @br\n\
+ @brief ${1:Description}\n\
+snippet @fi\n\
+ @file ${1:`Filename()`}.java\n\
+snippet @pa\n\
+ @param ${1:param}\n\
+snippet @re\n\
+ @return ${1:param}\n\
+##\n\
+## Logger Methods\n\
+snippet debug\n\
+ Logger.debug(${1:param});${2}\n\
+snippet error\n\
+ Logger.error(${1:param});${2}\n\
+snippet info\n\
+ Logger.info(${1:param});${2}\n\
+snippet warn\n\
+ Logger.warn(${1:param});${2}\n\
+##\n\
+## Loops\n\
+snippet enfor\n\
+ for (${1} : ${2}) ${3}\n\
+snippet for\n\
+ for (${1}; ${2}; ${3}) ${4}\n\
+snippet wh\n\
+ while (${1}) ${2}\n\
+##\n\
+## Main method\n\
+snippet main\n\
+ public static void main (String[] args) {\n\
+ ${1:/* code */}\n\
+ }\n\
+##\n\
+## Print Methods\n\
+snippet print\n\
+ System.out.print(\"${1:Message}\");\n\
+snippet printf\n\
+ System.out.printf(\"${1:Message}\", ${2:args});\n\
+snippet println\n\
+ System.out.println(${1});\n\
+##\n\
+## Render Methods\n\
+snippet ren\n\
+ render(${1:param});${2}\n\
+snippet rena\n\
+ renderArgs.put(\"${1}\", ${2});${3}\n\
+snippet renb\n\
+ renderBinary(${1:param});${2}\n\
+snippet renj\n\
+ renderJSON(${1:param});${2}\n\
+snippet renx\n\
+ renderXml(${1:param});${2}\n\
+##\n\
+## Setter and Getter Methods\n\
+snippet set\n\
+ ${1:public} void set${3:}(${2:String} ${4:}){\n\
+ this.$4 = $4;\n\
+ }\n\
+snippet get\n\
+ ${1:public} ${2:String} get${3:}(){\n\
+ return this.${4:};\n\
+ }\n\
+##\n\
+## Terminate Methods or Loops\n\
+snippet re\n\
+ return\n\
+snippet br\n\
+ break;\n\
+##\n\
+## Test Methods\n\
+snippet t\n\
+ public void test${1:Name}() throws Exception {\n\
+ ${2}\n\
+ }\n\
+snippet test\n\
+ @Test\n\
+ public void test${1:Name}() throws Exception {\n\
+ ${2}\n\
+ }\n\
+##\n\
+## Utils\n\
+snippet Sc\n\
+ Scanner\n\
+##\n\
+## Miscellaneous\n\
+snippet action\n\
+ public static void ${1:index}(${2:args}) { ${3} }\n\
+snippet rnf\n\
+ notFound(${1:param});${2}\n\
+snippet rnfin\n\
+ notFoundIfNull(${1:param});${2}\n\
+snippet rr\n\
+ redirect(${1:param});${2}\n\
+snippet ru\n\
+ unauthorized(${1:param});${2}\n\
+snippet unless\n\
+ (unless=${1:param});${2}\n\
+";
+exports.scope = "java";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/javascript.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/javascript.js
new file mode 100644
index 00000000..f3f998ad
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/javascript.js
@@ -0,0 +1,202 @@
+ace.define("ace/snippets/javascript",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# Prototype\n\
+snippet proto\n\
+ ${1:class_name}.prototype.${2:method_name} = function(${3:first_argument}) {\n\
+ ${4:// body...}\n\
+ };\n\
+# Function\n\
+snippet fun\n\
+ function ${1?:function_name}(${2:argument}) {\n\
+ ${3:// body...}\n\
+ }\n\
+# Anonymous Function\n\
+regex /((=)\\s*|(:)\\s*|(\\()|\\b)/f/(\\))?/\n\
+snippet f\n\
+ function${M1?: ${1:functionName}}($2) {\n\
+ ${0:$TM_SELECTED_TEXT}\n\
+ }${M2?;}${M3?,}${M4?)}\n\
+# Immediate function\n\
+trigger \\(?f\\(\n\
+endTrigger \\)?\n\
+snippet f(\n\
+ (function(${1}) {\n\
+ ${0:${TM_SELECTED_TEXT:/* code */}}\n\
+ }(${1}));\n\
+# if\n\
+snippet if\n\
+ if (${1:true}) {\n\
+ ${0}\n\
+ }\n\
+# if ... else\n\
+snippet ife\n\
+ if (${1:true}) {\n\
+ ${2}\n\
+ } else {\n\
+ ${0}\n\
+ }\n\
+# tertiary conditional\n\
+snippet ter\n\
+ ${1:/* condition */} ? ${2:a} : ${3:b}\n\
+# switch\n\
+snippet switch\n\
+ switch (${1:expression}) {\n\
+ case '${3:case}':\n\
+ ${4:// code}\n\
+ break;\n\
+ ${5}\n\
+ default:\n\
+ ${2:// code}\n\
+ }\n\
+# case\n\
+snippet case\n\
+ case '${1:case}':\n\
+ ${2:// code}\n\
+ break;\n\
+ ${3}\n\
+\n\
+# while (...) {...}\n\
+snippet wh\n\
+ while (${1:/* condition */}) {\n\
+ ${0:/* code */}\n\
+ }\n\
+# try\n\
+snippet try\n\
+ try {\n\
+ ${0:/* code */}\n\
+ } catch (e) {}\n\
+# do...while\n\
+snippet do\n\
+ do {\n\
+ ${2:/* code */}\n\
+ } while (${1:/* condition */});\n\
+# Object Method\n\
+snippet :f\n\
+regex /([,{[])|^\\s*/:f/\n\
+ ${1:method_name}: function(${2:attribute}) {\n\
+ ${0}\n\
+ }${3:,}\n\
+# setTimeout function\n\
+snippet setTimeout\n\
+regex /\\b/st|timeout|setTimeo?u?t?/\n\
+ setTimeout(function() {${3:$TM_SELECTED_TEXT}}, ${1:10});\n\
+# Get Elements\n\
+snippet gett\n\
+ getElementsBy${1:TagName}('${2}')${3}\n\
+# Get Element\n\
+snippet get\n\
+ getElementBy${1:Id}('${2}')${3}\n\
+# console.log (Firebug)\n\
+snippet cl\n\
+ console.log(${1});\n\
+# return\n\
+snippet ret\n\
+ return ${1:result}\n\
+# for (property in object ) { ... }\n\
+snippet fori\n\
+ for (var ${1:prop} in ${2:Things}) {\n\
+ ${0:$2[$1]}\n\
+ }\n\
+# hasOwnProperty\n\
+snippet has\n\
+ hasOwnProperty(${1})\n\
+# docstring\n\
+snippet /**\n\
+ /**\n\
+ * ${1:description}\n\
+ *\n\
+ */\n\
+snippet @par\n\
+regex /^\\s*\\*\\s*/@(para?m?)?/\n\
+ @param {${1:type}} ${2:name} ${3:description}\n\
+snippet @ret\n\
+ @return {${1:type}} ${2:description}\n\
+# JSON.parse\n\
+snippet jsonp\n\
+ JSON.parse(${1:jstr});\n\
+# JSON.stringify\n\
+snippet jsons\n\
+ JSON.stringify(${1:object});\n\
+# self-defining function\n\
+snippet sdf\n\
+ var ${1:function_name} = function(${2:argument}) {\n\
+ ${3:// initial code ...}\n\
+\n\
+ $1 = function($2) {\n\
+ ${4:// main code}\n\
+ };\n\
+ }\n\
+# singleton\n\
+snippet sing\n\
+ function ${1:Singleton} (${2:argument}) {\n\
+ // the cached instance\n\
+ var instance;\n\
+\n\
+ // rewrite the constructor\n\
+ $1 = function $1($2) {\n\
+ return instance;\n\
+ };\n\
+ \n\
+ // carry over the prototype properties\n\
+ $1.prototype = this;\n\
+\n\
+ // the instance\n\
+ instance = new $1();\n\
+\n\
+ // reset the constructor pointer\n\
+ instance.constructor = $1;\n\
+\n\
+ ${3:// code ...}\n\
+\n\
+ return instance;\n\
+ }\n\
+# class\n\
+snippet class\n\
+regex /^\\s*/clas{0,2}/\n\
+ var ${1:class} = function(${20}) {\n\
+ $40$0\n\
+ };\n\
+ \n\
+ (function() {\n\
+ ${60:this.prop = \"\"}\n\
+ }).call(${1:class}.prototype);\n\
+ \n\
+ exports.${1:class} = ${1:class};\n\
+# \n\
+snippet for-\n\
+ for (var ${1:i} = ${2:Things}.length; ${1:i}--; ) {\n\
+ ${0:${2:Things}[${1:i}];}\n\
+ }\n\
+# for (...) {...}\n\
+snippet for\n\
+ for (var ${1:i} = 0; $1 < ${2:Things}.length; $1++) {\n\
+ ${3:$2[$1]}$0\n\
+ }\n\
+# for (...) {...} (Improved Native For-Loop)\n\
+snippet forr\n\
+ for (var ${1:i} = ${2:Things}.length - 1; $1 >= 0; $1--) {\n\
+ ${3:$2[$1]}$0\n\
+ }\n\
+\n\
+\n\
+#modules\n\
+snippet def\n\
+ define(function(require, exports, module) {\n\
+ \"use strict\";\n\
+ var ${1/.*\\///} = require(\"${1}\");\n\
+ \n\
+ $TM_SELECTED_TEXT\n\
+ });\n\
+snippet req\n\
+guard ^\\s*\n\
+ var ${1/.*\\///} = require(\"${1}\");\n\
+ $0\n\
+snippet requ\n\
+guard ^\\s*\n\
+ var ${1/.*\\/(.)/\\u$1/} = require(\"${1}\").${1/.*\\/(.)/\\u$1/};\n\
+ $0\n\
+";
+exports.scope = "javascript";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/json.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/json.js
new file mode 100644
index 00000000..cc02e651
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/json.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/json",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "json";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/jsoniq.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/jsoniq.js
new file mode 100644
index 00000000..9c5eaf61
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/jsoniq.js
@@ -0,0 +1,68 @@
+ace.define("ace/snippets/jsoniq",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet for\n\
+ for $${1:item} in ${2:expr}\n\
+snippet return\n\
+ return ${1:expr}\n\
+snippet import\n\
+ import module namespace ${1:ns} = \"${2:http://www.example.com/}\";\n\
+snippet some\n\
+ some $${1:varname} in ${2:expr} satisfies ${3:expr}\n\
+snippet every\n\
+ every $${1:varname} in ${2:expr} satisfies ${3:expr}\n\
+snippet if\n\
+ if(${1:true}) then ${2:expr} else ${3:true}\n\
+snippet switch\n\
+ switch(${1:\"foo\"})\n\
+ case ${2:\"foo\"}\n\
+ return ${3:true}\n\
+ default return ${4:false}\n\
+snippet try\n\
+ try { ${1:expr} } catch ${2:*} { ${3:expr} }\n\
+snippet tumbling\n\
+ for tumbling window $${1:varname} in ${2:expr}\n\
+ start at $${3:start} when ${4:expr}\n\
+ end at $${5:end} when ${6:expr}\n\
+ return ${7:expr}\n\
+snippet sliding\n\
+ for sliding window $${1:varname} in ${2:expr}\n\
+ start at $${3:start} when ${4:expr}\n\
+ end at $${5:end} when ${6:expr}\n\
+ return ${7:expr}\n\
+snippet let\n\
+ let $${1:varname} := ${2:expr}\n\
+snippet group\n\
+ group by $${1:varname} := ${2:expr}\n\
+snippet order\n\
+ order by ${1:expr} ${2:descending}\n\
+snippet stable\n\
+ stable order by ${1:expr}\n\
+snippet count\n\
+ count $${1:varname}\n\
+snippet ordered\n\
+ ordered { ${1:expr} }\n\
+snippet unordered\n\
+ unordered { ${1:expr} }\n\
+snippet treat \n\
+ treat as ${1:expr}\n\
+snippet castable\n\
+ castable as ${1:atomicType}\n\
+snippet cast\n\
+ cast as ${1:atomicType}\n\
+snippet typeswitch\n\
+ typeswitch(${1:expr})\n\
+ case ${2:type} return ${3:expr}\n\
+ default return ${4:expr}\n\
+snippet var\n\
+ declare variable $${1:varname} := ${2:expr};\n\
+snippet fn\n\
+ declare function ${1:ns}:${2:name}(){\n\
+ ${3:expr}\n\
+ };\n\
+snippet module\n\
+ module namespace ${1:ns} = \"${2:http://www.example.com}\";\n\
+";
+exports.scope = "jsoniq";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/jsp.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/jsp.js
new file mode 100644
index 00000000..6428e5be
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/jsp.js
@@ -0,0 +1,106 @@
+ace.define("ace/snippets/jsp",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet @page\n\
+ <%@page contentType=\"text/html\" pageEncoding=\"UTF-8\"%>\n\
+snippet jstl\n\
+ <%@ taglib uri=\"http://java.sun.com/jsp/jstl/core\" prefix=\"c\" %>\n\
+ <%@ taglib uri=\"http://java.sun.com/jsp/jstl/functions\" prefix=\"fn\" %>\n\
+snippet jstl:c\n\
+ <%@ taglib uri=\"http://java.sun.com/jsp/jstl/core\" prefix=\"c\" %>\n\
+snippet jstl:fn\n\
+ <%@ taglib uri=\"http://java.sun.com/jsp/jstl/functions\" prefix=\"fn\" %>\n\
+snippet cpath\n\
+ ${pageContext.request.contextPath}\n\
+snippet cout\n\
+ <c:out value=\"${1}\" default=\"${2}\" />\n\
+snippet cset\n\
+ <c:set var=\"${1}\" value=\"${2}\" />\n\
+snippet cremove\n\
+ <c:remove var=\"${1}\" scope=\"${2:page}\" />\n\
+snippet ccatch\n\
+ <c:catch var=\"${1}\" />\n\
+snippet cif\n\
+ <c:if test=\"${${1}}\">\n\
+ ${2}\n\
+ </c:if>\n\
+snippet cchoose\n\
+ <c:choose>\n\
+ ${1}\n\
+ </c:choose>\n\
+snippet cwhen\n\
+ <c:when test=\"${${1}}\">\n\
+ ${2}\n\
+ </c:when>\n\
+snippet cother\n\
+ <c:otherwise>\n\
+ ${1}\n\
+ </c:otherwise>\n\
+snippet cfore\n\
+ <c:forEach items=\"${${1}}\" var=\"${2}\" varStatus=\"${3}\">\n\
+ ${4:<c:out value=\"$2\" />}\n\
+ </c:forEach>\n\
+snippet cfort\n\
+ <c:set var=\"${1}\">${2:item1,item2,item3}</c:set>\n\
+ <c:forTokens var=\"${3}\" items=\"${$1}\" delims=\"${4:,}\">\n\
+ ${5:<c:out value=\"$3\" />}\n\
+ </c:forTokens>\n\
+snippet cparam\n\
+ <c:param name=\"${1}\" value=\"${2}\" />\n\
+snippet cparam+\n\
+ <c:param name=\"${1}\" value=\"${2}\" />\n\
+ cparam+${3}\n\
+snippet cimport\n\
+ <c:import url=\"${1}\" />\n\
+snippet cimport+\n\
+ <c:import url=\"${1}\">\n\
+ <c:param name=\"${2}\" value=\"${3}\" />\n\
+ cparam+${4}\n\
+ </c:import>\n\
+snippet curl\n\
+ <c:url value=\"${1}\" var=\"${2}\" />\n\
+ <a href=\"${$2}\">${3}</a>\n\
+snippet curl+\n\
+ <c:url value=\"${1}\" var=\"${2}\">\n\
+ <c:param name=\"${4}\" value=\"${5}\" />\n\
+ cparam+${6}\n\
+ </c:url>\n\
+ <a href=\"${$2}\">${3}</a>\n\
+snippet credirect\n\
+ <c:redirect url=\"${1}\" />\n\
+snippet contains\n\
+ ${fn:contains(${1:string}, ${2:substr})}\n\
+snippet contains:i\n\
+ ${fn:containsIgnoreCase(${1:string}, ${2:substr})}\n\
+snippet endswith\n\
+ ${fn:endsWith(${1:string}, ${2:suffix})}\n\
+snippet escape\n\
+ ${fn:escapeXml(${1:string})}\n\
+snippet indexof\n\
+ ${fn:indexOf(${1:string}, ${2:substr})}\n\
+snippet join\n\
+ ${fn:join(${1:collection}, ${2:delims})}\n\
+snippet length\n\
+ ${fn:length(${1:collection_or_string})}\n\
+snippet replace\n\
+ ${fn:replace(${1:string}, ${2:substr}, ${3:replace})}\n\
+snippet split\n\
+ ${fn:split(${1:string}, ${2:delims})}\n\
+snippet startswith\n\
+ ${fn:startsWith(${1:string}, ${2:prefix})}\n\
+snippet substr\n\
+ ${fn:substring(${1:string}, ${2:begin}, ${3:end})}\n\
+snippet substr:a\n\
+ ${fn:substringAfter(${1:string}, ${2:substr})}\n\
+snippet substr:b\n\
+ ${fn:substringBefore(${1:string}, ${2:substr})}\n\
+snippet lc\n\
+ ${fn:toLowerCase(${1:string})}\n\
+snippet uc\n\
+ ${fn:toUpperCase(${1:string})}\n\
+snippet trim\n\
+ ${fn:trim(${1:string})}\n\
+";
+exports.scope = "jsp";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/jsx.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/jsx.js
new file mode 100644
index 00000000..9f39a943
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/jsx.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/jsx",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "jsx";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/julia.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/julia.js
new file mode 100644
index 00000000..e81370f7
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/julia.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/julia",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "julia";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/kotlin.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/kotlin.js
new file mode 100644
index 00000000..d78bd463
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/kotlin.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/kotlin",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/latex.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/latex.js
new file mode 100644
index 00000000..e6fe7612
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/latex.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/latex",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "latex";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/less.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/less.js
new file mode 100644
index 00000000..148aa0cd
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/less.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/less",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "less";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/liquid.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/liquid.js
new file mode 100644
index 00000000..c7f708dc
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/liquid.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/liquid",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "liquid";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/lisp.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/lisp.js
new file mode 100644
index 00000000..410b807f
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/lisp.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/lisp",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "lisp";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/livescript.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/livescript.js
new file mode 100644
index 00000000..37ea1c14
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/livescript.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/livescript",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "livescript";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/logiql.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/logiql.js
new file mode 100644
index 00000000..77943f3a
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/logiql.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/logiql",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "logiql";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/lsl.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/lsl.js
new file mode 100644
index 00000000..717a5cf3
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/lsl.js
@@ -0,0 +1,1239 @@
+ace.define("ace/snippets/lsl",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet @\n\
+ @${1:label};\n\
+snippet CAMERA_ACTIVE\n\
+ CAMERA_ACTIVE, ${1:integer isActive}, $0\n\
+snippet CAMERA_BEHINDNESS_ANGLE\n\
+ CAMERA_BEHINDNESS_ANGLE, ${1:float degrees}, $0\n\
+snippet CAMERA_BEHINDNESS_LAG\n\
+ CAMERA_BEHINDNESS_LAG, ${1:float seconds}, $0\n\
+snippet CAMERA_DISTANCE\n\
+ CAMERA_DISTANCE, ${1:float meters}, $0\n\
+snippet CAMERA_FOCUS\n\
+ CAMERA_FOCUS, ${1:vector position}, $0\n\
+snippet CAMERA_FOCUS_LAG\n\
+ CAMERA_FOCUS_LAG, ${1:float seconds}, $0\n\
+snippet CAMERA_FOCUS_LOCKED\n\
+ CAMERA_FOCUS_LOCKED, ${1:integer isLocked}, $0\n\
+snippet CAMERA_FOCUS_OFFSET\n\
+ CAMERA_FOCUS_OFFSET, ${1:vector meters}, $0\n\
+snippet CAMERA_FOCUS_THRESHOLD\n\
+ CAMERA_FOCUS_THRESHOLD, ${1:float meters}, $0\n\
+snippet CAMERA_PITCH\n\
+ CAMERA_PITCH, ${1:float degrees}, $0\n\
+snippet CAMERA_POSITION\n\
+ CAMERA_POSITION, ${1:vector position}, $0\n\
+snippet CAMERA_POSITION_LAG\n\
+ CAMERA_POSITION_LAG, ${1:float seconds}, $0\n\
+snippet CAMERA_POSITION_LOCKED\n\
+ CAMERA_POSITION_LOCKED, ${1:integer isLocked}, $0\n\
+snippet CAMERA_POSITION_THRESHOLD\n\
+ CAMERA_POSITION_THRESHOLD, ${1:float meters}, $0\n\
+snippet CHARACTER_AVOIDANCE_MODE\n\
+ CHARACTER_AVOIDANCE_MODE, ${1:integer flags}, $0\n\
+snippet CHARACTER_DESIRED_SPEED\n\
+ CHARACTER_DESIRED_SPEED, ${1:float speed}, $0\n\
+snippet CHARACTER_DESIRED_TURN_SPEED\n\
+ CHARACTER_DESIRED_TURN_SPEED, ${1:float speed}, $0\n\
+snippet CHARACTER_LENGTH\n\
+ CHARACTER_LENGTH, ${1:float length}, $0\n\
+snippet CHARACTER_MAX_TURN_RADIUS\n\
+ CHARACTER_MAX_TURN_RADIUS, ${1:float radius}, $0\n\
+snippet CHARACTER_ORIENTATION\n\
+ CHARACTER_ORIENTATION, ${1:integer orientation}, $0\n\
+snippet CHARACTER_RADIUS\n\
+ CHARACTER_RADIUS, ${1:float radius}, $0\n\
+snippet CHARACTER_STAY_WITHIN_PARCEL\n\
+ CHARACTER_STAY_WITHIN_PARCEL, ${1:boolean stay}, $0\n\
+snippet CHARACTER_TYPE\n\
+ CHARACTER_TYPE, ${1:integer type}, $0\n\
+snippet HTTP_BODY_MAXLENGTH\n\
+ HTTP_BODY_MAXLENGTH, ${1:integer length}, $0\n\
+snippet HTTP_CUSTOM_HEADER\n\
+ HTTP_CUSTOM_HEADER, ${1:string name}, ${2:string value}, $0\n\
+snippet HTTP_METHOD\n\
+ HTTP_METHOD, ${1:string method}, $0\n\
+snippet HTTP_MIMETYPE\n\
+ HTTP_MIMETYPE, ${1:string mimeType}, $0\n\
+snippet HTTP_PRAGMA_NO_CACHE\n\
+ HTTP_PRAGMA_NO_CACHE, ${1:integer send_header}, $0\n\
+snippet HTTP_VERBOSE_THROTTLE\n\
+ HTTP_VERBOSE_THROTTLE, ${1:integer noisy}, $0\n\
+snippet HTTP_VERIFY_CERT\n\
+ HTTP_VERIFY_CERT, ${1:integer verify}, $0\n\
+snippet RC_DATA_FLAGS\n\
+ RC_DATA_FLAGS, ${1:integer flags}, $0\n\
+snippet RC_DETECT_PHANTOM\n\
+ RC_DETECT_PHANTOM, ${1:integer dectedPhantom}, $0\n\
+snippet RC_MAX_HITS\n\
+ RC_MAX_HITS, ${1:integer maxHits}, $0\n\
+snippet RC_REJECT_TYPES\n\
+ RC_REJECT_TYPES, ${1:integer filterMask}, $0\n\
+snippet at_rot_target\n\
+ at_rot_target(${1:integer handle}, ${2:rotation targetrot}, ${3:rotation ourrot})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet at_target\n\
+ at_target(${1:integer tnum}, ${2:vector targetpos}, ${3:vector ourpos})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet attach\n\
+ attach(${1:key id})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet changed\n\
+ changed(${1:integer change})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet collision\n\
+ collision(${1:integer index})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet collision_end\n\
+ collision_end(${1:integer index})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet collision_start\n\
+ collision_start(${1:integer index})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet control\n\
+ control(${1:key id}, ${2:integer level}, ${3:integer edge})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet dataserver\n\
+ dataserver(${1:key query_id}, ${2:string data})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet do\n\
+ do\n\
+ {\n\
+ $0\n\
+ }\n\
+ while (${1:condition});\n\
+snippet else\n\
+ else\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet email\n\
+ email(${1:string time}, ${2:string address}, ${3:string subject}, ${4:string message}, ${5:integer num_left})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet experience_permissions\n\
+ experience_permissions(${1:key agent_id})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet experience_permissions_denied\n\
+ experience_permissions_denied(${1:key agent_id}, ${2:integer reason})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet for\n\
+ for (${1:start}; ${3:condition}; ${3:step})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet http_request\n\
+ http_request(${1:key request_id}, ${2:string method}, ${3:string body})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet http_response\n\
+ http_response(${1:key request_id}, ${2:integer status}, ${3:list metadata}, ${4:string body})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet if\n\
+ if (${1:condition})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet jump\n\
+ jump ${1:label};\n\
+snippet land_collision\n\
+ land_collision(${1:vector pos})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet land_collision_end\n\
+ land_collision_end(${1:vector pos})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet land_collision_start\n\
+ land_collision_start(${1:vector pos})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet link_message\n\
+ link_message(${1:integer sender_num}, ${2:integer num}, ${3:string str}, ${4:key id})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet listen\n\
+ listen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string message})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet llAbs\n\
+ llAbs(${1:integer val})\n\
+snippet llAcos\n\
+ llAcos(${1:float val})\n\
+snippet llAddToLandBanList\n\
+ llAddToLandBanList(${1:key agent}, ${2:float hours});\n\
+ $0\n\
+snippet llAddToLandPassList\n\
+ llAddToLandPassList(${1:key agent}, ${2:float hours});\n\
+ $0\n\
+snippet llAdjustSoundVolume\n\
+ llAdjustSoundVolume(${1:float volume});\n\
+ $0\n\
+snippet llAgentInExperience\n\
+ llAgentInExperience(${1:key agent})\n\
+snippet llAllowInventoryDrop\n\
+ llAllowInventoryDrop(${1:integer add});\n\
+ $0\n\
+snippet llAngleBetween\n\
+ llAngleBetween(${1:rotation a}, ${2:rotation b})\n\
+snippet llApplyImpulse\n\
+ llApplyImpulse(${1:vector force}, ${2:integer local});\n\
+ $0\n\
+snippet llApplyRotationalImpulse\n\
+ llApplyRotationalImpulse(${1:vector force}, ${2:integer local});\n\
+ $0\n\
+snippet llAsin\n\
+ llAsin(${1:float val})\n\
+snippet llAtan2\n\
+ llAtan2(${1:float y}, ${2:float x})\n\
+snippet llAttachToAvatar\n\
+ llAttachToAvatar(${1:integer attach_point});\n\
+ $0\n\
+snippet llAttachToAvatarTemp\n\
+ llAttachToAvatarTemp(${1:integer attach_point});\n\
+ $0\n\
+snippet llAvatarOnLinkSitTarget\n\
+ llAvatarOnLinkSitTarget(${1:integer link})\n\
+snippet llAvatarOnSitTarget\n\
+ llAvatarOnSitTarget()\n\
+snippet llAxes2Rot\n\
+ llAxes2Rot(${1:vector fwd}, ${2:vector left}, ${3:vector up})\n\
+snippet llAxisAngle2Rot\n\
+ llAxisAngle2Rot(${1:vector axis}, ${2:float angle})\n\
+snippet llBase64ToInteger\n\
+ llBase64ToInteger(${1:string str})\n\
+snippet llBase64ToString\n\
+ llBase64ToString(${1:string str})\n\
+snippet llBreakAllLinks\n\
+ llBreakAllLinks();\n\
+ $0\n\
+snippet llBreakLink\n\
+ llBreakLink(${1:integer link});\n\
+ $0\n\
+snippet llCastRay\n\
+ llCastRay(${1:vector start}, ${2:vector end}, ${3:list options});\n\
+ $0\n\
+snippet llCeil\n\
+ llCeil(${1:float val})\n\
+snippet llClearCameraParams\n\
+ llClearCameraParams();\n\
+ $0\n\
+snippet llClearLinkMedia\n\
+ llClearLinkMedia(${1:integer link}, ${2:integer face});\n\
+ $0\n\
+snippet llClearPrimMedia\n\
+ llClearPrimMedia(${1:integer face});\n\
+ $0\n\
+snippet llCloseRemoteDataChannel\n\
+ llCloseRemoteDataChannel(${1:key channel});\n\
+ $0\n\
+snippet llCollisionFilter\n\
+ llCollisionFilter(${1:string name}, ${2:key id}, ${3:integer accept});\n\
+ $0\n\
+snippet llCollisionSound\n\
+ llCollisionSound(${1:string impact_sound}, ${2:float impact_volume});\n\
+ $0\n\
+snippet llCos\n\
+ llCos(${1:float theta})\n\
+snippet llCreateCharacter\n\
+ llCreateCharacter(${1:list options});\n\
+ $0\n\
+snippet llCreateKeyValue\n\
+ llCreateKeyValue(${1:string k})\n\
+snippet llCreateLink\n\
+ llCreateLink(${1:key target}, ${2:integer parent});\n\
+ $0\n\
+snippet llCSV2List\n\
+ llCSV2List(${1:string src})\n\
+snippet llDataSizeKeyValue\n\
+ llDataSizeKeyValue()\n\
+snippet llDeleteCharacter\n\
+ llDeleteCharacter();\n\
+ $0\n\
+snippet llDeleteKeyValue\n\
+ llDeleteKeyValue(${1:string k})\n\
+snippet llDeleteSubList\n\
+ llDeleteSubList(${1:list src}, ${2:integer start}, ${3:integer end})\n\
+snippet llDeleteSubString\n\
+ llDeleteSubString(${1:string src}, ${2:integer start}, ${3:integer end})\n\
+snippet llDetachFromAvatar\n\
+ llDetachFromAvatar();\n\
+ $0\n\
+snippet llDetectedGrab\n\
+ llDetectedGrab(${1:integer number})\n\
+snippet llDetectedGroup\n\
+ llDetectedGroup(${1:integer number})\n\
+snippet llDetectedKey\n\
+ llDetectedKey(${1:integer number})\n\
+snippet llDetectedLinkNumber\n\
+ llDetectedLinkNumber(${1:integer number})\n\
+snippet llDetectedName\n\
+ llDetectedName(${1:integer number})\n\
+snippet llDetectedOwner\n\
+ llDetectedOwner(${1:integer number})\n\
+snippet llDetectedPos\n\
+ llDetectedPosl(${1:integer number})\n\
+snippet llDetectedRot\n\
+ llDetectedRot(${1:integer number})\n\
+snippet llDetectedTouchBinormal\n\
+ llDetectedTouchBinormal(${1:integer number})\n\
+snippet llDetectedTouchFace\n\
+ llDetectedTouchFace(${1:integer number})\n\
+snippet llDetectedTouchNormal\n\
+ llDetectedTouchNormal(${1:integer number})\n\
+snippet llDetectedTouchPos\n\
+ llDetectedTouchPos(${1:integer number})\n\
+snippet llDetectedTouchST\n\
+ llDetectedTouchST(${1:integer number})\n\
+snippet llDetectedTouchUV\n\
+ llDetectedTouchUV(${1:integer number})\n\
+snippet llDetectedType\n\
+ llDetectedType(${1:integer number})\n\
+snippet llDetectedVel\n\
+ llDetectedVel(${1:integer number})\n\
+snippet llDialog\n\
+ llDialog(${1:key agent}, ${2:string message}, ${3:list buttons}, ${4:integer channel});\n\
+ $0\n\
+snippet llDie\n\
+ llDie();\n\
+ $0\n\
+snippet llDumpList2String\n\
+ llDumpList2String(${1:list src}, ${2:string separator})\n\
+snippet llEdgeOfWorld\n\
+ llEdgeOfWorld(${1:vector pos}, ${2:vector dir})\n\
+snippet llEjectFromLand\n\
+ llEjectFromLand(${1:key agent});\n\
+ $0\n\
+snippet llEmail\n\
+ llEmail(${1:string address}, ${2:string subject}, ${3:string message});\n\
+ $0\n\
+snippet llEscapeURL\n\
+ llEscapeURL(${1:string url})\n\
+snippet llEuler2Rot\n\
+ llEuler2Rot(${1:vector v})\n\
+snippet llExecCharacterCmd\n\
+ llExecCharacterCmd(${1:integer command}, ${2:list options});\n\
+ $0\n\
+snippet llEvade\n\
+ llEvade(${1:key target}, ${2:list options});\n\
+ $0\n\
+snippet llFabs\n\
+ llFabs(${1:float val})\n\
+snippet llFleeFrom\n\
+ llFleeFrom(${1:vector position}, ${2:float distance}, ${3:list options});\n\
+ $0\n\
+snippet llFloor\n\
+ llFloor(${1:float val})\n\
+snippet llForceMouselook\n\
+ llForceMouselook(${1:integer mouselook});\n\
+ $0\n\
+snippet llFrand\n\
+ llFrand(${1:float mag})\n\
+snippet llGenerateKey\n\
+ llGenerateKey()\n\
+snippet llGetAccel\n\
+ llGetAccel()\n\
+snippet llGetAgentInfo\n\
+ llGetAgentInfo(${1:key id})\n\
+snippet llGetAgentLanguage\n\
+ llGetAgentLanguage(${1:key agent})\n\
+snippet llGetAgentList\n\
+ llGetAgentList(${1:integer scope}, ${2:list options})\n\
+snippet llGetAgentSize\n\
+ llGetAgentSize(${1:key agent})\n\
+snippet llGetAlpha\n\
+ llGetAlpha(${1:integer face})\n\
+snippet llGetAndResetTime\n\
+ llGetAndResetTime()\n\
+snippet llGetAnimation\n\
+ llGetAnimation(${1:key id})\n\
+snippet llGetAnimationList\n\
+ llGetAnimationList(${1:key agent})\n\
+snippet llGetAnimationOverride\n\
+ llGetAnimationOverride(${1:string anim_state})\n\
+snippet llGetAttached\n\
+ llGetAttached()\n\
+snippet llGetAttachedList\n\
+ llGetAttachedList(${1:key id})\n\
+snippet llGetBoundingBox\n\
+ llGetBoundingBox(${1:key object})\n\
+snippet llGetCameraPos\n\
+ llGetCameraPos()\n\
+snippet llGetCameraRot\n\
+ llGetCameraRot()\n\
+snippet llGetCenterOfMass\n\
+ llGetCenterOfMass()\n\
+snippet llGetClosestNavPoint\n\
+ llGetClosestNavPoint(${1:vector point}, ${2:list options})\n\
+snippet llGetColor\n\
+ llGetColor(${1:integer face})\n\
+snippet llGetCreator\n\
+ llGetCreator()\n\
+snippet llGetDate\n\
+ llGetDate()\n\
+snippet llGetDisplayName\n\
+ llGetDisplayName(${1:key id})\n\
+snippet llGetEnergy\n\
+ llGetEnergy()\n\
+snippet llGetEnv\n\
+ llGetEnv(${1:string name})\n\
+snippet llGetExperienceDetails\n\
+ llGetExperienceDetails(${1:key experience_id})\n\
+snippet llGetExperienceErrorMessage\n\
+ llGetExperienceErrorMessage(${1:integer error})\n\
+snippet llGetForce\n\
+ llGetForce()\n\
+snippet llGetFreeMemory\n\
+ llGetFreeMemory()\n\
+snippet llGetFreeURLs\n\
+ llGetFreeURLs()\n\
+snippet llGetGeometricCenter\n\
+ llGetGeometricCenter()\n\
+snippet llGetGMTclock\n\
+ llGetGMTclock()\n\
+snippet llGetHTTPHeader\n\
+ llGetHTTPHeader(${1:key request_id}, ${2:string header})\n\
+snippet llGetInventoryCreator\n\
+ llGetInventoryCreator(${1:string item})\n\
+snippet llGetInventoryKey\n\
+ llGetInventoryKey(${1:string name})\n\
+snippet llGetInventoryName\n\
+ llGetInventoryName(${1:integer type}, ${2:integer number})\n\
+snippet llGetInventoryNumber\n\
+ llGetInventoryNumber(${1:integer type})\n\
+snippet llGetInventoryPermMask\n\
+ llGetInventoryPermMask(${1:string item}, ${2:integer mask})\n\
+snippet llGetInventoryType\n\
+ llGetInventoryType(${1:string name})\n\
+snippet llGetKey\n\
+ llGetKey()\n\
+snippet llGetLandOwnerAt\n\
+ llGetLandOwnerAt(${1:vector pos})\n\
+snippet llGetLinkKey\n\
+ llGetLinkKey(${1:integer link})\n\
+snippet llGetLinkMedia\n\
+ llGetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params})\n\
+snippet llGetLinkName\n\
+ llGetLinkName(${1:integer link})\n\
+snippet llGetLinkNumber\n\
+ llGetLinkNumber()\n\
+snippet llGetLinkNumberOfSides\n\
+ llGetLinkNumberOfSides(${1:integer link})\n\
+snippet llGetLinkPrimitiveParams\n\
+ llGetLinkPrimitiveParams(${1:integer link}, ${2:list params})\n\
+snippet llGetListEntryType\n\
+ llGetListEntryType(${1:list src}, ${2:integer index})\n\
+snippet llGetListLength\n\
+ llGetListLength(${1:list src})\n\
+snippet llGetLocalPos\n\
+ llGetLocalPos()\n\
+snippet llGetLocalRot\n\
+ llGetLocalRot()\n\
+snippet llGetMass\n\
+ llGetMass()\n\
+snippet llGetMassMKS\n\
+ llGetMassMKS()\n\
+snippet llGetMaxScaleFactor\n\
+ llGetMaxScaleFactor()\n\
+snippet llGetMemoryLimit\n\
+ llGetMemoryLimit()\n\
+snippet llGetMinScaleFactor\n\
+ llGetMinScaleFactor()\n\
+snippet llGetNextEmail\n\
+ llGetNextEmail(${1:string address}, ${2:string subject});\n\
+ $0\n\
+snippet llGetNotecardLine\n\
+ llGetNotecardLine(${1:string name}, ${2:integer line})\n\
+snippet llGetNumberOfNotecardLines\n\
+ llGetNumberOfNotecardLines(${1:string name})\n\
+snippet llGetNumberOfPrims\n\
+ llGetNumberOfPrims()\n\
+snippet llGetNumberOfSides\n\
+ llGetNumberOfSides()\n\
+snippet llGetObjectDesc\n\
+ llGetObjectDesc()\n\
+snippet llGetObjectDetails\n\
+ llGetObjectDetails(${1:key id}, ${2:list params})\n\
+snippet llGetObjectMass\n\
+ llGetObjectMass(${1:key id})\n\
+snippet llGetObjectName\n\
+ llGetObjectName()\n\
+snippet llGetObjectPermMask\n\
+ llGetObjectPermMask(${1:integer mask})\n\
+snippet llGetObjectPrimCount\n\
+ llGetObjectPrimCount(${1:key prim})\n\
+snippet llGetOmega\n\
+ llGetOmega()\n\
+snippet llGetOwner\n\
+ llGetOwner()\n\
+snippet llGetOwnerKey\n\
+ llGetOwnerKey(${1:key id})\n\
+snippet llGetParcelDetails\n\
+ llGetParcelDetails(${1:vector pos}, ${2:list params})\n\
+snippet llGetParcelFlags\n\
+ llGetParcelFlags(${1:vector pos})\n\
+snippet llGetParcelMaxPrims\n\
+ llGetParcelMaxPrims(${1:vector pos}, ${2:integer sim_wide})\n\
+snippet llGetParcelMusicURL\n\
+ llGetParcelMusicURL()\n\
+snippet llGetParcelPrimCount\n\
+ llGetParcelPrimCount(${1:vector pos}, ${2:integer category}, ${3:integer sim_wide})\n\
+snippet llGetParcelPrimOwners\n\
+ llGetParcelPrimOwners(${1:vector pos})\n\
+snippet llGetPermissions\n\
+ llGetPermissions()\n\
+snippet llGetPermissionsKey\n\
+ llGetPermissionsKey()\n\
+snippet llGetPhysicsMaterial\n\
+ llGetPhysicsMaterial()\n\
+snippet llGetPos\n\
+ llGetPos()\n\
+snippet llGetPrimitiveParams\n\
+ llGetPrimitiveParams(${1:list params})\n\
+snippet llGetPrimMediaParams\n\
+ llGetPrimMediaParams(${1:integer face}, ${2:list params})\n\
+snippet llGetRegionAgentCount\n\
+ llGetRegionAgentCount()\n\
+snippet llGetRegionCorner\n\
+ llGetRegionCorner()\n\
+snippet llGetRegionFlags\n\
+ llGetRegionFlags()\n\
+snippet llGetRegionFPS\n\
+ llGetRegionFPS()\n\
+snippet llGetRegionName\n\
+ llGetRegionName()\n\
+snippet llGetRegionTimeDilation\n\
+ llGetRegionTimeDilation()\n\
+snippet llGetRootPosition\n\
+ llGetRootPosition()\n\
+snippet llGetRootRotation\n\
+ llGetRootRotation()\n\
+snippet llGetRot\n\
+ llGetRot()\n\
+snippet llGetScale\n\
+ llGetScale()\n\
+snippet llGetScriptName\n\
+ llGetScriptName()\n\
+snippet llGetScriptState\n\
+ llGetScriptState(${1:string script})\n\
+snippet llGetSimStats\n\
+ llGetSimStats(${1:integer stat_type})\n\
+snippet llGetSimulatorHostname\n\
+ llGetSimulatorHostname()\n\
+snippet llGetSPMaxMemory\n\
+ llGetSPMaxMemory()\n\
+snippet llGetStartParameter\n\
+ llGetStartParameter()\n\
+snippet llGetStaticPath\n\
+ llGetStaticPath(${1:vector start}, ${2:vector end}, ${3:float radius}, ${4:list params})\n\
+snippet llGetStatus\n\
+ llGetStatus(${1:integer status})\n\
+snippet llGetSubString\n\
+ llGetSubString(${1:string src}, ${2:integer start}, ${3:integer end})\n\
+snippet llGetSunDirection\n\
+ llGetSunDirection()\n\
+snippet llGetTexture\n\
+ llGetTexture(${1:integer face})\n\
+snippet llGetTextureOffset\n\
+ llGetTextureOffset(${1:integer face})\n\
+snippet llGetTextureRot\n\
+ llGetTextureRot(${1:integer face})\n\
+snippet llGetTextureScale\n\
+ llGetTextureScale(${1:integer face})\n\
+snippet llGetTime\n\
+ llGetTime()\n\
+snippet llGetTimeOfDay\n\
+ llGetTimeOfDay()\n\
+snippet llGetTimestamp\n\
+ llGetTimestamp()\n\
+snippet llGetTorque\n\
+ llGetTorque()\n\
+snippet llGetUnixTime\n\
+ llGetUnixTime()\n\
+snippet llGetUsedMemory\n\
+ llGetUsedMemory()\n\
+snippet llGetUsername\n\
+ llGetUsername(${1:key id})\n\
+snippet llGetVel\n\
+ llGetVel()\n\
+snippet llGetWallclock\n\
+ llGetWallclock()\n\
+snippet llGiveInventory\n\
+ llGiveInventory(${1:key destination}, ${2:string inventory});\n\
+ $0\n\
+snippet llGiveInventoryList\n\
+ llGiveInventoryList(${1:key target}, ${2:string folder}, ${3:list inventory});\n\
+ $0\n\
+snippet llGiveMoney\n\
+ llGiveMoney(${1:key destination}, ${2:integer amount})\n\
+snippet llGround\n\
+ llGround(${1:vector offset})\n\
+snippet llGroundContour\n\
+ llGroundContour(${1:vector offset})\n\
+snippet llGroundNormal\n\
+ llGroundNormal(${1:vector offset})\n\
+snippet llGroundRepel\n\
+ llGroundRepel(${1:float height}, ${2:integer water}, ${3:float tau});\n\
+ $0\n\
+snippet llGroundSlope\n\
+ llGroundSlope(${1:vector offset})\n\
+snippet llHTTPRequest\n\
+ llHTTPRequest(${1:string url}, ${2:list parameters}, ${3:string body})\n\
+snippet llHTTPResponse\n\
+ llHTTPResponse(${1:key request_id}, ${2:integer status}, ${3:string body});\n\
+ $0\n\
+snippet llInsertString\n\
+ llInsertString(${1:string dst}, ${2:integer pos}, ${3:string src})\n\
+snippet llInstantMessage\n\
+ llInstantMessage(${1:key user}, ${2:string message});\n\
+ $0\n\
+snippet llIntegerToBase64\n\
+ llIntegerToBase64(${1:integer number})\n\
+snippet llJson2List\n\
+ llJson2List(${1:string json})\n\
+snippet llJsonGetValue\n\
+ llJsonGetValue(${1:string json}, ${2:list specifiers})\n\
+snippet llJsonSetValue\n\
+ llJsonSetValue(${1:string json}, ${2:list specifiers}, ${3:string newValue})\n\
+snippet llJsonValueType\n\
+ llJsonValueType(${1:string json}, ${2:list specifiers})\n\
+snippet llKey2Name\n\
+ llKey2Name(${1:key id})\n\
+snippet llKeyCountKeyValue\n\
+ llKeyCountKeyValue()\n\
+snippet llKeysKeyValue\n\
+ llKeysKeyValue(${1:integer first}, ${2:integer count})\n\
+snippet llLinkParticleSystem\n\
+ llLinkParticleSystem(${1:integer link}, ${2:list rules});\n\
+ $0\n\
+snippet llLinkSitTarget\n\
+ llLinkSitTarget(${1:integer link}, ${2:vector offset}, ${3:rotation rot});\n\
+ $0\n\
+snippet llList2CSV\n\
+ llList2CSV(${1:list src})\n\
+snippet llList2Float\n\
+ llList2Float(${1:list src}, ${2:integer index})\n\
+snippet llList2Integer\n\
+ llList2Integer(${1:list src}, ${2:integer index})\n\
+snippet llList2Json\n\
+ llList2Json(${1:string type}, ${2:list values})\n\
+snippet llList2Key\n\
+ llList2Key(${1:list src}, ${2:integer index})\n\
+snippet llList2List\n\
+ llList2List(${1:list src}, ${2:integer start}, ${3:integer end})\n\
+snippet llList2ListStrided\n\
+ llList2ListStrided(${1:list src}, ${2:integer start}, ${3:integer end}, ${4:integer stride})\n\
+snippet llList2Rot\n\
+ llList2Rot(${1:list src}, ${2:integer index})\n\
+snippet llList2String\n\
+ llList2String(${1:list src}, ${2:integer index})\n\
+snippet llList2Vector\n\
+ llList2Vector(${1:list src}, ${2:integer index})\n\
+snippet llListen\n\
+ llListen(${1:integer channel}, ${2:string name}, ${3:key id}, ${4:string msg})\n\
+snippet llListenControl\n\
+ llListenControl(${1:integer handle}, ${2:integer active});\n\
+ $0\n\
+snippet llListenRemove\n\
+ llListenRemove(${1:integer handle});\n\
+ $0\n\
+snippet llListFindList\n\
+ llListFindList(${1:list src}, ${2:list test})\n\
+snippet llListInsertList\n\
+ llListInsertList(${1:list dest}, ${2:list src}, ${3:integer start})\n\
+snippet llListRandomize\n\
+ llListRandomize(${1:list src}, ${2:integer stride})\n\
+snippet llListReplaceList\n\
+ llListReplaceList(${1:list dest}, ${2:list src}, ${3:integer start}, ${4:integer end})\n\
+snippet llListSort\n\
+ llListSort(${1:list src}, ${2:integer stride}, ${3:integer ascending})\n\
+snippet llListStatistics\n\
+ llListStatistics(${1:integer operation}, ${2:list src})\n\
+snippet llLoadURL\n\
+ llLoadURL(${1:key agent}, ${2:string message}, ${3:string url});\n\
+ $0\n\
+snippet llLog\n\
+ llLog(${1:float val})\n\
+snippet llLog10\n\
+ llLog10(${1:float val})\n\
+snippet llLookAt\n\
+ llLookAt(${1:vector target}, ${2:float strength}, ${3:float damping});\n\
+ $0\n\
+snippet llLoopSound\n\
+ llLoopSound(${1:string sound}, ${2:float volume});\n\
+ $0\n\
+snippet llLoopSoundMaster\n\
+ llLoopSoundMaster(${1:string sound}, ${2:float volume});\n\
+ $0\n\
+snippet llLoopSoundSlave\n\
+ llLoopSoundSlave(${1:string sound}, ${2:float volume});\n\
+ $0\n\
+snippet llManageEstateAccess\n\
+ llManageEstateAccess(${1:integer action}, ${2:key agent})\n\
+snippet llMapDestination\n\
+ llMapDestination(${1:string simname}, ${2:vector pos}, ${3:vector look_at});\n\
+ $0\n\
+snippet llMD5String\n\
+ llMD5String(${1:string src}, ${2:integer nonce})\n\
+snippet llMessageLinked\n\
+ llMessageLinked(${1:integer link}, ${2:integer num}, ${3:string str}, ${4:key id});\n\
+ $0\n\
+snippet llMinEventDelay\n\
+ llMinEventDelay(${1:float delay});\n\
+ $0\n\
+snippet llModifyLand\n\
+ llModifyLand(${1:integer action}, ${2:integer brush});\n\
+ $0\n\
+snippet llModPow\n\
+ llModPow(${1:integer a}, ${2:integer b}, ${3:integer c})\n\
+snippet llMoveToTarget\n\
+ llMoveToTarget(${1:vector target}, ${2:float tau});\n\
+ $0\n\
+snippet llNavigateTo\n\
+ llNavigateTo(${1:vector pos}, ${2:list options});\n\
+ $0\n\
+snippet llOffsetTexture\n\
+ llOffsetTexture(${1:float u}, ${2:float v}, ${3:integer face});\n\
+ $0\n\
+snippet llOpenRemoteDataChannel\n\
+ llOpenRemoteDataChannel();\n\
+ $0\n\
+snippet llOverMyLand\n\
+ llOverMyLand(${1:key id})\n\
+snippet llOwnerSay\n\
+ llOwnerSay(${1:string msg});\n\
+ $0\n\
+snippet llParcelMediaCommandList\n\
+ llParcelMediaCommandList(${1:list commandList});\n\
+ $0\n\
+snippet llParcelMediaQuery\n\
+ llParcelMediaQuery(${1:list query})\n\
+snippet llParseString2List\n\
+ llParseString2List(${1:string src}, ${2:list separators}, ${3:list spacers})\n\
+snippet llParseStringKeepNulls\n\
+ llParseStringKeepNulls(${1:string src}, ${2:list separators}, ${3:list spacers})\n\
+snippet llParticleSystem\n\
+ llParticleSystem(${1:list rules});\n\
+ $0\n\
+snippet llPassCollisions\n\
+ llPassCollisions(${1:integer pass});\n\
+ $0\n\
+snippet llPassTouches\n\
+ llPassTouches(${1:integer pass});\n\
+ $0\n\
+snippet llPatrolPoints\n\
+ llPatrolPoints(${1:list patrolPoints}, ${2:list options});\n\
+ $0\n\
+snippet llPlaySound\n\
+ llPlaySound(${1:string sound}, ${2:float volume});\n\
+ $0\n\
+snippet llPlaySoundSlave\n\
+ llPlaySoundSlave(${1:string sound}, ${2:float volume});\n\
+ $0\n\
+snippet llPow\n\
+ llPow(${1:float base}, ${2:float exponent})\n\
+snippet llPreloadSound\n\
+ llPreloadSound(${1:string sound});\n\
+ $0\n\
+snippet llPursue\n\
+ llPursue(${1:key target}, ${2:list options});\n\
+ $0\n\
+snippet llPushObject\n\
+ llPushObject(${1:key target}, ${2:vector impulse}, ${3:vector ang_impulse}, ${4:integer local});\n\
+ $0\n\
+snippet llReadKeyValue\n\
+ llReadKeyValue(${1:string k})\n\
+snippet llRegionSay\n\
+ llRegionSay(${1:integer channel}, ${2:string msg});\n\
+ $0\n\
+snippet llRegionSayTo\n\
+ llRegionSayTo(${1:key target}, ${2:integer channel}, ${3:string msg});\n\
+ $0\n\
+snippet llReleaseControls\n\
+ llReleaseControls();\n\
+ $0\n\
+snippet llReleaseURL\n\
+ llReleaseURL(${1:string url});\n\
+ $0\n\
+snippet llRemoteDataReply\n\
+ llRemoteDataReply(${1:key channel}, ${2:key message_id}, ${3:string sdata}, ${4:integer idata});\n\
+ $0\n\
+snippet llRemoteLoadScriptPin\n\
+ llRemoteLoadScriptPin(${1:key target}, ${2:string name}, ${3:integer pin}, ${4:integer running}, ${5:integer start_param});\n\
+ $0\n\
+snippet llRemoveFromLandBanList\n\
+ llRemoveFromLandBanList(${1:key agent});\n\
+ $0\n\
+snippet llRemoveFromLandPassList\n\
+ llRemoveFromLandPassList(${1:key agent});\n\
+ $0\n\
+snippet llRemoveInventory\n\
+ llRemoveInventory(${1:string item});\n\
+ $0\n\
+snippet llRemoveVehicleFlags\n\
+ llRemoveVehicleFlags(${1:integer flags});\n\
+ $0\n\
+snippet llRequestAgentData\n\
+ llRequestAgentData(${1:key id}, ${2:integer data})\n\
+snippet llRequestDisplayName\n\
+ llRequestDisplayName(${1:key id})\n\
+snippet llRequestExperiencePermissions\n\
+ llRequestExperiencePermissions(${1:key agent}, ${2:string name})\n\
+snippet llRequestInventoryData\n\
+ llRequestInventoryData(${1:string name})\n\
+snippet llRequestPermissions\n\
+ llRequestPermissions(${1:key agent}, ${2:integer permissions})\n\
+snippet llRequestSecureURL\n\
+ llRequestSecureURL()\n\
+snippet llRequestSimulatorData\n\
+ llRequestSimulatorData(${1:string region}, ${2:integer data})\n\
+snippet llRequestURL\n\
+ llRequestURL()\n\
+snippet llRequestUsername\n\
+ llRequestUsername(${1:key id})\n\
+snippet llResetAnimationOverride\n\
+ llResetAnimationOverride(${1:string anim_state});\n\
+ $0\n\
+snippet llResetLandBanList\n\
+ llResetLandBanList();\n\
+ $0\n\
+snippet llResetLandPassList\n\
+ llResetLandPassList();\n\
+ $0\n\
+snippet llResetOtherScript\n\
+ llResetOtherScript(${1:string name});\n\
+ $0\n\
+snippet llResetScript\n\
+ llResetScript();\n\
+ $0\n\
+snippet llResetTime\n\
+ llResetTime();\n\
+ $0\n\
+snippet llReturnObjectsByID\n\
+ llReturnObjectsByID(${1:list objects})\n\
+snippet llReturnObjectsByOwner\n\
+ llReturnObjectsByOwner(${1:key owner}, ${2:integer scope})\n\
+snippet llRezAtRoot\n\
+ llRezAtRoot(${1:string inventory}, ${2:vector position}, ${3:vector velocity}, ${4:rotation rot}, ${5:integer param});\n\
+ $0\n\
+snippet llRezObject\n\
+ llRezObject(${1:string inventory}, ${2:vector pos}, ${3:vector vel}, ${4:rotation rot}, ${5:integer param});\n\
+ $0\n\
+snippet llRot2Angle\n\
+ llRot2Angle(${1:rotation rot})\n\
+snippet llRot2Axis\n\
+ llRot2Axis(${1:rotation rot})\n\
+snippet llRot2Euler\n\
+ llRot2Euler(${1:rotation quat})\n\
+snippet llRot2Fwd\n\
+ llRot2Fwd(${1:rotation q})\n\
+snippet llRot2Left\n\
+ llRot2Left(${1:rotation q})\n\
+snippet llRot2Up\n\
+ llRot2Up(${1:rotation q})\n\
+snippet llRotateTexture\n\
+ llRotateTexture(${1:float angle}, ${2:integer face});\n\
+ $0\n\
+snippet llRotBetween\n\
+ llRotBetween(${1:vector start}, ${2:vector end})\n\
+snippet llRotLookAt\n\
+ llRotLookAt(${1:rotation target_direction}, ${2:float strength}, ${3:float damping});\n\
+ $0\n\
+snippet llRotTarget\n\
+ llRotTarget(${1:rotation rot}, ${2:float error})\n\
+snippet llRotTargetRemove\n\
+ llRotTargetRemove(${1:integer handle});\n\
+ $0\n\
+snippet llRound\n\
+ llRound(${1:float val})\n\
+snippet llSameGroup\n\
+ llSameGroup(${1:key group})\n\
+snippet llSay\n\
+ llSay(${1:integer channel}, ${2:string msg});\n\
+ $0\n\
+snippet llScaleByFactor\n\
+ llScaleByFactor(${1:float scaling_factor})\n\
+snippet llScaleTexture\n\
+ llScaleTexture(${1:float u}, ${2:float v}, ${3:integer face});\n\
+ $0\n\
+snippet llScriptDanger\n\
+ llScriptDanger(${1:vector pos})\n\
+snippet llScriptProfiler\n\
+ llScriptProfiler(${1:integer flags});\n\
+ $0\n\
+snippet llSendRemoteData\n\
+ llSendRemoteData(${1:key channel}, ${2:string dest}, ${3:integer idata}, ${4:string sdata})\n\
+snippet llSensor\n\
+ llSensor(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc});\n\
+ $0\n\
+snippet llSensorRepeat\n\
+ llSensorRepeat(${1:string name}, ${2:key id}, ${3:integer type}, ${4:float range}, ${5:float arc}, ${6:float rate});\n\
+ $0\n\
+snippet llSetAlpha\n\
+ llSetAlpha(${1:float alpha}, ${2:integer face});\n\
+ $0\n\
+snippet llSetAngularVelocity\n\
+ llSetAngularVelocity(${1:vector force}, ${2:integer local});\n\
+ $0\n\
+snippet llSetAnimationOverride\n\
+ llSetAnimationOverride(${1:string anim_state}, ${2:string anim})\n\
+snippet llSetBuoyancy\n\
+ llSetBuoyancy(${1:float buoyancy});\n\
+ $0\n\
+snippet llSetCameraAtOffset\n\
+ llSetCameraAtOffset(${1:vector offset});\n\
+ $0\n\
+snippet llSetCameraEyeOffset\n\
+ llSetCameraEyeOffset(${1:vector offset});\n\
+ $0\n\
+snippet llSetCameraParams\n\
+ llSetCameraParams(${1:list rules});\n\
+ $0\n\
+snippet llSetClickAction\n\
+ llSetClickAction(${1:integer action});\n\
+ $0\n\
+snippet llSetColor\n\
+ llSetColor(${1:vector color}, ${2:integer face});\n\
+ $0\n\
+snippet llSetContentType\n\
+ llSetContentType(${1:key request_id}, ${2:integer content_type});\n\
+ $0\n\
+snippet llSetDamage\n\
+ llSetDamage(${1:float damage});\n\
+ $0\n\
+snippet llSetForce\n\
+ llSetForce(${1:vector force}, ${2:integer local});\n\
+ $0\n\
+snippet llSetForceAndTorque\n\
+ llSetForceAndTorque(${1:vector force}, ${2:vector torque}, ${3:integer local});\n\
+ $0\n\
+snippet llSetHoverHeight\n\
+ llSetHoverHeight(${1:float height}, ${2:integer water}, ${3:float tau});\n\
+ $0\n\
+snippet llSetKeyframedMotion\n\
+ llSetKeyframedMotion(${1:list keyframes}, ${2:list options});\n\
+ $0\n\
+snippet llSetLinkAlpha\n\
+ llSetLinkAlpha(${1:integer link}, ${2:float alpha}, ${3:integer face});\n\
+ $0\n\
+snippet llSetLinkCamera\n\
+ llSetLinkCamera(${1:integer link}, ${2:vector eye}, ${3:vector at});\n\
+ $0\n\
+snippet llSetLinkColor\n\
+ llSetLinkColor(${1:integer link}, ${2:vector color}, ${3:integer face});\n\
+ $0\n\
+snippet llSetLinkMedia\n\
+ llSetLinkMedia(${1:integer link}, ${2:integer face}, ${3:list params});\n\
+ $0\n\
+snippet llSetLinkPrimitiveParams\n\
+ llSetLinkPrimitiveParams(${1:integer link}, ${2:list rules});\n\
+ $0\n\
+snippet llSetLinkPrimitiveParamsFast\n\
+ llSetLinkPrimitiveParamsFast(${1:integer link}, ${2:list rules});\n\
+ $0\n\
+snippet llSetLinkTexture\n\
+ llSetLinkTexture(${1:integer link}, ${2:string texture}, ${3:integer face});\n\
+ $0\n\
+snippet llSetLinkTextureAnim\n\
+ llSetLinkTextureAnim(${1:integer link}, ${2:integer mode}, ${3:integer face}, ${4:integer sizex}, ${5:integer sizey}, ${6:float start}, ${7:float length}, ${8:float rate});\n\
+ $0\n\
+snippet llSetLocalRot\n\
+ llSetLocalRot(${1:rotation rot});\n\
+ $0\n\
+snippet llSetMemoryLimit\n\
+ llSetMemoryLimit(${1:integer limit})\n\
+snippet llSetObjectDesc\n\
+ llSetObjectDesc(${1:string description});\n\
+ $0\n\
+snippet llSetObjectName\n\
+ llSetObjectName(${1:string name});\n\
+ $0\n\
+snippet llSetParcelMusicURL\n\
+ llSetParcelMusicURL(${1:string url});\n\
+ $0\n\
+snippet llSetPayPrice\n\
+ llSetPayPrice(${1:integer price}, [${2:integer price_button_a}, ${3:integer price_button_b}, ${4:integer price_button_c}, ${5:integer price_button_d}]);\n\
+ $0\n\
+snippet llSetPhysicsMaterial\n\
+ llSetPhysicsMaterial(${1:integer mask}, ${2:float gravity_multiplier}, ${3:float restitution}, ${4:float friction}, ${5:float density});\n\
+ $0\n\
+snippet llSetPos\n\
+ llSetPos(${1:vector pos});\n\
+ $0\n\
+snippet llSetPrimitiveParams\n\
+ llSetPrimitiveParams(${1:list rules});\n\
+ $0\n\
+snippet llSetPrimMediaParams\n\
+ llSetPrimMediaParams(${1:integer face}, ${2:list params});\n\
+ $0\n\
+snippet llSetRegionPos\n\
+ llSetRegionPos(${1:vector position})\n\
+snippet llSetRemoteScriptAccessPin\n\
+ llSetRemoteScriptAccessPin(${1:integer pin});\n\
+ $0\n\
+snippet llSetRot\n\
+ llSetRot(${1:rotation rot});\n\
+ $0\n\
+snippet llSetScale\n\
+ llSetScale(${1:vector size});\n\
+ $0\n\
+snippet llSetScriptState\n\
+ llSetScriptState(${1:string name}, ${2:integer run});\n\
+ $0\n\
+snippet llSetSitText\n\
+ llSetSitText(${1:string text});\n\
+ $0\n\
+snippet llSetSoundQueueing\n\
+ llSetSoundQueueing(${1:integer queue});\n\
+ $0\n\
+snippet llSetSoundRadius\n\
+ llSetSoundRadius(${1:float radius});\n\
+ $0\n\
+snippet llSetStatus\n\
+ llSetStatus(${1:integer status}, ${2:integer value});\n\
+ $0\n\
+snippet llSetText\n\
+ llSetText(${1:string text}, ${2:vector color}, ${3:float alpha});\n\
+ $0\n\
+snippet llSetTexture\n\
+ llSetTexture(${1:string texture}, ${2:integer face});\n\
+ $0\n\
+snippet llSetTextureAnim\n\
+ llSetTextureAnim(${1:integer mode}, ${2:integer face}, ${3:integer sizex}, ${4:integer sizey}, ${5:float start}, ${6:float length}, ${7:float rate});\n\
+ $0\n\
+snippet llSetTimerEvent\n\
+ llSetTimerEvent(${1:float sec});\n\
+ $0\n\
+snippet llSetTorque\n\
+ llSetTorque(${1:vector torque}, ${2:integer local});\n\
+ $0\n\
+snippet llSetTouchText\n\
+ llSetTouchText(${1:string text});\n\
+ $0\n\
+snippet llSetVehicleFlags\n\
+ llSetVehicleFlags(${1:integer flags});\n\
+ $0\n\
+snippet llSetVehicleFloatParam\n\
+ llSetVehicleFloatParam(${1:integer param}, ${2:float value});\n\
+ $0\n\
+snippet llSetVehicleRotationParam\n\
+ llSetVehicleRotationParam(${1:integer param}, ${2:rotation rot});\n\
+ $0\n\
+snippet llSetVehicleType\n\
+ llSetVehicleType(${1:integer type});\n\
+ $0\n\
+snippet llSetVehicleVectorParam\n\
+ llSetVehicleVectorParam(${1:integer param}, ${2:vector vec});\n\
+ $0\n\
+snippet llSetVelocity\n\
+ llSetVelocity(${1:vector force}, ${2:integer local});\n\
+ $0\n\
+snippet llSHA1String\n\
+ llSHA1String(${1:string src})\n\
+snippet llShout\n\
+ llShout(${1:integer channel}, ${2:string msg});\n\
+ $0\n\
+snippet llSin\n\
+ llSin(${1:float theta})\n\
+snippet llSitTarget\n\
+ llSitTarget(${1:vector offset}, ${2:rotation rot});\n\
+ $0\n\
+snippet llSleep\n\
+ llSleep(${1:float sec});\n\
+ $0\n\
+snippet llSqrt\n\
+ llSqrt(${1:float val})\n\
+snippet llStartAnimation\n\
+ llStartAnimation(${1:string anim});\n\
+ $0\n\
+snippet llStopAnimation\n\
+ llStopAnimation(${1:string anim});\n\
+ $0\n\
+snippet llStopHover\n\
+ llStopHover();\n\
+ $0\n\
+snippet llStopLookAt\n\
+ llStopLookAt();\n\
+ $0\n\
+snippet llStopMoveToTarget\n\
+ llStopMoveToTarget();\n\
+ $0\n\
+snippet llStopSound\n\
+ llStopSound();\n\
+ $0\n\
+snippet llStringLength\n\
+ llStringLength(${1:string str})\n\
+snippet llStringToBase64\n\
+ llStringToBase64(${1:string str})\n\
+snippet llStringTrim\n\
+ llStringTrim(${1:string src}, ${2:integer type})\n\
+snippet llSubStringIndex\n\
+ llSubStringIndex(${1:string source}, ${2:string pattern})\n\
+snippet llTakeControls\n\
+ llTakeControls(${1:integer controls}, ${2:integer accept}, ${3:integer pass_on});\n\
+ $0\n\
+snippet llTan\n\
+ llTan(${1:float theta})\n\
+snippet llTarget\n\
+ llTarget(${1:vector position}, ${2:float range})\n\
+snippet llTargetOmega\n\
+ llTargetOmega(${1:vector axis}, ${2:float spinrate}, ${3:float gain});\n\
+ $0\n\
+snippet llTargetRemove\n\
+ llTargetRemove(${1:integer handle});\n\
+ $0\n\
+snippet llTeleportAgent\n\
+ llTeleportAgent(${1:key agent}, ${2:string landmark}, ${3:vector position}, ${4:vector look_at});\n\
+ $0\n\
+snippet llTeleportAgentGlobalCoords\n\
+ llTeleportAgentGlobalCoords(${1:key agent}, ${2:vector global_coordinates}, ${3:vector region_coordinates}, ${4:vector look_at});\n\
+ $0\n\
+snippet llTeleportAgentHome\n\
+ llTeleportAgentHome(${1:key agent});\n\
+ $0\n\
+snippet llTextBox\n\
+ llTextBox(${1:key agent}, ${2:string message}, ${3:integer channel});\n\
+ $0\n\
+snippet llToLower\n\
+ llToLower(${1:string src})\n\
+snippet llToUpper\n\
+ llToUpper(${1:string src})\n\
+snippet llTransferLindenDollars\n\
+ llTransferLindenDollars(${1:key destination}, ${2:integer amount})\n\
+snippet llTriggerSound\n\
+ llTriggerSound(${1:string sound}, ${2:float volume});\n\
+ $0\n\
+snippet llTriggerSoundLimited\n\
+ llTriggerSoundLimited(${1:string sound}, ${2:float volume}, ${3:vector top_north_east}, ${4:vector bottom_south_west});\n\
+ $0\n\
+snippet llUnescapeURL\n\
+ llUnescapeURL(${1:string url})\n\
+snippet llUnSit\n\
+ llUnSit(${1:key id});\n\
+ $0\n\
+snippet llUpdateCharacter\n\
+ llUpdateCharacter(${1:list options})\n\
+snippet llUpdateKeyValue\n\
+ llUpdateKeyValue(${1:string k}, ${2:string v}, ${3:integer checked}, ${4:string ov})\n\
+snippet llVecDist\n\
+ llVecDist(${1:vector vec_a}, ${2:vector vec_b})\n\
+snippet llVecMag\n\
+ llVecMag(${1:vector vec})\n\
+snippet llVecNorm\n\
+ llVecNorm(${1:vector vec})\n\
+snippet llVolumeDetect\n\
+ llVolumeDetect(${1:integer detect});\n\
+ $0\n\
+snippet llWanderWithin\n\
+ llWanderWithin(${1:vector origin}, ${2:vector dist}, ${3:list options});\n\
+ $0\n\
+snippet llWater\n\
+ llWater(${1:vector offset});\n\
+ $0\n\
+snippet llWhisper\n\
+ llWhisper(${1:integer channel}, ${2:string msg});\n\
+ $0\n\
+snippet llWind\n\
+ llWind(${1:vector offset});\n\
+ $0\n\
+snippet llXorBase64\n\
+ llXorBase64(${1:string str1}, ${2:string str2})\n\
+snippet money\n\
+ money(${1:key id}, ${2:integer amount})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet object_rez\n\
+ object_rez(${1:key id})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet on_rez\n\
+ on_rez(${1:integer start_param})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet path_update\n\
+ path_update(${1:integer type}, ${2:list reserved})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet remote_data\n\
+ remote_data(${1:integer event_type}, ${2:key channel}, ${3:key message_id}, ${4:string sender}, ${5:integer idata}, ${6:string sdata})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet run_time_permissions\n\
+ run_time_permissions(${1:integer perm})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet sensor\n\
+ sensor(${1:integer index})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet state\n\
+ state ${1:name}\n\
+snippet touch\n\
+ touch(${1:integer index})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet touch_end\n\
+ touch_end(${1:integer index})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet touch_start\n\
+ touch_start(${1:integer index})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet transaction_result\n\
+ transaction_result(${1:key id}, ${2:integer success}, ${3:string data})\n\
+ {\n\
+ $0\n\
+ }\n\
+snippet while\n\
+ while (${1:condition})\n\
+ {\n\
+ $0\n\
+ }\n\
+";
+exports.scope = "lsl";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/lua.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/lua.js
new file mode 100644
index 00000000..c369b648
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/lua.js
@@ -0,0 +1,28 @@
+ace.define("ace/snippets/lua",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet #!\n\
+ #!/usr/bin/env lua\n\
+ $1\n\
+snippet local\n\
+ local ${1:x} = ${2:1}\n\
+snippet fun\n\
+ function ${1:fname}(${2:...})\n\
+ ${3:-- body}\n\
+ end\n\
+snippet for\n\
+ for ${1:i}=${2:1},${3:10} do\n\
+ ${4:print(i)}\n\
+ end\n\
+snippet forp\n\
+ for ${1:i},${2:v} in pairs(${3:table_name}) do\n\
+ ${4:-- body}\n\
+ end\n\
+snippet fori\n\
+ for ${1:i},${2:v} in ipairs(${3:table_name}) do\n\
+ ${4:-- body}\n\
+ end\n\
+";
+exports.scope = "lua";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/luapage.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/luapage.js
new file mode 100644
index 00000000..f1bcf091
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/luapage.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/luapage",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "luapage";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/lucene.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/lucene.js
new file mode 100644
index 00000000..8795919e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/lucene.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/lucene",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "lucene";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/makefile.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/makefile.js
new file mode 100644
index 00000000..6c02e0d6
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/makefile.js
@@ -0,0 +1,11 @@
+ace.define("ace/snippets/makefile",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet ifeq\n\
+ ifeq (${1:cond0},${2:cond1})\n\
+ ${3:code}\n\
+ endif\n\
+";
+exports.scope = "makefile";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/markdown.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/markdown.js
new file mode 100644
index 00000000..d05f16b9
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/markdown.js
@@ -0,0 +1,95 @@
+ace.define("ace/snippets/markdown",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# Markdown\n\
+\n\
+# Includes octopress (http://octopress.org/) snippets\n\
+\n\
+snippet [\n\
+ [${1:text}](http://${2:address} \"${3:title}\")\n\
+snippet [*\n\
+ [${1:link}](${2:`@*`} \"${3:title}\")${4}\n\
+\n\
+snippet [:\n\
+ [${1:id}]: http://${2:url} \"${3:title}\"\n\
+snippet [:*\n\
+ [${1:id}]: ${2:`@*`} \"${3:title}\"\n\
+\n\
+snippet ![\n\
+ ![${1:alttext}](${2:/images/image.jpg} \"${3:title}\")\n\
+snippet ![*\n\
+ ![${1:alt}](${2:`@*`} \"${3:title}\")${4}\n\
+\n\
+snippet ![:\n\
+ ![${1:id}]: ${2:url} \"${3:title}\"\n\
+snippet ![:*\n\
+ ![${1:id}]: ${2:`@*`} \"${3:title}\"\n\
+\n\
+snippet ===\n\
+regex /^/=+/=*//\n\
+ ${PREV_LINE/./=/g}\n\
+ \n\
+ ${0}\n\
+snippet ---\n\
+regex /^/-+/-*//\n\
+ ${PREV_LINE/./-/g}\n\
+ \n\
+ ${0}\n\
+snippet blockquote\n\
+ {% blockquote %}\n\
+ ${1:quote}\n\
+ {% endblockquote %}\n\
+\n\
+snippet blockquote-author\n\
+ {% blockquote ${1:author}, ${2:title} %}\n\
+ ${3:quote}\n\
+ {% endblockquote %}\n\
+\n\
+snippet blockquote-link\n\
+ {% blockquote ${1:author} ${2:URL} ${3:link_text} %}\n\
+ ${4:quote}\n\
+ {% endblockquote %}\n\
+\n\
+snippet bt-codeblock-short\n\
+ ```\n\
+ ${1:code_snippet}\n\
+ ```\n\
+\n\
+snippet bt-codeblock-full\n\
+ ``` ${1:language} ${2:title} ${3:URL} ${4:link_text}\n\
+ ${5:code_snippet}\n\
+ ```\n\
+\n\
+snippet codeblock-short\n\
+ {% codeblock %}\n\
+ ${1:code_snippet}\n\
+ {% endcodeblock %}\n\
+\n\
+snippet codeblock-full\n\
+ {% codeblock ${1:title} lang:${2:language} ${3:URL} ${4:link_text} %}\n\
+ ${5:code_snippet}\n\
+ {% endcodeblock %}\n\
+\n\
+snippet gist-full\n\
+ {% gist ${1:gist_id} ${2:filename} %}\n\
+\n\
+snippet gist-short\n\
+ {% gist ${1:gist_id} %}\n\
+\n\
+snippet img\n\
+ {% img ${1:class} ${2:URL} ${3:width} ${4:height} ${5:title_text} ${6:alt_text} %}\n\
+\n\
+snippet youtube\n\
+ {% youtube ${1:video_id} %}\n\
+\n\
+# The quote should appear only once in the text. It is inherently part of it.\n\
+# See http://octopress.org/docs/plugins/pullquote/ for more info.\n\
+\n\
+snippet pullquote\n\
+ {% pullquote %}\n\
+ ${1:text} {\" ${2:quote} \"} ${3:text}\n\
+ {% endpullquote %}\n\
+";
+exports.scope = "markdown";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/mask.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/mask.js
new file mode 100644
index 00000000..2811ad2a
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/mask.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/mask",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "mask";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/matlab.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/matlab.js
new file mode 100644
index 00000000..ce298c3f
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/matlab.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/matlab",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "matlab";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/maze.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/maze.js
new file mode 100644
index 00000000..c12d5668
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/maze.js
@@ -0,0 +1,16 @@
+ace.define("ace/snippets/maze",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet >\n\
+description assignment\n\
+scope maze\n\
+ -> ${1}= ${2}\n\
+\n\
+snippet >\n\
+description if\n\
+scope maze\n\
+ -> IF ${2:**} THEN %${3:L} ELSE %${4:R}\n\
+";
+exports.scope = "maze";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/mel.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/mel.js
new file mode 100644
index 00000000..537cc25b
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/mel.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/mel",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "mel";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/mushcode.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/mushcode.js
new file mode 100644
index 00000000..1f0fe24e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/mushcode.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/mushcode",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "mushcode";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/mysql.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/mysql.js
new file mode 100644
index 00000000..bfb3a42c
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/mysql.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/mysql",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "mysql";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/nix.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/nix.js
new file mode 100644
index 00000000..4fb6e704
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/nix.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/nix",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "nix";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/nsis.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/nsis.js
new file mode 100644
index 00000000..81b5726d
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/nsis.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/nsis",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/objectivec.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/objectivec.js
new file mode 100644
index 00000000..f93e6ae9
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/objectivec.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/objectivec",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "objectivec";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/ocaml.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/ocaml.js
new file mode 100644
index 00000000..06e0940d
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/ocaml.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/ocaml",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "ocaml";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/pascal.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/pascal.js
new file mode 100644
index 00000000..70aa2ee7
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/pascal.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/pascal",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "pascal";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/perl.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/perl.js
new file mode 100644
index 00000000..9f818432
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/perl.js
@@ -0,0 +1,354 @@
+ace.define("ace/snippets/perl",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# #!/usr/bin/perl\n\
+snippet #!\n\
+ #!/usr/bin/env perl\n\
+\n\
+# Hash Pointer\n\
+snippet .\n\
+ =>\n\
+# Function\n\
+snippet sub\n\
+ sub ${1:function_name} {\n\
+ ${2:#body ...}\n\
+ }\n\
+# Conditional\n\
+snippet if\n\
+ if (${1}) {\n\
+ ${2:# body...}\n\
+ }\n\
+# Conditional if..else\n\
+snippet ife\n\
+ if (${1}) {\n\
+ ${2:# body...}\n\
+ }\n\
+ else {\n\
+ ${3:# else...}\n\
+ }\n\
+# Conditional if..elsif..else\n\
+snippet ifee\n\
+ if (${1}) {\n\
+ ${2:# body...}\n\
+ }\n\
+ elsif (${3}) {\n\
+ ${4:# elsif...}\n\
+ }\n\
+ else {\n\
+ ${5:# else...}\n\
+ }\n\
+# Conditional One-line\n\
+snippet xif\n\
+ ${1:expression} if ${2:condition};${3}\n\
+# Unless conditional\n\
+snippet unless\n\
+ unless (${1}) {\n\
+ ${2:# body...}\n\
+ }\n\
+# Unless conditional One-line\n\
+snippet xunless\n\
+ ${1:expression} unless ${2:condition};${3}\n\
+# Try/Except\n\
+snippet eval\n\
+ local $@;\n\
+ eval {\n\
+ ${1:# do something risky...}\n\
+ };\n\
+ if (my $e = $@) {\n\
+ ${2:# handle failure...}\n\
+ }\n\
+# While Loop\n\
+snippet wh\n\
+ while (${1}) {\n\
+ ${2:# body...}\n\
+ }\n\
+# While Loop One-line\n\
+snippet xwh\n\
+ ${1:expression} while ${2:condition};${3}\n\
+# C-style For Loop\n\
+snippet cfor\n\
+ for (my $${2:var} = 0; $$2 < ${1:count}; $$2${3:++}) {\n\
+ ${4:# body...}\n\
+ }\n\
+# For loop one-line\n\
+snippet xfor\n\
+ ${1:expression} for @${2:array};${3}\n\
+# Foreach Loop\n\
+snippet for\n\
+ foreach my $${1:x} (@${2:array}) {\n\
+ ${3:# body...}\n\
+ }\n\
+# Foreach Loop One-line\n\
+snippet fore\n\
+ ${1:expression} foreach @${2:array};${3}\n\
+# Package\n\
+snippet package\n\
+ package ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`};\n\
+\n\
+ ${2}\n\
+\n\
+ 1;\n\
+\n\
+ __END__\n\
+# Package syntax perl >= 5.14\n\
+snippet packagev514\n\
+ package ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`} ${2:0.99};\n\
+\n\
+ ${3}\n\
+\n\
+ 1;\n\
+\n\
+ __END__\n\
+#moose\n\
+snippet moose\n\
+ use Moose;\n\
+ use namespace::autoclean;\n\
+ ${1:#}BEGIN {extends '${2:ParentClass}'};\n\
+\n\
+ ${3}\n\
+# parent\n\
+snippet parent\n\
+ use parent qw(${1:Parent Class});\n\
+# Read File\n\
+snippet slurp\n\
+ my $${1:var} = do { local $/; open my $file, '<', \"${2:file}\"; <$file> };\n\
+ ${3}\n\
+# strict warnings\n\
+snippet strwar\n\
+ use strict;\n\
+ use warnings;\n\
+# older versioning with perlcritic bypass\n\
+snippet vers\n\
+ ## no critic\n\
+ our $VERSION = '${1:version}';\n\
+ eval $VERSION;\n\
+ ## use critic\n\
+# new 'switch' like feature\n\
+snippet switch\n\
+ use feature 'switch';\n\
+\n\
+# Anonymous subroutine\n\
+snippet asub\n\
+ sub {\n\
+ ${1:# body }\n\
+ }\n\
+\n\
+\n\
+\n\
+# Begin block\n\
+snippet begin\n\
+ BEGIN {\n\
+ ${1:# begin body}\n\
+ }\n\
+\n\
+# call package function with some parameter\n\
+snippet pkgmv\n\
+ __PACKAGE__->${1:package_method}(${2:var})\n\
+\n\
+# call package function without a parameter\n\
+snippet pkgm\n\
+ __PACKAGE__->${1:package_method}()\n\
+\n\
+# call package \"get_\" function without a parameter\n\
+snippet pkget\n\
+ __PACKAGE__->get_${1:package_method}()\n\
+\n\
+# call package function with a parameter\n\
+snippet pkgetv\n\
+ __PACKAGE__->get_${1:package_method}(${2:var})\n\
+\n\
+# complex regex\n\
+snippet qrx\n\
+ qr/\n\
+ ${1:regex}\n\
+ /xms\n\
+\n\
+#simpler regex\n\
+snippet qr/\n\
+ qr/${1:regex}/x\n\
+\n\
+#given\n\
+snippet given\n\
+ given ($${1:var}) {\n\
+ ${2:# cases}\n\
+ ${3:# default}\n\
+ }\n\
+\n\
+# switch-like case\n\
+snippet when\n\
+ when (${1:case}) {\n\
+ ${2:# body}\n\
+ }\n\
+\n\
+# hash slice\n\
+snippet hslice\n\
+ @{ ${1:hash} }{ ${2:array} }\n\
+\n\
+\n\
+# map\n\
+snippet map\n\
+ map { ${2: body } } ${1: @array } ;\n\
+\n\
+\n\
+\n\
+# Pod stub\n\
+snippet ppod\n\
+ =head1 NAME\n\
+\n\
+ ${1:ClassName} - ${2:ShortDesc}\n\
+\n\
+ =head1 SYNOPSIS\n\
+\n\
+ use $1;\n\
+\n\
+ ${3:# synopsis...}\n\
+\n\
+ =head1 DESCRIPTION\n\
+\n\
+ ${4:# longer description...}\n\
+\n\
+\n\
+ =head1 INTERFACE\n\
+\n\
+\n\
+ =head1 DEPENDENCIES\n\
+\n\
+\n\
+ =head1 SEE ALSO\n\
+\n\
+\n\
+# Heading for a subroutine stub\n\
+snippet psub\n\
+ =head2 ${1:MethodName}\n\
+\n\
+ ${2:Summary....}\n\
+\n\
+# Heading for inline subroutine pod\n\
+snippet psubi\n\
+ =head2 ${1:MethodName}\n\
+\n\
+ ${2:Summary...}\n\
+\n\
+\n\
+ =cut\n\
+# inline documented subroutine\n\
+snippet subpod\n\
+ =head2 $1\n\
+\n\
+ Summary of $1\n\
+\n\
+ =cut\n\
+\n\
+ sub ${1:subroutine_name} {\n\
+ ${2:# body...}\n\
+ }\n\
+# Subroutine signature\n\
+snippet parg\n\
+ =over 2\n\
+\n\
+ =item\n\
+ Arguments\n\
+\n\
+\n\
+ =over 3\n\
+\n\
+ =item\n\
+ C<${1:DataStructure}>\n\
+\n\
+ ${2:Sample}\n\
+\n\
+\n\
+ =back\n\
+\n\
+\n\
+ =item\n\
+ Return\n\
+\n\
+ =over 3\n\
+\n\
+\n\
+ =item\n\
+ C<${3:...return data}>\n\
+\n\
+\n\
+ =back\n\
+\n\
+\n\
+ =back\n\
+\n\
+\n\
+\n\
+# Moose has\n\
+snippet has\n\
+ has ${1:attribute} => (\n\
+ is => '${2:ro|rw}',\n\
+ isa => '${3:Str|Int|HashRef|ArrayRef|etc}',\n\
+ default => sub {\n\
+ ${4:defaultvalue}\n\
+ },\n\
+ ${5:# other attributes}\n\
+ );\n\
+\n\
+\n\
+# override\n\
+snippet override\n\
+ override ${1:attribute} => sub {\n\
+ ${2:# my $self = shift;};\n\
+ ${3:# my ($self, $args) = @_;};\n\
+ };\n\
+\n\
+\n\
+# use test classes\n\
+snippet tuse\n\
+ use Test::More;\n\
+ use Test::Deep; # (); # uncomment to stop prototype errors\n\
+ use Test::Exception;\n\
+\n\
+# local test lib\n\
+snippet tlib\n\
+ use lib qw{ ./t/lib };\n\
+\n\
+#test methods\n\
+snippet tmeths\n\
+ $ENV{TEST_METHOD} = '${1:regex}';\n\
+\n\
+# runtestclass\n\
+snippet trunner\n\
+ use ${1:test_class};\n\
+ $1->runtests();\n\
+\n\
+# Test::Class-style test\n\
+snippet tsub\n\
+ sub t${1:number}_${2:test_case} :Test(${3:num_of_tests}) {\n\
+ my $self = shift;\n\
+ ${4:# body}\n\
+\n\
+ }\n\
+\n\
+# Test::Routine-style test\n\
+snippet trsub\n\
+ test ${1:test_name} => { description => '${2:Description of test.}'} => sub {\n\
+ my ($self) = @_;\n\
+ ${3:# test code}\n\
+ };\n\
+\n\
+#prep test method\n\
+snippet tprep\n\
+ sub prep${1:number}_${2:test_case} :Test(startup) {\n\
+ my $self = shift;\n\
+ ${4:# body}\n\
+ }\n\
+\n\
+# cause failures to print stack trace\n\
+snippet debug_trace\n\
+ use Carp; # 'verbose';\n\
+ # cloak \"die\"\n\
+ # warn \"warning\"\n\
+ $SIG{'__DIE__'} = sub {\n\
+ require Carp; Carp::confess\n\
+ };\n\
+\n\
+";
+exports.scope = "perl";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/pgsql.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/pgsql.js
new file mode 100644
index 00000000..5914fe1d
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/pgsql.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/pgsql",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "pgsql";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/php.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/php.js
new file mode 100644
index 00000000..a99ab6e0
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/php.js
@@ -0,0 +1,384 @@
+ace.define("ace/snippets/php",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet <?\n\
+ <?php\n\
+\n\
+ ${1}\n\
+snippet ec\n\
+ echo ${1};\n\
+snippet <?e\n\
+ <?php echo ${1} ?>\n\
+# this one is for php5.4\n\
+snippet <?=\n\
+ <?=${1}?>\n\
+snippet ns\n\
+ namespace ${1:Foo\\Bar\\Baz};\n\
+ ${2}\n\
+snippet use\n\
+ use ${1:Foo\\Bar\\Baz};\n\
+ ${2}\n\
+snippet c\n\
+ ${1:abstract }class ${2:$FILENAME}\n\
+ {\n\
+ ${3}\n\
+ }\n\
+snippet i\n\
+ interface ${1:$FILENAME}\n\
+ {\n\
+ ${2}\n\
+ }\n\
+snippet t.\n\
+ $this->${1}\n\
+snippet f\n\
+ function ${1:foo}(${2:array }${3:$bar})\n\
+ {\n\
+ ${4}\n\
+ }\n\
+# method\n\
+snippet m\n\
+ ${1:abstract }${2:protected}${3: static} function ${4:foo}(${5:array }${6:$bar})\n\
+ {\n\
+ ${7}\n\
+ }\n\
+# setter method\n\
+snippet sm \n\
+ /**\n\
+ * Sets the value of ${1:foo}\n\
+ *\n\
+ * @param ${2:$1} $$1 ${3:description}\n\
+ *\n\
+ * @return ${4:$FILENAME}\n\
+ */\n\
+ ${5:public} function set${6:$2}(${7:$2 }$$1)\n\
+ {\n\
+ $this->${8:$1} = $$1;\n\
+ return $this;\n\
+ }${9}\n\
+# getter method\n\
+snippet gm\n\
+ /**\n\
+ * Gets the value of ${1:foo}\n\
+ *\n\
+ * @return ${2:$1}\n\
+ */\n\
+ ${3:public} function get${4:$2}()\n\
+ {\n\
+ return $this->${5:$1};\n\
+ }${6}\n\
+#setter\n\
+snippet $s\n\
+ ${1:$foo}->set${2:Bar}(${3});\n\
+#getter\n\
+snippet $g\n\
+ ${1:$foo}->get${2:Bar}();\n\
+\n\
+# Tertiary conditional\n\
+snippet =?:\n\
+ $${1:foo} = ${2:true} ? ${3:a} : ${4};\n\
+snippet ?:\n\
+ ${1:true} ? ${2:a} : ${3}\n\
+\n\
+snippet C\n\
+ $_COOKIE['${1:variable}']${2}\n\
+snippet E\n\
+ $_ENV['${1:variable}']${2}\n\
+snippet F\n\
+ $_FILES['${1:variable}']${2}\n\
+snippet G\n\
+ $_GET['${1:variable}']${2}\n\
+snippet P\n\
+ $_POST['${1:variable}']${2}\n\
+snippet R\n\
+ $_REQUEST['${1:variable}']${2}\n\
+snippet S\n\
+ $_SERVER['${1:variable}']${2}\n\
+snippet SS\n\
+ $_SESSION['${1:variable}']${2}\n\
+ \n\
+# the following are old ones\n\
+snippet inc\n\
+ include '${1:file}';${2}\n\
+snippet inc1\n\
+ include_once '${1:file}';${2}\n\
+snippet req\n\
+ require '${1:file}';${2}\n\
+snippet req1\n\
+ require_once '${1:file}';${2}\n\
+# Start Docblock\n\
+snippet /*\n\
+ /**\n\
+ * ${1}\n\
+ */\n\
+# Class - post doc\n\
+snippet doc_cp\n\
+ /**\n\
+ * ${1:undocumented class}\n\
+ *\n\
+ * @package ${2:default}\n\
+ * @subpackage ${3:default}\n\
+ * @author ${4:`g:snips_author`}\n\
+ */${5}\n\
+# Class Variable - post doc\n\
+snippet doc_vp\n\
+ /**\n\
+ * ${1:undocumented class variable}\n\
+ *\n\
+ * @var ${2:string}\n\
+ */${3}\n\
+# Class Variable\n\
+snippet doc_v\n\
+ /**\n\
+ * ${3:undocumented class variable}\n\
+ *\n\
+ * @var ${4:string}\n\
+ */\n\
+ ${1:var} $${2};${5}\n\
+# Class\n\
+snippet doc_c\n\
+ /**\n\
+ * ${3:undocumented class}\n\
+ *\n\
+ * @package ${4:default}\n\
+ * @subpackage ${5:default}\n\
+ * @author ${6:`g:snips_author`}\n\
+ */\n\
+ ${1:}class ${2:}\n\
+ {\n\
+ ${7}\n\
+ } // END $1class $2\n\
+# Constant Definition - post doc\n\
+snippet doc_dp\n\
+ /**\n\
+ * ${1:undocumented constant}\n\
+ */${2}\n\
+# Constant Definition\n\
+snippet doc_d\n\
+ /**\n\
+ * ${3:undocumented constant}\n\
+ */\n\
+ define(${1}, ${2});${4}\n\
+# Function - post doc\n\
+snippet doc_fp\n\
+ /**\n\
+ * ${1:undocumented function}\n\
+ *\n\
+ * @return ${2:void}\n\
+ * @author ${3:`g:snips_author`}\n\
+ */${4}\n\
+# Function signature\n\
+snippet doc_s\n\
+ /**\n\
+ * ${4:undocumented function}\n\
+ *\n\
+ * @return ${5:void}\n\
+ * @author ${6:`g:snips_author`}\n\
+ */\n\
+ ${1}function ${2}(${3});${7}\n\
+# Function\n\
+snippet doc_f\n\
+ /**\n\
+ * ${4:undocumented function}\n\
+ *\n\
+ * @return ${5:void}\n\
+ * @author ${6:`g:snips_author`}\n\
+ */\n\
+ ${1}function ${2}(${3})\n\
+ {${7}\n\
+ }\n\
+# Header\n\
+snippet doc_h\n\
+ /**\n\
+ * ${1}\n\
+ *\n\
+ * @author ${2:`g:snips_author`}\n\
+ * @version ${3:$Id$}\n\
+ * @copyright ${4:$2}, `strftime('%d %B, %Y')`\n\
+ * @package ${5:default}\n\
+ */\n\
+ \n\
+# Interface\n\
+snippet interface\n\
+ /**\n\
+ * ${2:undocumented class}\n\
+ *\n\
+ * @package ${3:default}\n\
+ * @author ${4:`g:snips_author`}\n\
+ */\n\
+ interface ${1:$FILENAME}\n\
+ {\n\
+ ${5}\n\
+ }\n\
+# class ...\n\
+snippet class\n\
+ /**\n\
+ * ${1}\n\
+ */\n\
+ class ${2:$FILENAME}\n\
+ {\n\
+ ${3}\n\
+ /**\n\
+ * ${4}\n\
+ */\n\
+ ${5:public} function ${6:__construct}(${7:argument})\n\
+ {\n\
+ ${8:// code...}\n\
+ }\n\
+ }\n\
+# define(...)\n\
+snippet def\n\
+ define('${1}'${2});${3}\n\
+# defined(...)\n\
+snippet def?\n\
+ ${1}defined('${2}')${3}\n\
+snippet wh\n\
+ while (${1:/* condition */}) {\n\
+ ${2:// code...}\n\
+ }\n\
+# do ... while\n\
+snippet do\n\
+ do {\n\
+ ${2:// code... }\n\
+ } while (${1:/* condition */});\n\
+snippet if\n\
+ if (${1:/* condition */}) {\n\
+ ${2:// code...}\n\
+ }\n\
+snippet ifil\n\
+ <?php if (${1:/* condition */}): ?>\n\
+ ${2:<!-- code... -->}\n\
+ <?php endif; ?>\n\
+snippet ife\n\
+ if (${1:/* condition */}) {\n\
+ ${2:// code...}\n\
+ } else {\n\
+ ${3:// code...}\n\
+ }\n\
+ ${4}\n\
+snippet ifeil\n\
+ <?php if (${1:/* condition */}): ?>\n\
+ ${2:<!-- html... -->}\n\
+ <?php else: ?>\n\
+ ${3:<!-- html... -->}\n\
+ <?php endif; ?>\n\
+ ${4}\n\
+snippet else\n\
+ else {\n\
+ ${1:// code...}\n\
+ }\n\
+snippet elseif\n\
+ elseif (${1:/* condition */}) {\n\
+ ${2:// code...}\n\
+ }\n\
+snippet switch\n\
+ switch ($${1:variable}) {\n\
+ case '${2:value}':\n\
+ ${3:// code...}\n\
+ break;\n\
+ ${5}\n\
+ default:\n\
+ ${4:// code...}\n\
+ break;\n\
+ }\n\
+snippet case\n\
+ case '${1:value}':\n\
+ ${2:// code...}\n\
+ break;${3}\n\
+snippet for\n\
+ for ($${2:i} = 0; $$2 < ${1:count}; $$2${3:++}) {\n\
+ ${4: // code...}\n\
+ }\n\
+snippet foreach\n\
+ foreach ($${1:variable} as $${2:value}) {\n\
+ ${3:// code...}\n\
+ }\n\
+snippet foreachil\n\
+ <?php foreach ($${1:variable} as $${2:value}): ?>\n\
+ ${3:<!-- html... -->}\n\
+ <?php endforeach; ?>\n\
+snippet foreachk\n\
+ foreach ($${1:variable} as $${2:key} => $${3:value}) {\n\
+ ${4:// code...}\n\
+ }\n\
+snippet foreachkil\n\
+ <?php foreach ($${1:variable} as $${2:key} => $${3:value}): ?>\n\
+ ${4:<!-- html... -->}\n\
+ <?php endforeach; ?>\n\
+# $... = array (...)\n\
+snippet array\n\
+ $${1:arrayName} = array('${2}' => ${3});${4}\n\
+snippet try\n\
+ try {\n\
+ ${2}\n\
+ } catch (${1:Exception} $e) {\n\
+ }\n\
+# lambda with closure\n\
+snippet lambda\n\
+ ${1:static }function (${2:args}) use (${3:&$x, $y /*put vars in scope (closure) */}) {\n\
+ ${4}\n\
+ };\n\
+# pre_dump();\n\
+snippet pd\n\
+ echo '<pre>'; var_dump(${1}); echo '</pre>';\n\
+# pre_dump(); die();\n\
+snippet pdd\n\
+ echo '<pre>'; var_dump(${1}); echo '</pre>'; die(${2:});\n\
+snippet vd\n\
+ var_dump(${1});\n\
+snippet vdd\n\
+ var_dump(${1}); die(${2:});\n\
+snippet http_redirect\n\
+ header (\"HTTP/1.1 301 Moved Permanently\"); \n\
+ header (\"Location: \".URL); \n\
+ exit();\n\
+# Getters & Setters\n\
+snippet gs\n\
+ /**\n\
+ * Gets the value of ${1:foo}\n\
+ *\n\
+ * @return ${2:$1}\n\
+ */\n\
+ public function get${3:$2}()\n\
+ {\n\
+ return $this->${4:$1};\n\
+ }\n\
+\n\
+ /**\n\
+ * Sets the value of $1\n\
+ *\n\
+ * @param $2 $$1 ${5:description}\n\
+ *\n\
+ * @return ${6:$FILENAME}\n\
+ */\n\
+ public function set$3(${7:$2 }$$1)\n\
+ {\n\
+ $this->$4 = $$1;\n\
+ return $this;\n\
+ }${8}\n\
+# anotation, get, and set, useful for doctrine\n\
+snippet ags\n\
+ /**\n\
+ * ${1:description}\n\
+ * \n\
+ * @${7}\n\
+ */\n\
+ ${2:protected} $${3:foo};\n\
+\n\
+ public function get${4:$3}()\n\
+ {\n\
+ return $this->$3;\n\
+ }\n\
+\n\
+ public function set$4(${5:$4 }$${6:$3})\n\
+ {\n\
+ $this->$3 = $$6;\n\
+ return $this;\n\
+ }\n\
+snippet rett\n\
+ return true;\n\
+snippet retf\n\
+ return false;\n\
+";
+exports.scope = "php";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/pig.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/pig.js
new file mode 100644
index 00000000..479a03bc
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/pig.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/pig",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "pig";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/plain_text.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/plain_text.js
new file mode 100644
index 00000000..24223a66
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/plain_text.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/plain_text",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "plain_text";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/powershell.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/powershell.js
new file mode 100644
index 00000000..a8e7310a
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/powershell.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/powershell",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "powershell";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/praat.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/praat.js
new file mode 100644
index 00000000..dcf68267
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/praat.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/praat",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "praat";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/prolog.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/prolog.js
new file mode 100644
index 00000000..2d63cb83
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/prolog.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/prolog",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "prolog";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/properties.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/properties.js
new file mode 100644
index 00000000..44c1ada7
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/properties.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/properties",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "properties";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/protobuf.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/protobuf.js
new file mode 100644
index 00000000..d00d57af
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/protobuf.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/protobuf",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "";
+exports.scope = "protobuf";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/python.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/python.js
new file mode 100644
index 00000000..182b3406
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/python.js
@@ -0,0 +1,165 @@
+ace.define("ace/snippets/python",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet #!\n\
+ #!/usr/bin/env python\n\
+snippet imp\n\
+ import ${1:module}\n\
+snippet from\n\
+ from ${1:package} import ${2:module}\n\
+# Module Docstring\n\
+snippet docs\n\
+ '''\n\
+ File: ${1:FILENAME:file_name}\n\
+ Author: ${2:author}\n\
+ Description: ${3}\n\
+ '''\n\
+snippet wh\n\
+ while ${1:condition}:\n\
+ ${2:# TODO: write code...}\n\
+# dowh - does the same as do...while in other languages\n\
+snippet dowh\n\
+ while True:\n\
+ ${1:# TODO: write code...}\n\
+ if ${2:condition}:\n\
+ break\n\
+snippet with\n\
+ with ${1:expr} as ${2:var}:\n\
+ ${3:# TODO: write code...}\n\
+# New Class\n\
+snippet cl\n\
+ class ${1:ClassName}(${2:object}):\n\
+ \"\"\"${3:docstring for $1}\"\"\"\n\
+ def __init__(self, ${4:arg}):\n\
+ ${5:super($1, self).__init__()}\n\
+ self.$4 = $4\n\
+ ${6}\n\
+# New Function\n\
+snippet def\n\
+ def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):\n\
+ \"\"\"${3:docstring for $1}\"\"\"\n\
+ ${4:# TODO: write code...}\n\
+snippet deff\n\
+ def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):\n\
+ ${3:# TODO: write code...}\n\
+# New Method\n\
+snippet defs\n\
+ def ${1:mname}(self, ${2:arg}):\n\
+ ${3:# TODO: write code...}\n\
+# New Property\n\
+snippet property\n\
+ def ${1:foo}():\n\
+ doc = \"${2:The $1 property.}\"\n\
+ def fget(self):\n\
+ ${3:return self._$1}\n\
+ def fset(self, value):\n\
+ ${4:self._$1 = value}\n\
+# Ifs\n\
+snippet if\n\
+ if ${1:condition}:\n\
+ ${2:# TODO: write code...}\n\
+snippet el\n\
+ else:\n\
+ ${1:# TODO: write code...}\n\
+snippet ei\n\
+ elif ${1:condition}:\n\
+ ${2:# TODO: write code...}\n\
+# For\n\
+snippet for\n\
+ for ${1:item} in ${2:items}:\n\
+ ${3:# TODO: write code...}\n\
+# Encodes\n\
+snippet cutf8\n\
+ # -*- coding: utf-8 -*-\n\
+snippet clatin1\n\
+ # -*- coding: latin-1 -*-\n\
+snippet cascii\n\
+ # -*- coding: ascii -*-\n\
+# Lambda\n\
+snippet ld\n\
+ ${1:var} = lambda ${2:vars} : ${3:action}\n\
+snippet .\n\
+ self.\n\
+snippet try Try/Except\n\
+ try:\n\
+ ${1:# TODO: write code...}\n\
+ except ${2:Exception}, ${3:e}:\n\
+ ${4:raise $3}\n\
+snippet try Try/Except/Else\n\
+ try:\n\
+ ${1:# TODO: write code...}\n\
+ except ${2:Exception}, ${3:e}:\n\
+ ${4:raise $3}\n\
+ else:\n\
+ ${5:# TODO: write code...}\n\
+snippet try Try/Except/Finally\n\
+ try:\n\
+ ${1:# TODO: write code...}\n\
+ except ${2:Exception}, ${3:e}:\n\
+ ${4:raise $3}\n\
+ finally:\n\
+ ${5:# TODO: write code...}\n\
+snippet try Try/Except/Else/Finally\n\
+ try:\n\
+ ${1:# TODO: write code...}\n\
+ except ${2:Exception}, ${3:e}:\n\
+ ${4:raise $3}\n\
+ else:\n\
+ ${5:# TODO: write code...}\n\
+ finally:\n\
+ ${6:# TODO: write code...}\n\
+# if __name__ == '__main__':\n\
+snippet ifmain\n\
+ if __name__ == '__main__':\n\
+ ${1:main()}\n\
+# __magic__\n\
+snippet _\n\
+ __${1:init}__${2}\n\
+# python debugger (pdb)\n\
+snippet pdb\n\
+ import pdb; pdb.set_trace()\n\
+# ipython debugger (ipdb)\n\
+snippet ipdb\n\
+ import ipdb; ipdb.set_trace()\n\
+# ipython debugger (pdbbb)\n\
+snippet pdbbb\n\
+ import pdbpp; pdbpp.set_trace()\n\
+snippet pprint\n\
+ import pprint; pprint.pprint(${1})${2}\n\
+snippet \"\n\
+ \"\"\"\n\
+ ${1:doc}\n\
+ \"\"\"\n\
+# test function/method\n\
+snippet test\n\
+ def test_${1:description}(${2:self}):\n\
+ ${3:# TODO: write code...}\n\
+# test case\n\
+snippet testcase\n\
+ class ${1:ExampleCase}(unittest.TestCase):\n\
+ \n\
+ def test_${2:description}(self):\n\
+ ${3:# TODO: write code...}\n\
+snippet fut\n\
+ from __future__ import ${1}\n\
+#getopt\n\
+snippet getopt\n\
+ try:\n\
+ # Short option syntax: \"hv:\"\n\
+ # Long option syntax: \"help\" or \"verbose=\"\n\
+ opts, args = getopt.getopt(sys.argv[1:], \"${1:short_options}\", [${2:long_options}])\n\
+ \n\
+ except getopt.GetoptError, err:\n\
+ # Print debug info\n\
+ print str(err)\n\
+ ${3:error_action}\n\
+\n\
+ for option, argument in opts:\n\
+ if option in (\"-h\", \"--help\"):\n\
+ ${4}\n\
+ elif option in (\"-v\", \"--verbose\"):\n\
+ verbose = argument\n\
+";
+exports.scope = "python";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/r.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/r.js
new file mode 100644
index 00000000..24c02a0c
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/r.js
@@ -0,0 +1,128 @@
+ace.define("ace/snippets/r",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet #!\n\
+ #!/usr/bin/env Rscript\n\
+\n\
+# includes\n\
+snippet lib\n\
+ library(${1:package})\n\
+snippet req\n\
+ require(${1:package})\n\
+snippet source\n\
+ source('${1:file}')\n\
+\n\
+# conditionals\n\
+snippet if\n\
+ if (${1:condition}) {\n\
+ ${2:code}\n\
+ }\n\
+snippet el\n\
+ else {\n\
+ ${1:code}\n\
+ }\n\
+snippet ei\n\
+ else if (${1:condition}) {\n\
+ ${2:code}\n\
+ }\n\
+\n\
+# functions\n\
+snippet fun\n\
+ ${1:name} = function (${2:variables}) {\n\
+ ${3:code}\n\
+ }\n\
+snippet ret\n\
+ return(${1:code})\n\
+\n\
+# dataframes, lists, etc\n\
+snippet df\n\
+ ${1:name}[${2:rows}, ${3:cols}]\n\
+snippet c\n\
+ c(${1:items})\n\
+snippet li\n\
+ list(${1:items})\n\
+snippet mat\n\
+ matrix(${1:data}, nrow=${2:rows}, ncol=${3:cols})\n\
+\n\
+# apply functions\n\
+snippet apply\n\
+ apply(${1:array}, ${2:margin}, ${3:function})\n\
+snippet lapply\n\
+ lapply(${1:list}, ${2:function})\n\
+snippet sapply\n\
+ sapply(${1:list}, ${2:function})\n\
+snippet vapply\n\
+ vapply(${1:list}, ${2:function}, ${3:type})\n\
+snippet mapply\n\
+ mapply(${1:function}, ${2:...})\n\
+snippet tapply\n\
+ tapply(${1:vector}, ${2:index}, ${3:function})\n\
+snippet rapply\n\
+ rapply(${1:list}, ${2:function})\n\
+\n\
+# plyr functions\n\
+snippet dd\n\
+ ddply(${1:frame}, ${2:variables}, ${3:function})\n\
+snippet dl\n\
+ dlply(${1:frame}, ${2:variables}, ${3:function})\n\
+snippet da\n\
+ daply(${1:frame}, ${2:variables}, ${3:function})\n\
+snippet d_\n\
+ d_ply(${1:frame}, ${2:variables}, ${3:function})\n\
+\n\
+snippet ad\n\
+ adply(${1:array}, ${2:margin}, ${3:function})\n\
+snippet al\n\
+ alply(${1:array}, ${2:margin}, ${3:function})\n\
+snippet aa\n\
+ aaply(${1:array}, ${2:margin}, ${3:function})\n\
+snippet a_\n\
+ a_ply(${1:array}, ${2:margin}, ${3:function})\n\
+\n\
+snippet ld\n\
+ ldply(${1:list}, ${2:function})\n\
+snippet ll\n\
+ llply(${1:list}, ${2:function})\n\
+snippet la\n\
+ laply(${1:list}, ${2:function})\n\
+snippet l_\n\
+ l_ply(${1:list}, ${2:function})\n\
+\n\
+snippet md\n\
+ mdply(${1:matrix}, ${2:function})\n\
+snippet ml\n\
+ mlply(${1:matrix}, ${2:function})\n\
+snippet ma\n\
+ maply(${1:matrix}, ${2:function})\n\
+snippet m_\n\
+ m_ply(${1:matrix}, ${2:function})\n\
+\n\
+# plot functions\n\
+snippet pl\n\
+ plot(${1:x}, ${2:y})\n\
+snippet ggp\n\
+ ggplot(${1:data}, aes(${2:aesthetics}))\n\
+snippet img\n\
+ ${1:(jpeg,bmp,png,tiff)}(filename=\"${2:filename}\", width=${3}, height=${4}, unit=\"${5}\")\n\
+ ${6:plot}\n\
+ dev.off()\n\
+\n\
+# statistical test functions\n\
+snippet fis\n\
+ fisher.test(${1:x}, ${2:y})\n\
+snippet chi\n\
+ chisq.test(${1:x}, ${2:y})\n\
+snippet tt\n\
+ t.test(${1:x}, ${2:y})\n\
+snippet wil\n\
+ wilcox.test(${1:x}, ${2:y})\n\
+snippet cor\n\
+ cor.test(${1:x}, ${2:y})\n\
+snippet fte\n\
+ var.test(${1:x}, ${2:y})\n\
+snippet kvt \n\
+ kv.test(${1:x}, ${2:y})\n\
+";
+exports.scope = "r";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/razor.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/razor.js
new file mode 100644
index 00000000..78fdf8c3
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/razor.js
@@ -0,0 +1,10 @@
+ace.define("ace/snippets/razor",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet if\n\
+(${1} == ${2}) {\n\
+ ${3}\n\
+}";
+exports.scope = "razor";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/rdoc.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/rdoc.js
new file mode 100644
index 00000000..956de47a
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/rdoc.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/rdoc",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "rdoc";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/rhtml.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/rhtml.js
new file mode 100644
index 00000000..e62ce87f
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/rhtml.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/rhtml",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "rhtml";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/rst.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/rst.js
new file mode 100644
index 00000000..db6c960f
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/rst.js
@@ -0,0 +1,29 @@
+ace.define("ace/snippets/rst",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# rst\n\
+\n\
+snippet :\n\
+ :${1:field name}: ${2:field body}\n\
+snippet *\n\
+ *${1:Emphasis}*\n\
+snippet **\n\
+ **${1:Strong emphasis}**\n\
+snippet _\n\
+ \\`${1:hyperlink-name}\\`_\n\
+ .. _\\`$1\\`: ${2:link-block}\n\
+snippet =\n\
+ ${1:Title}\n\
+ =====${2:=}\n\
+ ${3}\n\
+snippet -\n\
+ ${1:Title}\n\
+ -----${2:-}\n\
+ ${3}\n\
+snippet cont:\n\
+ .. contents::\n\
+ \n\
+";
+exports.scope = "rst";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/ruby.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/ruby.js
new file mode 100644
index 00000000..18bc409f
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/ruby.js
@@ -0,0 +1,935 @@
+ace.define("ace/snippets/ruby",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "########################################\n\
+# Ruby snippets - for Rails, see below #\n\
+########################################\n\
+\n\
+# encoding for Ruby 1.9\n\
+snippet enc\n\
+ # encoding: utf-8\n\
+\n\
+# #!/usr/bin/env ruby\n\
+snippet #!\n\
+ #!/usr/bin/env ruby\n\
+ # encoding: utf-8\n\
+\n\
+# New Block\n\
+snippet =b\n\
+ =begin rdoc\n\
+ ${1}\n\
+ =end\n\
+snippet y\n\
+ :yields: ${1:arguments}\n\
+snippet rb\n\
+ #!/usr/bin/env ruby -wKU\n\
+snippet beg\n\
+ begin\n\
+ ${3}\n\
+ rescue ${1:Exception} => ${2:e}\n\
+ end\n\
+\n\
+snippet req require\n\
+ require \"${1}\"${2}\n\
+snippet #\n\
+ # =>\n\
+snippet end\n\
+ __END__\n\
+snippet case\n\
+ case ${1:object}\n\
+ when ${2:condition}\n\
+ ${3}\n\
+ end\n\
+snippet when\n\
+ when ${1:condition}\n\
+ ${2}\n\
+snippet def\n\
+ def ${1:method_name}\n\
+ ${2}\n\
+ end\n\
+snippet deft\n\
+ def test_${1:case_name}\n\
+ ${2}\n\
+ end\n\
+snippet if\n\
+ if ${1:condition}\n\
+ ${2}\n\
+ end\n\
+snippet ife\n\
+ if ${1:condition}\n\
+ ${2}\n\
+ else\n\
+ ${3}\n\
+ end\n\
+snippet elsif\n\
+ elsif ${1:condition}\n\
+ ${2}\n\
+snippet unless\n\
+ unless ${1:condition}\n\
+ ${2}\n\
+ end\n\
+snippet while\n\
+ while ${1:condition}\n\
+ ${2}\n\
+ end\n\
+snippet for\n\
+ for ${1:e} in ${2:c}\n\
+ ${3}\n\
+ end\n\
+snippet until\n\
+ until ${1:condition}\n\
+ ${2}\n\
+ end\n\
+snippet cla class .. end\n\
+ class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\
+ ${2}\n\
+ end\n\
+snippet cla class .. initialize .. end\n\
+ class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\
+ def initialize(${2:args})\n\
+ ${3}\n\
+ end\n\
+ end\n\
+snippet cla class .. < ParentClass .. initialize .. end\n\
+ class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} < ${2:ParentClass}\n\
+ def initialize(${3:args})\n\
+ ${4}\n\
+ end\n\
+ end\n\
+snippet cla ClassName = Struct .. do .. end\n\
+ ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} = Struct.new(:${2:attr_names}) do\n\
+ def ${3:method_name}\n\
+ ${4}\n\
+ end\n\
+ end\n\
+snippet cla class BlankSlate .. initialize .. end\n\
+ class ${1:BlankSlate}\n\
+ instance_methods.each { |meth| undef_method(meth) unless meth =~ /\\A__/ }\n\
+ end\n\
+snippet cla class << self .. end\n\
+ class << ${1:self}\n\
+ ${2}\n\
+ end\n\
+# class .. < DelegateClass .. initialize .. end\n\
+snippet cla-\n\
+ class ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`} < DelegateClass(${2:ParentClass})\n\
+ def initialize(${3:args})\n\
+ super(${4:del_obj})\n\
+\n\
+ ${5}\n\
+ end\n\
+ end\n\
+snippet mod module .. end\n\
+ module ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\
+ ${2}\n\
+ end\n\
+snippet mod module .. module_function .. end\n\
+ module ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\
+ module_function\n\
+\n\
+ ${2}\n\
+ end\n\
+snippet mod module .. ClassMethods .. end\n\
+ module ${1:`substitute(Filename(), '\\(_\\|^\\)\\(.\\)', '\\u\\2', 'g')`}\n\
+ module ClassMethods\n\
+ ${2}\n\
+ end\n\
+\n\
+ module InstanceMethods\n\
+\n\
+ end\n\
+\n\
+ def self.included(receiver)\n\
+ receiver.extend ClassMethods\n\
+ receiver.send :include, InstanceMethods\n\
+ end\n\
+ end\n\
+# attr_reader\n\
+snippet r\n\
+ attr_reader :${1:attr_names}\n\
+# attr_writer\n\
+snippet w\n\
+ attr_writer :${1:attr_names}\n\
+# attr_accessor\n\
+snippet rw\n\
+ attr_accessor :${1:attr_names}\n\
+snippet atp\n\
+ attr_protected :${1:attr_names}\n\
+snippet ata\n\
+ attr_accessible :${1:attr_names}\n\
+# include Enumerable\n\
+snippet Enum\n\
+ include Enumerable\n\
+\n\
+ def each(&block)\n\
+ ${1}\n\
+ end\n\
+# include Comparable\n\
+snippet Comp\n\
+ include Comparable\n\
+\n\
+ def <=>(other)\n\
+ ${1}\n\
+ end\n\
+# extend Forwardable\n\
+snippet Forw-\n\
+ extend Forwardable\n\
+# def self\n\
+snippet defs\n\
+ def self.${1:class_method_name}\n\
+ ${2}\n\
+ end\n\
+# def method_missing\n\
+snippet defmm\n\
+ def method_missing(meth, *args, &blk)\n\
+ ${1}\n\
+ end\n\
+snippet defd\n\
+ def_delegator :${1:@del_obj}, :${2:del_meth}, :${3:new_name}\n\
+snippet defds\n\
+ def_delegators :${1:@del_obj}, :${2:del_methods}\n\
+snippet am\n\
+ alias_method :${1:new_name}, :${2:old_name}\n\
+snippet app\n\
+ if __FILE__ == $PROGRAM_NAME\n\
+ ${1}\n\
+ end\n\
+# usage_if()\n\
+snippet usai\n\
+ if ARGV.${1}\n\
+ abort \"Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}\"${3}\n\
+ end\n\
+# usage_unless()\n\
+snippet usau\n\
+ unless ARGV.${1}\n\
+ abort \"Usage: #{$PROGRAM_NAME} ${2:ARGS_GO_HERE}\"${3}\n\
+ end\n\
+snippet array\n\
+ Array.new(${1:10}) { |${2:i}| ${3} }\n\
+snippet hash\n\
+ Hash.new { |${1:hash}, ${2:key}| $1[$2] = ${3} }\n\
+snippet file File.foreach() { |line| .. }\n\
+ File.foreach(${1:\"path/to/file\"}) { |${2:line}| ${3} }\n\
+snippet file File.read()\n\
+ File.read(${1:\"path/to/file\"})${2}\n\
+snippet Dir Dir.global() { |file| .. }\n\
+ Dir.glob(${1:\"dir/glob/*\"}) { |${2:file}| ${3} }\n\
+snippet Dir Dir[\"..\"]\n\
+ Dir[${1:\"glob/**/*.rb\"}]${2}\n\
+snippet dir\n\
+ Filename.dirname(__FILE__)\n\
+snippet deli\n\
+ delete_if { |${1:e}| ${2} }\n\
+snippet fil\n\
+ fill(${1:range}) { |${2:i}| ${3} }\n\
+# flatten_once()\n\
+snippet flao\n\
+ inject(Array.new) { |${1:arr}, ${2:a}| $1.push(*$2)}${3}\n\
+snippet zip\n\
+ zip(${1:enums}) { |${2:row}| ${3} }\n\
+# downto(0) { |n| .. }\n\
+snippet dow\n\
+ downto(${1:0}) { |${2:n}| ${3} }\n\
+snippet ste\n\
+ step(${1:2}) { |${2:n}| ${3} }\n\
+snippet tim\n\
+ times { |${1:n}| ${2} }\n\
+snippet upt\n\
+ upto(${1:1.0/0.0}) { |${2:n}| ${3} }\n\
+snippet loo\n\
+ loop { ${1} }\n\
+snippet ea\n\
+ each { |${1:e}| ${2} }\n\
+snippet ead\n\
+ each do |${1:e}|\n\
+ ${2}\n\
+ end\n\
+snippet eab\n\
+ each_byte { |${1:byte}| ${2} }\n\
+snippet eac- each_char { |chr| .. }\n\
+ each_char { |${1:chr}| ${2} }\n\
+snippet eac- each_cons(..) { |group| .. }\n\
+ each_cons(${1:2}) { |${2:group}| ${3} }\n\
+snippet eai\n\
+ each_index { |${1:i}| ${2} }\n\
+snippet eaid\n\
+ each_index do |${1:i}|\n\
+ ${2}\n\
+ end\n\
+snippet eak\n\
+ each_key { |${1:key}| ${2} }\n\
+snippet eakd\n\
+ each_key do |${1:key}|\n\
+ ${2}\n\
+ end\n\
+snippet eal\n\
+ each_line { |${1:line}| ${2} }\n\
+snippet eald\n\
+ each_line do |${1:line}|\n\
+ ${2}\n\
+ end\n\
+snippet eap\n\
+ each_pair { |${1:name}, ${2:val}| ${3} }\n\
+snippet eapd\n\
+ each_pair do |${1:name}, ${2:val}|\n\
+ ${3}\n\
+ end\n\
+snippet eas-\n\
+ each_slice(${1:2}) { |${2:group}| ${3} }\n\
+snippet easd-\n\
+ each_slice(${1:2}) do |${2:group}|\n\
+ ${3}\n\
+ end\n\
+snippet eav\n\
+ each_value { |${1:val}| ${2} }\n\
+snippet eavd\n\
+ each_value do |${1:val}|\n\
+ ${2}\n\
+ end\n\
+snippet eawi\n\
+ each_with_index { |${1:e}, ${2:i}| ${3} }\n\
+snippet eawid\n\
+ each_with_index do |${1:e},${2:i}|\n\
+ ${3}\n\
+ end\n\
+snippet reve\n\
+ reverse_each { |${1:e}| ${2} }\n\
+snippet reved\n\
+ reverse_each do |${1:e}|\n\
+ ${2}\n\
+ end\n\
+snippet inj\n\
+ inject(${1:init}) { |${2:mem}, ${3:var}| ${4} }\n\
+snippet injd\n\
+ inject(${1:init}) do |${2:mem}, ${3:var}|\n\
+ ${4}\n\
+ end\n\
+snippet map\n\
+ map { |${1:e}| ${2} }\n\
+snippet mapd\n\
+ map do |${1:e}|\n\
+ ${2}\n\
+ end\n\
+snippet mapwi-\n\
+ enum_with_index.map { |${1:e}, ${2:i}| ${3} }\n\
+snippet sor\n\
+ sort { |a, b| ${1} }\n\
+snippet sorb\n\
+ sort_by { |${1:e}| ${2} }\n\
+snippet ran\n\
+ sort_by { rand }\n\
+snippet all\n\
+ all? { |${1:e}| ${2} }\n\
+snippet any\n\
+ any? { |${1:e}| ${2} }\n\
+snippet cl\n\
+ classify { |${1:e}| ${2} }\n\
+snippet col\n\
+ collect { |${1:e}| ${2} }\n\
+snippet cold\n\
+ collect do |${1:e}|\n\
+ ${2}\n\
+ end\n\
+snippet det\n\
+ detect { |${1:e}| ${2} }\n\
+snippet detd\n\
+ detect do |${1:e}|\n\
+ ${2}\n\
+ end\n\
+snippet fet\n\
+ fetch(${1:name}) { |${2:key}| ${3} }\n\
+snippet fin\n\
+ find { |${1:e}| ${2} }\n\
+snippet find\n\
+ find do |${1:e}|\n\
+ ${2}\n\
+ end\n\
+snippet fina\n\
+ find_all { |${1:e}| ${2} }\n\
+snippet finad\n\
+ find_all do |${1:e}|\n\
+ ${2}\n\
+ end\n\
+snippet gre\n\
+ grep(${1:/pattern/}) { |${2:match}| ${3} }\n\
+snippet sub\n\
+ ${1:g}sub(${2:/pattern/}) { |${3:match}| ${4} }\n\
+snippet sca\n\
+ scan(${1:/pattern/}) { |${2:match}| ${3} }\n\
+snippet scad\n\
+ scan(${1:/pattern/}) do |${2:match}|\n\
+ ${3}\n\
+ end\n\
+snippet max\n\
+ max { |a, b| ${1} }\n\
+snippet min\n\
+ min { |a, b| ${1} }\n\
+snippet par\n\
+ partition { |${1:e}| ${2} }\n\
+snippet pard\n\
+ partition do |${1:e}|\n\
+ ${2}\n\
+ end\n\
+snippet rej\n\
+ reject { |${1:e}| ${2} }\n\
+snippet rejd\n\
+ reject do |${1:e}|\n\
+ ${2}\n\
+ end\n\
+snippet sel\n\
+ select { |${1:e}| ${2} }\n\
+snippet seld\n\
+ select do |${1:e}|\n\
+ ${2}\n\
+ end\n\
+snippet lam\n\
+ lambda { |${1:args}| ${2} }\n\
+snippet doo\n\
+ do\n\
+ ${1}\n\
+ end\n\
+snippet dov\n\
+ do |${1:variable}|\n\
+ ${2}\n\
+ end\n\
+snippet :\n\
+ :${1:key} => ${2:\"value\"}${3}\n\
+snippet ope\n\
+ open(${1:\"path/or/url/or/pipe\"}, \"${2:w}\") { |${3:io}| ${4} }\n\
+# path_from_here()\n\
+snippet fpath\n\
+ File.join(File.dirname(__FILE__), *%2[${1:rel path here}])${2}\n\
+# unix_filter {}\n\
+snippet unif\n\
+ ARGF.each_line${1} do |${2:line}|\n\
+ ${3}\n\
+ end\n\
+# option_parse {}\n\
+snippet optp\n\
+ require \"optparse\"\n\
+\n\
+ options = {${1:default => \"args\"}}\n\
+\n\
+ ARGV.options do |opts|\n\
+ opts.banner = \"Usage: #{File.basename($PROGRAM_NAME)}\n\
+snippet opt\n\
+ opts.on( \"-${1:o}\", \"--${2:long-option-name}\", ${3:String},\n\
+ \"${4:Option description.}\") do |${5:opt}|\n\
+ ${6}\n\
+ end\n\
+snippet tc\n\
+ require \"test/unit\"\n\
+\n\
+ require \"${1:library_file_name}\"\n\
+\n\
+ class Test${2:$1} < Test::Unit::TestCase\n\
+ def test_${3:case_name}\n\
+ ${4}\n\
+ end\n\
+ end\n\
+snippet ts\n\
+ require \"test/unit\"\n\
+\n\
+ require \"tc_${1:test_case_file}\"\n\
+ require \"tc_${2:test_case_file}\"${3}\n\
+snippet as\n\
+ assert ${1:test}, \"${2:Failure message.}\"${3}\n\
+snippet ase\n\
+ assert_equal ${1:expected}, ${2:actual}${3}\n\
+snippet asne\n\
+ assert_not_equal ${1:unexpected}, ${2:actual}${3}\n\
+snippet asid\n\
+ assert_in_delta ${1:expected_float}, ${2:actual_float}, ${3:2 ** -20}${4}\n\
+snippet asio\n\
+ assert_instance_of ${1:ExpectedClass}, ${2:actual_instance}${3}\n\
+snippet asko\n\
+ assert_kind_of ${1:ExpectedKind}, ${2:actual_instance}${3}\n\
+snippet asn\n\
+ assert_nil ${1:instance}${2}\n\
+snippet asnn\n\
+ assert_not_nil ${1:instance}${2}\n\
+snippet asm\n\
+ assert_match /${1:expected_pattern}/, ${2:actual_string}${3}\n\
+snippet asnm\n\
+ assert_no_match /${1:unexpected_pattern}/, ${2:actual_string}${3}\n\
+snippet aso\n\
+ assert_operator ${1:left}, :${2:operator}, ${3:right}${4}\n\
+snippet asr\n\
+ assert_raise ${1:Exception} { ${2} }\n\
+snippet asrd\n\
+ assert_raise ${1:Exception} do\n\
+ ${2}\n\
+ end\n\
+snippet asnr\n\
+ assert_nothing_raised ${1:Exception} { ${2} }\n\
+snippet asnrd\n\
+ assert_nothing_raised ${1:Exception} do\n\
+ ${2}\n\
+ end\n\
+snippet asrt\n\
+ assert_respond_to ${1:object}, :${2:method}${3}\n\
+snippet ass assert_same(..)\n\
+ assert_same ${1:expected}, ${2:actual}${3}\n\
+snippet ass assert_send(..)\n\
+ assert_send [${1:object}, :${2:message}, ${3:args}]${4}\n\
+snippet asns\n\
+ assert_not_same ${1:unexpected}, ${2:actual}${3}\n\
+snippet ast\n\
+ assert_throws :${1:expected} { ${2} }\n\
+snippet astd\n\
+ assert_throws :${1:expected} do\n\
+ ${2}\n\
+ end\n\
+snippet asnt\n\
+ assert_nothing_thrown { ${1} }\n\
+snippet asntd\n\
+ assert_nothing_thrown do\n\
+ ${1}\n\
+ end\n\
+snippet fl\n\
+ flunk \"${1:Failure message.}\"${2}\n\
+# Benchmark.bmbm do .. end\n\
+snippet bm-\n\
+ TESTS = ${1:10_000}\n\
+ Benchmark.bmbm do |results|\n\
+ ${2}\n\
+ end\n\
+snippet rep\n\
+ results.report(\"${1:name}:\") { TESTS.times { ${2} }}\n\
+# Marshal.dump(.., file)\n\
+snippet Md\n\
+ File.open(${1:\"path/to/file.dump\"}, \"wb\") { |${2:file}| Marshal.dump(${3:obj}, $2) }${4}\n\
+# Mashal.load(obj)\n\
+snippet Ml\n\
+ File.open(${1:\"path/to/file.dump\"}, \"rb\") { |${2:file}| Marshal.load($2) }${3}\n\
+# deep_copy(..)\n\
+snippet deec\n\
+ Marshal.load(Marshal.dump(${1:obj_to_copy}))${2}\n\
+snippet Pn-\n\
+ PStore.new(${1:\"file_name.pstore\"})${2}\n\
+snippet tra\n\
+ transaction(${1:true}) { ${2} }\n\
+# xmlread(..)\n\
+snippet xml-\n\
+ REXML::Document.new(File.read(${1:\"path/to/file\"}))${2}\n\
+# xpath(..) { .. }\n\
+snippet xpa\n\
+ elements.each(${1:\"//Xpath\"}) do |${2:node}|\n\
+ ${3}\n\
+ end\n\
+# class_from_name()\n\
+snippet clafn\n\
+ split(\"::\").inject(Object) { |par, const| par.const_get(const) }\n\
+# singleton_class()\n\
+snippet sinc\n\
+ class << self; self end\n\
+snippet nam\n\
+ namespace :${1:`Filename()`} do\n\
+ ${2}\n\
+ end\n\
+snippet tas\n\
+ desc \"${1:Task description}\"\n\
+ task :${2:task_name => [:dependent, :tasks]} do\n\
+ ${3}\n\
+ end\n\
+# block\n\
+snippet b\n\
+ { |${1:var}| ${2} }\n\
+snippet begin\n\
+ begin\n\
+ raise 'A test exception.'\n\
+ rescue Exception => e\n\
+ puts e.message\n\
+ puts e.backtrace.inspect\n\
+ else\n\
+ # other exception\n\
+ ensure\n\
+ # always executed\n\
+ end\n\
+\n\
+#debugging\n\
+snippet debug\n\
+ require 'ruby-debug'; debugger; true;\n\
+snippet pry\n\
+ require 'pry'; binding.pry\n\
+\n\
+#############################################\n\
+# Rails snippets - for pure Ruby, see above #\n\
+#############################################\n\
+snippet art\n\
+ assert_redirected_to ${1::action => \"${2:index}\"}\n\
+snippet artnp\n\
+ assert_redirected_to ${1:parent}_${2:child}_path(${3:@$1}, ${4:@$2})\n\
+snippet artnpp\n\
+ assert_redirected_to ${1:parent}_${2:child}_path(${3:@$1})\n\
+snippet artp\n\
+ assert_redirected_to ${1:model}_path(${2:@$1})\n\
+snippet artpp\n\
+ assert_redirected_to ${1:model}s_path\n\
+snippet asd\n\
+ assert_difference \"${1:Model}.${2:count}\", $1 do\n\
+ ${3}\n\
+ end\n\
+snippet asnd\n\
+ assert_no_difference \"${1:Model}.${2:count}\" do\n\
+ ${3}\n\
+ end\n\
+snippet asre\n\
+ assert_response :${1:success}, @response.body${2}\n\
+snippet asrj\n\
+ assert_rjs :${1:replace}, \"${2:dom id}\"\n\
+snippet ass assert_select(..)\n\
+ assert_select '${1:path}', :${2:text} => '${3:inner_html' ${4:do}\n\
+snippet bf\n\
+ before_filter :${1:method}\n\
+snippet bt\n\
+ belongs_to :${1:association}\n\
+snippet crw\n\
+ cattr_accessor :${1:attr_names}\n\
+snippet defcreate\n\
+ def create\n\
+ @${1:model_class_name} = ${2:ModelClassName}.new(params[:$1])\n\
+\n\
+ respond_to do |wants|\n\
+ if @$1.save\n\
+ flash[:notice] = '$2 was successfully created.'\n\
+ wants.html { redirect_to(@$1) }\n\
+ wants.xml { render :xml => @$1, :status => :created, :location => @$1 }\n\
+ else\n\
+ wants.html { render :action => \"new\" }\n\
+ wants.xml { render :xml => @$1.errors, :status => :unprocessable_entity }\n\
+ end\n\
+ end\n\
+ end${3}\n\
+snippet defdestroy\n\
+ def destroy\n\
+ @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\
+ @$1.destroy\n\
+\n\
+ respond_to do |wants|\n\
+ wants.html { redirect_to($1s_url) }\n\
+ wants.xml { head :ok }\n\
+ end\n\
+ end${3}\n\
+snippet defedit\n\
+ def edit\n\
+ @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\
+ end\n\
+snippet defindex\n\
+ def index\n\
+ @${1:model_class_name} = ${2:ModelClassName}.all\n\
+\n\
+ respond_to do |wants|\n\
+ wants.html # index.html.erb\n\
+ wants.xml { render :xml => @$1s }\n\
+ end\n\
+ end${3}\n\
+snippet defnew\n\
+ def new\n\
+ @${1:model_class_name} = ${2:ModelClassName}.new\n\
+\n\
+ respond_to do |wants|\n\
+ wants.html # new.html.erb\n\
+ wants.xml { render :xml => @$1 }\n\
+ end\n\
+ end${3}\n\
+snippet defshow\n\
+ def show\n\
+ @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\
+\n\
+ respond_to do |wants|\n\
+ wants.html # show.html.erb\n\
+ wants.xml { render :xml => @$1 }\n\
+ end\n\
+ end${3}\n\
+snippet defupdate\n\
+ def update\n\
+ @${1:model_class_name} = ${2:ModelClassName}.find(params[:id])\n\
+\n\
+ respond_to do |wants|\n\
+ if @$1.update_attributes(params[:$1])\n\
+ flash[:notice] = '$2 was successfully updated.'\n\
+ wants.html { redirect_to(@$1) }\n\
+ wants.xml { head :ok }\n\
+ else\n\
+ wants.html { render :action => \"edit\" }\n\
+ wants.xml { render :xml => @$1.errors, :status => :unprocessable_entity }\n\
+ end\n\
+ end\n\
+ end${3}\n\
+snippet flash\n\
+ flash[:${1:notice}] = \"${2}\"\n\
+snippet habtm\n\
+ has_and_belongs_to_many :${1:object}, :join_table => \"${2:table_name}\", :foreign_key => \"${3}_id\"${4}\n\
+snippet hm\n\
+ has_many :${1:object}\n\
+snippet hmd\n\
+ has_many :${1:other}s, :class_name => \"${2:$1}\", :foreign_key => \"${3:$1}_id\", :dependent => :destroy${4}\n\
+snippet hmt\n\
+ has_many :${1:object}, :through => :${2:object}\n\
+snippet ho\n\
+ has_one :${1:object}\n\
+snippet i18\n\
+ I18n.t('${1:type.key}')${2}\n\
+snippet ist\n\
+ <%= image_submit_tag(\"${1:agree.png}\", :id => \"${2:id}\"${3} %>\n\
+snippet log\n\
+ Rails.logger.${1:debug} ${2}\n\
+snippet log2\n\
+ RAILS_DEFAULT_LOGGER.${1:debug} ${2}\n\
+snippet logd\n\
+ logger.debug { \"${1:message}\" }${2}\n\
+snippet loge\n\
+ logger.error { \"${1:message}\" }${2}\n\
+snippet logf\n\
+ logger.fatal { \"${1:message}\" }${2}\n\
+snippet logi\n\
+ logger.info { \"${1:message}\" }${2}\n\
+snippet logw\n\
+ logger.warn { \"${1:message}\" }${2}\n\
+snippet mapc\n\
+ ${1:map}.${2:connect} '${3:controller/:action/:id}'\n\
+snippet mapca\n\
+ ${1:map}.catch_all \"*${2:anything}\", :controller => \"${3:default}\", :action => \"${4:error}\"${5}\n\
+snippet mapr\n\
+ ${1:map}.resource :${2:resource}\n\
+snippet maprs\n\
+ ${1:map}.resources :${2:resource}\n\
+snippet mapwo\n\
+ ${1:map}.with_options :${2:controller} => '${3:thing}' do |$3|\n\
+ ${4}\n\
+ end\n\
+snippet mbs\n\
+ before_save :${1:method}\n\
+snippet mcht\n\
+ change_table :${1:table_name} do |t|\n\
+ ${2}\n\
+ end\n\
+snippet mp\n\
+ map(&:${1:id})\n\
+snippet mrw\n\
+ mattr_accessor :${1:attr_names}\n\
+snippet oa\n\
+ order(\"${1:field}\")\n\
+snippet od\n\
+ order(\"${1:field} DESC\")\n\
+snippet pa\n\
+ params[:${1:id}]${2}\n\
+snippet ra\n\
+ render :action => \"${1:action}\"\n\
+snippet ral\n\
+ render :action => \"${1:action}\", :layout => \"${2:layoutname}\"\n\
+snippet rest\n\
+ respond_to do |wants|\n\
+ wants.${1:html} { ${2} }\n\
+ end\n\
+snippet rf\n\
+ render :file => \"${1:filepath}\"\n\
+snippet rfu\n\
+ render :file => \"${1:filepath}\", :use_full_path => ${2:false}\n\
+snippet ri\n\
+ render :inline => \"${1:<%= 'hello' %>}\"\n\
+snippet ril\n\
+ render :inline => \"${1:<%= 'hello' %>}\", :locals => { ${2::name} => \"${3:value}\"${4} }\n\
+snippet rit\n\
+ render :inline => \"${1:<%= 'hello' %>}\", :type => ${2::rxml}\n\
+snippet rjson\n\
+ render :json => ${1:text to render}\n\
+snippet rl\n\
+ render :layout => \"${1:layoutname}\"\n\
+snippet rn\n\
+ render :nothing => ${1:true}\n\
+snippet rns\n\
+ render :nothing => ${1:true}, :status => ${2:401}\n\
+snippet rp\n\
+ render :partial => \"${1:item}\"\n\
+snippet rpc\n\
+ render :partial => \"${1:item}\", :collection => ${2:@$1s}\n\
+snippet rpl\n\
+ render :partial => \"${1:item}\", :locals => { :${2:$1} => ${3:@$1}\n\
+snippet rpo\n\
+ render :partial => \"${1:item}\", :object => ${2:@$1}\n\
+snippet rps\n\
+ render :partial => \"${1:item}\", :status => ${2:500}\n\
+snippet rt\n\
+ render :text => \"${1:text to render}\"\n\
+snippet rtl\n\
+ render :text => \"${1:text to render}\", :layout => \"${2:layoutname}\"\n\
+snippet rtlt\n\
+ render :text => \"${1:text to render}\", :layout => ${2:true}\n\
+snippet rts\n\
+ render :text => \"${1:text to render}\", :status => ${2:401}\n\
+snippet ru\n\
+ render :update do |${1:page}|\n\
+ $1.${2}\n\
+ end\n\
+snippet rxml\n\
+ render :xml => ${1:text to render}\n\
+snippet sc\n\
+ scope :${1:name}, :where(:@${2:field} => ${3:value})\n\
+snippet sl\n\
+ scope :${1:name}, lambda do |${2:value}|\n\
+ where(\"${3:field = ?}\", ${4:bind var})\n\
+ end\n\
+snippet sha1\n\
+ Digest::SHA1.hexdigest(${1:string})\n\
+snippet sweeper\n\
+ class ${1:ModelClassName}Sweeper < ActionController::Caching::Sweeper\n\
+ observe $1\n\
+\n\
+ def after_save(${2:model_class_name})\n\
+ expire_cache($2)\n\
+ end\n\
+\n\
+ def after_destroy($2)\n\
+ expire_cache($2)\n\
+ end\n\
+\n\
+ def expire_cache($2)\n\
+ expire_page\n\
+ end\n\
+ end\n\
+snippet tcb\n\
+ t.boolean :${1:title}\n\
+ ${2}\n\
+snippet tcbi\n\
+ t.binary :${1:title}, :limit => ${2:2}.megabytes\n\
+ ${3}\n\
+snippet tcd\n\
+ t.decimal :${1:title}, :precision => ${2:10}, :scale => ${3:2}\n\
+ ${4}\n\
+snippet tcda\n\
+ t.date :${1:title}\n\
+ ${2}\n\
+snippet tcdt\n\
+ t.datetime :${1:title}\n\
+ ${2}\n\
+snippet tcf\n\
+ t.float :${1:title}\n\
+ ${2}\n\
+snippet tch\n\
+ t.change :${1:name}, :${2:string}, :${3:limit} => ${4:80}\n\
+ ${5}\n\
+snippet tci\n\
+ t.integer :${1:title}\n\
+ ${2}\n\
+snippet tcl\n\
+ t.integer :lock_version, :null => false, :default => 0\n\
+ ${1}\n\
+snippet tcr\n\
+ t.references :${1:taggable}, :polymorphic => { :default => '${2:Photo}' }\n\
+ ${3}\n\
+snippet tcs\n\
+ t.string :${1:title}\n\
+ ${2}\n\
+snippet tct\n\
+ t.text :${1:title}\n\
+ ${2}\n\
+snippet tcti\n\
+ t.time :${1:title}\n\
+ ${2}\n\
+snippet tcts\n\
+ t.timestamp :${1:title}\n\
+ ${2}\n\
+snippet tctss\n\
+ t.timestamps\n\
+ ${1}\n\
+snippet va\n\
+ validates_associated :${1:attribute}\n\
+snippet vao\n\
+ validates_acceptance_of :${1:terms}\n\
+snippet vc\n\
+ validates_confirmation_of :${1:attribute}\n\
+snippet ve\n\
+ validates_exclusion_of :${1:attribute}, :in => ${2:%w( mov avi )}\n\
+snippet vf\n\
+ validates_format_of :${1:attribute}, :with => /${2:regex}/\n\
+snippet vi\n\
+ validates_inclusion_of :${1:attribute}, :in => %w(${2: mov avi })\n\
+snippet vl\n\
+ validates_length_of :${1:attribute}, :within => ${2:3}..${3:20}\n\
+snippet vn\n\
+ validates_numericality_of :${1:attribute}\n\
+snippet vpo\n\
+ validates_presence_of :${1:attribute}\n\
+snippet vu\n\
+ validates_uniqueness_of :${1:attribute}\n\
+snippet wants\n\
+ wants.${1:js|xml|html} { ${2} }\n\
+snippet wc\n\
+ where(${1:\"conditions\"}${2:, bind_var})\n\
+snippet wh\n\
+ where(${1:field} => ${2:value})\n\
+snippet xdelete\n\
+ xhr :delete, :${1:destroy}, :id => ${2:1}${3}\n\
+snippet xget\n\
+ xhr :get, :${1:show}, :id => ${2:1}${3}\n\
+snippet xpost\n\
+ xhr :post, :${1:create}, :${2:object} => { ${3} }\n\
+snippet xput\n\
+ xhr :put, :${1:update}, :id => ${2:1}, :${3:object} => { ${4} }${5}\n\
+snippet test\n\
+ test \"should ${1:do something}\" do\n\
+ ${2}\n\
+ end\n\
+#migrations\n\
+snippet mac\n\
+ add_column :${1:table_name}, :${2:column_name}, :${3:data_type}\n\
+snippet mrc\n\
+ remove_column :${1:table_name}, :${2:column_name}\n\
+snippet mrnc\n\
+ rename_column :${1:table_name}, :${2:old_column_name}, :${3:new_column_name}\n\
+snippet mcc\n\
+ change_column :${1:table}, :${2:column}, :${3:type}\n\
+snippet mccc\n\
+ t.column :${1:title}, :${2:string}\n\
+snippet mct\n\
+ create_table :${1:table_name} do |t|\n\
+ t.column :${2:name}, :${3:type}\n\
+ end\n\
+snippet migration\n\
+ class ${1:class_name} < ActiveRecord::Migration\n\
+ def self.up\n\
+ ${2}\n\
+ end\n\
+\n\
+ def self.down\n\
+ end\n\
+ end\n\
+\n\
+snippet trc\n\
+ t.remove :${1:column}\n\
+snippet tre\n\
+ t.rename :${1:old_column_name}, :${2:new_column_name}\n\
+ ${3}\n\
+snippet tref\n\
+ t.references :${1:model}\n\
+\n\
+#rspec\n\
+snippet it\n\
+ it \"${1:spec_name}\" do\n\
+ ${2}\n\
+ end\n\
+snippet itp\n\
+ it \"${1:spec_name}\"\n\
+ ${2}\n\
+snippet desc\n\
+ describe ${1:class_name} do\n\
+ ${2}\n\
+ end\n\
+snippet cont\n\
+ context \"${1:message}\" do\n\
+ ${2}\n\
+ end\n\
+snippet bef\n\
+ before :${1:each} do\n\
+ ${2}\n\
+ end\n\
+snippet aft\n\
+ after :${1:each} do\n\
+ ${2}\n\
+ end\n\
+";
+exports.scope = "ruby";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/rust.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/rust.js
new file mode 100644
index 00000000..0411c63e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/rust.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/rust",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "rust";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/sass.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/sass.js
new file mode 100644
index 00000000..b9adc9d8
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/sass.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/sass",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "sass";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/scad.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/scad.js
new file mode 100644
index 00000000..998a98ac
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/scad.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/scad",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "scad";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/scala.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/scala.js
new file mode 100644
index 00000000..4051d988
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/scala.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/scala",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "scala";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/scheme.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/scheme.js
new file mode 100644
index 00000000..202d0741
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/scheme.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/scheme",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "scheme";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/scss.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/scss.js
new file mode 100644
index 00000000..fbd98f74
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/scss.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/scss",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "scss";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/sh.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/sh.js
new file mode 100644
index 00000000..0f1f6d8e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/sh.js
@@ -0,0 +1,90 @@
+ace.define("ace/snippets/sh",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# Shebang. Executing bash via /usr/bin/env makes scripts more portable.\n\
+snippet #!\n\
+ #!/usr/bin/env bash\n\
+ \n\
+snippet if\n\
+ if [[ ${1:condition} ]]; then\n\
+ ${2:#statements}\n\
+ fi\n\
+snippet elif\n\
+ elif [[ ${1:condition} ]]; then\n\
+ ${2:#statements}\n\
+snippet for\n\
+ for (( ${2:i} = 0; $2 < ${1:count}; $2++ )); do\n\
+ ${3:#statements}\n\
+ done\n\
+snippet fori\n\
+ for ${1:needle} in ${2:haystack} ; do\n\
+ ${3:#statements}\n\
+ done\n\
+snippet wh\n\
+ while [[ ${1:condition} ]]; do\n\
+ ${2:#statements}\n\
+ done\n\
+snippet until\n\
+ until [[ ${1:condition} ]]; do\n\
+ ${2:#statements}\n\
+ done\n\
+snippet case\n\
+ case ${1:word} in\n\
+ ${2:pattern})\n\
+ ${3};;\n\
+ esac\n\
+snippet go \n\
+ while getopts '${1:o}' ${2:opts} \n\
+ do \n\
+ case $$2 in\n\
+ ${3:o0})\n\
+ ${4:#staments};;\n\
+ esac\n\
+ done\n\
+# Set SCRIPT_DIR variable to directory script is located.\n\
+snippet sdir\n\
+ SCRIPT_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" && pwd )\"\n\
+# getopt\n\
+snippet getopt\n\
+ __ScriptVersion=\"${1:version}\"\n\
+\n\
+ #=== FUNCTION ================================================================\n\
+ # NAME: usage\n\
+ # DESCRIPTION: Display usage information.\n\
+ #===============================================================================\n\
+ function usage ()\n\
+ {\n\
+ cat <<- EOT\n\
+\n\
+ Usage : $${0:0} [options] [--] \n\
+\n\
+ Options: \n\
+ -h|help Display this message\n\
+ -v|version Display script version\n\
+\n\
+ EOT\n\
+ } # ---------- end of function usage ----------\n\
+\n\
+ #-----------------------------------------------------------------------\n\
+ # Handle command line arguments\n\
+ #-----------------------------------------------------------------------\n\
+\n\
+ while getopts \":hv\" opt\n\
+ do\n\
+ case $opt in\n\
+\n\
+ h|help ) usage; exit 0 ;;\n\
+\n\
+ v|version ) echo \"$${0:0} -- Version $__ScriptVersion\"; exit 0 ;;\n\
+\n\
+ \\? ) echo -e \"\\n Option does not exist : $OPTARG\\n\"\n\
+ usage; exit 1 ;;\n\
+\n\
+ esac # --- end of case ---\n\
+ done\n\
+ shift $(($OPTIND-1))\n\
+\n\
+";
+exports.scope = "sh";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/sjs.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/sjs.js
new file mode 100644
index 00000000..cf39a34e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/sjs.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/sjs",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "sjs";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/smarty.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/smarty.js
new file mode 100644
index 00000000..47319a25
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/smarty.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/smarty",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "smarty";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/snippets.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/snippets.js
new file mode 100644
index 00000000..b81605cc
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/snippets.js
@@ -0,0 +1,16 @@
+ace.define("ace/snippets/snippets",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# snippets for making snippets :)\n\
+snippet snip\n\
+ snippet ${1:trigger}\n\
+ ${2}\n\
+snippet msnip\n\
+ snippet ${1:trigger} ${2:description}\n\
+ ${3}\n\
+snippet v\n\
+ {VISUAL}\n\
+";
+exports.scope = "snippets";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/soy_template.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/soy_template.js
new file mode 100644
index 00000000..908f5fdf
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/soy_template.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/soy_template",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "soy_template";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/space.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/space.js
new file mode 100644
index 00000000..302b84e0
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/space.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/space",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "space";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/sparql.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/sparql.js
new file mode 100644
index 00000000..2c87bbfe
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/sparql.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/sparql",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/sql.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/sql.js
new file mode 100644
index 00000000..1822126b
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/sql.js
@@ -0,0 +1,33 @@
+ace.define("ace/snippets/sql",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet tbl\n\
+ create table ${1:table} (\n\
+ ${2:columns}\n\
+ );\n\
+snippet col\n\
+ ${1:name} ${2:type} ${3:default ''} ${4:not null}\n\
+snippet ccol\n\
+ ${1:name} varchar2(${2:size}) ${3:default ''} ${4:not null}\n\
+snippet ncol\n\
+ ${1:name} number ${3:default 0} ${4:not null}\n\
+snippet dcol\n\
+ ${1:name} date ${3:default sysdate} ${4:not null}\n\
+snippet ind\n\
+ create index ${3:$1_$2} on ${1:table}(${2:column});\n\
+snippet uind\n\
+ create unique index ${1:name} on ${2:table}(${3:column});\n\
+snippet tblcom\n\
+ comment on table ${1:table} is '${2:comment}';\n\
+snippet colcom\n\
+ comment on column ${1:table}.${2:column} is '${3:comment}';\n\
+snippet addcol\n\
+ alter table ${1:table} add (${2:column} ${3:type});\n\
+snippet seq\n\
+ create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1};\n\
+snippet s*\n\
+ select * from ${1:table}\n\
+";
+exports.scope = "sql";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/sqlserver.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/sqlserver.js
new file mode 100644
index 00000000..7dfa2d04
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/sqlserver.js
@@ -0,0 +1,76 @@
+ace.define("ace/snippets/sqlserver",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# ISNULL\n\
+snippet isnull\n\
+ ISNULL(${1:check_expression}, ${2:replacement_value})\n\
+# FORMAT\n\
+snippet format\n\
+ FORMAT(${1:value}, ${2:format})\n\
+# CAST\n\
+snippet cast\n\
+ CAST(${1:expression} AS ${2:data_type})\n\
+# CONVERT\n\
+snippet convert\n\
+ CONVERT(${1:data_type}, ${2:expression})\n\
+# DATEPART\n\
+snippet datepart\n\
+ DATEPART(${1:datepart}, ${2:date})\n\
+# DATEDIFF\n\
+snippet datediff\n\
+ DATEDIFF(${1:datepart}, ${2:startdate}, ${3:enddate})\n\
+# DATEADD\n\
+snippet dateadd\n\
+ DATEADD(${1:datepart}, ${2:number}, ${3:date})\n\
+# DATEFROMPARTS \n\
+snippet datefromparts\n\
+ DATEFROMPARTS(${1:year}, ${2:month}, ${3:day})\n\
+# OBJECT_DEFINITION\n\
+snippet objectdef\n\
+ SELECT OBJECT_DEFINITION(OBJECT_ID('${1:sys.server_permissions /*object name*/}'))\n\
+# STUFF XML\n\
+snippet stuffxml\n\
+ STUFF((SELECT ', ' + ${1:ColumnName}\n\
+ FROM ${2:TableName}\n\
+ WHERE ${3:WhereClause}\n\
+ FOR XML PATH('')), 1, 1, '') AS ${4:Alias}\n\
+ ${5:/*https://msdn.microsoft.com/en-us/library/ms188043.aspx*/}\n\
+# Create Procedure\n\
+snippet createproc\n\
+ -- =============================================\n\
+ -- Author: ${1:Author}\n\
+ -- Create date: ${2:Date}\n\
+ -- Description: ${3:Description}\n\
+ -- =============================================\n\
+ CREATE PROCEDURE ${4:Procedure_Name}\n\
+ ${5:/*Add the parameters for the stored procedure here*/}\n\
+ AS\n\
+ BEGIN\n\
+ -- SET NOCOUNT ON added to prevent extra result sets from interfering with SELECT statements.\n\
+ SET NOCOUNT ON;\n\
+ \n\
+ ${6:/*Add the T-SQL statements to compute the return value here*/}\n\
+ \n\
+ END\n\
+ GO\n\
+# Create Scalar Function\n\
+snippet createfn\n\
+ -- =============================================\n\
+ -- Author: ${1:Author}\n\
+ -- Create date: ${2:Date}\n\
+ -- Description: ${3:Description}\n\
+ -- =============================================\n\
+ CREATE FUNCTION ${4:Scalar_Function_Name}\n\
+ -- Add the parameters for the function here\n\
+ RETURNS ${5:Function_Data_Type}\n\
+ AS\n\
+ BEGIN\n\
+ DECLARE @Result ${5:Function_Data_Type}\n\
+ \n\
+ ${6:/*Add the T-SQL statements to compute the return value here*/}\n\
+ \n\
+ END\n\
+ GO";
+exports.scope = "sqlserver";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/stylus.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/stylus.js
new file mode 100644
index 00000000..5f700bae
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/stylus.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/stylus",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "stylus";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/svg.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/svg.js
new file mode 100644
index 00000000..69a3408e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/svg.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/svg",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "svg";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/swift.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/swift.js
new file mode 100644
index 00000000..55226ba0
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/swift.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/swift",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "swift";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/tcl.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/tcl.js
new file mode 100644
index 00000000..4d116da8
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/tcl.js
@@ -0,0 +1,99 @@
+ace.define("ace/snippets/tcl",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# #!/usr/bin/env tclsh\n\
+snippet #!\n\
+ #!/usr/bin/env tclsh\n\
+ \n\
+# Process\n\
+snippet pro\n\
+ proc ${1:function_name} {${2:args}} {\n\
+ ${3:#body ...}\n\
+ }\n\
+#xif\n\
+snippet xif\n\
+ ${1:expr}? ${2:true} : ${3:false}\n\
+# Conditional\n\
+snippet if\n\
+ if {${1}} {\n\
+ ${2:# body...}\n\
+ }\n\
+# Conditional if..else\n\
+snippet ife\n\
+ if {${1}} {\n\
+ ${2:# body...}\n\
+ } else {\n\
+ ${3:# else...}\n\
+ }\n\
+# Conditional if..elsif..else\n\
+snippet ifee\n\
+ if {${1}} {\n\
+ ${2:# body...}\n\
+ } elseif {${3}} {\n\
+ ${4:# elsif...}\n\
+ } else {\n\
+ ${5:# else...}\n\
+ }\n\
+# If catch then\n\
+snippet ifc\n\
+ if { [catch {${1:#do something...}} ${2:err}] } {\n\
+ ${3:# handle failure...}\n\
+ }\n\
+# Catch\n\
+snippet catch\n\
+ catch {${1}} ${2:err} ${3:options}\n\
+# While Loop\n\
+snippet wh\n\
+ while {${1}} {\n\
+ ${2:# body...}\n\
+ }\n\
+# For Loop\n\
+snippet for\n\
+ for {set ${2:var} 0} {$$2 < ${1:count}} {${3:incr} $2} {\n\
+ ${4:# body...}\n\
+ }\n\
+# Foreach Loop\n\
+snippet fore\n\
+ foreach ${1:x} {${2:#list}} {\n\
+ ${3:# body...}\n\
+ }\n\
+# after ms script...\n\
+snippet af\n\
+ after ${1:ms} ${2:#do something}\n\
+# after cancel id\n\
+snippet afc\n\
+ after cancel ${1:id or script}\n\
+# after idle\n\
+snippet afi\n\
+ after idle ${1:script}\n\
+# after info id\n\
+snippet afin\n\
+ after info ${1:id}\n\
+# Expr\n\
+snippet exp\n\
+ expr {${1:#expression here}}\n\
+# Switch\n\
+snippet sw\n\
+ switch ${1:var} {\n\
+ ${3:pattern 1} {\n\
+ ${4:#do something}\n\
+ }\n\
+ default {\n\
+ ${2:#do something}\n\
+ }\n\
+ }\n\
+# Case\n\
+snippet ca\n\
+ ${1:pattern} {\n\
+ ${2:#do something}\n\
+ }${3}\n\
+# Namespace eval\n\
+snippet ns\n\
+ namespace eval ${1:path} {${2:#script...}}\n\
+# Namespace current\n\
+snippet nsc\n\
+ namespace current\n\
+";
+exports.scope = "tcl";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/tex.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/tex.js
new file mode 100644
index 00000000..2bd3f103
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/tex.js
@@ -0,0 +1,197 @@
+ace.define("ace/snippets/tex",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "#PREAMBLE\n\
+#newcommand\n\
+snippet nc\n\
+ \\newcommand{\\${1:cmd}}[${2:opt}]{${3:realcmd}}${4}\n\
+#usepackage\n\
+snippet up\n\
+ \\usepackage[${1:[options}]{${2:package}}\n\
+#newunicodechar\n\
+snippet nuc\n\
+ \\newunicodechar{${1}}{${2:\\ensuremath}${3:tex-substitute}}}\n\
+#DeclareMathOperator\n\
+snippet dmo\n\
+ \\DeclareMathOperator{${1}}{${2}}\n\
+\n\
+#DOCUMENT\n\
+# \\begin{}...\\end{}\n\
+snippet begin\n\
+ \\begin{${1:env}}\n\
+ ${2}\n\
+ \\end{$1}\n\
+# Tabular\n\
+snippet tab\n\
+ \\begin{${1:tabular}}{${2:c}}\n\
+ ${3}\n\
+ \\end{$1}\n\
+snippet thm\n\
+ \\begin[${1:author}]{${2:thm}}\n\
+ ${3}\n\
+ \\end{$1}\n\
+snippet center\n\
+ \\begin{center}\n\
+ ${1}\n\
+ \\end{center}\n\
+# Align(ed)\n\
+snippet ali\n\
+ \\begin{align${1:ed}}\n\
+ ${2}\n\
+ \\end{align$1}\n\
+# Gather(ed)\n\
+snippet gat\n\
+ \\begin{gather${1:ed}}\n\
+ ${2}\n\
+ \\end{gather$1}\n\
+# Equation\n\
+snippet eq\n\
+ \\begin{equation}\n\
+ ${1}\n\
+ \\end{equation}\n\
+# Equation\n\
+snippet eq*\n\
+ \\begin{equation*}\n\
+ ${1}\n\
+ \\end{equation*}\n\
+# Unnumbered Equation\n\
+snippet \\\n\
+ \\[\n\
+ ${1}\n\
+ \\]\n\
+# Enumerate\n\
+snippet enum\n\
+ \\begin{enumerate}\n\
+ \\item ${1}\n\
+ \\end{enumerate}\n\
+# Itemize\n\
+snippet itemize\n\
+ \\begin{itemize}\n\
+ \\item ${1}\n\
+ \\end{itemize}\n\
+# Description\n\
+snippet desc\n\
+ \\begin{description}\n\
+ \\item[${1}] ${2}\n\
+ \\end{description}\n\
+# Matrix\n\
+snippet mat\n\
+ \\begin{${1:p/b/v/V/B/small}matrix}\n\
+ ${2}\n\
+ \\end{$1matrix}\n\
+# Cases\n\
+snippet cas\n\
+ \\begin{cases}\n\
+ ${1:equation}, &\\text{ if }${2:case}\\\\\n\
+ ${3}\n\
+ \\end{cases}\n\
+# Split\n\
+snippet spl\n\
+ \\begin{split}\n\
+ ${1}\n\
+ \\end{split}\n\
+# Part\n\
+snippet part\n\
+ \\part{${1:part name}} % (fold)\n\
+ \\label{prt:${2:$1}}\n\
+ ${3}\n\
+ % part $2 (end)\n\
+# Chapter\n\
+snippet cha\n\
+ \\chapter{${1:chapter name}}\n\
+ \\label{cha:${2:$1}}\n\
+ ${3}\n\
+# Section\n\
+snippet sec\n\
+ \\section{${1:section name}}\n\
+ \\label{sec:${2:$1}}\n\
+ ${3}\n\
+# Sub Section\n\
+snippet sub\n\
+ \\subsection{${1:subsection name}}\n\
+ \\label{sub:${2:$1}}\n\
+ ${3}\n\
+# Sub Sub Section\n\
+snippet subs\n\
+ \\subsubsection{${1:subsubsection name}}\n\
+ \\label{ssub:${2:$1}}\n\
+ ${3}\n\
+# Paragraph\n\
+snippet par\n\
+ \\paragraph{${1:paragraph name}}\n\
+ \\label{par:${2:$1}}\n\
+ ${3}\n\
+# Sub Paragraph\n\
+snippet subp\n\
+ \\subparagraph{${1:subparagraph name}}\n\
+ \\label{subp:${2:$1}}\n\
+ ${3}\n\
+#References\n\
+snippet itd\n\
+ \\item[${1:description}] ${2:item}\n\
+snippet figure\n\
+ ${1:Figure}~\\ref{${2:fig:}}${3}\n\
+snippet table\n\
+ ${1:Table}~\\ref{${2:tab:}}${3}\n\
+snippet listing\n\
+ ${1:Listing}~\\ref{${2:list}}${3}\n\
+snippet section\n\
+ ${1:Section}~\\ref{${2:sec:}}${3}\n\
+snippet page\n\
+ ${1:page}~\\pageref{${2}}${3}\n\
+snippet index\n\
+ \\index{${1:index}}${2}\n\
+#Citations\n\
+snippet cite\n\
+ \\cite[${1}]{${2}}${3}\n\
+snippet fcite\n\
+ \\footcite[${1}]{${2}}${3}\n\
+#Formating text: italic, bold, underline, small capital, emphase ..\n\
+snippet it\n\
+ \\textit{${1:text}}\n\
+snippet bf\n\
+ \\textbf{${1:text}}\n\
+snippet under\n\
+ \\underline{${1:text}}\n\
+snippet emp\n\
+ \\emph{${1:text}}\n\
+snippet sc\n\
+ \\textsc{${1:text}}\n\
+#Choosing font\n\
+snippet sf\n\
+ \\textsf{${1:text}}\n\
+snippet rm\n\
+ \\textrm{${1:text}}\n\
+snippet tt\n\
+ \\texttt{${1:text}}\n\
+#misc\n\
+snippet ft\n\
+ \\footnote{${1:text}}\n\
+snippet fig\n\
+ \\begin{figure}\n\
+ \\begin{center}\n\
+ \\includegraphics[scale=${1}]{Figures/${2}}\n\
+ \\end{center}\n\
+ \\caption{${3}}\n\
+ \\label{fig:${4}}\n\
+ \\end{figure}\n\
+snippet tikz\n\
+ \\begin{figure}\n\
+ \\begin{center}\n\
+ \\begin{tikzpicture}[scale=${1:1}]\n\
+ ${2}\n\
+ \\end{tikzpicture}\n\
+ \\end{center}\n\
+ \\caption{${3}}\n\
+ \\label{fig:${4}}\n\
+ \\end{figure}\n\
+#math\n\
+snippet stackrel\n\
+ \\stackrel{${1:above}}{${2:below}} ${3}\n\
+snippet frac\n\
+ \\frac{${1:num}}{${2:denom}}\n\
+snippet sum\n\
+ \\sum^{${1:n}}_{${2:i=1}}{${3}}";
+exports.scope = "tex";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/text.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/text.js
new file mode 100644
index 00000000..57b897bf
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/text.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/text",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "text";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/textile.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/textile.js
new file mode 100644
index 00000000..a6fd711e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/textile.js
@@ -0,0 +1,37 @@
+ace.define("ace/snippets/textile",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# Jekyll post header\n\
+snippet header\n\
+ ---\n\
+ title: ${1:title}\n\
+ layout: post\n\
+ date: ${2:date} ${3:hour:minute:second} -05:00\n\
+ ---\n\
+\n\
+# Image\n\
+snippet img\n\
+ !${1:url}(${2:title}):${3:link}!\n\
+\n\
+# Table\n\
+snippet |\n\
+ |${1}|${2}\n\
+\n\
+# Link\n\
+snippet link\n\
+ \"${1:link text}\":${2:url}\n\
+\n\
+# Acronym\n\
+snippet (\n\
+ (${1:Expand acronym})${2}\n\
+\n\
+# Footnote\n\
+snippet fn\n\
+ [${1:ref number}] ${3}\n\
+\n\
+ fn$1. ${2:footnote}\n\
+ \n\
+";
+exports.scope = "textile";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/toml.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/toml.js
new file mode 100644
index 00000000..0c1a857b
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/toml.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/toml",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "toml";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/tsx.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/tsx.js
new file mode 100644
index 00000000..7946297e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/tsx.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/tsx",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "tsx";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/turtle.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/turtle.js
new file mode 100644
index 00000000..5e104b22
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/turtle.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/turtle",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/twig.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/twig.js
new file mode 100644
index 00000000..ccc6073c
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/twig.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/twig",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "twig";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/typescript.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/typescript.js
new file mode 100644
index 00000000..5f6217d0
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/typescript.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/typescript",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "typescript";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/vala.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/vala.js
new file mode 100644
index 00000000..3b493422
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/vala.js
@@ -0,0 +1,193 @@
+ace.define("ace/snippets/vala",["require","exports","module"], function(require, exports, module) {
+"use strict";
+exports.snippets = [
+ {
+ "content": "case ${1:condition}:\n\t$0\n\tbreak;\n",
+ "name": "case",
+ "scope": "vala",
+ "tabTrigger": "case"
+ },
+ {
+ "content": "/**\n * ${6}\n */\n${1:public} class ${2:MethodName}${3: : GLib.Object} {\n\n\t/**\n\t * ${7}\n\t */\n\tpublic ${2}(${4}) {\n\t\t${5}\n\t}\n\n\t$0\n}",
+ "name": "class",
+ "scope": "vala",
+ "tabTrigger": "class"
+ },
+ {
+ "content": "(${1}) => {\n\t${0}\n}\n",
+ "name": "closure",
+ "scope": "vala",
+ "tabTrigger": "=>"
+ },
+ {
+ "content": "/*\n * $0\n */",
+ "name": "Comment (multiline)",
+ "scope": "vala",
+ "tabTrigger": "/*"
+ },
+ {
+ "content": "Console.WriteLine($1);\n$0",
+ "name": "Console.WriteLine (writeline)",
+ "scope": "vala",
+ "tabTrigger": "writeline"
+ },
+ {
+ "content": "[DBus(name = \"$0\")]",
+ "name": "DBus annotation",
+ "scope": "vala",
+ "tabTrigger": "[DBus"
+ },
+ {
+ "content": "delegate ${1:void} ${2:DelegateName}($0);",
+ "name": "delegate",
+ "scope": "vala",
+ "tabTrigger": "delegate"
+ },
+ {
+ "content": "do {\n\t$0\n} while ($1);\n",
+ "name": "do while",
+ "scope": "vala",
+ "tabTrigger": "dowhile"
+ },
+ {
+ "content": "/**\n * $0\n */",
+ "name": "DocBlock",
+ "scope": "vala",
+ "tabTrigger": "/**"
+ },
+ {
+ "content": "else if ($1) {\n\t$0\n}\n",
+ "name": "else if (elseif)",
+ "scope": "vala",
+ "tabTrigger": "elseif"
+ },
+ {
+ "content": "else {\n\t$0\n}",
+ "name": "else",
+ "scope": "vala",
+ "tabTrigger": "else"
+ },
+ {
+ "content": "enum {$1:EnumName} {\n\t$0\n}",
+ "name": "enum",
+ "scope": "vala",
+ "tabTrigger": "enum"
+ },
+ {
+ "content": "public errordomain ${1:Error} {\n\t$0\n}",
+ "name": "error domain",
+ "scope": "vala",
+ "tabTrigger": "errordomain"
+ },
+ {
+ "content": "for ($1;$2;$3) {\n\t$0\n}",
+ "name": "for",
+ "scope": "vala",
+ "tabTrigger": "for"
+ },
+ {
+ "content": "foreach ($1 in $2) {\n\t$0\n}",
+ "name": "foreach",
+ "scope": "vala",
+ "tabTrigger": "foreach"
+ },
+ {
+ "content": "Gee.ArrayList<${1:G}>($0);",
+ "name": "Gee.ArrayList",
+ "scope": "vala",
+ "tabTrigger": "ArrayList"
+ },
+ {
+ "content": "Gee.HashMap<${1:K},${2:V}>($0);",
+ "name": "Gee.HashMap",
+ "scope": "vala",
+ "tabTrigger": "HashMap"
+ },
+ {
+ "content": "Gee.HashSet<${1:G}>($0);",
+ "name": "Gee.HashSet",
+ "scope": "vala",
+ "tabTrigger": "HashSet"
+ },
+ {
+ "content": "if ($1) {\n\t$0\n}",
+ "name": "if",
+ "scope": "vala",
+ "tabTrigger": "if"
+ },
+ {
+ "content": "interface ${1:InterfaceName}{$2: : SuperInterface} {\n\t$0\n}",
+ "name": "interface",
+ "scope": "vala",
+ "tabTrigger": "interface"
+ },
+ {
+ "content": "public static int main(string [] argv) {\n\t${0}\n\treturn 0;\n}",
+ "name": "Main function",
+ "scope": "vala",
+ "tabTrigger": "main"
+ },
+ {
+ "content": "namespace $1 {\n\t$0\n}\n",
+ "name": "namespace (ns)",
+ "scope": "vala",
+ "tabTrigger": "ns"
+ },
+ {
+ "content": "stdout.printf($0);",
+ "name": "printf",
+ "scope": "vala",
+ "tabTrigger": "printf"
+ },
+ {
+ "content": "${1:public} ${2:Type} ${3:Name} {\n\tset {\n\t\t$0\n\t}\n\tget {\n\n\t}\n}",
+ "name": "property (prop)",
+ "scope": "vala",
+ "tabTrigger": "prop"
+ },
+ {
+ "content": "${1:public} ${2:Type} ${3:Name} {\n\tget {\n\t\t$0\n\t}\n}",
+ "name": "read-only property (roprop)",
+ "scope": "vala",
+ "tabTrigger": "roprop"
+ },
+ {
+ "content": "@\"${1:\\$var}\"",
+ "name": "String template (@)",
+ "scope": "vala",
+ "tabTrigger": "@"
+ },
+ {
+ "content": "struct ${1:StructName} {\n\t$0\n}",
+ "name": "struct",
+ "scope": "vala",
+ "tabTrigger": "struct"
+ },
+ {
+ "content": "switch ($1) {\n\t$0\n}",
+ "name": "switch",
+ "scope": "vala",
+ "tabTrigger": "switch"
+ },
+ {
+ "content": "try {\n\t$2\n} catch (${1:Error} e) {\n\t$0\n}",
+ "name": "try/catch",
+ "scope": "vala",
+ "tabTrigger": "try"
+ },
+ {
+ "content": "\"\"\"$0\"\"\";",
+ "name": "Verbatim string (\"\"\")",
+ "scope": "vala",
+ "tabTrigger": "verbatim"
+ },
+ {
+ "content": "while ($1) {\n\t$0\n}",
+ "name": "while",
+ "scope": "vala",
+ "tabTrigger": "while"
+ }
+];
+exports.scope = "";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/vbscript.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/vbscript.js
new file mode 100644
index 00000000..38ca68fb
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/vbscript.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/vbscript",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "vbscript";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/velocity.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/velocity.js
new file mode 100644
index 00000000..e2b12a45
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/velocity.js
@@ -0,0 +1,36 @@
+ace.define("ace/snippets/velocity",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "# macro\n\
+snippet #macro\n\
+ #macro ( ${1:macroName} ${2:\\$var1, [\\$var2, ...]} )\n\
+ ${3:## macro code}\n\
+ #end\n\
+# foreach\n\
+snippet #foreach\n\
+ #foreach ( ${1:\\$item} in ${2:\\$collection} )\n\
+ ${3:## foreach code}\n\
+ #end\n\
+# if\n\
+snippet #if\n\
+ #if ( ${1:true} )\n\
+ ${0}\n\
+ #end\n\
+# if ... else\n\
+snippet #ife\n\
+ #if ( ${1:true} )\n\
+ ${2}\n\
+ #else\n\
+ ${0}\n\
+ #end\n\
+#import\n\
+snippet #import\n\
+ #import ( \"${1:path/to/velocity/format}\" )\n\
+# set\n\
+snippet #set\n\
+ #set ( $${1:var} = ${0} )\n\
+";
+exports.scope = "velocity";
+exports.includeScopes = ["html", "javascript", "css"];
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/verilog.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/verilog.js
new file mode 100644
index 00000000..8103ff6f
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/verilog.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/verilog",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "verilog";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/vhdl.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/vhdl.js
new file mode 100644
index 00000000..10d8ca09
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/vhdl.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/vhdl",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "vhdl";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/wollok.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/wollok.js
new file mode 100644
index 00000000..31e62118
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/wollok.js
@@ -0,0 +1,91 @@
+ace.define("ace/snippets/wollok",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "##\n\
+## Basic Java packages and import\n\
+snippet im\n\
+ import\n\
+snippet w.l\n\
+ wollok.lang\n\
+snippet w.i\n\
+ wollok.lib\n\
+\n\
+## Class and object\n\
+snippet cl\n\
+ class ${1:`Filename(\"\", \"untitled\")`} ${2}\n\
+snippet obj\n\
+ object ${1:`Filename(\"\", \"untitled\")`} ${2:inherits Parent}${3}\n\
+snippet te\n\
+ test ${1:`Filename(\"\", \"untitled\")`}\n\
+\n\
+##\n\
+## Enhancements\n\
+snippet inh\n\
+ inherits\n\
+\n\
+##\n\
+## Comments\n\
+snippet /*\n\
+ /*\n\
+ * ${1}\n\
+ */\n\
+\n\
+##\n\
+## Control Statements\n\
+snippet el\n\
+ else\n\
+snippet if\n\
+ if (${1}) ${2}\n\
+\n\
+##\n\
+## Create a Method\n\
+snippet m\n\
+ method ${1:method}(${2}) ${5}\n\
+\n\
+## \n\
+## Tests\n\
+snippet as\n\
+ assert.equals(${1:expected}, ${2:actual})\n\
+\n\
+##\n\
+## Exceptions\n\
+snippet ca\n\
+ catch ${1:e} : (${2:Exception} ) ${3}\n\
+snippet thr\n\
+ throw\n\
+snippet try\n\
+ try {\n\
+ ${3}\n\
+ } catch ${1:e} : ${2:Exception} {\n\
+ }\n\
+\n\
+##\n\
+## Javadocs\n\
+snippet /**\n\
+ /**\n\
+ * ${1}\n\
+ */\n\
+\n\
+##\n\
+## Print Methods\n\
+snippet print\n\
+ console.println(\"${1:Message}\")\n\
+\n\
+##\n\
+## Setter and Getter Methods\n\
+snippet set\n\
+ method set${1:}(${2:}) {\n\
+ $1 = $2\n\
+ }\n\
+snippet get\n\
+ method get${1:}() {\n\
+ return ${1:};\n\
+ }\n\
+\n\
+##\n\
+## Terminate Methods or Loops\n\
+snippet re\n\
+ return";
+exports.scope = "wollok";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/xml.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/xml.js
new file mode 100644
index 00000000..ee4b688a
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/xml.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/xml",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "xml";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/xquery.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/xquery.js
new file mode 100644
index 00000000..c880abcf
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/xquery.js
@@ -0,0 +1,68 @@
+ace.define("ace/snippets/xquery",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText = "snippet for\n\
+ for $${1:item} in ${2:expr}\n\
+snippet return\n\
+ return ${1:expr}\n\
+snippet import\n\
+ import module namespace ${1:ns} = \"${2:http://www.example.com/}\";\n\
+snippet some\n\
+ some $${1:varname} in ${2:expr} satisfies ${3:expr}\n\
+snippet every\n\
+ every $${1:varname} in ${2:expr} satisfies ${3:expr}\n\
+snippet if\n\
+ if(${1:true}) then ${2:expr} else ${3:true}\n\
+snippet switch\n\
+ switch(${1:\"foo\"})\n\
+ case ${2:\"foo\"}\n\
+ return ${3:true}\n\
+ default return ${4:false}\n\
+snippet try\n\
+ try { ${1:expr} } catch ${2:*} { ${3:expr} }\n\
+snippet tumbling\n\
+ for tumbling window $${1:varname} in ${2:expr}\n\
+ start at $${3:start} when ${4:expr}\n\
+ end at $${5:end} when ${6:expr}\n\
+ return ${7:expr}\n\
+snippet sliding\n\
+ for sliding window $${1:varname} in ${2:expr}\n\
+ start at $${3:start} when ${4:expr}\n\
+ end at $${5:end} when ${6:expr}\n\
+ return ${7:expr}\n\
+snippet let\n\
+ let $${1:varname} := ${2:expr}\n\
+snippet group\n\
+ group by $${1:varname} := ${2:expr}\n\
+snippet order\n\
+ order by ${1:expr} ${2:descending}\n\
+snippet stable\n\
+ stable order by ${1:expr}\n\
+snippet count\n\
+ count $${1:varname}\n\
+snippet ordered\n\
+ ordered { ${1:expr} }\n\
+snippet unordered\n\
+ unordered { ${1:expr} }\n\
+snippet treat \n\
+ treat as ${1:expr}\n\
+snippet castable\n\
+ castable as ${1:atomicType}\n\
+snippet cast\n\
+ cast as ${1:atomicType}\n\
+snippet typeswitch\n\
+ typeswitch(${1:expr})\n\
+ case ${2:type} return ${3:expr}\n\
+ default return ${4:expr}\n\
+snippet var\n\
+ declare variable $${1:varname} := ${2:expr};\n\
+snippet fn\n\
+ declare function ${1:ns}:${2:name}(){\n\
+ ${3:expr}\n\
+ };\n\
+snippet module\n\
+ module namespace ${1:ns} = \"${2:http://www.example.com}\";\n\
+";
+exports.scope = "xquery";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/snippets/yaml.js b/www/wiki/extensions/CodeEditor/modules/ace/snippets/yaml.js
new file mode 100644
index 00000000..1adceabe
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/snippets/yaml.js
@@ -0,0 +1,7 @@
+ace.define("ace/snippets/yaml",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.snippetText =undefined;
+exports.scope = "yaml";
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-ambiance.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-ambiance.js
new file mode 100644
index 00000000..1e53ecd9
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-ambiance.js
@@ -0,0 +1,182 @@
+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_gutter-active-line {\
+background-color: #3F3F3F;\
+}\
+.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 {\
+-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 {\
+color: #E6E1DC;\
+background-color: #202020;\
+}\
+.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/www/wiki/extensions/CodeEditor/modules/ace/theme-chaos.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-chaos.js
new file mode 100644
index 00000000..97ec7fbd
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-chaos.js
@@ -0,0 +1,156 @@
+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 {\
+background-color: #161616;\
+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: '‣'\
+}\
+.ace-chaos .ace_indent-guide {\
+border-right:1px dotted #333;\
+margin-right:-1px;\
+}\
+.ace-chaos .ace_fold { \
+background: #222; \
+border-radius: 3px; \
+color: #7AF; \
+border: none; \
+}\
+.ace-chaos .ace_fold:hover {\
+background: #CCC; \
+color: #000;\
+}\
+";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-chrome.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-chrome.js
new file mode 100644
index 00000000..83742aa4
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-chrome.js
@@ -0,0 +1,128 @@
+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 {\
+background-color: #FFFFFF;\
+color: black;\
+}\
+.ace-chrome .ace_cursor {\
+color: 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_heading {\
+color: rgb(12, 7, 255);\
+}\
+.ace-chrome .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/www/wiki/extensions/CodeEditor/modules/ace/theme-clouds.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-clouds.js
new file mode 100644
index 00000000..83d0d14d
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-clouds.js
@@ -0,0 +1,95 @@
+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 {\
+background-color: #FFFFFF;\
+color: #000000\
+}\
+.ace-clouds .ace_cursor {\
+color: #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;\
+}\
+.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_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/www/wiki/extensions/CodeEditor/modules/ace/theme-clouds_midnight.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-clouds_midnight.js
new file mode 100644
index 00000000..275e9f29
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-clouds_midnight.js
@@ -0,0 +1,96 @@
+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 {\
+background-color: #191919;\
+color: #929292\
+}\
+.ace-clouds-midnight .ace_cursor {\
+color: #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;\
+}\
+.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: #666\
+}\
+.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_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-cobalt.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-cobalt.js
new file mode 100644
index 00000000..c5b6f267
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-cobalt.js
@@ -0,0 +1,113 @@
+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: rgb(128,145,160)\
+}\
+.ace-cobalt .ace_print-margin {\
+width: 1px;\
+background: #555555\
+}\
+.ace-cobalt {\
+background-color: #002240;\
+color: #FFFFFF\
+}\
+.ace-cobalt .ace_cursor {\
+color: #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;\
+}\
+.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_heading,\
+.ace-cobalt .ace_markup.ace_heading {\
+color: #C8E4FD;\
+background-color: #001221\
+}\
+.ace-cobalt .ace_list,\
+.ace-cobalt .ace_markup.ace_list {\
+background-color: #130D26\
+}\
+.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_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHCLSvkPAAP3AgSDTRd4AAAAAElFTkSuQmCC) right repeat-y\
+}\
+";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-crimson_editor.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-crimson_editor.js
new file mode 100644
index 00000000..a1885525
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-crimson_editor.js
@@ -0,0 +1,118 @@
+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 {\
+background-color: #FFFFFF;\
+color: rgb(64, 64, 64);\
+}\
+.ace-crimson-editor .ace_cursor {\
+color: 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/www/wiki/extensions/CodeEditor/modules/ace/theme-dawn.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-dawn.js
new file mode 100644
index 00000000..f3c15c92
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-dawn.js
@@ -0,0 +1,108 @@
+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 {\
+background-color: #F9F9F9;\
+color: #080808\
+}\
+.ace-dawn .ace_cursor {\
+color: #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;\
+}\
+.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_list,\
+.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_heading,\
+.ace-dawn .ace_markup.ace_heading {\
+color: #19356D\
+}\
+.ace-dawn .ace_variable {\
+color: #234A97\
+}\
+.ace-dawn .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLh/5+x/AAizA4hxNNsZAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-dreamweaver.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-dreamweaver.js
new file mode 100644
index 00000000..632b1ea9
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-dreamweaver.js
@@ -0,0 +1,141 @@
+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 {\
+background-color: #FFFFFF;\
+color: black;\
+}\
+.ace-dreamweaver .ace_fold {\
+background-color: #757AD8;\
+}\
+.ace-dreamweaver .ace_cursor {\
+color: 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_heading {\
+color: rgb(12, 7, 255);\
+}\
+.ace-dreamweaver .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_gutter-active-line {\
+background-color : #DCDCDC;\
+}\
+.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/www/wiki/extensions/CodeEditor/modules/ace/theme-eclipse.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-eclipse.js
new file mode 100644
index 00000000..63aa334c
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-eclipse.js
@@ -0,0 +1,98 @@
+ace.define("ace/theme/eclipse",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+"use strict";
+
+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 {\
+background-color: #FFFFFF;\
+color: black;\
+}\
+.ace-eclipse .ace_fold {\
+background-color: rgb(60, 76, 114);\
+}\
+.ace-eclipse .ace_cursor {\
+color: 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(113, 150, 130);\
+}\
+.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 {\
+color: darkblue;\
+}\
+.ace-eclipse .ace_tag {\
+color: rgb(25, 118, 116);\
+}\
+.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(25, 118, 116);\
+}\
+.ace-eclipse .ace_invisible {\
+color: #ddd;\
+}\
+.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_active-line {\
+background: rgb(232, 242, 254);\
+}\
+.ace-eclipse .ace_gutter-active-line {\
+background-color : #DADADA;\
+}\
+.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/www/wiki/extensions/CodeEditor/modules/ace/theme-github.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-github.js
new file mode 100644
index 00000000..d19512c6
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-github.js
@@ -0,0 +1,103 @@
+ace.define("ace/theme/github",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-github";
+exports.cssText = "\
+.ace-github .ace_gutter {\
+background: #e8e8e8;\
+color: #AAA;\
+}\
+.ace-github {\
+background: #fff;\
+color: #000;\
+}\
+.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_cursor {\
+color: black;\
+}\
+.ace-github.ace_focus .ace_marker-layer .ace_active-line {\
+background: rgb(255, 255, 204);\
+}\
+.ace-github .ace_marker-layer .ace_active-line {\
+background: rgb(245, 245, 245);\
+}\
+.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;\
+}\
+.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_invisible {\
+color: #BFBFBF\
+}\
+.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/www/wiki/extensions/CodeEditor/modules/ace/theme-gob.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-gob.js
new file mode 100644
index 00000000..9023fba6
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-gob.js
@@ -0,0 +1,112 @@
+ace.define("ace/theme/gob",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-gob";
+exports.cssText = ".ace-gob .ace_gutter {\
+background: #0B1818;\
+color: #03EE03\
+}\
+.ace-gob .ace_print-margin {\
+width: 1px;\
+background: #131313\
+}\
+.ace-gob {\
+background-color: #0B0B0B;\
+color: #00FF00\
+}\
+.ace-gob .ace_cursor {\
+border-color: rgba(16, 248, 255, 0.90);\
+background-color: rgba(16, 240, 248, 0.70);\
+opacity: 0.4;\
+}\
+.ace-gob .ace_marker-layer .ace_selection {\
+background: rgba(221, 240, 255, 0.20)\
+}\
+.ace-gob.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #141414;\
+}\
+.ace-gob .ace_marker-layer .ace_step {\
+background: rgb(16, 128, 0)\
+}\
+.ace-gob .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgba(64, 255, 255, 0.25)\
+}\
+.ace-gob .ace_marker-layer .ace_active-line {\
+background: rgba(255, 255, 255, 0.04)\
+}\
+.ace-gob .ace_gutter-active-line {\
+background-color: rgba(255, 255, 255, 0.04)\
+}\
+.ace-gob .ace_marker-layer .ace_selected-word {\
+border: 1px solid rgba(192, 240, 255, 0.20)\
+}\
+.ace-gob .ace_invisible {\
+color: rgba(255, 255, 255, 0.25)\
+}\
+.ace-gob .ace_keyword,\
+.ace-gob .ace_meta {\
+color: #10D8E8\
+}\
+.ace-gob .ace_constant,\
+.ace-gob .ace_constant.ace_character,\
+.ace-gob .ace_constant.ace_character.ace_escape,\
+.ace-gob .ace_constant.ace_other,\
+.ace-gob .ace_heading,\
+.ace-gob .ace_markup.ace_heading,\
+.ace-gob .ace_support.ace_constant {\
+color: #10F0A0\
+}\
+.ace-gob .ace_invalid.ace_illegal {\
+color: #F8F8F8;\
+background-color: rgba(86, 45, 86, 0.75)\
+}\
+.ace-gob .ace_invalid.ace_deprecated {\
+text-decoration: underline;\
+font-style: italic;\
+color: #20F8C0\
+}\
+.ace-gob .ace_support {\
+color: #20E8B0\
+}\
+.ace-gob .ace_fold {\
+background-color: #50B8B8;\
+border-color: #70F8F8\
+}\
+.ace-gob .ace_support.ace_function {\
+color: #00F800\
+}\
+.ace-gob .ace_list,\
+.ace-gob .ace_markup.ace_list,\
+.ace-gob .ace_storage {\
+color: #10FF98\
+}\
+.ace-gob .ace_entity.ace_name.ace_function,\
+.ace-gob .ace_meta.ace_tag,\
+.ace-gob .ace_variable {\
+color: #00F868\
+}\
+.ace-gob .ace_string {\
+color: #10F060\
+}\
+.ace-gob .ace_string.ace_regexp {\
+color: #20F090;\
+}\
+.ace-gob .ace_comment {\
+font-style: italic;\
+color: #00E060;\
+}\
+.ace-gob .ace_variable {\
+color: #00F888;\
+}\
+.ace-gob .ace_xml-pe {\
+color: #488858;\
+}\
+.ace-gob .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\
+}\
+";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-gruvbox.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-gruvbox.js
new file mode 100644
index 00000000..133ca641
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-gruvbox.js
@@ -0,0 +1,82 @@
+ace.define("ace/theme/gruvbox",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-gruvbox";
+exports.cssText = ".ace-gruvbox .ace_gutter-active-line {\
+background-color: #3C3836;\
+}\
+.ace-gruvbox {\
+color: #EBDAB4;\
+background-color: #1D2021;\
+}\
+.ace-gruvbox .ace_invisible {\
+color: #504945;\
+}\
+.ace-gruvbox .ace_marker-layer .ace_selection {\
+background: rgba(179, 101, 57, 0.75)\
+}\
+.ace-gruvbox.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #002240;\
+}\
+.ace-gruvbox .ace_keyword {\
+color: #8ec07c;\
+}\
+.ace-gruvbox .ace_comment {\
+font-style: italic;\
+color: #928375;\
+}\
+.ace-gruvbox .ace-statement {\
+color: red;\
+}\
+.ace-gruvbox .ace_variable {\
+color: #84A598;\
+}\
+.ace-gruvbox .ace_variable.ace_language {\
+color: #D2879B;\
+}\
+.ace-gruvbox .ace_constant {\
+color: #C2859A;\
+}\
+.ace-gruvbox .ace_constant.ace_language {\
+color: #C2859A;\
+}\
+.ace-gruvbox .ace_constant.ace_numeric {\
+color: #C2859A;\
+}\
+.ace-gruvbox .ace_string {\
+color: #B8BA37;\
+}\
+.ace-gruvbox .ace_support {\
+color: #F9BC41;\
+}\
+.ace-gruvbox .ace_support.ace_function {\
+color: #F84B3C;\
+}\
+.ace-gruvbox .ace_storage {\
+color: #8FBF7F;\
+}\
+.ace-gruvbox .ace_keyword.ace_operator {\
+color: #EBDAB4;\
+}\
+.ace-gruvbox .ace_punctuation.ace_operator {\
+color: yellow;\
+}\
+.ace-gruvbox .ace_marker-layer .ace_active-line {\
+background: #3C3836;\
+}\
+.ace-gruvbox .ace_marker-layer .ace_selected-word {\
+border-radius: 4px;\
+border: 8px solid #3f475d;\
+}\
+.ace-gruvbox .ace_print-margin {\
+width: 5px;\
+background: #3C3836;\
+}\
+.ace-gruvbox .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/www/wiki/extensions/CodeEditor/modules/ace/theme-idle_fingers.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-idle_fingers.js
new file mode 100644
index 00000000..7fcf1cbd
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-idle_fingers.js
@@ -0,0 +1,96 @@
+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: rgb(153,153,153)\
+}\
+.ace-idle-fingers .ace_print-margin {\
+width: 1px;\
+background: #3b3b3b\
+}\
+.ace-idle-fingers {\
+background-color: #323232;\
+color: #FFFFFF\
+}\
+.ace-idle-fingers .ace_cursor {\
+color: #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;\
+}\
+.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_collab.ace_user1 {\
+color: #323232;\
+background-color: #FFF980\
+}\
+.ace-idle-fingers .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMwMjLyZYiPj/8PAAreAwAI1+g0AAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-iplastic.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-iplastic.js
new file mode 100644
index 00000000..593aa00e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-iplastic.js
@@ -0,0 +1,121 @@
+ace.define("ace/theme/iplastic",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-iplastic";
+exports.cssText = ".ace-iplastic .ace_gutter {\
+background: #dddddd;\
+color: #666666\
+}\
+.ace-iplastic .ace_print-margin {\
+width: 1px;\
+background: #bbbbbb\
+}\
+.ace-iplastic {\
+background-color: #eeeeee;\
+color: #333333\
+}\
+.ace-iplastic .ace_cursor {\
+color: #333\
+}\
+.ace-iplastic .ace_marker-layer .ace_selection {\
+background: #BAD6FD;\
+}\
+.ace-iplastic.ace_multiselect .ace_selection.ace_start {\
+border-radius: 4px\
+}\
+.ace-iplastic .ace_marker-layer .ace_step {\
+background: #444444\
+}\
+.ace-iplastic .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #49483E;\
+background: #FFF799\
+}\
+.ace-iplastic .ace_marker-layer .ace_active-line {\
+background: #e5e5e5\
+}\
+.ace-iplastic .ace_gutter-active-line {\
+background-color: #eeeeee\
+}\
+.ace-iplastic .ace_marker-layer .ace_selected-word {\
+border: 1px solid #555555;\
+border-radius:4px\
+}\
+.ace-iplastic .ace_invisible {\
+color: #999999\
+}\
+.ace-iplastic .ace_entity.ace_name.ace_tag,\
+.ace-iplastic .ace_keyword,\
+.ace-iplastic .ace_meta.ace_tag,\
+.ace-iplastic .ace_storage {\
+color: #0000FF\
+}\
+.ace-iplastic .ace_punctuation,\
+.ace-iplastic .ace_punctuation.ace_tag {\
+color: #000\
+}\
+.ace-iplastic .ace_constant {\
+color: #333333;\
+font-weight: 700\
+}\
+.ace-iplastic .ace_constant.ace_character,\
+.ace-iplastic .ace_constant.ace_language,\
+.ace-iplastic .ace_constant.ace_numeric,\
+.ace-iplastic .ace_constant.ace_other {\
+color: #0066FF;\
+font-weight: 700\
+}\
+.ace-iplastic .ace_constant.ace_numeric{\
+font-weight: 100\
+}\
+.ace-iplastic .ace_invalid {\
+color: #F8F8F0;\
+background-color: #F92672\
+}\
+.ace-iplastic .ace_invalid.ace_deprecated {\
+color: #F8F8F0;\
+background-color: #AE81FF\
+}\
+.ace-iplastic .ace_support.ace_constant,\
+.ace-iplastic .ace_support.ace_function {\
+color: #333333;\
+font-weight: 700\
+}\
+.ace-iplastic .ace_fold {\
+background-color: #464646;\
+border-color: #F8F8F2\
+}\
+.ace-iplastic .ace_storage.ace_type,\
+.ace-iplastic .ace_support.ace_class,\
+.ace-iplastic .ace_support.ace_type {\
+color: #3333fc;\
+font-weight: 700\
+}\
+.ace-iplastic .ace_entity.ace_name.ace_function,\
+.ace-iplastic .ace_entity.ace_other,\
+.ace-iplastic .ace_entity.ace_other.ace_attribute-name,\
+.ace-iplastic .ace_variable {\
+color: #3366cc;\
+font-style: italic\
+}\
+.ace-iplastic .ace_variable.ace_parameter {\
+font-style: italic;\
+color: #2469E0\
+}\
+.ace-iplastic .ace_string {\
+color: #a55f03\
+}\
+.ace-iplastic .ace_comment {\
+color: #777777;\
+font-style: italic\
+}\
+.ace-iplastic .ace_fold-widget {\
+background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==);\
+}\
+.ace-iplastic .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBojk8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAABlJREFUeNpi+P//PwMzMzPzfwAAAAD//wMAGRsECSML/RIAAAAASUVORK5CYII=) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-katzenmilch.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-katzenmilch.js
new file mode 100644
index 00000000..f65ce4a8
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-katzenmilch.js
@@ -0,0 +1,121 @@
+ace.define("ace/theme/katzenmilch",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-katzenmilch";
+exports.cssText = ".ace-katzenmilch .ace_gutter,\
+.ace-katzenmilch .ace_gutter {\
+background: #e8e8e8;\
+color: #333\
+}\
+.ace-katzenmilch .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8\
+}\
+.ace-katzenmilch {\
+background-color: #f3f2f3;\
+color: rgba(15, 0, 9, 1.0)\
+}\
+.ace-katzenmilch .ace_cursor {\
+border-left: 2px solid #100011\
+}\
+.ace-katzenmilch .ace_overwrite-cursors .ace_cursor {\
+border-left: 0px;\
+border-bottom: 1px solid #100011\
+}\
+.ace-katzenmilch .ace_marker-layer .ace_selection {\
+background: rgba(100, 5, 208, 0.27)\
+}\
+.ace-katzenmilch.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #f3f2f3;\
+}\
+.ace-katzenmilch .ace_marker-layer .ace_step {\
+background: rgb(198, 219, 174)\
+}\
+.ace-katzenmilch .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgba(0, 0, 0, 0.33);\
+}\
+.ace-katzenmilch .ace_marker-layer .ace_active-line {\
+background: rgb(232, 242, 254)\
+}\
+.ace-katzenmilch .ace_gutter-active-line {\
+background-color: rgb(232, 242, 254)\
+}\
+.ace-katzenmilch .ace_marker-layer .ace_selected-word {\
+border: 1px solid rgba(100, 5, 208, 0.27)\
+}\
+.ace-katzenmilch .ace_invisible {\
+color: #BFBFBF\
+}\
+.ace-katzenmilch .ace_fold {\
+background-color: rgba(2, 95, 73, 0.97);\
+border-color: rgba(15, 0, 9, 1.0)\
+}\
+.ace-katzenmilch .ace_keyword {\
+color: #674Aa8;\
+rbackground-color: rgba(163, 170, 216, 0.055)\
+}\
+.ace-katzenmilch .ace_constant.ace_language {\
+color: #7D7e52;\
+rbackground-color: rgba(189, 190, 130, 0.059)\
+}\
+.ace-katzenmilch .ace_constant.ace_numeric {\
+color: rgba(79, 130, 123, 0.93);\
+rbackground-color: rgba(119, 194, 187, 0.059)\
+}\
+.ace-katzenmilch .ace_constant.ace_character,\
+.ace-katzenmilch .ace_constant.ace_other {\
+color: rgba(2, 95, 105, 1.0);\
+rbackground-color: rgba(127, 34, 153, 0.063)\
+}\
+.ace-katzenmilch .ace_support.ace_function {\
+color: #9D7e62;\
+rbackground-color: rgba(189, 190, 130, 0.039)\
+}\
+.ace-katzenmilch .ace_support.ace_class {\
+color: rgba(239, 106, 167, 1.0);\
+rbackground-color: rgba(239, 106, 167, 0.063)\
+}\
+.ace-katzenmilch .ace_storage {\
+color: rgba(123, 92, 191, 1.0);\
+rbackground-color: rgba(139, 93, 223, 0.051)\
+}\
+.ace-katzenmilch .ace_invalid {\
+color: #DFDFD5;\
+rbackground-color: #CC1B27\
+}\
+.ace-katzenmilch .ace_string {\
+color: #5a5f9b;\
+rbackground-color: rgba(170, 175, 219, 0.035)\
+}\
+.ace-katzenmilch .ace_comment {\
+font-style: italic;\
+color: rgba(64, 79, 80, 0.67);\
+rbackground-color: rgba(95, 15, 255, 0.0078)\
+}\
+.ace-katzenmilch .ace_entity.ace_name.ace_function,\
+.ace-katzenmilch .ace_variable {\
+color: rgba(2, 95, 73, 0.97);\
+rbackground-color: rgba(34, 255, 73, 0.12)\
+}\
+.ace-katzenmilch .ace_variable.ace_language {\
+color: #316fcf;\
+rbackground-color: rgba(58, 175, 255, 0.039)\
+}\
+.ace-katzenmilch .ace_variable.ace_parameter {\
+font-style: italic;\
+color: rgba(51, 150, 159, 0.87);\
+rbackground-color: rgba(5, 214, 249, 0.043)\
+}\
+.ace-katzenmilch .ace_entity.ace_other.ace_attribute-name {\
+color: rgba(73, 70, 194, 0.93);\
+rbackground-color: rgba(73, 134, 194, 0.035)\
+}\
+.ace-katzenmilch .ace_entity.ace_name.ace_tag {\
+color: #3976a2;\
+rbackground-color: rgba(73, 166, 210, 0.039)\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-kr_theme.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-kr_theme.js
new file mode 100644
index 00000000..8818b33e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-kr_theme.js
@@ -0,0 +1,104 @@
+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 {\
+background-color: #0B0A09;\
+color: #FCFFE0\
+}\
+.ace-kr-theme .ace_cursor {\
+color: #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;\
+}\
+.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_list,\
+.ace-kr-theme .ace_markup.ace_list {\
+background-color: #0F0040\
+}\
+.ace-kr-theme .ace_variable.ace_language {\
+color: #FF80E1\
+}\
+.ace-kr-theme .ace_meta.ace_tag {\
+color: #BABD9C\
+}\
+.ace-kr-theme .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-kuroir.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-kuroir.js
new file mode 100644
index 00000000..30e0a8bb
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-kuroir.js
@@ -0,0 +1,61 @@
+ace.define("ace/theme/kuroir",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-kuroir";
+exports.cssText = "\
+.ace-kuroir .ace_gutter {\
+background: #e8e8e8;\
+color: #333;\
+}\
+.ace-kuroir .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8;\
+}\
+.ace-kuroir {\
+background-color: #E8E9E8;\
+color: #363636;\
+}\
+.ace-kuroir .ace_cursor {\
+color: #202020;\
+}\
+.ace-kuroir .ace_marker-layer .ace_selection {\
+background: rgba(245, 170, 0, 0.57);\
+}\
+.ace-kuroir.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #E8E9E8;\
+}\
+.ace-kuroir .ace_marker-layer .ace_step {\
+background: rgb(198, 219, 174);\
+}\
+.ace-kuroir .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgba(0, 0, 0, 0.29);\
+}\
+.ace-kuroir .ace_marker-layer .ace_active-line {\
+background: rgba(203, 220, 47, 0.22);\
+}\
+.ace-kuroir .ace_gutter-active-line {\
+background-color: rgba(203, 220, 47, 0.22);\
+}\
+.ace-kuroir .ace_marker-layer .ace_selected-word {\
+border: 1px solid rgba(245, 170, 0, 0.57);\
+}\
+.ace-kuroir .ace_invisible {\
+color: #BFBFBF\
+}\
+.ace-kuroir .ace_fold {\
+border-color: #363636;\
+}\
+.ace-kuroir .ace_constant{color:#CD6839;}.ace-kuroir .ace_constant.ace_numeric{color:#9A5925;}.ace-kuroir .ace_support{color:#104E8B;}.ace-kuroir .ace_support.ace_function{color:#005273;}.ace-kuroir .ace_support.ace_constant{color:#CF6A4C;}.ace-kuroir .ace_storage{color:#A52A2A;}.ace-kuroir .ace_invalid.ace_illegal{color:#FD1224;\
+background-color:rgba(255, 6, 0, 0.15);}.ace-kuroir .ace_invalid.ace_deprecated{text-decoration:underline;\
+font-style:italic;\
+color:#FD1732;\
+background-color:#E8E9E8;}.ace-kuroir .ace_string{color:#639300;}.ace-kuroir .ace_string.ace_regexp{color:#417E00;\
+background-color:#C9D4BE;}.ace-kuroir .ace_comment{color:rgba(148, 148, 148, 0.91);\
+background-color:rgba(220, 220, 220, 0.56);}.ace-kuroir .ace_variable{color:#009ACD;}.ace-kuroir .ace_meta.ace_tag{color:#005273;}.ace-kuroir .ace_markup.ace_heading{color:#B8012D;\
+background-color:rgba(191, 97, 51, 0.051);}.ace-kuroir .ace_markup.ace_list{color:#8F5B26;}\
+";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-merbivore.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-merbivore.js
new file mode 100644
index 00000000..fc0a72f1
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-merbivore.js
@@ -0,0 +1,95 @@
+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 {\
+background-color: #161616;\
+color: #E6E1DC\
+}\
+.ace-merbivore .ace_cursor {\
+color: #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;\
+}\
+.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_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQFxf3ZXB1df0PAAdsAmERTkEHAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-merbivore_soft.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-merbivore_soft.js
new file mode 100644
index 00000000..eff24646
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-merbivore_soft.js
@@ -0,0 +1,96 @@
+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 {\
+background-color: #1C1C1C;\
+color: #E6E1DC\
+}\
+.ace-merbivore-soft .ace_cursor {\
+color: #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;\
+}\
+.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_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWOQkpLyZfD09PwPAAfYAnaStpHRAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-mono_industrial.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-mono_industrial.js
new file mode 100644
index 00000000..0ece0309
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-mono_industrial.js
@@ -0,0 +1,107 @@
+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 {\
+background-color: #222C28;\
+color: #FFFFFF\
+}\
+.ace-mono-industrial .ace_cursor {\
+color: #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;\
+}\
+.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_entity.ace_name.ace_tag {\
+color: #A65EFF\
+}\
+.ace-mono-industrial .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQ1NbwZfALD/4PAAlTArlEC4r/AAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-monokai.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-monokai.js
new file mode 100644
index 00000000..322c2fa8
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-monokai.js
@@ -0,0 +1,105 @@
+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: #8F908A\
+}\
+.ace-monokai .ace_print-margin {\
+width: 1px;\
+background: #555651\
+}\
+.ace-monokai {\
+background-color: #272822;\
+color: #F8F8F2\
+}\
+.ace-monokai .ace_cursor {\
+color: #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;\
+}\
+.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: #52524d\
+}\
+.ace-monokai .ace_entity.ace_name.ace_tag,\
+.ace-monokai .ace_keyword,\
+.ace-monokai .ace_meta.ace_tag,\
+.ace-monokai .ace_storage {\
+color: #F92672\
+}\
+.ace-monokai .ace_punctuation,\
+.ace-monokai .ace_punctuation.ace_tag {\
+color: #fff\
+}\
+.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_entity.ace_other.ace_attribute-name,\
+.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_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-pastel_on_dark.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-pastel_on_dark.js
new file mode 100644
index 00000000..2631ae00
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-pastel_on_dark.js
@@ -0,0 +1,108 @@
+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 {\
+background-color: #2C2828;\
+color: #8F938F\
+}\
+.ace-pastel-on-dark .ace_cursor {\
+color: #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;\
+}\
+.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_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYIiPj/8PAARgAh2NTMh8AAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-solarized_dark.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-solarized_dark.js
new file mode 100644
index 00000000..d1acdb46
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-solarized_dark.js
@@ -0,0 +1,88 @@
+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 {\
+background-color: #002B36;\
+color: #93A1A1\
+}\
+.ace-solarized-dark .ace_entity.ace_other.ace_attribute-name,\
+.ace-solarized-dark .ace_storage {\
+color: #93A1A1\
+}\
+.ace-solarized-dark .ace_cursor,\
+.ace-solarized-dark .ace_string.ace_regexp {\
+color: #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;\
+}\
+.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_comment {\
+font-style: italic;\
+color: #657B83\
+}\
+.ace-solarized-dark .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNg0Db1ZVCxc/sPAAd4AlUHlLenAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-solarized_light.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-solarized_light.js
new file mode 100644
index 00000000..f0c078ae
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-solarized_light.js
@@ -0,0 +1,91 @@
+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 {\
+background-color: #FDF6E3;\
+color: #586E75\
+}\
+.ace-solarized-light .ace_cursor {\
+color: #000000\
+}\
+.ace-solarized-light .ace_marker-layer .ace_selection {\
+background: rgba(7, 54, 67, 0.09)\
+}\
+.ace-solarized-light.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px #FDF6E3;\
+}\
+.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 : #EDE5C1\
+}\
+.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_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHjy8NJ/AAjgA5fzQUmBAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-sqlserver.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-sqlserver.js
new file mode 100644
index 00000000..91f34f6c
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-sqlserver.js
@@ -0,0 +1,138 @@
+ace.define("ace/theme/sqlserver",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-sqlserver";
+exports.cssText = ".ace-sqlserver .ace_gutter {\
+background: #ebebeb;\
+color: #333;\
+overflow: hidden;\
+}\
+.ace-sqlserver .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8;\
+}\
+.ace-sqlserver {\
+background-color: #FFFFFF;\
+color: black;\
+}\
+.ace-sqlserver .ace_identifier {\
+color: black;\
+}\
+.ace-sqlserver .ace_keyword {\
+color: #0000FF;\
+}\
+.ace-sqlserver .ace_numeric {\
+color: black;\
+}\
+.ace-sqlserver .ace_storage {\
+color: #11B7BE;\
+}\
+.ace-sqlserver .ace_keyword.ace_operator,\
+.ace-sqlserver .ace_lparen,\
+.ace-sqlserver .ace_rparen,\
+.ace-sqlserver .ace_punctuation {\
+color: #808080;\
+}\
+.ace-sqlserver .ace_set.ace_statement {\
+color: #0000FF;\
+text-decoration: underline;\
+}\
+.ace-sqlserver .ace_cursor {\
+color: black;\
+}\
+.ace-sqlserver .ace_invisible {\
+color: rgb(191, 191, 191);\
+}\
+.ace-sqlserver .ace_constant.ace_buildin {\
+color: rgb(88, 72, 246);\
+}\
+.ace-sqlserver .ace_constant.ace_language {\
+color: #979797;\
+}\
+.ace-sqlserver .ace_constant.ace_library {\
+color: rgb(6, 150, 14);\
+}\
+.ace-sqlserver .ace_invalid {\
+background-color: rgb(153, 0, 0);\
+color: white;\
+}\
+.ace-sqlserver .ace_support.ace_function {\
+color: #FF00FF;\
+}\
+.ace-sqlserver .ace_support.ace_constant {\
+color: rgb(6, 150, 14);\
+}\
+.ace-sqlserver .ace_class {\
+color: #008080;\
+}\
+.ace-sqlserver .ace_support.ace_other {\
+color: #6D79DE;\
+}\
+.ace-sqlserver .ace_variable.ace_parameter {\
+font-style: italic;\
+color: #FD971F;\
+}\
+.ace-sqlserver .ace_comment {\
+color: #008000;\
+}\
+.ace-sqlserver .ace_constant.ace_numeric {\
+color: black;\
+}\
+.ace-sqlserver .ace_variable {\
+color: rgb(49, 132, 149);\
+}\
+.ace-sqlserver .ace_xml-pe {\
+color: rgb(104, 104, 91);\
+}\
+.ace-sqlserver .ace_support.ace_storedprocedure {\
+color: #800000;\
+}\
+.ace-sqlserver .ace_heading {\
+color: rgb(12, 7, 255);\
+}\
+.ace-sqlserver .ace_list {\
+color: rgb(185, 6, 144);\
+}\
+.ace-sqlserver .ace_marker-layer .ace_selection {\
+background: rgb(181, 213, 255);\
+}\
+.ace-sqlserver .ace_marker-layer .ace_step {\
+background: rgb(252, 255, 0);\
+}\
+.ace-sqlserver .ace_marker-layer .ace_stack {\
+background: rgb(164, 229, 101);\
+}\
+.ace-sqlserver .ace_marker-layer .ace_bracket {\
+margin: -1px 0 0 -1px;\
+border: 1px solid rgb(192, 192, 192);\
+}\
+.ace-sqlserver .ace_marker-layer .ace_active-line {\
+background: rgba(0, 0, 0, 0.07);\
+}\
+.ace-sqlserver .ace_gutter-active-line {\
+background-color: #dcdcdc;\
+}\
+.ace-sqlserver .ace_marker-layer .ace_selected-word {\
+background: rgb(250, 250, 255);\
+border: 1px solid rgb(200, 200, 250);\
+}\
+.ace-sqlserver .ace_meta.ace_tag {\
+color: #0000FF;\
+}\
+.ace-sqlserver .ace_string.ace_regex {\
+color: #FF0000;\
+}\
+.ace-sqlserver .ace_string {\
+color: #FF0000;\
+}\
+.ace-sqlserver .ace_entity.ace_other.ace_attribute-name {\
+color: #994409;\
+}\
+.ace-sqlserver .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/www/wiki/extensions/CodeEditor/modules/ace/theme-terminal.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-terminal.js
new file mode 100644
index 00000000..def9e69b
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-terminal.js
@@ -0,0 +1,114 @@
+ace.define("ace/theme/terminal",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+
+exports.isDark = true;
+exports.cssClass = "ace-terminal-theme";
+exports.cssText = ".ace-terminal-theme .ace_gutter {\
+background: #1a0005;\
+color: steelblue\
+}\
+.ace-terminal-theme .ace_print-margin {\
+width: 1px;\
+background: #1a1a1a\
+}\
+.ace-terminal-theme {\
+background-color: black;\
+color: #DEDEDE\
+}\
+.ace-terminal-theme .ace_cursor {\
+color: #9F9F9F\
+}\
+.ace-terminal-theme .ace_marker-layer .ace_selection {\
+background: #424242\
+}\
+.ace-terminal-theme.ace_multiselect .ace_selection.ace_start {\
+box-shadow: 0 0 3px 0px black;\
+}\
+.ace-terminal-theme .ace_marker-layer .ace_step {\
+background: rgb(0, 0, 0)\
+}\
+.ace-terminal-theme .ace_marker-layer .ace_bracket {\
+background: #090;\
+}\
+.ace-terminal-theme .ace_marker-layer .ace_bracket-start {\
+background: #090;\
+}\
+.ace-terminal-theme .ace_marker-layer .ace_bracket-unmatched {\
+margin: -1px 0 0 -1px;\
+border: 1px solid #900\
+}\
+.ace-terminal-theme .ace_marker-layer .ace_active-line {\
+background: #2A2A2A\
+}\
+.ace-terminal-theme .ace_gutter-active-line {\
+background-color: #2A112A\
+}\
+.ace-terminal-theme .ace_marker-layer .ace_selected-word {\
+border: 1px solid #424242\
+}\
+.ace-terminal-theme .ace_invisible {\
+color: #343434\
+}\
+.ace-terminal-theme .ace_keyword,\
+.ace-terminal-theme .ace_meta,\
+.ace-terminal-theme .ace_storage,\
+.ace-terminal-theme .ace_storage.ace_type,\
+.ace-terminal-theme .ace_support.ace_type {\
+color: tomato\
+}\
+.ace-terminal-theme .ace_keyword.ace_operator {\
+color: deeppink\
+}\
+.ace-terminal-theme .ace_constant.ace_character,\
+.ace-terminal-theme .ace_constant.ace_language,\
+.ace-terminal-theme .ace_constant.ace_numeric,\
+.ace-terminal-theme .ace_keyword.ace_other.ace_unit,\
+.ace-terminal-theme .ace_support.ace_constant,\
+.ace-terminal-theme .ace_variable.ace_parameter {\
+color: #E78C45\
+}\
+.ace-terminal-theme .ace_constant.ace_other {\
+color: gold\
+}\
+.ace-terminal-theme .ace_invalid {\
+color: yellow;\
+background-color: red\
+}\
+.ace-terminal-theme .ace_invalid.ace_deprecated {\
+color: #CED2CF;\
+background-color: #B798BF\
+}\
+.ace-terminal-theme .ace_fold {\
+background-color: #7AA6DA;\
+border-color: #DEDEDE\
+}\
+.ace-terminal-theme .ace_entity.ace_name.ace_function,\
+.ace-terminal-theme .ace_support.ace_function,\
+.ace-terminal-theme .ace_variable {\
+color: #7AA6DA\
+}\
+.ace-terminal-theme .ace_support.ace_class,\
+.ace-terminal-theme .ace_support.ace_type {\
+color: #E7C547\
+}\
+.ace-terminal-theme .ace_heading,\
+.ace-terminal-theme .ace_string {\
+color: #B9CA4A\
+}\
+.ace-terminal-theme .ace_entity.ace_name.ace_tag,\
+.ace-terminal-theme .ace_entity.ace_other.ace_attribute-name,\
+.ace-terminal-theme .ace_meta.ace_tag,\
+.ace-terminal-theme .ace_string.ace_regexp,\
+.ace-terminal-theme .ace_variable {\
+color: #D54E53\
+}\
+.ace-terminal-theme .ace_comment {\
+color: orangered\
+}\
+.ace-terminal-theme .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLBWV/8PAAK4AYnhiq+xAAAAAElFTkSuQmCC) right repeat-y;\
+}\
+";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-textmate.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-textmate.js
new file mode 100644
index 00000000..0033edae
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-textmate.js
@@ -0,0 +1,129 @@
+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_gutter {\
+background: #f0f0f0;\
+color: #333;\
+}\
+.ace-tm .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8;\
+}\
+.ace-tm .ace_fold {\
+background-color: #6B72E6;\
+}\
+.ace-tm {\
+background-color: #FFFFFF;\
+color: black;\
+}\
+.ace-tm .ace_cursor {\
+color: 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_heading {\
+color: rgb(12, 7, 255);\
+}\
+.ace-tm .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;\
+}\
+.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/www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow.js
new file mode 100644
index 00000000..4661be11
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow.js
@@ -0,0 +1,108 @@
+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 {\
+background-color: #FFFFFF;\
+color: #4D4D4C\
+}\
+.ace-tomorrow .ace_cursor {\
+color: #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;\
+}\
+.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_heading,\
+.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_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/www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow_night.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow_night.js
new file mode 100644
index 00000000..53e1f39a
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow_night.js
@@ -0,0 +1,108 @@
+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 {\
+background-color: #1D1F21;\
+color: #C5C8C6\
+}\
+.ace-tomorrow-night .ace_cursor {\
+color: #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;\
+}\
+.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_heading,\
+.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_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow_night_blue.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow_night_blue.js
new file mode 100644
index 00000000..956e221e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow_night_blue.js
@@ -0,0 +1,106 @@
+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 {\
+background-color: #002451;\
+color: #FFFFFF\
+}\
+.ace-tomorrow-night-blue .ace_constant.ace_other,\
+.ace-tomorrow-night-blue .ace_cursor {\
+color: #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;\
+}\
+.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_heading,\
+.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_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow_night_bright.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow_night_bright.js
new file mode 100644
index 00000000..8514a0d6
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow_night_bright.js
@@ -0,0 +1,121 @@
+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 {\
+background-color: #000000;\
+color: #DEDEDE\
+}\
+.ace-tomorrow-night-bright .ace_cursor {\
+color: #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;\
+}\
+.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 #888888\
+}\
+.ace-tomorrow-night-bright .ace_marker-layer .ace_highlight {\
+border: 1px solid rgb(110, 119, 0);\
+border-bottom: 0;\
+box-shadow: inset 0 -1px rgb(110, 119, 0);\
+margin: -1px 0 0 -1px;\
+background: rgba(255, 235, 0, 0.1)\
+}\
+.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_stack {\
+background-color: rgb(66, 90, 44)\
+}\
+.ace-tomorrow-night-bright .ace_marker-layer .ace_selected-word {\
+border: 1px solid #888888\
+}\
+.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_heading,\
+.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_c9searchresults.ace_keyword {\
+color: #C2C280\
+}\
+.ace-tomorrow-night-bright .ace_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow_night_eighties.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow_night_eighties.js
new file mode 100644
index 00000000..3665e3f7
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-tomorrow_night_eighties.js
@@ -0,0 +1,108 @@
+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 {\
+background-color: #2D2D2D;\
+color: #CCCCCC\
+}\
+.ace-tomorrow-night-eighties .ace_constant.ace_other,\
+.ace-tomorrow-night-eighties .ace_cursor {\
+color: #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;\
+}\
+.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-bright .ace_stack {\
+background: rgb(66, 90, 44)\
+}\
+.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_heading,\
+.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_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ09NrYAgMjP4PAAtGAwchHMyAAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-twilight.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-twilight.js
new file mode 100644
index 00000000..48ec0309
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-twilight.js
@@ -0,0 +1,109 @@
+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 {\
+background-color: #141414;\
+color: #F8F8F8\
+}\
+.ace-twilight .ace_cursor {\
+color: #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;\
+}\
+.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_heading,\
+.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_list,\
+.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_indent-guide {\
+background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-vibrant_ink.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-vibrant_ink.js
new file mode 100644
index 00000000..db926c70
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-vibrant_ink.js
@@ -0,0 +1,94 @@
+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 {\
+background-color: #0F0F0F;\
+color: #FFFFFF\
+}\
+.ace-vibrant-ink .ace_cursor {\
+color: #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;\
+}\
+.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,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYNDTc/oPAALPAZ7hxlbYAAAAAElFTkSuQmCC) right repeat-y\
+}";
+
+var dom = require("../lib/dom");
+dom.importCssString(exports.cssText, exports.cssClass);
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/theme-xcode.js b/www/wiki/extensions/CodeEditor/modules/ace/theme-xcode.js
new file mode 100644
index 00000000..3604a170
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/theme-xcode.js
@@ -0,0 +1,88 @@
+ace.define("ace/theme/xcode",["require","exports","module","ace/lib/dom"], function(require, exports, module) {
+
+exports.isDark = false;
+exports.cssClass = "ace-xcode";
+exports.cssText = "\
+.ace-xcode .ace_gutter {\
+background: #e8e8e8;\
+color: #333\
+}\
+.ace-xcode .ace_print-margin {\
+width: 1px;\
+background: #e8e8e8\
+}\
+.ace-xcode {\
+background-color: #FFFFFF;\
+color: #000000\
+}\
+.ace-xcode .ace_cursor {\
+color: #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;\
+}\
+.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/www/wiki/extensions/CodeEditor/modules/ace/worker-coffee.js b/www/wiki/extensions/CodeEditor/modules/ace/worker-coffee.js
new file mode 100644
index 00000000..7fca2604
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/worker-coffee.js
@@ -0,0 +1,2157 @@
+"no use strict";
+;(function(window) {
+if (typeof window.window != "undefined" && window.document)
+ return;
+if (window.require && window.define)
+ return;
+
+if (!window.console) {
+ window.console = function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+ };
+ window.console.error =
+ window.console.warn =
+ window.console.log =
+ window.console.trace = window.console;
+}
+window.window = window;
+window.ace = window;
+
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ data: err.data,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
+window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
+ if (moduleName.indexOf("!") !== -1) {
+ var chunks = moduleName.split("!");
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
+ }
+ // normalize relative requires
+ if (moduleName.charAt(0) == ".") {
+ var base = parentId.split("/").slice(0, -1).join("/");
+ moduleName = (base ? base + "/" : "") + moduleName;
+
+ while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
+ var previous = moduleName;
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ }
+ }
+
+ return moduleName;
+};
+
+window.require = function require(parentId, id) {
+ if (!id) {
+ id = parentId;
+ parentId = null;
+ }
+ if (!id.charAt)
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+ id = window.normalizeModule(parentId, id);
+
+ var module = window.require.modules[id];
+ if (module) {
+ if (!module.initialized) {
+ module.initialized = true;
+ module.exports = module.factory().exports;
+ }
+ return module.exports;
+ }
+
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+
+ var path = resolveModuleId(id, window.require.tlns);
+ if (path.slice(-3) != ".js") path += ".js";
+
+ window.require.id = id;
+ window.require.modules[id] = {}; // prevent infinite loop on broken modules
+ importScripts(path);
+ return window.require(parentId, id);
+};
+function resolveModuleId(id, paths) {
+ var testPath = id, tail = "";
+ while (testPath) {
+ var alias = paths[testPath];
+ if (typeof alias == "string") {
+ return alias + tail;
+ } else if (alias) {
+ return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name);
+ } else if (alias === false) {
+ return "";
+ }
+ var i = testPath.lastIndexOf("/");
+ if (i === -1) break;
+ tail = testPath.substr(i) + tail;
+ testPath = testPath.slice(0, i);
+ }
+ return id;
+}
+window.require.modules = {};
+window.require.tlns = {};
+
+window.define = function(id, deps, factory) {
+ if (arguments.length == 2) {
+ factory = deps;
+ if (typeof id != "string") {
+ deps = id;
+ id = window.require.id;
+ }
+ } else if (arguments.length == 1) {
+ factory = id;
+ deps = [];
+ id = window.require.id;
+ }
+
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject "require", "exports" and
+ // "module" as dependencies, to provide CommonJS compatibility.
+ deps = ["require", "exports", "module"];
+
+ var req = function(childId) {
+ return window.require(id, childId);
+ };
+
+ window.require.modules[id] = {
+ exports: {},
+ factory: function() {
+ var module = this;
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch (dep) {
+ // Because "require", "exports" and "module" aren't actual
+ // dependencies, we must handle them seperately.
+ case "require": return req;
+ case "exports": return module.exports;
+ case "module": return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
+ if (returnExports)
+ module.exports = returnExports;
+ return module;
+ }
+ };
+};
+window.define.amd = {};
+require.tlns = {};
+window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
+ for (var i in topLevelNamespaces)
+ require.tlns[i] = topLevelNamespaces[i];
+};
+
+window.initSender = function initSender() {
+
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("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 = window.main = null;
+var sender = window.sender = null;
+
+window.onmessage = function(e) {
+ var msg = e.data;
+ if (msg.event && sender) {
+ sender._signal(msg.event, msg.data);
+ }
+ else if (msg.command) {
+ if (main[msg.command])
+ main[msg.command].apply(main, msg.args);
+ else if (window[msg.command])
+ window[msg.command].apply(window, msg.args);
+ else
+ throw new Error("Unknown command:" + msg.command);
+ }
+ else if (msg.init) {
+ window.initBaseUrls(msg.tlns);
+ require("ace/lib/es5-shim");
+ sender = window.sender = window.initSender();
+ var clazz = require(msg.module)[msg.classname];
+ main = window.main = new clazz(sender);
+ }
+};
+})(this);
+
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+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};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
+
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {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
+ );
+ };
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
+ };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
+
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+
+
+exports.Range = Range;
+});
+
+ace.define("ace/apply_delta",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+function throwDeltaError(delta, errorText){
+ console.log("Invalid Delta:", delta);
+ throw "Invalid Delta: " + errorText;
+}
+
+function positionInDocument(docLines, position) {
+ return position.row >= 0 && position.row < docLines.length &&
+ position.column >= 0 && position.column <= docLines[position.row].length;
+}
+
+function validateDelta(docLines, delta) {
+ if (delta.action != "insert" && delta.action != "remove")
+ throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
+ if (!(delta.lines instanceof Array))
+ throwDeltaError(delta, "delta.lines must be an Array");
+ if (!delta.start || !delta.end)
+ throwDeltaError(delta, "delta.start/end must be an present");
+ var start = delta.start;
+ if (!positionInDocument(docLines, delta.start))
+ throwDeltaError(delta, "delta.start must be contained in document");
+ var end = delta.end;
+ if (delta.action == "remove" && !positionInDocument(docLines, end))
+ throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
+ var numRangeRows = end.row - start.row;
+ var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
+ if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
+ throwDeltaError(delta, "delta.range must match delta lines");
+}
+
+exports.applyDelta = function(docLines, delta, doNotValidate) {
+
+ var row = delta.start.row;
+ var startColumn = delta.start.column;
+ var line = docLines[row] || "";
+ switch (delta.action) {
+ case "insert":
+ var lines = delta.lines;
+ if (lines.length === 1) {
+ docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
+ } else {
+ var args = [row, 1].concat(delta.lines);
+ docLines.splice.apply(docLines, args);
+ docLines[row] = line.substring(0, startColumn) + docLines[row];
+ docLines[row + delta.lines.length - 1] += line.substring(startColumn);
+ }
+ break;
+ case "remove":
+ var endColumn = delta.end.column;
+ var endRow = delta.end.row;
+ if (row === endRow) {
+ docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
+ } else {
+ docLines.splice(
+ row, endRow - row + 1,
+ line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
+ );
+ }
+ break;
+ }
+}
+});
+
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
+
+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 = stopPropagation;
+ if (!e.preventDefault)
+ e.preventDefault = preventDefault;
+
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e, this);
+ if (e.propagationStopped)
+ break;
+ }
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e, this);
+};
+
+
+EventEmitter._signal = function(eventName, e) {
+ var listeners = (this._eventRegistry || {})[eventName];
+ if (!listeners)
+ return;
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++)
+ listeners[i](e, this);
+};
+
+EventEmitter.once = function(eventName, callback) {
+ var _self = this;
+ callback && this.addEventListener(eventName, function newCallback() {
+ _self.removeEventListener(eventName, newCallback);
+ callback.apply(null, arguments);
+ });
+};
+
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ handlers = this._defaultHandlers = {_disabled_: {}};
+
+ if (handlers[eventName]) {
+ var old = handlers[eventName];
+ var disabled = handlers._disabled_[eventName];
+ if (!disabled)
+ handlers._disabled_[eventName] = disabled = [];
+ disabled.push(old);
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+ handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ return;
+ var disabled = handlers._disabled_[eventName];
+
+ if (handlers[eventName] == callback) {
+ var old = handlers[eventName];
+ if (disabled)
+ this.setDefaultHandler(eventName, disabled.pop());
+ } else if (disabled) {
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
+
+ if (listeners.indexOf(callback) == -1)
+ listeners[capturing ? "unshift" : "push"](callback);
+ return callback;
+};
+
+EventEmitter.off =
+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/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;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+ this.getDocument = function() {
+ return this.document;
+ };
+ this.$insertRight = false;
+ this.onChange = function(delta) {
+ if (delta.start.row == delta.end.row && delta.start.row != this.row)
+ return;
+
+ if (delta.start.row > this.row)
+ return;
+
+ var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
+ this.setPosition(point.row, point.column, true);
+ };
+
+ function $pointsInOrder(point1, point2, equalPointsInOrder) {
+ var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
+ return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
+ }
+
+ function $getTransformedPoint(delta, point, moveIfEqual) {
+ var deltaIsInsert = delta.action == "insert";
+ var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
+ var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
+ var deltaStart = delta.start;
+ var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
+ if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
+ return {
+ row: point.row,
+ column: point.column
+ };
+ }
+ if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
+ return {
+ row: point.row + deltaRowShift,
+ column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
+ };
+ }
+
+ return {
+ row: deltaStart.row,
+ column: deltaStart.column
+ };
+ }
+ 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._signal("change", {
+ old: old,
+ value: pos
+ });
+ };
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
+ };
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("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/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var applyDelta = require("./apply_delta").applyDelta;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(textOrLines) {
+ this.$lines = [""];
+ if (textOrLines.length === 0) {
+ this.$lines = [""];
+ } else if (Array.isArray(textOrLines)) {
+ this.insertMergedLines({row: 0, column: 0}, textOrLines);
+ } else {
+ this.insert({row: 0, column:0}, textOrLines);
+ }
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setValue = function(text) {
+ var len = this.getLength() - 1;
+ this.remove(new Range(0, 0, len, this.getLine(len).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);
+ this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
+ };
+ this.getNewLineCharacter = function() {
+ switch (this.$newLineMode) {
+ case "windows":
+ return "\r\n";
+ case "unix":
+ return "\n";
+ default:
+ return this.$autoNewLine || "\n";
+ }
+ };
+
+ this.$autoNewLine = "";
+ this.$newLineMode = "auto";
+ this.setNewLineMode = function(newLineMode) {
+ if (this.$newLineMode === newLineMode)
+ return;
+
+ this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
+ };
+ 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) {
+ return this.getLinesForRange(range).join(this.getNewLineCharacter());
+ };
+ this.getLinesForRange = function(range) {
+ var lines;
+ if (range.start.row === range.end.row) {
+ lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
+ } else {
+ lines = this.getLines(range.start.row, range.end.row);
+ lines[0] = (lines[0] || "").substring(range.start.column);
+ var l = lines.length - 1;
+ if (range.end.row - range.start.row == l)
+ lines[l] = lines[l].substring(0, range.end.column);
+ }
+ return lines;
+ };
+ this.insertLines = function(row, lines) {
+ console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
+ return this.insertFullLines(row, lines);
+ };
+ this.removeLines = function(firstRow, lastRow) {
+ console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
+ return this.removeFullLines(firstRow, lastRow);
+ };
+ this.insertNewLine = function(position) {
+ console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
+ return this.insertMergedLines(position, ["", ""]);
+ };
+ this.insert = function(position, text) {
+ if (this.getLength() <= 1)
+ this.$detectNewLine(text);
+
+ return this.insertMergedLines(position, this.$split(text));
+ };
+ this.insertInLine = function(position, text) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = this.pos(position.row, position.column + text.length);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: [text]
+ }, true);
+
+ return this.clonePos(end);
+ };
+
+ this.clippedPos = function(row, column) {
+ var length = this.getLength();
+ if (row === undefined) {
+ row = length;
+ } else if (row < 0) {
+ row = 0;
+ } else if (row >= length) {
+ row = length - 1;
+ column = undefined;
+ }
+ var line = this.getLine(row);
+ if (column == undefined)
+ column = line.length;
+ column = Math.min(Math.max(column, 0), line.length);
+ return {row: row, column: column};
+ };
+
+ this.clonePos = function(pos) {
+ return {row: pos.row, column: pos.column};
+ };
+
+ this.pos = function(row, column) {
+ return {row: row, column: column};
+ };
+
+ 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;
+ } else {
+ position.row = Math.max(0, position.row);
+ position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
+ }
+ return position;
+ };
+ this.insertFullLines = function(row, lines) {
+ row = Math.min(Math.max(row, 0), this.getLength());
+ var column = 0;
+ if (row < this.getLength()) {
+ lines = lines.concat([""]);
+ column = 0;
+ } else {
+ lines = [""].concat(lines);
+ row--;
+ column = this.$lines[row].length;
+ }
+ this.insertMergedLines({row: row, column: column}, lines);
+ };
+ this.insertMergedLines = function(position, lines) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = {
+ row: start.row + lines.length - 1,
+ column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
+ };
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: lines
+ });
+
+ return this.clonePos(end);
+ };
+ this.remove = function(range) {
+ var start = this.clippedPos(range.start.row, range.start.column);
+ var end = this.clippedPos(range.end.row, range.end.column);
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ });
+ return this.clonePos(start);
+ };
+ this.removeInLine = function(row, startColumn, endColumn) {
+ var start = this.clippedPos(row, startColumn);
+ var end = this.clippedPos(row, endColumn);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ }, true);
+
+ return this.clonePos(start);
+ };
+ this.removeFullLines = function(firstRow, lastRow) {
+ firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
+ lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
+ var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
+ var deleteLastNewLine = lastRow < this.getLength() - 1;
+ var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );
+ var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );
+ var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );
+ var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length );
+ var range = new Range(startRow, startCol, endRow, endCol);
+ var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
+
+ this.applyDelta({
+ start: range.start,
+ end: range.end,
+ action: "remove",
+ lines: this.getLinesForRange(range)
+ });
+ return deletedLines;
+ };
+ this.removeNewLine = function(row) {
+ if (row < this.getLength() - 1 && row >= 0) {
+ this.applyDelta({
+ start: this.pos(row, this.getLine(row).length),
+ end: this.pos(row + 1, 0),
+ action: "remove",
+ lines: ["", ""]
+ });
+ }
+ };
+ this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
+ if (text.length === 0 && range.isEmpty())
+ return range.start;
+ if (text == this.getTextRange(range))
+ return range.end;
+
+ this.remove(range);
+ var end;
+ if (text) {
+ end = this.insert(range.start, text);
+ }
+ else {
+ end = range.start;
+ }
+
+ return end;
+ };
+ this.applyDeltas = function(deltas) {
+ for (var i=0; i<deltas.length; i++) {
+ this.applyDelta(deltas[i]);
+ }
+ };
+ this.revertDeltas = function(deltas) {
+ for (var i=deltas.length-1; i>=0; i--) {
+ this.revertDelta(deltas[i]);
+ }
+ };
+ this.applyDelta = function(delta, doNotValidate) {
+ var isInsert = delta.action == "insert";
+ if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
+ : !Range.comparePoints(delta.start, delta.end)) {
+ return;
+ }
+
+ if (isInsert && delta.lines.length > 20000)
+ this.$splitAndapplyLargeDelta(delta, 20000);
+ applyDelta(this.$lines, delta, doNotValidate);
+ this._signal("change", delta);
+ };
+
+ this.$splitAndapplyLargeDelta = function(delta, MAX) {
+ var lines = delta.lines;
+ var l = lines.length;
+ var row = delta.start.row;
+ var column = delta.start.column;
+ var from = 0, to = 0;
+ do {
+ from = to;
+ to += MAX - 1;
+ var chunk = lines.slice(from, to);
+ if (to > l) {
+ delta.lines = chunk;
+ delta.start.row = row + from;
+ delta.start.column = column;
+ break;
+ }
+ chunk.push("");
+ this.applyDelta({
+ start: this.pos(row + from, column),
+ end: this.pos(row + to, column = 0),
+ action: delta.action,
+ lines: chunk
+ }, true);
+ } while(true);
+ };
+ this.revertDelta = function(delta) {
+ this.applyDelta({
+ start: this.clonePos(delta.start),
+ end: this.clonePos(delta.end),
+ action: (delta.action == "insert" ? "remove" : "insert"),
+ lines: delta.lines.slice()
+ });
+ };
+ 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 + newlineLength;
+
+ return index + pos.column;
+ };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.last = function(a) {
+ return a[a.length - 1];
+};
+
+exports.stringReverse = function(string) {
+ return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+ var result = '';
+ while (count > 0) {
+ if (count & 1)
+ result += string;
+
+ if (count >>= 1)
+ string += string;
+ }
+ return result;
+};
+
+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 deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
+ return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
+ }
+ if (Object.prototype.toString.call(obj) !== "[object Object]")
+ return obj;
+
+ copy = {};
+ for (var key in obj)
+ copy[key] = deepCopy(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;
+ };
+
+ deferred.isPending = function() {
+ return timer;
+ };
+
+ return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+ _self.schedule = _self;
+
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
+
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ _self.isPending = function() {
+ return timer;
+ };
+
+ return _self;
+};
+});
+
+ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+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.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ var data = e.data;
+ if (data[0].start) {
+ doc.applyDeltas(data);
+ } else {
+ for (var i = 0; i < data.length; i += 2) {
+ if (Array.isArray(data[i+1])) {
+ var d = {action: "insert", start: data[i], lines: data[i+1]};
+ } else {
+ var d = {action: "remove", start: data[i], end: data[i+1]};
+ }
+ doc.applyDelta(d, true);
+ }
+ }
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
+};
+
+(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() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+ace.define("ace/mode/coffee/coffee",["require","exports","module"], function(require, exports, module) {
+function define(f) { module.exports = f() }; define.amd = {};
+(function(root){var CoffeeScript=function(){function _dereq_(e){return _dereq_[e]}return _dereq_["./helpers"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o;e.starts=function(e,t,n){return t===e.substr(n,t.length)},e.ends=function(e,t,n){var i;return i=t.length,t===e.substr(e.length-i-(n||0),i)},e.repeat=s=function(e,t){var n;for(n="";t>0;)1&t&&(n+=e),t>>>=1,e+=e;return n},e.compact=function(e){var t,n,i,r;for(r=[],t=0,i=e.length;i>t;t++)n=e[t],n&&r.push(n);return r},e.count=function(e,t){var n,i;if(n=i=0,!t.length)return 1/0;for(;i=1+e.indexOf(t,i);)n++;return n},e.merge=function(e,t){return n(n({},e),t)},n=e.extend=function(e,t){var n,i;for(n in t)i=t[n],e[n]=i;return e},e.flatten=i=function(e){var t,n,r,s;for(n=[],r=0,s=e.length;s>r;r++)t=e[r],t instanceof Array?n=n.concat(i(t)):n.push(t);return n},e.del=function(e,t){var n;return n=e[t],delete e[t],n},e.some=null!=(r=Array.prototype.some)?r:function(e){var t,n,i;for(n=0,i=this.length;i>n;n++)if(t=this[n],e(t))return!0;return!1},e.invertLiterate=function(e){var t,n,i;return i=!0,n=function(){var n,r,s,o;for(s=e.split("\n"),o=[],n=0,r=s.length;r>n;n++)t=s[n],i&&/^([ ]{4}|[ ]{0,3}\t)/.test(t)?o.push(t):(i=/^\s*$/.test(t))?o.push(t):o.push("# "+t);return o}(),n.join("\n")},t=function(e,t){return t?{first_line:e.first_line,first_column:e.first_column,last_line:t.last_line,last_column:t.last_column}:e},e.addLocationDataFn=function(e,n){return function(i){return"object"==typeof i&&i.updateLocationDataIfMissing&&i.updateLocationDataIfMissing(t(e,n)),i}},e.locationDataToString=function(e){var t;return"2"in e&&"first_line"in e[2]?t=e[2]:"first_line"in e&&(t=e),t?t.first_line+1+":"+(t.first_column+1)+"-"+(t.last_line+1+":"+(t.last_column+1)):"No location data"},e.baseFileName=function(e,t,n){var i,r;return null==t&&(t=!1),null==n&&(n=!1),r=n?/\\|\//:/\//,i=e.split(r),e=i[i.length-1],t&&e.indexOf(".")>=0?(i=e.split("."),i.pop(),"coffee"===i[i.length-1]&&i.length>1&&i.pop(),i.join(".")):e},e.isCoffee=function(e){return/\.((lit)?coffee|coffee\.md)$/.test(e)},e.isLiterate=function(e){return/\.(litcoffee|coffee\.md)$/.test(e)},e.throwSyntaxError=function(e,t){var n;throw n=new SyntaxError(e),n.location=t,n.toString=o,n.stack=""+n,n},e.updateSyntaxError=function(e,t,n){return e.toString===o&&(e.code||(e.code=t),e.filename||(e.filename=n),e.stack=""+e),e},o=function(){var e,t,n,i,r,o,a,c,h,l,u,p,d,f,m;return this.code&&this.location?(u=this.location,a=u.first_line,o=u.first_column,h=u.last_line,c=u.last_column,null==h&&(h=a),null==c&&(c=o),r=this.filename||"[stdin]",e=this.code.split("\n")[a],m=o,i=a===h?c+1:e.length,l=e.slice(0,m).replace(/[^\s]/g," ")+s("^",i-m),"undefined"!=typeof process&&null!==process&&(n=(null!=(p=process.stdout)?p.isTTY:void 0)&&!(null!=(d=process.env)?d.NODE_DISABLE_COLORS:void 0)),(null!=(f=this.colorful)?f:n)&&(t=function(e){return""+e+""},e=e.slice(0,m)+t(e.slice(m,i))+e.slice(i),l=t(l)),r+":"+(a+1)+":"+(o+1)+": error: "+this.message+"\n"+e+"\n"+l):Error.prototype.toString.call(this)},e.nameWhitespaceCharacter=function(e){switch(e){case" ":return"space";case"\n":return"newline";case"\r":return"carriage return";case" ":return"tab";default:return e}}}.call(this),t.exports}(),_dereq_["./rewriter"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,g,v,y,b,k=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1},w=[].slice;for(f=function(e,t,n){var i;return i=[e,t],i.generated=!0,n&&(i.origin=n),i},e.Rewriter=function(){function e(){}return e.prototype.rewrite=function(e){return this.tokens=e,this.removeLeadingNewlines(),this.closeOpenCalls(),this.closeOpenIndexes(),this.normalizeLines(),this.tagPostfixConditionals(),this.addImplicitBracesAndParens(),this.addLocationDataToGeneratedTokens(),this.tokens},e.prototype.scanTokens=function(e){var t,n,i;for(i=this.tokens,t=0;n=i[t];)t+=e.call(this,n,t,i);return!0},e.prototype.detectEnd=function(e,t,n){var i,o,a,c,h;for(h=this.tokens,i=0;c=h[e];){if(0===i&&t.call(this,c,e))return n.call(this,c,e);if(!c||0>i)return n.call(this,c,e-1);o=c[0],k.call(s,o)>=0?i+=1:(a=c[0],k.call(r,a)>=0&&(i-=1)),e+=1}return e-1},e.prototype.removeLeadingNewlines=function(){var e,t,n,i,r;for(i=this.tokens,e=t=0,n=i.length;n>t&&(r=i[e][0],"TERMINATOR"===r);e=++t);return e?this.tokens.splice(0,e):void 0},e.prototype.closeOpenCalls=function(){var e,t;return t=function(e,t){var n;return")"===(n=e[0])||"CALL_END"===n||"OUTDENT"===e[0]&&")"===this.tag(t-1)},e=function(e,t){return this.tokens["OUTDENT"===e[0]?t-1:t][0]="CALL_END"},this.scanTokens(function(n,i){return"CALL_START"===n[0]&&this.detectEnd(i+1,t,e),1})},e.prototype.closeOpenIndexes=function(){var e,t;return t=function(e){var t;return"]"===(t=e[0])||"INDEX_END"===t},e=function(e){return e[0]="INDEX_END"},this.scanTokens(function(n,i){return"INDEX_START"===n[0]&&this.detectEnd(i+1,t,e),1})},e.prototype.indexOfTag=function(){var e,t,n,i,r,s,o;for(t=arguments[0],r=arguments.length>=2?w.call(arguments,1):[],e=0,n=i=0,s=r.length;s>=0?s>i:i>s;n=s>=0?++i:--i){for(;"HERECOMMENT"===this.tag(t+n+e);)e+=2;if(null!=r[n]&&("string"==typeof r[n]&&(r[n]=[r[n]]),o=this.tag(t+n+e),0>k.call(r[n],o)))return-1}return t+n+e-1},e.prototype.looksObjectish=function(e){var t,n;return this.indexOfTag(e,"@",null,":")>-1||this.indexOfTag(e,null,":")>-1?!0:(n=this.indexOfTag(e,s),n>-1&&(t=null,this.detectEnd(n+1,function(e){var t;return t=e[0],k.call(r,t)>=0},function(e,n){return t=n}),":"===this.tag(t+1))?!0:!1)},e.prototype.findTagsBackwards=function(e,t){var n,i,o,a,c,h,l;for(n=[];e>=0&&(n.length||(a=this.tag(e),0>k.call(t,a)&&(c=this.tag(e),0>k.call(s,c)||this.tokens[e].generated)&&(h=this.tag(e),0>k.call(u,h))));)i=this.tag(e),k.call(r,i)>=0&&n.push(this.tag(e)),o=this.tag(e),k.call(s,o)>=0&&n.length&&n.pop(),e-=1;return l=this.tag(e),k.call(t,l)>=0},e.prototype.addImplicitBracesAndParens=function(){var e,t;return e=[],t=null,this.scanTokens(function(i,l,p){var d,m,g,v,y,b,w,T,C,E,F,N,L,x,S,D,R,A,I,_,O,$,j,M,B,V,P,U;if(U=i[0],F=(N=l>0?p[l-1]:[])[0],C=(p.length-1>l?p[l+1]:[])[0],j=function(){return e[e.length-1]},M=l,g=function(e){return l-M+e},v=function(){var e,t;return null!=(e=j())?null!=(t=e[2])?t.ours:void 0:void 0},y=function(){var e;return v()&&"("===(null!=(e=j())?e[0]:void 0)},w=function(){var e;return v()&&"{"===(null!=(e=j())?e[0]:void 0)},b=function(){var e;return v&&"CONTROL"===(null!=(e=j())?e[0]:void 0)},B=function(t){var n;return n=null!=t?t:l,e.push(["(",n,{ours:!0}]),p.splice(n,0,f("CALL_START","(")),null==t?l+=1:void 0},d=function(){return e.pop(),p.splice(l,0,f("CALL_END",")",["","end of input",i[2]])),l+=1},V=function(t,n){var r,s;return null==n&&(n=!0),r=null!=t?t:l,e.push(["{",r,{sameLine:!0,startsLine:n,ours:!0}]),s=new String("{"),s.generated=!0,p.splice(r,0,f("{",s,i)),null==t?l+=1:void 0},m=function(t){return t=null!=t?t:l,e.pop(),p.splice(t,0,f("}","}",i)),l+=1},y()&&("IF"===U||"TRY"===U||"FINALLY"===U||"CATCH"===U||"CLASS"===U||"SWITCH"===U))return e.push(["CONTROL",l,{ours:!0}]),g(1);if("INDENT"===U&&v()){if("=>"!==F&&"->"!==F&&"["!==F&&"("!==F&&","!==F&&"{"!==F&&"TRY"!==F&&"ELSE"!==F&&"="!==F)for(;y();)d();return b()&&e.pop(),e.push([U,l]),g(1)}if(k.call(s,U)>=0)return e.push([U,l]),g(1);if(k.call(r,U)>=0){for(;v();)y()?d():w()?m():e.pop();t=e.pop()}if((k.call(c,U)>=0&&i.spaced||"?"===U&&l>0&&!p[l-1].spaced)&&(k.call(o,C)>=0||k.call(h,C)>=0&&!(null!=(L=p[l+1])?L.spaced:void 0)&&!(null!=(x=p[l+1])?x.newLine:void 0)))return"?"===U&&(U=i[0]="FUNC_EXIST"),B(l+1),g(2);if(k.call(c,U)>=0&&this.indexOfTag(l+1,"INDENT")>-1&&this.looksObjectish(l+2)&&!this.findTagsBackwards(l,["CLASS","EXTENDS","IF","CATCH","SWITCH","LEADING_WHEN","FOR","WHILE","UNTIL"]))return B(l+1),e.push(["INDENT",l+2]),g(3);if(":"===U){for(I=function(){var e;switch(!1){case e=this.tag(l-1),0>k.call(r,e):return t[1];case"@"!==this.tag(l-2):return l-2;default:return l-1}}.call(this);"HERECOMMENT"===this.tag(I-2);)I-=2;return this.insideForDeclaration="FOR"===C,P=0===I||(S=this.tag(I-1),k.call(u,S)>=0)||p[I-1].newLine,j()&&(D=j(),$=D[0],O=D[1],("{"===$||"INDENT"===$&&"{"===this.tag(O-1))&&(P||","===this.tag(I-1)||"{"===this.tag(I-1)))?g(1):(V(I,!!P),g(2))}if(w()&&k.call(u,U)>=0&&(j()[2].sameLine=!1),T="OUTDENT"===F||N.newLine,k.call(a,U)>=0||k.call(n,U)>=0&&T)for(;v();)if(R=j(),$=R[0],O=R[1],A=R[2],_=A.sameLine,P=A.startsLine,y()&&","!==F)d();else if(w()&&!this.insideForDeclaration&&_&&"TERMINATOR"!==U&&":"!==F)m();else{if(!w()||"TERMINATOR"!==U||","===F||P&&this.looksObjectish(l+1))break;if("HERECOMMENT"===C)return g(1);m()}if(!(","!==U||this.looksObjectish(l+1)||!w()||this.insideForDeclaration||"TERMINATOR"===C&&this.looksObjectish(l+2)))for(E="OUTDENT"===C?1:0;w();)m(l+E);return g(1)})},e.prototype.addLocationDataToGeneratedTokens=function(){return this.scanTokens(function(e,t,n){var i,r,s,o,a,c;return e[2]?1:e.generated||e.explicit?("{"===e[0]&&(s=null!=(a=n[t+1])?a[2]:void 0)?(r=s.first_line,i=s.first_column):(o=null!=(c=n[t-1])?c[2]:void 0)?(r=o.last_line,i=o.last_column):r=i=0,e[2]={first_line:r,first_column:i,last_line:r,last_column:i},1):1})},e.prototype.normalizeLines=function(){var e,t,r,s,o;return o=r=s=null,t=function(e,t){var r,s,a,c;return";"!==e[1]&&(r=e[0],k.call(p,r)>=0)&&!("TERMINATOR"===e[0]&&(s=this.tag(t+1),k.call(i,s)>=0))&&!("ELSE"===e[0]&&"THEN"!==o)&&!!("CATCH"!==(a=e[0])&&"FINALLY"!==a||"->"!==o&&"=>"!==o)||(c=e[0],k.call(n,c)>=0&&this.tokens[t-1].newLine)},e=function(e,t){return this.tokens.splice(","===this.tag(t-1)?t-1:t,0,s)},this.scanTokens(function(n,a,c){var h,l,u,p,f,m;if(m=n[0],"TERMINATOR"===m){if("ELSE"===this.tag(a+1)&&"OUTDENT"!==this.tag(a-1))return c.splice.apply(c,[a,1].concat(w.call(this.indentation()))),1;if(u=this.tag(a+1),k.call(i,u)>=0)return c.splice(a,1),0}if("CATCH"===m)for(h=l=1;2>=l;h=++l)if("OUTDENT"===(p=this.tag(a+h))||"TERMINATOR"===p||"FINALLY"===p)return c.splice.apply(c,[a+h,0].concat(w.call(this.indentation()))),2+h;return k.call(d,m)>=0&&"INDENT"!==this.tag(a+1)&&("ELSE"!==m||"IF"!==this.tag(a+1))?(o=m,f=this.indentation(c[a]),r=f[0],s=f[1],"THEN"===o&&(r.fromThen=!0),c.splice(a+1,0,r),this.detectEnd(a+2,t,e),"THEN"===m&&c.splice(a,1),1):1})},e.prototype.tagPostfixConditionals=function(){var e,t,n;return n=null,t=function(e,t){var n,i;return i=e[0],n=this.tokens[t-1][0],"TERMINATOR"===i||"INDENT"===i&&0>k.call(d,n)},e=function(e){return"INDENT"!==e[0]||e.generated&&!e.fromThen?n[0]="POST_"+n[0]:void 0},this.scanTokens(function(i,r){return"IF"!==i[0]?1:(n=i,this.detectEnd(r+1,t,e),1)})},e.prototype.indentation=function(e){var t,n;return t=["INDENT",2],n=["OUTDENT",2],e?(t.generated=n.generated=!0,t.origin=n.origin=e):t.explicit=n.explicit=!0,[t,n]},e.prototype.generate=f,e.prototype.tag=function(e){var t;return null!=(t=this.tokens[e])?t[0]:void 0},e}(),t=[["(",")"],["[","]"],["{","}"],["INDENT","OUTDENT"],["CALL_START","CALL_END"],["PARAM_START","PARAM_END"],["INDEX_START","INDEX_END"],["STRING_START","STRING_END"],["REGEX_START","REGEX_END"]],e.INVERSES=l={},s=[],r=[],m=0,v=t.length;v>m;m++)y=t[m],g=y[0],b=y[1],s.push(l[b]=g),r.push(l[g]=b);i=["CATCH","THEN","ELSE","FINALLY"].concat(r),c=["IDENTIFIER","SUPER",")","CALL_END","]","INDEX_END","@","THIS"],o=["IDENTIFIER","NUMBER","STRING","STRING_START","JS","REGEX","REGEX_START","NEW","PARAM_START","CLASS","IF","TRY","SWITCH","THIS","BOOL","NULL","UNDEFINED","UNARY","YIELD","UNARY_MATH","SUPER","THROW","@","->","=>","[","(","{","--","++"],h=["+","-"],a=["POST_IF","FOR","WHILE","UNTIL","WHEN","BY","LOOP","TERMINATOR"],d=["ELSE","->","=>","TRY","FINALLY","THEN"],p=["TERMINATOR","CATCH","FINALLY","ELSE","OUTDENT","LEADING_WHEN"],u=["TERMINATOR","INDENT","OUTDENT"],n=[".","?.","::","?::"]}.call(this),t.exports}(),_dereq_["./lexer"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,g,v,y,b,k,w,T,C,E,F,N,L,x,S,D,R,A,I,_,O,$,j,M,B,V,P,U,G,H,q,X,W,Y,K,z,J,Q,Z,et,tt,nt,it,rt,st,ot,at,ct,ht,lt,ut=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};ot=_dereq_("./rewriter"),P=ot.Rewriter,w=ot.INVERSES,at=_dereq_("./helpers"),nt=at.count,ht=at.starts,tt=at.compact,ct=at.repeat,it=at.invertLiterate,st=at.locationDataToString,lt=at.throwSyntaxError,e.Lexer=S=function(){function e(){}return e.prototype.tokenize=function(e,t){var n,i,r,s;for(null==t&&(t={}),this.literate=t.literate,this.indent=0,this.baseIndent=0,this.indebt=0,this.outdebt=0,this.indents=[],this.ends=[],this.tokens=[],this.chunkLine=t.line||0,this.chunkColumn=t.column||0,e=this.clean(e),r=0;this.chunk=e.slice(r);)if(n=this.identifierToken()||this.commentToken()||this.whitespaceToken()||this.lineToken()||this.stringToken()||this.numberToken()||this.regexToken()||this.jsToken()||this.literalToken(),s=this.getLineAndColumnFromChunk(n),this.chunkLine=s[0],this.chunkColumn=s[1],r+=n,t.untilBalanced&&0===this.ends.length)return{tokens:this.tokens,index:r};return this.closeIndentation(),(i=this.ends.pop())&&this.error("missing "+i.tag,i.origin[2]),t.rewrite===!1?this.tokens:(new P).rewrite(this.tokens)},e.prototype.clean=function(e){return e.charCodeAt(0)===t&&(e=e.slice(1)),e=e.replace(/\r/g,"").replace(z,""),et.test(e)&&(e="\n"+e,this.chunkLine--),this.literate&&(e=it(e)),e},e.prototype.identifierToken=function(){var e,t,n,i,r,c,h,l,u,p,d,f,m,g,y,b;return(l=v.exec(this.chunk))?(h=l[0],r=l[1],t=l[2],c=r.length,u=void 0,"own"===r&&"FOR"===this.tag()?(this.token("OWN",r),r.length):"from"===r&&"YIELD"===this.tag()?(this.token("FROM",r),r.length):(d=this.tokens,p=d[d.length-1],i=t||null!=p&&("."===(f=p[0])||"?."===f||"::"===f||"?::"===f||!p.spaced&&"@"===p[0]),y="IDENTIFIER",!i&&(ut.call(E,r)>=0||ut.call(a,r)>=0)&&(y=r.toUpperCase(),"WHEN"===y&&(m=this.tag(),ut.call(N,m)>=0)?y="LEADING_WHEN":"FOR"===y?this.seenFor=!0:"UNLESS"===y?y="IF":ut.call(J,y)>=0?y="UNARY":ut.call(B,y)>=0&&("INSTANCEOF"!==y&&this.seenFor?(y="FOR"+y,this.seenFor=!1):(y="RELATION","!"===this.value()&&(u=this.tokens.pop(),r="!"+r)))),ut.call(C,r)>=0&&(i?(y="IDENTIFIER",r=new String(r),r.reserved=!0):ut.call(V,r)>=0&&this.error("reserved word '"+r+"'",{length:r.length})),i||(ut.call(s,r)>=0&&(e=r,r=o[r]),y=function(){switch(r){case"!":return"UNARY";case"==":case"!=":return"COMPARE";case"&&":case"||":return"LOGIC";case"true":case"false":return"BOOL";case"break":case"continue":return"STATEMENT";default:return y}}()),b=this.token(y,r,0,c),e&&(b.origin=[y,e,b[2]]),b.variable=!i,u&&(g=[u[2].first_line,u[2].first_column],b[2].first_line=g[0],b[2].first_column=g[1]),t&&(n=h.lastIndexOf(":"),this.token(":",":",n,t.length)),h.length)):0},e.prototype.numberToken=function(){var e,t,n,i,r;return(n=I.exec(this.chunk))?(i=n[0],t=i.length,/^0[BOX]/.test(i)?this.error("radix prefix in '"+i+"' must be lowercase",{offset:1}):/E/.test(i)&&!/^0x/.test(i)?this.error("exponential notation in '"+i+"' must be indicated with a lowercase 'e'",{offset:i.indexOf("E")}):/^0\d*[89]/.test(i)?this.error("decimal literal '"+i+"' must not be prefixed with '0'",{length:t}):/^0\d+/.test(i)&&this.error("octal literal '"+i+"' must be prefixed with '0o'",{length:t}),(r=/^0o([0-7]+)/.exec(i))&&(i="0x"+parseInt(r[1],8).toString(16)),(e=/^0b([01]+)/.exec(i))&&(i="0x"+parseInt(e[1],2).toString(16)),this.token("NUMBER",i,0,t),t):0},e.prototype.stringToken=function(){var e,t,n,i,r,s,o,a,c,h,l,u,m,g,v,y;if(l=(Y.exec(this.chunk)||[])[0],!l)return 0;if(g=function(){switch(l){case"'":return W;case'"':return q;case"'''":return f;case'"""':return p}}(),s=3===l.length,u=this.matchWithInterpolations(g,l),y=u.tokens,r=u.index,e=y.length-1,n=l.charAt(0),s){for(a=null,i=function(){var e,t,n;for(n=[],o=e=0,t=y.length;t>e;o=++e)v=y[o],"NEOSTRING"===v[0]&&n.push(v[1]);return n}().join("#{}");h=d.exec(i);)t=h[1],(null===a||(m=t.length)>0&&a.length>m)&&(a=t);a&&(c=RegExp("^"+a,"gm")),this.mergeInterpolationTokens(y,{delimiter:n},function(t){return function(n,i){return n=t.formatString(n),0===i&&(n=n.replace(F,"")),i===e&&(n=n.replace(K,"")),c&&(n=n.replace(c,"")),n}}(this))}else this.mergeInterpolationTokens(y,{delimiter:n},function(t){return function(n,i){return n=t.formatString(n),n=n.replace(G,function(t,r){return 0===i&&0===r||i===e&&r+t.length===n.length?"":" "})}}(this));return r},e.prototype.commentToken=function(){var e,t,n;return(n=this.chunk.match(c))?(e=n[0],t=n[1],t&&((n=u.exec(e))&&this.error("block comments cannot contain "+n[0],{offset:n.index,length:n[0].length}),t.indexOf("\n")>=0&&(t=t.replace(RegExp("\\n"+ct(" ",this.indent),"g"),"\n")),this.token("HERECOMMENT",t,0,e.length)),e.length):0},e.prototype.jsToken=function(){var e,t;return"`"===this.chunk.charAt(0)&&(e=T.exec(this.chunk))?(this.token("JS",(t=e[0]).slice(1,-1),0,t.length),t.length):0},e.prototype.regexToken=function(){var e,t,n,r,s,o,a,c,h,l,u,p,d;switch(!1){case!(o=M.exec(this.chunk)):this.error("regular expressions cannot begin with "+o[2],{offset:o.index+o[1].length});break;case!(o=this.matchWithInterpolations(m,"///")):d=o.tokens,s=o.index;break;case!(o=$.exec(this.chunk)):if(p=o[0],e=o[1],t=o[2],this.validateEscapes(e,{isRegex:!0,offsetInChunk:1}),s=p.length,h=this.tokens,c=h[h.length-1],c)if(c.spaced&&(l=c[0],ut.call(i,l)>=0)){if(!t||O.test(p))return 0}else if(u=c[0],ut.call(A,u)>=0)return 0;t||this.error("missing / (unclosed regex)");break;default:return 0}switch(r=j.exec(this.chunk.slice(s))[0],n=s+r.length,a=this.makeToken("REGEX",null,0,n),!1){case!!Z.test(r):this.error("invalid regular expression flags "+r,{offset:s,length:r.length});break;case!(p||1===d.length):null==e&&(e=this.formatHeregex(d[0][1])),this.token("REGEX",""+this.makeDelimitedLiteral(e,{delimiter:"/"})+r,0,n,a);break;default:this.token("REGEX_START","(",0,0,a),this.token("IDENTIFIER","RegExp",0,0),this.token("CALL_START","(",0,0),this.mergeInterpolationTokens(d,{delimiter:'"',"double":!0},this.formatHeregex),r&&(this.token(",",",",s,0),this.token("STRING",'"'+r+'"',s,r.length)),this.token(")",")",n,0),this.token("REGEX_END",")",n,0)}return n},e.prototype.lineToken=function(){var e,t,n,i,r;if(!(n=R.exec(this.chunk)))return 0;if(t=n[0],this.seenFor=!1,r=t.length-1-t.lastIndexOf("\n"),i=this.unfinished(),r-this.indebt===this.indent)return i?this.suppressNewlines():this.newlineToken(0),t.length;if(r>this.indent){if(i)return this.indebt=r-this.indent,this.suppressNewlines(),t.length;if(!this.tokens.length)return this.baseIndent=this.indent=r,t.length;e=r-this.indent+this.outdebt,this.token("INDENT",e,t.length-r,r),this.indents.push(e),this.ends.push({tag:"OUTDENT"}),this.outdebt=this.indebt=0,this.indent=r}else this.baseIndent>r?this.error("missing indentation",{offset:t.length}):(this.indebt=0,this.outdentToken(this.indent-r,i,t.length));return t.length},e.prototype.outdentToken=function(e,t,n){var i,r,s,o;for(i=this.indent-e;e>0;)s=this.indents[this.indents.length-1],s?s===this.outdebt?(e-=this.outdebt,this.outdebt=0):this.outdebt>s?(this.outdebt-=s,e-=s):(r=this.indents.pop()+this.outdebt,n&&(o=this.chunk[n],ut.call(y,o)>=0)&&(i-=r-e,e=r),this.outdebt=0,this.pair("OUTDENT"),this.token("OUTDENT",e,0,n),e-=r):e=0;for(r&&(this.outdebt-=e);";"===this.value();)this.tokens.pop();return"TERMINATOR"===this.tag()||t||this.token("TERMINATOR","\n",n,0),this.indent=i,this},e.prototype.whitespaceToken=function(){var e,t,n,i;return(e=et.exec(this.chunk))||(t="\n"===this.chunk.charAt(0))?(i=this.tokens,n=i[i.length-1],n&&(n[e?"spaced":"newLine"]=!0),e?e[0].length:0):0},e.prototype.newlineToken=function(e){for(;";"===this.value();)this.tokens.pop();return"TERMINATOR"!==this.tag()&&this.token("TERMINATOR","\n",e,0),this},e.prototype.suppressNewlines=function(){return"\\"===this.value()&&this.tokens.pop(),this},e.prototype.literalToken=function(){var e,t,n,s,o,a,c,u,p,d;if((e=_.exec(this.chunk))?(d=e[0],r.test(d)&&this.tagParameters()):d=this.chunk.charAt(0),u=d,n=this.tokens,t=n[n.length-1],"="===d&&t&&(!t[1].reserved&&(s=t[1],ut.call(C,s)>=0)&&(t.origin&&(t=t.origin),this.error("reserved word '"+t[1]+"' can't be assigned",t[2])),"||"===(o=t[1])||"&&"===o))return t[0]="COMPOUND_ASSIGN",t[1]+="=",d.length;if(";"===d)this.seenFor=!1,u="TERMINATOR";else if(ut.call(D,d)>=0)u="MATH";else if(ut.call(h,d)>=0)u="COMPARE";else if(ut.call(l,d)>=0)u="COMPOUND_ASSIGN";else if(ut.call(J,d)>=0)u="UNARY";else if(ut.call(Q,d)>=0)u="UNARY_MATH";else if(ut.call(U,d)>=0)u="SHIFT";else if(ut.call(x,d)>=0||"?"===d&&(null!=t?t.spaced:void 0))u="LOGIC";else if(t&&!t.spaced)if("("===d&&(a=t[0],ut.call(i,a)>=0))"?"===t[0]&&(t[0]="FUNC_EXIST"),u="CALL_START";else if("["===d&&(c=t[0],ut.call(b,c)>=0))switch(u="INDEX_START",t[0]){case"?":t[0]="INDEX_SOAK"}switch(p=this.makeToken(u,d),d){case"(":case"{":case"[":this.ends.push({tag:w[d],origin:p});break;case")":case"}":case"]":this.pair(d)}return this.tokens.push(p),d.length},e.prototype.tagParameters=function(){var e,t,n,i;if(")"!==this.tag())return this;for(t=[],i=this.tokens,e=i.length,i[--e][0]="PARAM_END";n=i[--e];)switch(n[0]){case")":t.push(n);break;case"(":case"CALL_START":if(!t.length)return"("===n[0]?(n[0]="PARAM_START",this):this;t.pop()}return this},e.prototype.closeIndentation=function(){return this.outdentToken(this.indent)},e.prototype.matchWithInterpolations=function(t,n){var i,r,s,o,a,c,h,l,u,p,d,f,m,g,v;if(v=[],l=n.length,this.chunk.slice(0,l)!==n)return null;for(m=this.chunk.slice(l);;){if(g=t.exec(m)[0],this.validateEscapes(g,{isRegex:"/"===n.charAt(0),offsetInChunk:l}),v.push(this.makeToken("NEOSTRING",g,l)),m=m.slice(g.length),l+=g.length,"#{"!==m.slice(0,2))break;p=this.getLineAndColumnFromChunk(l+1),c=p[0],r=p[1],d=(new e).tokenize(m.slice(1),{line:c,column:r,untilBalanced:!0}),h=d.tokens,o=d.index,o+=1,u=h[0],i=h[h.length-1],u[0]=u[1]="(",i[0]=i[1]=")",i.origin=["","end of interpolation",i[2]],"TERMINATOR"===(null!=(f=h[1])?f[0]:void 0)&&h.splice(1,1),v.push(["TOKENS",h]),m=m.slice(o),l+=o}return m.slice(0,n.length)!==n&&this.error("missing "+n,{length:n.length}),s=v[0],a=v[v.length-1],s[2].first_column-=n.length,a[2].last_column+=n.length,0===a[1].length&&(a[2].last_column-=1),{tokens:v,index:l+n.length}},e.prototype.mergeInterpolationTokens=function(e,t,n){var i,r,s,o,a,c,h,l,u,p,d,f,m,g,v,y;for(e.length>1&&(u=this.token("STRING_START","(",0,0)),s=this.tokens.length,o=a=0,h=e.length;h>a;o=++a){switch(g=e[o],m=g[0],y=g[1],m){case"TOKENS":if(2===y.length)continue;l=y[0],v=y;break;case"NEOSTRING":if(i=n(g[1],o),0===i.length){if(0!==o)continue;r=this.tokens.length}2===o&&null!=r&&this.tokens.splice(r,2),g[0]="STRING",g[1]=this.makeDelimitedLiteral(i,t),l=g,v=[g]}this.tokens.length>s&&(p=this.token("+","+"),p[2]={first_line:l[2].first_line,first_column:l[2].first_column,last_line:l[2].first_line,last_column:l[2].first_column}),(d=this.tokens).push.apply(d,v)}return u?(c=e[e.length-1],u.origin=["STRING",null,{first_line:u[2].first_line,first_column:u[2].first_column,last_line:c[2].last_line,last_column:c[2].last_column}],f=this.token("STRING_END",")"),f[2]={first_line:c[2].last_line,first_column:c[2].last_column,last_line:c[2].last_line,last_column:c[2].last_column}):void 0},e.prototype.pair=function(e){var t,n,i,r,s;return i=this.ends,n=i[i.length-1],e!==(s=null!=n?n.tag:void 0)?("OUTDENT"!==s&&this.error("unmatched "+e),r=this.indents,t=r[r.length-1],this.outdentToken(t,!0),this.pair(e)):this.ends.pop()},e.prototype.getLineAndColumnFromChunk=function(e){var t,n,i,r,s;return 0===e?[this.chunkLine,this.chunkColumn]:(s=e>=this.chunk.length?this.chunk:this.chunk.slice(0,+(e-1)+1||9e9),i=nt(s,"\n"),t=this.chunkColumn,i>0?(r=s.split("\n"),n=r[r.length-1],t=n.length):t+=s.length,[this.chunkLine+i,t])},e.prototype.makeToken=function(e,t,n,i){var r,s,o,a,c;return null==n&&(n=0),null==i&&(i=t.length),s={},o=this.getLineAndColumnFromChunk(n),s.first_line=o[0],s.first_column=o[1],r=Math.max(0,i-1),a=this.getLineAndColumnFromChunk(n+r),s.last_line=a[0],s.last_column=a[1],c=[e,t,s]},e.prototype.token=function(e,t,n,i,r){var s;return s=this.makeToken(e,t,n,i),r&&(s.origin=r),this.tokens.push(s),s},e.prototype.tag=function(){var e,t;return e=this.tokens,t=e[e.length-1],null!=t?t[0]:void 0},e.prototype.value=function(){var e,t;return e=this.tokens,t=e[e.length-1],null!=t?t[1]:void 0},e.prototype.unfinished=function(){var e;return L.test(this.chunk)||"\\"===(e=this.tag())||"."===e||"?."===e||"?::"===e||"UNARY"===e||"MATH"===e||"UNARY_MATH"===e||"+"===e||"-"===e||"YIELD"===e||"**"===e||"SHIFT"===e||"RELATION"===e||"COMPARE"===e||"LOGIC"===e||"THROW"===e||"EXTENDS"===e},e.prototype.formatString=function(e){return e.replace(X,"$1")},e.prototype.formatHeregex=function(e){return e.replace(g,"$1$2")},e.prototype.validateEscapes=function(e,t){var n,i,r,s,o,a,c,h;return null==t&&(t={}),s=k.exec(e),!s||(s[0],n=s[1],a=s[2],i=s[3],h=s[4],t.isRegex&&a&&"0"!==a.charAt(0))?void 0:(o=a?"octal escape sequences are not allowed":"invalid escape sequence",r="\\"+(a||i||h),this.error(o+" "+r,{offset:(null!=(c=t.offsetInChunk)?c:0)+s.index+n.length,length:r.length}))},e.prototype.makeDelimitedLiteral=function(e,t){var n;return null==t&&(t={}),""===e&&"/"===t.delimiter&&(e="(?:)"),n=RegExp("(\\\\\\\\)|(\\\\0(?=[1-7]))|\\\\?("+t.delimiter+")|\\\\?(?:(\\n)|(\\r)|(\\u2028)|(\\u2029))|(\\\\.)","g"),e=e.replace(n,function(e,n,i,r,s,o,a,c,h){switch(!1){case!n:return t.double?n+n:n;case!i:return"\\x00";case!r:return"\\"+r;case!s:return"\\n";case!o:return"\\r";case!a:return"\\u2028";case!c:return"\\u2029";case!h:return t.double?"\\"+h:h}}),""+t.delimiter+e+t.delimiter},e.prototype.error=function(e,t){var n,i,r,s,o,a;return null==t&&(t={}),r="first_line"in t?t:(o=this.getLineAndColumnFromChunk(null!=(s=t.offset)?s:0),i=o[0],n=o[1],o,{first_line:i,first_column:n,last_column:n+(null!=(a=t.length)?a:1)-1}),lt(e,r)},e}(),E=["true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","yield","if","else","switch","for","while","do","try","catch","finally","class","extends","super"],a=["undefined","then","unless","until","loop","of","by","when"],o={and:"&&",or:"||",is:"==",isnt:"!=",not:"!",yes:"true",no:"false",on:"true",off:"false"},s=function(){var e;e=[];for(rt in o)e.push(rt);return e}(),a=a.concat(s),V=["case","default","function","var","void","with","const","let","enum","export","import","native","implements","interface","package","private","protected","public","static"],H=["arguments","eval","yield*"],C=E.concat(V).concat(H),e.RESERVED=V.concat(E).concat(a).concat(H),e.STRICT_PROSCRIBED=H,t=65279,v=/^(?!\d)((?:(?!\s)[$\w\x7f-\uffff])+)([^\n\S]*:(?!:))?/,I=/^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i,_=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>*\/%])\2=?|\?(\.|::)|\.{2,3})/,et=/^[^\n\S]+/,c=/^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/,r=/^[-=]>/,R=/^(?:\n[^\n\S]*)+/,T=/^`[^\\`]*(?:\\.[^\\`]*)*`/,Y=/^(?:'''|"""|'|")/,W=/^(?:[^\\']|\\[\s\S])*/,q=/^(?:[^\\"#]|\\[\s\S]|\#(?!\{))*/,f=/^(?:[^\\']|\\[\s\S]|'(?!''))*/,p=/^(?:[^\\"#]|\\[\s\S]|"(?!"")|\#(?!\{))*/,X=/((?:\\\\)+)|\\[^\S\n]*\n\s*/g,G=/\s*\n\s*/g,d=/\n+([^\n\S]*)(?=\S)/g,$=/^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)?/,j=/^\w*/,Z=/^(?!.*(.).*\1)[imgy]*$/,m=/^(?:[^\\\/#]|\\[\s\S]|\/(?!\/\/)|\#(?!\{))*/,g=/((?:\\\\)+)|\\(\s)|\s+(?:#.*)?/g,M=/^(\/|\/{3}\s*)(\*)/,O=/^\/=?\s/,u=/\*\//,L=/^\s*(?:,|\??\.(?![.\d])|::)/,k=/((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7]|[1-7])|(x(?![\da-fA-F]{2}).{0,2})|(u(?![\da-fA-F]{4}).{0,4}))/,F=/^[^\n\S]*\n/,K=/\n[^\n\S]*$/,z=/\s+$/,l=["-=","+=","/=","*=","%=","||=","&&=","?=","<<=",">>=",">>>=","&=","^=","|=","**=","//=","%%="],J=["NEW","TYPEOF","DELETE","DO"],Q=["!","~"],x=["&&","||","&","|","^"],U=["<<",">>",">>>"],h=["==","!=","<",">","<=",">="],D=["*","/","%","//","%%"],B=["IN","OF","INSTANCEOF"],n=["TRUE","FALSE"],i=["IDENTIFIER",")","]","?","@","THIS","SUPER"],b=i.concat(["NUMBER","STRING","STRING_END","REGEX","REGEX_END","BOOL","NULL","UNDEFINED","}","::"]),A=b.concat(["++","--"]),N=["INDENT","OUTDENT","TERMINATOR"],y=[")","}","]"]}.call(this),t.exports}(),_dereq_["./parser"]=function(){var e={},t={exports:e},n=function(){function e(){this.yy={}}var t=function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n},n=[1,20],i=[1,75],r=[1,71],s=[1,76],o=[1,77],a=[1,73],c=[1,74],h=[1,50],l=[1,52],u=[1,53],p=[1,54],d=[1,55],f=[1,45],m=[1,46],g=[1,27],v=[1,60],y=[1,61],b=[1,70],k=[1,43],w=[1,26],T=[1,58],C=[1,59],E=[1,57],F=[1,38],N=[1,44],L=[1,56],x=[1,65],S=[1,66],D=[1,67],R=[1,68],A=[1,42],I=[1,64],_=[1,29],O=[1,30],$=[1,31],j=[1,32],M=[1,33],B=[1,34],V=[1,35],P=[1,78],U=[1,6,26,34,108],G=[1,88],H=[1,81],q=[1,80],X=[1,79],W=[1,82],Y=[1,83],K=[1,84],z=[1,85],J=[1,86],Q=[1,87],Z=[1,91],et=[1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,135,136,141,142,143,144,145,146,147],tt=[1,97],nt=[1,98],it=[1,99],rt=[1,100],st=[1,102],ot=[1,103],at=[1,96],ct=[2,112],ht=[1,6,25,26,34,55,60,63,72,73,74,75,77,79,80,84,90,91,92,97,99,108,110,111,112,116,117,132,135,136,141,142,143,144,145,146,147],lt=[2,79],ut=[1,108],pt=[2,58],dt=[1,112],ft=[1,117],mt=[1,118],gt=[1,120],vt=[1,6,25,26,34,46,55,60,63,72,73,74,75,77,79,80,84,90,91,92,97,99,108,110,111,112,116,117,132,135,136,141,142,143,144,145,146,147],yt=[2,76],bt=[1,6,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,135,136,141,142,143,144,145,146,147],kt=[1,155],wt=[1,157],Tt=[1,152],Ct=[1,6,25,26,34,46,55,60,63,72,73,74,75,77,79,80,84,86,90,91,92,97,99,108,110,111,112,116,117,132,135,136,139,140,141,142,143,144,145,146,147,148],Et=[2,95],Ft=[1,6,25,26,34,49,55,60,63,72,73,74,75,77,79,80,84,90,91,92,97,99,108,110,111,112,116,117,132,135,136,141,142,143,144,145,146,147],Nt=[1,6,25,26,34,46,49,55,60,63,72,73,74,75,77,79,80,84,86,90,91,92,97,99,108,110,111,112,116,117,123,124,132,135,136,139,140,141,142,143,144,145,146,147,148],Lt=[1,206],xt=[1,205],St=[1,6,25,26,34,38,55,60,63,72,73,74,75,77,79,80,84,90,91,92,97,99,108,110,111,112,116,117,132,135,136,141,142,143,144,145,146,147],Dt=[2,56],Rt=[1,216],At=[6,25,26,55,60],It=[6,25,26,46,55,60,63],_t=[1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,135,136,142,144,145,146,147],Ot=[1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132],$t=[72,73,74,75,77,80,90,91],jt=[1,235],Mt=[2,133],Bt=[1,6,25,26,34,46,55,60,63,72,73,74,75,77,79,80,84,90,91,92,97,99,108,110,111,112,116,117,123,124,132,135,136,141,142,143,144,145,146,147],Vt=[1,244],Pt=[6,25,26,60,92,97],Ut=[1,6,25,26,34,55,60,63,79,84,92,97,99,108,117,132],Gt=[1,6,25,26,34,55,60,63,79,84,92,97,99,108,111,117,132],Ht=[123,124],qt=[60,123,124],Xt=[1,255],Wt=[6,25,26,60,84],Yt=[6,25,26,49,60,84],Kt=[1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,135,136,144,145,146,147],zt=[11,28,30,32,33,36,37,40,41,42,43,44,51,52,53,57,58,79,82,85,89,94,95,96,102,106,107,110,112,114,116,125,131,133,134,135,136,137,139,140],Jt=[2,122],Qt=[6,25,26],Zt=[2,57],en=[1,268],tn=[1,269],nn=[1,6,25,26,34,55,60,63,79,84,92,97,99,104,105,108,110,111,112,116,117,127,129,132,135,136,141,142,143,144,145,146,147],rn=[26,127,129],sn=[1,6,26,34,55,60,63,79,84,92,97,99,108,111,117,132],on=[2,71],an=[1,291],cn=[1,292],hn=[1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,127,132,135,136,141,142,143,144,145,146,147],ln=[1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,112,116,117,132],un=[1,303],pn=[1,304],dn=[6,25,26,60],fn=[1,6,25,26,34,55,60,63,79,84,92,97,99,104,108,110,111,112,116,117,132,135,136,141,142,143,144,145,146,147],mn=[25,60],gn={trace:function(){},yy:{},symbols_:{error:2,Root:3,Body:4,Line:5,TERMINATOR:6,Expression:7,Statement:8,Return:9,Comment:10,STATEMENT:11,Value:12,Invocation:13,Code:14,Operation:15,Assign:16,If:17,Try:18,While:19,For:20,Switch:21,Class:22,Throw:23,Block:24,INDENT:25,OUTDENT:26,Identifier:27,IDENTIFIER:28,AlphaNumeric:29,NUMBER:30,String:31,STRING:32,STRING_START:33,STRING_END:34,Regex:35,REGEX:36,REGEX_START:37,REGEX_END:38,Literal:39,JS:40,DEBUGGER:41,UNDEFINED:42,NULL:43,BOOL:44,Assignable:45,"=":46,AssignObj:47,ObjAssignable:48,":":49,ThisProperty:50,RETURN:51,HERECOMMENT:52,PARAM_START:53,ParamList:54,PARAM_END:55,FuncGlyph:56,"->":57,"=>":58,OptComma:59,",":60,Param:61,ParamVar:62,"...":63,Array:64,Object:65,Splat:66,SimpleAssignable:67,Accessor:68,Parenthetical:69,Range:70,This:71,".":72,"?.":73,"::":74,"?::":75,Index:76,INDEX_START:77,IndexValue:78,INDEX_END:79,INDEX_SOAK:80,Slice:81,"{":82,AssignList:83,"}":84,CLASS:85,EXTENDS:86,OptFuncExist:87,Arguments:88,SUPER:89,FUNC_EXIST:90,CALL_START:91,CALL_END:92,ArgList:93,THIS:94,"@":95,"[":96,"]":97,RangeDots:98,"..":99,Arg:100,SimpleArgs:101,TRY:102,Catch:103,FINALLY:104,CATCH:105,THROW:106,"(":107,")":108,WhileSource:109,WHILE:110,WHEN:111,UNTIL:112,Loop:113,LOOP:114,ForBody:115,FOR:116,BY:117,ForStart:118,ForSource:119,ForVariables:120,OWN:121,ForValue:122,FORIN:123,FOROF:124,SWITCH:125,Whens:126,ELSE:127,When:128,LEADING_WHEN:129,IfBlock:130,IF:131,POST_IF:132,UNARY:133,UNARY_MATH:134,"-":135,"+":136,YIELD:137,FROM:138,"--":139,"++":140,"?":141,MATH:142,"**":143,SHIFT:144,COMPARE:145,LOGIC:146,RELATION:147,COMPOUND_ASSIGN:148,$accept:0,$end:1},terminals_:{2:"error",6:"TERMINATOR",11:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",32:"STRING",33:"STRING_START",34:"STRING_END",36:"REGEX",37:"REGEX_START",38:"REGEX_END",40:"JS",41:"DEBUGGER",42:"UNDEFINED",43:"NULL",44:"BOOL",46:"=",49:":",51:"RETURN",52:"HERECOMMENT",53:"PARAM_START",55:"PARAM_END",57:"->",58:"=>",60:",",63:"...",72:".",73:"?.",74:"::",75:"?::",77:"INDEX_START",79:"INDEX_END",80:"INDEX_SOAK",82:"{",84:"}",85:"CLASS",86:"EXTENDS",89:"SUPER",90:"FUNC_EXIST",91:"CALL_START",92:"CALL_END",94:"THIS",95:"@",96:"[",97:"]",99:"..",102:"TRY",104:"FINALLY",105:"CATCH",106:"THROW",107:"(",108:")",110:"WHILE",111:"WHEN",112:"UNTIL",114:"LOOP",116:"FOR",117:"BY",121:"OWN",123:"FORIN",124:"FOROF",125:"SWITCH",127:"ELSE",129:"LEADING_WHEN",131:"IF",132:"POST_IF",133:"UNARY",134:"UNARY_MATH",135:"-",136:"+",137:"YIELD",138:"FROM",139:"--",140:"++",141:"?",142:"MATH",143:"**",144:"SHIFT",145:"COMPARE",146:"LOGIC",147:"RELATION",148:"COMPOUND_ASSIGN"},productions_:[0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[8,1],[8,1],[8,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[24,2],[24,3],[27,1],[29,1],[29,1],[31,1],[31,3],[35,1],[35,3],[39,1],[39,1],[39,1],[39,1],[39,1],[39,1],[39,1],[16,3],[16,4],[16,5],[47,1],[47,3],[47,5],[47,1],[48,1],[48,1],[48,1],[9,2],[9,1],[10,1],[14,5],[14,2],[56,1],[56,1],[59,0],[59,1],[54,0],[54,1],[54,3],[54,4],[54,6],[61,1],[61,2],[61,3],[61,1],[62,1],[62,1],[62,1],[62,1],[66,2],[67,1],[67,2],[67,2],[67,1],[45,1],[45,1],[45,1],[12,1],[12,1],[12,1],[12,1],[12,1],[68,2],[68,2],[68,2],[68,2],[68,1],[68,1],[76,3],[76,2],[78,1],[78,1],[65,4],[83,0],[83,1],[83,3],[83,4],[83,6],[22,1],[22,2],[22,3],[22,4],[22,2],[22,3],[22,4],[22,5],[13,3],[13,3],[13,1],[13,2],[87,0],[87,1],[88,2],[88,4],[71,1],[71,1],[50,2],[64,2],[64,4],[98,1],[98,1],[70,5],[81,3],[81,2],[81,2],[81,1],[93,1],[93,3],[93,4],[93,4],[93,6],[100,1],[100,1],[100,1],[101,1],[101,3],[18,2],[18,3],[18,4],[18,5],[103,3],[103,3],[103,2],[23,2],[69,3],[69,5],[109,2],[109,4],[109,2],[109,4],[19,2],[19,2],[19,2],[19,1],[113,2],[113,2],[20,2],[20,2],[20,2],[115,2],[115,4],[115,2],[118,2],[118,3],[122,1],[122,1],[122,1],[122,1],[120,1],[120,3],[119,2],[119,2],[119,4],[119,4],[119,4],[119,6],[119,6],[21,5],[21,7],[21,4],[21,6],[126,1],[126,2],[128,3],[128,4],[130,3],[130,5],[17,1],[17,3],[17,3],[17,3],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,3],[15,2],[15,2],[15,2],[15,2],[15,2],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,5],[15,4],[15,3]],performAction:function(e,t,n,i,r,s,o){var a=s.length-1;
+switch(r){case 1:return this.$=i.addLocationDataFn(o[a],o[a])(new i.Block);case 2:return this.$=s[a];case 3:this.$=i.addLocationDataFn(o[a],o[a])(i.Block.wrap([s[a]]));break;case 4:this.$=i.addLocationDataFn(o[a-2],o[a])(s[a-2].push(s[a]));break;case 5:this.$=s[a-1];break;case 6:case 7:case 8:case 9:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 27:case 32:case 34:case 45:case 46:case 47:case 48:case 56:case 57:case 67:case 68:case 69:case 70:case 75:case 76:case 79:case 83:case 89:case 133:case 134:case 136:case 166:case 167:case 183:case 189:this.$=s[a];break;case 10:case 25:case 26:case 28:case 30:case 33:case 35:this.$=i.addLocationDataFn(o[a],o[a])(new i.Literal(s[a]));break;case 23:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Block);break;case 24:case 31:case 90:this.$=i.addLocationDataFn(o[a-2],o[a])(s[a-1]);break;case 29:case 146:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Parens(s[a-1]));break;case 36:this.$=i.addLocationDataFn(o[a],o[a])(new i.Undefined);break;case 37:this.$=i.addLocationDataFn(o[a],o[a])(new i.Null);break;case 38:this.$=i.addLocationDataFn(o[a],o[a])(new i.Bool(s[a]));break;case 39:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Assign(s[a-2],s[a]));break;case 40:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Assign(s[a-3],s[a]));break;case 41:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Assign(s[a-4],s[a-1]));break;case 42:case 72:case 77:case 78:case 80:case 81:case 82:case 168:case 169:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(s[a]));break;case 43:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Assign(i.addLocationDataFn(o[a-2])(new i.Value(s[a-2])),s[a],"object"));break;case 44:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Assign(i.addLocationDataFn(o[a-4])(new i.Value(s[a-4])),s[a-1],"object"));break;case 49:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Return(s[a]));break;case 50:this.$=i.addLocationDataFn(o[a],o[a])(new i.Return);break;case 51:this.$=i.addLocationDataFn(o[a],o[a])(new i.Comment(s[a]));break;case 52:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Code(s[a-3],s[a],s[a-1]));break;case 53:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Code([],s[a],s[a-1]));break;case 54:this.$=i.addLocationDataFn(o[a],o[a])("func");break;case 55:this.$=i.addLocationDataFn(o[a],o[a])("boundfunc");break;case 58:case 95:this.$=i.addLocationDataFn(o[a],o[a])([]);break;case 59:case 96:case 128:case 170:this.$=i.addLocationDataFn(o[a],o[a])([s[a]]);break;case 60:case 97:case 129:this.$=i.addLocationDataFn(o[a-2],o[a])(s[a-2].concat(s[a]));break;case 61:case 98:case 130:this.$=i.addLocationDataFn(o[a-3],o[a])(s[a-3].concat(s[a]));break;case 62:case 99:case 132:this.$=i.addLocationDataFn(o[a-5],o[a])(s[a-5].concat(s[a-2]));break;case 63:this.$=i.addLocationDataFn(o[a],o[a])(new i.Param(s[a]));break;case 64:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Param(s[a-1],null,!0));break;case 65:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Param(s[a-2],s[a]));break;case 66:case 135:this.$=i.addLocationDataFn(o[a],o[a])(new i.Expansion);break;case 71:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Splat(s[a-1]));break;case 73:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a-1].add(s[a]));break;case 74:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Value(s[a-1],[].concat(s[a])));break;case 84:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Access(s[a]));break;case 85:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Access(s[a],"soak"));break;case 86:this.$=i.addLocationDataFn(o[a-1],o[a])([i.addLocationDataFn(o[a-1])(new i.Access(new i.Literal("prototype"))),i.addLocationDataFn(o[a])(new i.Access(s[a]))]);break;case 87:this.$=i.addLocationDataFn(o[a-1],o[a])([i.addLocationDataFn(o[a-1])(new i.Access(new i.Literal("prototype"),"soak")),i.addLocationDataFn(o[a])(new i.Access(s[a]))]);break;case 88:this.$=i.addLocationDataFn(o[a],o[a])(new i.Access(new i.Literal("prototype")));break;case 91:this.$=i.addLocationDataFn(o[a-1],o[a])(i.extend(s[a],{soak:!0}));break;case 92:this.$=i.addLocationDataFn(o[a],o[a])(new i.Index(s[a]));break;case 93:this.$=i.addLocationDataFn(o[a],o[a])(new i.Slice(s[a]));break;case 94:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Obj(s[a-2],s[a-3].generated));break;case 100:this.$=i.addLocationDataFn(o[a],o[a])(new i.Class);break;case 101:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Class(null,null,s[a]));break;case 102:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Class(null,s[a]));break;case 103:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Class(null,s[a-1],s[a]));break;case 104:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Class(s[a]));break;case 105:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Class(s[a-1],null,s[a]));break;case 106:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Class(s[a-2],s[a]));break;case 107:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Class(s[a-3],s[a-1],s[a]));break;case 108:case 109:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Call(s[a-2],s[a],s[a-1]));break;case 110:this.$=i.addLocationDataFn(o[a],o[a])(new i.Call("super",[new i.Splat(new i.Literal("arguments"))]));break;case 111:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Call("super",s[a]));break;case 112:this.$=i.addLocationDataFn(o[a],o[a])(!1);break;case 113:this.$=i.addLocationDataFn(o[a],o[a])(!0);break;case 114:this.$=i.addLocationDataFn(o[a-1],o[a])([]);break;case 115:case 131:this.$=i.addLocationDataFn(o[a-3],o[a])(s[a-2]);break;case 116:case 117:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(new i.Literal("this")));break;case 118:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Value(i.addLocationDataFn(o[a-1])(new i.Literal("this")),[i.addLocationDataFn(o[a])(new i.Access(s[a]))],"this"));break;case 119:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Arr([]));break;case 120:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Arr(s[a-2]));break;case 121:this.$=i.addLocationDataFn(o[a],o[a])("inclusive");break;case 122:this.$=i.addLocationDataFn(o[a],o[a])("exclusive");break;case 123:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Range(s[a-3],s[a-1],s[a-2]));break;case 124:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Range(s[a-2],s[a],s[a-1]));break;case 125:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Range(s[a-1],null,s[a]));break;case 126:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Range(null,s[a],s[a-1]));break;case 127:this.$=i.addLocationDataFn(o[a],o[a])(new i.Range(null,null,s[a]));break;case 137:this.$=i.addLocationDataFn(o[a-2],o[a])([].concat(s[a-2],s[a]));break;case 138:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Try(s[a]));break;case 139:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Try(s[a-1],s[a][0],s[a][1]));break;case 140:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Try(s[a-2],null,null,s[a]));break;case 141:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Try(s[a-3],s[a-2][0],s[a-2][1],s[a]));break;case 142:this.$=i.addLocationDataFn(o[a-2],o[a])([s[a-1],s[a]]);break;case 143:this.$=i.addLocationDataFn(o[a-2],o[a])([i.addLocationDataFn(o[a-1])(new i.Value(s[a-1])),s[a]]);break;case 144:this.$=i.addLocationDataFn(o[a-1],o[a])([null,s[a]]);break;case 145:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Throw(s[a]));break;case 147:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Parens(s[a-2]));break;case 148:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(s[a]));break;case 149:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.While(s[a-2],{guard:s[a]}));break;case 150:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(s[a],{invert:!0}));break;case 151:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.While(s[a-2],{invert:!0,guard:s[a]}));break;case 152:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a-1].addBody(s[a]));break;case 153:case 154:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a].addBody(i.addLocationDataFn(o[a-1])(i.Block.wrap([s[a-1]]))));break;case 155:this.$=i.addLocationDataFn(o[a],o[a])(s[a]);break;case 156:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(i.addLocationDataFn(o[a-1])(new i.Literal("true"))).addBody(s[a]));break;case 157:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(i.addLocationDataFn(o[a-1])(new i.Literal("true"))).addBody(i.addLocationDataFn(o[a])(i.Block.wrap([s[a]]))));break;case 158:case 159:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.For(s[a-1],s[a]));break;case 160:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.For(s[a],s[a-1]));break;case 161:this.$=i.addLocationDataFn(o[a-1],o[a])({source:i.addLocationDataFn(o[a])(new i.Value(s[a]))});break;case 162:this.$=i.addLocationDataFn(o[a-3],o[a])({source:i.addLocationDataFn(o[a-2])(new i.Value(s[a-2])),step:s[a]});break;case 163:this.$=i.addLocationDataFn(o[a-1],o[a])(function(){return s[a].own=s[a-1].own,s[a].name=s[a-1][0],s[a].index=s[a-1][1],s[a]}());break;case 164:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a]);break;case 165:this.$=i.addLocationDataFn(o[a-2],o[a])(function(){return s[a].own=!0,s[a]}());break;case 171:this.$=i.addLocationDataFn(o[a-2],o[a])([s[a-2],s[a]]);break;case 172:this.$=i.addLocationDataFn(o[a-1],o[a])({source:s[a]});break;case 173:this.$=i.addLocationDataFn(o[a-1],o[a])({source:s[a],object:!0});break;case 174:this.$=i.addLocationDataFn(o[a-3],o[a])({source:s[a-2],guard:s[a]});break;case 175:this.$=i.addLocationDataFn(o[a-3],o[a])({source:s[a-2],guard:s[a],object:!0});break;case 176:this.$=i.addLocationDataFn(o[a-3],o[a])({source:s[a-2],step:s[a]});break;case 177:this.$=i.addLocationDataFn(o[a-5],o[a])({source:s[a-4],guard:s[a-2],step:s[a]});break;case 178:this.$=i.addLocationDataFn(o[a-5],o[a])({source:s[a-4],step:s[a-2],guard:s[a]});break;case 179:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Switch(s[a-3],s[a-1]));break;case 180:this.$=i.addLocationDataFn(o[a-6],o[a])(new i.Switch(s[a-5],s[a-3],s[a-1]));break;case 181:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Switch(null,s[a-1]));break;case 182:this.$=i.addLocationDataFn(o[a-5],o[a])(new i.Switch(null,s[a-3],s[a-1]));break;case 184:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a-1].concat(s[a]));break;case 185:this.$=i.addLocationDataFn(o[a-2],o[a])([[s[a-1],s[a]]]);break;case 186:this.$=i.addLocationDataFn(o[a-3],o[a])([[s[a-2],s[a-1]]]);break;case 187:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.If(s[a-1],s[a],{type:s[a-2]}));break;case 188:this.$=i.addLocationDataFn(o[a-4],o[a])(s[a-4].addElse(i.addLocationDataFn(o[a-2],o[a])(new i.If(s[a-1],s[a],{type:s[a-2]}))));break;case 190:this.$=i.addLocationDataFn(o[a-2],o[a])(s[a-2].addElse(s[a]));break;case 191:case 192:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.If(s[a],i.addLocationDataFn(o[a-2])(i.Block.wrap([s[a-2]])),{type:s[a-1],statement:!0}));break;case 193:case 194:case 197:case 198:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op(s[a-1],s[a]));break;case 195:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("-",s[a]));break;case 196:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("+",s[a]));break;case 199:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op(s[a-2].concat(s[a-1]),s[a]));break;case 200:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("--",s[a]));break;case 201:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("++",s[a]));break;case 202:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("--",s[a-1],null,!0));break;case 203:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("++",s[a-1],null,!0));break;case 204:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Existence(s[a-1]));break;case 205:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op("+",s[a-2],s[a]));break;case 206:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op("-",s[a-2],s[a]));break;case 207:case 208:case 209:case 210:case 211:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op(s[a-1],s[a-2],s[a]));break;case 212:this.$=i.addLocationDataFn(o[a-2],o[a])(function(){return"!"===s[a-1].charAt(0)?new i.Op(s[a-1].slice(1),s[a-2],s[a]).invert():new i.Op(s[a-1],s[a-2],s[a])}());break;case 213:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Assign(s[a-2],s[a],s[a-1]));break;case 214:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Assign(s[a-4],s[a-1],s[a-3]));break;case 215:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Assign(s[a-3],s[a],s[a-2]));break;case 216:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Extends(s[a-2],s[a]))}},table:[{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{1:[3]},{1:[2,2],6:P},t(U,[2,3]),t(U,[2,6],{118:69,109:89,115:90,110:x,112:S,116:R,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(U,[2,7],{118:69,109:92,115:93,110:x,112:S,116:R,132:Z}),t(et,[2,11],{87:94,68:95,76:101,72:tt,73:nt,74:it,75:rt,77:st,80:ot,90:at,91:ct}),t(et,[2,12],{76:101,87:104,68:105,72:tt,73:nt,74:it,75:rt,77:st,80:ot,90:at,91:ct}),t(et,[2,13]),t(et,[2,14]),t(et,[2,15]),t(et,[2,16]),t(et,[2,17]),t(et,[2,18]),t(et,[2,19]),t(et,[2,20]),t(et,[2,21]),t(et,[2,22]),t(et,[2,8]),t(et,[2,9]),t(et,[2,10]),t(ht,lt,{46:[1,106]}),t(ht,[2,80]),t(ht,[2,81]),t(ht,[2,82]),t(ht,[2,83]),t([1,6,25,26,34,38,55,60,63,72,73,74,75,77,79,80,84,90,92,97,99,108,110,111,112,116,117,132,135,136,141,142,143,144,145,146,147],[2,110],{88:107,91:ut}),t([6,25,55,60],pt,{54:109,61:110,62:111,27:113,50:114,64:115,65:116,28:i,63:dt,82:b,95:ft,96:mt}),{24:119,25:gt},{7:121,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:123,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:124,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:125,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:127,8:126,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,138:[1,128],139:B,140:V},{12:130,13:131,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:132,50:63,64:47,65:48,67:129,69:23,70:24,71:25,82:b,89:w,94:T,95:C,96:E,107:L},{12:130,13:131,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:132,50:63,64:47,65:48,67:133,69:23,70:24,71:25,82:b,89:w,94:T,95:C,96:E,107:L},t(vt,yt,{86:[1,137],139:[1,134],140:[1,135],148:[1,136]}),t(et,[2,189],{127:[1,138]}),{24:139,25:gt},{24:140,25:gt},t(et,[2,155]),{24:141,25:gt},{7:142,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(bt,[2,100],{39:22,69:23,70:24,71:25,64:47,65:48,29:49,35:51,27:62,50:63,31:72,12:130,13:131,45:132,24:144,67:146,25:gt,28:i,30:r,32:s,33:o,36:a,37:c,40:h,41:l,42:u,43:p,44:d,82:b,86:[1,145],89:w,94:T,95:C,96:E,107:L}),{7:147,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,141,142,143,144,145,146,147],[2,50],{12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,9:18,10:19,45:21,39:22,69:23,70:24,71:25,56:28,67:36,130:37,109:39,113:40,115:41,64:47,65:48,29:49,35:51,27:62,50:63,118:69,31:72,8:122,7:148,11:n,28:i,30:r,32:s,33:o,36:a,37:c,40:h,41:l,42:u,43:p,44:d,51:f,52:m,53:g,57:v,58:y,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,114:D,125:A,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V}),t(et,[2,51]),t(vt,[2,77]),t(vt,[2,78]),t(ht,[2,32]),t(ht,[2,33]),t(ht,[2,34]),t(ht,[2,35]),t(ht,[2,36]),t(ht,[2,37]),t(ht,[2,38]),{4:149,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,150],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:151,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:kt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,63:wt,64:47,65:48,66:156,67:36,69:23,70:24,71:25,82:b,85:k,89:w,93:153,94:T,95:C,96:E,97:Tt,100:154,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(ht,[2,116]),t(ht,[2,117],{27:158,28:i}),{25:[2,54]},{25:[2,55]},t(Ct,[2,72]),t(Ct,[2,75]),{7:159,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:160,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:161,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:163,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:162,25:gt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{27:168,28:i,50:169,64:170,65:171,70:164,82:b,95:ft,96:E,120:165,121:[1,166],122:167},{119:172,123:[1,173],124:[1,174]},t([6,25,60,84],Et,{31:72,83:175,47:176,48:177,10:178,27:179,29:180,50:181,28:i,30:r,32:s,33:o,52:m,95:ft}),t(Ft,[2,26]),t(Ft,[2,27]),t(ht,[2,30]),{12:130,13:182,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:132,50:63,64:47,65:48,67:183,69:23,70:24,71:25,82:b,89:w,94:T,95:C,96:E,107:L},t(Nt,[2,25]),t(Ft,[2,28]),{4:184,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(U,[2,5],{7:4,8:5,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,9:18,10:19,45:21,39:22,69:23,70:24,71:25,56:28,67:36,130:37,109:39,113:40,115:41,64:47,65:48,29:49,35:51,27:62,50:63,118:69,31:72,5:185,11:n,28:i,30:r,32:s,33:o,36:a,37:c,40:h,41:l,42:u,43:p,44:d,51:f,52:m,53:g,57:v,58:y,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,110:x,112:S,114:D,116:R,125:A,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V}),t(et,[2,204]),{7:186,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:187,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:188,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:189,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:190,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:191,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:192,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:193,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:194,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(et,[2,154]),t(et,[2,159]),{7:195,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(et,[2,153]),t(et,[2,158]),{88:196,91:ut},t(Ct,[2,73]),{91:[2,113]},{27:197,28:i},{27:198,28:i},t(Ct,[2,88],{27:199,28:i}),{27:200,28:i},t(Ct,[2,89]),{7:202,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,63:Lt,64:47,65:48,67:36,69:23,70:24,71:25,78:201,81:203,82:b,85:k,89:w,94:T,95:C,96:E,98:204,99:xt,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{76:207,77:st,80:ot},{88:208,91:ut},t(Ct,[2,74]),{6:[1,210],7:209,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,211],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(St,[2,111]),{7:214,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:kt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,63:wt,64:47,65:48,66:156,67:36,69:23,70:24,71:25,82:b,85:k,89:w,92:[1,212],93:213,94:T,95:C,96:E,100:154,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t([6,25],Dt,{59:217,55:[1,215],60:Rt}),t(At,[2,59]),t(At,[2,63],{46:[1,219],63:[1,218]}),t(At,[2,66]),t(It,[2,67]),t(It,[2,68]),t(It,[2,69]),t(It,[2,70]),{27:158,28:i},{7:214,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:kt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,63:wt,64:47,65:48,66:156,67:36,69:23,70:24,71:25,82:b,85:k,89:w,93:153,94:T,95:C,96:E,97:Tt,100:154,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(et,[2,53]),{4:221,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[1,220],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,135,136,142,143,144,145,146,147],[2,193],{118:69,109:89,115:90,141:X}),{109:92,110:x,112:S,115:93,116:R,118:69,132:Z},t(_t,[2,194],{118:69,109:89,115:90,141:X,143:Y}),t(_t,[2,195],{118:69,109:89,115:90,141:X,143:Y}),t(_t,[2,196],{118:69,109:89,115:90,141:X,143:Y}),t(et,[2,197],{118:69,109:92,115:93}),t(Ot,[2,198],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{7:222,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(et,[2,200],{72:yt,73:yt,74:yt,75:yt,77:yt,80:yt,90:yt,91:yt}),{68:95,72:tt,73:nt,74:it,75:rt,76:101,77:st,80:ot,87:94,90:at,91:ct},{68:105,72:tt,73:nt,74:it,75:rt,76:101,77:st,80:ot,87:104,90:at,91:ct},t($t,lt),t(et,[2,201],{72:yt,73:yt,74:yt,75:yt,77:yt,80:yt,90:yt,91:yt}),t(et,[2,202]),t(et,[2,203]),{6:[1,225],7:223,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,224],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:226,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{24:227,25:gt,131:[1,228]},t(et,[2,138],{103:229,104:[1,230],105:[1,231]}),t(et,[2,152]),t(et,[2,160]),{25:[1,232],109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},{126:233,128:234,129:jt},t(et,[2,101]),{7:236,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(bt,[2,104],{24:237,25:gt,72:yt,73:yt,74:yt,75:yt,77:yt,80:yt,90:yt,91:yt,86:[1,238]}),t(Ot,[2,145],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Ot,[2,49],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{6:P,108:[1,239]},{4:240,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t([6,25,60,97],Mt,{118:69,109:89,115:90,98:241,63:[1,242],99:xt,110:x,112:S,116:R,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Bt,[2,119]),t([6,25,97],Dt,{59:243,60:Vt}),t(Pt,[2,128]),{7:214,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:kt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,63:wt,64:47,65:48,66:156,67:36,69:23,70:24,71:25,82:b,85:k,89:w,93:245,94:T,95:C,96:E,100:154,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(Pt,[2,134]),t(Pt,[2,135]),t(Nt,[2,118]),{24:246,25:gt,109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},t(Ut,[2,148],{118:69,109:89,115:90,110:x,111:[1,247],112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Ut,[2,150],{118:69,109:89,115:90,110:x,111:[1,248],112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(et,[2,156]),t(Gt,[2,157],{118:69,109:89,115:90,110:x,112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,132,135,136,141,142,143,144,145,146,147],[2,161],{117:[1,249]}),t(Ht,[2,164]),{27:168,28:i,50:169,64:170,65:171,82:b,95:ft,96:mt,120:250,122:167},t(Ht,[2,170],{60:[1,251]}),t(qt,[2,166]),t(qt,[2,167]),t(qt,[2,168]),t(qt,[2,169]),t(et,[2,163]),{7:252,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:253,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t([6,25,84],Dt,{59:254,60:Xt}),t(Wt,[2,96]),t(Wt,[2,42],{49:[1,256]}),t(Wt,[2,45]),t(Yt,[2,46]),t(Yt,[2,47]),t(Yt,[2,48]),{38:[1,257],68:105,72:tt,73:nt,74:it,75:rt,76:101,77:st,80:ot,87:104,90:at,91:ct},t($t,yt),{6:P,34:[1,258]},t(U,[2,4]),t(Kt,[2,205],{118:69,109:89,115:90,141:X,142:W,143:Y}),t(Kt,[2,206],{118:69,109:89,115:90,141:X,142:W,143:Y}),t(_t,[2,207],{118:69,109:89,115:90,141:X,143:Y}),t(_t,[2,208],{118:69,109:89,115:90,141:X,143:Y}),t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,144,145,146,147],[2,209],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y}),t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,145,146],[2,210],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,147:Q}),t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,146],[2,211],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,147:Q}),t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,145,146,147],[2,212],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K}),t(Gt,[2,192],{118:69,109:89,115:90,110:x,112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Gt,[2,191],{118:69,109:89,115:90,110:x,112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(St,[2,108]),t(Ct,[2,84]),t(Ct,[2,85]),t(Ct,[2,86]),t(Ct,[2,87]),{79:[1,259]},{63:Lt,79:[2,92],98:260,99:xt,109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},{79:[2,93]},{7:261,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,79:[2,127],82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(zt,[2,121]),t(zt,Jt),t(Ct,[2,91]),t(St,[2,109]),t(Ot,[2,39],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{7:262,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:263,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(St,[2,114]),t([6,25,92],Dt,{59:264,60:Vt}),t(Pt,Mt,{118:69,109:89,115:90,63:[1,265],110:x,112:S,116:R,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{56:266,57:v,58:y},t(Qt,Zt,{62:111,27:113,50:114,64:115,65:116,61:267,28:i,63:dt,82:b,95:ft,96:mt}),{6:en,25:tn},t(At,[2,64]),{7:270,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(nn,[2,23]),{6:P,26:[1,271]},t(Ot,[2,199],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Ot,[2,213],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{7:272,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:273,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(Ot,[2,216],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(et,[2,190]),{7:274,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(et,[2,139],{104:[1,275]}),{24:276,25:gt},{24:279,25:gt,27:277,28:i,65:278,82:b},{126:280,128:234,129:jt},{26:[1,281],127:[1,282],128:283,129:jt},t(rn,[2,183]),{7:285,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,101:284,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(sn,[2,102],{118:69,109:89,115:90,24:286,25:gt,110:x,112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(et,[2,105]),{7:287,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(ht,[2,146]),{6:P,26:[1,288]},{7:289,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t([11,28,30,32,33,36,37,40,41,42,43,44,51,52,53,57,58,82,85,89,94,95,96,102,106,107,110,112,114,116,125,131,133,134,135,136,137,139,140],Jt,{6:on,25:on,60:on,97:on}),{6:an,25:cn,97:[1,290]},t([6,25,26,92,97],Zt,{12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,9:18,10:19,45:21,39:22,69:23,70:24,71:25,56:28,67:36,130:37,109:39,113:40,115:41,64:47,65:48,29:49,35:51,27:62,50:63,118:69,31:72,8:122,66:156,7:214,100:293,11:n,28:i,30:r,32:s,33:o,36:a,37:c,40:h,41:l,42:u,43:p,44:d,51:f,52:m,53:g,57:v,58:y,63:wt,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,110:x,112:S,114:D,116:R,125:A,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V}),t(Qt,Dt,{59:294,60:Vt}),t(hn,[2,187]),{7:295,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:296,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:297,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(Ht,[2,165]),{27:168,28:i,50:169,64:170,65:171,82:b,95:ft,96:mt,122:298},t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,112,116,132],[2,172],{118:69,109:89,115:90,111:[1,299],117:[1,300],135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(ln,[2,173],{118:69,109:89,115:90,111:[1,301],135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{6:un,25:pn,84:[1,302]},t([6,25,26,84],Zt,{31:72,48:177,10:178,27:179,29:180,50:181,47:305,28:i,30:r,32:s,33:o,52:m,95:ft}),{7:306,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,307],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(ht,[2,31]),t(Ft,[2,29]),t(Ct,[2,90]),{7:308,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,79:[2,125],82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{79:[2,126],109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},t(Ot,[2,40],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{26:[1,309],109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},{6:an,25:cn,92:[1,310]},t(Pt,on),{24:311,25:gt},t(At,[2,60]),{27:113,28:i,50:114,61:312,62:111,63:dt,64:115,65:116,82:b,95:ft,96:mt},t(dn,pt,{61:110,62:111,27:113,50:114,64:115,65:116,54:313,28:i,63:dt,82:b,95:ft,96:mt}),t(At,[2,65],{118:69,109:89,115:90,110:x,112:S,116:R,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(nn,[2,24]),{26:[1,314],109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},t(Ot,[2,215],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{24:315,25:gt,109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},{24:316,25:gt},t(et,[2,140]),{24:317,25:gt},{24:318,25:gt},t(fn,[2,144]),{26:[1,319],127:[1,320],128:283,129:jt},t(et,[2,181]),{24:321,25:gt},t(rn,[2,184]),{24:322,25:gt,60:[1,323]},t(mn,[2,136],{118:69,109:89,115:90,110:x,112:S,116:R,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(et,[2,103]),t(sn,[2,106],{118:69,109:89,115:90,24:324,25:gt,110:x,112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{108:[1,325]},{97:[1,326],109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},t(Bt,[2,120]),{7:214,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,63:wt,64:47,65:48,66:156,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,100:327,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:214,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:kt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,63:wt,64:47,65:48,66:156,67:36,69:23,70:24,71:25,82:b,85:k,89:w,93:328,94:T,95:C,96:E,100:154,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(Pt,[2,129]),{6:an,25:cn,26:[1,329]},t(Gt,[2,149],{118:69,109:89,115:90,110:x,112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Gt,[2,151],{118:69,109:89,115:90,110:x,112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Gt,[2,162],{118:69,109:89,115:90,110:x,112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Ht,[2,171]),{7:330,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:331,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:332,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(Bt,[2,94]),{10:178,27:179,28:i,29:180,30:r,31:72,32:s,33:o,47:333,48:177,50:181,52:m,95:ft},t(dn,Et,{31:72,47:176,48:177,10:178,27:179,29:180,50:181,83:334,28:i,30:r,32:s,33:o,52:m,95:ft}),t(Wt,[2,97]),t(Wt,[2,43],{118:69,109:89,115:90,110:x,112:S,116:R,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{7:335,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{79:[2,124],109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},t(et,[2,41]),t(St,[2,115]),t(et,[2,52]),t(At,[2,61]),t(Qt,Dt,{59:336,60:Rt}),t(et,[2,214]),t(hn,[2,188]),t(et,[2,141]),t(fn,[2,142]),t(fn,[2,143]),t(et,[2,179]),{24:337,25:gt},{26:[1,338]},t(rn,[2,185],{6:[1,339]}),{7:340,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(et,[2,107]),t(ht,[2,147]),t(ht,[2,123]),t(Pt,[2,130]),t(Qt,Dt,{59:341,60:Vt}),t(Pt,[2,131]),t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,132],[2,174],{118:69,109:89,115:90,117:[1,342],135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(ln,[2,176],{118:69,109:89,115:90,111:[1,343],135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Ot,[2,175],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Wt,[2,98]),t(Qt,Dt,{59:344,60:Xt}),{26:[1,345],109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},{6:en,25:tn,26:[1,346]},{26:[1,347]},t(et,[2,182]),t(rn,[2,186]),t(mn,[2,137],{118:69,109:89,115:90,110:x,112:S,116:R,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{6:an,25:cn,26:[1,348]},{7:349,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:350,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{6:un,25:pn,26:[1,351]},t(Wt,[2,44]),t(At,[2,62]),t(et,[2,180]),t(Pt,[2,132]),t(Ot,[2,177],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Ot,[2,178],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Wt,[2,99])],defaultActions:{60:[2,54],61:[2,55],96:[2,113],203:[2,93]},parseError:function(e,t){if(!t.recoverable)throw Error(e);
+this.trace(e)},parse:function(e){function t(){var e;return e=f.lex()||p,"number"!=typeof e&&(e=n.symbols_[e]||e),e}var n=this,i=[0],r=[null],s=[],o=this.table,a="",c=0,h=0,l=0,u=2,p=1,d=s.slice.call(arguments,1),f=Object.create(this.lexer),m={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(m.yy[g]=this.yy[g]);f.setInput(e,m.yy),m.yy.lexer=f,m.yy.parser=this,f.yylloc===void 0&&(f.yylloc={});var v=f.yylloc;s.push(v);var y=f.options&&f.options.ranges;this.parseError="function"==typeof m.yy.parseError?m.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,k,w,T,C,E,F,N,L,x={};;){if(w=i[i.length-1],this.defaultActions[w]?T=this.defaultActions[w]:((null===b||b===void 0)&&(b=t()),T=o[w]&&o[w][b]),T===void 0||!T.length||!T[0]){var S="";L=[];for(E in o[w])this.terminals_[E]&&E>u&&L.push("'"+this.terminals_[E]+"'");S=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+L.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==p?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(S,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:v,expected:L})}if(T[0]instanceof Array&&T.length>1)throw Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),r.push(f.yytext),s.push(f.yylloc),i.push(T[1]),b=null,k?(b=k,k=null):(h=f.yyleng,a=f.yytext,c=f.yylineno,v=f.yylloc,l>0&&l--);break;case 2:if(F=this.productions_[T[1]][1],x.$=r[r.length-F],x._$={first_line:s[s.length-(F||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(F||1)].first_column,last_column:s[s.length-1].last_column},y&&(x._$.range=[s[s.length-(F||1)].range[0],s[s.length-1].range[1]]),C=this.performAction.apply(x,[a,h,c,m.yy,T[1],r,s].concat(d)),C!==void 0)return C;F&&(i=i.slice(0,2*-1*F),r=r.slice(0,-1*F),s=s.slice(0,-1*F)),i.push(this.productions_[T[1]][0]),r.push(x.$),s.push(x._$),N=o[i[i.length-2]][i[i.length-1]],i.push(N);break;case 3:return!0}}return!0}};return e.prototype=gn,gn.Parser=e,new e}();return _dereq_!==void 0&&e!==void 0&&(e.parser=n,e.Parser=n.Parser,e.parse=function(){return n.parse.apply(n,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var n=_dereq_("fs").readFileSync(_dereq_("path").normalize(t[1]),"utf8");return e.parser.parse(n)},t!==void 0&&_dereq_.main===t&&e.main(process.argv.slice(1))),t.exports}(),_dereq_["./scope"]=function(){var e={},t={exports:e};return function(){var t,n=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};e.Scope=t=function(){function e(e,t,n,i){var r,s;this.parent=e,this.expressions=t,this.method=n,this.referencedVars=i,this.variables=[{name:"arguments",type:"arguments"}],this.positions={},this.parent||(this.utilities={}),this.root=null!=(r=null!=(s=this.parent)?s.root:void 0)?r:this}return e.prototype.add=function(e,t,n){return this.shared&&!n?this.parent.add(e,t,n):Object.prototype.hasOwnProperty.call(this.positions,e)?this.variables[this.positions[e]].type=t:this.positions[e]=this.variables.push({name:e,type:t})-1},e.prototype.namedMethod=function(){var e;return(null!=(e=this.method)?e.name:void 0)||!this.parent?this.method:this.parent.namedMethod()},e.prototype.find=function(e){return this.check(e)?!0:(this.add(e,"var"),!1)},e.prototype.parameter=function(e){return this.shared&&this.parent.check(e,!0)?void 0:this.add(e,"param")},e.prototype.check=function(e){var t;return!!(this.type(e)||(null!=(t=this.parent)?t.check(e):void 0))},e.prototype.temporary=function(e,t,n){return null==n&&(n=!1),n?(t+parseInt(e,36)).toString(36).replace(/\d/g,"a"):e+(t||"")},e.prototype.type=function(e){var t,n,i,r;for(i=this.variables,t=0,n=i.length;n>t;t++)if(r=i[t],r.name===e)return r.type;return null},e.prototype.freeVariable=function(e,t){var i,r,s;for(null==t&&(t={}),i=0;;){if(s=this.temporary(e,i,t.single),!(this.check(s)||n.call(this.root.referencedVars,s)>=0))break;i++}return(null!=(r=t.reserve)?r:!0)&&this.add(s,"var",!0),s},e.prototype.assign=function(e,t){return this.add(e,{value:t,assigned:!0},!0),this.hasAssignments=!0},e.prototype.hasDeclarations=function(){return!!this.declaredVariables().length},e.prototype.declaredVariables=function(){var e;return function(){var t,n,i,r;for(i=this.variables,r=[],t=0,n=i.length;n>t;t++)e=i[t],"var"===e.type&&r.push(e.name);return r}.call(this).sort()},e.prototype.assignedVariables=function(){var e,t,n,i,r;for(n=this.variables,i=[],e=0,t=n.length;t>e;e++)r=n[e],r.type.assigned&&i.push(r.name+" = "+r.type.value);return i},e}()}.call(this),t.exports}(),_dereq_["./nodes"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,g,v,y,b,k,w,T,C,E,F,N,L,x,S,D,R,A,I,_,O,$,j,M,B,V,P,U,G,H,q,X,W,Y,K,z,J,Q,Z,et,tt,nt,it,rt,st,ot,at,ct,ht,lt,ut,pt,dt,ft,mt,gt,vt,yt,bt,kt=function(e,t){function n(){this.constructor=e}for(var i in t)wt.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},wt={}.hasOwnProperty,Tt=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1},Ct=[].slice;Error.stackTraceLimit=1/0,P=_dereq_("./scope").Scope,dt=_dereq_("./lexer"),$=dt.RESERVED,V=dt.STRICT_PROSCRIBED,ft=_dereq_("./helpers"),et=ft.compact,rt=ft.flatten,it=ft.extend,lt=ft.merge,tt=ft.del,gt=ft.starts,nt=ft.ends,mt=ft.some,Z=ft.addLocationDataFn,ht=ft.locationDataToString,vt=ft.throwSyntaxError,e.extend=it,e.addLocationDataFn=Z,Q=function(){return!0},D=function(){return!1},X=function(){return this},S=function(){return this.negated=!this.negated,this},e.CodeFragment=h=function(){function e(e,t){var n;this.code=""+t,this.locationData=null!=e?e.locationData:void 0,this.type=(null!=e?null!=(n=e.constructor)?n.name:void 0:void 0)||"unknown"}return e.prototype.toString=function(){return""+this.code+(this.locationData?": "+ht(this.locationData):"")},e}(),st=function(e){var t;return function(){var n,i,r;for(r=[],n=0,i=e.length;i>n;n++)t=e[n],r.push(t.code);return r}().join("")},e.Base=r=function(){function e(){}return e.prototype.compile=function(e,t){return st(this.compileToFragments(e,t))},e.prototype.compileToFragments=function(e,t){var n;return e=it({},e),t&&(e.level=t),n=this.unfoldSoak(e)||this,n.tab=e.indent,e.level!==L&&n.isStatement(e)?n.compileClosure(e):n.compileNode(e)},e.prototype.compileClosure=function(e){var n,i,r,a,h,l,u;return(a=this.jumps())&&a.error("cannot use a pure statement in an expression"),e.sharedScope=!0,r=new c([],s.wrap([this])),n=[],((i=this.contains(at))||this.contains(ct))&&(n=[new x("this")],i?(h="apply",n.push(new x("arguments"))):h="call",r=new z(r,[new t(new x(h))])),l=new o(r,n).compileNode(e),(r.isGenerator||(null!=(u=r.base)?u.isGenerator:void 0))&&(l.unshift(this.makeCode("(yield* ")),l.push(this.makeCode(")"))),l},e.prototype.cache=function(e,t,n){var r,s,o;return r=null!=n?n(this):this.isComplex(),r?(s=new x(e.scope.freeVariable("ref")),o=new i(s,this),t?[o.compileToFragments(e,t),[this.makeCode(s.value)]]:[o,s]):(s=t?this.compileToFragments(e,t):this,[s,s])},e.prototype.cacheToCodeFragments=function(e){return[st(e[0]),st(e[1])]},e.prototype.makeReturn=function(e){var t;return t=this.unwrapAll(),e?new o(new x(e+".push"),[t]):new M(t)},e.prototype.contains=function(e){var t;return t=void 0,this.traverseChildren(!1,function(n){return e(n)?(t=n,!1):void 0}),t},e.prototype.lastNonComment=function(e){var t;for(t=e.length;t--;)if(!(e[t]instanceof l))return e[t];return null},e.prototype.toString=function(e,t){var n;return null==e&&(e=""),null==t&&(t=this.constructor.name),n="\n"+e+t,this.soak&&(n+="?"),this.eachChild(function(t){return n+=t.toString(e+q)}),n},e.prototype.eachChild=function(e){var t,n,i,r,s,o,a,c;if(!this.children)return this;for(a=this.children,i=0,s=a.length;s>i;i++)if(t=a[i],this[t])for(c=rt([this[t]]),r=0,o=c.length;o>r;r++)if(n=c[r],e(n)===!1)return this;return this},e.prototype.traverseChildren=function(e,t){return this.eachChild(function(n){var i;return i=t(n),i!==!1?n.traverseChildren(e,t):void 0})},e.prototype.invert=function(){return new I("!",this)},e.prototype.unwrapAll=function(){var e;for(e=this;e!==(e=e.unwrap()););return e},e.prototype.children=[],e.prototype.isStatement=D,e.prototype.jumps=D,e.prototype.isComplex=Q,e.prototype.isChainable=D,e.prototype.isAssignable=D,e.prototype.unwrap=X,e.prototype.unfoldSoak=D,e.prototype.assigns=D,e.prototype.updateLocationDataIfMissing=function(e){return this.locationData?this:(this.locationData=e,this.eachChild(function(t){return t.updateLocationDataIfMissing(e)}))},e.prototype.error=function(e){return vt(e,this.locationData)},e.prototype.makeCode=function(e){return new h(this,e)},e.prototype.wrapInBraces=function(e){return[].concat(this.makeCode("("),e,this.makeCode(")"))},e.prototype.joinFragmentArrays=function(e,t){var n,i,r,s,o;for(n=[],r=s=0,o=e.length;o>s;r=++s)i=e[r],r&&n.push(this.makeCode(t)),n=n.concat(i);return n},e}(),e.Block=s=function(e){function t(e){this.expressions=et(rt(e||[]))}return kt(t,e),t.prototype.children=["expressions"],t.prototype.push=function(e){return this.expressions.push(e),this},t.prototype.pop=function(){return this.expressions.pop()},t.prototype.unshift=function(e){return this.expressions.unshift(e),this},t.prototype.unwrap=function(){return 1===this.expressions.length?this.expressions[0]:this},t.prototype.isEmpty=function(){return!this.expressions.length},t.prototype.isStatement=function(e){var t,n,i,r;for(r=this.expressions,n=0,i=r.length;i>n;n++)if(t=r[n],t.isStatement(e))return!0;return!1},t.prototype.jumps=function(e){var t,n,i,r,s;for(s=this.expressions,n=0,r=s.length;r>n;n++)if(t=s[n],i=t.jumps(e))return i},t.prototype.makeReturn=function(e){var t,n;for(n=this.expressions.length;n--;)if(t=this.expressions[n],!(t instanceof l)){this.expressions[n]=t.makeReturn(e),t instanceof M&&!t.expression&&this.expressions.splice(n,1);break}return this},t.prototype.compileToFragments=function(e,n){return null==e&&(e={}),e.scope?t.__super__.compileToFragments.call(this,e,n):this.compileRoot(e)},t.prototype.compileNode=function(e){var n,i,r,s,o,a,c,h,l;for(this.tab=e.indent,l=e.level===L,i=[],h=this.expressions,s=o=0,a=h.length;a>o;s=++o)c=h[s],c=c.unwrapAll(),c=c.unfoldSoak(e)||c,c instanceof t?i.push(c.compileNode(e)):l?(c.front=!0,r=c.compileToFragments(e),c.isStatement(e)||(r.unshift(this.makeCode(""+this.tab)),r.push(this.makeCode(";"))),i.push(r)):i.push(c.compileToFragments(e,E));return l?this.spaced?[].concat(this.joinFragmentArrays(i,"\n\n"),this.makeCode("\n")):this.joinFragmentArrays(i,"\n"):(n=i.length?this.joinFragmentArrays(i,", "):[this.makeCode("void 0")],i.length>1&&e.level>=E?this.wrapInBraces(n):n)},t.prototype.compileRoot=function(e){var t,n,i,r,s,o,a,c,h,u,p;for(e.indent=e.bare?"":q,e.level=L,this.spaced=!0,e.scope=new P(null,this,null,null!=(h=e.referencedVars)?h:[]),u=e.locals||[],r=0,s=u.length;s>r;r++)o=u[r],e.scope.parameter(o);return a=[],e.bare||(c=function(){var e,n,r,s;for(r=this.expressions,s=[],i=e=0,n=r.length;n>e&&(t=r[i],t.unwrap()instanceof l);i=++e)s.push(t);return s}.call(this),p=this.expressions.slice(c.length),this.expressions=c,c.length&&(a=this.compileNode(lt(e,{indent:""})),a.push(this.makeCode("\n"))),this.expressions=p),n=this.compileWithDeclarations(e),e.bare?n:[].concat(a,this.makeCode("(function() {\n"),n,this.makeCode("\n}).call(this);\n"))},t.prototype.compileWithDeclarations=function(e){var t,n,i,r,s,o,a,c,h,u,p,d,f,m;for(r=[],c=[],h=this.expressions,s=o=0,a=h.length;a>o&&(i=h[s],i=i.unwrap(),i instanceof l||i instanceof x);s=++o);return e=lt(e,{level:L}),s&&(d=this.expressions.splice(s,9e9),u=[this.spaced,!1],m=u[0],this.spaced=u[1],p=[this.compileNode(e),m],r=p[0],this.spaced=p[1],this.expressions=d),c=this.compileNode(e),f=e.scope,f.expressions===this&&(n=e.scope.hasDeclarations(),t=f.hasAssignments,n||t?(s&&r.push(this.makeCode("\n")),r.push(this.makeCode(this.tab+"var ")),n&&r.push(this.makeCode(f.declaredVariables().join(", "))),t&&(n&&r.push(this.makeCode(",\n"+(this.tab+q))),r.push(this.makeCode(f.assignedVariables().join(",\n"+(this.tab+q))))),r.push(this.makeCode(";\n"+(this.spaced?"\n":"")))):r.length&&c.length&&r.push(this.makeCode("\n"))),r.concat(c)},t.wrap=function(e){return 1===e.length&&e[0]instanceof t?e[0]:new t(e)},t}(r),e.Literal=x=function(e){function t(e){this.value=e}return kt(t,e),t.prototype.makeReturn=function(){return this.isStatement()?this:t.__super__.makeReturn.apply(this,arguments)},t.prototype.isAssignable=function(){return g.test(this.value)},t.prototype.isStatement=function(){var e;return"break"===(e=this.value)||"continue"===e||"debugger"===e},t.prototype.isComplex=D,t.prototype.assigns=function(e){return e===this.value},t.prototype.jumps=function(e){return"break"!==this.value||(null!=e?e.loop:void 0)||(null!=e?e.block:void 0)?"continue"!==this.value||(null!=e?e.loop:void 0)?void 0:this:this},t.prototype.compileNode=function(e){var t,n,i;return n="this"===this.value?(null!=(i=e.scope.method)?i.bound:void 0)?e.scope.method.context:this.value:this.value.reserved?'"'+this.value+'"':this.value,t=this.isStatement()?""+this.tab+n+";":n,[this.makeCode(t)]},t.prototype.toString=function(){return' "'+this.value+'"'},t}(r),e.Undefined=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return kt(t,e),t.prototype.isAssignable=D,t.prototype.isComplex=D,t.prototype.compileNode=function(e){return[this.makeCode(e.level>=T?"(void 0)":"void 0")]},t}(r),e.Null=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return kt(t,e),t.prototype.isAssignable=D,t.prototype.isComplex=D,t.prototype.compileNode=function(){return[this.makeCode("null")]},t}(r),e.Bool=function(e){function t(e){this.val=e}return kt(t,e),t.prototype.isAssignable=D,t.prototype.isComplex=D,t.prototype.compileNode=function(){return[this.makeCode(this.val)]},t}(r),e.Return=M=function(e){function t(e){this.expression=e}return kt(t,e),t.prototype.children=["expression"],t.prototype.isStatement=Q,t.prototype.makeReturn=X,t.prototype.jumps=X,t.prototype.compileToFragments=function(e,n){var i,r;return i=null!=(r=this.expression)?r.makeReturn():void 0,!i||i instanceof t?t.__super__.compileToFragments.call(this,e,n):i.compileToFragments(e,n)},t.prototype.compileNode=function(e){var t,n,i;return t=[],n=null!=(i=this.expression)?"function"==typeof i.isYieldReturn?i.isYieldReturn():void 0:void 0,n||t.push(this.makeCode(this.tab+("return"+(this.expression?" ":"")))),this.expression&&(t=t.concat(this.expression.compileToFragments(e,N))),n||t.push(this.makeCode(";")),t},t}(r),e.Value=z=function(e){function t(e,n,i){return!n&&e instanceof t?e:(this.base=e,this.properties=n||[],i&&(this[i]=!0),this)}return kt(t,e),t.prototype.children=["base","properties"],t.prototype.add=function(e){return this.properties=this.properties.concat(e),this},t.prototype.hasProperties=function(){return!!this.properties.length},t.prototype.bareLiteral=function(e){return!this.properties.length&&this.base instanceof e},t.prototype.isArray=function(){return this.bareLiteral(n)},t.prototype.isRange=function(){return this.bareLiteral(j)},t.prototype.isComplex=function(){return this.hasProperties()||this.base.isComplex()},t.prototype.isAssignable=function(){return this.hasProperties()||this.base.isAssignable()},t.prototype.isSimpleNumber=function(){return this.bareLiteral(x)&&B.test(this.base.value)},t.prototype.isString=function(){return this.bareLiteral(x)&&y.test(this.base.value)},t.prototype.isRegex=function(){return this.bareLiteral(x)&&v.test(this.base.value)},t.prototype.isAtomic=function(){var e,t,n,i;for(i=this.properties.concat(this.base),e=0,t=i.length;t>e;e++)if(n=i[e],n.soak||n instanceof o)return!1;return!0},t.prototype.isNotCallable=function(){return this.isSimpleNumber()||this.isString()||this.isRegex()||this.isArray()||this.isRange()||this.isSplice()||this.isObject()},t.prototype.isStatement=function(e){return!this.properties.length&&this.base.isStatement(e)},t.prototype.assigns=function(e){return!this.properties.length&&this.base.assigns(e)},t.prototype.jumps=function(e){return!this.properties.length&&this.base.jumps(e)},t.prototype.isObject=function(e){return this.properties.length?!1:this.base instanceof A&&(!e||this.base.generated)},t.prototype.isSplice=function(){var e,t;return t=this.properties,e=t[t.length-1],e instanceof U},t.prototype.looksStatic=function(e){var t;return this.base.value===e&&1===this.properties.length&&"prototype"!==(null!=(t=this.properties[0].name)?t.value:void 0)},t.prototype.unwrap=function(){return this.properties.length?this:this.base},t.prototype.cacheReference=function(e){var n,r,s,o,a;return a=this.properties,s=a[a.length-1],2>this.properties.length&&!this.base.isComplex()&&!(null!=s?s.isComplex():void 0)?[this,this]:(n=new t(this.base,this.properties.slice(0,-1)),n.isComplex()&&(r=new x(e.scope.freeVariable("base")),n=new t(new O(new i(r,n)))),s?(s.isComplex()&&(o=new x(e.scope.freeVariable("name")),s=new w(new i(o,s.index)),o=new w(o)),[n.add(s),new t(r||n.base,[o||s])]):[n,r])},t.prototype.compileNode=function(e){var t,n,i,r,s;for(this.base.front=this.front,s=this.properties,t=this.base.compileToFragments(e,s.length?T:null),(this.base instanceof O||s.length)&&B.test(st(t))&&t.push(this.makeCode(".")),n=0,i=s.length;i>n;n++)r=s[n],t.push.apply(t,r.compileToFragments(e));return t},t.prototype.unfoldSoak=function(e){return null!=this.unfoldedSoak?this.unfoldedSoak:this.unfoldedSoak=function(n){return function(){var r,s,o,a,c,h,l,p,d,f;if(o=n.base.unfoldSoak(e))return(p=o.body.properties).push.apply(p,n.properties),o;for(d=n.properties,s=a=0,c=d.length;c>a;s=++a)if(h=d[s],h.soak)return h.soak=!1,r=new t(n.base,n.properties.slice(0,s)),f=new t(n.base,n.properties.slice(s)),r.isComplex()&&(l=new x(e.scope.freeVariable("ref")),r=new O(new i(l,r)),f.base=l),new b(new u(r),f,{soak:!0});return!1}}(this)()},t}(r),e.Comment=l=function(e){function t(e){this.comment=e}return kt(t,e),t.prototype.isStatement=Q,t.prototype.makeReturn=X,t.prototype.compileNode=function(e,t){var n,i;return i=this.comment.replace(/^(\s*)#(?=\s)/gm,"$1 *"),n="/*"+ut(i,this.tab)+(Tt.call(i,"\n")>=0?"\n"+this.tab:"")+" */",(t||e.level)===L&&(n=e.indent+n),[this.makeCode("\n"),this.makeCode(n)]},t}(r),e.Call=o=function(e){function n(e,t,n){this.args=null!=t?t:[],this.soak=n,this.isNew=!1,this.isSuper="super"===e,this.variable=this.isSuper?null:e,e instanceof z&&e.isNotCallable()&&e.error("literal is not a function")}return kt(n,e),n.prototype.children=["variable","args"],n.prototype.newInstance=function(){var e,t;return e=(null!=(t=this.variable)?t.base:void 0)||this.variable,e instanceof n&&!e.isNew?e.newInstance():this.isNew=!0,this},n.prototype.superReference=function(e){var n,r,s,o,a,c,h,l;return a=e.scope.namedMethod(),(null!=a?a.klass:void 0)?(o=a.klass,c=a.name,l=a.variable,o.isComplex()&&(s=new x(e.scope.parent.freeVariable("base")),r=new z(new O(new i(s,o))),l.base=r,l.properties.splice(0,o.properties.length)),(c.isComplex()||c instanceof w&&c.index.isAssignable())&&(h=new x(e.scope.parent.freeVariable("name")),c=new w(new i(h,c.index)),l.properties.pop(),l.properties.push(c)),n=[new t(new x("__super__"))],a["static"]&&n.push(new t(new x("constructor"))),n.push(null!=h?new w(h):c),new z(null!=s?s:o,n).compile(e)):(null!=a?a.ctor:void 0)?a.name+".__super__.constructor":this.error("cannot call super outside of an instance method.")},n.prototype.superThis=function(e){var t;return t=e.scope.method,t&&!t.klass&&t.context||"this"},n.prototype.unfoldSoak=function(e){var t,i,r,s,o,a,c,h,l;if(this.soak){if(this.variable){if(i=yt(e,this,"variable"))return i;c=new z(this.variable).cacheReference(e),s=c[0],l=c[1]}else s=new x(this.superReference(e)),l=new z(s);return l=new n(l,this.args),l.isNew=this.isNew,s=new x("typeof "+s.compile(e)+' === "function"'),new b(s,new z(l),{soak:!0})}for(t=this,a=[];;)if(t.variable instanceof n)a.push(t),t=t.variable;else{if(!(t.variable instanceof z))break;if(a.push(t),!((t=t.variable.base)instanceof n))break}for(h=a.reverse(),r=0,o=h.length;o>r;r++)t=h[r],i&&(t.variable instanceof n?t.variable=i:t.variable.base=i),i=yt(e,t,"variable");return i},n.prototype.compileNode=function(e){var t,n,i,r,s,o,a,c,h,l;if(null!=(h=this.variable)&&(h.front=this.front),r=G.compileSplattedArray(e,this.args,!0),r.length)return this.compileSplat(e,r);for(i=[],l=this.args,n=o=0,a=l.length;a>o;n=++o)t=l[n],n&&i.push(this.makeCode(", ")),i.push.apply(i,t.compileToFragments(e,E));return s=[],this.isSuper?(c=this.superReference(e)+(".call("+this.superThis(e)),i.length&&(c+=", "),s.push(this.makeCode(c))):(this.isNew&&s.push(this.makeCode("new ")),s.push.apply(s,this.variable.compileToFragments(e,T)),s.push(this.makeCode("("))),s.push.apply(s,i),s.push(this.makeCode(")")),s},n.prototype.compileSplat=function(e,t){var n,i,r,s,o,a;return this.isSuper?[].concat(this.makeCode(this.superReference(e)+".apply("+this.superThis(e)+", "),t,this.makeCode(")")):this.isNew?(s=this.tab+q,[].concat(this.makeCode("(function(func, args, ctor) {\n"+s+"ctor.prototype = func.prototype;\n"+s+"var child = new ctor, result = func.apply(child, args);\n"+s+"return Object(result) === result ? result : child;\n"+this.tab+"})("),this.variable.compileToFragments(e,E),this.makeCode(", "),t,this.makeCode(", function(){})"))):(n=[],i=new z(this.variable),(o=i.properties.pop())&&i.isComplex()?(a=e.scope.freeVariable("ref"),n=n.concat(this.makeCode("("+a+" = "),i.compileToFragments(e,E),this.makeCode(")"),o.compileToFragments(e))):(r=i.compileToFragments(e,T),B.test(st(r))&&(r=this.wrapInBraces(r)),o?(a=st(r),r.push.apply(r,o.compileToFragments(e))):a="null",n=n.concat(r)),n=n.concat(this.makeCode(".apply("+a+", "),t,this.makeCode(")")))},n}(r),e.Extends=d=function(e){function t(e,t){this.child=e,this.parent=t}return kt(t,e),t.prototype.children=["child","parent"],t.prototype.compileToFragments=function(e){return new o(new z(new x(bt("extend",e))),[this.child,this.parent]).compileToFragments(e)},t}(r),e.Access=t=function(e){function t(e,t){this.name=e,this.name.asKey=!0,this.soak="soak"===t}return kt(t,e),t.prototype.children=["name"],t.prototype.compileToFragments=function(e){var t;return t=this.name.compileToFragments(e),g.test(st(t))?t.unshift(this.makeCode(".")):(t.unshift(this.makeCode("[")),t.push(this.makeCode("]"))),t},t.prototype.isComplex=D,t}(r),e.Index=w=function(e){function t(e){this.index=e}return kt(t,e),t.prototype.children=["index"],t.prototype.compileToFragments=function(e){return[].concat(this.makeCode("["),this.index.compileToFragments(e,N),this.makeCode("]"))},t.prototype.isComplex=function(){return this.index.isComplex()},t}(r),e.Range=j=function(e){function t(e,t,n){this.from=e,this.to=t,this.exclusive="exclusive"===n,this.equals=this.exclusive?"":"="}return kt(t,e),t.prototype.children=["from","to"],t.prototype.compileVariables=function(e){var t,n,i,r,s,o;return e=lt(e,{top:!0}),t=tt(e,"isComplex"),n=this.cacheToCodeFragments(this.from.cache(e,E,t)),this.fromC=n[0],this.fromVar=n[1],i=this.cacheToCodeFragments(this.to.cache(e,E,t)),this.toC=i[0],this.toVar=i[1],(o=tt(e,"step"))&&(r=this.cacheToCodeFragments(o.cache(e,E,t)),this.step=r[0],this.stepVar=r[1]),s=[this.fromVar.match(R),this.toVar.match(R)],this.fromNum=s[0],this.toNum=s[1],this.stepVar?this.stepNum=this.stepVar.match(R):void 0},t.prototype.compileNode=function(e){var t,n,i,r,s,o,a,c,h,l,u,p,d,f;return this.fromVar||this.compileVariables(e),e.index?(a=this.fromNum&&this.toNum,s=tt(e,"index"),o=tt(e,"name"),h=o&&o!==s,f=s+" = "+this.fromC,this.toC!==this.toVar&&(f+=", "+this.toC),this.step!==this.stepVar&&(f+=", "+this.step),l=[s+" <"+this.equals,s+" >"+this.equals],c=l[0],r=l[1],n=this.stepNum?pt(this.stepNum[0])>0?c+" "+this.toVar:r+" "+this.toVar:a?(u=[pt(this.fromNum[0]),pt(this.toNum[0])],i=u[0],d=u[1],u,d>=i?c+" "+d:r+" "+d):(t=this.stepVar?this.stepVar+" > 0":this.fromVar+" <= "+this.toVar,t+" ? "+c+" "+this.toVar+" : "+r+" "+this.toVar),p=this.stepVar?s+" += "+this.stepVar:a?h?d>=i?"++"+s:"--"+s:d>=i?s+"++":s+"--":h?t+" ? ++"+s+" : --"+s:t+" ? "+s+"++ : "+s+"--",h&&(f=o+" = "+f),h&&(p=o+" = "+p),[this.makeCode(f+"; "+n+"; "+p)]):this.compileArray(e)},t.prototype.compileArray=function(e){var t,n,i,r,s,o,a,c,h,l,u,p,d;return this.fromNum&&this.toNum&&20>=Math.abs(this.fromNum-this.toNum)?(h=function(){p=[];for(var e=l=+this.fromNum,t=+this.toNum;t>=l?t>=e:e>=t;t>=l?e++:e--)p.push(e);return p}.apply(this),this.exclusive&&h.pop(),[this.makeCode("["+h.join(", ")+"]")]):(o=this.tab+q,s=e.scope.freeVariable("i",{single:!0}),u=e.scope.freeVariable("results"),c="\n"+o+u+" = [];",this.fromNum&&this.toNum?(e.index=s,n=st(this.compileNode(e))):(d=s+" = "+this.fromC+(this.toC!==this.toVar?", "+this.toC:""),i=this.fromVar+" <= "+this.toVar,n="var "+d+"; "+i+" ? "+s+" <"+this.equals+" "+this.toVar+" : "+s+" >"+this.equals+" "+this.toVar+"; "+i+" ? "+s+"++ : "+s+"--"),a="{ "+u+".push("+s+"); }\n"+o+"return "+u+";\n"+e.indent,r=function(e){return null!=e?e.contains(at):void 0},(r(this.from)||r(this.to))&&(t=", arguments"),[this.makeCode("(function() {"+c+"\n"+o+"for ("+n+")"+a+"}).apply(this"+(null!=t?t:"")+")")])},t}(r),e.Slice=U=function(e){function t(e){this.range=e,t.__super__.constructor.call(this)}return kt(t,e),t.prototype.children=["range"],t.prototype.compileNode=function(e){var t,n,i,r,s,o,a;return s=this.range,o=s.to,i=s.from,r=i&&i.compileToFragments(e,N)||[this.makeCode("0")],o&&(t=o.compileToFragments(e,N),n=st(t),(this.range.exclusive||-1!==+n)&&(a=", "+(this.range.exclusive?n:B.test(n)?""+(+n+1):(t=o.compileToFragments(e,T),"+"+st(t)+" + 1 || 9e9")))),[this.makeCode(".slice("+st(r)+(a||"")+")")]},t}(r),e.Obj=A=function(e){function n(e,t){this.generated=null!=t?t:!1,this.objects=this.properties=e||[]}return kt(n,e),n.prototype.children=["properties"],n.prototype.compileNode=function(e){var n,r,s,o,a,c,h,u,p,d,f,m,g,v,y,b,k,w,T,C,E;if(T=this.properties,this.generated)for(h=0,g=T.length;g>h;h++)b=T[h],b instanceof z&&b.error("cannot have an implicit value in an implicit object");for(r=p=0,v=T.length;v>p&&(w=T[r],!((w.variable||w).base instanceof O));r=++p);for(s=T.length>r,a=e.indent+=q,m=this.lastNonComment(this.properties),n=[],s&&(k=e.scope.freeVariable("obj"),n.push(this.makeCode("(\n"+a+k+" = "))),n.push(this.makeCode("{"+(0===T.length||0===r?"}":"\n"))),o=f=0,y=T.length;y>f;o=++f)w=T[o],o===r&&(0!==o&&n.push(this.makeCode("\n"+a+"}")),n.push(this.makeCode(",\n"))),u=o===T.length-1||o===r-1?"":w===m||w instanceof l?"\n":",\n",c=w instanceof l?"":a,s&&r>o&&(c+=q),w instanceof i&&w.variable instanceof z&&w.variable.hasProperties()&&w.variable.error("invalid object key"),w instanceof z&&w["this"]&&(w=new i(w.properties[0].name,w,"object")),w instanceof l||(r>o?(w instanceof i||(w=new i(w,w,"object")),(w.variable.base||w.variable).asKey=!0):(w instanceof i?(d=w.variable,E=w.value):(C=w.base.cache(e),d=C[0],E=C[1]),w=new i(new z(new x(k),[new t(d)]),E))),c&&n.push(this.makeCode(c)),n.push.apply(n,w.compileToFragments(e,L)),u&&n.push(this.makeCode(u));return s?n.push(this.makeCode(",\n"+a+k+"\n"+this.tab+")")):0!==T.length&&n.push(this.makeCode("\n"+this.tab+"}")),this.front&&!s?this.wrapInBraces(n):n},n.prototype.assigns=function(e){var t,n,i,r;for(r=this.properties,t=0,n=r.length;n>t;t++)if(i=r[t],i.assigns(e))return!0;return!1},n}(r),e.Arr=n=function(e){function t(e){this.objects=e||[]}return kt(t,e),t.prototype.children=["objects"],t.prototype.compileNode=function(e){var t,n,i,r,s,o,a;if(!this.objects.length)return[this.makeCode("[]")];if(e.indent+=q,t=G.compileSplattedArray(e,this.objects),t.length)return t;for(t=[],n=function(){var t,n,i,r;for(i=this.objects,r=[],t=0,n=i.length;n>t;t++)a=i[t],r.push(a.compileToFragments(e,E));return r}.call(this),r=s=0,o=n.length;o>s;r=++s)i=n[r],r&&t.push(this.makeCode(", ")),t.push.apply(t,i);return st(t).indexOf("\n")>=0?(t.unshift(this.makeCode("[\n"+e.indent)),t.push(this.makeCode("\n"+this.tab+"]"))):(t.unshift(this.makeCode("[")),t.push(this.makeCode("]"))),t},t.prototype.assigns=function(e){var t,n,i,r;for(r=this.objects,t=0,n=r.length;n>t;t++)if(i=r[t],i.assigns(e))return!0;return!1},t}(r),e.Class=a=function(e){function n(e,t,n){this.variable=e,this.parent=t,this.body=null!=n?n:new s,this.boundFuncs=[],this.body.classBody=!0}return kt(n,e),n.prototype.children=["variable","parent","body"],n.prototype.determineName=function(){var e,n,i;return this.variable?(n=this.variable.properties,i=n[n.length-1],e=i?i instanceof t&&i.name.value:this.variable.base.value,Tt.call(V,e)>=0&&this.variable.error("class variable name may not be "+e),e&&(e=g.test(e)&&e)):null},n.prototype.setContext=function(e){return this.body.traverseChildren(!1,function(t){return t.classBody?!1:t instanceof x&&"this"===t.value?t.value=e:t instanceof c&&t.bound?t.context=e:void 0})},n.prototype.addBoundFunctions=function(e){var n,i,r,s,o;for(o=this.boundFuncs,i=0,r=o.length;r>i;i++)n=o[i],s=new z(new x("this"),[new t(n)]).compile(e),this.ctor.body.unshift(new x(s+" = "+bt("bind",e)+"("+s+", this)"))},n.prototype.addProperties=function(e,n,r){var s,o,a,h,l,u;return u=e.base.properties.slice(0),h=function(){var e;for(e=[];o=u.shift();)o instanceof i&&(a=o.variable.base,delete o.context,l=o.value,"constructor"===a.value?(this.ctor&&o.error("cannot define more than one constructor in a class"),l.bound&&o.error("cannot define a constructor as a bound function"),l instanceof c?o=this.ctor=l:(this.externalCtor=r.classScope.freeVariable("class"),o=new i(new x(this.externalCtor),l))):o.variable["this"]?l["static"]=!0:(s=a.isComplex()?new w(a):new t(a),o.variable=new z(new x(n),[new t(new x("prototype")),s]),l instanceof c&&l.bound&&(this.boundFuncs.push(a),l.bound=!1))),e.push(o);return e}.call(this),et(h)},n.prototype.walkBody=function(e,t){return this.traverseChildren(!1,function(r){return function(o){var a,c,h,l,u,p,d;if(a=!0,o instanceof n)return!1;if(o instanceof s){for(d=c=o.expressions,h=l=0,u=d.length;u>l;h=++l)p=d[h],p instanceof i&&p.variable.looksStatic(e)?p.value["static"]=!0:p instanceof z&&p.isObject(!0)&&(a=!1,c[h]=r.addProperties(p,e,t));o.expressions=c=rt(c)}return a&&!(o instanceof n)}}(this))},n.prototype.hoistDirectivePrologue=function(){var e,t,n;for(t=0,e=this.body.expressions;(n=e[t])&&n instanceof l||n instanceof z&&n.isString();)++t;return this.directives=e.splice(0,t)},n.prototype.ensureConstructor=function(e){return this.ctor||(this.ctor=new c,this.externalCtor?this.ctor.body.push(new x(this.externalCtor+".apply(this, arguments)")):this.parent&&this.ctor.body.push(new x(e+".__super__.constructor.apply(this, arguments)")),this.ctor.body.makeReturn(),this.body.expressions.unshift(this.ctor)),this.ctor.ctor=this.ctor.name=e,this.ctor.klass=null,this.ctor.noReturn=!0},n.prototype.compileNode=function(e){var t,n,r,a,h,l,u,p,f;return(a=this.body.jumps())&&a.error("Class bodies cannot contain pure statements"),(n=this.body.contains(at))&&n.error("Class bodies shouldn't reference arguments"),u=this.determineName()||"_Class",u.reserved&&(u="_"+u),l=new x(u),r=new c([],s.wrap([this.body])),t=[],e.classScope=r.makeScope(e.scope),this.hoistDirectivePrologue(),this.setContext(u),this.walkBody(u,e),this.ensureConstructor(u),this.addBoundFunctions(e),this.body.spaced=!0,this.body.expressions.push(l),this.parent&&(f=new x(e.classScope.freeVariable("superClass",{reserve:!1})),this.body.expressions.unshift(new d(l,f)),r.params.push(new _(f)),t.push(this.parent)),(p=this.body.expressions).unshift.apply(p,this.directives),h=new O(new o(r,t)),this.variable&&(h=new i(this.variable,h)),h.compileToFragments(e)},n}(r),e.Assign=i=function(e){function n(e,t,n,i){var r,s,o;this.variable=e,this.value=t,this.context=n,this.param=i&&i.param,this.subpattern=i&&i.subpattern,o=s=this.variable.unwrapAll().value,r=Tt.call(V,o)>=0,r&&"object"!==this.context&&this.variable.error('variable name may not be "'+s+'"')}return kt(n,e),n.prototype.children=["variable","value"],n.prototype.isStatement=function(e){return(null!=e?e.level:void 0)===L&&null!=this.context&&Tt.call(this.context,"?")>=0
+},n.prototype.assigns=function(e){return this["object"===this.context?"value":"variable"].assigns(e)},n.prototype.unfoldSoak=function(e){return yt(e,this,"variable")},n.prototype.compileNode=function(e){var t,n,i,r,s,o,a,h,l,u,p,d,f,m;if(i=this.variable instanceof z){if(this.variable.isArray()||this.variable.isObject())return this.compilePatternMatch(e);if(this.variable.isSplice())return this.compileSplice(e);if("||="===(h=this.context)||"&&="===h||"?="===h)return this.compileConditional(e);if("**="===(l=this.context)||"//="===l||"%%="===l)return this.compileSpecialMath(e)}return this.value instanceof c&&(this.value["static"]?(this.value.klass=this.variable.base,this.value.name=this.variable.properties[0],this.value.variable=this.variable):(null!=(u=this.variable.properties)?u.length:void 0)>=2&&(p=this.variable.properties,o=p.length>=3?Ct.call(p,0,r=p.length-2):(r=0,[]),a=p[r++],s=p[r++],"prototype"===(null!=(d=a.name)?d.value:void 0)&&(this.value.klass=new z(this.variable.base,o),this.value.name=s,this.value.variable=this.variable))),this.context||(m=this.variable.unwrapAll(),m.isAssignable()||this.variable.error('"'+this.variable.compile(e)+'" cannot be assigned'),("function"==typeof m.hasProperties?m.hasProperties():void 0)||(this.param?e.scope.add(m.value,"var"):e.scope.find(m.value))),f=this.value.compileToFragments(e,E),n=this.variable.compileToFragments(e,E),"object"===this.context?n.concat(this.makeCode(": "),f):(t=n.concat(this.makeCode(" "+(this.context||"=")+" "),f),E>=e.level?t:this.wrapInBraces(t))},n.prototype.compilePatternMatch=function(e){var i,r,s,o,a,c,h,l,u,d,f,m,v,y,b,k,T,C,N,S,D,R,A,I,_,j,M,B;if(I=e.level===L,j=this.value,y=this.variable.base.objects,!(b=y.length))return s=j.compileToFragments(e),e.level>=F?this.wrapInBraces(s):s;if(l=this.variable.isObject(),I&&1===b&&!((v=y[0])instanceof G))return v instanceof n?(T=v,C=T.variable,h=C.base,v=T.value):h=l?v["this"]?v.properties[0].name:v:new x(0),i=g.test(h.unwrap().value||0),j=new z(j),j.properties.push(new(i?t:w)(h)),N=v.unwrap().value,Tt.call($,N)>=0&&v.error("assignment to a reserved word: "+v.compile(e)),new n(v,j,null,{param:this.param}).compileToFragments(e,L);for(M=j.compileToFragments(e,E),B=st(M),r=[],o=!1,(!g.test(B)||this.variable.assigns(B))&&(r.push([this.makeCode((k=e.scope.freeVariable("ref"))+" = ")].concat(Ct.call(M))),M=[this.makeCode(k)],B=k),c=d=0,f=y.length;f>d;c=++d){if(v=y[c],h=c,l&&(v instanceof n?(S=v,D=S.variable,h=D.base,v=S.value):v.base instanceof O?(R=new z(v.unwrapAll()).cacheReference(e),v=R[0],h=R[1]):h=v["this"]?v.properties[0].name:v),!o&&v instanceof G)m=v.name.unwrap().value,v=v.unwrap(),_=b+" <= "+B+".length ? "+bt("slice",e)+".call("+B+", "+c,(A=b-c-1)?(u=e.scope.freeVariable("i",{single:!0}),_+=", "+u+" = "+B+".length - "+A+") : ("+u+" = "+c+", [])"):_+=") : []",_=new x(_),o=u+"++";else{if(!o&&v instanceof p){(A=b-c-1)&&(1===A?o=B+".length - 1":(u=e.scope.freeVariable("i",{single:!0}),_=new x(u+" = "+B+".length - "+A),o=u+"++",r.push(_.compileToFragments(e,E))));continue}m=v.unwrap().value,(v instanceof G||v instanceof p)&&v.error("multiple splats/expansions are disallowed in an assignment"),"number"==typeof h?(h=new x(o||h),i=!1):i=l&&g.test(h.unwrap().value||0),_=new z(new x(B),[new(i?t:w)(h)])}null!=m&&Tt.call($,m)>=0&&v.error("assignment to a reserved word: "+v.compile(e)),r.push(new n(v,_,null,{param:this.param,subpattern:!0}).compileToFragments(e,E))}return I||this.subpattern||r.push(M),a=this.joinFragmentArrays(r,", "),E>e.level?a:this.wrapInBraces(a)},n.prototype.compileConditional=function(e){var t,i,r,s;return r=this.variable.cacheReference(e),i=r[0],s=r[1],!i.properties.length&&i.base instanceof x&&"this"!==i.base.value&&!e.scope.check(i.base.value)&&this.variable.error('the variable "'+i.base.value+"\" can't be assigned with "+this.context+" because it has not been declared before"),Tt.call(this.context,"?")>=0?(e.isExistentialEquals=!0,new b(new u(i),s,{type:"if"}).addElse(new n(s,this.value,"=")).compileToFragments(e)):(t=new I(this.context.slice(0,-1),i,new n(s,this.value,"=")).compileToFragments(e),E>=e.level?t:this.wrapInBraces(t))},n.prototype.compileSpecialMath=function(e){var t,i,r;return i=this.variable.cacheReference(e),t=i[0],r=i[1],new n(t,new I(this.context.slice(0,-1),r,this.value)).compileToFragments(e)},n.prototype.compileSplice=function(e){var t,n,i,r,s,o,a,c,h,l,u,p;return a=this.variable.properties.pop().range,i=a.from,l=a.to,n=a.exclusive,o=this.variable.compile(e),i?(c=this.cacheToCodeFragments(i.cache(e,F)),r=c[0],s=c[1]):r=s="0",l?i instanceof z&&i.isSimpleNumber()&&l instanceof z&&l.isSimpleNumber()?(l=l.compile(e)-s,n||(l+=1)):(l=l.compile(e,T)+" - "+s,n||(l+=" + 1")):l="9e9",h=this.value.cache(e,E),u=h[0],p=h[1],t=[].concat(this.makeCode("[].splice.apply("+o+", ["+r+", "+l+"].concat("),u,this.makeCode(")), "),p),e.level>L?this.wrapInBraces(t):t},n}(r),e.Code=c=function(e){function t(e,t,n){this.params=e||[],this.body=t||new s,this.bound="boundfunc"===n,this.isGenerator=!!this.body.contains(function(e){var t;return e instanceof I&&("yield"===(t=e.operator)||"yield*"===t)})}return kt(t,e),t.prototype.children=["params","body"],t.prototype.isStatement=function(){return!!this.ctor},t.prototype.jumps=D,t.prototype.makeScope=function(e){return new P(e,this.body,this)},t.prototype.compileNode=function(e){var r,a,c,h,l,u,d,f,m,g,v,y,k,w,C,E,F,N,L,S,D,R,A,O,$,j,M,B,V,P,U,G,H;if(this.bound&&(null!=(A=e.scope.method)?A.bound:void 0)&&(this.context=e.scope.method.context),this.bound&&!this.context)return this.context="_this",H=new t([new _(new x(this.context))],new s([this])),a=new o(H,[new x("this")]),a.updateLocationDataIfMissing(this.locationData),a.compileNode(e);for(e.scope=tt(e,"classScope")||this.makeScope(e.scope),e.scope.shared=tt(e,"sharedScope"),e.indent+=q,delete e.bare,delete e.isExistentialEquals,L=[],h=[],O=this.params,u=0,m=O.length;m>u;u++)N=O[u],N instanceof p||e.scope.parameter(N.asReference(e));for($=this.params,d=0,g=$.length;g>d;d++)if(N=$[d],N.splat||N instanceof p){for(j=this.params,f=0,v=j.length;v>f;f++)F=j[f],F instanceof p||!F.name.value||e.scope.add(F.name.value,"var",!0);V=new i(new z(new n(function(){var t,n,i,r;for(i=this.params,r=[],n=0,t=i.length;t>n;n++)F=i[n],r.push(F.asReference(e));return r}.call(this))),new z(new x("arguments")));break}for(M=this.params,E=0,y=M.length;y>E;E++)N=M[E],N.isComplex()?(U=R=N.asReference(e),N.value&&(U=new I("?",R,N.value)),h.push(new i(new z(N.name),U,"=",{param:!0}))):(R=N,N.value&&(C=new x(R.name.value+" == null"),U=new i(new z(N.name),N.value,"="),h.push(new b(C,U)))),V||L.push(R);for(G=this.body.isEmpty(),V&&h.unshift(V),h.length&&(B=this.body.expressions).unshift.apply(B,h),l=S=0,k=L.length;k>S;l=++S)F=L[l],L[l]=F.compileToFragments(e),e.scope.parameter(st(L[l]));for(P=[],this.eachParamName(function(e,t){return Tt.call(P,e)>=0&&t.error("multiple parameters named "+e),P.push(e)}),G||this.noReturn||this.body.makeReturn(),c="function",this.isGenerator&&(c+="*"),this.ctor&&(c+=" "+this.name),c+="(",r=[this.makeCode(c)],l=D=0,w=L.length;w>D;l=++D)F=L[l],l&&r.push(this.makeCode(", ")),r.push.apply(r,F);return r.push(this.makeCode(") {")),this.body.isEmpty()||(r=r.concat(this.makeCode("\n"),this.body.compileWithDeclarations(e),this.makeCode("\n"+this.tab))),r.push(this.makeCode("}")),this.ctor?[this.makeCode(this.tab)].concat(Ct.call(r)):this.front||e.level>=T?this.wrapInBraces(r):r},t.prototype.eachParamName=function(e){var t,n,i,r,s;for(r=this.params,s=[],t=0,n=r.length;n>t;t++)i=r[t],s.push(i.eachName(e));return s},t.prototype.traverseChildren=function(e,n){return e?t.__super__.traverseChildren.call(this,e,n):void 0},t}(r),e.Param=_=function(e){function t(e,t,n){var i,r;this.name=e,this.value=t,this.splat=n,r=i=this.name.unwrapAll().value,Tt.call(V,r)>=0&&this.name.error('parameter name "'+i+'" is not allowed')}return kt(t,e),t.prototype.children=["name","value"],t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e,E)},t.prototype.asReference=function(e){var t,n;return this.reference?this.reference:(n=this.name,n["this"]?(t=n.properties[0].name.value,t.reserved&&(t="_"+t),n=new x(e.scope.freeVariable(t))):n.isComplex()&&(n=new x(e.scope.freeVariable("arg"))),n=new z(n),this.splat&&(n=new G(n)),n.updateLocationDataIfMissing(this.locationData),this.reference=n)},t.prototype.isComplex=function(){return this.name.isComplex()},t.prototype.eachName=function(e,t){var n,r,s,o,a,c;if(null==t&&(t=this.name),n=function(t){return e("@"+t.properties[0].name.value,t)},t instanceof x)return e(t.value,t);if(t instanceof z)return n(t);for(c=t.objects,r=0,s=c.length;s>r;r++)a=c[r],a instanceof i?this.eachName(e,a.value.unwrap()):a instanceof G?(o=a.name.unwrap(),e(o.value,o)):a instanceof z?a.isArray()||a.isObject()?this.eachName(e,a.base):a["this"]?n(a):e(a.base.value,a.base):a instanceof p||a.error("illegal parameter "+a.compile())},t}(r),e.Splat=G=function(e){function t(e){this.name=e.compile?e:new x(e)}return kt(t,e),t.prototype.children=["name"],t.prototype.isAssignable=Q,t.prototype.assigns=function(e){return this.name.assigns(e)},t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e)},t.prototype.unwrap=function(){return this.name},t.compileSplattedArray=function(e,n,i){var r,s,o,a,c,h,l,u,p,d,f;for(l=-1;(f=n[++l])&&!(f instanceof t););if(l>=n.length)return[];if(1===n.length)return f=n[0],c=f.compileToFragments(e,E),i?c:[].concat(f.makeCode(bt("slice",e)+".call("),c,f.makeCode(")"));for(r=n.slice(l),h=u=0,d=r.length;d>u;h=++u)f=r[h],o=f.compileToFragments(e,E),r[h]=f instanceof t?[].concat(f.makeCode(bt("slice",e)+".call("),o,f.makeCode(")")):[].concat(f.makeCode("["),o,f.makeCode("]"));return 0===l?(f=n[0],a=f.joinFragmentArrays(r.slice(1),", "),r[0].concat(f.makeCode(".concat("),a,f.makeCode(")"))):(s=function(){var t,i,r,s;for(r=n.slice(0,l),s=[],t=0,i=r.length;i>t;t++)f=r[t],s.push(f.compileToFragments(e,E));return s}(),s=n[0].joinFragmentArrays(s,", "),a=n[l].joinFragmentArrays(r,", "),p=n[n.length-1],[].concat(n[0].makeCode("["),s,n[l].makeCode("].concat("),a,p.makeCode(")")))},t}(r),e.Expansion=p=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return kt(t,e),t.prototype.isComplex=D,t.prototype.compileNode=function(){return this.error("Expansion must be used inside a destructuring assignment or parameter list")},t.prototype.asReference=function(){return this},t.prototype.eachName=function(){},t}(r),e.While=J=function(e){function t(e,t){this.condition=(null!=t?t.invert:void 0)?e.invert():e,this.guard=null!=t?t.guard:void 0}return kt(t,e),t.prototype.children=["condition","guard","body"],t.prototype.isStatement=Q,t.prototype.makeReturn=function(e){return e?t.__super__.makeReturn.apply(this,arguments):(this.returns=!this.jumps({loop:!0}),this)},t.prototype.addBody=function(e){return this.body=e,this},t.prototype.jumps=function(){var e,t,n,i,r;if(e=this.body.expressions,!e.length)return!1;for(t=0,i=e.length;i>t;t++)if(r=e[t],n=r.jumps({loop:!0}))return n;return!1},t.prototype.compileNode=function(e){var t,n,i,r;return e.indent+=q,r="",n=this.body,n.isEmpty()?n=this.makeCode(""):(this.returns&&(n.makeReturn(i=e.scope.freeVariable("results")),r=""+this.tab+i+" = [];\n"),this.guard&&(n.expressions.length>1?n.expressions.unshift(new b(new O(this.guard).invert(),new x("continue"))):this.guard&&(n=s.wrap([new b(this.guard,n)]))),n=[].concat(this.makeCode("\n"),n.compileToFragments(e,L),this.makeCode("\n"+this.tab))),t=[].concat(this.makeCode(r+this.tab+"while ("),this.condition.compileToFragments(e,N),this.makeCode(") {"),n,this.makeCode("}")),this.returns&&t.push(this.makeCode("\n"+this.tab+"return "+i+";")),t},t}(r),e.Op=I=function(e){function n(e,t,n,i){if("in"===e)return new k(t,n);if("do"===e)return this.generateDo(t);if("new"===e){if(t instanceof o&&!t["do"]&&!t.isNew)return t.newInstance();(t instanceof c&&t.bound||t["do"])&&(t=new O(t))}return this.operator=r[e]||e,this.first=t,this.second=n,this.flip=!!i,this}var r,s;return kt(n,e),r={"==":"===","!=":"!==",of:"in",yieldfrom:"yield*"},s={"!==":"===","===":"!=="},n.prototype.children=["first","second"],n.prototype.isSimpleNumber=D,n.prototype.isYield=function(){var e;return"yield"===(e=this.operator)||"yield*"===e},n.prototype.isYieldReturn=function(){return this.isYield()&&this.first instanceof M},n.prototype.isUnary=function(){return!this.second},n.prototype.isComplex=function(){var e;return!(this.isUnary()&&("+"===(e=this.operator)||"-"===e)&&this.first instanceof z&&this.first.isSimpleNumber())},n.prototype.isChainable=function(){var e;return"<"===(e=this.operator)||">"===e||">="===e||"<="===e||"==="===e||"!=="===e},n.prototype.invert=function(){var e,t,i,r,o;if(this.isChainable()&&this.first.isChainable()){for(e=!0,t=this;t&&t.operator;)e&&(e=t.operator in s),t=t.first;if(!e)return new O(this).invert();for(t=this;t&&t.operator;)t.invert=!t.invert,t.operator=s[t.operator],t=t.first;return this}return(r=s[this.operator])?(this.operator=r,this.first.unwrap()instanceof n&&this.first.invert(),this):this.second?new O(this).invert():"!"===this.operator&&(i=this.first.unwrap())instanceof n&&("!"===(o=i.operator)||"in"===o||"instanceof"===o)?i:new n("!",this)},n.prototype.unfoldSoak=function(e){var t;return("++"===(t=this.operator)||"--"===t||"delete"===t)&&yt(e,this,"first")},n.prototype.generateDo=function(e){var t,n,r,s,a,h,l,u;for(h=[],n=e instanceof i&&(l=e.value.unwrap())instanceof c?l:e,u=n.params||[],r=0,s=u.length;s>r;r++)a=u[r],a.value?(h.push(a.value),delete a.value):h.push(a);return t=new o(e,h),t["do"]=!0,t},n.prototype.compileNode=function(e){var t,n,i,r,s,o;if(n=this.isChainable()&&this.first.isChainable(),n||(this.first.front=this.front),"delete"===this.operator&&e.scope.check(this.first.unwrapAll().value)&&this.error("delete operand may not be argument or var"),("--"===(r=this.operator)||"++"===r)&&(s=this.first.unwrapAll().value,Tt.call(V,s)>=0)&&this.error('cannot increment/decrement "'+this.first.unwrapAll().value+'"'),this.isYield())return this.compileYield(e);if(this.isUnary())return this.compileUnary(e);if(n)return this.compileChain(e);switch(this.operator){case"?":return this.compileExistence(e);case"**":return this.compilePower(e);case"//":return this.compileFloorDivision(e);case"%%":return this.compileModulo(e);default:return i=this.first.compileToFragments(e,F),o=this.second.compileToFragments(e,F),t=[].concat(i,this.makeCode(" "+this.operator+" "),o),F>=e.level?t:this.wrapInBraces(t)}},n.prototype.compileChain=function(e){var t,n,i,r;return i=this.first.second.cache(e),this.first.second=i[0],r=i[1],n=this.first.compileToFragments(e,F),t=n.concat(this.makeCode(" "+(this.invert?"&&":"||")+" "),r.compileToFragments(e),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(e,F)),this.wrapInBraces(t)},n.prototype.compileExistence=function(e){var t,n;return this.first.isComplex()?(n=new x(e.scope.freeVariable("ref")),t=new O(new i(n,this.first))):(t=this.first,n=t),new b(new u(t),n,{type:"if"}).addElse(this.second).compileToFragments(e)},n.prototype.compileUnary=function(e){var t,i,r;return i=[],t=this.operator,i.push([this.makeCode(t)]),"!"===t&&this.first instanceof u?(this.first.negated=!this.first.negated,this.first.compileToFragments(e)):e.level>=T?new O(this).compileToFragments(e):(r="+"===t||"-"===t,("new"===t||"typeof"===t||"delete"===t||r&&this.first instanceof n&&this.first.operator===t)&&i.push([this.makeCode(" ")]),(r&&this.first instanceof n||"new"===t&&this.first.isStatement(e))&&(this.first=new O(this.first)),i.push(this.first.compileToFragments(e,F)),this.flip&&i.reverse(),this.joinFragmentArrays(i,""))},n.prototype.compileYield=function(e){var t,n;return n=[],t=this.operator,null==e.scope.parent&&this.error("yield statements must occur within a function generator."),Tt.call(Object.keys(this.first),"expression")>=0&&!(this.first instanceof W)?this.isYieldReturn()?n.push(this.first.compileToFragments(e,L)):null!=this.first.expression&&n.push(this.first.expression.compileToFragments(e,F)):(n.push([this.makeCode("("+t+" ")]),n.push(this.first.compileToFragments(e,F)),n.push([this.makeCode(")")])),this.joinFragmentArrays(n,"")},n.prototype.compilePower=function(e){var n;return n=new z(new x("Math"),[new t(new x("pow"))]),new o(n,[this.first,this.second]).compileToFragments(e)},n.prototype.compileFloorDivision=function(e){var i,r;return r=new z(new x("Math"),[new t(new x("floor"))]),i=new n("/",this.first,this.second),new o(r,[i]).compileToFragments(e)},n.prototype.compileModulo=function(e){var t;return t=new z(new x(bt("modulo",e))),new o(t,[this.first,this.second]).compileToFragments(e)},n.prototype.toString=function(e){return n.__super__.toString.call(this,e,this.constructor.name+" "+this.operator)},n}(r),e.In=k=function(e){function t(e,t){this.object=e,this.array=t}return kt(t,e),t.prototype.children=["object","array"],t.prototype.invert=S,t.prototype.compileNode=function(e){var t,n,i,r,s;if(this.array instanceof z&&this.array.isArray()&&this.array.base.objects.length){for(s=this.array.base.objects,n=0,i=s.length;i>n;n++)if(r=s[n],r instanceof G){t=!0;break}if(!t)return this.compileOrTest(e)}return this.compileLoopTest(e)},t.prototype.compileOrTest=function(e){var t,n,i,r,s,o,a,c,h,l,u,p;for(c=this.object.cache(e,F),u=c[0],a=c[1],h=this.negated?[" !== "," && "]:[" === "," || "],t=h[0],n=h[1],p=[],l=this.array.base.objects,i=s=0,o=l.length;o>s;i=++s)r=l[i],i&&p.push(this.makeCode(n)),p=p.concat(i?a:u,this.makeCode(t),r.compileToFragments(e,T));return F>e.level?p:this.wrapInBraces(p)},t.prototype.compileLoopTest=function(e){var t,n,i,r;return i=this.object.cache(e,E),r=i[0],n=i[1],t=[].concat(this.makeCode(bt("indexOf",e)+".call("),this.array.compileToFragments(e,E),this.makeCode(", "),n,this.makeCode(") "+(this.negated?"< 0":">= 0"))),st(r)===st(n)?t:(t=r.concat(this.makeCode(", "),t),E>e.level?t:this.wrapInBraces(t))},t.prototype.toString=function(e){return t.__super__.toString.call(this,e,this.constructor.name+(this.negated?"!":""))},t}(r),e.Try=Y=function(e){function t(e,t,n,i){this.attempt=e,this.errorVariable=t,this.recovery=n,this.ensure=i}return kt(t,e),t.prototype.children=["attempt","recovery","ensure"],t.prototype.isStatement=Q,t.prototype.jumps=function(e){var t;return this.attempt.jumps(e)||(null!=(t=this.recovery)?t.jumps(e):void 0)},t.prototype.makeReturn=function(e){return this.attempt&&(this.attempt=this.attempt.makeReturn(e)),this.recovery&&(this.recovery=this.recovery.makeReturn(e)),this},t.prototype.compileNode=function(e){var t,n,r,s;return e.indent+=q,s=this.attempt.compileToFragments(e,L),t=this.recovery?(r=new x("_error"),this.errorVariable?this.recovery.unshift(new i(this.errorVariable,r)):void 0,[].concat(this.makeCode(" catch ("),r.compileToFragments(e),this.makeCode(") {\n"),this.recovery.compileToFragments(e,L),this.makeCode("\n"+this.tab+"}"))):this.ensure||this.recovery?[]:[this.makeCode(" catch (_error) {}")],n=this.ensure?[].concat(this.makeCode(" finally {\n"),this.ensure.compileToFragments(e,L),this.makeCode("\n"+this.tab+"}")):[],[].concat(this.makeCode(this.tab+"try {\n"),s,this.makeCode("\n"+this.tab+"}"),t,n)},t}(r),e.Throw=W=function(e){function t(e){this.expression=e}return kt(t,e),t.prototype.children=["expression"],t.prototype.isStatement=Q,t.prototype.jumps=D,t.prototype.makeReturn=X,t.prototype.compileNode=function(e){return[].concat(this.makeCode(this.tab+"throw "),this.expression.compileToFragments(e),this.makeCode(";"))},t}(r),e.Existence=u=function(e){function t(e){this.expression=e}return kt(t,e),t.prototype.children=["expression"],t.prototype.invert=S,t.prototype.compileNode=function(e){var t,n,i,r;return this.expression.front=this.front,i=this.expression.compile(e,F),g.test(i)&&!e.scope.check(i)?(r=this.negated?["===","||"]:["!==","&&"],t=r[0],n=r[1],i="typeof "+i+" "+t+' "undefined" '+n+" "+i+" "+t+" null"):i=i+" "+(this.negated?"==":"!=")+" null",[this.makeCode(C>=e.level?i:"("+i+")")]},t}(r),e.Parens=O=function(e){function t(e){this.body=e}return kt(t,e),t.prototype.children=["body"],t.prototype.unwrap=function(){return this.body},t.prototype.isComplex=function(){return this.body.isComplex()},t.prototype.compileNode=function(e){var t,n,i;return n=this.body.unwrap(),n instanceof z&&n.isAtomic()?(n.front=this.front,n.compileToFragments(e)):(i=n.compileToFragments(e,N),t=F>e.level&&(n instanceof I||n instanceof o||n instanceof f&&n.returns),t?i:this.wrapInBraces(i))},t}(r),e.For=f=function(e){function t(e,t){var n;this.source=t.source,this.guard=t.guard,this.step=t.step,this.name=t.name,this.index=t.index,this.body=s.wrap([e]),this.own=!!t.own,this.object=!!t.object,this.object&&(n=[this.index,this.name],this.name=n[0],this.index=n[1]),this.index instanceof z&&this.index.error("index cannot be a pattern matching expression"),this.range=this.source instanceof z&&this.source.base instanceof j&&!this.source.properties.length,this.pattern=this.name instanceof z,this.range&&this.index&&this.index.error("indexes do not apply to range loops"),this.range&&this.pattern&&this.name.error("cannot pattern match over range loops"),this.own&&!this.object&&this.name.error("cannot use own with for-in"),this.returns=!1}return kt(t,e),t.prototype.children=["body","source","guard","step"],t.prototype.compileNode=function(e){var t,n,r,o,a,c,h,l,u,p,d,f,m,v,y,k,w,T,C,F,N,S,D,A,I,_,$,j,B,V,P,U,G,H;return t=s.wrap([this.body]),D=t.expressions,T=D[D.length-1],(null!=T?T.jumps():void 0)instanceof M&&(this.returns=!1),B=this.range?this.source.base:this.source,j=e.scope,this.pattern||(F=this.name&&this.name.compile(e,E)),v=this.index&&this.index.compile(e,E),F&&!this.pattern&&j.find(F),v&&j.find(v),this.returns&&($=j.freeVariable("results")),y=this.object&&v||j.freeVariable("i",{single:!0}),k=this.range&&F||v||y,w=k!==y?k+" = ":"",this.step&&!this.range&&(A=this.cacheToCodeFragments(this.step.cache(e,E,ot)),V=A[0],U=A[1],P=U.match(R)),this.pattern&&(F=y),H="",d="",h="",f=this.tab+q,this.range?p=B.compileToFragments(lt(e,{index:y,name:F,step:this.step,isComplex:ot})):(G=this.source.compile(e,E),!F&&!this.own||g.test(G)||(h+=""+this.tab+(S=j.freeVariable("ref"))+" = "+G+";\n",G=S),F&&!this.pattern&&(N=F+" = "+G+"["+k+"]"),this.object||(V!==U&&(h+=""+this.tab+V+";\n"),this.step&&P&&(u=0>pt(P[0]))||(C=j.freeVariable("len")),a=""+w+y+" = 0, "+C+" = "+G+".length",c=""+w+y+" = "+G+".length - 1",r=y+" < "+C,o=y+" >= 0",this.step?(P?u&&(r=o,a=c):(r=U+" > 0 ? "+r+" : "+o,a="("+U+" > 0 ? ("+a+") : "+c+")"),m=y+" += "+U):m=""+(k!==y?"++"+y:y+"++"),p=[this.makeCode(a+"; "+r+"; "+w+m)])),this.returns&&(I=""+this.tab+$+" = [];\n",_="\n"+this.tab+"return "+$+";",t.makeReturn($)),this.guard&&(t.expressions.length>1?t.expressions.unshift(new b(new O(this.guard).invert(),new x("continue"))):this.guard&&(t=s.wrap([new b(this.guard,t)]))),this.pattern&&t.expressions.unshift(new i(this.name,new x(G+"["+k+"]"))),l=[].concat(this.makeCode(h),this.pluckDirectCall(e,t)),N&&(H="\n"+f+N+";"),this.object&&(p=[this.makeCode(k+" in "+G)],this.own&&(d="\n"+f+"if (!"+bt("hasProp",e)+".call("+G+", "+k+")) continue;")),n=t.compileToFragments(lt(e,{indent:f}),L),n&&n.length>0&&(n=[].concat(this.makeCode("\n"),n,this.makeCode("\n"))),[].concat(l,this.makeCode(""+(I||"")+this.tab+"for ("),p,this.makeCode(") {"+d+H),n,this.makeCode(this.tab+"}"+(_||"")))},t.prototype.pluckDirectCall=function(e,t){var n,r,s,a,h,l,u,p,d,f,m,g,v,y,b,k;for(r=[],d=t.expressions,h=l=0,u=d.length;u>l;h=++l)s=d[h],s=s.unwrapAll(),s instanceof o&&(k=null!=(f=s.variable)?f.unwrapAll():void 0,(k instanceof c||k instanceof z&&(null!=(m=k.base)?m.unwrapAll():void 0)instanceof c&&1===k.properties.length&&("call"===(g=null!=(v=k.properties[0].name)?v.value:void 0)||"apply"===g))&&(a=(null!=(y=k.base)?y.unwrapAll():void 0)||k,p=new x(e.scope.freeVariable("fn")),n=new z(p),k.base&&(b=[n,k],k.base=b[0],n=b[1]),t.expressions[h]=new o(n,s.args),r=r.concat(this.makeCode(this.tab),new i(p,a).compileToFragments(e,L),this.makeCode(";\n"))));return r},t}(J),e.Switch=H=function(e){function t(e,t,n){this.subject=e,this.cases=t,this.otherwise=n}return kt(t,e),t.prototype.children=["subject","cases","otherwise"],t.prototype.isStatement=Q,t.prototype.jumps=function(e){var t,n,i,r,s,o,a,c;for(null==e&&(e={block:!0}),o=this.cases,i=0,s=o.length;s>i;i++)if(a=o[i],n=a[0],t=a[1],r=t.jumps(e))return r;return null!=(c=this.otherwise)?c.jumps(e):void 0},t.prototype.makeReturn=function(e){var t,n,i,r,o;for(r=this.cases,t=0,n=r.length;n>t;t++)i=r[t],i[1].makeReturn(e);return e&&(this.otherwise||(this.otherwise=new s([new x("void 0")]))),null!=(o=this.otherwise)&&o.makeReturn(e),this},t.prototype.compileNode=function(e){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,g;for(c=e.indent+q,h=e.indent=c+q,o=[].concat(this.makeCode(this.tab+"switch ("),this.subject?this.subject.compileToFragments(e,N):this.makeCode("false"),this.makeCode(") {\n")),f=this.cases,a=l=0,p=f.length;p>l;a=++l){for(m=f[a],r=m[0],t=m[1],g=rt([r]),u=0,d=g.length;d>u;u++)i=g[u],this.subject||(i=i.invert()),o=o.concat(this.makeCode(c+"case "),i.compileToFragments(e,N),this.makeCode(":\n"));if((n=t.compileToFragments(e,L)).length>0&&(o=o.concat(n,this.makeCode("\n"))),a===this.cases.length-1&&!this.otherwise)break;s=this.lastNonComment(t.expressions),s instanceof M||s instanceof x&&s.jumps()&&"debugger"!==s.value||o.push(i.makeCode(h+"break;\n"))}return this.otherwise&&this.otherwise.expressions.length&&o.push.apply(o,[this.makeCode(c+"default:\n")].concat(Ct.call(this.otherwise.compileToFragments(e,L)),[this.makeCode("\n")])),o.push(this.makeCode(this.tab+"}")),o},t}(r),e.If=b=function(e){function t(e,t,n){this.body=t,null==n&&(n={}),this.condition="unless"===n.type?e.invert():e,this.elseBody=null,this.isChain=!1,this.soak=n.soak}return kt(t,e),t.prototype.children=["condition","body","elseBody"],t.prototype.bodyNode=function(){var e;return null!=(e=this.body)?e.unwrap():void 0},t.prototype.elseBodyNode=function(){var e;return null!=(e=this.elseBody)?e.unwrap():void 0},t.prototype.addElse=function(e){return this.isChain?this.elseBodyNode().addElse(e):(this.isChain=e instanceof t,this.elseBody=this.ensureBlock(e),this.elseBody.updateLocationDataIfMissing(e.locationData)),this},t.prototype.isStatement=function(e){var t;return(null!=e?e.level:void 0)===L||this.bodyNode().isStatement(e)||(null!=(t=this.elseBodyNode())?t.isStatement(e):void 0)},t.prototype.jumps=function(e){var t;return this.body.jumps(e)||(null!=(t=this.elseBody)?t.jumps(e):void 0)},t.prototype.compileNode=function(e){return this.isStatement(e)?this.compileStatement(e):this.compileExpression(e)},t.prototype.makeReturn=function(e){return e&&(this.elseBody||(this.elseBody=new s([new x("void 0")]))),this.body&&(this.body=new s([this.body.makeReturn(e)])),this.elseBody&&(this.elseBody=new s([this.elseBody.makeReturn(e)])),this},t.prototype.ensureBlock=function(e){return e instanceof s?e:new s([e])},t.prototype.compileStatement=function(e){var n,i,r,s,o,a,c;return r=tt(e,"chainChild"),(o=tt(e,"isExistentialEquals"))?new t(this.condition.invert(),this.elseBodyNode(),{type:"if"}).compileToFragments(e):(c=e.indent+q,s=this.condition.compileToFragments(e,N),i=this.ensureBlock(this.body).compileToFragments(lt(e,{indent:c})),a=[].concat(this.makeCode("if ("),s,this.makeCode(") {\n"),i,this.makeCode("\n"+this.tab+"}")),r||a.unshift(this.makeCode(this.tab)),this.elseBody?(n=a.concat(this.makeCode(" else ")),this.isChain?(e.chainChild=!0,n=n.concat(this.elseBody.unwrap().compileToFragments(e,L))):n=n.concat(this.makeCode("{\n"),this.elseBody.compileToFragments(lt(e,{indent:c}),L),this.makeCode("\n"+this.tab+"}")),n):a)},t.prototype.compileExpression=function(e){var t,n,i,r;return i=this.condition.compileToFragments(e,C),n=this.bodyNode().compileToFragments(e,E),t=this.elseBodyNode()?this.elseBodyNode().compileToFragments(e,E):[this.makeCode("void 0")],r=i.concat(this.makeCode(" ? "),n,this.makeCode(" : "),t),e.level>=C?this.wrapInBraces(r):r},t.prototype.unfoldSoak=function(){return this.soak&&this},t}(r),K={extend:function(e){return"function(child, parent) { for (var key in parent) { if ("+bt("hasProp",e)+".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; }"},modulo:function(){return"function(a, b) { return (+a % (b = +b) + b) % b; }"},hasProp:function(){return"{}.hasOwnProperty"},slice:function(){return"[].slice"}},L=1,N=2,E=3,C=4,F=5,T=6,q=" ",g=/^(?!\d)[$\w\x7f-\uffff]+$/,B=/^[+-]?\d+$/,m=/^[+-]?0x[\da-f]+/i,R=/^[+-]?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)$/i,y=/^['"]/,v=/^\//,bt=function(e,t){var n,i;return i=t.scope.root,e in i.utilities?i.utilities[e]:(n=i.freeVariable(e),i.assign(n,K[e](t)),i.utilities[e]=n)},ut=function(e,t){return e=e.replace(/\n/g,"$&"+t),e.replace(/\s+$/,"")},pt=function(e){return null==e?0:e.match(m)?parseInt(e,16):parseFloat(e)},at=function(e){return e instanceof x&&"arguments"===e.value&&!e.asKey},ct=function(e){return e instanceof x&&"this"===e.value&&!e.asKey||e instanceof c&&e.bound||e instanceof o&&e.isSuper},ot=function(e){return e.isComplex()||("function"==typeof e.isAssignable?e.isAssignable():void 0)},yt=function(e,t,n){var i;if(i=t[n].unfoldSoak(e))return t[n]=i.body,i.body=new z(t),i}}.call(this),t.exports}(),_dereq_["./sourcemap"]=function(){var e={},t={exports:e};return function(){var e,n;e=function(){function e(e){this.line=e,this.columns=[]}return e.prototype.add=function(e,t,n){var i,r;return r=t[0],i=t[1],null==n&&(n={}),this.columns[e]&&n.noReplace?void 0:this.columns[e]={line:this.line,column:e,sourceLine:r,sourceColumn:i}},e.prototype.sourceLocation=function(e){for(var t;!((t=this.columns[e])||0>=e);)e--;return t&&[t.sourceLine,t.sourceColumn]},e}(),n=function(){function t(){this.lines=[]}var n,i,r,s;return t.prototype.add=function(t,n,i){var r,s,o,a;return null==i&&(i={}),o=n[0],s=n[1],a=(r=this.lines)[o]||(r[o]=new e(o)),a.add(s,t,i)},t.prototype.sourceLocation=function(e){var t,n,i;for(n=e[0],t=e[1];!((i=this.lines[n])||0>=n);)n--;return i&&i.sourceLocation(t)},t.prototype.generate=function(e,t){var n,i,r,s,o,a,c,h,l,u,p,d,f,m,g,v;for(null==e&&(e={}),null==t&&(t=null),v=0,s=0,a=0,o=0,d=!1,n="",f=this.lines,u=i=0,c=f.length;c>i;u=++i)if(l=f[u])for(m=l.columns,r=0,h=m.length;h>r;r++)if(p=m[r]){for(;p.line>v;)s=0,d=!1,n+=";",v++;d&&(n+=",",d=!1),n+=this.encodeVlq(p.column-s),s=p.column,n+=this.encodeVlq(0),n+=this.encodeVlq(p.sourceLine-a),a=p.sourceLine,n+=this.encodeVlq(p.sourceColumn-o),o=p.sourceColumn,d=!0}return g={version:3,file:e.generatedFile||"",sourceRoot:e.sourceRoot||"",sources:e.sourceFiles||[""],names:[],mappings:n},e.inline&&(g.sourcesContent=[t]),JSON.stringify(g,null,2)},r=5,i=1<<r,s=i-1,t.prototype.encodeVlq=function(e){var t,n,o,a;for(t="",o=0>e?1:0,a=(Math.abs(e)<<1)+o;a||!t;)n=a&s,a>>=r,a&&(n|=i),t+=this.encodeBase64(n);return t},n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t.prototype.encodeBase64=function(e){return n[e]||function(){throw Error("Cannot Base64 encode value: "+e)}()},t}(),t.exports=n}.call(this),t.exports}(),_dereq_["./coffee-script"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,g,v,y,b={}.hasOwnProperty,k=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};if(a=_dereq_("fs"),v=_dereq_("vm"),f=_dereq_("path"),t=_dereq_("./lexer").Lexer,d=_dereq_("./parser").parser,h=_dereq_("./helpers"),n=_dereq_("./sourcemap"),e.VERSION="1.9.3",e.FILE_EXTENSIONS=[".coffee",".litcoffee",".coffee.md"],e.helpers=h,y=function(e){return function(t,n){var i;null==n&&(n={});try{return e.call(this,t,n)
+}catch(r){if(i=r,"string"!=typeof t)throw i;throw h.updateSyntaxError(i,t,n.filename)}}},e.compile=r=y(function(e,t){var i,r,s,o,a,c,l,u,f,m,g,v,y,b,k;for(v=h.merge,o=h.extend,t=o({},t),t.sourceMap&&(g=new n),k=p.tokenize(e,t),t.referencedVars=function(){var e,t,n;for(n=[],e=0,t=k.length;t>e;e++)b=k[e],b.variable&&n.push(b[1]);return n}(),c=d.parse(k).compileToFragments(t),s=0,t.header&&(s+=1),t.shiftLine&&(s+=1),r=0,f="",u=0,m=c.length;m>u;u++)a=c[u],t.sourceMap&&(a.locationData&&!/^[;\s]*$/.test(a.code)&&g.add([a.locationData.first_line,a.locationData.first_column],[s,r],{noReplace:!0}),y=h.count(a.code,"\n"),s+=y,y?r=a.code.length-(a.code.lastIndexOf("\n")+1):r+=a.code.length),f+=a.code;return t.header&&(l="Generated by CoffeeScript "+this.VERSION,f="// "+l+"\n"+f),t.sourceMap?(i={js:f},i.sourceMap=g,i.v3SourceMap=g.generate(t,e),i):f}),e.tokens=y(function(e,t){return p.tokenize(e,t)}),e.nodes=y(function(e,t){return"string"==typeof e?d.parse(p.tokenize(e,t)):d.parse(e)}),e.run=function(e,t){var n,i,s,o;return null==t&&(t={}),s=_dereq_.main,s.filename=process.argv[1]=t.filename?a.realpathSync(t.filename):".",s.moduleCache&&(s.moduleCache={}),i=t.filename?f.dirname(a.realpathSync(t.filename)):a.realpathSync("."),s.paths=_dereq_("module")._nodeModulePaths(i),(!h.isCoffee(s.filename)||_dereq_.extensions)&&(n=r(e,t),e=null!=(o=n.js)?o:n),s._compile(e,s.filename)},e.eval=function(e,t){var n,i,s,o,a,c,h,l,u,p,d,m,g,y,k,w,T;if(null==t&&(t={}),e=e.trim()){if(o=null!=(m=v.Script.createContext)?m:v.createContext,c=null!=(g=v.isContext)?g:function(){return t.sandbox instanceof o().constructor},o){if(null!=t.sandbox){if(c(t.sandbox))w=t.sandbox;else{w=o(),y=t.sandbox;for(l in y)b.call(y,l)&&(T=y[l],w[l]=T)}w.global=w.root=w.GLOBAL=w}else w=global;if(w.__filename=t.filename||"eval",w.__dirname=f.dirname(w.__filename),w===global&&!w.module&&!w.require){for(n=_dereq_("module"),w.module=i=new n(t.modulename||"eval"),w.require=s=function(e){return n._load(e,i,!0)},i.filename=w.__filename,k=Object.getOwnPropertyNames(_dereq_),a=0,u=k.length;u>a;a++)d=k[a],"paths"!==d&&(s[d]=_dereq_[d]);s.paths=i.paths=n._nodeModulePaths(process.cwd()),s.resolve=function(e){return n._resolveFilename(e,i)}}}p={};for(l in t)b.call(t,l)&&(T=t[l],p[l]=T);return p.bare=!0,h=r(e,p),w===global?v.runInThisContext(h):v.runInContext(h,w)}},e.register=function(){return _dereq_("./register")},_dereq_.extensions)for(m=this.FILE_EXTENSIONS,l=0,u=m.length;u>l;l++)s=m[l],null==(i=_dereq_.extensions)[s]&&(i[s]=function(){throw Error("Use CoffeeScript.register() or require the coffee-script/register module to require "+s+" files.")});e._compileFile=function(e,t){var n,i,s,o;null==t&&(t=!1),s=a.readFileSync(e,"utf8"),o=65279===s.charCodeAt(0)?s.substring(1):s;try{n=r(o,{filename:e,sourceMap:t,literate:h.isLiterate(e)})}catch(c){throw i=c,h.updateSyntaxError(i,o,e)}return n},p=new t,d.lexer={lex:function(){var e,t;return t=d.tokens[this.pos++],t?(e=t[0],this.yytext=t[1],this.yylloc=t[2],d.errorToken=t.origin||t,this.yylineno=this.yylloc.first_line):e="",e},setInput:function(e){return d.tokens=e,this.pos=0},upcomingInput:function(){return""}},d.yy=_dereq_("./nodes"),d.yy.parseError=function(e,t){var n,i,r,s,o,a;return o=t.token,s=d.errorToken,a=d.tokens,i=s[0],r=s[1],n=s[2],r=function(){switch(!1){case s!==a[a.length-1]:return"end of input";case"INDENT"!==i&&"OUTDENT"!==i:return"indentation";case"IDENTIFIER"!==i&&"NUMBER"!==i&&"STRING"!==i&&"STRING_START"!==i&&"REGEX"!==i&&"REGEX_START"!==i:return i.replace(/_START$/,"").toLowerCase();default:return h.nameWhitespaceCharacter(r)}}(),h.throwSyntaxError("unexpected "+r,n)},o=function(e,t){var n,i,r,s,o,a,c,h,l,u,p,d;return s=void 0,r="",e.isNative()?r="native":(e.isEval()?(s=e.getScriptNameOrSourceURL(),s||(r=e.getEvalOrigin()+", ")):s=e.getFileName(),s||(s="<anonymous>"),h=e.getLineNumber(),i=e.getColumnNumber(),u=t(s,h,i),r=u?s+":"+u[0]+":"+u[1]:s+":"+h+":"+i),o=e.getFunctionName(),a=e.isConstructor(),c=!(e.isToplevel()||a),c?(l=e.getMethodName(),d=e.getTypeName(),o?(p=n="",d&&o.indexOf(d)&&(p=d+"."),l&&o.indexOf("."+l)!==o.length-l.length-1&&(n=" [as "+l+"]"),""+p+o+n+" ("+r+")"):d+"."+(l||"<anonymous>")+" ("+r+")"):a?"new "+(o||"<anonymous>")+" ("+r+")":o?o+" ("+r+")":r},g={},c=function(t){var n,i;if(g[t])return g[t];if(i=null!=f?f.extname(t):void 0,!(0>k.call(e.FILE_EXTENSIONS,i)))return n=e._compileFile(t,!0),g[t]=n.sourceMap},Error.prepareStackTrace=function(t,n){var i,r,s;return s=function(e,t,n){var i,r;return r=c(e),r&&(i=r.sourceLocation([t-1,n-1])),i?[i[0]+1,i[1]+1]:null},r=function(){var t,r,a;for(a=[],t=0,r=n.length;r>t&&(i=n[t],i.getFunction()!==e.run);t++)a.push(" at "+o(i,s));return a}(),""+t+"\n"+r.join("\n")+"\n"}}.call(this),t.exports}(),_dereq_["./browser"]=function(){var exports={},module={exports:exports};return function(){var CoffeeScript,compile,runScripts,indexOf=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};CoffeeScript=_dereq_("./coffee-script"),CoffeeScript.require=_dereq_,compile=CoffeeScript.compile,CoffeeScript.eval=function(code,options){return null==options&&(options={}),null==options.bare&&(options.bare=!0),eval(compile(code,options))},CoffeeScript.run=function(e,t){return null==t&&(t={}),t.bare=!0,t.shiftLine=!0,Function(compile(e,t))()},"undefined"!=typeof window&&null!==window&&("undefined"!=typeof btoa&&null!==btoa&&"undefined"!=typeof JSON&&null!==JSON&&"undefined"!=typeof unescape&&null!==unescape&&"undefined"!=typeof encodeURIComponent&&null!==encodeURIComponent&&(compile=function(e,t){var n,i,r;return null==t&&(t={}),t.sourceMap=!0,t.inline=!0,i=CoffeeScript.compile(e,t),n=i.js,r=i.v3SourceMap,n+"\n//# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(r)))+"\n//# sourceURL=coffeescript"}),CoffeeScript.load=function(e,t,n,i){var r;return null==n&&(n={}),null==i&&(i=!1),n.sourceFiles=[e],r=window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):new window.XMLHttpRequest,r.open("GET",e,!0),"overrideMimeType"in r&&r.overrideMimeType("text/plain"),r.onreadystatechange=function(){var s,o;if(4===r.readyState){if(0!==(o=r.status)&&200!==o)throw Error("Could not load "+e);if(s=[r.responseText,n],i||CoffeeScript.run.apply(CoffeeScript,s),t)return t(s)}},r.send(null)},runScripts=function(){var e,t,n,i,r,s,o,a,c,h,l;for(l=window.document.getElementsByTagName("script"),t=["text/coffeescript","text/literate-coffeescript"],e=function(){var e,n,i,r;for(r=[],e=0,n=l.length;n>e;e++)c=l[e],i=c.type,indexOf.call(t,i)>=0&&r.push(c);return r}(),s=0,n=function(){var t;return t=e[s],t instanceof Array?(CoffeeScript.run.apply(CoffeeScript,t),s++,n()):void 0},i=function(i,r){var s,o;return s={literate:i.type===t[1]},o=i.src||i.getAttribute("data-src"),o?CoffeeScript.load(o,function(t){return e[r]=t,n()},s,!0):(s.sourceFiles=["embedded"],e[r]=[i.innerHTML,s])},r=o=0,a=e.length;a>o;r=++o)h=e[r],i(h,r);return n()},window.addEventListener?window.addEventListener("DOMContentLoaded",runScripts,!1):window.attachEvent("onload",runScripts))}.call(this),module.exports}(),_dereq_["./coffee-script"]}();"function"==typeof define&&define.amd?define(function(){return CoffeeScript}):root.CoffeeScript=CoffeeScript})(this);
+});
+
+ace.define("ace/mode/coffee_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/coffee/coffee"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var coffee = require("../mode/coffee/coffee");
+
+window.addEventListener = function() {};
+
+
+var Worker = exports.Worker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(250);
+};
+
+oop.inherits(Worker, Mirror);
+
+(function() {
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+ var errors = [];
+ try {
+ coffee.compile(value);
+ } catch(e) {
+ var loc = e.location;
+ if (loc) {
+ errors.push({
+ row: loc.first_line,
+ column: loc.first_column,
+ endRow: loc.last_line,
+ endColumn: loc.last_column,
+ text: e.message,
+ type: "error"
+ });
+ }
+ }
+ this.sender.emit("annotate", errors);
+ };
+
+}).call(Worker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ 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 ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ 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, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ 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("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ 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("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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 || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+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, "");
+ };
+}
+
+function toInteger(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;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/worker-css.js b/www/wiki/extensions/CodeEditor/modules/ace/worker-css.js
new file mode 100644
index 00000000..a9da31d3
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/worker-css.js
@@ -0,0 +1,8761 @@
+"no use strict";
+;(function(window) {
+if (typeof window.window != "undefined" && window.document)
+ return;
+if (window.require && window.define)
+ return;
+
+if (!window.console) {
+ window.console = function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+ };
+ window.console.error =
+ window.console.warn =
+ window.console.log =
+ window.console.trace = window.console;
+}
+window.window = window;
+window.ace = window;
+
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ data: err.data,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
+window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
+ if (moduleName.indexOf("!") !== -1) {
+ var chunks = moduleName.split("!");
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
+ }
+ // normalize relative requires
+ if (moduleName.charAt(0) == ".") {
+ var base = parentId.split("/").slice(0, -1).join("/");
+ moduleName = (base ? base + "/" : "") + moduleName;
+
+ while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
+ var previous = moduleName;
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ }
+ }
+
+ return moduleName;
+};
+
+window.require = function require(parentId, id) {
+ if (!id) {
+ id = parentId;
+ parentId = null;
+ }
+ if (!id.charAt)
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+ id = window.normalizeModule(parentId, id);
+
+ var module = window.require.modules[id];
+ if (module) {
+ if (!module.initialized) {
+ module.initialized = true;
+ module.exports = module.factory().exports;
+ }
+ return module.exports;
+ }
+
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+
+ var path = resolveModuleId(id, window.require.tlns);
+ if (path.slice(-3) != ".js") path += ".js";
+
+ window.require.id = id;
+ window.require.modules[id] = {}; // prevent infinite loop on broken modules
+ importScripts(path);
+ return window.require(parentId, id);
+};
+function resolveModuleId(id, paths) {
+ var testPath = id, tail = "";
+ while (testPath) {
+ var alias = paths[testPath];
+ if (typeof alias == "string") {
+ return alias + tail;
+ } else if (alias) {
+ return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name);
+ } else if (alias === false) {
+ return "";
+ }
+ var i = testPath.lastIndexOf("/");
+ if (i === -1) break;
+ tail = testPath.substr(i) + tail;
+ testPath = testPath.slice(0, i);
+ }
+ return id;
+}
+window.require.modules = {};
+window.require.tlns = {};
+
+window.define = function(id, deps, factory) {
+ if (arguments.length == 2) {
+ factory = deps;
+ if (typeof id != "string") {
+ deps = id;
+ id = window.require.id;
+ }
+ } else if (arguments.length == 1) {
+ factory = id;
+ deps = [];
+ id = window.require.id;
+ }
+
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject "require", "exports" and
+ // "module" as dependencies, to provide CommonJS compatibility.
+ deps = ["require", "exports", "module"];
+
+ var req = function(childId) {
+ return window.require(id, childId);
+ };
+
+ window.require.modules[id] = {
+ exports: {},
+ factory: function() {
+ var module = this;
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch (dep) {
+ // Because "require", "exports" and "module" aren't actual
+ // dependencies, we must handle them seperately.
+ case "require": return req;
+ case "exports": return module.exports;
+ case "module": return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
+ if (returnExports)
+ module.exports = returnExports;
+ return module;
+ }
+ };
+};
+window.define.amd = {};
+require.tlns = {};
+window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
+ for (var i in topLevelNamespaces)
+ require.tlns[i] = topLevelNamespaces[i];
+};
+
+window.initSender = function initSender() {
+
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("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 = window.main = null;
+var sender = window.sender = null;
+
+window.onmessage = function(e) {
+ var msg = e.data;
+ if (msg.event && sender) {
+ sender._signal(msg.event, msg.data);
+ }
+ else if (msg.command) {
+ if (main[msg.command])
+ main[msg.command].apply(main, msg.args);
+ else if (window[msg.command])
+ window[msg.command].apply(window, msg.args);
+ else
+ throw new Error("Unknown command:" + msg.command);
+ }
+ else if (msg.init) {
+ window.initBaseUrls(msg.tlns);
+ require("ace/lib/es5-shim");
+ sender = window.sender = window.initSender();
+ var clazz = require(msg.module)[msg.classname];
+ main = window.main = new clazz(sender);
+ }
+};
+})(this);
+
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.last = function(a) {
+ return a[a.length - 1];
+};
+
+exports.stringReverse = function(string) {
+ return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+ var result = '';
+ while (count > 0) {
+ if (count & 1)
+ result += string;
+
+ if (count >>= 1)
+ string += string;
+ }
+ return result;
+};
+
+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 deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
+ return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
+ }
+ if (Object.prototype.toString.call(obj) !== "[object Object]")
+ return obj;
+
+ copy = {};
+ for (var key in obj)
+ copy[key] = deepCopy(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;
+ };
+
+ deferred.isPending = function() {
+ return timer;
+ };
+
+ return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+ _self.schedule = _self;
+
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
+
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ _self.isPending = function() {
+ return timer;
+ };
+
+ return _self;
+};
+});
+
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+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};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
+
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {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
+ );
+ };
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
+ };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
+
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+
+
+exports.Range = Range;
+});
+
+ace.define("ace/apply_delta",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+function throwDeltaError(delta, errorText){
+ console.log("Invalid Delta:", delta);
+ throw "Invalid Delta: " + errorText;
+}
+
+function positionInDocument(docLines, position) {
+ return position.row >= 0 && position.row < docLines.length &&
+ position.column >= 0 && position.column <= docLines[position.row].length;
+}
+
+function validateDelta(docLines, delta) {
+ if (delta.action != "insert" && delta.action != "remove")
+ throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
+ if (!(delta.lines instanceof Array))
+ throwDeltaError(delta, "delta.lines must be an Array");
+ if (!delta.start || !delta.end)
+ throwDeltaError(delta, "delta.start/end must be an present");
+ var start = delta.start;
+ if (!positionInDocument(docLines, delta.start))
+ throwDeltaError(delta, "delta.start must be contained in document");
+ var end = delta.end;
+ if (delta.action == "remove" && !positionInDocument(docLines, end))
+ throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
+ var numRangeRows = end.row - start.row;
+ var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
+ if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
+ throwDeltaError(delta, "delta.range must match delta lines");
+}
+
+exports.applyDelta = function(docLines, delta, doNotValidate) {
+
+ var row = delta.start.row;
+ var startColumn = delta.start.column;
+ var line = docLines[row] || "";
+ switch (delta.action) {
+ case "insert":
+ var lines = delta.lines;
+ if (lines.length === 1) {
+ docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
+ } else {
+ var args = [row, 1].concat(delta.lines);
+ docLines.splice.apply(docLines, args);
+ docLines[row] = line.substring(0, startColumn) + docLines[row];
+ docLines[row + delta.lines.length - 1] += line.substring(startColumn);
+ }
+ break;
+ case "remove":
+ var endColumn = delta.end.column;
+ var endRow = delta.end.row;
+ if (row === endRow) {
+ docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
+ } else {
+ docLines.splice(
+ row, endRow - row + 1,
+ line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
+ );
+ }
+ break;
+ }
+}
+});
+
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
+
+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 = stopPropagation;
+ if (!e.preventDefault)
+ e.preventDefault = preventDefault;
+
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e, this);
+ if (e.propagationStopped)
+ break;
+ }
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e, this);
+};
+
+
+EventEmitter._signal = function(eventName, e) {
+ var listeners = (this._eventRegistry || {})[eventName];
+ if (!listeners)
+ return;
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++)
+ listeners[i](e, this);
+};
+
+EventEmitter.once = function(eventName, callback) {
+ var _self = this;
+ callback && this.addEventListener(eventName, function newCallback() {
+ _self.removeEventListener(eventName, newCallback);
+ callback.apply(null, arguments);
+ });
+};
+
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ handlers = this._defaultHandlers = {_disabled_: {}};
+
+ if (handlers[eventName]) {
+ var old = handlers[eventName];
+ var disabled = handlers._disabled_[eventName];
+ if (!disabled)
+ handlers._disabled_[eventName] = disabled = [];
+ disabled.push(old);
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+ handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ return;
+ var disabled = handlers._disabled_[eventName];
+
+ if (handlers[eventName] == callback) {
+ var old = handlers[eventName];
+ if (disabled)
+ this.setDefaultHandler(eventName, disabled.pop());
+ } else if (disabled) {
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
+
+ if (listeners.indexOf(callback) == -1)
+ listeners[capturing ? "unshift" : "push"](callback);
+ return callback;
+};
+
+EventEmitter.off =
+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/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;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+ this.getDocument = function() {
+ return this.document;
+ };
+ this.$insertRight = false;
+ this.onChange = function(delta) {
+ if (delta.start.row == delta.end.row && delta.start.row != this.row)
+ return;
+
+ if (delta.start.row > this.row)
+ return;
+
+ var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
+ this.setPosition(point.row, point.column, true);
+ };
+
+ function $pointsInOrder(point1, point2, equalPointsInOrder) {
+ var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
+ return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
+ }
+
+ function $getTransformedPoint(delta, point, moveIfEqual) {
+ var deltaIsInsert = delta.action == "insert";
+ var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
+ var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
+ var deltaStart = delta.start;
+ var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
+ if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
+ return {
+ row: point.row,
+ column: point.column
+ };
+ }
+ if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
+ return {
+ row: point.row + deltaRowShift,
+ column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
+ };
+ }
+
+ return {
+ row: deltaStart.row,
+ column: deltaStart.column
+ };
+ }
+ 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._signal("change", {
+ old: old,
+ value: pos
+ });
+ };
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
+ };
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("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/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var applyDelta = require("./apply_delta").applyDelta;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(textOrLines) {
+ this.$lines = [""];
+ if (textOrLines.length === 0) {
+ this.$lines = [""];
+ } else if (Array.isArray(textOrLines)) {
+ this.insertMergedLines({row: 0, column: 0}, textOrLines);
+ } else {
+ this.insert({row: 0, column:0}, textOrLines);
+ }
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setValue = function(text) {
+ var len = this.getLength() - 1;
+ this.remove(new Range(0, 0, len, this.getLine(len).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);
+ this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
+ };
+ this.getNewLineCharacter = function() {
+ switch (this.$newLineMode) {
+ case "windows":
+ return "\r\n";
+ case "unix":
+ return "\n";
+ default:
+ return this.$autoNewLine || "\n";
+ }
+ };
+
+ this.$autoNewLine = "";
+ this.$newLineMode = "auto";
+ this.setNewLineMode = function(newLineMode) {
+ if (this.$newLineMode === newLineMode)
+ return;
+
+ this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
+ };
+ 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) {
+ return this.getLinesForRange(range).join(this.getNewLineCharacter());
+ };
+ this.getLinesForRange = function(range) {
+ var lines;
+ if (range.start.row === range.end.row) {
+ lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
+ } else {
+ lines = this.getLines(range.start.row, range.end.row);
+ lines[0] = (lines[0] || "").substring(range.start.column);
+ var l = lines.length - 1;
+ if (range.end.row - range.start.row == l)
+ lines[l] = lines[l].substring(0, range.end.column);
+ }
+ return lines;
+ };
+ this.insertLines = function(row, lines) {
+ console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
+ return this.insertFullLines(row, lines);
+ };
+ this.removeLines = function(firstRow, lastRow) {
+ console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
+ return this.removeFullLines(firstRow, lastRow);
+ };
+ this.insertNewLine = function(position) {
+ console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
+ return this.insertMergedLines(position, ["", ""]);
+ };
+ this.insert = function(position, text) {
+ if (this.getLength() <= 1)
+ this.$detectNewLine(text);
+
+ return this.insertMergedLines(position, this.$split(text));
+ };
+ this.insertInLine = function(position, text) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = this.pos(position.row, position.column + text.length);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: [text]
+ }, true);
+
+ return this.clonePos(end);
+ };
+
+ this.clippedPos = function(row, column) {
+ var length = this.getLength();
+ if (row === undefined) {
+ row = length;
+ } else if (row < 0) {
+ row = 0;
+ } else if (row >= length) {
+ row = length - 1;
+ column = undefined;
+ }
+ var line = this.getLine(row);
+ if (column == undefined)
+ column = line.length;
+ column = Math.min(Math.max(column, 0), line.length);
+ return {row: row, column: column};
+ };
+
+ this.clonePos = function(pos) {
+ return {row: pos.row, column: pos.column};
+ };
+
+ this.pos = function(row, column) {
+ return {row: row, column: column};
+ };
+
+ 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;
+ } else {
+ position.row = Math.max(0, position.row);
+ position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
+ }
+ return position;
+ };
+ this.insertFullLines = function(row, lines) {
+ row = Math.min(Math.max(row, 0), this.getLength());
+ var column = 0;
+ if (row < this.getLength()) {
+ lines = lines.concat([""]);
+ column = 0;
+ } else {
+ lines = [""].concat(lines);
+ row--;
+ column = this.$lines[row].length;
+ }
+ this.insertMergedLines({row: row, column: column}, lines);
+ };
+ this.insertMergedLines = function(position, lines) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = {
+ row: start.row + lines.length - 1,
+ column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
+ };
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: lines
+ });
+
+ return this.clonePos(end);
+ };
+ this.remove = function(range) {
+ var start = this.clippedPos(range.start.row, range.start.column);
+ var end = this.clippedPos(range.end.row, range.end.column);
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ });
+ return this.clonePos(start);
+ };
+ this.removeInLine = function(row, startColumn, endColumn) {
+ var start = this.clippedPos(row, startColumn);
+ var end = this.clippedPos(row, endColumn);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ }, true);
+
+ return this.clonePos(start);
+ };
+ this.removeFullLines = function(firstRow, lastRow) {
+ firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
+ lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
+ var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
+ var deleteLastNewLine = lastRow < this.getLength() - 1;
+ var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );
+ var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );
+ var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );
+ var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length );
+ var range = new Range(startRow, startCol, endRow, endCol);
+ var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
+
+ this.applyDelta({
+ start: range.start,
+ end: range.end,
+ action: "remove",
+ lines: this.getLinesForRange(range)
+ });
+ return deletedLines;
+ };
+ this.removeNewLine = function(row) {
+ if (row < this.getLength() - 1 && row >= 0) {
+ this.applyDelta({
+ start: this.pos(row, this.getLine(row).length),
+ end: this.pos(row + 1, 0),
+ action: "remove",
+ lines: ["", ""]
+ });
+ }
+ };
+ this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
+ if (text.length === 0 && range.isEmpty())
+ return range.start;
+ if (text == this.getTextRange(range))
+ return range.end;
+
+ this.remove(range);
+ var end;
+ if (text) {
+ end = this.insert(range.start, text);
+ }
+ else {
+ end = range.start;
+ }
+
+ return end;
+ };
+ this.applyDeltas = function(deltas) {
+ for (var i=0; i<deltas.length; i++) {
+ this.applyDelta(deltas[i]);
+ }
+ };
+ this.revertDeltas = function(deltas) {
+ for (var i=deltas.length-1; i>=0; i--) {
+ this.revertDelta(deltas[i]);
+ }
+ };
+ this.applyDelta = function(delta, doNotValidate) {
+ var isInsert = delta.action == "insert";
+ if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
+ : !Range.comparePoints(delta.start, delta.end)) {
+ return;
+ }
+
+ if (isInsert && delta.lines.length > 20000)
+ this.$splitAndapplyLargeDelta(delta, 20000);
+ applyDelta(this.$lines, delta, doNotValidate);
+ this._signal("change", delta);
+ };
+
+ this.$splitAndapplyLargeDelta = function(delta, MAX) {
+ var lines = delta.lines;
+ var l = lines.length;
+ var row = delta.start.row;
+ var column = delta.start.column;
+ var from = 0, to = 0;
+ do {
+ from = to;
+ to += MAX - 1;
+ var chunk = lines.slice(from, to);
+ if (to > l) {
+ delta.lines = chunk;
+ delta.start.row = row + from;
+ delta.start.column = column;
+ break;
+ }
+ chunk.push("");
+ this.applyDelta({
+ start: this.pos(row + from, column),
+ end: this.pos(row + to, column = 0),
+ action: delta.action,
+ lines: chunk
+ }, true);
+ } while(true);
+ };
+ this.revertDelta = function(delta) {
+ this.applyDelta({
+ start: this.clonePos(delta.start),
+ end: this.clonePos(delta.end),
+ action: (delta.action == "insert" ? "remove" : "insert"),
+ lines: delta.lines.slice()
+ });
+ };
+ 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 + newlineLength;
+
+ return index + pos.column;
+ };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+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.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ var data = e.data;
+ if (data[0].start) {
+ doc.applyDeltas(data);
+ } else {
+ for (var i = 0; i < data.length; i += 2) {
+ if (Array.isArray(data[i+1])) {
+ var d = {action: "insert", start: data[i], lines: data[i+1]};
+ } else {
+ var d = {action: "remove", start: data[i], end: data[i+1]};
+ }
+ doc.applyDelta(d, true);
+ }
+ }
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
+};
+
+(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() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+ace.define("ace/mode/css/csslint",["require","exports","module"], function(require, exports, module) {
+var parserlib = {};
+(function(){
+function EventTarget(){
+ this._listeners = {};
+}
+
+EventTarget.prototype = {
+ constructor: EventTarget,
+ addListener: function(type, listener){
+ if (!this._listeners[type]){
+ this._listeners[type] = [];
+ }
+
+ this._listeners[type].push(listener);
+ },
+ fire: function(event){
+ if (typeof event == "string"){
+ event = { type: event };
+ }
+ if (typeof event.target != "undefined"){
+ event.target = this;
+ }
+
+ if (typeof event.type == "undefined"){
+ throw new Error("Event object missing 'type' property.");
+ }
+
+ if (this._listeners[event.type]){
+ var listeners = this._listeners[event.type].concat();
+ for (var i=0, len=listeners.length; i < len; i++){
+ listeners[i].call(this, event);
+ }
+ }
+ },
+ removeListener: function(type, listener){
+ if (this._listeners[type]){
+ var listeners = this._listeners[type];
+ for (var i=0, len=listeners.length; i < len; i++){
+ if (listeners[i] === listener){
+ listeners.splice(i, 1);
+ break;
+ }
+ }
+
+
+ }
+ }
+};
+function StringReader(text){
+ this._input = text.replace(/\n\r?/g, "\n");
+ this._line = 1;
+ this._col = 1;
+ this._cursor = 0;
+}
+
+StringReader.prototype = {
+ constructor: StringReader,
+ getCol: function(){
+ return this._col;
+ },
+ getLine: function(){
+ return this._line ;
+ },
+ eof: function(){
+ return (this._cursor == this._input.length);
+ },
+ peek: function(count){
+ var c = null;
+ count = (typeof count == "undefined" ? 1 : count);
+ if (this._cursor < this._input.length){
+ c = this._input.charAt(this._cursor + count - 1);
+ }
+
+ return c;
+ },
+ read: function(){
+ var c = null;
+ if (this._cursor < this._input.length){
+ if (this._input.charAt(this._cursor) == "\n"){
+ this._line++;
+ this._col=1;
+ } else {
+ this._col++;
+ }
+ c = this._input.charAt(this._cursor++);
+ }
+
+ return c;
+ },
+ mark: function(){
+ this._bookmark = {
+ cursor: this._cursor,
+ line: this._line,
+ col: this._col
+ };
+ },
+
+ reset: function(){
+ if (this._bookmark){
+ this._cursor = this._bookmark.cursor;
+ this._line = this._bookmark.line;
+ this._col = this._bookmark.col;
+ delete this._bookmark;
+ }
+ },
+ readTo: function(pattern){
+
+ var buffer = "",
+ c;
+ while (buffer.length < pattern.length || buffer.lastIndexOf(pattern) != buffer.length - pattern.length){
+ c = this.read();
+ if (c){
+ buffer += c;
+ } else {
+ throw new Error("Expected \"" + pattern + "\" at line " + this._line + ", col " + this._col + ".");
+ }
+ }
+
+ return buffer;
+
+ },
+ readWhile: function(filter){
+
+ var buffer = "",
+ c = this.read();
+
+ while(c !== null && filter(c)){
+ buffer += c;
+ c = this.read();
+ }
+
+ return buffer;
+
+ },
+ readMatch: function(matcher){
+
+ var source = this._input.substring(this._cursor),
+ value = null;
+ if (typeof matcher == "string"){
+ if (source.indexOf(matcher) === 0){
+ value = this.readCount(matcher.length);
+ }
+ } else if (matcher instanceof RegExp){
+ if (matcher.test(source)){
+ value = this.readCount(RegExp.lastMatch.length);
+ }
+ }
+
+ return value;
+ },
+ readCount: function(count){
+ var buffer = "";
+
+ while(count--){
+ buffer += this.read();
+ }
+
+ return buffer;
+ }
+
+};
+function SyntaxError(message, line, col){
+ this.col = col;
+ this.line = line;
+ this.message = message;
+
+}
+SyntaxError.prototype = new Error();
+function SyntaxUnit(text, line, col, type){
+ this.col = col;
+ this.line = line;
+ this.text = text;
+ this.type = type;
+}
+SyntaxUnit.fromToken = function(token){
+ return new SyntaxUnit(token.value, token.startLine, token.startCol);
+};
+
+SyntaxUnit.prototype = {
+ constructor: SyntaxUnit,
+ valueOf: function(){
+ return this.text;
+ },
+ toString: function(){
+ return this.text;
+ }
+
+};
+function TokenStreamBase(input, tokenData){
+ this._reader = input ? new StringReader(input.toString()) : null;
+ this._token = null;
+ this._tokenData = tokenData;
+ this._lt = [];
+ this._ltIndex = 0;
+
+ this._ltIndexCache = [];
+}
+TokenStreamBase.createTokenData = function(tokens){
+
+ var nameMap = [],
+ typeMap = {},
+ tokenData = tokens.concat([]),
+ i = 0,
+ len = tokenData.length+1;
+
+ tokenData.UNKNOWN = -1;
+ tokenData.unshift({name:"EOF"});
+
+ for (; i < len; i++){
+ nameMap.push(tokenData[i].name);
+ tokenData[tokenData[i].name] = i;
+ if (tokenData[i].text){
+ typeMap[tokenData[i].text] = i;
+ }
+ }
+
+ tokenData.name = function(tt){
+ return nameMap[tt];
+ };
+
+ tokenData.type = function(c){
+ return typeMap[c];
+ };
+
+ return tokenData;
+};
+
+TokenStreamBase.prototype = {
+ constructor: TokenStreamBase,
+ match: function(tokenTypes, channel){
+ if (!(tokenTypes instanceof Array)){
+ tokenTypes = [tokenTypes];
+ }
+
+ var tt = this.get(channel),
+ i = 0,
+ len = tokenTypes.length;
+
+ while(i < len){
+ if (tt == tokenTypes[i++]){
+ return true;
+ }
+ }
+ this.unget();
+ return false;
+ },
+ mustMatch: function(tokenTypes, channel){
+
+ var token;
+ if (!(tokenTypes instanceof Array)){
+ tokenTypes = [tokenTypes];
+ }
+
+ if (!this.match.apply(this, arguments)){
+ token = this.LT(1);
+ throw new SyntaxError("Expected " + this._tokenData[tokenTypes[0]].name +
+ " at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol);
+ }
+ },
+ advance: function(tokenTypes, channel){
+
+ while(this.LA(0) !== 0 && !this.match(tokenTypes, channel)){
+ this.get();
+ }
+
+ return this.LA(0);
+ },
+ get: function(channel){
+
+ var tokenInfo = this._tokenData,
+ reader = this._reader,
+ value,
+ i =0,
+ len = tokenInfo.length,
+ found = false,
+ token,
+ info;
+ if (this._lt.length && this._ltIndex >= 0 && this._ltIndex < this._lt.length){
+
+ i++;
+ this._token = this._lt[this._ltIndex++];
+ info = tokenInfo[this._token.type];
+ while((info.channel !== undefined && channel !== info.channel) &&
+ this._ltIndex < this._lt.length){
+ this._token = this._lt[this._ltIndex++];
+ info = tokenInfo[this._token.type];
+ i++;
+ }
+ if ((info.channel === undefined || channel === info.channel) &&
+ this._ltIndex <= this._lt.length){
+ this._ltIndexCache.push(i);
+ return this._token.type;
+ }
+ }
+ token = this._getToken();
+ if (token.type > -1 && !tokenInfo[token.type].hide){
+ token.channel = tokenInfo[token.type].channel;
+ this._token = token;
+ this._lt.push(token);
+ this._ltIndexCache.push(this._lt.length - this._ltIndex + i);
+ if (this._lt.length > 5){
+ this._lt.shift();
+ }
+ if (this._ltIndexCache.length > 5){
+ this._ltIndexCache.shift();
+ }
+ this._ltIndex = this._lt.length;
+ }
+ info = tokenInfo[token.type];
+ if (info &&
+ (info.hide ||
+ (info.channel !== undefined && channel !== info.channel))){
+ return this.get(channel);
+ } else {
+ return token.type;
+ }
+ },
+ LA: function(index){
+ var total = index,
+ tt;
+ if (index > 0){
+ if (index > 5){
+ throw new Error("Too much lookahead.");
+ }
+ while(total){
+ tt = this.get();
+ total--;
+ }
+ while(total < index){
+ this.unget();
+ total++;
+ }
+ } else if (index < 0){
+
+ if(this._lt[this._ltIndex+index]){
+ tt = this._lt[this._ltIndex+index].type;
+ } else {
+ throw new Error("Too much lookbehind.");
+ }
+
+ } else {
+ tt = this._token.type;
+ }
+
+ return tt;
+
+ },
+ LT: function(index){
+ this.LA(index);
+ return this._lt[this._ltIndex+index-1];
+ },
+ peek: function(){
+ return this.LA(1);
+ },
+ token: function(){
+ return this._token;
+ },
+ tokenName: function(tokenType){
+ if (tokenType < 0 || tokenType > this._tokenData.length){
+ return "UNKNOWN_TOKEN";
+ } else {
+ return this._tokenData[tokenType].name;
+ }
+ },
+ tokenType: function(tokenName){
+ return this._tokenData[tokenName] || -1;
+ },
+ unget: function(){
+ if (this._ltIndexCache.length){
+ this._ltIndex -= this._ltIndexCache.pop();//--;
+ this._token = this._lt[this._ltIndex - 1];
+ } else {
+ throw new Error("Too much lookahead.");
+ }
+ }
+
+};
+
+
+parserlib.util = {
+StringReader: StringReader,
+SyntaxError : SyntaxError,
+SyntaxUnit : SyntaxUnit,
+EventTarget : EventTarget,
+TokenStreamBase : TokenStreamBase
+};
+})();
+(function(){
+var EventTarget = parserlib.util.EventTarget,
+TokenStreamBase = parserlib.util.TokenStreamBase,
+StringReader = parserlib.util.StringReader,
+SyntaxError = parserlib.util.SyntaxError,
+SyntaxUnit = parserlib.util.SyntaxUnit;
+
+var Colors = {
+ aliceblue :"#f0f8ff",
+ antiquewhite :"#faebd7",
+ aqua :"#00ffff",
+ aquamarine :"#7fffd4",
+ azure :"#f0ffff",
+ beige :"#f5f5dc",
+ bisque :"#ffe4c4",
+ black :"#000000",
+ blanchedalmond :"#ffebcd",
+ blue :"#0000ff",
+ blueviolet :"#8a2be2",
+ brown :"#a52a2a",
+ burlywood :"#deb887",
+ cadetblue :"#5f9ea0",
+ chartreuse :"#7fff00",
+ chocolate :"#d2691e",
+ coral :"#ff7f50",
+ cornflowerblue :"#6495ed",
+ cornsilk :"#fff8dc",
+ crimson :"#dc143c",
+ cyan :"#00ffff",
+ darkblue :"#00008b",
+ darkcyan :"#008b8b",
+ darkgoldenrod :"#b8860b",
+ darkgray :"#a9a9a9",
+ darkgrey :"#a9a9a9",
+ darkgreen :"#006400",
+ darkkhaki :"#bdb76b",
+ darkmagenta :"#8b008b",
+ darkolivegreen :"#556b2f",
+ darkorange :"#ff8c00",
+ darkorchid :"#9932cc",
+ darkred :"#8b0000",
+ darksalmon :"#e9967a",
+ darkseagreen :"#8fbc8f",
+ darkslateblue :"#483d8b",
+ darkslategray :"#2f4f4f",
+ darkslategrey :"#2f4f4f",
+ darkturquoise :"#00ced1",
+ darkviolet :"#9400d3",
+ deeppink :"#ff1493",
+ deepskyblue :"#00bfff",
+ dimgray :"#696969",
+ dimgrey :"#696969",
+ dodgerblue :"#1e90ff",
+ firebrick :"#b22222",
+ floralwhite :"#fffaf0",
+ forestgreen :"#228b22",
+ fuchsia :"#ff00ff",
+ gainsboro :"#dcdcdc",
+ ghostwhite :"#f8f8ff",
+ gold :"#ffd700",
+ goldenrod :"#daa520",
+ gray :"#808080",
+ grey :"#808080",
+ green :"#008000",
+ greenyellow :"#adff2f",
+ honeydew :"#f0fff0",
+ hotpink :"#ff69b4",
+ indianred :"#cd5c5c",
+ indigo :"#4b0082",
+ ivory :"#fffff0",
+ khaki :"#f0e68c",
+ lavender :"#e6e6fa",
+ lavenderblush :"#fff0f5",
+ lawngreen :"#7cfc00",
+ lemonchiffon :"#fffacd",
+ lightblue :"#add8e6",
+ lightcoral :"#f08080",
+ lightcyan :"#e0ffff",
+ lightgoldenrodyellow :"#fafad2",
+ lightgray :"#d3d3d3",
+ lightgrey :"#d3d3d3",
+ lightgreen :"#90ee90",
+ lightpink :"#ffb6c1",
+ lightsalmon :"#ffa07a",
+ lightseagreen :"#20b2aa",
+ lightskyblue :"#87cefa",
+ lightslategray :"#778899",
+ lightslategrey :"#778899",
+ lightsteelblue :"#b0c4de",
+ lightyellow :"#ffffe0",
+ lime :"#00ff00",
+ limegreen :"#32cd32",
+ linen :"#faf0e6",
+ magenta :"#ff00ff",
+ maroon :"#800000",
+ mediumaquamarine:"#66cdaa",
+ mediumblue :"#0000cd",
+ mediumorchid :"#ba55d3",
+ mediumpurple :"#9370d8",
+ mediumseagreen :"#3cb371",
+ mediumslateblue :"#7b68ee",
+ mediumspringgreen :"#00fa9a",
+ mediumturquoise :"#48d1cc",
+ mediumvioletred :"#c71585",
+ midnightblue :"#191970",
+ mintcream :"#f5fffa",
+ mistyrose :"#ffe4e1",
+ moccasin :"#ffe4b5",
+ navajowhite :"#ffdead",
+ navy :"#000080",
+ oldlace :"#fdf5e6",
+ olive :"#808000",
+ olivedrab :"#6b8e23",
+ orange :"#ffa500",
+ orangered :"#ff4500",
+ orchid :"#da70d6",
+ palegoldenrod :"#eee8aa",
+ palegreen :"#98fb98",
+ paleturquoise :"#afeeee",
+ palevioletred :"#d87093",
+ papayawhip :"#ffefd5",
+ peachpuff :"#ffdab9",
+ peru :"#cd853f",
+ pink :"#ffc0cb",
+ plum :"#dda0dd",
+ powderblue :"#b0e0e6",
+ purple :"#800080",
+ red :"#ff0000",
+ rosybrown :"#bc8f8f",
+ royalblue :"#4169e1",
+ saddlebrown :"#8b4513",
+ salmon :"#fa8072",
+ sandybrown :"#f4a460",
+ seagreen :"#2e8b57",
+ seashell :"#fff5ee",
+ sienna :"#a0522d",
+ silver :"#c0c0c0",
+ skyblue :"#87ceeb",
+ slateblue :"#6a5acd",
+ slategray :"#708090",
+ slategrey :"#708090",
+ snow :"#fffafa",
+ springgreen :"#00ff7f",
+ steelblue :"#4682b4",
+ tan :"#d2b48c",
+ teal :"#008080",
+ thistle :"#d8bfd8",
+ tomato :"#ff6347",
+ turquoise :"#40e0d0",
+ violet :"#ee82ee",
+ wheat :"#f5deb3",
+ white :"#ffffff",
+ whitesmoke :"#f5f5f5",
+ yellow :"#ffff00",
+ yellowgreen :"#9acd32",
+ activeBorder :"Active window border.",
+ activecaption :"Active window caption.",
+ appworkspace :"Background color of multiple document interface.",
+ background :"Desktop background.",
+ buttonface :"The face background color for 3-D elements that appear 3-D due to one layer of surrounding border.",
+ buttonhighlight :"The color of the border facing the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",
+ buttonshadow :"The color of the border away from the light source for 3-D elements that appear 3-D due to one layer of surrounding border.",
+ buttontext :"Text on push buttons.",
+ captiontext :"Text in caption, size box, and scrollbar arrow box.",
+ graytext :"Grayed (disabled) text. This color is set to #000 if the current display driver does not support a solid gray color.",
+ greytext :"Greyed (disabled) text. This color is set to #000 if the current display driver does not support a solid grey color.",
+ highlight :"Item(s) selected in a control.",
+ highlighttext :"Text of item(s) selected in a control.",
+ inactiveborder :"Inactive window border.",
+ inactivecaption :"Inactive window caption.",
+ inactivecaptiontext :"Color of text in an inactive caption.",
+ infobackground :"Background color for tooltip controls.",
+ infotext :"Text color for tooltip controls.",
+ menu :"Menu background.",
+ menutext :"Text in menus.",
+ scrollbar :"Scroll bar gray area.",
+ threeddarkshadow :"The color of the darker (generally outer) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
+ threedface :"The face background color for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
+ threedhighlight :"The color of the lighter (generally outer) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
+ threedlightshadow :"The color of the darker (generally inner) of the two borders facing the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
+ threedshadow :"The color of the lighter (generally inner) of the two borders away from the light source for 3-D elements that appear 3-D due to two concentric layers of surrounding border.",
+ window :"Window background.",
+ windowframe :"Window frame.",
+ windowtext :"Text in windows."
+};
+function Combinator(text, line, col){
+
+ SyntaxUnit.call(this, text, line, col, Parser.COMBINATOR_TYPE);
+ this.type = "unknown";
+ if (/^\s+$/.test(text)){
+ this.type = "descendant";
+ } else if (text == ">"){
+ this.type = "child";
+ } else if (text == "+"){
+ this.type = "adjacent-sibling";
+ } else if (text == "~"){
+ this.type = "sibling";
+ }
+
+}
+
+Combinator.prototype = new SyntaxUnit();
+Combinator.prototype.constructor = Combinator;
+function MediaFeature(name, value){
+
+ SyntaxUnit.call(this, "(" + name + (value !== null ? ":" + value : "") + ")", name.startLine, name.startCol, Parser.MEDIA_FEATURE_TYPE);
+ this.name = name;
+ this.value = value;
+}
+
+MediaFeature.prototype = new SyntaxUnit();
+MediaFeature.prototype.constructor = MediaFeature;
+function MediaQuery(modifier, mediaType, features, line, col){
+
+ SyntaxUnit.call(this, (modifier ? modifier + " ": "") + (mediaType ? mediaType : "") + (mediaType && features.length > 0 ? " and " : "") + features.join(" and "), line, col, Parser.MEDIA_QUERY_TYPE);
+ this.modifier = modifier;
+ this.mediaType = mediaType;
+ this.features = features;
+
+}
+
+MediaQuery.prototype = new SyntaxUnit();
+MediaQuery.prototype.constructor = MediaQuery;
+function Parser(options){
+ EventTarget.call(this);
+
+
+ this.options = 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 = {
+ 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,
+
+ _stylesheet: function(){
+
+ var tokenStream = this._tokenStream,
+ charset = null,
+ count,
+ token,
+ tt;
+
+ this.fire("startstylesheet");
+ this._charset();
+
+ this._skipCruft();
+ while (tokenStream.peek() == Tokens.IMPORT_SYM){
+ this._import();
+ this._skipCruft();
+ }
+ while (tokenStream.peek() == Tokens.NAMESPACE_SYM){
+ this._namespace();
+ this._skipCruft();
+ }
+ tt = tokenStream.peek();
+ while(tt > Tokens.EOF){
+
+ try {
+
+ switch(tt){
+ case Tokens.MEDIA_SYM:
+ this._media();
+ this._skipCruft();
+ break;
+ case Tokens.PAGE_SYM:
+ this._page();
+ this._skipCruft();
+ break;
+ case Tokens.FONT_FACE_SYM:
+ this._font_face();
+ this._skipCruft();
+ break;
+ case Tokens.KEYFRAMES_SYM:
+ this._keyframes();
+ this._skipCruft();
+ break;
+ case Tokens.VIEWPORT_SYM:
+ this._viewport();
+ this._skipCruft();
+ 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()){
+ switch(tt){
+ case Tokens.CHARSET_SYM:
+ token = tokenStream.LT(1);
+ this._charset(false);
+ throw new SyntaxError("@charset not allowed here.", token.startLine, token.startCol);
+ case Tokens.IMPORT_SYM:
+ token = tokenStream.LT(1);
+ this._import(false);
+ throw new SyntaxError("@import not allowed here.", token.startLine, token.startCol);
+ case Tokens.NAMESPACE_SYM:
+ token = tokenStream.LT(1);
+ this._namespace(false);
+ throw new SyntaxError("@namespace not allowed here.", token.startLine, token.startCol);
+ default:
+ tokenStream.get(); //get the last token
+ this._unexpectedToken(tokenStream.token());
+ }
+
+ }
+ }
+ } catch(ex) {
+ if (ex instanceof SyntaxError && !this.options.strict){
+ this.fire({
+ type: "error",
+ error: ex,
+ message: ex.message,
+ line: ex.line,
+ col: ex.col
+ });
+ } else {
+ throw ex;
+ }
+ }
+
+ tt = tokenStream.peek();
+ }
+
+ if (tt != Tokens.EOF){
+ this._unexpectedToken(tokenStream.token());
+ }
+
+ this.fire("endstylesheet");
+ },
+
+ _charset: function(emit){
+ var tokenStream = this._tokenStream,
+ charset,
+ token,
+ line,
+ col;
+
+ if (tokenStream.match(Tokens.CHARSET_SYM)){
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+
+ this._readWhitespace();
+ tokenStream.mustMatch(Tokens.STRING);
+
+ token = tokenStream.token();
+ charset = token.value;
+
+ this._readWhitespace();
+ tokenStream.mustMatch(Tokens.SEMICOLON);
+
+ if (emit !== false){
+ this.fire({
+ type: "charset",
+ charset:charset,
+ line: line,
+ col: col
+ });
+ }
+ }
+ },
+
+ _import: function(emit){
+
+ var tokenStream = this._tokenStream,
+ tt,
+ uri,
+ importToken,
+ mediaList = [];
+ tokenStream.mustMatch(Tokens.IMPORT_SYM);
+ importToken = tokenStream.token();
+ this._readWhitespace();
+
+ tokenStream.mustMatch([Tokens.STRING, Tokens.URI]);
+ uri = tokenStream.token().value.replace(/^(?:url\()?["']?([^"']+?)["']?\)?$/, "$1");
+
+ this._readWhitespace();
+
+ mediaList = this._media_query_list();
+ tokenStream.mustMatch(Tokens.SEMICOLON);
+ this._readWhitespace();
+
+ if (emit !== false){
+ this.fire({
+ type: "import",
+ uri: uri,
+ media: mediaList,
+ line: importToken.startLine,
+ col: importToken.startCol
+ });
+ }
+
+ },
+
+ _namespace: function(emit){
+
+ var tokenStream = this._tokenStream,
+ line,
+ col,
+ prefix,
+ uri;
+ tokenStream.mustMatch(Tokens.NAMESPACE_SYM);
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+ this._readWhitespace();
+ if (tokenStream.match(Tokens.IDENT)){
+ prefix = tokenStream.token().value;
+ this._readWhitespace();
+ }
+
+ tokenStream.mustMatch([Tokens.STRING, Tokens.URI]);
+ uri = tokenStream.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/, "$1");
+
+ this._readWhitespace();
+ tokenStream.mustMatch(Tokens.SEMICOLON);
+ this._readWhitespace();
+
+ if (emit !== false){
+ this.fire({
+ type: "namespace",
+ prefix: prefix,
+ uri: uri,
+ line: line,
+ col: col
+ });
+ }
+
+ },
+
+ _media: function(){
+ var tokenStream = this._tokenStream,
+ line,
+ col,
+ mediaList;// = [];
+ tokenStream.mustMatch(Tokens.MEDIA_SYM);
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+
+ this._readWhitespace();
+
+ mediaList = this._media_query_list();
+
+ tokenStream.mustMatch(Tokens.LBRACE);
+ this._readWhitespace();
+
+ this.fire({
+ type: "startmedia",
+ media: mediaList,
+ line: line,
+ col: col
+ });
+
+ while(true) {
+ if (tokenStream.peek() == Tokens.PAGE_SYM){
+ this._page();
+ } else if (tokenStream.peek() == Tokens.FONT_FACE_SYM){
+ this._font_face();
+ } else if (tokenStream.peek() == Tokens.VIEWPORT_SYM){
+ this._viewport();
+ } else if (!this._ruleset()){
+ break;
+ }
+ }
+
+ tokenStream.mustMatch(Tokens.RBRACE);
+ this._readWhitespace();
+
+ this.fire({
+ type: "endmedia",
+ media: mediaList,
+ line: line,
+ col: col
+ });
+ },
+ _media_query_list: function(){
+ var tokenStream = this._tokenStream,
+ mediaList = [];
+
+
+ this._readWhitespace();
+
+ if (tokenStream.peek() == Tokens.IDENT || tokenStream.peek() == Tokens.LPAREN){
+ mediaList.push(this._media_query());
+ }
+
+ while(tokenStream.match(Tokens.COMMA)){
+ this._readWhitespace();
+ mediaList.push(this._media_query());
+ }
+
+ return mediaList;
+ },
+ _media_query: function(){
+ var tokenStream = this._tokenStream,
+ type = null,
+ ident = null,
+ token = null,
+ expressions = [];
+
+ if (tokenStream.match(Tokens.IDENT)){
+ ident = tokenStream.token().value.toLowerCase();
+ if (ident != "only" && ident != "not"){
+ tokenStream.unget();
+ ident = null;
+ } else {
+ token = tokenStream.token();
+ }
+ }
+
+ this._readWhitespace();
+
+ if (tokenStream.peek() == Tokens.IDENT){
+ type = this._media_type();
+ if (token === null){
+ token = tokenStream.token();
+ }
+ } else if (tokenStream.peek() == Tokens.LPAREN){
+ if (token === null){
+ token = tokenStream.LT(1);
+ }
+ expressions.push(this._media_expression());
+ }
+
+ if (type === null && expressions.length === 0){
+ return null;
+ } else {
+ this._readWhitespace();
+ while (tokenStream.match(Tokens.IDENT)){
+ if (tokenStream.token().value.toLowerCase() != "and"){
+ this._unexpectedToken(tokenStream.token());
+ }
+
+ this._readWhitespace();
+ expressions.push(this._media_expression());
+ }
+ }
+
+ return new MediaQuery(ident, type, expressions, token.startLine, token.startCol);
+ },
+ _media_type: function(){
+ return this._media_feature();
+ },
+ _media_expression: function(){
+ var tokenStream = this._tokenStream,
+ feature = null,
+ token,
+ expression = null;
+
+ tokenStream.mustMatch(Tokens.LPAREN);
+ this._readWhitespace();
+
+ feature = this._media_feature();
+ this._readWhitespace();
+
+ if (tokenStream.match(Tokens.COLON)){
+ this._readWhitespace();
+ token = tokenStream.LT(1);
+ expression = this._expression();
+ }
+
+ tokenStream.mustMatch(Tokens.RPAREN);
+ this._readWhitespace();
+
+ return new MediaFeature(feature, (expression ? new SyntaxUnit(expression, token.startLine, token.startCol) : null));
+ },
+ _media_feature: function(){
+ var tokenStream = this._tokenStream;
+
+ tokenStream.mustMatch(Tokens.IDENT);
+
+ return SyntaxUnit.fromToken(tokenStream.token());
+ },
+ _page: function(){
+ var tokenStream = this._tokenStream,
+ line,
+ col,
+ identifier = null,
+ pseudoPage = null;
+ tokenStream.mustMatch(Tokens.PAGE_SYM);
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+
+ this._readWhitespace();
+
+ if (tokenStream.match(Tokens.IDENT)){
+ identifier = tokenStream.token().value;
+ if (identifier.toLowerCase() === "auto"){
+ this._unexpectedToken(tokenStream.token());
+ }
+ }
+ if (tokenStream.peek() == Tokens.COLON){
+ pseudoPage = this._pseudo_page();
+ }
+
+ this._readWhitespace();
+
+ this.fire({
+ type: "startpage",
+ id: identifier,
+ pseudo: pseudoPage,
+ line: line,
+ col: col
+ });
+
+ this._readDeclarations(true, true);
+
+ this.fire({
+ type: "endpage",
+ id: identifier,
+ pseudo: pseudoPage,
+ line: line,
+ col: col
+ });
+
+ },
+ _margin: function(){
+ var tokenStream = this._tokenStream,
+ line,
+ col,
+ marginSym = this._margin_sym();
+
+ if (marginSym){
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+
+ this.fire({
+ type: "startpagemargin",
+ margin: marginSym,
+ line: line,
+ col: col
+ });
+
+ this._readDeclarations(true);
+
+ this.fire({
+ type: "endpagemargin",
+ margin: marginSym,
+ line: line,
+ col: col
+ });
+ return true;
+ } else {
+ return false;
+ }
+ },
+ _margin_sym: function(){
+
+ var tokenStream = this._tokenStream;
+
+ if(tokenStream.match([Tokens.TOPLEFTCORNER_SYM, Tokens.TOPLEFT_SYM,
+ Tokens.TOPCENTER_SYM, Tokens.TOPRIGHT_SYM, Tokens.TOPRIGHTCORNER_SYM,
+ Tokens.BOTTOMLEFTCORNER_SYM, Tokens.BOTTOMLEFT_SYM,
+ Tokens.BOTTOMCENTER_SYM, Tokens.BOTTOMRIGHT_SYM,
+ Tokens.BOTTOMRIGHTCORNER_SYM, Tokens.LEFTTOP_SYM,
+ Tokens.LEFTMIDDLE_SYM, Tokens.LEFTBOTTOM_SYM, Tokens.RIGHTTOP_SYM,
+ Tokens.RIGHTMIDDLE_SYM, Tokens.RIGHTBOTTOM_SYM]))
+ {
+ return SyntaxUnit.fromToken(tokenStream.token());
+ } else {
+ return null;
+ }
+
+ },
+
+ _pseudo_page: function(){
+
+ var tokenStream = this._tokenStream;
+
+ tokenStream.mustMatch(Tokens.COLON);
+ tokenStream.mustMatch(Tokens.IDENT);
+
+ return tokenStream.token().value;
+ },
+
+ _font_face: function(){
+ var tokenStream = this._tokenStream,
+ line,
+ col;
+ tokenStream.mustMatch(Tokens.FONT_FACE_SYM);
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+
+ this._readWhitespace();
+
+ this.fire({
+ type: "startfontface",
+ line: line,
+ col: col
+ });
+
+ this._readDeclarations(true);
+
+ this.fire({
+ type: "endfontface",
+ line: line,
+ col: col
+ });
+ },
+
+ _viewport: function(){
+ var tokenStream = this._tokenStream,
+ line,
+ col;
+
+ tokenStream.mustMatch(Tokens.VIEWPORT_SYM);
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+
+ this._readWhitespace();
+
+ this.fire({
+ type: "startviewport",
+ line: line,
+ col: col
+ });
+
+ this._readDeclarations(true);
+
+ this.fire({
+ type: "endviewport",
+ line: line,
+ col: col
+ });
+
+ },
+
+ _operator: function(inFunction){
+
+ var tokenStream = this._tokenStream,
+ token = null;
+
+ if (tokenStream.match([Tokens.SLASH, Tokens.COMMA]) ||
+ (inFunction && tokenStream.match([Tokens.PLUS, Tokens.STAR, Tokens.MINUS]))){
+ token = tokenStream.token();
+ this._readWhitespace();
+ }
+ return token ? PropertyValuePart.fromToken(token) : null;
+
+ },
+
+ _combinator: function(){
+
+ var tokenStream = this._tokenStream,
+ value = null,
+ token;
+
+ if(tokenStream.match([Tokens.PLUS, Tokens.GREATER, Tokens.TILDE])){
+ token = tokenStream.token();
+ value = new Combinator(token.value, token.startLine, token.startCol);
+ this._readWhitespace();
+ }
+
+ return value;
+ },
+
+ _unary_operator: function(){
+
+ var tokenStream = this._tokenStream;
+
+ if (tokenStream.match([Tokens.MINUS, Tokens.PLUS])){
+ return tokenStream.token().value;
+ } else {
+ return null;
+ }
+ },
+
+ _property: function(){
+
+ var tokenStream = this._tokenStream,
+ value = null,
+ hack = null,
+ tokenValue,
+ token,
+ line,
+ col;
+ if (tokenStream.peek() == Tokens.STAR && this.options.starHack){
+ tokenStream.get();
+ token = tokenStream.token();
+ hack = token.value;
+ line = token.startLine;
+ col = token.startCol;
+ }
+
+ if(tokenStream.match(Tokens.IDENT)){
+ token = tokenStream.token();
+ tokenValue = token.value;
+ if (tokenValue.charAt(0) == "_" && this.options.underscoreHack){
+ hack = "_";
+ tokenValue = tokenValue.substring(1);
+ }
+
+ value = new PropertyName(tokenValue, hack, (line||token.startLine), (col||token.startCol));
+ this._readWhitespace();
+ }
+
+ return value;
+ },
+ _ruleset: function(){
+
+ var tokenStream = this._tokenStream,
+ tt,
+ selectors;
+ try {
+ selectors = this._selectors_group();
+ } catch (ex){
+ if (ex instanceof SyntaxError && !this.options.strict){
+ this.fire({
+ type: "error",
+ error: ex,
+ message: ex.message,
+ line: ex.line,
+ col: ex.col
+ });
+ tt = tokenStream.advance([Tokens.RBRACE]);
+ if (tt == Tokens.RBRACE){
+ } else {
+ throw ex;
+ }
+
+ } else {
+ throw ex;
+ }
+ return true;
+ }
+ if (selectors){
+
+ this.fire({
+ type: "startrule",
+ selectors: selectors,
+ line: selectors[0].line,
+ col: selectors[0].col
+ });
+
+ this._readDeclarations(true);
+
+ this.fire({
+ type: "endrule",
+ selectors: selectors,
+ line: selectors[0].line,
+ col: selectors[0].col
+ });
+
+ }
+
+ return selectors;
+
+ },
+ _selectors_group: function(){
+ var tokenStream = this._tokenStream,
+ selectors = [],
+ selector;
+
+ selector = this._selector();
+ if (selector !== null){
+
+ selectors.push(selector);
+ while(tokenStream.match(Tokens.COMMA)){
+ this._readWhitespace();
+ selector = this._selector();
+ if (selector !== null){
+ selectors.push(selector);
+ } else {
+ this._unexpectedToken(tokenStream.LT(1));
+ }
+ }
+ }
+
+ return selectors.length ? selectors : null;
+ },
+ _selector: function(){
+
+ var tokenStream = this._tokenStream,
+ selector = [],
+ nextSelector = null,
+ combinator = null,
+ ws = null;
+ nextSelector = this._simple_selector_sequence();
+ if (nextSelector === null){
+ return null;
+ }
+
+ selector.push(nextSelector);
+
+ do {
+ combinator = this._combinator();
+
+ if (combinator !== null){
+ selector.push(combinator);
+ nextSelector = this._simple_selector_sequence();
+ if (nextSelector === null){
+ this._unexpectedToken(tokenStream.LT(1));
+ } else {
+ selector.push(nextSelector);
+ }
+ } else {
+ if (this._readWhitespace()){
+ ws = new Combinator(tokenStream.token().value, tokenStream.token().startLine, tokenStream.token().startCol);
+ combinator = this._combinator();
+ nextSelector = this._simple_selector_sequence();
+ if (nextSelector === null){
+ if (combinator !== null){
+ this._unexpectedToken(tokenStream.LT(1));
+ }
+ } else {
+
+ if (combinator !== null){
+ selector.push(combinator);
+ } else {
+ selector.push(ws);
+ }
+
+ selector.push(nextSelector);
+ }
+ } else {
+ break;
+ }
+
+ }
+ } while(true);
+
+ return new Selector(selector, selector[0].line, selector[0].col);
+ },
+ _simple_selector_sequence: function(){
+
+ var tokenStream = this._tokenStream,
+ elementName = null,
+ modifiers = [],
+ selectorText= "",
+ components = [
+ function(){
+ return tokenStream.match(Tokens.HASH) ?
+ new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) :
+ null;
+ },
+ this._class,
+ this._attrib,
+ this._pseudo,
+ this._negation
+ ],
+ i = 0,
+ len = components.length,
+ component = null,
+ found = false,
+ line,
+ col;
+ line = tokenStream.LT(1).startLine;
+ col = tokenStream.LT(1).startCol;
+
+ elementName = this._type_selector();
+ if (!elementName){
+ elementName = this._universal();
+ }
+
+ if (elementName !== null){
+ selectorText += elementName;
+ }
+
+ while(true){
+ if (tokenStream.peek() === Tokens.S){
+ break;
+ }
+ while(i < len && component === null){
+ component = components[i++].call(this);
+ }
+
+ if (component === null){
+ if (selectorText === ""){
+ return null;
+ } else {
+ break;
+ }
+ } else {
+ i = 0;
+ modifiers.push(component);
+ selectorText += component.toString();
+ component = null;
+ }
+ }
+
+
+ return selectorText !== "" ?
+ new SelectorPart(elementName, modifiers, selectorText, line, col) :
+ null;
+ },
+ _type_selector: function(){
+
+ var tokenStream = this._tokenStream,
+ ns = this._namespace_prefix(),
+ elementName = this._element_name();
+
+ if (!elementName){
+ if (ns){
+ tokenStream.unget();
+ if (ns.length > 1){
+ tokenStream.unget();
+ }
+ }
+
+ return null;
+ } else {
+ if (ns){
+ elementName.text = ns + elementName.text;
+ elementName.col -= ns.length;
+ }
+ return elementName;
+ }
+ },
+ _class: function(){
+
+ var tokenStream = this._tokenStream,
+ token;
+
+ if (tokenStream.match(Tokens.DOT)){
+ tokenStream.mustMatch(Tokens.IDENT);
+ token = tokenStream.token();
+ return new SelectorSubPart("." + token.value, "class", token.startLine, token.startCol - 1);
+ } else {
+ return null;
+ }
+
+ },
+ _element_name: function(){
+
+ var tokenStream = this._tokenStream,
+ token;
+
+ if (tokenStream.match(Tokens.IDENT)){
+ token = tokenStream.token();
+ return new SelectorSubPart(token.value, "elementName", token.startLine, token.startCol);
+
+ } else {
+ return null;
+ }
+ },
+ _namespace_prefix: function(){
+ var tokenStream = this._tokenStream,
+ value = "";
+ if (tokenStream.LA(1) === Tokens.PIPE || tokenStream.LA(2) === Tokens.PIPE){
+
+ if(tokenStream.match([Tokens.IDENT, Tokens.STAR])){
+ value += tokenStream.token().value;
+ }
+
+ tokenStream.mustMatch(Tokens.PIPE);
+ value += "|";
+
+ }
+
+ return value.length ? value : null;
+ },
+ _universal: function(){
+ var tokenStream = this._tokenStream,
+ value = "",
+ ns;
+
+ ns = this._namespace_prefix();
+ if(ns){
+ value += ns;
+ }
+
+ if(tokenStream.match(Tokens.STAR)){
+ value += "*";
+ }
+
+ return value.length ? value : null;
+
+ },
+ _attrib: function(){
+
+ var tokenStream = this._tokenStream,
+ value = null,
+ ns,
+ token;
+
+ if (tokenStream.match(Tokens.LBRACKET)){
+ token = tokenStream.token();
+ value = token.value;
+ value += this._readWhitespace();
+
+ ns = this._namespace_prefix();
+
+ if (ns){
+ value += ns;
+ }
+
+ tokenStream.mustMatch(Tokens.IDENT);
+ value += tokenStream.token().value;
+ value += this._readWhitespace();
+
+ if(tokenStream.match([Tokens.PREFIXMATCH, Tokens.SUFFIXMATCH, Tokens.SUBSTRINGMATCH,
+ Tokens.EQUALS, Tokens.INCLUDES, Tokens.DASHMATCH])){
+
+ value += tokenStream.token().value;
+ value += this._readWhitespace();
+
+ tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]);
+ value += tokenStream.token().value;
+ value += this._readWhitespace();
+ }
+
+ tokenStream.mustMatch(Tokens.RBRACKET);
+
+ return new SelectorSubPart(value + "]", "attribute", token.startLine, token.startCol);
+ } else {
+ return null;
+ }
+ },
+ _pseudo: function(){
+
+ var tokenStream = this._tokenStream,
+ pseudo = null,
+ colons = ":",
+ line,
+ col;
+
+ if (tokenStream.match(Tokens.COLON)){
+
+ if (tokenStream.match(Tokens.COLON)){
+ colons += ":";
+ }
+
+ if (tokenStream.match(Tokens.IDENT)){
+ pseudo = tokenStream.token().value;
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol - colons.length;
+ } else if (tokenStream.peek() == Tokens.FUNCTION){
+ line = tokenStream.LT(1).startLine;
+ col = tokenStream.LT(1).startCol - colons.length;
+ pseudo = this._functional_pseudo();
+ }
+
+ if (pseudo){
+ pseudo = new SelectorSubPart(colons + pseudo, "pseudo", line, col);
+ }
+ }
+
+ return pseudo;
+ },
+ _functional_pseudo: function(){
+
+ var tokenStream = this._tokenStream,
+ value = null;
+
+ if(tokenStream.match(Tokens.FUNCTION)){
+ value = tokenStream.token().value;
+ value += this._readWhitespace();
+ value += this._expression();
+ tokenStream.mustMatch(Tokens.RPAREN);
+ value += ")";
+ }
+
+ return value;
+ },
+ _expression: function(){
+
+ var tokenStream = this._tokenStream,
+ value = "";
+
+ while(tokenStream.match([Tokens.PLUS, Tokens.MINUS, Tokens.DIMENSION,
+ Tokens.NUMBER, Tokens.STRING, Tokens.IDENT, Tokens.LENGTH,
+ Tokens.FREQ, Tokens.ANGLE, Tokens.TIME,
+ Tokens.RESOLUTION, Tokens.SLASH])){
+
+ value += tokenStream.token().value;
+ value += this._readWhitespace();
+ }
+
+ return value.length ? value : null;
+
+ },
+ _negation: function(){
+
+ var tokenStream = this._tokenStream,
+ line,
+ col,
+ value = "",
+ arg,
+ subpart = null;
+
+ if (tokenStream.match(Tokens.NOT)){
+ value = tokenStream.token().value;
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+ value += this._readWhitespace();
+ arg = this._negation_arg();
+ value += arg;
+ value += this._readWhitespace();
+ tokenStream.match(Tokens.RPAREN);
+ value += tokenStream.token().value;
+
+ subpart = new SelectorSubPart(value, "not", line, col);
+ subpart.args.push(arg);
+ }
+
+ return subpart;
+ },
+ _negation_arg: function(){
+
+ var tokenStream = this._tokenStream,
+ args = [
+ this._type_selector,
+ this._universal,
+ function(){
+ return tokenStream.match(Tokens.HASH) ?
+ new SelectorSubPart(tokenStream.token().value, "id", tokenStream.token().startLine, tokenStream.token().startCol) :
+ null;
+ },
+ this._class,
+ this._attrib,
+ this._pseudo
+ ],
+ arg = null,
+ i = 0,
+ len = args.length,
+ elementName,
+ line,
+ col,
+ part;
+
+ line = tokenStream.LT(1).startLine;
+ col = tokenStream.LT(1).startCol;
+
+ while(i < len && arg === null){
+
+ arg = args[i].call(this);
+ i++;
+ }
+ if (arg === null){
+ this._unexpectedToken(tokenStream.LT(1));
+ }
+ if (arg.type == "elementName"){
+ part = new SelectorPart(arg, [], arg.toString(), line, col);
+ } else {
+ part = new SelectorPart(null, [arg], arg.toString(), line, col);
+ }
+
+ return part;
+ },
+
+ _declaration: function(){
+
+ var tokenStream = this._tokenStream,
+ property = null,
+ expr = null,
+ prio = null,
+ error = null,
+ invalid = null,
+ propertyName= "";
+
+ property = this._property();
+ if (property !== null){
+
+ tokenStream.mustMatch(Tokens.COLON);
+ this._readWhitespace();
+
+ expr = this._expr();
+ 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",
+ property: property,
+ value: expr,
+ important: prio,
+ line: property.line,
+ col: property.col,
+ invalid: invalid
+ });
+
+ return true;
+ } else {
+ return false;
+ }
+ },
+
+ _prio: function(){
+
+ var tokenStream = this._tokenStream,
+ result = tokenStream.match(Tokens.IMPORTANT_SYM);
+
+ this._readWhitespace();
+ return result;
+ },
+
+ _expr: function(inFunction){
+
+ var tokenStream = this._tokenStream,
+ values = [],
+ value = null,
+ operator = null;
+
+ value = this._term(inFunction);
+ if (value !== null){
+
+ values.push(value);
+
+ do {
+ operator = this._operator(inFunction);
+ if (operator){
+ values.push(operator);
+ } /*else {
+ values.push(new PropertyValue(valueParts, valueParts[0].line, valueParts[0].col));
+ valueParts = [];
+ }*/
+
+ value = this._term(inFunction);
+
+ if (value === null){
+ break;
+ } else {
+ values.push(value);
+ }
+ } while(true);
+ }
+
+ return values.length > 0 ? new PropertyValue(values, values[0].line, values[0].col) : null;
+ },
+
+ _term: function(inFunction){
+
+ var tokenStream = this._tokenStream,
+ unary = null,
+ value = null,
+ endChar = null,
+ token,
+ line,
+ col;
+ unary = this._unary_operator();
+ if (unary !== null){
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+ }
+ if (tokenStream.peek() == Tokens.IE_FUNCTION && this.options.ieFilters){
+
+ value = this._ie_function();
+ if (unary === null){
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+ }
+ } else if (inFunction && tokenStream.match([Tokens.LPAREN, Tokens.LBRACE, Tokens.LBRACKET])){
+
+ token = tokenStream.token();
+ endChar = token.endChar;
+ value = token.value + this._expr(inFunction).text;
+ if (unary === null){
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+ }
+ tokenStream.mustMatch(Tokens.type(endChar));
+ value += endChar;
+ this._readWhitespace();
+ } 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])){
+
+ value = tokenStream.token().value;
+ if (unary === null){
+ line = tokenStream.token().startLine;
+ col = tokenStream.token().startCol;
+ }
+ this._readWhitespace();
+ } else {
+ token = this._hexcolor();
+ if (token === null){
+ if (unary === null){
+ line = tokenStream.LT(1).startLine;
+ col = tokenStream.LT(1).startCol;
+ }
+ if (value === null){
+ if (tokenStream.LA(3) == Tokens.EQUALS && this.options.ieFilters){
+ value = this._ie_function();
+ } else {
+ value = this._function();
+ }
+ }
+
+ } else {
+ value = token.value;
+ if (unary === null){
+ line = token.startLine;
+ col = token.startCol;
+ }
+ }
+
+ }
+
+ return value !== null ?
+ new PropertyValuePart(unary !== null ? unary + value : value, line, col) :
+ null;
+
+ },
+
+ _function: function(){
+
+ var tokenStream = this._tokenStream,
+ functionText = null,
+ expr = null,
+ lt;
+
+ if (tokenStream.match(Tokens.FUNCTION)){
+ functionText = tokenStream.token().value;
+ this._readWhitespace();
+ expr = this._expr(true);
+ 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 += ")";
+ this._readWhitespace();
+ }
+
+ return functionText;
+ },
+
+ _ie_function: function(){
+
+ var tokenStream = this._tokenStream,
+ functionText = null,
+ expr = null,
+ lt;
+ if (tokenStream.match([Tokens.IE_FUNCTION, Tokens.FUNCTION])){
+ functionText = tokenStream.token().value;
+
+ 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 += ")";
+ this._readWhitespace();
+ }
+
+ return functionText;
+ },
+
+ _hexcolor: function(){
+
+ var tokenStream = this._tokenStream,
+ token = null,
+ color;
+
+ if(tokenStream.match(Tokens.HASH)){
+
+ token = tokenStream.token();
+ color = token.value;
+ if (!/#[a-f0-9]{3,6}/i.test(color)){
+ throw new SyntaxError("Expected a hex color but found '" + color + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol);
+ }
+ this._readWhitespace();
+ }
+
+ return token;
+ },
+
+ _keyframes: function(){
+ var tokenStream = this._tokenStream,
+ token,
+ tt,
+ name,
+ prefix = "";
+
+ tokenStream.mustMatch(Tokens.KEYFRAMES_SYM);
+ token = tokenStream.token();
+ if (/^@\-([^\-]+)\-/.test(token.value)) {
+ prefix = RegExp.$1;
+ }
+
+ this._readWhitespace();
+ name = this._keyframe_name();
+
+ this._readWhitespace();
+ tokenStream.mustMatch(Tokens.LBRACE);
+
+ this.fire({
+ type: "startkeyframes",
+ name: name,
+ prefix: prefix,
+ line: token.startLine,
+ col: token.startCol
+ });
+
+ this._readWhitespace();
+ tt = tokenStream.peek();
+ while(tt == Tokens.IDENT || tt == Tokens.PERCENTAGE) {
+ this._keyframe_rule();
+ this._readWhitespace();
+ tt = tokenStream.peek();
+ }
+
+ this.fire({
+ type: "endkeyframes",
+ name: name,
+ prefix: prefix,
+ line: token.startLine,
+ col: token.startCol
+ });
+
+ this._readWhitespace();
+ tokenStream.mustMatch(Tokens.RBRACE);
+
+ },
+
+ _keyframe_name: function(){
+ var tokenStream = this._tokenStream,
+ token;
+
+ tokenStream.mustMatch([Tokens.IDENT, Tokens.STRING]);
+ return SyntaxUnit.fromToken(tokenStream.token());
+ },
+
+ _keyframe_rule: function(){
+ var tokenStream = this._tokenStream,
+ token,
+ keyList = this._key_list();
+
+ this.fire({
+ type: "startkeyframerule",
+ keys: keyList,
+ line: keyList[0].line,
+ col: keyList[0].col
+ });
+
+ this._readDeclarations(true);
+
+ this.fire({
+ type: "endkeyframerule",
+ keys: keyList,
+ line: keyList[0].line,
+ col: keyList[0].col
+ });
+
+ },
+
+ _key_list: function(){
+ var tokenStream = this._tokenStream,
+ token,
+ key,
+ keyList = [];
+ keyList.push(this._key());
+
+ this._readWhitespace();
+
+ while(tokenStream.match(Tokens.COMMA)){
+ this._readWhitespace();
+ keyList.push(this._key());
+ this._readWhitespace();
+ }
+
+ return keyList;
+ },
+
+ _key: function(){
+
+ var tokenStream = this._tokenStream,
+ token;
+
+ if (tokenStream.match(Tokens.PERCENTAGE)){
+ return SyntaxUnit.fromToken(tokenStream.token());
+ } else if (tokenStream.match(Tokens.IDENT)){
+ token = tokenStream.token();
+
+ if (/from|to/i.test(token.value)){
+ return SyntaxUnit.fromToken(token);
+ }
+
+ tokenStream.unget();
+ }
+ this._unexpectedToken(tokenStream.LT(1));
+ },
+ _skipCruft: function(){
+ while(this._tokenStream.match([Tokens.S, Tokens.CDO, Tokens.CDC])){
+ }
+ },
+ _readDeclarations: function(checkStart, readMargins){
+ var tokenStream = this._tokenStream,
+ tt;
+
+
+ this._readWhitespace();
+
+ if (checkStart){
+ tokenStream.mustMatch(Tokens.LBRACE);
+ }
+
+ this._readWhitespace();
+
+ try {
+
+ while(true){
+
+ if (tokenStream.match(Tokens.SEMICOLON) || (readMargins && this._margin())){
+ } else if (this._declaration()){
+ if (!tokenStream.match(Tokens.SEMICOLON)){
+ break;
+ }
+ } else {
+ break;
+ }
+ this._readWhitespace();
+ }
+
+ tokenStream.mustMatch(Tokens.RBRACE);
+ this._readWhitespace();
+
+ } catch (ex) {
+ if (ex instanceof SyntaxError && !this.options.strict){
+ this.fire({
+ type: "error",
+ error: ex,
+ message: ex.message,
+ line: ex.line,
+ col: ex.col
+ });
+ tt = tokenStream.advance([Tokens.SEMICOLON, Tokens.RBRACE]);
+ if (tt == Tokens.SEMICOLON){
+ this._readDeclarations(false, readMargins);
+ } else if (tt != Tokens.RBRACE){
+ throw ex;
+ }
+
+ } else {
+ throw ex;
+ }
+ }
+
+ },
+ _readWhitespace: function(){
+
+ var tokenStream = this._tokenStream,
+ ws = "";
+
+ while(tokenStream.match(Tokens.S)){
+ ws += tokenStream.token().value;
+ }
+
+ return ws;
+ },
+ _unexpectedToken: function(token){
+ throw new SyntaxError("Unexpected token '" + token.value + "' at line " + token.startLine + ", col " + token.startCol + ".", token.startLine, token.startCol);
+ },
+ _verifyEnd: function(){
+ if (this._tokenStream.LA(1) != Tokens.EOF){
+ this._unexpectedToken(this._tokenStream.LT(1));
+ }
+ },
+ _validateProperty: function(property, value){
+ Validation.validate(property, value);
+ },
+
+ parse: function(input){
+ this._tokenStream = new TokenStream(input, Tokens);
+ this._stylesheet();
+ },
+
+ parseStyleSheet: function(input){
+ return this.parse(input);
+ },
+
+ parseMediaQuery: function(input){
+ this._tokenStream = new TokenStream(input, Tokens);
+ var result = this._media_query();
+ this._verifyEnd();
+ return result;
+ },
+ parsePropertyValue: function(input){
+
+ this._tokenStream = new TokenStream(input, Tokens);
+ this._readWhitespace();
+
+ var result = this._expr();
+ this._readWhitespace();
+ this._verifyEnd();
+ return result;
+ },
+ parseRule: function(input){
+ this._tokenStream = new TokenStream(input, Tokens);
+ this._readWhitespace();
+
+ var result = this._ruleset();
+ this._readWhitespace();
+ this._verifyEnd();
+ return result;
+ },
+ parseSelector: function(input){
+
+ this._tokenStream = new TokenStream(input, Tokens);
+ this._readWhitespace();
+
+ var result = this._selector();
+ this._readWhitespace();
+ this._verifyEnd();
+ return result;
+ },
+ parseStyleAttribute: function(input){
+ input += "}"; // for error recovery in _readDeclarations()
+ this._tokenStream = new TokenStream(input, Tokens);
+ this._readDeclarations();
+ }
+ };
+ for (prop in additions){
+ if (additions.hasOwnProperty(prop)){
+ proto[prop] = additions[prop];
+ }
+ }
+
+ return proto;
+}();
+var Properties = {
+ "align-items" : "flex-start | flex-end | center | baseline | stretch",
+ "align-content" : "flex-start | flex-end | center | space-between | space-around | stretch",
+ "align-self" : "auto | flex-start | flex-end | center | baseline | stretch",
+ "-webkit-align-items" : "flex-start | flex-end | center | baseline | stretch",
+ "-webkit-align-content" : "flex-start | flex-end | center | space-between | space-around | stretch",
+ "-webkit-align-self" : "auto | flex-start | flex-end | center | baseline | stretch",
+ "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 | reverse | alternate | alternate-reverse", comma: true },
+ "animation-duration" : { multi: "<time>", comma: true },
+ "animation-fill-mode" : { multi: "none | forwards | backwards | both", 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 | reverse | alternate | alternate-reverse", 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 | reverse | alternate | alternate-reverse", 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 | reverse | alternate | alternate-reverse", comma: true },
+ "-webkit-animation-duration" : { multi: "<time>", comma: true },
+ "-webkit-animation-fill-mode" : { multi: "none | forwards | backwards | both", 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 | reverse | alternate | alternate-reverse", 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 | none | 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> | inherit",
+ "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,
+ simple = "<length> | <percentage> | inherit",
+ slash = false,
+ fill = false,
+ count = 0,
+ max = 8,
+ part;
+
+ while (expression.hasNext() && count < max) {
+ valid = ValidationTypes.isAny(expression, simple);
+ if (!valid) {
+
+ if (expression.peek() == "/" && count > 0 && !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",
+ "-moz-box-align" : "start | end | center | baseline | stretch",
+ "-moz-box-decoration-break" : "slice |clone",
+ "-moz-box-direction" : "normal | reverse | inherit",
+ "-moz-box-flex" : "<number>",
+ "-moz-box-flex-group" : "<integer>",
+ "-moz-box-lines" : "single | multiple",
+ "-moz-box-ordinal-group" : "<integer>",
+ "-moz-box-orient" : "horizontal | vertical | inline-axis | block-axis | inherit",
+ "-moz-box-pack" : "start | end | center | justify",
+ "-webkit-box-align" : "start | end | center | baseline | stretch",
+ "-webkit-box-decoration-break" : "slice |clone",
+ "-webkit-box-direction" : "normal | reverse | inherit",
+ "-webkit-box-flex" : "<number>",
+ "-webkit-box-flex-group" : "<integer>",
+ "-webkit-box-lines" : "single | multiple",
+ "-webkit-box-ordinal-group" : "<integer>",
+ "-webkit-box-orient" : "horizontal | vertical | inline-axis | block-axis | inherit",
+ "-webkit-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 | grid | inline-grid | none | inherit | -moz-box | -moz-inline-block | -moz-inline-box | -moz-inline-grid | -moz-inline-stack | -moz-inline-table | -moz-grid | -moz-grid-group | -moz-grid-line | -moz-groupbox | -moz-deck | -moz-popup | -moz-stack | -moz-marker | -webkit-box | -webkit-inline-box | -ms-flexbox | -ms-inline-flexbox | flex | -webkit-flex | inline-flex | -webkit-inline-flex",
+ "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,
+ "flex" : "<flex>",
+ "flex-basis" : "<width>",
+ "flex-direction" : "row | row-reverse | column | column-reverse",
+ "flex-flow" : "<flex-direction> || <flex-wrap>",
+ "flex-grow" : "<number>",
+ "flex-shrink" : "<number>",
+ "flex-wrap" : "nowrap | wrap | wrap-reverse",
+ "-webkit-flex" : "<flex>",
+ "-webkit-flex-basis" : "<width>",
+ "-webkit-flex-direction" : "row | row-reverse | column | column-reverse",
+ "-webkit-flex-flow" : "<flex-direction> || <flex-wrap>",
+ "-webkit-flex-grow" : "<number>",
+ "-webkit-flex-shrink" : "<number>",
+ "-webkit-flex-wrap" : "nowrap | wrap | wrap-reverse",
+ "-ms-flex" : "<flex>",
+ "-ms-flex-align" : "start | end | center | stretch | baseline",
+ "-ms-flex-direction" : "row | row-reverse | column | column-reverse | inherit",
+ "-ms-flex-order" : "<number>",
+ "-ms-flex-pack" : "start | end | center | justify",
+ "-ms-flex-wrap" : "nowrap | wrap | wrap-reverse",
+ "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> | <content-sizing> | 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>",
+ "justify-content" : "flex-start | flex-end | center | space-between | space-around",
+ "-webkit-justify-content" : "flex-start | flex-end | center | space-between | space-around",
+ "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> | <content-sizing> | none | inherit",
+ "max-width" : "<length> | <percentage> | <content-sizing> | none | inherit",
+ "min-height" : "<length> | <percentage> | <content-sizing> | contain-floats | -moz-contain-floats | -webkit-contain-floats | inherit",
+ "min-width" : "<length> | <percentage> | <content-sizing> | contain-floats | -moz-contain-floats | -webkit-contain-floats | inherit",
+ "move-to" : 1,
+ "nav-down" : 1,
+ "nav-index" : 1,
+ "nav-left" : 1,
+ "nav-right" : 1,
+ "nav-up" : 1,
+ "opacity" : "<number> | inherit",
+ "order" : "<integer>",
+ "-webkit-order" : "<integer>",
+ "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-wrap" : "normal | break-word",
+ "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",
+ "-ms-touch-action" : "auto | none | pan-x | pan-y",
+ "touch-action" : "auto | none | pan-x | pan-y",
+ "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 | isolate | bidi-override | isolate-override | plaintext | inherit",
+ "user-modify" : "read-only | read-write | write-only | inherit",
+ "user-select" : "none | text | toggle | element | elements | all | inherit",
+ "vertical-align" : "auto | use-script | baseline | sub | super | top | text-top | central | middle | bottom | text-bottom | <percentage> | <length>",
+ "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 | -pre-wrap | -o-pre-wrap | -moz-pre-wrap | -hp-pre-wrap", //http://perishablepress.com/wrapping-content/
+ "white-space-collapse" : 1,
+ "widows" : "<integer> | inherit",
+ "width" : "<length> | <percentage> | <content-sizing> | auto | inherit",
+ "word-break" : "normal | keep-all | break-all",
+ "word-spacing" : "<length> | normal | inherit",
+ "word-wrap" : "normal | break-word",
+ "writing-mode" : "horizontal-tb | vertical-rl | vertical-lr | lr-tb | rl-tb | tb-rl | bt-rl | tb-lr | bt-lr | lr-bt | rl-bt | lr | rl | tb | inherit",
+ "z-index" : "<integer> | auto | inherit",
+ "zoom" : "<number> | <percentage> | normal"
+};
+function PropertyName(text, hack, line, col){
+
+ SyntaxUnit.call(this, text, line, col, Parser.PROPERTY_NAME_TYPE);
+ this.hack = hack;
+
+}
+
+PropertyName.prototype = new SyntaxUnit();
+PropertyName.prototype.constructor = PropertyName;
+PropertyName.prototype.toString = function(){
+ return (this.hack ? this.hack : "") + this.text;
+};
+function PropertyValue(parts, line, col){
+
+ SyntaxUnit.call(this, parts.join(" "), line, col, Parser.PROPERTY_VALUE_TYPE);
+ this.parts = parts;
+
+}
+
+PropertyValue.prototype = new SyntaxUnit();
+PropertyValue.prototype.constructor = PropertyValue;
+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.call(this, text, line, col, Parser.PROPERTY_VALUE_PART_TYPE);
+ this.type = "unknown";
+
+ var temp;
+ if (/^([+\-]?[\d\.]+)([a-z]+)$/i.test(text)){ //dimension
+ this.type = "dimension";
+ this.value = +RegExp.$1;
+ this.units = RegExp.$2;
+ switch(this.units.toLowerCase()){
+
+ case "em":
+ case "rem":
+ case "ex":
+ case "px":
+ case "cm":
+ case "mm":
+ case "in":
+ case "pt":
+ case "pc":
+ case "ch":
+ case "vh":
+ case "vw":
+ case "vmax":
+ case "vmin":
+ this.type = "length";
+ break;
+
+ case "deg":
+ case "rad":
+ case "grad":
+ this.type = "angle";
+ break;
+
+ case "ms":
+ case "s":
+ this.type = "time";
+ break;
+
+ case "hz":
+ case "khz":
+ this.type = "frequency";
+ break;
+
+ case "dpi":
+ case "dpcm":
+ this.type = "resolution";
+ break;
+
+ }
+
+ } else if (/^([+\-]?[\d\.]+)%$/i.test(text)){ //percentage
+ this.type = "percentage";
+ this.value = +RegExp.$1;
+ } else if (/^([+\-]?\d+)$/i.test(text)){ //integer
+ this.type = "integer";
+ this.value = +RegExp.$1;
+ } else if (/^([+\-]?[\d\.]+)$/i.test(text)){ //number
+ this.type = "number";
+ this.value = +RegExp.$1;
+
+ } else if (/^#([a-f0-9]{3,6})/i.test(text)){ //hexcolor
+ this.type = "color";
+ temp = RegExp.$1;
+ if (temp.length == 3){
+ this.red = parseInt(temp.charAt(0)+temp.charAt(0),16);
+ this.green = parseInt(temp.charAt(1)+temp.charAt(1),16);
+ this.blue = parseInt(temp.charAt(2)+temp.charAt(2),16);
+ } else {
+ this.red = parseInt(temp.substring(0,2),16);
+ this.green = parseInt(temp.substring(2,4),16);
+ this.blue = parseInt(temp.substring(4,6),16);
+ }
+ } else if (/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.test(text)){ //rgb() color with absolute numbers
+ this.type = "color";
+ this.red = +RegExp.$1;
+ this.green = +RegExp.$2;
+ this.blue = +RegExp.$3;
+ } else if (/^rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)){ //rgb() color with percentages
+ this.type = "color";
+ 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);
+ } else if (Colors[text.toLowerCase()]){ //named color
+ this.type = "color";
+ temp = Colors[text.toLowerCase()].substring(1);
+ this.red = parseInt(temp.substring(0,2),16);
+ this.green = parseInt(temp.substring(2,4),16);
+ this.blue = parseInt(temp.substring(4,6),16);
+ } else if (/^[\,\/]$/.test(text)){
+ this.type = "operator";
+ this.value = text;
+ } else if (/^[a-z\-_\u0080-\uFFFF][a-z0-9\-_\u0080-\uFFFF]*$/i.test(text)){
+ this.type = "identifier";
+ this.value = text;
+ }
+
+}
+
+PropertyValuePart.prototype = new SyntaxUnit();
+PropertyValuePart.prototype.constructor = PropertyValuePart;
+PropertyValuePart.fromToken = function(token){
+ return new PropertyValuePart(token.value, token.startLine, token.startCol);
+};
+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, Parser.SELECTOR_TYPE);
+ this.parts = parts;
+ this.specificity = Specificity.calculate(this);
+
+}
+
+Selector.prototype = new SyntaxUnit();
+Selector.prototype.constructor = Selector;
+function SelectorPart(elementName, modifiers, text, line, col){
+
+ SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_PART_TYPE);
+ this.elementName = elementName;
+ this.modifiers = modifiers;
+
+}
+
+SelectorPart.prototype = new SyntaxUnit();
+SelectorPart.prototype.constructor = SelectorPart;
+function SelectorSubPart(text, type, line, col){
+
+ SyntaxUnit.call(this, text, line, col, Parser.SELECTOR_SUB_PART_TYPE);
+ this.type = type;
+ 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/;
+
+
+function isHexDigit(c){
+ return c !== null && h.test(c);
+}
+
+function isDigit(c){
+ return c !== null && /\d/.test(c);
+}
+
+function isWhitespace(c){
+ return c !== null && /\s/.test(c);
+}
+
+function isNewLine(c){
+ return c !== null && nl.test(c);
+}
+
+function isNameStart(c){
+ return c !== null && (/[a-z_\u0080-\uFFFF\\]/i.test(c));
+}
+
+function isNameChar(c){
+ return c !== null && (isNameStart(c) || /[0-9\-\\]/.test(c));
+}
+
+function isIdentStart(c){
+ return c !== null && (isNameStart(c) || /\-\\/.test(c));
+}
+
+function mix(receiver, supplier){
+ for (var prop in supplier){
+ if (supplier.hasOwnProperty(prop)){
+ receiver[prop] = supplier[prop];
+ }
+ }
+ return receiver;
+}
+function TokenStream(input){
+ TokenStreamBase.call(this, input, Tokens);
+}
+
+TokenStream.prototype = mix(new TokenStreamBase(), {
+ _getToken: function(channel){
+
+ var c,
+ reader = this._reader,
+ token = null,
+ startLine = reader.getLine(),
+ startCol = reader.getCol();
+
+ c = reader.read();
+
+
+ while(c){
+ switch(c){
+ case "/":
+
+ if(reader.peek() == "*"){
+ token = this.commentToken(c, startLine, startCol);
+ } else {
+ token = this.charToken(c, startLine, startCol);
+ }
+ break;
+ case "|":
+ case "~":
+ case "^":
+ case "$":
+ case "*":
+ if(reader.peek() == "="){
+ token = this.comparisonToken(c, startLine, startCol);
+ } else {
+ token = this.charToken(c, startLine, startCol);
+ }
+ break;
+ case "\"":
+ case "'":
+ token = this.stringToken(c, startLine, startCol);
+ break;
+ case "#":
+ if (isNameChar(reader.peek())){
+ token = this.hashToken(c, startLine, startCol);
+ } else {
+ token = this.charToken(c, startLine, startCol);
+ }
+ break;
+ case ".":
+ if (isDigit(reader.peek())){
+ token = this.numberToken(c, startLine, startCol);
+ } else {
+ token = this.charToken(c, startLine, startCol);
+ }
+ break;
+ case "-":
+ if (reader.peek() == "-"){ //could be closing HTML-style comment
+ token = this.htmlCommentEndToken(c, startLine, startCol);
+ } else if (isNameStart(reader.peek())){
+ token = this.identOrFunctionToken(c, startLine, startCol);
+ } else {
+ token = this.charToken(c, startLine, startCol);
+ }
+ break;
+ case "!":
+ token = this.importantToken(c, startLine, startCol);
+ break;
+ case "@":
+ token = this.atRuleToken(c, startLine, startCol);
+ break;
+ case ":":
+ token = this.notToken(c, startLine, startCol);
+ break;
+ case "<":
+ token = this.htmlCommentStartToken(c, startLine, startCol);
+ break;
+ case "U":
+ case "u":
+ if (reader.peek() == "+"){
+ token = this.unicodeRangeToken(c, startLine, startCol);
+ break;
+ }
+ default:
+ if (isDigit(c)){
+ token = this.numberToken(c, startLine, startCol);
+ } else
+ if (isWhitespace(c)){
+ token = this.whitespaceToken(c, startLine, startCol);
+ } else
+ if (isIdentStart(c)){
+ token = this.identOrFunctionToken(c, startLine, startCol);
+ } else
+ {
+ token = this.charToken(c, startLine, startCol);
+ }
+
+
+
+
+
+
+ }
+ break;
+ }
+
+ if (!token && c === null){
+ token = this.createToken(Tokens.EOF,null,startLine,startCol);
+ }
+
+ return token;
+ },
+ createToken: function(tt, value, startLine, startCol, options){
+ var reader = this._reader;
+ options = options || {};
+
+ return {
+ value: value,
+ type: tt,
+ channel: options.channel,
+ endChar: options.endChar,
+ hide: options.hide || false,
+ startLine: startLine,
+ startCol: startCol,
+ endLine: reader.getLine(),
+ endCol: reader.getCol()
+ };
+ },
+ atRuleToken: function(first, startLine, startCol){
+ var rule = first,
+ reader = this._reader,
+ tt = Tokens.CHAR,
+ valid = false,
+ ident,
+ c;
+ reader.mark();
+ ident = this.readName();
+ rule = first + ident;
+ tt = Tokens.type(rule.toLowerCase());
+ if (tt == Tokens.CHAR || tt == Tokens.UNKNOWN){
+ if (rule.length > 1){
+ tt = Tokens.UNKNOWN_SYM;
+ } else {
+ tt = Tokens.CHAR;
+ rule = first;
+ reader.reset();
+ }
+ }
+
+ return this.createToken(tt, rule, startLine, startCol);
+ },
+ charToken: function(c, startLine, startCol){
+ var tt = Tokens.type(c);
+ var opts = {};
+
+ if (tt == -1){
+ tt = Tokens.CHAR;
+ } else {
+ opts.endChar = Tokens[tt].endChar;
+ }
+
+ return this.createToken(tt, c, startLine, startCol, opts);
+ },
+ commentToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ comment = this.readComment(first);
+
+ return this.createToken(Tokens.COMMENT, comment, startLine, startCol);
+ },
+ comparisonToken: function(c, startLine, startCol){
+ var reader = this._reader,
+ comparison = c + reader.read(),
+ tt = Tokens.type(comparison) || Tokens.CHAR;
+
+ return this.createToken(tt, comparison, startLine, startCol);
+ },
+ hashToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ name = this.readName(first);
+
+ return this.createToken(Tokens.HASH, name, startLine, startCol);
+ },
+ htmlCommentStartToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ text = first;
+
+ reader.mark();
+ text += reader.readCount(3);
+
+ if (text == "<!--"){
+ return this.createToken(Tokens.CDO, text, startLine, startCol);
+ } else {
+ reader.reset();
+ return this.charToken(first, startLine, startCol);
+ }
+ },
+ htmlCommentEndToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ text = first;
+
+ reader.mark();
+ text += reader.readCount(2);
+
+ if (text == "-->"){
+ return this.createToken(Tokens.CDC, text, startLine, startCol);
+ } else {
+ reader.reset();
+ return this.charToken(first, startLine, startCol);
+ }
+ },
+ identOrFunctionToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ ident = this.readName(first),
+ tt = Tokens.IDENT;
+ if (reader.peek() == "("){
+ ident += reader.read();
+ if (ident.toLowerCase() == "url("){
+ tt = Tokens.URI;
+ ident = this.readURI(ident);
+ if (ident.toLowerCase() == "url("){
+ tt = Tokens.FUNCTION;
+ }
+ } else {
+ tt = Tokens.FUNCTION;
+ }
+ } else if (reader.peek() == ":"){ //might be an IE function
+ if (ident.toLowerCase() == "progid"){
+ ident += reader.readTo("(");
+ tt = Tokens.IE_FUNCTION;
+ }
+ }
+
+ return this.createToken(tt, ident, startLine, startCol);
+ },
+ importantToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ important = first,
+ tt = Tokens.CHAR,
+ temp,
+ c;
+
+ reader.mark();
+ c = reader.read();
+
+ while(c){
+ if (c == "/"){
+ if (reader.peek() != "*"){
+ break;
+ } else {
+ temp = this.readComment(c);
+ if (temp === ""){ //broken!
+ break;
+ }
+ }
+ } else if (isWhitespace(c)){
+ important += c + this.readWhitespace();
+ } else if (/i/i.test(c)){
+ temp = reader.readCount(8);
+ if (/mportant/i.test(temp)){
+ important += c + temp;
+ tt = Tokens.IMPORTANT_SYM;
+
+ }
+ break; //we're done
+ } else {
+ break;
+ }
+
+ c = reader.read();
+ }
+
+ if (tt == Tokens.CHAR){
+ reader.reset();
+ return this.charToken(first, startLine, startCol);
+ } else {
+ return this.createToken(tt, important, startLine, startCol);
+ }
+
+
+ },
+ notToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ text = first;
+
+ reader.mark();
+ text += reader.readCount(4);
+
+ if (text.toLowerCase() == ":not("){
+ return this.createToken(Tokens.NOT, text, startLine, startCol);
+ } else {
+ reader.reset();
+ return this.charToken(first, startLine, startCol);
+ }
+ },
+ numberToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ value = this.readNumber(first),
+ ident,
+ tt = Tokens.NUMBER,
+ c = reader.peek();
+
+ if (isIdentStart(c)){
+ ident = this.readName(reader.read());
+ value += ident;
+
+ if (/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vmax$|^vmin$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(ident)){
+ tt = Tokens.LENGTH;
+ } else if (/^deg|^rad$|^grad$/i.test(ident)){
+ tt = Tokens.ANGLE;
+ } else if (/^ms$|^s$/i.test(ident)){
+ tt = Tokens.TIME;
+ } else if (/^hz$|^khz$/i.test(ident)){
+ tt = Tokens.FREQ;
+ } else if (/^dpi$|^dpcm$/i.test(ident)){
+ tt = Tokens.RESOLUTION;
+ } else {
+ tt = Tokens.DIMENSION;
+ }
+
+ } else if (c == "%"){
+ value += reader.read();
+ tt = Tokens.PERCENTAGE;
+ }
+
+ return this.createToken(tt, value, startLine, startCol);
+ },
+ stringToken: function(first, startLine, startCol){
+ var delim = first,
+ string = first,
+ reader = this._reader,
+ prev = first,
+ tt = Tokens.STRING,
+ c = reader.read();
+
+ while(c){
+ string += c;
+ if (c == delim && prev != "\\"){
+ break;
+ }
+ if (isNewLine(reader.peek()) && c != "\\"){
+ tt = Tokens.INVALID;
+ break;
+ }
+ prev = c;
+ c = reader.read();
+ }
+ if (c === null){
+ tt = Tokens.INVALID;
+ }
+
+ return this.createToken(tt, string, startLine, startCol);
+ },
+
+ unicodeRangeToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ value = first,
+ temp,
+ tt = Tokens.CHAR;
+ if (reader.peek() == "+"){
+ reader.mark();
+ value += reader.read();
+ value += this.readUnicodeRangePart(true);
+ if (value.length == 2){
+ reader.reset();
+ } else {
+
+ tt = Tokens.UNICODE_RANGE;
+ if (value.indexOf("?") == -1){
+
+ if (reader.peek() == "-"){
+ reader.mark();
+ temp = reader.read();
+ temp += this.readUnicodeRangePart(false);
+ if (temp.length == 1){
+ reader.reset();
+ } else {
+ value += temp;
+ }
+ }
+
+ }
+ }
+ }
+
+ return this.createToken(tt, value, startLine, startCol);
+ },
+ whitespaceToken: function(first, startLine, startCol){
+ var reader = this._reader,
+ value = first + this.readWhitespace();
+ return this.createToken(Tokens.S, value, startLine, startCol);
+ },
+
+ readUnicodeRangePart: function(allowQuestionMark){
+ var reader = this._reader,
+ part = "",
+ c = reader.peek();
+ while(isHexDigit(c) && part.length < 6){
+ reader.read();
+ part += c;
+ c = reader.peek();
+ }
+ if (allowQuestionMark){
+ while(c == "?" && part.length < 6){
+ reader.read();
+ part += c;
+ c = reader.peek();
+ }
+ }
+
+ return part;
+ },
+
+ readWhitespace: function(){
+ var reader = this._reader,
+ whitespace = "",
+ c = reader.peek();
+
+ while(isWhitespace(c)){
+ reader.read();
+ whitespace += c;
+ c = reader.peek();
+ }
+
+ return whitespace;
+ },
+ readNumber: function(first){
+ var reader = this._reader,
+ number = first,
+ hasDot = (first == "."),
+ c = reader.peek();
+
+
+ while(c){
+ if (isDigit(c)){
+ number += reader.read();
+ } else if (c == "."){
+ if (hasDot){
+ break;
+ } else {
+ hasDot = true;
+ number += reader.read();
+ }
+ } else {
+ break;
+ }
+
+ c = reader.peek();
+ }
+
+ return number;
+ },
+ readString: function(){
+ var reader = this._reader,
+ delim = reader.read(),
+ string = delim,
+ prev = delim,
+ c = reader.peek();
+
+ while(c){
+ c = reader.read();
+ string += c;
+ if (c == delim && prev != "\\"){
+ break;
+ }
+ if (isNewLine(reader.peek()) && c != "\\"){
+ string = "";
+ break;
+ }
+ prev = c;
+ c = reader.peek();
+ }
+ if (c === null){
+ string = "";
+ }
+
+ return string;
+ },
+ readURI: function(first){
+ var reader = this._reader,
+ uri = first,
+ inner = "",
+ c = reader.peek();
+
+ reader.mark();
+ while(c && isWhitespace(c)){
+ reader.read();
+ c = reader.peek();
+ }
+ if (c == "'" || c == "\""){
+ inner = this.readString();
+ } else {
+ inner = this.readURL();
+ }
+
+ c = reader.peek();
+ while(c && isWhitespace(c)){
+ reader.read();
+ c = reader.peek();
+ }
+ if (inner === "" || c != ")"){
+ uri = first;
+ reader.reset();
+ } else {
+ uri += inner + reader.read();
+ }
+
+ return uri;
+ },
+ readURL: function(){
+ var reader = this._reader,
+ url = "",
+ c = reader.peek();
+ while (/^[!#$%&\\*-~]$/.test(c)){
+ url += reader.read();
+ c = reader.peek();
+ }
+
+ return url;
+
+ },
+ readName: function(first){
+ var reader = this._reader,
+ ident = first || "",
+ c = reader.peek();
+
+ while(true){
+ if (c == "\\"){
+ ident += this.readEscape(reader.read());
+ c = reader.peek();
+ } else if(c && isNameChar(c)){
+ ident += reader.read();
+ c = reader.peek();
+ } else {
+ break;
+ }
+ }
+
+ return ident;
+ },
+
+ readEscape: function(first){
+ var reader = this._reader,
+ cssEscape = first || "",
+ i = 0,
+ c = reader.peek();
+
+ if (isHexDigit(c)){
+ do {
+ cssEscape += reader.read();
+ c = reader.peek();
+ } while(c && isHexDigit(c) && ++i < 6);
+ }
+
+ if (cssEscape.length == 3 && /\s/.test(c) ||
+ cssEscape.length == 7 || cssEscape.length == 1){
+ reader.read();
+ } else {
+ c = "";
+ }
+
+ return cssEscape + c;
+ },
+
+ readComment: function(first){
+ var reader = this._reader,
+ comment = first || "",
+ c = reader.read();
+
+ if (c == "*"){
+ while(c){
+ comment += c;
+ if (comment.length > 2 && c == "*" && reader.peek() == "/"){
+ comment += reader.read();
+ break;
+ }
+
+ c = reader.read();
+ }
+
+ return comment;
+ } else {
+ return "";
+ }
+
+ }
+});
+
+var Tokens = [
+ { name: "CDO"},
+ { name: "CDC"},
+ { name: "S", whitespace: true/*, channel: "ws"*/},
+ { name: "COMMENT", comment: true, hide: true, channel: "comment" },
+ { name: "INCLUDES", text: "~="},
+ { name: "DASHMATCH", text: "|="},
+ { name: "PREFIXMATCH", text: "^="},
+ { name: "SUFFIXMATCH", text: "$="},
+ { name: "SUBSTRINGMATCH", text: "*="},
+ { name: "STRING"},
+ { name: "IDENT"},
+ { name: "HASH"},
+ { 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: "VIEWPORT_SYM", text: ["@viewport", "@-ms-viewport"]},
+ { name: "UNKNOWN_SYM" },
+ { name: "KEYFRAMES_SYM", text: [ "@keyframes", "@-webkit-keyframes", "@-moz-keyframes", "@-o-keyframes" ] },
+ { name: "IMPORTANT_SYM"},
+ { name: "LENGTH"},
+ { name: "ANGLE"},
+ { name: "TIME"},
+ { name: "FREQ"},
+ { name: "DIMENSION"},
+ { name: "PERCENTAGE"},
+ { name: "NUMBER"},
+ { name: "URI"},
+ { name: "FUNCTION"},
+ { name: "UNICODE_RANGE"},
+ { name: "INVALID"},
+ { name: "PLUS", text: "+" },
+ { name: "GREATER", text: ">"},
+ { name: "COMMA", text: ","},
+ { name: "TILDE", text: "~"},
+ { name: "NOT"},
+ { name: "TOPLEFTCORNER_SYM", text: "@top-left-corner"},
+ { name: "TOPLEFT_SYM", text: "@top-left"},
+ { name: "TOPCENTER_SYM", text: "@top-center"},
+ { name: "TOPRIGHT_SYM", text: "@top-right"},
+ { name: "TOPRIGHTCORNER_SYM", text: "@top-right-corner"},
+ { name: "BOTTOMLEFTCORNER_SYM", text: "@bottom-left-corner"},
+ { name: "BOTTOMLEFT_SYM", text: "@bottom-left"},
+ { name: "BOTTOMCENTER_SYM", text: "@bottom-center"},
+ { name: "BOTTOMRIGHT_SYM", text: "@bottom-right"},
+ { name: "BOTTOMRIGHTCORNER_SYM", text: "@bottom-right-corner"},
+ { name: "LEFTTOP_SYM", text: "@left-top"},
+ { name: "LEFTMIDDLE_SYM", text: "@left-middle"},
+ { name: "LEFTBOTTOM_SYM", text: "@left-bottom"},
+ { name: "RIGHTTOP_SYM", text: "@right-top"},
+ { name: "RIGHTMIDDLE_SYM", text: "@right-middle"},
+ { name: "RIGHTBOTTOM_SYM", text: "@right-bottom"},
+ { name: "RESOLUTION", state: "media"},
+ { name: "IE_FUNCTION" },
+ { name: "CHAR" },
+ {
+ name: "PIPE",
+ text: "|"
+ },
+ {
+ name: "SLASH",
+ text: "/"
+ },
+ {
+ name: "MINUS",
+ text: "-"
+ },
+ {
+ name: "STAR",
+ text: "*"
+ },
+
+ {
+ name: "LBRACE",
+ endChar: "}",
+ text: "{"
+ },
+ {
+ name: "RBRACE",
+ text: "}"
+ },
+ {
+ name: "LBRACKET",
+ endChar: "]",
+ text: "["
+ },
+ {
+ name: "RBRACKET",
+ text: "]"
+ },
+ {
+ name: "EQUALS",
+ text: "="
+ },
+ {
+ name: "COLON",
+ text: ":"
+ },
+ {
+ name: "SEMICOLON",
+ text: ";"
+ },
+
+ {
+ name: "LPAREN",
+ endChar: ")",
+ text: "("
+ },
+ {
+ name: "RPAREN",
+ text: ")"
+ },
+ {
+ name: "DOT",
+ text: "."
+ }
+];
+
+(function(){
+
+ var nameMap = [],
+ typeMap = {};
+
+ Tokens.UNKNOWN = -1;
+ Tokens.unshift({name:"EOF"});
+ for (var i=0, len = Tokens.length; i < len; i++){
+ nameMap.push(Tokens[i].name);
+ Tokens[Tokens[i].name] = i;
+ if (Tokens[i].text){
+ if (Tokens[i].text instanceof Array){
+ for (var j=0; j < Tokens[i].text.length; j++){
+ typeMap[Tokens[i].text[j]] = i;
+ }
+ } else {
+ typeMap[Tokens[i].text] = i;
+ }
+ }
+ }
+
+ Tokens.name = function(tt){
+ return nameMap[tt];
+ };
+
+ Tokens.type = function(c){
+ return typeMap[c] || -1;
+ };
+
+})();
+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){
+ if (part.type == "function" && /^(?:\-(?:ms|moz|o|webkit)\-)?calc/i.test(part)){
+ return true;
+ }else{
+ 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");
+ },
+
+ "<content-sizing>": function(part){ // http://www.w3.org/TR/css3-sizing/#width-height-keywords
+ return ValidationTypes.isLiteral(part, "fill-available | -moz-available | -webkit-fill-available | max-content | -moz-max-content | -webkit-max-content | min-content | -moz-min-content | -webkit-min-content | fit-content | -moz-fit-content | -webkit-fit-content");
+ },
+
+ "<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";
+ },
+
+ "<flex-grow>": function(part){
+ return this["<number>"](part);
+ },
+
+ "<flex-shrink>": function(part){
+ return this["<number>"](part);
+ },
+
+ "<width>": function(part){
+ return this["<margin-width>"](part);
+ },
+
+ "<flex-basis>": function(part){
+ return this["<width>"](part);
+ },
+
+ "<flex-direction>": function(part){
+ return ValidationTypes.isLiteral(part, "row | row-reverse | column | column-reverse");
+ },
+
+ "<flex-wrap>": function(part){
+ return ValidationTypes.isLiteral(part, "nowrap | wrap | wrap-reverse");
+ }
+ },
+
+ complex: {
+
+ "<bg-position>": function(expression){
+ var types = this,
+ result = false,
+ numeric = "<percentage> | <length>",
+ xDir = "left | right",
+ yDir = "top | bottom",
+ count = 0,
+ hasNext = function() {
+ return expression.hasNext() && expression.peek() != ",";
+ };
+
+ while (expression.peek(count) && expression.peek(count) != ",") {
+ count++;
+ }
+
+ if (count < 3) {
+ if (ValidationTypes.isAny(expression, xDir + " | center | " + numeric)) {
+ result = true;
+ ValidationTypes.isAny(expression, yDir + " | center | " + numeric);
+ } else if (ValidationTypes.isAny(expression, yDir)) {
+ result = true;
+ ValidationTypes.isAny(expression, xDir + " | center");
+ }
+ } else {
+ if (ValidationTypes.isAny(expression, xDir)) {
+ if (ValidationTypes.isAny(expression, yDir)) {
+ result = true;
+ ValidationTypes.isAny(expression, numeric);
+ } else if (ValidationTypes.isAny(expression, numeric)) {
+ if (ValidationTypes.isAny(expression, yDir)) {
+ result = true;
+ ValidationTypes.isAny(expression, numeric);
+ } else if (ValidationTypes.isAny(expression, "center")) {
+ result = true;
+ }
+ }
+ } else if (ValidationTypes.isAny(expression, yDir)) {
+ if (ValidationTypes.isAny(expression, xDir)) {
+ result = true;
+ ValidationTypes.isAny(expression, numeric);
+ } else if (ValidationTypes.isAny(expression, numeric)) {
+ if (ValidationTypes.isAny(expression, xDir)) {
+ result = true;
+ ValidationTypes.isAny(expression, numeric);
+ } else if (ValidationTypes.isAny(expression, "center")) {
+ result = true;
+ }
+ }
+ } else if (ValidationTypes.isAny(expression, "center")) {
+ if (ValidationTypes.isAny(expression, xDir + " | " + yDir)) {
+ result = true;
+ ValidationTypes.isAny(expression, numeric);
+ }
+ }
+ }
+
+ 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,
+ simple = "<length> | <percentage> | inherit";
+
+ if (ValidationTypes.isAny(expression, simple)){
+ result = true;
+ ValidationTypes.isAny(expression, simple);
+ }
+
+ return result;
+ },
+
+ "<flex>": function(expression) {
+ var part,
+ result = false;
+ if (ValidationTypes.isAny(expression, "none | inherit")) {
+ result = true;
+ } else {
+ if (ValidationTypes.isType(expression, "<flex-grow>")) {
+ if (expression.peek()) {
+ if (ValidationTypes.isType(expression, "<flex-shrink>")) {
+ if (expression.peek()) {
+ result = ValidationTypes.isType(expression, "<flex-basis>");
+ } else {
+ result = true;
+ }
+ } else if (ValidationTypes.isType(expression, "<flex-basis>")) {
+ result = expression.peek() === null;
+ }
+ } else {
+ result = true;
+ }
+ } else if (ValidationTypes.isType(expression, "<flex-basis>")) {
+ result = true;
+ }
+ }
+
+ if (!result) {
+ part = expression.peek();
+ throw new ValidationError("Expected (none | [ <flex-grow> <flex-shrink>? || <flex-basis> ]) but found '" + expression.value.text + "'.", part.line, part.col);
+ }
+
+ return result;
+ }
+ }
+};
+
+parserlib.css = {
+Colors :Colors,
+Combinator :Combinator,
+Parser :Parser,
+PropertyName :PropertyName,
+PropertyValue :PropertyValue,
+PropertyValuePart :PropertyValuePart,
+MediaFeature :MediaFeature,
+MediaQuery :MediaQuery,
+Selector :Selector,
+SelectorPart :SelectorPart,
+SelectorSubPart :SelectorSubPart,
+Specificity :Specificity,
+TokenStream :TokenStream,
+Tokens :Tokens,
+ValidationError :ValidationError
+};
+})();
+
+(function(){
+for(var prop in parserlib){
+exports[prop] = parserlib[prop];
+}
+})();
+
+
+function objectToString(o) {
+ return Object.prototype.toString.call(o);
+}
+var util = {
+ isArray: function (ar) {
+ return Array.isArray(ar) || (typeof ar === 'object' && objectToString(ar) === '[object Array]');
+ },
+ isDate: function (d) {
+ return typeof d === 'object' && objectToString(d) === '[object Date]';
+ },
+ isRegExp: function (re) {
+ return typeof re === 'object' && objectToString(re) === '[object RegExp]';
+ },
+ getRegExpFlags: function (re) {
+ var flags = '';
+ re.global && (flags += 'g');
+ re.ignoreCase && (flags += 'i');
+ re.multiline && (flags += 'm');
+ return flags;
+ }
+};
+
+
+if (typeof module === 'object')
+ module.exports = clone;
+
+function clone(parent, circular, depth, prototype) {
+ var allParents = [];
+ var allChildren = [];
+
+ var useBuffer = typeof Buffer != 'undefined';
+
+ if (typeof circular == 'undefined')
+ circular = true;
+
+ if (typeof depth == 'undefined')
+ depth = Infinity;
+ function _clone(parent, depth) {
+ if (parent === null)
+ return null;
+
+ if (depth == 0)
+ return parent;
+
+ var child;
+ if (typeof parent != 'object') {
+ return parent;
+ }
+
+ if (util.isArray(parent)) {
+ child = [];
+ } else if (util.isRegExp(parent)) {
+ child = new RegExp(parent.source, util.getRegExpFlags(parent));
+ if (parent.lastIndex) child.lastIndex = parent.lastIndex;
+ } else if (util.isDate(parent)) {
+ child = new Date(parent.getTime());
+ } else if (useBuffer && Buffer.isBuffer(parent)) {
+ child = new Buffer(parent.length);
+ parent.copy(child);
+ return child;
+ } else {
+ if (typeof prototype == 'undefined') child = Object.create(Object.getPrototypeOf(parent));
+ else child = Object.create(prototype);
+ }
+
+ if (circular) {
+ var index = allParents.indexOf(parent);
+
+ if (index != -1) {
+ return allChildren[index];
+ }
+ allParents.push(parent);
+ allChildren.push(child);
+ }
+
+ for (var i in parent) {
+ child[i] = _clone(parent[i], depth - 1);
+ }
+
+ return child;
+ }
+
+ return _clone(parent, depth);
+}
+clone.clonePrototype = function(parent) {
+ if (parent === null)
+ return null;
+
+ var c = function () {};
+ c.prototype = parent;
+ return new c();
+};
+
+var CSSLint = (function(){
+
+ var rules = [],
+ formatters = [],
+ embeddedRuleset = /\/\*csslint([^\*]*)\*\//,
+ api = new parserlib.util.EventTarget();
+
+ api.version = "@VERSION@";
+ api.addRule = function(rule){
+ rules.push(rule);
+ rules[rule.id] = rule;
+ };
+ api.clearRules = function(){
+ rules = [];
+ };
+ 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;
+ };
+ function applyEmbeddedRuleset(text, ruleset){
+ var valueMap,
+ embedded = text && text.match(embeddedRuleset),
+ rules = embedded && embedded[1];
+
+ if (rules) {
+ valueMap = {
+ "true": 2, // true is error
+ "": 1, // blank is warning
+ "false": 0, // false is ignore
+
+ "2": 2, // explicit error
+ "1": 1, // explicit warning
+ "0": 0 // explicit ignore
+ };
+
+ rules.toLowerCase().split(",").forEach(function(rule){
+ var pair = rule.split(":"),
+ property = pair[0] || "",
+ value = pair[1] || "";
+
+ ruleset[property.trim()] = valueMap[value.trim()];
+ });
+ }
+
+ return ruleset;
+ }
+ api.addFormatter = function(formatter) {
+ formatters[formatter.id] = formatter;
+ };
+ api.getFormatter = function(formatId){
+ return formatters[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, options || {});
+ result += formatter.endFormat();
+ }
+
+ return result;
+ };
+ api.hasFormat = function(formatId){
+ return formatters.hasOwnProperty(formatId);
+ };
+ api.verify = function(text, ruleset){
+
+ var i = 0,
+ reporter,
+ lines,
+ report,
+ parser = new parserlib.css.Parser({ starHack: true, ieFilters: true,
+ underscoreHack: true, strict: false });
+ lines = text.replace(/\n\r?/g, "$split$").split("$split$");
+
+ if (!ruleset){
+ ruleset = this.getRuleset();
+ }
+
+ if (embeddedRuleset.test(text)){
+ ruleset = clone(ruleset);
+ ruleset = applyEmbeddedRuleset(text, ruleset);
+ }
+
+ reporter = new Reporter(lines, ruleset);
+
+ ruleset.errors = 2; //always report parsing errors as errors
+ for (i in ruleset){
+ if(ruleset.hasOwnProperty(i) && ruleset[i]){
+ if (rules[i]){
+ rules[i].init(parser, reporter);
+ }
+ }
+ }
+ try {
+ parser.parse(text);
+ } catch (ex) {
+ reporter.error("Fatal error, cannot continue: " + ex.message, ex.line, ex.col, {});
+ }
+
+ report = {
+ messages : reporter.messages,
+ stats : reporter.stats,
+ ruleset : reporter.ruleset
+ };
+ 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;
+ };
+
+ return api;
+
+})();
+function Reporter(lines, ruleset){
+ this.messages = [];
+ this.stats = [];
+ this.lines = lines;
+ this.ruleset = ruleset;
+}
+
+Reporter.prototype = {
+ constructor: Reporter,
+ error: function(message, line, col, rule){
+ this.messages.push({
+ type : "error",
+ line : line,
+ col : col,
+ message : message,
+ evidence: this.lines[line-1],
+ rule : rule || {}
+ });
+ },
+ warn: function(message, line, col, rule){
+ this.report(message, line, col, rule);
+ },
+ report: function(message, line, col, rule){
+ this.messages.push({
+ type : this.ruleset[rule.id] === 2 ? "error" : "warning",
+ line : line,
+ col : col,
+ message : message,
+ evidence: this.lines[line-1],
+ rule : rule
+ });
+ },
+ info: function(message, line, col, rule){
+ this.messages.push({
+ type : "info",
+ line : line,
+ col : col,
+ message : message,
+ evidence: this.lines[line-1],
+ rule : rule
+ });
+ },
+ rollupError: function(message, rule){
+ this.messages.push({
+ type : "error",
+ rollup : true,
+ message : message,
+ rule : rule
+ });
+ },
+ rollupWarn: function(message, rule){
+ this.messages.push({
+ type : "warning",
+ rollup : true,
+ message : message,
+ rule : rule
+ });
+ },
+ stat: function(name, value){
+ this.stats[name] = value;
+ }
+};
+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;
+ },
+ 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);
+ }
+ }
+ }
+};
+
+CSSLint.addRule({
+ id: "adjoining-classes",
+ name: "Disallow adjoining classes",
+ desc: "Don't use adjoining classes.",
+ browsers: "IE6",
+ init: function(parser, reporter){
+ var rule = this;
+ parser.addListener("startrule", function(event){
+ var selectors = event.selectors,
+ selector,
+ part,
+ modifier,
+ classCount,
+ i, j, k;
+
+ for (i=0; i < selectors.length; i++){
+ selector = selectors[i];
+ for (j=0; j < selector.parts.length; j++){
+ part = selector.parts[j];
+ if (part.type === parser.SELECTOR_PART_TYPE){
+ classCount = 0;
+ for (k=0; k < part.modifiers.length; k++){
+ modifier = part.modifiers[k];
+ if (modifier.type === "class"){
+ classCount++;
+ }
+ if (classCount > 1){
+ reporter.report("Don't use adjoining classes.", part.line, part.col, rule);
+ }
+ }
+ }
+ }
+ }
+ });
+ }
+
+});
+CSSLint.addRule({
+ id: "box-model",
+ name: "Beware of broken box size",
+ desc: "Don't use width or height when using padding or border.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this,
+ widthProperties = {
+ border: 1,
+ "border-left": 1,
+ "border-right": 1,
+ padding: 1,
+ "padding-left": 1,
+ "padding-right": 1
+ },
+ heightProperties = {
+ border: 1,
+ "border-bottom": 1,
+ "border-top": 1,
+ padding: 1,
+ "padding-bottom": 1,
+ "padding-top": 1
+ },
+ properties,
+ boxSizing = false;
+
+ 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();
+
+ if (heightProperties[name] || widthProperties[name]){
+ if (!/^0\S*$/.test(event.value) && !(name === "border" && event.value.toString() === "none")){
+ properties[name] = { line: event.property.line, col: event.property.col, value: event.value };
+ }
+ } else {
+ 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", endRule);
+ parser.addListener("endfontface", endRule);
+ parser.addListener("endpage", endRule);
+ parser.addListener("endpagemargin", endRule);
+ parser.addListener("endkeyframerule", endRule);
+ }
+
+});
+
+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;
+
+ 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);
+ }
+ });
+ }
+
+});
+
+CSSLint.addRule({
+ id: "bulletproof-font-face",
+ name: "Use the bulletproof @font-face syntax",
+ desc: "Use the bulletproof @font-face syntax to avoid 404's in old IE (http://www.fontspring.com/blog/the-new-bulletproof-font-face-syntax).",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this,
+ fontFaceRule = false,
+ firstSrc = true,
+ ruleFailed = false,
+ line, col;
+ parser.addListener("startfontface", function(){
+ fontFaceRule = true;
+ });
+
+ parser.addListener("property", function(event){
+ if (!fontFaceRule) {
+ return;
+ }
+
+ var propertyName = event.property.toString().toLowerCase(),
+ value = event.value.toString();
+ line = event.line;
+ col = event.col;
+ if (propertyName === "src") {
+ var regex = /^\s?url\(['"].+\.eot\?.*['"]\)\s*format\(['"]embedded-opentype['"]\).*$/i;
+ if (!value.match(regex) && firstSrc) {
+ ruleFailed = true;
+ firstSrc = false;
+ } else if (value.match(regex) && !firstSrc) {
+ ruleFailed = false;
+ }
+ }
+
+
+ });
+ parser.addListener("endfontface", function(){
+ fontFaceRule = false;
+
+ if (ruleFailed) {
+ reporter.report("@font-face declaration doesn't follow the fontspring bulletproof syntax.", line, col, rule);
+ }
+ });
+ }
+});
+
+CSSLint.addRule({
+ id: "compatible-vendor-prefixes",
+ name: "Require compatible vendor prefixes",
+ desc: "Include all compatible vendor prefixes to reach a wider range of users.",
+ browsers: "All",
+ init: function (parser, reporter) {
+ var rule = this,
+ compatiblePrefixes,
+ properties,
+ prop,
+ variations,
+ prefixed,
+ i,
+ len,
+ inKeyFrame = false,
+ arrayPush = Array.prototype.push,
+ applyTo = [];
+ compatiblePrefixes = {
+ "animation" : "webkit moz",
+ "animation-delay" : "webkit moz",
+ "animation-direction" : "webkit moz",
+ "animation-duration" : "webkit moz",
+ "animation-fill-mode" : "webkit moz",
+ "animation-iteration-count" : "webkit moz",
+ "animation-name" : "webkit moz",
+ "animation-play-state" : "webkit moz",
+ "animation-timing-function" : "webkit moz",
+ "appearance" : "webkit moz",
+ "border-end" : "webkit moz",
+ "border-end-color" : "webkit moz",
+ "border-end-style" : "webkit moz",
+ "border-end-width" : "webkit moz",
+ "border-image" : "webkit moz o",
+ "border-radius" : "webkit",
+ "border-start" : "webkit moz",
+ "border-start-color" : "webkit moz",
+ "border-start-style" : "webkit moz",
+ "border-start-width" : "webkit moz",
+ "box-align" : "webkit moz ms",
+ "box-direction" : "webkit moz ms",
+ "box-flex" : "webkit moz ms",
+ "box-lines" : "webkit ms",
+ "box-ordinal-group" : "webkit moz ms",
+ "box-orient" : "webkit moz ms",
+ "box-pack" : "webkit moz ms",
+ "box-sizing" : "webkit moz",
+ "box-shadow" : "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",
+ "margin-start" : "webkit moz",
+ "marquee-speed" : "webkit wap",
+ "marquee-style" : "webkit wap",
+ "padding-end" : "webkit moz",
+ "padding-start" : "webkit moz",
+ "tab-size" : "moz o",
+ "text-size-adjust" : "webkit ms",
+ "transform" : "webkit moz ms o",
+ "transform-origin" : "webkit moz ms o",
+ "transition" : "webkit moz o",
+ "transition-delay" : "webkit moz o",
+ "transition-duration" : "webkit moz o",
+ "transition-property" : "webkit moz o",
+ "transition-timing-function" : "webkit moz o",
+ "user-modify" : "webkit moz",
+ "user-select" : "webkit moz ms",
+ "word-break" : "epub ms",
+ "writing-mode" : "epub ms"
+ };
+
+
+ for (prop in compatiblePrefixes) {
+ if (compatiblePrefixes.hasOwnProperty(prop)) {
+ variations = [];
+ prefixed = compatiblePrefixes[prop].split(" ");
+ for (i = 0, len = prefixed.length; i < len; i++) {
+ variations.push("-" + prefixed[i] + "-" + prop);
+ }
+ compatiblePrefixes[prop] = variations;
+ arrayPush.apply(applyTo, variations);
+ }
+ }
+
+ parser.addListener("startrule", function () {
+ properties = [];
+ });
+
+ parser.addListener("startkeyframes", function (event) {
+ inKeyFrame = event.prefix || true;
+ });
+
+ parser.addListener("endkeyframes", function () {
+ inKeyFrame = false;
+ });
+
+ parser.addListener("property", function (event) {
+ 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);
+ }
+ }
+ });
+
+ parser.addListener("endrule", function () {
+ if (!properties.length) {
+ return;
+ }
+
+ var propertyGroups = {},
+ i,
+ len,
+ name,
+ prop,
+ variations,
+ value,
+ full,
+ actual,
+ item,
+ propertiesSpecified;
+
+ for (i = 0, len = properties.length; i < len; i++) {
+ name = properties[i];
+
+ for (prop in compatiblePrefixes) {
+ if (compatiblePrefixes.hasOwnProperty(prop)) {
+ variations = compatiblePrefixes[prop];
+ if (CSSLint.Util.indexOf(variations, name.text) > -1) {
+ if (!propertyGroups[prop]) {
+ propertyGroups[prop] = {
+ full : variations.slice(0),
+ actual : [],
+ actualNodes: []
+ };
+ }
+ if (CSSLint.Util.indexOf(propertyGroups[prop].actual, name.text) === -1) {
+ propertyGroups[prop].actual.push(name.text);
+ propertyGroups[prop].actualNodes.push(name);
+ }
+ }
+ }
+ }
+ }
+
+ for (prop in propertyGroups) {
+ if (propertyGroups.hasOwnProperty(prop)) {
+ value = propertyGroups[prop];
+ full = value.full;
+ actual = value.actual;
+
+ if (full.length > actual.length) {
+ for (i = 0, len = full.length; i < len; i++) {
+ item = full[i];
+ if (CSSLint.Util.indexOf(actual, item) === -1) {
+ propertiesSpecified = (actual.length === 1) ? actual[0] : (actual.length === 2) ? actual.join(" and ") : actual.join(", ");
+ reporter.report("The property " + item + " is compatible with " + propertiesSpecified + " and should be included as well.", value.actualNodes[0].line, value.actualNodes[0].col, rule);
+ }
+ }
+
+ }
+ }
+ }
+ });
+ }
+});
+
+CSSLint.addRule({
+ id: "display-property-grouping",
+ name: "Require properties appropriate for display",
+ desc: "Certain properties shouldn't be used with certain display property values.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this;
+
+ var propertiesToCheck = {
+ display: 1,
+ "float": "none",
+ height: 1,
+ width: 1,
+ margin: 1,
+ "margin-left": 1,
+ "margin-right": 1,
+ "margin-bottom": 1,
+ "margin-top": 1,
+ padding: 1,
+ "padding-left": 1,
+ "padding-right": 1,
+ "padding-bottom": 1,
+ "padding-top": 1,
+ "vertical-align": 1
+ },
+ properties;
+
+ 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 = {};
+ }
+
+ function endRule(){
+
+ var display = properties.display ? properties.display.value : null;
+ if (display){
+ switch(display){
+
+ case "inline":
+ reportProperty("height", display);
+ reportProperty("width", display);
+ reportProperty("margin", display);
+ reportProperty("margin-top", display);
+ reportProperty("margin-bottom", display);
+ reportProperty("float", display, "display:inline has no effect on floated elements (but may be used to fix the IE6 double-margin bug).");
+ break;
+
+ case "block":
+ reportProperty("vertical-align", display);
+ break;
+
+ case "inline-block":
+ reportProperty("float", display);
+ break;
+
+ default:
+ if (display.indexOf("table-") === 0){
+ reportProperty("margin", display);
+ reportProperty("margin-left", display);
+ reportProperty("margin-right", display);
+ reportProperty("margin-top", display);
+ reportProperty("margin-bottom", display);
+ reportProperty("float", display);
+ }
+ }
+ }
+
+ }
+
+ 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();
+
+ 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);
+
+ }
+
+});
+
+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 = {};
+
+ 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: "Disallow duplicate properties",
+ desc: "Duplicate properties must appear one after the other.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this,
+ properties,
+ lastProperty;
+
+ function startRule(){
+ properties = {};
+ }
+
+ 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.report("Duplicate property '" + event.property + "' found.", event.line, event.col, rule);
+ }
+
+ properties[name] = event.value.text;
+ lastProperty = name;
+
+ });
+
+
+ }
+
+});
+
+CSSLint.addRule({
+ id: "empty-rules",
+ name: "Disallow empty rules",
+ desc: "Rules without any properties specified should be removed.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this,
+ count = 0;
+
+ parser.addListener("startrule", function(){
+ count=0;
+ });
+
+ parser.addListener("property", function(){
+ count++;
+ });
+
+ parser.addListener("endrule", function(event){
+ var selectors = event.selectors;
+ if (count === 0){
+ reporter.report("Rule is empty.", selectors[0].line, selectors[0].col, rule);
+ }
+ });
+ }
+
+});
+
+CSSLint.addRule({
+ id: "errors",
+ name: "Parsing Errors",
+ desc: "This rule looks for recoverable syntax errors.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this;
+
+ parser.addListener("error", function(event){
+ reporter.error(event.message, event.line, event.col, rule);
+ });
+
+ }
+
+});
+
+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,
+ "border-color": 1,
+ "border-top-color": 1,
+ "border-right-color": 1,
+ "border-bottom-color": 1,
+ "border-left-color": 1,
+ border: 1,
+ "border-top": 1,
+ "border-right": 1,
+ "border-bottom": 1,
+ "border-left": 1,
+ "background-color": 1
+ },
+ properties;
+
+ function startRule(){
+ 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;
+ });
+
+ }
+
+});
+
+CSSLint.addRule({
+ id: "floats",
+ name: "Disallow too many floats",
+ desc: "This rule tests if the float property is used too many times",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this;
+ var count = 0;
+ parser.addListener("property", function(event){
+ if (event.property.text.toLowerCase() === "float" &&
+ event.value.text.toLowerCase() !== "none"){
+ count++;
+ }
+ });
+ parser.addListener("endstylesheet", function(){
+ reporter.stat("floats", count);
+ if (count >= 10){
+ reporter.rollupWarn("Too many floats (" + count + "), you're probably using them for layout. Consider using a grid system instead.", rule);
+ }
+ });
+ }
+
+});
+
+CSSLint.addRule({
+ id: "font-faces",
+ name: "Don't use too many web fonts",
+ desc: "Too many different web fonts in the same stylesheet.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this,
+ count = 0;
+
+
+ parser.addListener("startfontface", function(){
+ count++;
+ });
+
+ parser.addListener("endstylesheet", function(){
+ if (count > 5){
+ reporter.rollupWarn("Too many @font-face declarations (" + count + ").", rule);
+ }
+ });
+ }
+
+});
+
+CSSLint.addRule({
+ id: "font-sizes",
+ name: "Disallow too many font sizes",
+ desc: "Checks the number of font-size declarations.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this,
+ count = 0;
+ parser.addListener("property", function(event){
+ if (event.property.toString() === "font-size"){
+ count++;
+ }
+ });
+ parser.addListener("endstylesheet", function(){
+ reporter.stat("font-sizes", count);
+ if (count >= 10){
+ reporter.rollupWarn("Too many font-size declarations (" + count + "), abstraction needed.", rule);
+ }
+ });
+ }
+
+});
+
+CSSLint.addRule({
+ id: "gradients",
+ name: "Require all gradient definitions",
+ desc: "When using a vendor-prefixed gradient, make sure to use them all.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this,
+ gradients;
+
+ parser.addListener("startrule", function(){
+ gradients = {
+ moz: 0,
+ webkit: 0,
+ oldWebkit: 0,
+ o: 0
+ };
+ });
+
+ parser.addListener("property", function(event){
+
+ if (/\-(moz|o|webkit)(?:\-(?:linear|radial))\-gradient/i.test(event.value)){
+ gradients[RegExp.$1] = 1;
+ } else if (/\-webkit\-gradient/i.test(event.value)){
+ gradients.oldWebkit = 1;
+ }
+
+ });
+
+ parser.addListener("endrule", function(event){
+ var missing = [];
+
+ if (!gradients.moz){
+ missing.push("Firefox 3.6+");
+ }
+
+ if (!gradients.webkit){
+ missing.push("Webkit (Safari 5+, Chrome)");
+ }
+
+ if (!gradients.oldWebkit){
+ missing.push("Old Webkit (Safari 4+, Chrome)");
+ }
+
+ if (!gradients.o){
+ missing.push("Opera 11.1+");
+ }
+
+ if (missing.length && missing.length < 4){
+ reporter.report("Missing vendor-prefixed CSS gradients for " + missing.join(", ") + ".", event.selectors[0].line, event.selectors[0].col, rule);
+ }
+
+ });
+
+ }
+
+});
+
+CSSLint.addRule({
+ id: "ids",
+ name: "Disallow IDs in selectors",
+ desc: "Selectors should not contain IDs.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this;
+ parser.addListener("startrule", function(event){
+ var selectors = event.selectors,
+ selector,
+ part,
+ modifier,
+ idCount,
+ i, j, k;
+
+ for (i=0; i < selectors.length; i++){
+ selector = selectors[i];
+ idCount = 0;
+
+ for (j=0; j < selector.parts.length; j++){
+ part = selector.parts[j];
+ if (part.type === parser.SELECTOR_PART_TYPE){
+ for (k=0; k < part.modifiers.length; k++){
+ modifier = part.modifiers[k];
+ if (modifier.type === "id"){
+ idCount++;
+ }
+ }
+ }
+ }
+
+ if (idCount === 1){
+ reporter.report("Don't use IDs in selectors.", selector.line, selector.col, rule);
+ } else if (idCount > 1){
+ reporter.report(idCount + " IDs in the selector, really?", selector.line, selector.col, rule);
+ }
+ }
+
+ });
+ }
+
+});
+
+CSSLint.addRule({
+ id: "import",
+ name: "Disallow @import",
+ desc: "Don't use @import, use <link> instead.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this;
+
+ parser.addListener("import", function(event){
+ reporter.report("@import prevents parallel downloads, use <link> instead.", event.line, event.col, rule);
+ });
+
+ }
+
+});
+
+CSSLint.addRule({
+ id: "important",
+ name: "Disallow !important",
+ desc: "Be careful when using !important declaration",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this,
+ count = 0;
+ parser.addListener("property", function(event){
+ if (event.important === true){
+ count++;
+ reporter.report("Use of !important", event.line, event.col, rule);
+ }
+ });
+ 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 specificity issues.", rule);
+ }
+ });
+ }
+
+});
+
+CSSLint.addRule({
+ id: "known-properties",
+ name: "Require use of known properties",
+ desc: "Properties should be known (listed in CSS3 specification) or be a vendor-prefixed property.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this;
+
+ parser.addListener("property", function(event){
+ if (event.invalid) {
+ reporter.report(event.invalid.message, event.line, event.col, rule);
+ }
+
+ });
+ }
+
+});
+CSSLint.addRule({
+ id: "order-alphabetical",
+ name: "Alphabetical order",
+ desc: "Assure properties are in alphabetical order",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this,
+ properties;
+
+ var startRule = function () {
+ properties = [];
+ };
+
+ 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,
+ lowerCasePrefixLessName = name.toLowerCase().replace(/^-.*?-/, "");
+
+ properties.push(lowerCasePrefixLessName);
+ });
+
+ parser.addListener("endrule", function(event){
+ var currentProperties = properties.join(","),
+ expectedProperties = properties.sort().join(",");
+
+ if (currentProperties !== expectedProperties){
+ reporter.report("Rule doesn't have all its properties in alphabetical ordered.", event.line, event.col, rule);
+ }
+ });
+ }
+
+});
+
+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(){
+ 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.toString() === "none" || value.toString() === "0")){
+ lastRule.outline = true;
+ }
+ }
+
+ });
+
+ parser.addListener("endrule", endRule);
+ parser.addListener("endfontface", endRule);
+ parser.addListener("endpage", endRule);
+ parser.addListener("endpagemargin", endRule);
+ parser.addListener("endkeyframerule", endRule);
+
+ }
+
+});
+
+CSSLint.addRule({
+ id: "overqualified-elements",
+ name: "Disallow overqualified elements",
+ desc: "Don't use classes or IDs with elements (a.foo or a#foo).",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this,
+ classes = {};
+
+ parser.addListener("startrule", function(event){
+ var selectors = event.selectors,
+ selector,
+ part,
+ modifier,
+ i, j, k;
+
+ for (i=0; i < selectors.length; i++){
+ selector = selectors[i];
+
+ for (j=0; j < selector.parts.length; j++){
+ part = selector.parts[j];
+ 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.report("Element (" + part + ") is overqualified, just use " + modifier + " without element name.", part.line, part.col, rule);
+ } else if (modifier.type === "class"){
+
+ if (!classes[modifier]){
+ classes[modifier] = [];
+ }
+ classes[modifier].push({ modifier: modifier, part: part });
+ }
+ }
+ }
+ }
+ }
+ });
+
+ parser.addListener("endstylesheet", function(){
+
+ var prop;
+ for (prop in classes){
+ if (classes.hasOwnProperty(prop)){
+ if (classes[prop].length === 1 && classes[prop][0].part.elementName){
+ 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);
+ }
+ }
+ }
+ });
+ }
+
+});
+
+CSSLint.addRule({
+ id: "qualified-headings",
+ name: "Disallow qualified headings",
+ desc: "Headings should not be qualified (namespaced).",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this;
+
+ parser.addListener("startrule", function(event){
+ var selectors = event.selectors,
+ selector,
+ part,
+ i, j;
+
+ for (i=0; i < selectors.length; i++){
+ selector = selectors[i];
+
+ for (j=0; j < selector.parts.length; j++){
+ part = selector.parts[j];
+ if (part.type === parser.SELECTOR_PART_TYPE){
+ if (part.elementName && /h[1-6]/.test(part.elementName.toString()) && j > 0){
+ reporter.report("Heading (" + part.elementName + ") should not be qualified.", part.line, part.col, rule);
+ }
+ }
+ }
+ }
+ });
+ }
+
+});
+
+CSSLint.addRule({
+ id: "regex-selectors",
+ name: "Disallow selectors that look like regexs",
+ desc: "Selectors that look like regular expressions are slow and should be avoided.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this;
+
+ parser.addListener("startrule", function(event){
+ var selectors = event.selectors,
+ selector,
+ part,
+ modifier,
+ i, j, k;
+
+ for (i=0; i < selectors.length; i++){
+ selector = selectors[i];
+ for (j=0; j < selector.parts.length; j++){
+ part = selector.parts[j];
+ 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.report("Attribute selectors with " + RegExp.$1 + " are slow!", modifier.line, modifier.col, rule);
+ }
+ }
+
+ }
+ }
+ }
+ }
+ });
+ }
+
+});
+
+CSSLint.addRule({
+ id: "rules-count",
+ name: "Rules Count",
+ desc: "Track how many rules there are.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var count = 0;
+ parser.addListener("startrule", function(){
+ count++;
+ });
+
+ parser.addListener("endstylesheet", function(){
+ reporter.stat("rule-count", count);
+ });
+ }
+
+});
+
+CSSLint.addRule({
+ id: "selector-max-approaching",
+ name: "Warn when approaching the 4095 selector limit for IE",
+ desc: "Will warn when selector count is >= 3800 selectors.",
+ browsers: "IE",
+ init: function(parser, reporter) {
+ var rule = this, count = 0;
+
+ parser.addListener("startrule", function(event) {
+ count += event.selectors.length;
+ });
+
+ parser.addListener("endstylesheet", function() {
+ if (count >= 3800) {
+ reporter.report("You have " + count + " selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,rule);
+ }
+ });
+ }
+
+});
+
+CSSLint.addRule({
+ id: "selector-max",
+ name: "Error when past the 4095 selector limit for IE",
+ desc: "Will error when selector count is > 4095.",
+ browsers: "IE",
+ init: function(parser, reporter){
+ var rule = this, count = 0;
+
+ parser.addListener("startrule", function(event) {
+ count += event.selectors.length;
+ });
+
+ parser.addListener("endstylesheet", function() {
+ if (count > 4095) {
+ reporter.report("You have " + count + " selectors. Internet Explorer supports a maximum of 4095 selectors per stylesheet. Consider refactoring.",0,0,rule);
+ }
+ });
+ }
+
+});
+
+CSSLint.addRule({
+ id: "selector-newline",
+ name: "Disallow new-line characters in selectors",
+ desc: "New-line characters in selectors are usually a forgotten comma and not a descendant combinator.",
+ browsers: "All",
+ init: function(parser, reporter) {
+ var rule = this;
+
+ function startRule(event) {
+ var i, len, selector, p, n, pLen, part, part2, type, currentLine, nextLine,
+ selectors = event.selectors;
+
+ for (i = 0, len = selectors.length; i < len; i++) {
+ selector = selectors[i];
+ for (p = 0, pLen = selector.parts.length; p < pLen; p++) {
+ for (n = p + 1; n < pLen; n++) {
+ part = selector.parts[p];
+ part2 = selector.parts[n];
+ type = part.type;
+ currentLine = part.line;
+ nextLine = part2.line;
+
+ if (type === "descendant" && nextLine > currentLine) {
+ reporter.report("newline character found in selector (forgot a comma?)", currentLine, selectors[i].parts[0].col, rule);
+ }
+ }
+ }
+
+ }
+ }
+
+ parser.addListener("startrule", startRule);
+
+ }
+});
+
+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(){
+ 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();
+
+ 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;
+
+ if (property.hack === "*") {
+ reporter.report("Property with star prefix found.", event.property.line, event.property.col, rule);
+ }
+ });
+ }
+});
+
+CSSLint.addRule({
+ id: "text-indent",
+ name: "Disallow negative text-indent",
+ desc: "Checks for text indent less than -99px",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this,
+ textIndent,
+ direction;
+
+
+ function startRule(){
+ textIndent = false;
+ direction = "inherit";
+ }
+ function endRule(){
+ 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.toString().toLowerCase(),
+ value = event.value;
+
+ if (name === "text-indent" && value.parts[0].value < -99){
+ textIndent = event.property;
+ } else if (name === "direction" && value.toString() === "ltr"){
+ direction = "ltr";
+ }
+ });
+
+ parser.addListener("endrule", endRule);
+ parser.addListener("endfontface", endRule);
+
+ }
+
+});
+
+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;
+
+ if (property.hack === "_") {
+ reporter.report("Property with underscore prefix found.", event.property.line, event.property.col, rule);
+ }
+ });
+ }
+});
+
+CSSLint.addRule({
+ id: "unique-headings",
+ name: "Headings should only be defined once",
+ desc: "Headings should be defined only once.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this;
+
+ var headings = {
+ h1: 0,
+ h2: 0,
+ h3: 0,
+ h4: 0,
+ h5: 0,
+ h6: 0
+ };
+
+ parser.addListener("startrule", function(event){
+ var selectors = event.selectors,
+ selector,
+ part,
+ 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])/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(){
+ 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);
+ }
+ });
+ }
+
+});
+
+CSSLint.addRule({
+ id: "universal-selector",
+ name: "Disallow universal selector",
+ desc: "The universal selector (*) is known to be slow.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this;
+
+ parser.addListener("startrule", function(event){
+ var selectors = event.selectors,
+ selector,
+ part,
+ i;
+
+ for (i=0; i < selectors.length; i++){
+ selector = selectors[i];
+
+ part = selector.parts[selector.parts.length-1];
+ if (part.elementName === "*"){
+ reporter.report(rule.desc, part.line, part.col, rule);
+ }
+ }
+ });
+ }
+
+});
+
+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, k;
+
+ 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: "Require standard property with vendor prefix",
+ desc: "When using a vendor-prefixed property, make sure to include the standard one.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this,
+ properties,
+ num,
+ propertiesToCheck = {
+ "-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-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"
+ };
+ function startRule(){
+ properties = {};
+ num = 1;
+ }
+ function endRule(){
+ var prop,
+ i,
+ len,
+ needed,
+ actual,
+ needsStandard = [];
+
+ for (prop in properties){
+ if (propertiesToCheck[prop]){
+ needsStandard.push({ actual: prop, needed: propertiesToCheck[prop]});
+ }
+ }
+
+ for (i=0, len=needsStandard.length; i < len; i++){
+ needed = needsStandard[i].needed;
+ actual = needsStandard[i].actual;
+
+ if (!properties[needed]){
+ reporter.report("Missing standard property '" + needed + "' to go along with '" + actual + "'.", properties[actual][0].name.line, properties[actual][0].name.col, rule);
+ } else {
+ if (properties[needed][0].pos < properties[actual][0].pos){
+ reporter.report("Standard property '" + needed + "' should come after vendor-prefixed property '" + actual + "'.", properties[actual][0].name.line, properties[actual][0].name.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();
+
+ if (!properties[name]){
+ properties[name] = [];
+ }
+
+ properties[name].push({ name: event.property, value : event.value, pos:num++ });
+ });
+
+ parser.addListener("endrule", endRule);
+ parser.addListener("endfontface", endRule);
+ parser.addListener("endpage", endRule);
+ parser.addListener("endpagemargin", endRule);
+ parser.addListener("endkeyframerule", endRule);
+ }
+
+});
+
+CSSLint.addRule({
+ id: "zero-units",
+ name: "Disallow units for 0 values",
+ desc: "You don't need to specify units when a value is 0.",
+ browsers: "All",
+ init: function(parser, reporter){
+ var rule = this;
+ 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 && parts[i].type !== "time"){
+ reporter.report("Values of 0 shouldn't have units specified.", parts[i].line, parts[i].col, rule);
+ }
+ i++;
+ }
+
+ });
+
+ }
+
+});
+
+(function() {
+ var xmlEscape = function(str) {
+ if (!str || str.constructor !== String) {
+ return "";
+ }
+
+ return str.replace(/[\"&><]/g, function(match) {
+ switch (match) {
+ case "\"":
+ return "&quot;";
+ case "&":
+ return "&amp;";
+ case "<":
+ return "&lt;";
+ case ">":
+ return "&gt;";
+ }
+ });
+ };
+
+ CSSLint.addFormatter({
+ id: "checkstyle-xml",
+ name: "Checkstyle XML format",
+ startFormat: function(){
+ return "<?xml version=\"1.0\" encoding=\"utf-8\"?><checkstyle>";
+ },
+ endFormat: function(){
+ return "</checkstyle>";
+ },
+ readError: function(filename, message) {
+ return "<file name=\"" + xmlEscape(filename) + "\"><error line=\"0\" column=\"0\" severty=\"error\" message=\"" + xmlEscape(message) + "\"></error></file>";
+ },
+ formatResults: function(results, filename/*, options*/) {
+ var messages = results.messages,
+ output = [];
+ var generateSource = function(rule) {
+ if (!rule || !("name" in rule)) {
+ return "";
+ }
+ return "net.csslint." + rule.name.replace(/\s/g,"");
+ };
+
+
+
+ if (messages.length > 0) {
+ output.push("<file name=\""+filename+"\">");
+ CSSLint.Util.forEach(messages, function (message) {
+ if (!message.rollup) {
+ output.push("<error line=\"" + message.line + "\" column=\"" + message.col + "\" severity=\"" + message.type + "\"" +
+ " message=\"" + xmlEscape(message.message) + "\" source=\"" + generateSource(message.rule) +"\"/>");
+ }
+ });
+ output.push("</file>");
+ }
+
+ return output.join("");
+ }
+ });
+
+}());
+
+CSSLint.addFormatter({
+ id: "compact",
+ name: "Compact, 'porcelain' format",
+ startFormat: function() {
+ return "";
+ },
+ endFormat: function() {
+ return "";
+ },
+ formatResults: function(results, filename, options) {
+ var messages = results.messages,
+ output = "";
+ options = options || {};
+ var capitalize = function(str) {
+ return str.charAt(0).toUpperCase() + str.slice(1);
+ };
+
+ if (messages.length === 0) {
+ return options.quiet ? "" : filename + ": Lint Free!";
+ }
+
+ CSSLint.Util.forEach(messages, function(message) {
+ if (message.rollup) {
+ output += filename + ": " + capitalize(message.type) + " - " + message.message + "\n";
+ } else {
+ output += filename + ": " + "line " + message.line +
+ ", col " + message.col + ", " + capitalize(message.type) + " - " + message.message + " (" + message.rule.id + ")\n";
+ }
+ });
+
+ return output;
+ }
+});
+
+CSSLint.addFormatter({
+ id: "csslint-xml",
+ name: "CSSLint XML format",
+ startFormat: function(){
+ return "<?xml version=\"1.0\" encoding=\"utf-8\"?><csslint>";
+ },
+ endFormat: function(){
+ return "</csslint>";
+ },
+ formatResults: function(results, filename/*, options*/) {
+ var messages = results.messages,
+ output = [];
+ var escapeSpecialCharacters = function(str) {
+ if (!str || str.constructor !== String) {
+ return "";
+ }
+ return str.replace(/\"/g, "'").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
+ };
+
+ if (messages.length > 0) {
+ output.push("<file name=\""+filename+"\">");
+ CSSLint.Util.forEach(messages, function (message) {
+ if (message.rollup) {
+ output.push("<issue severity=\"" + message.type + "\" reason=\"" + escapeSpecialCharacters(message.message) + "\" evidence=\"" + escapeSpecialCharacters(message.evidence) + "\"/>");
+ } else {
+ output.push("<issue line=\"" + message.line + "\" char=\"" + message.col + "\" severity=\"" + message.type + "\"" +
+ " reason=\"" + escapeSpecialCharacters(message.message) + "\" evidence=\"" + escapeSpecialCharacters(message.evidence) + "\"/>");
+ }
+ });
+ output.push("</file>");
+ }
+
+ return output.join("");
+ }
+});
+
+CSSLint.addFormatter({
+ id: "junit-xml",
+ name: "JUNIT XML format",
+ startFormat: function(){
+ return "<?xml version=\"1.0\" encoding=\"utf-8\"?><testsuites>";
+ },
+ endFormat: function() {
+ return "</testsuites>";
+ },
+ formatResults: function(results, filename/*, options*/) {
+
+ var messages = results.messages,
+ output = [],
+ tests = {
+ "error": 0,
+ "failure": 0
+ };
+ var generateSource = function(rule) {
+ if (!rule || !("name" in rule)) {
+ return "";
+ }
+ return "net.csslint." + rule.name.replace(/\s/g,"");
+ };
+ var escapeSpecialCharacters = function(str) {
+
+ if (!str || str.constructor !== String) {
+ return "";
+ }
+
+ return str.replace(/\"/g, "'").replace(/</g, "&lt;").replace(/>/g, "&gt;");
+
+ };
+
+ if (messages.length > 0) {
+
+ messages.forEach(function (message) {
+ var type = message.type === "warning" ? "error" : message.type;
+ if (!message.rollup) {
+ output.push("<testcase time=\"0\" name=\"" + generateSource(message.rule) + "\">");
+ output.push("<" + type + " message=\"" + escapeSpecialCharacters(message.message) + "\"><![CDATA[" + message.line + ":" + message.col + ":" + escapeSpecialCharacters(message.evidence) + "]]></" + type + ">");
+ output.push("</testcase>");
+
+ tests[type] += 1;
+
+ }
+
+ });
+
+ output.unshift("<testsuite time=\"0\" tests=\"" + messages.length + "\" skipped=\"0\" errors=\"" + tests.error + "\" failures=\"" + tests.failure + "\" package=\"net.csslint\" name=\"" + filename + "\">");
+ output.push("</testsuite>");
+
+ }
+
+ return output.join("");
+
+ }
+});
+
+CSSLint.addFormatter({
+ id: "lint-xml",
+ name: "Lint XML format",
+ startFormat: function(){
+ return "<?xml version=\"1.0\" encoding=\"utf-8\"?><lint>";
+ },
+ endFormat: function(){
+ return "</lint>";
+ },
+ formatResults: function(results, filename/*, options*/) {
+ var messages = results.messages,
+ output = [];
+ var escapeSpecialCharacters = function(str) {
+ if (!str || str.constructor !== String) {
+ return "";
+ }
+ return str.replace(/\"/g, "'").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
+ };
+
+ if (messages.length > 0) {
+
+ output.push("<file name=\""+filename+"\">");
+ CSSLint.Util.forEach(messages, function (message) {
+ if (message.rollup) {
+ output.push("<issue severity=\"" + message.type + "\" reason=\"" + escapeSpecialCharacters(message.message) + "\" evidence=\"" + escapeSpecialCharacters(message.evidence) + "\"/>");
+ } else {
+ output.push("<issue line=\"" + message.line + "\" char=\"" + message.col + "\" severity=\"" + message.type + "\"" +
+ " reason=\"" + escapeSpecialCharacters(message.message) + "\" evidence=\"" + escapeSpecialCharacters(message.evidence) + "\"/>");
+ }
+ });
+ output.push("</file>");
+ }
+
+ return output.join("");
+ }
+});
+
+CSSLint.addFormatter({
+ id: "text",
+ name: "Plain Text",
+ startFormat: function() {
+ return "";
+ },
+ endFormat: function() {
+ return "";
+ },
+ formatResults: function(results, filename, options) {
+ var messages = results.messages,
+ output = "";
+ options = options || {};
+
+ if (messages.length === 0) {
+ return options.quiet ? "" : "\n\ncsslint: No errors in " + filename + ".";
+ }
+
+ output = "\n\ncsslint: There ";
+ if (messages.length === 1) {
+ output += "is 1 problem";
+ } else {
+ output += "are " + messages.length + " problems";
+ }
+ output += " in " + filename + ".";
+
+ var pos = filename.lastIndexOf("/"),
+ shortFilename = filename;
+
+ if (pos === -1){
+ pos = filename.lastIndexOf("\\");
+ }
+ if (pos > -1){
+ shortFilename = filename.substring(pos+1);
+ }
+
+ CSSLint.Util.forEach(messages, function (message, i) {
+ output = output + "\n\n" + shortFilename;
+ if (message.rollup) {
+ output += "\n" + (i+1) + ": " + message.type;
+ output += "\n" + message.message;
+ } else {
+ output += "\n" + (i+1) + ": " + message.type + " at line " + message.line + ", col " + message.col;
+ output += "\n" + message.message;
+ output += "\n" + message.evidence;
+ }
+ });
+
+ return output;
+ }
+});
+
+module.exports.CSSLint = CSSLint;
+
+});
+
+ace.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) {
+"use strict";
+
+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(400);
+ this.ruleset = null;
+ this.setDisabledRules("ids|order-alphabetical");
+ this.setInfoRules(
+ "adjoining-classes|qualified-headings|zero-units|gradients|" +
+ "import|outline-none|vendor-prefix"
+ );
+};
+
+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();
+ if (!value)
+ return this.sender.emit("annotate", []);
+ var infoRules = this.infoRules;
+
+ var result = CSSLint.verify(value, this.ruleset);
+ this.sender.emit("annotate", result.messages.map(function(msg) {
+ return {
+ row: msg.line - 1,
+ column: msg.col - 1,
+ text: msg.message,
+ type: infoRules[msg.rule.id] ? "info" : msg.type,
+ rule: msg.rule.name
+ }
+ }));
+ };
+
+}).call(Worker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ 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 ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ 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, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ 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("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ 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("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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 || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+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, "");
+ };
+}
+
+function toInteger(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;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/worker-html.js b/www/wiki/extensions/CodeEditor/modules/ace/worker-html.js
new file mode 100644
index 00000000..ccb04e91
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/worker-html.js
@@ -0,0 +1,11605 @@
+"no use strict";
+;(function(window) {
+if (typeof window.window != "undefined" && window.document)
+ return;
+if (window.require && window.define)
+ return;
+
+if (!window.console) {
+ window.console = function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+ };
+ window.console.error =
+ window.console.warn =
+ window.console.log =
+ window.console.trace = window.console;
+}
+window.window = window;
+window.ace = window;
+
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ data: err.data,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
+window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
+ if (moduleName.indexOf("!") !== -1) {
+ var chunks = moduleName.split("!");
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
+ }
+ // normalize relative requires
+ if (moduleName.charAt(0) == ".") {
+ var base = parentId.split("/").slice(0, -1).join("/");
+ moduleName = (base ? base + "/" : "") + moduleName;
+
+ while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
+ var previous = moduleName;
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ }
+ }
+
+ return moduleName;
+};
+
+window.require = function require(parentId, id) {
+ if (!id) {
+ id = parentId;
+ parentId = null;
+ }
+ if (!id.charAt)
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+ id = window.normalizeModule(parentId, id);
+
+ var module = window.require.modules[id];
+ if (module) {
+ if (!module.initialized) {
+ module.initialized = true;
+ module.exports = module.factory().exports;
+ }
+ return module.exports;
+ }
+
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+
+ var path = resolveModuleId(id, window.require.tlns);
+ if (path.slice(-3) != ".js") path += ".js";
+
+ window.require.id = id;
+ window.require.modules[id] = {}; // prevent infinite loop on broken modules
+ importScripts(path);
+ return window.require(parentId, id);
+};
+function resolveModuleId(id, paths) {
+ var testPath = id, tail = "";
+ while (testPath) {
+ var alias = paths[testPath];
+ if (typeof alias == "string") {
+ return alias + tail;
+ } else if (alias) {
+ return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name);
+ } else if (alias === false) {
+ return "";
+ }
+ var i = testPath.lastIndexOf("/");
+ if (i === -1) break;
+ tail = testPath.substr(i) + tail;
+ testPath = testPath.slice(0, i);
+ }
+ return id;
+}
+window.require.modules = {};
+window.require.tlns = {};
+
+window.define = function(id, deps, factory) {
+ if (arguments.length == 2) {
+ factory = deps;
+ if (typeof id != "string") {
+ deps = id;
+ id = window.require.id;
+ }
+ } else if (arguments.length == 1) {
+ factory = id;
+ deps = [];
+ id = window.require.id;
+ }
+
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject "require", "exports" and
+ // "module" as dependencies, to provide CommonJS compatibility.
+ deps = ["require", "exports", "module"];
+
+ var req = function(childId) {
+ return window.require(id, childId);
+ };
+
+ window.require.modules[id] = {
+ exports: {},
+ factory: function() {
+ var module = this;
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch (dep) {
+ // Because "require", "exports" and "module" aren't actual
+ // dependencies, we must handle them seperately.
+ case "require": return req;
+ case "exports": return module.exports;
+ case "module": return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
+ if (returnExports)
+ module.exports = returnExports;
+ return module;
+ }
+ };
+};
+window.define.amd = {};
+require.tlns = {};
+window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
+ for (var i in topLevelNamespaces)
+ require.tlns[i] = topLevelNamespaces[i];
+};
+
+window.initSender = function initSender() {
+
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("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 = window.main = null;
+var sender = window.sender = null;
+
+window.onmessage = function(e) {
+ var msg = e.data;
+ if (msg.event && sender) {
+ sender._signal(msg.event, msg.data);
+ }
+ else if (msg.command) {
+ if (main[msg.command])
+ main[msg.command].apply(main, msg.args);
+ else if (window[msg.command])
+ window[msg.command].apply(window, msg.args);
+ else
+ throw new Error("Unknown command:" + msg.command);
+ }
+ else if (msg.init) {
+ window.initBaseUrls(msg.tlns);
+ require("ace/lib/es5-shim");
+ sender = window.sender = window.initSender();
+ var clazz = require(msg.module)[msg.classname];
+ main = window.main = new clazz(sender);
+ }
+};
+})(this);
+
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.last = function(a) {
+ return a[a.length - 1];
+};
+
+exports.stringReverse = function(string) {
+ return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+ var result = '';
+ while (count > 0) {
+ if (count & 1)
+ result += string;
+
+ if (count >>= 1)
+ string += string;
+ }
+ return result;
+};
+
+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 deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
+ return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
+ }
+ if (Object.prototype.toString.call(obj) !== "[object Object]")
+ return obj;
+
+ copy = {};
+ for (var key in obj)
+ copy[key] = deepCopy(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;
+ };
+
+ deferred.isPending = function() {
+ return timer;
+ };
+
+ return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+ _self.schedule = _self;
+
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
+
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ _self.isPending = function() {
+ return timer;
+ };
+
+ return _self;
+};
+});
+
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+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};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
+
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {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
+ );
+ };
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
+ };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
+
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+
+
+exports.Range = Range;
+});
+
+ace.define("ace/apply_delta",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+function throwDeltaError(delta, errorText){
+ console.log("Invalid Delta:", delta);
+ throw "Invalid Delta: " + errorText;
+}
+
+function positionInDocument(docLines, position) {
+ return position.row >= 0 && position.row < docLines.length &&
+ position.column >= 0 && position.column <= docLines[position.row].length;
+}
+
+function validateDelta(docLines, delta) {
+ if (delta.action != "insert" && delta.action != "remove")
+ throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
+ if (!(delta.lines instanceof Array))
+ throwDeltaError(delta, "delta.lines must be an Array");
+ if (!delta.start || !delta.end)
+ throwDeltaError(delta, "delta.start/end must be an present");
+ var start = delta.start;
+ if (!positionInDocument(docLines, delta.start))
+ throwDeltaError(delta, "delta.start must be contained in document");
+ var end = delta.end;
+ if (delta.action == "remove" && !positionInDocument(docLines, end))
+ throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
+ var numRangeRows = end.row - start.row;
+ var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
+ if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
+ throwDeltaError(delta, "delta.range must match delta lines");
+}
+
+exports.applyDelta = function(docLines, delta, doNotValidate) {
+
+ var row = delta.start.row;
+ var startColumn = delta.start.column;
+ var line = docLines[row] || "";
+ switch (delta.action) {
+ case "insert":
+ var lines = delta.lines;
+ if (lines.length === 1) {
+ docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
+ } else {
+ var args = [row, 1].concat(delta.lines);
+ docLines.splice.apply(docLines, args);
+ docLines[row] = line.substring(0, startColumn) + docLines[row];
+ docLines[row + delta.lines.length - 1] += line.substring(startColumn);
+ }
+ break;
+ case "remove":
+ var endColumn = delta.end.column;
+ var endRow = delta.end.row;
+ if (row === endRow) {
+ docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
+ } else {
+ docLines.splice(
+ row, endRow - row + 1,
+ line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
+ );
+ }
+ break;
+ }
+}
+});
+
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
+
+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 = stopPropagation;
+ if (!e.preventDefault)
+ e.preventDefault = preventDefault;
+
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e, this);
+ if (e.propagationStopped)
+ break;
+ }
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e, this);
+};
+
+
+EventEmitter._signal = function(eventName, e) {
+ var listeners = (this._eventRegistry || {})[eventName];
+ if (!listeners)
+ return;
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++)
+ listeners[i](e, this);
+};
+
+EventEmitter.once = function(eventName, callback) {
+ var _self = this;
+ callback && this.addEventListener(eventName, function newCallback() {
+ _self.removeEventListener(eventName, newCallback);
+ callback.apply(null, arguments);
+ });
+};
+
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ handlers = this._defaultHandlers = {_disabled_: {}};
+
+ if (handlers[eventName]) {
+ var old = handlers[eventName];
+ var disabled = handlers._disabled_[eventName];
+ if (!disabled)
+ handlers._disabled_[eventName] = disabled = [];
+ disabled.push(old);
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+ handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ return;
+ var disabled = handlers._disabled_[eventName];
+
+ if (handlers[eventName] == callback) {
+ var old = handlers[eventName];
+ if (disabled)
+ this.setDefaultHandler(eventName, disabled.pop());
+ } else if (disabled) {
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
+
+ if (listeners.indexOf(callback) == -1)
+ listeners[capturing ? "unshift" : "push"](callback);
+ return callback;
+};
+
+EventEmitter.off =
+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/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;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+ this.getDocument = function() {
+ return this.document;
+ };
+ this.$insertRight = false;
+ this.onChange = function(delta) {
+ if (delta.start.row == delta.end.row && delta.start.row != this.row)
+ return;
+
+ if (delta.start.row > this.row)
+ return;
+
+ var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
+ this.setPosition(point.row, point.column, true);
+ };
+
+ function $pointsInOrder(point1, point2, equalPointsInOrder) {
+ var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
+ return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
+ }
+
+ function $getTransformedPoint(delta, point, moveIfEqual) {
+ var deltaIsInsert = delta.action == "insert";
+ var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
+ var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
+ var deltaStart = delta.start;
+ var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
+ if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
+ return {
+ row: point.row,
+ column: point.column
+ };
+ }
+ if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
+ return {
+ row: point.row + deltaRowShift,
+ column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
+ };
+ }
+
+ return {
+ row: deltaStart.row,
+ column: deltaStart.column
+ };
+ }
+ 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._signal("change", {
+ old: old,
+ value: pos
+ });
+ };
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
+ };
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("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/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var applyDelta = require("./apply_delta").applyDelta;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(textOrLines) {
+ this.$lines = [""];
+ if (textOrLines.length === 0) {
+ this.$lines = [""];
+ } else if (Array.isArray(textOrLines)) {
+ this.insertMergedLines({row: 0, column: 0}, textOrLines);
+ } else {
+ this.insert({row: 0, column:0}, textOrLines);
+ }
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setValue = function(text) {
+ var len = this.getLength() - 1;
+ this.remove(new Range(0, 0, len, this.getLine(len).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);
+ this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
+ };
+ this.getNewLineCharacter = function() {
+ switch (this.$newLineMode) {
+ case "windows":
+ return "\r\n";
+ case "unix":
+ return "\n";
+ default:
+ return this.$autoNewLine || "\n";
+ }
+ };
+
+ this.$autoNewLine = "";
+ this.$newLineMode = "auto";
+ this.setNewLineMode = function(newLineMode) {
+ if (this.$newLineMode === newLineMode)
+ return;
+
+ this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
+ };
+ 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) {
+ return this.getLinesForRange(range).join(this.getNewLineCharacter());
+ };
+ this.getLinesForRange = function(range) {
+ var lines;
+ if (range.start.row === range.end.row) {
+ lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
+ } else {
+ lines = this.getLines(range.start.row, range.end.row);
+ lines[0] = (lines[0] || "").substring(range.start.column);
+ var l = lines.length - 1;
+ if (range.end.row - range.start.row == l)
+ lines[l] = lines[l].substring(0, range.end.column);
+ }
+ return lines;
+ };
+ this.insertLines = function(row, lines) {
+ console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
+ return this.insertFullLines(row, lines);
+ };
+ this.removeLines = function(firstRow, lastRow) {
+ console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
+ return this.removeFullLines(firstRow, lastRow);
+ };
+ this.insertNewLine = function(position) {
+ console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
+ return this.insertMergedLines(position, ["", ""]);
+ };
+ this.insert = function(position, text) {
+ if (this.getLength() <= 1)
+ this.$detectNewLine(text);
+
+ return this.insertMergedLines(position, this.$split(text));
+ };
+ this.insertInLine = function(position, text) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = this.pos(position.row, position.column + text.length);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: [text]
+ }, true);
+
+ return this.clonePos(end);
+ };
+
+ this.clippedPos = function(row, column) {
+ var length = this.getLength();
+ if (row === undefined) {
+ row = length;
+ } else if (row < 0) {
+ row = 0;
+ } else if (row >= length) {
+ row = length - 1;
+ column = undefined;
+ }
+ var line = this.getLine(row);
+ if (column == undefined)
+ column = line.length;
+ column = Math.min(Math.max(column, 0), line.length);
+ return {row: row, column: column};
+ };
+
+ this.clonePos = function(pos) {
+ return {row: pos.row, column: pos.column};
+ };
+
+ this.pos = function(row, column) {
+ return {row: row, column: column};
+ };
+
+ 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;
+ } else {
+ position.row = Math.max(0, position.row);
+ position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
+ }
+ return position;
+ };
+ this.insertFullLines = function(row, lines) {
+ row = Math.min(Math.max(row, 0), this.getLength());
+ var column = 0;
+ if (row < this.getLength()) {
+ lines = lines.concat([""]);
+ column = 0;
+ } else {
+ lines = [""].concat(lines);
+ row--;
+ column = this.$lines[row].length;
+ }
+ this.insertMergedLines({row: row, column: column}, lines);
+ };
+ this.insertMergedLines = function(position, lines) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = {
+ row: start.row + lines.length - 1,
+ column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
+ };
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: lines
+ });
+
+ return this.clonePos(end);
+ };
+ this.remove = function(range) {
+ var start = this.clippedPos(range.start.row, range.start.column);
+ var end = this.clippedPos(range.end.row, range.end.column);
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ });
+ return this.clonePos(start);
+ };
+ this.removeInLine = function(row, startColumn, endColumn) {
+ var start = this.clippedPos(row, startColumn);
+ var end = this.clippedPos(row, endColumn);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ }, true);
+
+ return this.clonePos(start);
+ };
+ this.removeFullLines = function(firstRow, lastRow) {
+ firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
+ lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
+ var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
+ var deleteLastNewLine = lastRow < this.getLength() - 1;
+ var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );
+ var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );
+ var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );
+ var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length );
+ var range = new Range(startRow, startCol, endRow, endCol);
+ var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
+
+ this.applyDelta({
+ start: range.start,
+ end: range.end,
+ action: "remove",
+ lines: this.getLinesForRange(range)
+ });
+ return deletedLines;
+ };
+ this.removeNewLine = function(row) {
+ if (row < this.getLength() - 1 && row >= 0) {
+ this.applyDelta({
+ start: this.pos(row, this.getLine(row).length),
+ end: this.pos(row + 1, 0),
+ action: "remove",
+ lines: ["", ""]
+ });
+ }
+ };
+ this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
+ if (text.length === 0 && range.isEmpty())
+ return range.start;
+ if (text == this.getTextRange(range))
+ return range.end;
+
+ this.remove(range);
+ var end;
+ if (text) {
+ end = this.insert(range.start, text);
+ }
+ else {
+ end = range.start;
+ }
+
+ return end;
+ };
+ this.applyDeltas = function(deltas) {
+ for (var i=0; i<deltas.length; i++) {
+ this.applyDelta(deltas[i]);
+ }
+ };
+ this.revertDeltas = function(deltas) {
+ for (var i=deltas.length-1; i>=0; i--) {
+ this.revertDelta(deltas[i]);
+ }
+ };
+ this.applyDelta = function(delta, doNotValidate) {
+ var isInsert = delta.action == "insert";
+ if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
+ : !Range.comparePoints(delta.start, delta.end)) {
+ return;
+ }
+
+ if (isInsert && delta.lines.length > 20000)
+ this.$splitAndapplyLargeDelta(delta, 20000);
+ applyDelta(this.$lines, delta, doNotValidate);
+ this._signal("change", delta);
+ };
+
+ this.$splitAndapplyLargeDelta = function(delta, MAX) {
+ var lines = delta.lines;
+ var l = lines.length;
+ var row = delta.start.row;
+ var column = delta.start.column;
+ var from = 0, to = 0;
+ do {
+ from = to;
+ to += MAX - 1;
+ var chunk = lines.slice(from, to);
+ if (to > l) {
+ delta.lines = chunk;
+ delta.start.row = row + from;
+ delta.start.column = column;
+ break;
+ }
+ chunk.push("");
+ this.applyDelta({
+ start: this.pos(row + from, column),
+ end: this.pos(row + to, column = 0),
+ action: delta.action,
+ lines: chunk
+ }, true);
+ } while(true);
+ };
+ this.revertDelta = function(delta) {
+ this.applyDelta({
+ start: this.clonePos(delta.start),
+ end: this.clonePos(delta.end),
+ action: (delta.action == "insert" ? "remove" : "insert"),
+ lines: delta.lines.slice()
+ });
+ };
+ 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 + newlineLength;
+
+ return index + pos.column;
+ };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+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.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ var data = e.data;
+ if (data[0].start) {
+ doc.applyDeltas(data);
+ } else {
+ for (var i = 0; i < data.length; i += 2) {
+ if (Array.isArray(data[i+1])) {
+ var d = {action: "insert", start: data[i], lines: data[i+1]};
+ } else {
+ var d = {action: "remove", start: data[i], end: data[i+1]};
+ }
+ doc.applyDelta(d, true);
+ }
+ }
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
+};
+
+(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() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+ace.define("ace/mode/html/saxparser",["require","exports","module"], function(require, exports, module) {
+module.exports = (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({
+1:[function(_dereq_,module,exports){
+function isScopeMarker(node) {
+ if (node.namespaceURI === "http://www.w3.org/1999/xhtml") {
+ return node.localName === "applet"
+ || node.localName === "caption"
+ || node.localName === "marquee"
+ || node.localName === "object"
+ || node.localName === "table"
+ || node.localName === "td"
+ || node.localName === "th";
+ }
+ if (node.namespaceURI === "http://www.w3.org/1998/Math/MathML") {
+ return node.localName === "mi"
+ || node.localName === "mo"
+ || node.localName === "mn"
+ || node.localName === "ms"
+ || node.localName === "mtext"
+ || node.localName === "annotation-xml";
+ }
+ if (node.namespaceURI === "http://www.w3.org/2000/svg") {
+ return node.localName === "foreignObject"
+ || node.localName === "desc"
+ || node.localName === "title";
+ }
+}
+
+function isListItemScopeMarker(node) {
+ return isScopeMarker(node)
+ || (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'ol')
+ || (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'ul');
+}
+
+function isTableScopeMarker(node) {
+ return (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'table')
+ || (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'html');
+}
+
+function isTableBodyScopeMarker(node) {
+ return (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'tbody')
+ || (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'tfoot')
+ || (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'thead')
+ || (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'html');
+}
+
+function isTableRowScopeMarker(node) {
+ return (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'tr')
+ || (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'html');
+}
+
+function isButtonScopeMarker(node) {
+ return isScopeMarker(node)
+ || (node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'button');
+}
+
+function isSelectScopeMarker(node) {
+ return !(node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'optgroup')
+ && !(node.namespaceURI === "http://www.w3.org/1999/xhtml" && node.localName === 'option');
+}
+function ElementStack() {
+ this.elements = [];
+ this.rootNode = null;
+ this.headElement = null;
+ this.bodyElement = null;
+}
+ElementStack.prototype._inScope = function(localName, isMarker) {
+ for (var i = this.elements.length - 1; i >= 0; i--) {
+ var node = this.elements[i];
+ if (node.localName === localName)
+ return true;
+ if (isMarker(node))
+ return false;
+ }
+};
+ElementStack.prototype.push = function(item) {
+ this.elements.push(item);
+};
+ElementStack.prototype.pushHtmlElement = function(item) {
+ this.rootNode = item.node;
+ this.push(item);
+};
+ElementStack.prototype.pushHeadElement = function(item) {
+ this.headElement = item.node;
+ this.push(item);
+};
+ElementStack.prototype.pushBodyElement = function(item) {
+ this.bodyElement = item.node;
+ this.push(item);
+};
+ElementStack.prototype.pop = function() {
+ return this.elements.pop();
+};
+ElementStack.prototype.remove = function(item) {
+ this.elements.splice(this.elements.indexOf(item), 1);
+};
+ElementStack.prototype.popUntilPopped = function(localName) {
+ var element;
+ do {
+ element = this.pop();
+ } while (element.localName != localName);
+};
+
+ElementStack.prototype.popUntilTableScopeMarker = function() {
+ while (!isTableScopeMarker(this.top))
+ this.pop();
+};
+
+ElementStack.prototype.popUntilTableBodyScopeMarker = function() {
+ while (!isTableBodyScopeMarker(this.top))
+ this.pop();
+};
+
+ElementStack.prototype.popUntilTableRowScopeMarker = function() {
+ while (!isTableRowScopeMarker(this.top))
+ this.pop();
+};
+ElementStack.prototype.item = function(index) {
+ return this.elements[index];
+};
+ElementStack.prototype.contains = function(element) {
+ return this.elements.indexOf(element) !== -1;
+};
+ElementStack.prototype.inScope = function(localName) {
+ return this._inScope(localName, isScopeMarker);
+};
+ElementStack.prototype.inListItemScope = function(localName) {
+ return this._inScope(localName, isListItemScopeMarker);
+};
+ElementStack.prototype.inTableScope = function(localName) {
+ return this._inScope(localName, isTableScopeMarker);
+};
+ElementStack.prototype.inButtonScope = function(localName) {
+ return this._inScope(localName, isButtonScopeMarker);
+};
+ElementStack.prototype.inSelectScope = function(localName) {
+ return this._inScope(localName, isSelectScopeMarker);
+};
+ElementStack.prototype.hasNumberedHeaderElementInScope = function() {
+ for (var i = this.elements.length - 1; i >= 0; i--) {
+ var node = this.elements[i];
+ if (node.isNumberedHeader())
+ return true;
+ if (isScopeMarker(node))
+ return false;
+ }
+};
+ElementStack.prototype.furthestBlockForFormattingElement = function(element) {
+ var furthestBlock = null;
+ for (var i = this.elements.length - 1; i >= 0; i--) {
+ var node = this.elements[i];
+ if (node.node === element)
+ break;
+ if (node.isSpecial())
+ furthestBlock = node;
+ }
+ return furthestBlock;
+};
+ElementStack.prototype.findIndex = function(localName) {
+ for (var i = this.elements.length - 1; i >= 0; i--) {
+ if (this.elements[i].localName == localName)
+ return i;
+ }
+ return -1;
+};
+
+ElementStack.prototype.remove_openElements_until = function(callback) {
+ var finished = false;
+ var element;
+ while (!finished) {
+ element = this.elements.pop();
+ finished = callback(element);
+ }
+ return element;
+};
+
+Object.defineProperty(ElementStack.prototype, 'top', {
+ get: function() {
+ return this.elements[this.elements.length - 1];
+ }
+});
+
+Object.defineProperty(ElementStack.prototype, 'length', {
+ get: function() {
+ return this.elements.length;
+ }
+});
+
+exports.ElementStack = ElementStack;
+
+},
+{}],
+2:[function(_dereq_,module,exports){
+var entities = _dereq_('html5-entities');
+var InputStream = _dereq_('./InputStream').InputStream;
+
+var namedEntityPrefixes = {};
+Object.keys(entities).forEach(function (entityKey) {
+ for (var i = 0; i < entityKey.length; i++) {
+ namedEntityPrefixes[entityKey.substring(0, i + 1)] = true;
+ }
+});
+
+function isAlphaNumeric(c) {
+ return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z');
+}
+
+function isHexDigit(c) {
+ return (c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F');
+}
+
+function isDecimalDigit(c) {
+ return (c >= '0' && c <= '9');
+}
+
+var EntityParser = {};
+
+EntityParser.consumeEntity = function(buffer, tokenizer, additionalAllowedCharacter) {
+ var decodedCharacter = '';
+ var consumedCharacters = '';
+ var ch = buffer.char();
+ if (ch === InputStream.EOF)
+ return false;
+ consumedCharacters += ch;
+ if (ch == '\t' || ch == '\n' || ch == '\v' || ch == ' ' || ch == '<' || ch == '&') {
+ buffer.unget(consumedCharacters);
+ return false;
+ }
+ if (additionalAllowedCharacter === ch) {
+ buffer.unget(consumedCharacters);
+ return false;
+ }
+ if (ch == '#') {
+ ch = buffer.shift(1);
+ if (ch === InputStream.EOF) {
+ tokenizer._parseError("expected-numeric-entity-but-got-eof");
+ buffer.unget(consumedCharacters);
+ return false;
+ }
+ consumedCharacters += ch;
+ var radix = 10;
+ var isDigit = isDecimalDigit;
+ if (ch == 'x' || ch == 'X') {
+ radix = 16;
+ isDigit = isHexDigit;
+ ch = buffer.shift(1);
+ if (ch === InputStream.EOF) {
+ tokenizer._parseError("expected-numeric-entity-but-got-eof");
+ buffer.unget(consumedCharacters);
+ return false;
+ }
+ consumedCharacters += ch;
+ }
+ if (isDigit(ch)) {
+ var code = '';
+ while (ch !== InputStream.EOF && isDigit(ch)) {
+ code += ch;
+ ch = buffer.char();
+ }
+ code = parseInt(code, radix);
+ var replacement = this.replaceEntityNumbers(code);
+ if (replacement) {
+ tokenizer._parseError("invalid-numeric-entity-replaced");
+ code = replacement;
+ }
+ if (code > 0xFFFF && code <= 0x10FFFF) {
+ code -= 0x10000;
+ var first = ((0xffc00 & code) >> 10) + 0xD800;
+ var second = (0x3ff & code) + 0xDC00;
+ decodedCharacter = String.fromCharCode(first, second);
+ } else
+ decodedCharacter = String.fromCharCode(code);
+ if (ch !== ';') {
+ tokenizer._parseError("numeric-entity-without-semicolon");
+ buffer.unget(ch);
+ }
+ return decodedCharacter;
+ }
+ buffer.unget(consumedCharacters);
+ tokenizer._parseError("expected-numeric-entity");
+ return false;
+ }
+ if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) {
+ var mostRecentMatch = '';
+ while (namedEntityPrefixes[consumedCharacters]) {
+ if (entities[consumedCharacters]) {
+ mostRecentMatch = consumedCharacters;
+ }
+ if (ch == ';')
+ break;
+ ch = buffer.char();
+ if (ch === InputStream.EOF)
+ break;
+ consumedCharacters += ch;
+ }
+ if (!mostRecentMatch) {
+ tokenizer._parseError("expected-named-entity");
+ buffer.unget(consumedCharacters);
+ return false;
+ }
+ decodedCharacter = entities[mostRecentMatch];
+ if (ch === ';' || !additionalAllowedCharacter || !(isAlphaNumeric(ch) || ch === '=')) {
+ if (consumedCharacters.length > mostRecentMatch.length) {
+ buffer.unget(consumedCharacters.substring(mostRecentMatch.length));
+ }
+ if (ch !== ';') {
+ tokenizer._parseError("named-entity-without-semicolon");
+ }
+ return decodedCharacter;
+ }
+ buffer.unget(consumedCharacters);
+ return false;
+ }
+};
+
+EntityParser.replaceEntityNumbers = function(c) {
+ switch(c) {
+ case 0x00: return 0xFFFD; // REPLACEMENT CHARACTER
+ case 0x13: return 0x0010; // Carriage return
+ case 0x80: return 0x20AC; // EURO SIGN
+ case 0x81: return 0x0081; // <control>
+ case 0x82: return 0x201A; // SINGLE LOW-9 QUOTATION MARK
+ case 0x83: return 0x0192; // LATIN SMALL LETTER F WITH HOOK
+ case 0x84: return 0x201E; // DOUBLE LOW-9 QUOTATION MARK
+ case 0x85: return 0x2026; // HORIZONTAL ELLIPSIS
+ case 0x86: return 0x2020; // DAGGER
+ case 0x87: return 0x2021; // DOUBLE DAGGER
+ case 0x88: return 0x02C6; // MODIFIER LETTER CIRCUMFLEX ACCENT
+ case 0x89: return 0x2030; // PER MILLE SIGN
+ case 0x8A: return 0x0160; // LATIN CAPITAL LETTER S WITH CARON
+ case 0x8B: return 0x2039; // SINGLE LEFT-POINTING ANGLE QUOTATION MARK
+ case 0x8C: return 0x0152; // LATIN CAPITAL LIGATURE OE
+ case 0x8D: return 0x008D; // <control>
+ case 0x8E: return 0x017D; // LATIN CAPITAL LETTER Z WITH CARON
+ case 0x8F: return 0x008F; // <control>
+ case 0x90: return 0x0090; // <control>
+ case 0x91: return 0x2018; // LEFT SINGLE QUOTATION MARK
+ case 0x92: return 0x2019; // RIGHT SINGLE QUOTATION MARK
+ case 0x93: return 0x201C; // LEFT DOUBLE QUOTATION MARK
+ case 0x94: return 0x201D; // RIGHT DOUBLE QUOTATION MARK
+ case 0x95: return 0x2022; // BULLET
+ case 0x96: return 0x2013; // EN DASH
+ case 0x97: return 0x2014; // EM DASH
+ case 0x98: return 0x02DC; // SMALL TILDE
+ case 0x99: return 0x2122; // TRADE MARK SIGN
+ case 0x9A: return 0x0161; // LATIN SMALL LETTER S WITH CARON
+ case 0x9B: return 0x203A; // SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
+ case 0x9C: return 0x0153; // LATIN SMALL LIGATURE OE
+ case 0x9D: return 0x009D; // <control>
+ case 0x9E: return 0x017E; // LATIN SMALL LETTER Z WITH CARON
+ case 0x9F: return 0x0178; // LATIN CAPITAL LETTER Y WITH DIAERESIS
+ default:
+ if ((c >= 0xD800 && c <= 0xDFFF) || c > 0x10FFFF) {
+ return 0xFFFD;
+ } else if ((c >= 0x0001 && c <= 0x0008) || (c >= 0x000E && c <= 0x001F) ||
+ (c >= 0x007F && c <= 0x009F) || (c >= 0xFDD0 && c <= 0xFDEF) ||
+ c == 0x000B || c == 0xFFFE || c == 0x1FFFE || c == 0x2FFFFE ||
+ c == 0x2FFFF || c == 0x3FFFE || c == 0x3FFFF || c == 0x4FFFE ||
+ c == 0x4FFFF || c == 0x5FFFE || c == 0x5FFFF || c == 0x6FFFE ||
+ c == 0x6FFFF || c == 0x7FFFE || c == 0x7FFFF || c == 0x8FFFE ||
+ c == 0x8FFFF || c == 0x9FFFE || c == 0x9FFFF || c == 0xAFFFE ||
+ c == 0xAFFFF || c == 0xBFFFE || c == 0xBFFFF || c == 0xCFFFE ||
+ c == 0xCFFFF || c == 0xDFFFE || c == 0xDFFFF || c == 0xEFFFE ||
+ c == 0xEFFFF || c == 0xFFFFE || c == 0xFFFFF || c == 0x10FFFE ||
+ c == 0x10FFFF) {
+ return c;
+ }
+ }
+};
+
+exports.EntityParser = EntityParser;
+
+},
+{"./InputStream":3,"html5-entities":12}],
+3:[function(_dereq_,module,exports){
+function InputStream() {
+ this.data = '';
+ this.start = 0;
+ this.committed = 0;
+ this.eof = false;
+ this.lastLocation = {line: 0, column: 0};
+}
+
+InputStream.EOF = -1;
+
+InputStream.DRAIN = -2;
+
+InputStream.prototype = {
+ slice: function() {
+ if(this.start >= this.data.length) {
+ if(!this.eof) throw InputStream.DRAIN;
+ return InputStream.EOF;
+ }
+ return this.data.slice(this.start, this.data.length);
+ },
+ char: function() {
+ if(!this.eof && this.start >= this.data.length - 1) throw InputStream.DRAIN;
+ if(this.start >= this.data.length) {
+ return InputStream.EOF;
+ }
+ var ch = this.data[this.start++];
+ if (ch === '\r')
+ ch = '\n';
+ return ch;
+ },
+ advance: function(amount) {
+ this.start += amount;
+ if(this.start >= this.data.length) {
+ if(!this.eof) throw InputStream.DRAIN;
+ return InputStream.EOF;
+ } else {
+ if(this.committed > this.data.length / 2) {
+ this.lastLocation = this.location();
+ this.data = this.data.slice(this.committed);
+ this.start = this.start - this.committed;
+ this.committed = 0;
+ }
+ }
+ },
+ matchWhile: function(re) {
+ if(this.eof && this.start >= this.data.length ) return '';
+ var r = new RegExp("^"+re+"+");
+ var m = r.exec(this.slice());
+ if(m) {
+ if(!this.eof && m[0].length == this.data.length - this.start) throw InputStream.DRAIN;
+ this.advance(m[0].length);
+ return m[0];
+ } else {
+ return '';
+ }
+ },
+ matchUntil: function(re) {
+ var m, s;
+ s = this.slice();
+ if(s === InputStream.EOF) {
+ return '';
+ } else if(m = new RegExp(re + (this.eof ? "|$" : "")).exec(s)) {
+ var t = this.data.slice(this.start, this.start + m.index);
+ this.advance(m.index);
+ return t.replace(/\r/g, '\n').replace(/\n{2,}/g, '\n');
+ } else {
+ throw InputStream.DRAIN;
+ }
+ },
+ append: function(data) {
+ this.data += data;
+ },
+ shift: function(n) {
+ if(!this.eof && this.start + n >= this.data.length) throw InputStream.DRAIN;
+ if(this.eof && this.start >= this.data.length) return InputStream.EOF;
+ var d = this.data.slice(this.start, this.start + n).toString();
+ this.advance(Math.min(n, this.data.length - this.start));
+ return d;
+ },
+ peek: function(n) {
+ if(!this.eof && this.start + n >= this.data.length) throw InputStream.DRAIN;
+ if(this.eof && this.start >= this.data.length) return InputStream.EOF;
+ return this.data.slice(this.start, Math.min(this.start + n, this.data.length)).toString();
+ },
+ length: function() {
+ return this.data.length - this.start - 1;
+ },
+ unget: function(d) {
+ if(d === InputStream.EOF) return;
+ this.start -= (d.length);
+ },
+ undo: function() {
+ this.start = this.committed;
+ },
+ commit: function() {
+ this.committed = this.start;
+ },
+ location: function() {
+ var lastLine = this.lastLocation.line;
+ var lastColumn = this.lastLocation.column;
+ var read = this.data.slice(0, this.committed);
+ var newlines = read.match(/\n/g);
+ var line = newlines ? lastLine + newlines.length : lastLine;
+ var column = newlines ? read.length - read.lastIndexOf('\n') - 1 : lastColumn + read.length;
+ return {line: line, column: column};
+ }
+};
+
+exports.InputStream = InputStream;
+
+},
+{}],
+4:[function(_dereq_,module,exports){
+var SpecialElements = {
+ "http://www.w3.org/1999/xhtml": [
+ 'address',
+ 'applet',
+ 'area',
+ 'article',
+ 'aside',
+ 'base',
+ 'basefont',
+ 'bgsound',
+ 'blockquote',
+ 'body',
+ 'br',
+ 'button',
+ 'caption',
+ 'center',
+ 'col',
+ 'colgroup',
+ 'dd',
+ 'details',
+ 'dir',
+ 'div',
+ 'dl',
+ 'dt',
+ 'embed',
+ 'fieldset',
+ 'figcaption',
+ 'figure',
+ 'footer',
+ 'form',
+ 'frame',
+ 'frameset',
+ 'h1',
+ 'h2',
+ 'h3',
+ 'h4',
+ 'h5',
+ 'h6',
+ 'head',
+ 'header',
+ 'hgroup',
+ 'hr',
+ 'html',
+ 'iframe',
+ 'img',
+ 'input',
+ 'isindex',
+ 'li',
+ 'link',
+ 'listing',
+ 'main',
+ 'marquee',
+ 'menu',
+ 'menuitem',
+ 'meta',
+ 'nav',
+ 'noembed',
+ 'noframes',
+ 'noscript',
+ 'object',
+ 'ol',
+ 'p',
+ 'param',
+ 'plaintext',
+ 'pre',
+ 'script',
+ 'section',
+ 'select',
+ 'source',
+ 'style',
+ 'summary',
+ 'table',
+ 'tbody',
+ 'td',
+ 'textarea',
+ 'tfoot',
+ 'th',
+ 'thead',
+ 'title',
+ 'tr',
+ 'track',
+ 'ul',
+ 'wbr',
+ 'xmp'
+ ],
+ "http://www.w3.org/1998/Math/MathML": [
+ 'mi',
+ 'mo',
+ 'mn',
+ 'ms',
+ 'mtext',
+ 'annotation-xml'
+ ],
+ "http://www.w3.org/2000/svg": [
+ 'foreignObject',
+ 'desc',
+ 'title'
+ ]
+};
+
+
+function StackItem(namespaceURI, localName, attributes, node) {
+ this.localName = localName;
+ this.namespaceURI = namespaceURI;
+ this.attributes = attributes;
+ this.node = node;
+}
+StackItem.prototype.isSpecial = function() {
+ return this.namespaceURI in SpecialElements &&
+ SpecialElements[this.namespaceURI].indexOf(this.localName) > -1;
+};
+
+StackItem.prototype.isFosterParenting = function() {
+ if (this.namespaceURI === "http://www.w3.org/1999/xhtml") {
+ return this.localName === 'table' ||
+ this.localName === 'tbody' ||
+ this.localName === 'tfoot' ||
+ this.localName === 'thead' ||
+ this.localName === 'tr';
+ }
+ return false;
+};
+
+StackItem.prototype.isNumberedHeader = function() {
+ if (this.namespaceURI === "http://www.w3.org/1999/xhtml") {
+ return this.localName === 'h1' ||
+ this.localName === 'h2' ||
+ this.localName === 'h3' ||
+ this.localName === 'h4' ||
+ this.localName === 'h5' ||
+ this.localName === 'h6';
+ }
+ return false;
+};
+
+StackItem.prototype.isForeign = function() {
+ return this.namespaceURI != "http://www.w3.org/1999/xhtml";
+};
+
+function getAttribute(item, name) {
+ for (var i = 0; i < item.attributes.length; i++) {
+ if (item.attributes[i].nodeName == name)
+ return item.attributes[i].nodeValue;
+ }
+ return null;
+}
+
+StackItem.prototype.isHtmlIntegrationPoint = function() {
+ if (this.namespaceURI === "http://www.w3.org/1998/Math/MathML") {
+ if (this.localName !== "annotation-xml")
+ return false;
+ var encoding = getAttribute(this, 'encoding');
+ if (!encoding)
+ return false;
+ encoding = encoding.toLowerCase();
+ return encoding === "text/html" || encoding === "application/xhtml+xml";
+ }
+ if (this.namespaceURI === "http://www.w3.org/2000/svg") {
+ return this.localName === "foreignObject"
+ || this.localName === "desc"
+ || this.localName === "title";
+ }
+ return false;
+};
+
+StackItem.prototype.isMathMLTextIntegrationPoint = function() {
+ if (this.namespaceURI === "http://www.w3.org/1998/Math/MathML") {
+ return this.localName === "mi"
+ || this.localName === "mo"
+ || this.localName === "mn"
+ || this.localName === "ms"
+ || this.localName === "mtext";
+ }
+ return false;
+};
+
+exports.StackItem = StackItem;
+
+},
+{}],
+5:[function(_dereq_,module,exports){
+var InputStream = _dereq_('./InputStream').InputStream;
+var EntityParser = _dereq_('./EntityParser').EntityParser;
+
+function isWhitespace(c){
+ return c === " " || c === "\n" || c === "\t" || c === "\r" || c === "\f";
+}
+
+function isAlpha(c) {
+ return (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z');
+}
+function Tokenizer(tokenHandler) {
+ this._tokenHandler = tokenHandler;
+ this._state = Tokenizer.DATA;
+ this._inputStream = new InputStream();
+ this._currentToken = null;
+ this._temporaryBuffer = '';
+ this._additionalAllowedCharacter = '';
+}
+
+Tokenizer.prototype._parseError = function(code, args) {
+ this._tokenHandler.parseError(code, args);
+};
+
+Tokenizer.prototype._emitToken = function(token) {
+ if (token.type === 'StartTag') {
+ for (var i = 1; i < token.data.length; i++) {
+ if (!token.data[i].nodeName)
+ token.data.splice(i--, 1);
+ }
+ } else if (token.type === 'EndTag') {
+ if (token.selfClosing) {
+ this._parseError('self-closing-flag-on-end-tag');
+ }
+ if (token.data.length !== 0) {
+ this._parseError('attributes-in-end-tag');
+ }
+ }
+ this._tokenHandler.processToken(token);
+ if (token.type === 'StartTag' && token.selfClosing && !this._tokenHandler.isSelfClosingFlagAcknowledged()) {
+ this._parseError('non-void-element-with-trailing-solidus', {name: token.name});
+ }
+};
+
+Tokenizer.prototype._emitCurrentToken = function() {
+ this._state = Tokenizer.DATA;
+ this._emitToken(this._currentToken);
+};
+
+Tokenizer.prototype._currentAttribute = function() {
+ return this._currentToken.data[this._currentToken.data.length - 1];
+};
+
+Tokenizer.prototype.setState = function(state) {
+ this._state = state;
+};
+
+Tokenizer.prototype.tokenize = function(source) {
+ Tokenizer.DATA = data_state;
+ Tokenizer.RCDATA = rcdata_state;
+ Tokenizer.RAWTEXT = rawtext_state;
+ Tokenizer.SCRIPT_DATA = script_data_state;
+ Tokenizer.PLAINTEXT = plaintext_state;
+
+
+ this._state = Tokenizer.DATA;
+
+ this._inputStream.append(source);
+
+ this._tokenHandler.startTokenization(this);
+
+ this._inputStream.eof = true;
+
+ var tokenizer = this;
+
+ while (this._state.call(this, this._inputStream));
+
+
+ function data_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._emitToken({type: 'EOF', data: null});
+ return false;
+ } else if (data === '&') {
+ tokenizer.setState(character_reference_in_data_state);
+ } else if (data === '<') {
+ tokenizer.setState(tag_open_state);
+ } else if (data === '\u0000') {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ buffer.commit();
+ } else {
+ var chars = buffer.matchUntil("&|<|\u0000");
+ tokenizer._emitToken({type: 'Characters', data: data + chars});
+ buffer.commit();
+ }
+ return true;
+ }
+
+ function character_reference_in_data_state(buffer) {
+ var character = EntityParser.consumeEntity(buffer, tokenizer);
+ tokenizer.setState(data_state);
+ tokenizer._emitToken({type: 'Characters', data: character || '&'});
+ return true;
+ }
+
+ function rcdata_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._emitToken({type: 'EOF', data: null});
+ return false;
+ } else if (data === '&') {
+ tokenizer.setState(character_reference_in_rcdata_state);
+ } else if (data === '<') {
+ tokenizer.setState(rcdata_less_than_sign_state);
+ } else if (data === "\u0000") {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ buffer.commit();
+ } else {
+ var chars = buffer.matchUntil("&|<|\u0000");
+ tokenizer._emitToken({type: 'Characters', data: data + chars});
+ buffer.commit();
+ }
+ return true;
+ }
+
+ function character_reference_in_rcdata_state(buffer) {
+ var character = EntityParser.consumeEntity(buffer, tokenizer);
+ tokenizer.setState(rcdata_state);
+ tokenizer._emitToken({type: 'Characters', data: character || '&'});
+ return true;
+ }
+
+ function rawtext_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._emitToken({type: 'EOF', data: null});
+ return false;
+ } else if (data === '<') {
+ tokenizer.setState(rawtext_less_than_sign_state);
+ } else if (data === "\u0000") {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ buffer.commit();
+ } else {
+ var chars = buffer.matchUntil("<|\u0000");
+ tokenizer._emitToken({type: 'Characters', data: data + chars});
+ }
+ return true;
+ }
+
+ function plaintext_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._emitToken({type: 'EOF', data: null});
+ return false;
+ } else if (data === "\u0000") {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ buffer.commit();
+ } else {
+ var chars = buffer.matchUntil("\u0000");
+ tokenizer._emitToken({type: 'Characters', data: data + chars});
+ }
+ return true;
+ }
+
+
+ function script_data_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._emitToken({type: 'EOF', data: null});
+ return false;
+ } else if (data === '<') {
+ tokenizer.setState(script_data_less_than_sign_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ buffer.commit();
+ } else {
+ var chars = buffer.matchUntil("<|\u0000");
+ tokenizer._emitToken({type: 'Characters', data: data + chars});
+ }
+ return true;
+ }
+
+ function rcdata_less_than_sign_state(buffer) {
+ var data = buffer.char();
+ if (data === "/") {
+ this._temporaryBuffer = '';
+ tokenizer.setState(rcdata_end_tag_open_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '<'});
+ buffer.unget(data);
+ tokenizer.setState(rcdata_state);
+ }
+ return true;
+ }
+
+ function rcdata_end_tag_open_state(buffer) {
+ var data = buffer.char();
+ if (isAlpha(data)) {
+ this._temporaryBuffer += data;
+ tokenizer.setState(rcdata_end_tag_name_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '</'});
+ buffer.unget(data);
+ tokenizer.setState(rcdata_state);
+ }
+ return true;
+ }
+
+ function rcdata_end_tag_name_state(buffer) {
+ var appropriate = tokenizer._currentToken && (tokenizer._currentToken.name === this._temporaryBuffer.toLowerCase());
+ var data = buffer.char();
+ if (isWhitespace(data) && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: this._temporaryBuffer, data: [], selfClosing: false};
+ tokenizer.setState(before_attribute_name_state);
+ } else if (data === '/' && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: this._temporaryBuffer, data: [], selfClosing: false};
+ tokenizer.setState(self_closing_tag_state);
+ } else if (data === '>' && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: this._temporaryBuffer, data: [], selfClosing: false};
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ } else if (isAlpha(data)) {
+ this._temporaryBuffer += data;
+ buffer.commit();
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '</' + this._temporaryBuffer});
+ buffer.unget(data);
+ tokenizer.setState(rcdata_state);
+ }
+ return true;
+ }
+
+ function rawtext_less_than_sign_state(buffer) {
+ var data = buffer.char();
+ if (data === "/") {
+ this._temporaryBuffer = '';
+ tokenizer.setState(rawtext_end_tag_open_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '<'});
+ buffer.unget(data);
+ tokenizer.setState(rawtext_state);
+ }
+ return true;
+ }
+
+ function rawtext_end_tag_open_state(buffer) {
+ var data = buffer.char();
+ if (isAlpha(data)) {
+ this._temporaryBuffer += data;
+ tokenizer.setState(rawtext_end_tag_name_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '</'});
+ buffer.unget(data);
+ tokenizer.setState(rawtext_state);
+ }
+ return true;
+ }
+
+ function rawtext_end_tag_name_state(buffer) {
+ var appropriate = tokenizer._currentToken && (tokenizer._currentToken.name === this._temporaryBuffer.toLowerCase());
+ var data = buffer.char();
+ if (isWhitespace(data) && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: this._temporaryBuffer, data: [], selfClosing: false};
+ tokenizer.setState(before_attribute_name_state);
+ } else if (data === '/' && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: this._temporaryBuffer, data: [], selfClosing: false};
+ tokenizer.setState(self_closing_tag_state);
+ } else if (data === '>' && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: this._temporaryBuffer, data: [], selfClosing: false};
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ } else if (isAlpha(data)) {
+ this._temporaryBuffer += data;
+ buffer.commit();
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '</' + this._temporaryBuffer});
+ buffer.unget(data);
+ tokenizer.setState(rawtext_state);
+ }
+ return true;
+ }
+
+ function script_data_less_than_sign_state(buffer) {
+ var data = buffer.char();
+ if (data === "/") {
+ this._temporaryBuffer = '';
+ tokenizer.setState(script_data_end_tag_open_state);
+ } else if (data === '!') {
+ tokenizer._emitToken({type: 'Characters', data: '<!'});
+ tokenizer.setState(script_data_escape_start_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '<'});
+ buffer.unget(data);
+ tokenizer.setState(script_data_state);
+ }
+ return true;
+ }
+
+ function script_data_end_tag_open_state(buffer) {
+ var data = buffer.char();
+ if (isAlpha(data)) {
+ this._temporaryBuffer += data;
+ tokenizer.setState(script_data_end_tag_name_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '</'});
+ buffer.unget(data);
+ tokenizer.setState(script_data_state);
+ }
+ return true;
+ }
+
+ function script_data_end_tag_name_state(buffer) {
+ var appropriate = tokenizer._currentToken && (tokenizer._currentToken.name === this._temporaryBuffer.toLowerCase());
+ var data = buffer.char();
+ if (isWhitespace(data) && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: 'script', data: [], selfClosing: false};
+ tokenizer.setState(before_attribute_name_state);
+ } else if (data === '/' && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: 'script', data: [], selfClosing: false};
+ tokenizer.setState(self_closing_tag_state);
+ } else if (data === '>' && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: 'script', data: [], selfClosing: false};
+ tokenizer._emitCurrentToken();
+ } else if (isAlpha(data)) {
+ this._temporaryBuffer += data;
+ buffer.commit();
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '</' + this._temporaryBuffer});
+ buffer.unget(data);
+ tokenizer.setState(script_data_state);
+ }
+ return true;
+ }
+
+ function script_data_escape_start_state(buffer) {
+ var data = buffer.char();
+ if (data === '-') {
+ tokenizer._emitToken({type: 'Characters', data: '-'});
+ tokenizer.setState(script_data_escape_start_dash_state);
+ } else {
+ buffer.unget(data);
+ tokenizer.setState(script_data_state);
+ }
+ return true;
+ }
+
+ function script_data_escape_start_dash_state(buffer) {
+ var data = buffer.char();
+ if (data === '-') {
+ tokenizer._emitToken({type: 'Characters', data: '-'});
+ tokenizer.setState(script_data_escaped_dash_dash_state);
+ } else {
+ buffer.unget(data);
+ tokenizer.setState(script_data_state);
+ }
+ return true;
+ }
+
+ function script_data_escaped_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer._emitToken({type: 'Characters', data: '-'});
+ tokenizer.setState(script_data_escaped_dash_state);
+ } else if (data === '<') {
+ tokenizer.setState(script_data_escaped_less_then_sign_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ buffer.commit();
+ } else {
+ var chars = buffer.matchUntil('<|-|\u0000');
+ tokenizer._emitToken({type: 'Characters', data: data + chars});
+ }
+ return true;
+ }
+
+ function script_data_escaped_dash_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer._emitToken({type: 'Characters', data: '-'});
+ tokenizer.setState(script_data_escaped_dash_dash_state);
+ } else if (data === '<') {
+ tokenizer.setState(script_data_escaped_less_then_sign_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ tokenizer.setState(script_data_escaped_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ tokenizer.setState(script_data_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_escaped_dash_dash_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError('eof-in-script');
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '<') {
+ tokenizer.setState(script_data_escaped_less_then_sign_state);
+ } else if (data === '>') {
+ tokenizer._emitToken({type: 'Characters', data: '>'});
+ tokenizer.setState(script_data_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ tokenizer.setState(script_data_escaped_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ tokenizer.setState(script_data_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_escaped_less_then_sign_state(buffer) {
+ var data = buffer.char();
+ if (data === '/') {
+ this._temporaryBuffer = '';
+ tokenizer.setState(script_data_escaped_end_tag_open_state);
+ } else if (isAlpha(data)) {
+ tokenizer._emitToken({type: 'Characters', data: '<' + data});
+ this._temporaryBuffer = data;
+ tokenizer.setState(script_data_double_escape_start_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '<'});
+ buffer.unget(data);
+ tokenizer.setState(script_data_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_escaped_end_tag_open_state(buffer) {
+ var data = buffer.char();
+ if (isAlpha(data)) {
+ this._temporaryBuffer = data;
+ tokenizer.setState(script_data_escaped_end_tag_name_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '</'});
+ buffer.unget(data);
+ tokenizer.setState(script_data_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_escaped_end_tag_name_state(buffer) {
+ var appropriate = tokenizer._currentToken && (tokenizer._currentToken.name === this._temporaryBuffer.toLowerCase());
+ var data = buffer.char();
+ if (isWhitespace(data) && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: 'script', data: [], selfClosing: false};
+ tokenizer.setState(before_attribute_name_state);
+ } else if (data === '/' && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: 'script', data: [], selfClosing: false};
+ tokenizer.setState(self_closing_tag_state);
+ } else if (data === '>' && appropriate) {
+ tokenizer._currentToken = {type: 'EndTag', name: 'script', data: [], selfClosing: false};
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (isAlpha(data)) {
+ this._temporaryBuffer += data;
+ buffer.commit();
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: '</' + this._temporaryBuffer});
+ buffer.unget(data);
+ tokenizer.setState(script_data_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_double_escape_start_state(buffer) {
+ var data = buffer.char();
+ if (isWhitespace(data) || data === '/' || data === '>') {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ if (this._temporaryBuffer.toLowerCase() === 'script')
+ tokenizer.setState(script_data_double_escaped_state);
+ else
+ tokenizer.setState(script_data_escaped_state);
+ } else if (isAlpha(data)) {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ this._temporaryBuffer += data;
+ buffer.commit();
+ } else {
+ buffer.unget(data);
+ tokenizer.setState(script_data_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_double_escaped_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError('eof-in-script');
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer._emitToken({type: 'Characters', data: '-'});
+ tokenizer.setState(script_data_double_escaped_dash_state);
+ } else if (data === '<') {
+ tokenizer._emitToken({type: 'Characters', data: '<'});
+ tokenizer.setState(script_data_double_escaped_less_than_sign_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError('invalid-codepoint');
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ buffer.commit();
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ buffer.commit();
+ }
+ return true;
+ }
+
+ function script_data_double_escaped_dash_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError('eof-in-script');
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer._emitToken({type: 'Characters', data: '-'});
+ tokenizer.setState(script_data_double_escaped_dash_dash_state);
+ } else if (data === '<') {
+ tokenizer._emitToken({type: 'Characters', data: '<'});
+ tokenizer.setState(script_data_double_escaped_less_than_sign_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError('invalid-codepoint');
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ tokenizer.setState(script_data_double_escaped_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ tokenizer.setState(script_data_double_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_double_escaped_dash_dash_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError('eof-in-script');
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer._emitToken({type: 'Characters', data: '-'});
+ buffer.commit();
+ } else if (data === '<') {
+ tokenizer._emitToken({type: 'Characters', data: '<'});
+ tokenizer.setState(script_data_double_escaped_less_than_sign_state);
+ } else if (data === '>') {
+ tokenizer._emitToken({type: 'Characters', data: '>'});
+ tokenizer.setState(script_data_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError('invalid-codepoint');
+ tokenizer._emitToken({type: 'Characters', data: '\uFFFD'});
+ tokenizer.setState(script_data_double_escaped_state);
+ } else {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ tokenizer.setState(script_data_double_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_double_escaped_less_than_sign_state(buffer) {
+ var data = buffer.char();
+ if (data === '/') {
+ tokenizer._emitToken({type: 'Characters', data: '/'});
+ this._temporaryBuffer = '';
+ tokenizer.setState(script_data_double_escape_end_state);
+ } else {
+ buffer.unget(data);
+ tokenizer.setState(script_data_double_escaped_state);
+ }
+ return true;
+ }
+
+ function script_data_double_escape_end_state(buffer) {
+ var data = buffer.char();
+ if (isWhitespace(data) || data === '/' || data === '>') {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ if (this._temporaryBuffer.toLowerCase() === 'script')
+ tokenizer.setState(script_data_escaped_state);
+ else
+ tokenizer.setState(script_data_double_escaped_state);
+ } else if (isAlpha(data)) {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ this._temporaryBuffer += data;
+ buffer.commit();
+ } else {
+ buffer.unget(data);
+ tokenizer.setState(script_data_double_escaped_state);
+ }
+ return true;
+ }
+
+ function tag_open_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("bare-less-than-sign-at-eof");
+ tokenizer._emitToken({type: 'Characters', data: '<'});
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isAlpha(data)) {
+ tokenizer._currentToken = {type: 'StartTag', name: data.toLowerCase(), data: []};
+ tokenizer.setState(tag_name_state);
+ } else if (data === '!') {
+ tokenizer.setState(markup_declaration_open_state);
+ } else if (data === '/') {
+ tokenizer.setState(close_tag_open_state);
+ } else if (data === '>') {
+ tokenizer._parseError("expected-tag-name-but-got-right-bracket");
+ tokenizer._emitToken({type: 'Characters', data: "<>"});
+ tokenizer.setState(data_state);
+ } else if (data === '?') {
+ tokenizer._parseError("expected-tag-name-but-got-question-mark");
+ buffer.unget(data);
+ tokenizer.setState(bogus_comment_state);
+ } else {
+ tokenizer._parseError("expected-tag-name");
+ tokenizer._emitToken({type: 'Characters', data: "<"});
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ }
+ return true;
+ }
+
+ function close_tag_open_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("expected-closing-tag-but-got-eof");
+ tokenizer._emitToken({type: 'Characters', data: '</'});
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isAlpha(data)) {
+ tokenizer._currentToken = {type: 'EndTag', name: data.toLowerCase(), data: []};
+ tokenizer.setState(tag_name_state);
+ } else if (data === '>') {
+ tokenizer._parseError("expected-closing-tag-but-got-right-bracket");
+ tokenizer.setState(data_state);
+ } else {
+ tokenizer._parseError("expected-closing-tag-but-got-char", {data: data}); // param 1 is datavars:
+ buffer.unget(data);
+ tokenizer.setState(bogus_comment_state);
+ }
+ return true;
+ }
+
+ function tag_name_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError('eof-in-tag-name');
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(before_attribute_name_state);
+ } else if (isAlpha(data)) {
+ tokenizer._currentToken.name += data.toLowerCase();
+ } else if (data === '>') {
+ tokenizer._emitCurrentToken();
+ } else if (data === '/') {
+ tokenizer.setState(self_closing_tag_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentToken.name += "\uFFFD";
+ } else {
+ tokenizer._currentToken.name += data;
+ }
+ buffer.commit();
+
+ return true;
+ }
+
+ function before_attribute_name_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("expected-attribute-name-but-got-eof");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ return true;
+ } else if (isAlpha(data)) {
+ tokenizer._currentToken.data.push({nodeName: data.toLowerCase(), nodeValue: ""});
+ tokenizer.setState(attribute_name_state);
+ } else if (data === '>') {
+ tokenizer._emitCurrentToken();
+ } else if (data === '/') {
+ tokenizer.setState(self_closing_tag_state);
+ } else if (data === "'" || data === '"' || data === '=' || data === '<') {
+ tokenizer._parseError("invalid-character-in-attribute-name");
+ tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""});
+ tokenizer.setState(attribute_name_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentToken.data.push({nodeName: "\uFFFD", nodeValue: ""});
+ } else {
+ tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""});
+ tokenizer.setState(attribute_name_state);
+ }
+ return true;
+ }
+
+ function attribute_name_state(buffer) {
+ var data = buffer.char();
+ var leavingThisState = true;
+ var shouldEmit = false;
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-attribute-name");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ shouldEmit = true;
+ } else if (data === '=') {
+ tokenizer.setState(before_attribute_value_state);
+ } else if (isAlpha(data)) {
+ tokenizer._currentAttribute().nodeName += data.toLowerCase();
+ leavingThisState = false;
+ } else if (data === '>') {
+ shouldEmit = true;
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(after_attribute_name_state);
+ } else if (data === '/') {
+ tokenizer.setState(self_closing_tag_state);
+ } else if (data === "'" || data === '"') {
+ tokenizer._parseError("invalid-character-in-attribute-name");
+ tokenizer._currentAttribute().nodeName += data;
+ leavingThisState = false;
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentAttribute().nodeName += "\uFFFD";
+ } else {
+ tokenizer._currentAttribute().nodeName += data;
+ leavingThisState = false;
+ }
+
+ if (leavingThisState) {
+ var attributes = tokenizer._currentToken.data;
+ var currentAttribute = attributes[attributes.length - 1];
+ for (var i = attributes.length - 2; i >= 0; i--) {
+ if (currentAttribute.nodeName === attributes[i].nodeName) {
+ tokenizer._parseError("duplicate-attribute", {name: currentAttribute.nodeName});
+ currentAttribute.nodeName = null;
+ break;
+ }
+ }
+ if (shouldEmit)
+ tokenizer._emitCurrentToken();
+ } else {
+ buffer.commit();
+ }
+ return true;
+ }
+
+ function after_attribute_name_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("expected-end-of-tag-but-got-eof");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ return true;
+ } else if (data === '=') {
+ tokenizer.setState(before_attribute_value_state);
+ } else if (data === '>') {
+ tokenizer._emitCurrentToken();
+ } else if (isAlpha(data)) {
+ tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""});
+ tokenizer.setState(attribute_name_state);
+ } else if (data === '/') {
+ tokenizer.setState(self_closing_tag_state);
+ } else if (data === "'" || data === '"' || data === '<') {
+ tokenizer._parseError("invalid-character-after-attribute-name");
+ tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""});
+ tokenizer.setState(attribute_name_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentToken.data.push({nodeName: "\uFFFD", nodeValue: ""});
+ } else {
+ tokenizer._currentToken.data.push({nodeName: data, nodeValue: ""});
+ tokenizer.setState(attribute_name_state);
+ }
+ return true;
+ }
+
+ function before_attribute_value_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("expected-attribute-value-but-got-eof");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ return true;
+ } else if (data === '"') {
+ tokenizer.setState(attribute_value_double_quoted_state);
+ } else if (data === '&') {
+ tokenizer.setState(attribute_value_unquoted_state);
+ buffer.unget(data);
+ } else if (data === "'") {
+ tokenizer.setState(attribute_value_single_quoted_state);
+ } else if (data === '>') {
+ tokenizer._parseError("expected-attribute-value-but-got-right-bracket");
+ tokenizer._emitCurrentToken();
+ } else if (data === '=' || data === '<' || data === '`') {
+ tokenizer._parseError("unexpected-character-in-unquoted-attribute-value");
+ tokenizer._currentAttribute().nodeValue += data;
+ tokenizer.setState(attribute_value_unquoted_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentAttribute().nodeValue += "\uFFFD";
+ } else {
+ tokenizer._currentAttribute().nodeValue += data;
+ tokenizer.setState(attribute_value_unquoted_state);
+ }
+
+ return true;
+ }
+
+ function attribute_value_double_quoted_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-attribute-value-double-quote");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '"') {
+ tokenizer.setState(after_attribute_value_state);
+ } else if (data === '&') {
+ this._additionalAllowedCharacter = '"';
+ tokenizer.setState(character_reference_in_attribute_value_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentAttribute().nodeValue += "\uFFFD";
+ } else {
+ var s = buffer.matchUntil('[\0"&]');
+ data = data + s;
+ tokenizer._currentAttribute().nodeValue += data;
+ }
+ return true;
+ }
+
+ function attribute_value_single_quoted_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-attribute-value-single-quote");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === "'") {
+ tokenizer.setState(after_attribute_value_state);
+ } else if (data === '&') {
+ this._additionalAllowedCharacter = "'";
+ tokenizer.setState(character_reference_in_attribute_value_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentAttribute().nodeValue += "\uFFFD";
+ } else {
+ tokenizer._currentAttribute().nodeValue += data + buffer.matchUntil("\u0000|['&]");
+ }
+ return true;
+ }
+
+ function attribute_value_unquoted_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-after-attribute-value");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(before_attribute_name_state);
+ } else if (data === '&') {
+ this._additionalAllowedCharacter = ">";
+ tokenizer.setState(character_reference_in_attribute_value_state);
+ } else if (data === '>') {
+ tokenizer._emitCurrentToken();
+ } else if (data === '"' || data === "'" || data === '=' || data === '`' || data === '<') {
+ tokenizer._parseError("unexpected-character-in-unquoted-attribute-value");
+ tokenizer._currentAttribute().nodeValue += data;
+ buffer.commit();
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentAttribute().nodeValue += "\uFFFD";
+ } else {
+ var o = buffer.matchUntil("\u0000|["+ "\t\n\v\f\x20\r" + "&<>\"'=`" +"]");
+ if (o === InputStream.EOF) {
+ tokenizer._parseError("eof-in-attribute-value-no-quotes");
+ tokenizer._emitCurrentToken();
+ }
+ buffer.commit();
+ tokenizer._currentAttribute().nodeValue += data + o;
+ }
+ return true;
+ }
+
+ function character_reference_in_attribute_value_state(buffer) {
+ var character = EntityParser.consumeEntity(buffer, tokenizer, this._additionalAllowedCharacter);
+ this._currentAttribute().nodeValue += character || '&';
+ if (this._additionalAllowedCharacter === '"')
+ tokenizer.setState(attribute_value_double_quoted_state);
+ else if (this._additionalAllowedCharacter === '\'')
+ tokenizer.setState(attribute_value_single_quoted_state);
+ else if (this._additionalAllowedCharacter === '>')
+ tokenizer.setState(attribute_value_unquoted_state);
+ return true;
+ }
+
+ function after_attribute_value_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-after-attribute-value");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(before_attribute_name_state);
+ } else if (data === '>') {
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (data === '/') {
+ tokenizer.setState(self_closing_tag_state);
+ } else {
+ tokenizer._parseError("unexpected-character-after-attribute-value");
+ buffer.unget(data);
+ tokenizer.setState(before_attribute_name_state);
+ }
+ return true;
+ }
+
+ function self_closing_tag_state(buffer) {
+ var c = buffer.char();
+ if (c === InputStream.EOF) {
+ tokenizer._parseError("unexpected-eof-after-solidus-in-tag");
+ buffer.unget(c);
+ tokenizer.setState(data_state);
+ } else if (c === '>') {
+ tokenizer._currentToken.selfClosing = true;
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else {
+ tokenizer._parseError("unexpected-character-after-solidus-in-tag");
+ buffer.unget(c);
+ tokenizer.setState(before_attribute_name_state);
+ }
+ return true;
+ }
+
+ function bogus_comment_state(buffer) {
+ var data = buffer.matchUntil('>');
+ data = data.replace(/\u0000/g, "\uFFFD");
+ buffer.char();
+ tokenizer._emitToken({type: 'Comment', data: data});
+ tokenizer.setState(data_state);
+ return true;
+ }
+
+ function markup_declaration_open_state(buffer) {
+ var chars = buffer.shift(2);
+ if (chars === '--') {
+ tokenizer._currentToken = {type: 'Comment', data: ''};
+ tokenizer.setState(comment_start_state);
+ } else {
+ var newchars = buffer.shift(5);
+ if (newchars === InputStream.EOF || chars === InputStream.EOF) {
+ tokenizer._parseError("expected-dashes-or-doctype");
+ tokenizer.setState(bogus_comment_state);
+ buffer.unget(chars);
+ return true;
+ }
+
+ chars += newchars;
+ if (chars.toUpperCase() === 'DOCTYPE') {
+ tokenizer._currentToken = {type: 'Doctype', name: '', publicId: null, systemId: null, forceQuirks: false};
+ tokenizer.setState(doctype_state);
+ } else if (tokenizer._tokenHandler.isCdataSectionAllowed() && chars === '[CDATA[') {
+ tokenizer.setState(cdata_section_state);
+ } else {
+ tokenizer._parseError("expected-dashes-or-doctype");
+ buffer.unget(chars);
+ tokenizer.setState(bogus_comment_state);
+ }
+ }
+ return true;
+ }
+
+ function cdata_section_state(buffer) {
+ var data = buffer.matchUntil(']]>');
+ buffer.shift(3);
+ if (data) {
+ tokenizer._emitToken({type: 'Characters', data: data});
+ }
+ tokenizer.setState(data_state);
+ return true;
+ }
+
+ function comment_start_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-comment");
+ tokenizer._emitToken(tokenizer._currentToken);
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer.setState(comment_start_dash_state);
+ } else if (data === '>') {
+ tokenizer._parseError("incorrect-comment");
+ tokenizer._emitToken(tokenizer._currentToken);
+ tokenizer.setState(data_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentToken.data += "\uFFFD";
+ } else {
+ tokenizer._currentToken.data += data;
+ tokenizer.setState(comment_state);
+ }
+ return true;
+ }
+
+ function comment_start_dash_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-comment");
+ tokenizer._emitToken(tokenizer._currentToken);
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer.setState(comment_end_state);
+ } else if (data === '>') {
+ tokenizer._parseError("incorrect-comment");
+ tokenizer._emitToken(tokenizer._currentToken);
+ tokenizer.setState(data_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentToken.data += "\uFFFD";
+ } else {
+ tokenizer._currentToken.data += '-' + data;
+ tokenizer.setState(comment_state);
+ }
+ return true;
+ }
+
+ function comment_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-comment");
+ tokenizer._emitToken(tokenizer._currentToken);
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer.setState(comment_end_dash_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentToken.data += "\uFFFD";
+ } else {
+ tokenizer._currentToken.data += data;
+ buffer.commit();
+ }
+ return true;
+ }
+
+ function comment_end_dash_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-comment-end-dash");
+ tokenizer._emitToken(tokenizer._currentToken);
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer.setState(comment_end_state);
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentToken.data += "-\uFFFD";
+ tokenizer.setState(comment_state);
+ } else {
+ tokenizer._currentToken.data += '-' + data + buffer.matchUntil('\u0000|-');
+ buffer.char();
+ }
+ return true;
+ }
+
+ function comment_end_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-comment-double-dash");
+ tokenizer._emitToken(tokenizer._currentToken);
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '>') {
+ tokenizer._emitToken(tokenizer._currentToken);
+ tokenizer.setState(data_state);
+ } else if (data === '!') {
+ tokenizer._parseError("unexpected-bang-after-double-dash-in-comment");
+ tokenizer.setState(comment_end_bang_state);
+ } else if (data === '-') {
+ tokenizer._parseError("unexpected-dash-after-double-dash-in-comment");
+ tokenizer._currentToken.data += data;
+ } else if (data === '\u0000') {
+ tokenizer._parseError("invalid-codepoint");
+ tokenizer._currentToken.data += "--\uFFFD";
+ tokenizer.setState(comment_state);
+ } else {
+ tokenizer._parseError("unexpected-char-in-comment");
+ tokenizer._currentToken.data += '--' + data;
+ tokenizer.setState(comment_state);
+ }
+ return true;
+ }
+
+ function comment_end_bang_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-comment-end-bang-state");
+ tokenizer._emitToken(tokenizer._currentToken);
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '>') {
+ tokenizer._emitToken(tokenizer._currentToken);
+ tokenizer.setState(data_state);
+ } else if (data === '-') {
+ tokenizer._currentToken.data += '--!';
+ tokenizer.setState(comment_end_dash_state);
+ } else {
+ tokenizer._currentToken.data += '--!' + data;
+ tokenizer.setState(comment_state);
+ }
+ return true;
+ }
+
+ function doctype_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("expected-doctype-name-but-got-eof");
+ tokenizer._currentToken.forceQuirks = true;
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(before_doctype_name_state);
+ } else {
+ tokenizer._parseError("need-space-after-doctype");
+ buffer.unget(data);
+ tokenizer.setState(before_doctype_name_state);
+ }
+ return true;
+ }
+
+ function before_doctype_name_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("expected-doctype-name-but-got-eof");
+ tokenizer._currentToken.forceQuirks = true;
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (isWhitespace(data)) {
+ } else if (data === '>') {
+ tokenizer._parseError("expected-doctype-name-but-got-right-bracket");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else {
+ if (isAlpha(data))
+ data = data.toLowerCase();
+ tokenizer._currentToken.name = data;
+ tokenizer.setState(doctype_name_state);
+ }
+ return true;
+ }
+
+ function doctype_name_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._currentToken.forceQuirks = true;
+ buffer.unget(data);
+ tokenizer._parseError("eof-in-doctype-name");
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(after_doctype_name_state);
+ } else if (data === '>') {
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else {
+ if (isAlpha(data))
+ data = data.toLowerCase();
+ tokenizer._currentToken.name += data;
+ buffer.commit();
+ }
+ return true;
+ }
+
+ function after_doctype_name_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._currentToken.forceQuirks = true;
+ buffer.unget(data);
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (isWhitespace(data)) {
+ } else if (data === '>') {
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else {
+ if (['p', 'P'].indexOf(data) > -1) {
+ var expected = [['u', 'U'], ['b', 'B'], ['l', 'L'], ['i', 'I'], ['c', 'C']];
+ var matched = expected.every(function(expected){
+ data = buffer.char();
+ return expected.indexOf(data) > -1;
+ });
+ if (matched) {
+ tokenizer.setState(after_doctype_public_keyword_state);
+ return true;
+ }
+ } else if (['s', 'S'].indexOf(data) > -1) {
+ var expected = [['y', 'Y'], ['s', 'S'], ['t', 'T'], ['e', 'E'], ['m', 'M']];
+ var matched = expected.every(function(expected){
+ data = buffer.char();
+ return expected.indexOf(data) > -1;
+ });
+ if (matched) {
+ tokenizer.setState(after_doctype_system_keyword_state);
+ return true;
+ }
+ }
+ buffer.unget(data);
+ tokenizer._currentToken.forceQuirks = true;
+
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else {
+ tokenizer._parseError("expected-space-or-right-bracket-in-doctype", {data: data});
+ tokenizer.setState(bogus_doctype_state);
+ }
+ }
+ return true;
+ }
+
+ function after_doctype_public_keyword_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(before_doctype_public_identifier_state);
+ } else if (data === "'" || data === '"') {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ buffer.unget(data);
+ tokenizer.setState(before_doctype_public_identifier_state);
+ } else {
+ buffer.unget(data);
+ tokenizer.setState(before_doctype_public_identifier_state);
+ }
+ return true;
+ }
+
+ function before_doctype_public_identifier_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (isWhitespace(data)) {
+ } else if (data === '"') {
+ tokenizer._currentToken.publicId = '';
+ tokenizer.setState(doctype_public_identifier_double_quoted_state);
+ } else if (data === "'") {
+ tokenizer._currentToken.publicId = '';
+ tokenizer.setState(doctype_public_identifier_single_quoted_state);
+ } else if (data === '>') {
+ tokenizer._parseError("unexpected-end-of-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer.setState(bogus_doctype_state);
+ }
+ return true;
+ }
+
+ function doctype_public_identifier_double_quoted_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (data === '"') {
+ tokenizer.setState(after_doctype_public_identifier_state);
+ } else if (data === '>') {
+ tokenizer._parseError("unexpected-end-of-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else {
+ tokenizer._currentToken.publicId += data;
+ }
+ return true;
+ }
+
+ function doctype_public_identifier_single_quoted_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (data === "'") {
+ tokenizer.setState(after_doctype_public_identifier_state);
+ } else if (data === '>') {
+ tokenizer._parseError("unexpected-end-of-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else {
+ tokenizer._currentToken.publicId += data;
+ }
+ return true;
+ }
+
+ function after_doctype_public_identifier_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(between_doctype_public_and_system_identifiers_state);
+ } else if (data === '>') {
+ tokenizer.setState(data_state);
+ tokenizer._emitCurrentToken();
+ } else if (data === '"') {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ tokenizer._currentToken.systemId = '';
+ tokenizer.setState(doctype_system_identifier_double_quoted_state);
+ } else if (data === "'") {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ tokenizer._currentToken.systemId = '';
+ tokenizer.setState(doctype_system_identifier_single_quoted_state);
+ } else {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer.setState(bogus_doctype_state);
+ }
+ return true;
+ }
+
+ function between_doctype_public_and_system_identifiers_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ } else if (data === '>') {
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ } else if (data === '"') {
+ tokenizer._currentToken.systemId = '';
+ tokenizer.setState(doctype_system_identifier_double_quoted_state);
+ } else if (data === "'") {
+ tokenizer._currentToken.systemId = '';
+ tokenizer.setState(doctype_system_identifier_single_quoted_state);
+ } else {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer.setState(bogus_doctype_state);
+ }
+ return true;
+ }
+
+ function after_doctype_system_keyword_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ tokenizer.setState(before_doctype_system_identifier_state);
+ } else if (data === "'" || data === '"') {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ buffer.unget(data);
+ tokenizer.setState(before_doctype_system_identifier_state);
+ } else {
+ buffer.unget(data);
+ tokenizer.setState(before_doctype_system_identifier_state);
+ }
+ return true;
+ }
+
+ function before_doctype_system_identifier_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ } else if (data === '"') {
+ tokenizer._currentToken.systemId = '';
+ tokenizer.setState(doctype_system_identifier_double_quoted_state);
+ } else if (data === "'") {
+ tokenizer._currentToken.systemId = '';
+ tokenizer.setState(doctype_system_identifier_single_quoted_state);
+ } else if (data === '>') {
+ tokenizer._parseError("unexpected-end-of-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ } else {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer.setState(bogus_doctype_state);
+ }
+ return true;
+ }
+
+ function doctype_system_identifier_double_quoted_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === '"') {
+ tokenizer.setState(after_doctype_system_identifier_state);
+ } else if (data === '>') {
+ tokenizer._parseError("unexpected-end-of-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ } else {
+ tokenizer._currentToken.systemId += data;
+ }
+ return true;
+ }
+
+ function doctype_system_identifier_single_quoted_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (data === "'") {
+ tokenizer.setState(after_doctype_system_identifier_state);
+ } else if (data === '>') {
+ tokenizer._parseError("unexpected-end-of-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ } else {
+ tokenizer._currentToken.systemId += data;
+ }
+ return true;
+ }
+
+ function after_doctype_system_identifier_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ tokenizer._parseError("eof-in-doctype");
+ tokenizer._currentToken.forceQuirks = true;
+ tokenizer._emitCurrentToken();
+ buffer.unget(data);
+ tokenizer.setState(data_state);
+ } else if (isWhitespace(data)) {
+ } else if (data === '>') {
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ } else {
+ tokenizer._parseError("unexpected-char-in-doctype");
+ tokenizer.setState(bogus_doctype_state);
+ }
+ return true;
+ }
+
+ function bogus_doctype_state(buffer) {
+ var data = buffer.char();
+ if (data === InputStream.EOF) {
+ buffer.unget(data);
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ } else if (data === '>') {
+ tokenizer._emitCurrentToken();
+ tokenizer.setState(data_state);
+ }
+ return true;
+ }
+};
+
+Object.defineProperty(Tokenizer.prototype, 'lineNumber', {
+ get: function() {
+ return this._inputStream.location().line;
+ }
+});
+
+Object.defineProperty(Tokenizer.prototype, 'columnNumber', {
+ get: function() {
+ return this._inputStream.location().column;
+ }
+});
+
+exports.Tokenizer = Tokenizer;
+
+},
+{"./EntityParser":2,"./InputStream":3}],
+6:[function(_dereq_,module,exports){
+var assert = _dereq_('assert');
+
+var messages = _dereq_('./messages.json');
+var constants = _dereq_('./constants');
+
+var EventEmitter = _dereq_('events').EventEmitter;
+
+var Tokenizer = _dereq_('./Tokenizer').Tokenizer;
+var ElementStack = _dereq_('./ElementStack').ElementStack;
+var StackItem = _dereq_('./StackItem').StackItem;
+
+var Marker = {};
+
+function isWhitespace(ch) {
+ return ch === " " || ch === "\n" || ch === "\t" || ch === "\r" || ch === "\f";
+}
+
+function isWhitespaceOrReplacementCharacter(ch) {
+ return isWhitespace(ch) || ch === '\uFFFD';
+}
+
+function isAllWhitespace(characters) {
+ for (var i = 0; i < characters.length; i++) {
+ var ch = characters[i];
+ if (!isWhitespace(ch))
+ return false;
+ }
+ return true;
+}
+
+function isAllWhitespaceOrReplacementCharacters(characters) {
+ for (var i = 0; i < characters.length; i++) {
+ var ch = characters[i];
+ if (!isWhitespaceOrReplacementCharacter(ch))
+ return false;
+ }
+ return true;
+}
+
+function getAttribute(node, name) {
+ for (var i = 0; i < node.attributes.length; i++) {
+ var attribute = node.attributes[i];
+ if (attribute.nodeName === name) {
+ return attribute;
+ }
+ }
+ return null;
+}
+
+function CharacterBuffer(characters) {
+ this.characters = characters;
+ this.current = 0;
+ this.end = this.characters.length;
+}
+
+CharacterBuffer.prototype.skipAtMostOneLeadingNewline = function() {
+ if (this.characters[this.current] === '\n')
+ this.current++;
+};
+
+CharacterBuffer.prototype.skipLeadingWhitespace = function() {
+ while (isWhitespace(this.characters[this.current])) {
+ if (++this.current == this.end)
+ return;
+ }
+};
+
+CharacterBuffer.prototype.skipLeadingNonWhitespace = function() {
+ while (!isWhitespace(this.characters[this.current])) {
+ if (++this.current == this.end)
+ return;
+ }
+};
+
+CharacterBuffer.prototype.takeRemaining = function() {
+ return this.characters.substring(this.current);
+};
+
+CharacterBuffer.prototype.takeLeadingWhitespace = function() {
+ var start = this.current;
+ this.skipLeadingWhitespace();
+ if (start === this.current)
+ return "";
+ return this.characters.substring(start, this.current - start);
+};
+
+Object.defineProperty(CharacterBuffer.prototype, 'length', {
+ get: function(){
+ return this.end - this.current;
+ }
+});
+function TreeBuilder() {
+ this.tokenizer = null;
+ this.errorHandler = null;
+ this.scriptingEnabled = false;
+ this.document = null;
+ this.head = null;
+ this.form = null;
+ this.openElements = new ElementStack();
+ this.activeFormattingElements = [];
+ this.insertionMode = null;
+ this.insertionModeName = "";
+ this.originalInsertionMode = "";
+ this.inQuirksMode = false; // TODO quirks mode
+ this.compatMode = "no quirks";
+ this.framesetOk = true;
+ this.redirectAttachToFosterParent = false;
+ this.selfClosingFlagAcknowledged = false;
+ this.context = "";
+ this.pendingTableCharacters = [];
+ this.shouldSkipLeadingNewline = false;
+
+ var tree = this;
+ var modes = this.insertionModes = {};
+ modes.base = {
+ end_tag_handlers: {"-default": 'endTagOther'},
+ start_tag_handlers: {"-default": 'startTagOther'},
+ processEOF: function() {
+ tree.generateImpliedEndTags();
+ if (tree.openElements.length > 2) {
+ tree.parseError('expected-closing-tag-but-got-eof');
+ } else if (tree.openElements.length == 2 &&
+ tree.openElements.item(1).localName != 'body') {
+ tree.parseError('expected-closing-tag-but-got-eof');
+ } else if (tree.context && tree.openElements.length > 1) {
+ }
+ },
+ processComment: function(data) {
+ tree.insertComment(data, tree.currentStackItem().node);
+ },
+ processDoctype: function(name, publicId, systemId, forceQuirks) {
+ tree.parseError('unexpected-doctype');
+ },
+ processStartTag: function(name, attributes, selfClosing) {
+ if (this[this.start_tag_handlers[name]]) {
+ this[this.start_tag_handlers[name]](name, attributes, selfClosing);
+ } else if (this[this.start_tag_handlers["-default"]]) {
+ this[this.start_tag_handlers["-default"]](name, attributes, selfClosing);
+ } else {
+ throw(new Error("No handler found for "+name));
+ }
+ },
+ processEndTag: function(name) {
+ if (this[this.end_tag_handlers[name]]) {
+ this[this.end_tag_handlers[name]](name);
+ } else if (this[this.end_tag_handlers["-default"]]) {
+ this[this.end_tag_handlers["-default"]](name);
+ } else {
+ throw(new Error("No handler found for "+name));
+ }
+ },
+ startTagHtml: function(name, attributes) {
+ modes.inBody.startTagHtml(name, attributes);
+ }
+ };
+
+ modes.initial = Object.create(modes.base);
+
+ modes.initial.processEOF = function() {
+ tree.parseError("expected-doctype-but-got-eof");
+ this.anythingElse();
+ tree.insertionMode.processEOF();
+ };
+
+ modes.initial.processComment = function(data) {
+ tree.insertComment(data, tree.document);
+ };
+
+ modes.initial.processDoctype = function(name, publicId, systemId, forceQuirks) {
+ tree.insertDoctype(name || '', publicId || '', systemId || '');
+
+ if (forceQuirks || name != 'html' || (publicId != null && ([
+ "+//silmaril//dtd html pro v0r11 19970101//",
+ "-//advasoft ltd//dtd html 3.0 aswedit + extensions//",
+ "-//as//dtd html 3.0 aswedit + extensions//",
+ "-//ietf//dtd html 2.0 level 1//",
+ "-//ietf//dtd html 2.0 level 2//",
+ "-//ietf//dtd html 2.0 strict level 1//",
+ "-//ietf//dtd html 2.0 strict level 2//",
+ "-//ietf//dtd html 2.0 strict//",
+ "-//ietf//dtd html 2.0//",
+ "-//ietf//dtd html 2.1e//",
+ "-//ietf//dtd html 3.0//",
+ "-//ietf//dtd html 3.0//",
+ "-//ietf//dtd html 3.2 final//",
+ "-//ietf//dtd html 3.2//",
+ "-//ietf//dtd html 3//",
+ "-//ietf//dtd html level 0//",
+ "-//ietf//dtd html level 0//",
+ "-//ietf//dtd html level 1//",
+ "-//ietf//dtd html level 1//",
+ "-//ietf//dtd html level 2//",
+ "-//ietf//dtd html level 2//",
+ "-//ietf//dtd html level 3//",
+ "-//ietf//dtd html level 3//",
+ "-//ietf//dtd html strict level 0//",
+ "-//ietf//dtd html strict level 0//",
+ "-//ietf//dtd html strict level 1//",
+ "-//ietf//dtd html strict level 1//",
+ "-//ietf//dtd html strict level 2//",
+ "-//ietf//dtd html strict level 2//",
+ "-//ietf//dtd html strict level 3//",
+ "-//ietf//dtd html strict level 3//",
+ "-//ietf//dtd html strict//",
+ "-//ietf//dtd html strict//",
+ "-//ietf//dtd html strict//",
+ "-//ietf//dtd html//",
+ "-//ietf//dtd html//",
+ "-//ietf//dtd html//",
+ "-//metrius//dtd metrius presentational//",
+ "-//microsoft//dtd internet explorer 2.0 html strict//",
+ "-//microsoft//dtd internet explorer 2.0 html//",
+ "-//microsoft//dtd internet explorer 2.0 tables//",
+ "-//microsoft//dtd internet explorer 3.0 html strict//",
+ "-//microsoft//dtd internet explorer 3.0 html//",
+ "-//microsoft//dtd internet explorer 3.0 tables//",
+ "-//netscape comm. corp.//dtd html//",
+ "-//netscape comm. corp.//dtd strict html//",
+ "-//o'reilly and associates//dtd html 2.0//",
+ "-//o'reilly and associates//dtd html extended 1.0//",
+ "-//spyglass//dtd html 2.0 extended//",
+ "-//sq//dtd html 2.0 hotmetal + extensions//",
+ "-//sun microsystems corp.//dtd hotjava html//",
+ "-//sun microsystems corp.//dtd hotjava strict html//",
+ "-//w3c//dtd html 3 1995-03-24//",
+ "-//w3c//dtd html 3.2 draft//",
+ "-//w3c//dtd html 3.2 final//",
+ "-//w3c//dtd html 3.2//",
+ "-//w3c//dtd html 3.2s draft//",
+ "-//w3c//dtd html 4.0 frameset//",
+ "-//w3c//dtd html 4.0 transitional//",
+ "-//w3c//dtd html experimental 19960712//",
+ "-//w3c//dtd html experimental 970421//",
+ "-//w3c//dtd w3 html//",
+ "-//w3o//dtd w3 html 3.0//",
+ "-//webtechs//dtd mozilla html 2.0//",
+ "-//webtechs//dtd mozilla html//",
+ "html"
+ ].some(publicIdStartsWith)
+ || [
+ "-//w3o//dtd w3 html strict 3.0//en//",
+ "-/w3c/dtd html 4.0 transitional/en",
+ "html"
+ ].indexOf(publicId.toLowerCase()) > -1
+ || (systemId == null && [
+ "-//w3c//dtd html 4.01 transitional//",
+ "-//w3c//dtd html 4.01 frameset//"
+ ].some(publicIdStartsWith)))
+ )
+ || (systemId != null && (systemId.toLowerCase() == "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"))
+ ) {
+ tree.compatMode = "quirks";
+ tree.parseError("quirky-doctype");
+ } else if (publicId != null && ([
+ "-//w3c//dtd xhtml 1.0 transitional//",
+ "-//w3c//dtd xhtml 1.0 frameset//"
+ ].some(publicIdStartsWith)
+ || (systemId != null && [
+ "-//w3c//dtd html 4.01 transitional//",
+ "-//w3c//dtd html 4.01 frameset//"
+ ].indexOf(publicId.toLowerCase()) > -1))
+ ) {
+ tree.compatMode = "limited quirks";
+ tree.parseError("almost-standards-doctype");
+ } else {
+ if ((publicId == "-//W3C//DTD HTML 4.0//EN" && (systemId == null || systemId == "http://www.w3.org/TR/REC-html40/strict.dtd"))
+ || (publicId == "-//W3C//DTD HTML 4.01//EN" && (systemId == null || systemId == "http://www.w3.org/TR/html4/strict.dtd"))
+ || (publicId == "-//W3C//DTD XHTML 1.0 Strict//EN" && (systemId == "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"))
+ || (publicId == "-//W3C//DTD XHTML 1.1//EN" && (systemId == "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"))
+ ) {
+ } else if (!((systemId == null || systemId == "about:legacy-compat") && publicId == null)) {
+ tree.parseError("unknown-doctype");
+ }
+ }
+ tree.setInsertionMode('beforeHTML');
+ function publicIdStartsWith(string) {
+ return publicId.toLowerCase().indexOf(string) === 0;
+ }
+ };
+
+ modes.initial.processCharacters = function(buffer) {
+ buffer.skipLeadingWhitespace();
+ if (!buffer.length)
+ return;
+ tree.parseError('expected-doctype-but-got-chars');
+ this.anythingElse();
+ tree.insertionMode.processCharacters(buffer);
+ };
+
+ modes.initial.processStartTag = function(name, attributes, selfClosing) {
+ tree.parseError('expected-doctype-but-got-start-tag', {name: name});
+ this.anythingElse();
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.initial.processEndTag = function(name) {
+ tree.parseError('expected-doctype-but-got-end-tag', {name: name});
+ this.anythingElse();
+ tree.insertionMode.processEndTag(name);
+ };
+
+ modes.initial.anythingElse = function() {
+ tree.compatMode = 'quirks';
+ tree.setInsertionMode('beforeHTML');
+ };
+
+ modes.beforeHTML = Object.create(modes.base);
+
+ modes.beforeHTML.start_tag_handlers = {
+ html: 'startTagHtml',
+ '-default': 'startTagOther'
+ };
+
+ modes.beforeHTML.processEOF = function() {
+ this.anythingElse();
+ tree.insertionMode.processEOF();
+ };
+
+ modes.beforeHTML.processComment = function(data) {
+ tree.insertComment(data, tree.document);
+ };
+
+ modes.beforeHTML.processCharacters = function(buffer) {
+ buffer.skipLeadingWhitespace();
+ if (!buffer.length)
+ return;
+ this.anythingElse();
+ tree.insertionMode.processCharacters(buffer);
+ };
+
+ modes.beforeHTML.startTagHtml = function(name, attributes, selfClosing) {
+ tree.insertHtmlElement(attributes);
+ tree.setInsertionMode('beforeHead');
+ };
+
+ modes.beforeHTML.startTagOther = function(name, attributes, selfClosing) {
+ this.anythingElse();
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.beforeHTML.processEndTag = function(name) {
+ this.anythingElse();
+ tree.insertionMode.processEndTag(name);
+ };
+
+ modes.beforeHTML.anythingElse = function() {
+ tree.insertHtmlElement();
+ tree.setInsertionMode('beforeHead');
+ };
+
+ modes.afterAfterBody = Object.create(modes.base);
+
+ modes.afterAfterBody.start_tag_handlers = {
+ html: 'startTagHtml',
+ '-default': 'startTagOther'
+ };
+
+ modes.afterAfterBody.processComment = function(data) {
+ tree.insertComment(data, tree.document);
+ };
+
+ modes.afterAfterBody.processDoctype = function(data) {
+ modes.inBody.processDoctype(data);
+ };
+
+ modes.afterAfterBody.startTagHtml = function(data, attributes) {
+ modes.inBody.startTagHtml(data, attributes);
+ };
+
+ modes.afterAfterBody.startTagOther = function(name, attributes, selfClosing) {
+ tree.parseError('unexpected-start-tag', {name: name});
+ tree.setInsertionMode('inBody');
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.afterAfterBody.endTagOther = function(name) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ tree.setInsertionMode('inBody');
+ tree.insertionMode.processEndTag(name);
+ };
+
+ modes.afterAfterBody.processCharacters = function(data) {
+ if (!isAllWhitespace(data.characters)) {
+ tree.parseError('unexpected-char-after-body');
+ tree.setInsertionMode('inBody');
+ return tree.insertionMode.processCharacters(data);
+ }
+ modes.inBody.processCharacters(data);
+ };
+
+ modes.afterBody = Object.create(modes.base);
+
+ modes.afterBody.end_tag_handlers = {
+ html: 'endTagHtml',
+ '-default': 'endTagOther'
+ };
+
+ modes.afterBody.processComment = function(data) {
+ tree.insertComment(data, tree.openElements.rootNode);
+ };
+
+ modes.afterBody.processCharacters = function(data) {
+ if (!isAllWhitespace(data.characters)) {
+ tree.parseError('unexpected-char-after-body');
+ tree.setInsertionMode('inBody');
+ return tree.insertionMode.processCharacters(data);
+ }
+ modes.inBody.processCharacters(data);
+ };
+
+ modes.afterBody.processStartTag = function(name, attributes, selfClosing) {
+ tree.parseError('unexpected-start-tag-after-body', {name: name});
+ tree.setInsertionMode('inBody');
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.afterBody.endTagHtml = function(name) {
+ if (tree.context) {
+ tree.parseError('end-html-in-innerhtml');
+ } else {
+ tree.setInsertionMode('afterAfterBody');
+ }
+ };
+
+ modes.afterBody.endTagOther = function(name) {
+ tree.parseError('unexpected-end-tag-after-body', {name: name});
+ tree.setInsertionMode('inBody');
+ tree.insertionMode.processEndTag(name);
+ };
+
+ modes.afterFrameset = Object.create(modes.base);
+
+ modes.afterFrameset.start_tag_handlers = {
+ html: 'startTagHtml',
+ noframes: 'startTagNoframes',
+ '-default': 'startTagOther'
+ };
+
+ modes.afterFrameset.end_tag_handlers = {
+ html: 'endTagHtml',
+ '-default': 'endTagOther'
+ };
+
+ modes.afterFrameset.processCharacters = function(buffer) {
+ var characters = buffer.takeRemaining();
+ var whitespace = "";
+ for (var i = 0; i < characters.length; i++) {
+ var ch = characters[i];
+ if (isWhitespace(ch))
+ whitespace += ch;
+ }
+ if (whitespace) {
+ tree.insertText(whitespace);
+ }
+ if (whitespace.length < characters.length)
+ tree.parseError('expected-eof-but-got-char');
+ };
+
+ modes.afterFrameset.startTagNoframes = function(name, attributes) {
+ modes.inHead.processStartTag(name, attributes);
+ };
+
+ modes.afterFrameset.startTagOther = function(name, attributes) {
+ tree.parseError("unexpected-start-tag-after-frameset", {name: name});
+ };
+
+ modes.afterFrameset.endTagHtml = function(name) {
+ tree.setInsertionMode('afterAfterFrameset');
+ };
+
+ modes.afterFrameset.endTagOther = function(name) {
+ tree.parseError("unexpected-end-tag-after-frameset", {name: name});
+ };
+
+ modes.beforeHead = Object.create(modes.base);
+
+ modes.beforeHead.start_tag_handlers = {
+ html: 'startTagHtml',
+ head: 'startTagHead',
+ '-default': 'startTagOther'
+ };
+
+ modes.beforeHead.end_tag_handlers = {
+ html: 'endTagImplyHead',
+ head: 'endTagImplyHead',
+ body: 'endTagImplyHead',
+ br: 'endTagImplyHead',
+ '-default': 'endTagOther'
+ };
+
+ modes.beforeHead.processEOF = function() {
+ this.startTagHead('head', []);
+ tree.insertionMode.processEOF();
+ };
+
+ modes.beforeHead.processCharacters = function(buffer) {
+ buffer.skipLeadingWhitespace();
+ if (!buffer.length)
+ return;
+ this.startTagHead('head', []);
+ tree.insertionMode.processCharacters(buffer);
+ };
+
+ modes.beforeHead.startTagHead = function(name, attributes) {
+ tree.insertHeadElement(attributes);
+ tree.setInsertionMode('inHead');
+ };
+
+ modes.beforeHead.startTagOther = function(name, attributes, selfClosing) {
+ this.startTagHead('head', []);
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.beforeHead.endTagImplyHead = function(name) {
+ this.startTagHead('head', []);
+ tree.insertionMode.processEndTag(name);
+ };
+
+ modes.beforeHead.endTagOther = function(name) {
+ tree.parseError('end-tag-after-implied-root', {name: name});
+ };
+
+ modes.inHead = Object.create(modes.base);
+
+ modes.inHead.start_tag_handlers = {
+ html: 'startTagHtml',
+ head: 'startTagHead',
+ title: 'startTagTitle',
+ script: 'startTagScript',
+ style: 'startTagNoFramesStyle',
+ noscript: 'startTagNoScript',
+ noframes: 'startTagNoFramesStyle',
+ base: 'startTagBaseBasefontBgsoundLink',
+ basefont: 'startTagBaseBasefontBgsoundLink',
+ bgsound: 'startTagBaseBasefontBgsoundLink',
+ link: 'startTagBaseBasefontBgsoundLink',
+ meta: 'startTagMeta',
+ "-default": 'startTagOther'
+ };
+
+ modes.inHead.end_tag_handlers = {
+ head: 'endTagHead',
+ html: 'endTagHtmlBodyBr',
+ body: 'endTagHtmlBodyBr',
+ br: 'endTagHtmlBodyBr',
+ "-default": 'endTagOther'
+ };
+
+ modes.inHead.processEOF = function() {
+ var name = tree.currentStackItem().localName;
+ if (['title', 'style', 'script'].indexOf(name) != -1) {
+ tree.parseError("expected-named-closing-tag-but-got-eof", {name: name});
+ tree.popElement();
+ }
+
+ this.anythingElse();
+
+ tree.insertionMode.processEOF();
+ };
+
+ modes.inHead.processCharacters = function(buffer) {
+ var leadingWhitespace = buffer.takeLeadingWhitespace();
+ if (leadingWhitespace)
+ tree.insertText(leadingWhitespace);
+ if (!buffer.length)
+ return;
+ this.anythingElse();
+ tree.insertionMode.processCharacters(buffer);
+ };
+
+ modes.inHead.startTagHtml = function(name, attributes) {
+ modes.inBody.processStartTag(name, attributes);
+ };
+
+ modes.inHead.startTagHead = function(name, attributes) {
+ tree.parseError('two-heads-are-not-better-than-one');
+ };
+
+ modes.inHead.startTagTitle = function(name, attributes) {
+ tree.processGenericRCDATAStartTag(name, attributes);
+ };
+
+ modes.inHead.startTagNoScript = function(name, attributes) {
+ if (tree.scriptingEnabled)
+ return tree.processGenericRawTextStartTag(name, attributes);
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inHeadNoscript');
+ };
+
+ modes.inHead.startTagNoFramesStyle = function(name, attributes) {
+ tree.processGenericRawTextStartTag(name, attributes);
+ };
+
+ modes.inHead.startTagScript = function(name, attributes) {
+ tree.insertElement(name, attributes);
+ tree.tokenizer.setState(Tokenizer.SCRIPT_DATA);
+ tree.originalInsertionMode = tree.insertionModeName;
+ tree.setInsertionMode('text');
+ };
+
+ modes.inHead.startTagBaseBasefontBgsoundLink = function(name, attributes) {
+ tree.insertSelfClosingElement(name, attributes);
+ };
+
+ modes.inHead.startTagMeta = function(name, attributes) {
+ tree.insertSelfClosingElement(name, attributes);
+ };
+
+ modes.inHead.startTagOther = function(name, attributes, selfClosing) {
+ this.anythingElse();
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.inHead.endTagHead = function(name) {
+ if (tree.openElements.item(tree.openElements.length - 1).localName == 'head') {
+ tree.openElements.pop();
+ } else {
+ tree.parseError('unexpected-end-tag', {name: 'head'});
+ }
+ tree.setInsertionMode('afterHead');
+ };
+
+ modes.inHead.endTagHtmlBodyBr = function(name) {
+ this.anythingElse();
+ tree.insertionMode.processEndTag(name);
+ };
+
+ modes.inHead.endTagOther = function(name) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ };
+
+ modes.inHead.anythingElse = function() {
+ this.endTagHead('head');
+ };
+
+ modes.afterHead = Object.create(modes.base);
+
+ modes.afterHead.start_tag_handlers = {
+ html: 'startTagHtml',
+ head: 'startTagHead',
+ body: 'startTagBody',
+ frameset: 'startTagFrameset',
+ base: 'startTagFromHead',
+ link: 'startTagFromHead',
+ meta: 'startTagFromHead',
+ script: 'startTagFromHead',
+ style: 'startTagFromHead',
+ title: 'startTagFromHead',
+ "-default": 'startTagOther'
+ };
+
+ modes.afterHead.end_tag_handlers = {
+ body: 'endTagBodyHtmlBr',
+ html: 'endTagBodyHtmlBr',
+ br: 'endTagBodyHtmlBr',
+ "-default": 'endTagOther'
+ };
+
+ modes.afterHead.processEOF = function() {
+ this.anythingElse();
+ tree.insertionMode.processEOF();
+ };
+
+ modes.afterHead.processCharacters = function(buffer) {
+ var leadingWhitespace = buffer.takeLeadingWhitespace();
+ if (leadingWhitespace)
+ tree.insertText(leadingWhitespace);
+ if (!buffer.length)
+ return;
+ this.anythingElse();
+ tree.insertionMode.processCharacters(buffer);
+ };
+
+ modes.afterHead.startTagHtml = function(name, attributes) {
+ modes.inBody.processStartTag(name, attributes);
+ };
+
+ modes.afterHead.startTagBody = function(name, attributes) {
+ tree.framesetOk = false;
+ tree.insertBodyElement(attributes);
+ tree.setInsertionMode('inBody');
+ };
+
+ modes.afterHead.startTagFrameset = function(name, attributes) {
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inFrameset');
+ };
+
+ modes.afterHead.startTagFromHead = function(name, attributes, selfClosing) {
+ tree.parseError("unexpected-start-tag-out-of-my-head", {name: name});
+ tree.openElements.push(tree.head);
+ modes.inHead.processStartTag(name, attributes, selfClosing);
+ tree.openElements.remove(tree.head);
+ };
+
+ modes.afterHead.startTagHead = function(name, attributes, selfClosing) {
+ tree.parseError('unexpected-start-tag', {name: name});
+ };
+
+ modes.afterHead.startTagOther = function(name, attributes, selfClosing) {
+ this.anythingElse();
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.afterHead.endTagBodyHtmlBr = function(name) {
+ this.anythingElse();
+ tree.insertionMode.processEndTag(name);
+ };
+
+ modes.afterHead.endTagOther = function(name) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ };
+
+ modes.afterHead.anythingElse = function() {
+ tree.insertBodyElement([]);
+ tree.setInsertionMode('inBody');
+ tree.framesetOk = true;
+ }
+
+ modes.inBody = Object.create(modes.base);
+
+ modes.inBody.start_tag_handlers = {
+ html: 'startTagHtml',
+ head: 'startTagMisplaced',
+ base: 'startTagProcessInHead',
+ basefont: 'startTagProcessInHead',
+ bgsound: 'startTagProcessInHead',
+ link: 'startTagProcessInHead',
+ meta: 'startTagProcessInHead',
+ noframes: 'startTagProcessInHead',
+ script: 'startTagProcessInHead',
+ style: 'startTagProcessInHead',
+ title: 'startTagProcessInHead',
+ body: 'startTagBody',
+ form: 'startTagForm',
+ plaintext: 'startTagPlaintext',
+ a: 'startTagA',
+ button: 'startTagButton',
+ xmp: 'startTagXmp',
+ table: 'startTagTable',
+ hr: 'startTagHr',
+ image: 'startTagImage',
+ input: 'startTagInput',
+ textarea: 'startTagTextarea',
+ select: 'startTagSelect',
+ isindex: 'startTagIsindex',
+ applet: 'startTagAppletMarqueeObject',
+ marquee: 'startTagAppletMarqueeObject',
+ object: 'startTagAppletMarqueeObject',
+ li: 'startTagListItem',
+ dd: 'startTagListItem',
+ dt: 'startTagListItem',
+ address: 'startTagCloseP',
+ article: 'startTagCloseP',
+ aside: 'startTagCloseP',
+ blockquote: 'startTagCloseP',
+ center: 'startTagCloseP',
+ details: 'startTagCloseP',
+ dir: 'startTagCloseP',
+ div: 'startTagCloseP',
+ dl: 'startTagCloseP',
+ fieldset: 'startTagCloseP',
+ figcaption: 'startTagCloseP',
+ figure: 'startTagCloseP',
+ footer: 'startTagCloseP',
+ header: 'startTagCloseP',
+ hgroup: 'startTagCloseP',
+ main: 'startTagCloseP',
+ menu: 'startTagCloseP',
+ nav: 'startTagCloseP',
+ ol: 'startTagCloseP',
+ p: 'startTagCloseP',
+ section: 'startTagCloseP',
+ summary: 'startTagCloseP',
+ ul: 'startTagCloseP',
+ listing: 'startTagPreListing',
+ pre: 'startTagPreListing',
+ b: 'startTagFormatting',
+ big: 'startTagFormatting',
+ code: 'startTagFormatting',
+ em: 'startTagFormatting',
+ font: 'startTagFormatting',
+ i: 'startTagFormatting',
+ s: 'startTagFormatting',
+ small: 'startTagFormatting',
+ strike: 'startTagFormatting',
+ strong: 'startTagFormatting',
+ tt: 'startTagFormatting',
+ u: 'startTagFormatting',
+ nobr: 'startTagNobr',
+ area: 'startTagVoidFormatting',
+ br: 'startTagVoidFormatting',
+ embed: 'startTagVoidFormatting',
+ img: 'startTagVoidFormatting',
+ keygen: 'startTagVoidFormatting',
+ wbr: 'startTagVoidFormatting',
+ param: 'startTagParamSourceTrack',
+ source: 'startTagParamSourceTrack',
+ track: 'startTagParamSourceTrack',
+ iframe: 'startTagIFrame',
+ noembed: 'startTagRawText',
+ noscript: 'startTagRawText',
+ h1: 'startTagHeading',
+ h2: 'startTagHeading',
+ h3: 'startTagHeading',
+ h4: 'startTagHeading',
+ h5: 'startTagHeading',
+ h6: 'startTagHeading',
+ caption: 'startTagMisplaced',
+ col: 'startTagMisplaced',
+ colgroup: 'startTagMisplaced',
+ frame: 'startTagMisplaced',
+ frameset: 'startTagFrameset',
+ tbody: 'startTagMisplaced',
+ td: 'startTagMisplaced',
+ tfoot: 'startTagMisplaced',
+ th: 'startTagMisplaced',
+ thead: 'startTagMisplaced',
+ tr: 'startTagMisplaced',
+ option: 'startTagOptionOptgroup',
+ optgroup: 'startTagOptionOptgroup',
+ math: 'startTagMath',
+ svg: 'startTagSVG',
+ rt: 'startTagRpRt',
+ rp: 'startTagRpRt',
+ "-default": 'startTagOther'
+ };
+
+ modes.inBody.end_tag_handlers = {
+ p: 'endTagP',
+ body: 'endTagBody',
+ html: 'endTagHtml',
+ address: 'endTagBlock',
+ article: 'endTagBlock',
+ aside: 'endTagBlock',
+ blockquote: 'endTagBlock',
+ button: 'endTagBlock',
+ center: 'endTagBlock',
+ details: 'endTagBlock',
+ dir: 'endTagBlock',
+ div: 'endTagBlock',
+ dl: 'endTagBlock',
+ fieldset: 'endTagBlock',
+ figcaption: 'endTagBlock',
+ figure: 'endTagBlock',
+ footer: 'endTagBlock',
+ header: 'endTagBlock',
+ hgroup: 'endTagBlock',
+ listing: 'endTagBlock',
+ main: 'endTagBlock',
+ menu: 'endTagBlock',
+ nav: 'endTagBlock',
+ ol: 'endTagBlock',
+ pre: 'endTagBlock',
+ section: 'endTagBlock',
+ summary: 'endTagBlock',
+ ul: 'endTagBlock',
+ form: 'endTagForm',
+ applet: 'endTagAppletMarqueeObject',
+ marquee: 'endTagAppletMarqueeObject',
+ object: 'endTagAppletMarqueeObject',
+ dd: 'endTagListItem',
+ dt: 'endTagListItem',
+ li: 'endTagListItem',
+ h1: 'endTagHeading',
+ h2: 'endTagHeading',
+ h3: 'endTagHeading',
+ h4: 'endTagHeading',
+ h5: 'endTagHeading',
+ h6: 'endTagHeading',
+ a: 'endTagFormatting',
+ b: 'endTagFormatting',
+ big: 'endTagFormatting',
+ code: 'endTagFormatting',
+ em: 'endTagFormatting',
+ font: 'endTagFormatting',
+ i: 'endTagFormatting',
+ nobr: 'endTagFormatting',
+ s: 'endTagFormatting',
+ small: 'endTagFormatting',
+ strike: 'endTagFormatting',
+ strong: 'endTagFormatting',
+ tt: 'endTagFormatting',
+ u: 'endTagFormatting',
+ br: 'endTagBr',
+ "-default": 'endTagOther'
+ };
+
+ modes.inBody.processCharacters = function(buffer) {
+ if (tree.shouldSkipLeadingNewline) {
+ tree.shouldSkipLeadingNewline = false;
+ buffer.skipAtMostOneLeadingNewline();
+ }
+ tree.reconstructActiveFormattingElements();
+ var characters = buffer.takeRemaining();
+ characters = characters.replace(/\u0000/g, function(match, index){
+ tree.parseError("invalid-codepoint");
+ return '';
+ });
+ if (!characters)
+ return;
+ tree.insertText(characters);
+ if (tree.framesetOk && !isAllWhitespaceOrReplacementCharacters(characters))
+ tree.framesetOk = false;
+ };
+
+ modes.inBody.startTagHtml = function(name, attributes) {
+ tree.parseError('non-html-root');
+ tree.addAttributesToElement(tree.openElements.rootNode, attributes);
+ };
+
+ modes.inBody.startTagProcessInHead = function(name, attributes) {
+ modes.inHead.processStartTag(name, attributes);
+ };
+
+ modes.inBody.startTagBody = function(name, attributes) {
+ tree.parseError('unexpected-start-tag', {name: 'body'});
+ if (tree.openElements.length == 1 ||
+ tree.openElements.item(1).localName != 'body') {
+ assert.ok(tree.context);
+ } else {
+ tree.framesetOk = false;
+ tree.addAttributesToElement(tree.openElements.bodyElement, attributes);
+ }
+ };
+
+ modes.inBody.startTagFrameset = function(name, attributes) {
+ tree.parseError('unexpected-start-tag', {name: 'frameset'});
+ if (tree.openElements.length == 1 ||
+ tree.openElements.item(1).localName != 'body') {
+ assert.ok(tree.context);
+ } else if (tree.framesetOk) {
+ tree.detachFromParent(tree.openElements.bodyElement);
+ while (tree.openElements.length > 1)
+ tree.openElements.pop();
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inFrameset');
+ }
+ };
+
+ modes.inBody.startTagCloseP = function(name, attributes) {
+ if (tree.openElements.inButtonScope('p'))
+ this.endTagP('p');
+ tree.insertElement(name, attributes);
+ };
+
+ modes.inBody.startTagPreListing = function(name, attributes) {
+ if (tree.openElements.inButtonScope('p'))
+ this.endTagP('p');
+ tree.insertElement(name, attributes);
+ tree.framesetOk = false;
+ tree.shouldSkipLeadingNewline = true;
+ };
+
+ modes.inBody.startTagForm = function(name, attributes) {
+ if (tree.form) {
+ tree.parseError('unexpected-start-tag', {name: name});
+ } else {
+ if (tree.openElements.inButtonScope('p'))
+ this.endTagP('p');
+ tree.insertElement(name, attributes);
+ tree.form = tree.currentStackItem();
+ }
+ };
+
+ modes.inBody.startTagRpRt = function(name, attributes) {
+ if (tree.openElements.inScope('ruby')) {
+ tree.generateImpliedEndTags();
+ if (tree.currentStackItem().localName != 'ruby') {
+ tree.parseError('unexpected-start-tag', {name: name});
+ }
+ }
+ tree.insertElement(name, attributes);
+ };
+
+ modes.inBody.startTagListItem = function(name, attributes) {
+ var stopNames = {li: ['li'], dd: ['dd', 'dt'], dt: ['dd', 'dt']};
+ var stopName = stopNames[name];
+
+ var els = tree.openElements;
+ for (var i = els.length - 1; i >= 0; i--) {
+ var node = els.item(i);
+ if (stopName.indexOf(node.localName) != -1) {
+ tree.insertionMode.processEndTag(node.localName);
+ break;
+ }
+ if (node.isSpecial() && node.localName !== 'p' && node.localName !== 'address' && node.localName !== 'div')
+ break;
+ }
+ if (tree.openElements.inButtonScope('p'))
+ this.endTagP('p');
+ tree.insertElement(name, attributes);
+ tree.framesetOk = false;
+ };
+
+ modes.inBody.startTagPlaintext = function(name, attributes) {
+ if (tree.openElements.inButtonScope('p'))
+ this.endTagP('p');
+ tree.insertElement(name, attributes);
+ tree.tokenizer.setState(Tokenizer.PLAINTEXT);
+ };
+
+ modes.inBody.startTagHeading = function(name, attributes) {
+ if (tree.openElements.inButtonScope('p'))
+ this.endTagP('p');
+ if (tree.currentStackItem().isNumberedHeader()) {
+ tree.parseError('unexpected-start-tag', {name: name});
+ tree.popElement();
+ }
+ tree.insertElement(name, attributes);
+ };
+
+ modes.inBody.startTagA = function(name, attributes) {
+ var activeA = tree.elementInActiveFormattingElements('a');
+ if (activeA) {
+ tree.parseError("unexpected-start-tag-implies-end-tag", {startName: "a", endName: "a"});
+ tree.adoptionAgencyEndTag('a');
+ if (tree.openElements.contains(activeA))
+ tree.openElements.remove(activeA);
+ tree.removeElementFromActiveFormattingElements(activeA);
+ }
+ tree.reconstructActiveFormattingElements();
+ tree.insertFormattingElement(name, attributes);
+ };
+
+ modes.inBody.startTagFormatting = function(name, attributes) {
+ tree.reconstructActiveFormattingElements();
+ tree.insertFormattingElement(name, attributes);
+ };
+
+ modes.inBody.startTagNobr = function(name, attributes) {
+ tree.reconstructActiveFormattingElements();
+ if (tree.openElements.inScope('nobr')) {
+ tree.parseError("unexpected-start-tag-implies-end-tag", {startName: 'nobr', endName: 'nobr'});
+ this.processEndTag('nobr');
+ tree.reconstructActiveFormattingElements();
+ }
+ tree.insertFormattingElement(name, attributes);
+ };
+
+ modes.inBody.startTagButton = function(name, attributes) {
+ if (tree.openElements.inScope('button')) {
+ tree.parseError('unexpected-start-tag-implies-end-tag', {startName: 'button', endName: 'button'});
+ this.processEndTag('button');
+ tree.insertionMode.processStartTag(name, attributes);
+ } else {
+ tree.framesetOk = false;
+ tree.reconstructActiveFormattingElements();
+ tree.insertElement(name, attributes);
+ }
+ };
+
+ modes.inBody.startTagAppletMarqueeObject = function(name, attributes) {
+ tree.reconstructActiveFormattingElements();
+ tree.insertElement(name, attributes);
+ tree.activeFormattingElements.push(Marker);
+ tree.framesetOk = false;
+ };
+
+ modes.inBody.endTagAppletMarqueeObject = function(name) {
+ if (!tree.openElements.inScope(name)) {
+ tree.parseError("unexpected-end-tag", {name: name});
+ } else {
+ tree.generateImpliedEndTags();
+ if (tree.currentStackItem().localName != name) {
+ tree.parseError('end-tag-too-early', {name: name});
+ }
+ tree.openElements.popUntilPopped(name);
+ tree.clearActiveFormattingElements();
+ }
+ };
+
+ modes.inBody.startTagXmp = function(name, attributes) {
+ if (tree.openElements.inButtonScope('p'))
+ this.processEndTag('p');
+ tree.reconstructActiveFormattingElements();
+ tree.processGenericRawTextStartTag(name, attributes);
+ tree.framesetOk = false;
+ };
+
+ modes.inBody.startTagTable = function(name, attributes) {
+ if (tree.compatMode !== "quirks")
+ if (tree.openElements.inButtonScope('p'))
+ this.processEndTag('p');
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inTable');
+ tree.framesetOk = false;
+ };
+
+ modes.inBody.startTagVoidFormatting = function(name, attributes) {
+ tree.reconstructActiveFormattingElements();
+ tree.insertSelfClosingElement(name, attributes);
+ tree.framesetOk = false;
+ };
+
+ modes.inBody.startTagParamSourceTrack = function(name, attributes) {
+ tree.insertSelfClosingElement(name, attributes);
+ };
+
+ modes.inBody.startTagHr = function(name, attributes) {
+ if (tree.openElements.inButtonScope('p'))
+ this.endTagP('p');
+ tree.insertSelfClosingElement(name, attributes);
+ tree.framesetOk = false;
+ };
+
+ modes.inBody.startTagImage = function(name, attributes) {
+ tree.parseError('unexpected-start-tag-treated-as', {originalName: 'image', newName: 'img'});
+ this.processStartTag('img', attributes);
+ };
+
+ modes.inBody.startTagInput = function(name, attributes) {
+ var currentFramesetOk = tree.framesetOk;
+ this.startTagVoidFormatting(name, attributes);
+ for (var key in attributes) {
+ if (attributes[key].nodeName == 'type') {
+ if (attributes[key].nodeValue.toLowerCase() == 'hidden')
+ tree.framesetOk = currentFramesetOk;
+ break;
+ }
+ }
+ };
+
+ modes.inBody.startTagIsindex = function(name, attributes) {
+ tree.parseError('deprecated-tag', {name: 'isindex'});
+ tree.selfClosingFlagAcknowledged = true;
+ if (tree.form)
+ return;
+ var formAttributes = [];
+ var inputAttributes = [];
+ var prompt = "This is a searchable index. Enter search keywords: ";
+ for (var key in attributes) {
+ switch (attributes[key].nodeName) {
+ case 'action':
+ formAttributes.push({nodeName: 'action',
+ nodeValue: attributes[key].nodeValue});
+ break;
+ case 'prompt':
+ prompt = attributes[key].nodeValue;
+ break;
+ case 'name':
+ break;
+ default:
+ inputAttributes.push({nodeName: attributes[key].nodeName,
+ nodeValue: attributes[key].nodeValue});
+ }
+ }
+ inputAttributes.push({nodeName: 'name', nodeValue: 'isindex'});
+ this.processStartTag('form', formAttributes);
+ this.processStartTag('hr');
+ this.processStartTag('label');
+ this.processCharacters(new CharacterBuffer(prompt));
+ this.processStartTag('input', inputAttributes);
+ this.processEndTag('label');
+ this.processStartTag('hr');
+ this.processEndTag('form');
+ };
+
+ modes.inBody.startTagTextarea = function(name, attributes) {
+ tree.insertElement(name, attributes);
+ tree.tokenizer.setState(Tokenizer.RCDATA);
+ tree.originalInsertionMode = tree.insertionModeName;
+ tree.shouldSkipLeadingNewline = true;
+ tree.framesetOk = false;
+ tree.setInsertionMode('text');
+ };
+
+ modes.inBody.startTagIFrame = function(name, attributes) {
+ tree.framesetOk = false;
+ this.startTagRawText(name, attributes);
+ };
+
+ modes.inBody.startTagRawText = function(name, attributes) {
+ tree.processGenericRawTextStartTag(name, attributes);
+ };
+
+ modes.inBody.startTagSelect = function(name, attributes) {
+ tree.reconstructActiveFormattingElements();
+ tree.insertElement(name, attributes);
+ tree.framesetOk = false;
+ var insertionModeName = tree.insertionModeName;
+ if (insertionModeName == 'inTable' ||
+ insertionModeName == 'inCaption' ||
+ insertionModeName == 'inColumnGroup' ||
+ insertionModeName == 'inTableBody' ||
+ insertionModeName == 'inRow' ||
+ insertionModeName == 'inCell') {
+ tree.setInsertionMode('inSelectInTable');
+ } else {
+ tree.setInsertionMode('inSelect');
+ }
+ };
+
+ modes.inBody.startTagMisplaced = function(name, attributes) {
+ tree.parseError('unexpected-start-tag-ignored', {name: name});
+ };
+
+ modes.inBody.endTagMisplaced = function(name) {
+ tree.parseError("unexpected-end-tag", {name: name});
+ };
+
+ modes.inBody.endTagBr = function(name) {
+ tree.parseError("unexpected-end-tag-treated-as", {originalName: "br", newName: "br element"});
+ tree.reconstructActiveFormattingElements();
+ tree.insertElement(name, []);
+ tree.popElement();
+ };
+
+ modes.inBody.startTagOptionOptgroup = function(name, attributes) {
+ if (tree.currentStackItem().localName == 'option')
+ tree.popElement();
+ tree.reconstructActiveFormattingElements();
+ tree.insertElement(name, attributes);
+ };
+
+ modes.inBody.startTagOther = function(name, attributes) {
+ tree.reconstructActiveFormattingElements();
+ tree.insertElement(name, attributes);
+ };
+
+ modes.inBody.endTagOther = function(name) {
+ var node;
+ for (var i = tree.openElements.length - 1; i > 0; i--) {
+ node = tree.openElements.item(i);
+ if (node.localName == name) {
+ tree.generateImpliedEndTags(name);
+ if (tree.currentStackItem().localName != name)
+ tree.parseError('unexpected-end-tag', {name: name});
+ tree.openElements.remove_openElements_until(function(x) {return x === node;});
+ break;
+ }
+ if (node.isSpecial()) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ break;
+ }
+ }
+ };
+
+ modes.inBody.startTagMath = function(name, attributes, selfClosing) {
+ tree.reconstructActiveFormattingElements();
+ attributes = tree.adjustMathMLAttributes(attributes);
+ attributes = tree.adjustForeignAttributes(attributes);
+ tree.insertForeignElement(name, attributes, "http://www.w3.org/1998/Math/MathML", selfClosing);
+ };
+
+ modes.inBody.startTagSVG = function(name, attributes, selfClosing) {
+ tree.reconstructActiveFormattingElements();
+ attributes = tree.adjustSVGAttributes(attributes);
+ attributes = tree.adjustForeignAttributes(attributes);
+ tree.insertForeignElement(name, attributes, "http://www.w3.org/2000/svg", selfClosing);
+ };
+
+ modes.inBody.endTagP = function(name) {
+ if (!tree.openElements.inButtonScope('p')) {
+ tree.parseError('unexpected-end-tag', {name: 'p'});
+ this.startTagCloseP('p', []);
+ this.endTagP('p');
+ } else {
+ tree.generateImpliedEndTags('p');
+ if (tree.currentStackItem().localName != 'p')
+ tree.parseError('unexpected-implied-end-tag', {name: 'p'});
+ tree.openElements.popUntilPopped(name);
+ }
+ };
+
+ modes.inBody.endTagBody = function(name) {
+ if (!tree.openElements.inScope('body')) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ return;
+ }
+ if (tree.currentStackItem().localName != 'body') {
+ tree.parseError('expected-one-end-tag-but-got-another', {
+ expectedName: tree.currentStackItem().localName,
+ gotName: name
+ });
+ }
+ tree.setInsertionMode('afterBody');
+ };
+
+ modes.inBody.endTagHtml = function(name) {
+ if (!tree.openElements.inScope('body')) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ return;
+ }
+ if (tree.currentStackItem().localName != 'body') {
+ tree.parseError('expected-one-end-tag-but-got-another', {
+ expectedName: tree.currentStackItem().localName,
+ gotName: name
+ });
+ }
+ tree.setInsertionMode('afterBody');
+ tree.insertionMode.processEndTag(name);
+ };
+
+ modes.inBody.endTagBlock = function(name) {
+ if (!tree.openElements.inScope(name)) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ } else {
+ tree.generateImpliedEndTags();
+ if (tree.currentStackItem().localName != name) {
+ tree.parseError('end-tag-too-early', {name: name});
+ }
+ tree.openElements.popUntilPopped(name);
+ }
+ };
+
+ modes.inBody.endTagForm = function(name) {
+ var node = tree.form;
+ tree.form = null;
+ if (!node || !tree.openElements.inScope(name)) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ } else {
+ tree.generateImpliedEndTags();
+ if (tree.currentStackItem() != node) {
+ tree.parseError('end-tag-too-early-ignored', {name: 'form'});
+ }
+ tree.openElements.remove(node);
+ }
+ };
+
+ modes.inBody.endTagListItem = function(name) {
+ if (!tree.openElements.inListItemScope(name)) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ } else {
+ tree.generateImpliedEndTags(name);
+ if (tree.currentStackItem().localName != name)
+ tree.parseError('end-tag-too-early', {name: name});
+ tree.openElements.popUntilPopped(name);
+ }
+ };
+
+ modes.inBody.endTagHeading = function(name) {
+ if (!tree.openElements.hasNumberedHeaderElementInScope()) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ return;
+ }
+ tree.generateImpliedEndTags();
+ if (tree.currentStackItem().localName != name)
+ tree.parseError('end-tag-too-early', {name: name});
+
+ tree.openElements.remove_openElements_until(function(e) {
+ return e.isNumberedHeader();
+ });
+ };
+
+ modes.inBody.endTagFormatting = function(name, attributes) {
+ if (!tree.adoptionAgencyEndTag(name))
+ this.endTagOther(name, attributes);
+ };
+
+ modes.inCaption = Object.create(modes.base);
+
+ modes.inCaption.start_tag_handlers = {
+ html: 'startTagHtml',
+ caption: 'startTagTableElement',
+ col: 'startTagTableElement',
+ colgroup: 'startTagTableElement',
+ tbody: 'startTagTableElement',
+ td: 'startTagTableElement',
+ tfoot: 'startTagTableElement',
+ thead: 'startTagTableElement',
+ tr: 'startTagTableElement',
+ '-default': 'startTagOther'
+ };
+
+ modes.inCaption.end_tag_handlers = {
+ caption: 'endTagCaption',
+ table: 'endTagTable',
+ body: 'endTagIgnore',
+ col: 'endTagIgnore',
+ colgroup: 'endTagIgnore',
+ html: 'endTagIgnore',
+ tbody: 'endTagIgnore',
+ td: 'endTagIgnore',
+ tfood: 'endTagIgnore',
+ thead: 'endTagIgnore',
+ tr: 'endTagIgnore',
+ '-default': 'endTagOther'
+ };
+
+ modes.inCaption.processCharacters = function(data) {
+ modes.inBody.processCharacters(data);
+ };
+
+ modes.inCaption.startTagTableElement = function(name, attributes) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ var ignoreEndTag = !tree.openElements.inTableScope('caption');
+ tree.insertionMode.processEndTag('caption');
+ if (!ignoreEndTag) tree.insertionMode.processStartTag(name, attributes);
+ };
+
+ modes.inCaption.startTagOther = function(name, attributes, selfClosing) {
+ modes.inBody.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.inCaption.endTagCaption = function(name) {
+ if (!tree.openElements.inTableScope('caption')) {
+ assert.ok(tree.context);
+ tree.parseError('unexpected-end-tag', {name: name});
+ } else {
+ tree.generateImpliedEndTags();
+ if (tree.currentStackItem().localName != 'caption') {
+ tree.parseError('expected-one-end-tag-but-got-another', {
+ gotName: "caption",
+ expectedName: tree.currentStackItem().localName
+ });
+ }
+ tree.openElements.popUntilPopped('caption');
+ tree.clearActiveFormattingElements();
+ tree.setInsertionMode('inTable');
+ }
+ };
+
+ modes.inCaption.endTagTable = function(name) {
+ tree.parseError("unexpected-end-table-in-caption");
+ var ignoreEndTag = !tree.openElements.inTableScope('caption');
+ tree.insertionMode.processEndTag('caption');
+ if (!ignoreEndTag) tree.insertionMode.processEndTag(name);
+ };
+
+ modes.inCaption.endTagIgnore = function(name) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ };
+
+ modes.inCaption.endTagOther = function(name) {
+ modes.inBody.processEndTag(name);
+ };
+
+ modes.inCell = Object.create(modes.base);
+
+ modes.inCell.start_tag_handlers = {
+ html: 'startTagHtml',
+ caption: 'startTagTableOther',
+ col: 'startTagTableOther',
+ colgroup: 'startTagTableOther',
+ tbody: 'startTagTableOther',
+ td: 'startTagTableOther',
+ tfoot: 'startTagTableOther',
+ th: 'startTagTableOther',
+ thead: 'startTagTableOther',
+ tr: 'startTagTableOther',
+ '-default': 'startTagOther'
+ };
+
+ modes.inCell.end_tag_handlers = {
+ td: 'endTagTableCell',
+ th: 'endTagTableCell',
+ body: 'endTagIgnore',
+ caption: 'endTagIgnore',
+ col: 'endTagIgnore',
+ colgroup: 'endTagIgnore',
+ html: 'endTagIgnore',
+ table: 'endTagImply',
+ tbody: 'endTagImply',
+ tfoot: 'endTagImply',
+ thead: 'endTagImply',
+ tr: 'endTagImply',
+ '-default': 'endTagOther'
+ };
+
+ modes.inCell.processCharacters = function(data) {
+ modes.inBody.processCharacters(data);
+ };
+
+ modes.inCell.startTagTableOther = function(name, attributes, selfClosing) {
+ if (tree.openElements.inTableScope('td') || tree.openElements.inTableScope('th')) {
+ this.closeCell();
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ } else {
+ tree.parseError('unexpected-start-tag', {name: name});
+ }
+ };
+
+ modes.inCell.startTagOther = function(name, attributes, selfClosing) {
+ modes.inBody.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.inCell.endTagTableCell = function(name) {
+ if (tree.openElements.inTableScope(name)) {
+ tree.generateImpliedEndTags(name);
+ if (tree.currentStackItem().localName != name.toLowerCase()) {
+ tree.parseError('unexpected-cell-end-tag', {name: name});
+ tree.openElements.popUntilPopped(name);
+ } else {
+ tree.popElement();
+ }
+ tree.clearActiveFormattingElements();
+ tree.setInsertionMode('inRow');
+ } else {
+ tree.parseError('unexpected-end-tag', {name: name});
+ }
+ };
+
+ modes.inCell.endTagIgnore = function(name) {
+ tree.parseError('unexpected-end-tag', {name: name});
+ };
+
+ modes.inCell.endTagImply = function(name) {
+ if (tree.openElements.inTableScope(name)) {
+ this.closeCell();
+ tree.insertionMode.processEndTag(name);
+ } else {
+ tree.parseError('unexpected-end-tag', {name: name});
+ }
+ };
+
+ modes.inCell.endTagOther = function(name) {
+ modes.inBody.processEndTag(name);
+ };
+
+ modes.inCell.closeCell = function() {
+ if (tree.openElements.inTableScope('td')) {
+ this.endTagTableCell('td');
+ } else if (tree.openElements.inTableScope('th')) {
+ this.endTagTableCell('th');
+ }
+ };
+
+
+ modes.inColumnGroup = Object.create(modes.base);
+
+ modes.inColumnGroup.start_tag_handlers = {
+ html: 'startTagHtml',
+ col: 'startTagCol',
+ '-default': 'startTagOther'
+ };
+
+ modes.inColumnGroup.end_tag_handlers = {
+ colgroup: 'endTagColgroup',
+ col: 'endTagCol',
+ '-default': 'endTagOther'
+ };
+
+ modes.inColumnGroup.ignoreEndTagColgroup = function() {
+ return tree.currentStackItem().localName == 'html';
+ };
+
+ modes.inColumnGroup.processCharacters = function(buffer) {
+ var leadingWhitespace = buffer.takeLeadingWhitespace();
+ if (leadingWhitespace)
+ tree.insertText(leadingWhitespace);
+ if (!buffer.length)
+ return;
+ var ignoreEndTag = this.ignoreEndTagColgroup();
+ this.endTagColgroup('colgroup');
+ if (!ignoreEndTag) tree.insertionMode.processCharacters(buffer);
+ };
+
+ modes.inColumnGroup.startTagCol = function(name, attributes) {
+ tree.insertSelfClosingElement(name, attributes);
+ };
+
+ modes.inColumnGroup.startTagOther = function(name, attributes, selfClosing) {
+ var ignoreEndTag = this.ignoreEndTagColgroup();
+ this.endTagColgroup('colgroup');
+ if (!ignoreEndTag) tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.inColumnGroup.endTagColgroup = function(name) {
+ if (this.ignoreEndTagColgroup()) {
+ assert.ok(tree.context);
+ tree.parseError('unexpected-end-tag', {name: name});
+ } else {
+ tree.popElement();
+ tree.setInsertionMode('inTable');
+ }
+ };
+
+ modes.inColumnGroup.endTagCol = function(name) {
+ tree.parseError("no-end-tag", {name: 'col'});
+ };
+
+ modes.inColumnGroup.endTagOther = function(name) {
+ var ignoreEndTag = this.ignoreEndTagColgroup();
+ this.endTagColgroup('colgroup');
+ if (!ignoreEndTag) tree.insertionMode.processEndTag(name) ;
+ };
+
+ modes.inForeignContent = Object.create(modes.base);
+
+ modes.inForeignContent.processStartTag = function(name, attributes, selfClosing) {
+ if (['b', 'big', 'blockquote', 'body', 'br', 'center', 'code', 'dd', 'div', 'dl', 'dt', 'em', 'embed', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'i', 'img', 'li', 'listing', 'menu', 'meta', 'nobr', 'ol', 'p', 'pre', 'ruby', 's', 'small', 'span', 'strong', 'strike', 'sub', 'sup', 'table', 'tt', 'u', 'ul', 'var'].indexOf(name) != -1
+ || (name == 'font' && attributes.some(function(attr){ return ['color', 'face', 'size'].indexOf(attr.nodeName) >= 0 }))) {
+ tree.parseError('unexpected-html-element-in-foreign-content', {name: name});
+ while (tree.currentStackItem().isForeign()
+ && !tree.currentStackItem().isHtmlIntegrationPoint()
+ && !tree.currentStackItem().isMathMLTextIntegrationPoint()) {
+ tree.openElements.pop();
+ }
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ return;
+ }
+ if (tree.currentStackItem().namespaceURI == "http://www.w3.org/1998/Math/MathML") {
+ attributes = tree.adjustMathMLAttributes(attributes);
+ }
+ if (tree.currentStackItem().namespaceURI == "http://www.w3.org/2000/svg") {
+ name = tree.adjustSVGTagNameCase(name);
+ attributes = tree.adjustSVGAttributes(attributes);
+ }
+ attributes = tree.adjustForeignAttributes(attributes);
+ tree.insertForeignElement(name, attributes, tree.currentStackItem().namespaceURI, selfClosing);
+ };
+
+ modes.inForeignContent.processEndTag = function(name) {
+ var node = tree.currentStackItem();
+ var index = tree.openElements.length - 1;
+ if (node.localName.toLowerCase() != name)
+ tree.parseError("unexpected-end-tag", {name: name});
+
+ while (true) {
+ if (index === 0)
+ break;
+ if (node.localName.toLowerCase() == name) {
+ while (tree.openElements.pop() != node);
+ break;
+ }
+ index -= 1;
+ node = tree.openElements.item(index);
+ if (node.isForeign()) {
+ continue;
+ } else {
+ tree.insertionMode.processEndTag(name);
+ break;
+ }
+ }
+ };
+
+ modes.inForeignContent.processCharacters = function(buffer) {
+ var characters = buffer.takeRemaining();
+ characters = characters.replace(/\u0000/g, function(match, index){
+ tree.parseError('invalid-codepoint');
+ return '\uFFFD';
+ });
+ if (tree.framesetOk && !isAllWhitespaceOrReplacementCharacters(characters))
+ tree.framesetOk = false;
+ tree.insertText(characters);
+ };
+
+ modes.inHeadNoscript = Object.create(modes.base);
+
+ modes.inHeadNoscript.start_tag_handlers = {
+ html: 'startTagHtml',
+ basefont: 'startTagBasefontBgsoundLinkMetaNoframesStyle',
+ bgsound: 'startTagBasefontBgsoundLinkMetaNoframesStyle',
+ link: 'startTagBasefontBgsoundLinkMetaNoframesStyle',
+ meta: 'startTagBasefontBgsoundLinkMetaNoframesStyle',
+ noframes: 'startTagBasefontBgsoundLinkMetaNoframesStyle',
+ style: 'startTagBasefontBgsoundLinkMetaNoframesStyle',
+ head: 'startTagHeadNoscript',
+ noscript: 'startTagHeadNoscript',
+ "-default": 'startTagOther'
+ };
+
+ modes.inHeadNoscript.end_tag_handlers = {
+ noscript: 'endTagNoscript',
+ br: 'endTagBr',
+ '-default': 'endTagOther'
+ };
+
+ modes.inHeadNoscript.processCharacters = function(buffer) {
+ var leadingWhitespace = buffer.takeLeadingWhitespace();
+ if (leadingWhitespace)
+ tree.insertText(leadingWhitespace);
+ if (!buffer.length)
+ return;
+ tree.parseError("unexpected-char-in-frameset");
+ this.anythingElse();
+ tree.insertionMode.processCharacters(buffer);
+ };
+
+ modes.inHeadNoscript.processComment = function(data) {
+ modes.inHead.processComment(data);
+ };
+
+ modes.inHeadNoscript.startTagBasefontBgsoundLinkMetaNoframesStyle = function(name, attributes) {
+ modes.inHead.processStartTag(name, attributes);
+ };
+
+ modes.inHeadNoscript.startTagHeadNoscript = function(name, attributes) {
+ tree.parseError("unexpected-start-tag-in-frameset", {name: name});
+ };
+
+ modes.inHeadNoscript.startTagOther = function(name, attributes) {
+ tree.parseError("unexpected-start-tag-in-frameset", {name: name});
+ this.anythingElse();
+ tree.insertionMode.processStartTag(name, attributes);
+ };
+
+ modes.inHeadNoscript.endTagBr = function(name, attributes) {
+ tree.parseError("unexpected-end-tag-in-frameset", {name: name});
+ this.anythingElse();
+ tree.insertionMode.processEndTag(name, attributes);
+ };
+
+ modes.inHeadNoscript.endTagNoscript = function(name, attributes) {
+ tree.popElement();
+ tree.setInsertionMode('inHead');
+ };
+
+ modes.inHeadNoscript.endTagOther = function(name, attributes) {
+ tree.parseError("unexpected-end-tag-in-frameset", {name: name});
+ };
+
+ modes.inHeadNoscript.anythingElse = function() {
+ tree.popElement();
+ tree.setInsertionMode('inHead');
+ };
+
+
+ modes.inFrameset = Object.create(modes.base);
+
+ modes.inFrameset.start_tag_handlers = {
+ html: 'startTagHtml',
+ frameset: 'startTagFrameset',
+ frame: 'startTagFrame',
+ noframes: 'startTagNoframes',
+ "-default": 'startTagOther'
+ };
+
+ modes.inFrameset.end_tag_handlers = {
+ frameset: 'endTagFrameset',
+ noframes: 'endTagNoframes',
+ '-default': 'endTagOther'
+ };
+
+ modes.inFrameset.processCharacters = function(data) {
+ tree.parseError("unexpected-char-in-frameset");
+ };
+
+ modes.inFrameset.startTagFrameset = function(name, attributes) {
+ tree.insertElement(name, attributes);
+ };
+
+ modes.inFrameset.startTagFrame = function(name, attributes) {
+ tree.insertSelfClosingElement(name, attributes);
+ };
+
+ modes.inFrameset.startTagNoframes = function(name, attributes) {
+ modes.inBody.processStartTag(name, attributes);
+ };
+
+ modes.inFrameset.startTagOther = function(name, attributes) {
+ tree.parseError("unexpected-start-tag-in-frameset", {name: name});
+ };
+
+ modes.inFrameset.endTagFrameset = function(name, attributes) {
+ if (tree.currentStackItem().localName == 'html') {
+ tree.parseError("unexpected-frameset-in-frameset-innerhtml");
+ } else {
+ tree.popElement();
+ }
+
+ if (!tree.context && tree.currentStackItem().localName != 'frameset') {
+ tree.setInsertionMode('afterFrameset');
+ }
+ };
+
+ modes.inFrameset.endTagNoframes = function(name) {
+ modes.inBody.processEndTag(name);
+ };
+
+ modes.inFrameset.endTagOther = function(name) {
+ tree.parseError("unexpected-end-tag-in-frameset", {name: name});
+ };
+
+ modes.inTable = Object.create(modes.base);
+
+ modes.inTable.start_tag_handlers = {
+ html: 'startTagHtml',
+ caption: 'startTagCaption',
+ colgroup: 'startTagColgroup',
+ col: 'startTagCol',
+ table: 'startTagTable',
+ tbody: 'startTagRowGroup',
+ tfoot: 'startTagRowGroup',
+ thead: 'startTagRowGroup',
+ td: 'startTagImplyTbody',
+ th: 'startTagImplyTbody',
+ tr: 'startTagImplyTbody',
+ style: 'startTagStyleScript',
+ script: 'startTagStyleScript',
+ input: 'startTagInput',
+ form: 'startTagForm',
+ '-default': 'startTagOther'
+ };
+
+ modes.inTable.end_tag_handlers = {
+ table: 'endTagTable',
+ body: 'endTagIgnore',
+ caption: 'endTagIgnore',
+ col: 'endTagIgnore',
+ colgroup: 'endTagIgnore',
+ html: 'endTagIgnore',
+ tbody: 'endTagIgnore',
+ td: 'endTagIgnore',
+ tfoot: 'endTagIgnore',
+ th: 'endTagIgnore',
+ thead: 'endTagIgnore',
+ tr: 'endTagIgnore',
+ '-default': 'endTagOther'
+ };
+
+ modes.inTable.processCharacters = function(data) {
+ if (tree.currentStackItem().isFosterParenting()) {
+ var originalInsertionMode = tree.insertionModeName;
+ tree.setInsertionMode('inTableText');
+ tree.originalInsertionMode = originalInsertionMode;
+ tree.insertionMode.processCharacters(data);
+ } else {
+ tree.redirectAttachToFosterParent = true;
+ modes.inBody.processCharacters(data);
+ tree.redirectAttachToFosterParent = false;
+ }
+ };
+
+ modes.inTable.startTagCaption = function(name, attributes) {
+ tree.openElements.popUntilTableScopeMarker();
+ tree.activeFormattingElements.push(Marker);
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inCaption');
+ };
+
+ modes.inTable.startTagColgroup = function(name, attributes) {
+ tree.openElements.popUntilTableScopeMarker();
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inColumnGroup');
+ };
+
+ modes.inTable.startTagCol = function(name, attributes) {
+ this.startTagColgroup('colgroup', []);
+ tree.insertionMode.processStartTag(name, attributes);
+ };
+
+ modes.inTable.startTagRowGroup = function(name, attributes) {
+ tree.openElements.popUntilTableScopeMarker();
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inTableBody');
+ };
+
+ modes.inTable.startTagImplyTbody = function(name, attributes) {
+ this.startTagRowGroup('tbody', []);
+ tree.insertionMode.processStartTag(name, attributes);
+ };
+
+ modes.inTable.startTagTable = function(name, attributes) {
+ tree.parseError("unexpected-start-tag-implies-end-tag",
+ {startName: "table", endName: "table"});
+ tree.insertionMode.processEndTag('table');
+ if (!tree.context) tree.insertionMode.processStartTag(name, attributes);
+ };
+
+ modes.inTable.startTagStyleScript = function(name, attributes) {
+ modes.inHead.processStartTag(name, attributes);
+ };
+
+ modes.inTable.startTagInput = function(name, attributes) {
+ for (var key in attributes) {
+ if (attributes[key].nodeName.toLowerCase() == 'type') {
+ if (attributes[key].nodeValue.toLowerCase() == 'hidden') {
+ tree.parseError("unexpected-hidden-input-in-table");
+ tree.insertElement(name, attributes);
+ tree.openElements.pop();
+ return;
+ }
+ break;
+ }
+ }
+ this.startTagOther(name, attributes);
+ };
+
+ modes.inTable.startTagForm = function(name, attributes) {
+ tree.parseError("unexpected-form-in-table");
+ if (!tree.form) {
+ tree.insertElement(name, attributes);
+ tree.form = tree.currentStackItem();
+ tree.openElements.pop();
+ }
+ };
+
+ modes.inTable.startTagOther = function(name, attributes, selfClosing) {
+ tree.parseError("unexpected-start-tag-implies-table-voodoo", {name: name});
+ tree.redirectAttachToFosterParent = true;
+ modes.inBody.processStartTag(name, attributes, selfClosing);
+ tree.redirectAttachToFosterParent = false;
+ };
+
+ modes.inTable.endTagTable = function(name) {
+ if (tree.openElements.inTableScope(name)) {
+ tree.generateImpliedEndTags();
+ if (tree.currentStackItem().localName != name) {
+ tree.parseError("end-tag-too-early-named", {gotName: 'table', expectedName: tree.currentStackItem().localName});
+ }
+
+ tree.openElements.popUntilPopped('table');
+ tree.resetInsertionMode();
+ } else {
+ assert.ok(tree.context);
+ tree.parseError('unexpected-end-tag', {name: name});
+ }
+ };
+
+ modes.inTable.endTagIgnore = function(name) {
+ tree.parseError("unexpected-end-tag", {name: name});
+ };
+
+ modes.inTable.endTagOther = function(name) {
+ tree.parseError("unexpected-end-tag-implies-table-voodoo", {name: name});
+ tree.redirectAttachToFosterParent = true;
+ modes.inBody.processEndTag(name);
+ tree.redirectAttachToFosterParent = false;
+ };
+
+ modes.inTableText = Object.create(modes.base);
+
+ modes.inTableText.flushCharacters = function() {
+ var characters = tree.pendingTableCharacters.join('');
+ if (!isAllWhitespace(characters)) {
+ tree.redirectAttachToFosterParent = true;
+ tree.reconstructActiveFormattingElements();
+ tree.insertText(characters);
+ tree.framesetOk = false;
+ tree.redirectAttachToFosterParent = false;
+ } else {
+ tree.insertText(characters);
+ }
+ tree.pendingTableCharacters = [];
+ };
+
+ modes.inTableText.processComment = function(data) {
+ this.flushCharacters();
+ tree.setInsertionMode(tree.originalInsertionMode);
+ tree.insertionMode.processComment(data);
+ };
+
+ modes.inTableText.processEOF = function(data) {
+ this.flushCharacters();
+ tree.setInsertionMode(tree.originalInsertionMode);
+ tree.insertionMode.processEOF();
+ };
+
+ modes.inTableText.processCharacters = function(buffer) {
+ var characters = buffer.takeRemaining();
+ characters = characters.replace(/\u0000/g, function(match, index){
+ tree.parseError("invalid-codepoint");
+ return '';
+ });
+ if (!characters)
+ return;
+ tree.pendingTableCharacters.push(characters);
+ };
+
+ modes.inTableText.processStartTag = function(name, attributes, selfClosing) {
+ this.flushCharacters();
+ tree.setInsertionMode(tree.originalInsertionMode);
+ tree.insertionMode.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.inTableText.processEndTag = function(name, attributes) {
+ this.flushCharacters();
+ tree.setInsertionMode(tree.originalInsertionMode);
+ tree.insertionMode.processEndTag(name, attributes);
+ };
+
+ modes.inTableBody = Object.create(modes.base);
+
+ modes.inTableBody.start_tag_handlers = {
+ html: 'startTagHtml',
+ tr: 'startTagTr',
+ td: 'startTagTableCell',
+ th: 'startTagTableCell',
+ caption: 'startTagTableOther',
+ col: 'startTagTableOther',
+ colgroup: 'startTagTableOther',
+ tbody: 'startTagTableOther',
+ tfoot: 'startTagTableOther',
+ thead: 'startTagTableOther',
+ '-default': 'startTagOther'
+ };
+
+ modes.inTableBody.end_tag_handlers = {
+ table: 'endTagTable',
+ tbody: 'endTagTableRowGroup',
+ tfoot: 'endTagTableRowGroup',
+ thead: 'endTagTableRowGroup',
+ body: 'endTagIgnore',
+ caption: 'endTagIgnore',
+ col: 'endTagIgnore',
+ colgroup: 'endTagIgnore',
+ html: 'endTagIgnore',
+ td: 'endTagIgnore',
+ th: 'endTagIgnore',
+ tr: 'endTagIgnore',
+ '-default': 'endTagOther'
+ };
+
+ modes.inTableBody.processCharacters = function(data) {
+ modes.inTable.processCharacters(data);
+ };
+
+ modes.inTableBody.startTagTr = function(name, attributes) {
+ tree.openElements.popUntilTableBodyScopeMarker();
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inRow');
+ };
+
+ modes.inTableBody.startTagTableCell = function(name, attributes) {
+ tree.parseError("unexpected-cell-in-table-body", {name: name});
+ this.startTagTr('tr', []);
+ tree.insertionMode.processStartTag(name, attributes);
+ };
+
+ modes.inTableBody.startTagTableOther = function(name, attributes) {
+ if (tree.openElements.inTableScope('tbody') || tree.openElements.inTableScope('thead') || tree.openElements.inTableScope('tfoot')) {
+ tree.openElements.popUntilTableBodyScopeMarker();
+ this.endTagTableRowGroup(tree.currentStackItem().localName);
+ tree.insertionMode.processStartTag(name, attributes);
+ } else {
+ tree.parseError('unexpected-start-tag', {name: name});
+ }
+ };
+
+ modes.inTableBody.startTagOther = function(name, attributes) {
+ modes.inTable.processStartTag(name, attributes);
+ };
+
+ modes.inTableBody.endTagTableRowGroup = function(name) {
+ if (tree.openElements.inTableScope(name)) {
+ tree.openElements.popUntilTableBodyScopeMarker();
+ tree.popElement();
+ tree.setInsertionMode('inTable');
+ } else {
+ tree.parseError('unexpected-end-tag-in-table-body', {name: name});
+ }
+ };
+
+ modes.inTableBody.endTagTable = function(name) {
+ if (tree.openElements.inTableScope('tbody') || tree.openElements.inTableScope('thead') || tree.openElements.inTableScope('tfoot')) {
+ tree.openElements.popUntilTableBodyScopeMarker();
+ this.endTagTableRowGroup(tree.currentStackItem().localName);
+ tree.insertionMode.processEndTag(name);
+ } else {
+ tree.parseError('unexpected-end-tag', {name: name});
+ }
+ };
+
+ modes.inTableBody.endTagIgnore = function(name) {
+ tree.parseError("unexpected-end-tag-in-table-body", {name: name});
+ };
+
+ modes.inTableBody.endTagOther = function(name) {
+ modes.inTable.processEndTag(name);
+ };
+
+ modes.inSelect = Object.create(modes.base);
+
+ modes.inSelect.start_tag_handlers = {
+ html: 'startTagHtml',
+ option: 'startTagOption',
+ optgroup: 'startTagOptgroup',
+ select: 'startTagSelect',
+ input: 'startTagInput',
+ keygen: 'startTagInput',
+ textarea: 'startTagInput',
+ script: 'startTagScript',
+ '-default': 'startTagOther'
+ };
+
+ modes.inSelect.end_tag_handlers = {
+ option: 'endTagOption',
+ optgroup: 'endTagOptgroup',
+ select: 'endTagSelect',
+ caption: 'endTagTableElements',
+ table: 'endTagTableElements',
+ tbody: 'endTagTableElements',
+ tfoot: 'endTagTableElements',
+ thead: 'endTagTableElements',
+ tr: 'endTagTableElements',
+ td: 'endTagTableElements',
+ th: 'endTagTableElements',
+ '-default': 'endTagOther'
+ };
+
+ modes.inSelect.processCharacters = function(buffer) {
+ var data = buffer.takeRemaining();
+ data = data.replace(/\u0000/g, function(match, index){
+ tree.parseError("invalid-codepoint");
+ return '';
+ });
+ if (!data)
+ return;
+ tree.insertText(data);
+ };
+
+ modes.inSelect.startTagOption = function(name, attributes) {
+ if (tree.currentStackItem().localName == 'option')
+ tree.popElement();
+ tree.insertElement(name, attributes);
+ };
+
+ modes.inSelect.startTagOptgroup = function(name, attributes) {
+ if (tree.currentStackItem().localName == 'option')
+ tree.popElement();
+ if (tree.currentStackItem().localName == 'optgroup')
+ tree.popElement();
+ tree.insertElement(name, attributes);
+ };
+
+ modes.inSelect.endTagOption = function(name) {
+ if (tree.currentStackItem().localName !== 'option') {
+ tree.parseError('unexpected-end-tag-in-select', {name: name});
+ return;
+ }
+ tree.popElement();
+ };
+
+ modes.inSelect.endTagOptgroup = function(name) {
+ if (tree.currentStackItem().localName == 'option' && tree.openElements.item(tree.openElements.length - 2).localName == 'optgroup') {
+ tree.popElement();
+ }
+ if (tree.currentStackItem().localName == 'optgroup') {
+ tree.popElement();
+ } else {
+ tree.parseError('unexpected-end-tag-in-select', {name: 'optgroup'});
+ }
+ };
+
+ modes.inSelect.startTagSelect = function(name) {
+ tree.parseError("unexpected-select-in-select");
+ this.endTagSelect('select');
+ };
+
+ modes.inSelect.endTagSelect = function(name) {
+ if (tree.openElements.inTableScope('select')) {
+ tree.openElements.popUntilPopped('select');
+ tree.resetInsertionMode();
+ } else {
+ tree.parseError('unexpected-end-tag', {name: name});
+ }
+ };
+
+ modes.inSelect.startTagInput = function(name, attributes) {
+ tree.parseError("unexpected-input-in-select");
+ if (tree.openElements.inSelectScope('select')) {
+ this.endTagSelect('select');
+ tree.insertionMode.processStartTag(name, attributes);
+ }
+ };
+
+ modes.inSelect.startTagScript = function(name, attributes) {
+ modes.inHead.processStartTag(name, attributes);
+ };
+
+ modes.inSelect.endTagTableElements = function(name) {
+ tree.parseError('unexpected-end-tag-in-select', {name: name});
+ if (tree.openElements.inTableScope(name)) {
+ this.endTagSelect('select');
+ tree.insertionMode.processEndTag(name);
+ }
+ };
+
+ modes.inSelect.startTagOther = function(name, attributes) {
+ tree.parseError("unexpected-start-tag-in-select", {name: name});
+ };
+
+ modes.inSelect.endTagOther = function(name) {
+ tree.parseError('unexpected-end-tag-in-select', {name: name});
+ };
+
+ modes.inSelectInTable = Object.create(modes.base);
+
+ modes.inSelectInTable.start_tag_handlers = {
+ caption: 'startTagTable',
+ table: 'startTagTable',
+ tbody: 'startTagTable',
+ tfoot: 'startTagTable',
+ thead: 'startTagTable',
+ tr: 'startTagTable',
+ td: 'startTagTable',
+ th: 'startTagTable',
+ '-default': 'startTagOther'
+ };
+
+ modes.inSelectInTable.end_tag_handlers = {
+ caption: 'endTagTable',
+ table: 'endTagTable',
+ tbody: 'endTagTable',
+ tfoot: 'endTagTable',
+ thead: 'endTagTable',
+ tr: 'endTagTable',
+ td: 'endTagTable',
+ th: 'endTagTable',
+ '-default': 'endTagOther'
+ };
+
+ modes.inSelectInTable.processCharacters = function(data) {
+ modes.inSelect.processCharacters(data);
+ };
+
+ modes.inSelectInTable.startTagTable = function(name, attributes) {
+ tree.parseError("unexpected-table-element-start-tag-in-select-in-table", {name: name});
+ this.endTagOther("select");
+ tree.insertionMode.processStartTag(name, attributes);
+ };
+
+ modes.inSelectInTable.startTagOther = function(name, attributes, selfClosing) {
+ modes.inSelect.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.inSelectInTable.endTagTable = function(name) {
+ tree.parseError("unexpected-table-element-end-tag-in-select-in-table", {name: name});
+ if (tree.openElements.inTableScope(name)) {
+ this.endTagOther("select");
+ tree.insertionMode.processEndTag(name);
+ }
+ };
+
+ modes.inSelectInTable.endTagOther = function(name) {
+ modes.inSelect.processEndTag(name);
+ };
+
+ modes.inRow = Object.create(modes.base);
+
+ modes.inRow.start_tag_handlers = {
+ html: 'startTagHtml',
+ td: 'startTagTableCell',
+ th: 'startTagTableCell',
+ caption: 'startTagTableOther',
+ col: 'startTagTableOther',
+ colgroup: 'startTagTableOther',
+ tbody: 'startTagTableOther',
+ tfoot: 'startTagTableOther',
+ thead: 'startTagTableOther',
+ tr: 'startTagTableOther',
+ '-default': 'startTagOther'
+ };
+
+ modes.inRow.end_tag_handlers = {
+ tr: 'endTagTr',
+ table: 'endTagTable',
+ tbody: 'endTagTableRowGroup',
+ tfoot: 'endTagTableRowGroup',
+ thead: 'endTagTableRowGroup',
+ body: 'endTagIgnore',
+ caption: 'endTagIgnore',
+ col: 'endTagIgnore',
+ colgroup: 'endTagIgnore',
+ html: 'endTagIgnore',
+ td: 'endTagIgnore',
+ th: 'endTagIgnore',
+ '-default': 'endTagOther'
+ };
+
+ modes.inRow.processCharacters = function(data) {
+ modes.inTable.processCharacters(data);
+ };
+
+ modes.inRow.startTagTableCell = function(name, attributes) {
+ tree.openElements.popUntilTableRowScopeMarker();
+ tree.insertElement(name, attributes);
+ tree.setInsertionMode('inCell');
+ tree.activeFormattingElements.push(Marker);
+ };
+
+ modes.inRow.startTagTableOther = function(name, attributes) {
+ var ignoreEndTag = this.ignoreEndTagTr();
+ this.endTagTr('tr');
+ if (!ignoreEndTag) tree.insertionMode.processStartTag(name, attributes);
+ };
+
+ modes.inRow.startTagOther = function(name, attributes, selfClosing) {
+ modes.inTable.processStartTag(name, attributes, selfClosing);
+ };
+
+ modes.inRow.endTagTr = function(name) {
+ if (this.ignoreEndTagTr()) {
+ assert.ok(tree.context);
+ tree.parseError('unexpected-end-tag', {name: name});
+ } else {
+ tree.openElements.popUntilTableRowScopeMarker();
+ tree.popElement();
+ tree.setInsertionMode('inTableBody');
+ }
+ };
+
+ modes.inRow.endTagTable = function(name) {
+ var ignoreEndTag = this.ignoreEndTagTr();
+ this.endTagTr('tr');
+ if (!ignoreEndTag) tree.insertionMode.processEndTag(name);
+ };
+
+ modes.inRow.endTagTableRowGroup = function(name) {
+ if (tree.openElements.inTableScope(name)) {
+ this.endTagTr('tr');
+ tree.insertionMode.processEndTag(name);
+ } else {
+ tree.parseError('unexpected-end-tag', {name: name});
+ }
+ };
+
+ modes.inRow.endTagIgnore = function(name) {
+ tree.parseError("unexpected-end-tag-in-table-row", {name: name});
+ };
+
+ modes.inRow.endTagOther = function(name) {
+ modes.inTable.processEndTag(name);
+ };
+
+ modes.inRow.ignoreEndTagTr = function() {
+ return !tree.openElements.inTableScope('tr');
+ };
+
+ modes.afterAfterFrameset = Object.create(modes.base);
+
+ modes.afterAfterFrameset.start_tag_handlers = {
+ html: 'startTagHtml',
+ noframes: 'startTagNoFrames',
+ '-default': 'startTagOther'
+ };
+
+ modes.afterAfterFrameset.processEOF = function() {};
+
+ modes.afterAfterFrameset.processComment = function(data) {
+ tree.insertComment(data, tree.document);
+ };
+
+ modes.afterAfterFrameset.processCharacters = function(buffer) {
+ var characters = buffer.takeRemaining();
+ var whitespace = "";
+ for (var i = 0; i < characters.length; i++) {
+ var ch = characters[i];
+ if (isWhitespace(ch))
+ whitespace += ch;
+ }
+ if (whitespace) {
+ tree.reconstructActiveFormattingElements();
+ tree.insertText(whitespace);
+ }
+ if (whitespace.length < characters.length)
+ tree.parseError('expected-eof-but-got-char');
+ };
+
+ modes.afterAfterFrameset.startTagNoFrames = function(name, attributes) {
+ modes.inHead.processStartTag(name, attributes);
+ };
+
+ modes.afterAfterFrameset.startTagOther = function(name, attributes, selfClosing) {
+ tree.parseError('expected-eof-but-got-start-tag', {name: name});
+ };
+
+ modes.afterAfterFrameset.processEndTag = function(name, attributes) {
+ tree.parseError('expected-eof-but-got-end-tag', {name: name});
+ };
+
+ modes.text = Object.create(modes.base);
+
+ modes.text.start_tag_handlers = {
+ '-default': 'startTagOther'
+ };
+
+ modes.text.end_tag_handlers = {
+ script: 'endTagScript',
+ '-default': 'endTagOther'
+ };
+
+ modes.text.processCharacters = function(buffer) {
+ if (tree.shouldSkipLeadingNewline) {
+ tree.shouldSkipLeadingNewline = false;
+ buffer.skipAtMostOneLeadingNewline();
+ }
+ var data = buffer.takeRemaining();
+ if (!data)
+ return;
+ tree.insertText(data);
+ };
+
+ modes.text.processEOF = function() {
+ tree.parseError("expected-named-closing-tag-but-got-eof",
+ {name: tree.currentStackItem().localName});
+ tree.openElements.pop();
+ tree.setInsertionMode(tree.originalInsertionMode);
+ tree.insertionMode.processEOF();
+ };
+
+ modes.text.startTagOther = function(name) {
+ throw "Tried to process start tag " + name + " in RCDATA/RAWTEXT mode";
+ };
+
+ modes.text.endTagScript = function(name) {
+ var node = tree.openElements.pop();
+ assert.ok(node.localName == 'script');
+ tree.setInsertionMode(tree.originalInsertionMode);
+ };
+
+ modes.text.endTagOther = function(name) {
+ tree.openElements.pop();
+ tree.setInsertionMode(tree.originalInsertionMode);
+ };
+}
+
+TreeBuilder.prototype.setInsertionMode = function(name) {
+ this.insertionMode = this.insertionModes[name];
+ this.insertionModeName = name;
+};
+TreeBuilder.prototype.adoptionAgencyEndTag = function(name) {
+ var outerIterationLimit = 8;
+ var innerIterationLimit = 3;
+ var formattingElement;
+
+ function isActiveFormattingElement(el) {
+ return el === formattingElement;
+ }
+
+ var outerLoopCounter = 0;
+
+ while (outerLoopCounter++ < outerIterationLimit) {
+ formattingElement = this.elementInActiveFormattingElements(name);
+
+ if (!formattingElement || (this.openElements.contains(formattingElement) && !this.openElements.inScope(formattingElement.localName))) {
+ this.parseError('adoption-agency-1.1', {name: name});
+ return false;
+ }
+ if (!this.openElements.contains(formattingElement)) {
+ this.parseError('adoption-agency-1.2', {name: name});
+ this.removeElementFromActiveFormattingElements(formattingElement);
+ return true;
+ }
+ if (!this.openElements.inScope(formattingElement.localName)) {
+ this.parseError('adoption-agency-4.4', {name: name});
+ }
+
+ if (formattingElement != this.currentStackItem()) {
+ this.parseError('adoption-agency-1.3', {name: name});
+ }
+ var furthestBlock = this.openElements.furthestBlockForFormattingElement(formattingElement.node);
+
+ if (!furthestBlock) {
+ this.openElements.remove_openElements_until(isActiveFormattingElement);
+ this.removeElementFromActiveFormattingElements(formattingElement);
+ return true;
+ }
+
+ var afeIndex = this.openElements.elements.indexOf(formattingElement);
+ var commonAncestor = this.openElements.item(afeIndex - 1);
+
+ var bookmark = this.activeFormattingElements.indexOf(formattingElement);
+
+ var node = furthestBlock;
+ var lastNode = furthestBlock;
+ var index = this.openElements.elements.indexOf(node);
+
+ var innerLoopCounter = 0;
+ while (innerLoopCounter++ < innerIterationLimit) {
+ index -= 1;
+ node = this.openElements.item(index);
+ if (this.activeFormattingElements.indexOf(node) < 0) {
+ this.openElements.elements.splice(index, 1);
+ continue;
+ }
+ if (node == formattingElement)
+ break;
+
+ if (lastNode == furthestBlock)
+ bookmark = this.activeFormattingElements.indexOf(node) + 1;
+
+ var clone = this.createElement(node.namespaceURI, node.localName, node.attributes);
+ var newNode = new StackItem(node.namespaceURI, node.localName, node.attributes, clone);
+
+ this.activeFormattingElements[this.activeFormattingElements.indexOf(node)] = newNode;
+ this.openElements.elements[this.openElements.elements.indexOf(node)] = newNode;
+
+ node = newNode;
+ this.detachFromParent(lastNode.node);
+ this.attachNode(lastNode.node, node.node);
+ lastNode = node;
+ }
+
+ this.detachFromParent(lastNode.node);
+ if (commonAncestor.isFosterParenting()) {
+ this.insertIntoFosterParent(lastNode.node);
+ } else {
+ this.attachNode(lastNode.node, commonAncestor.node);
+ }
+
+ var clone = this.createElement("http://www.w3.org/1999/xhtml", formattingElement.localName, formattingElement.attributes);
+ var formattingClone = new StackItem(formattingElement.namespaceURI, formattingElement.localName, formattingElement.attributes, clone);
+
+ this.reparentChildren(furthestBlock.node, clone);
+ this.attachNode(clone, furthestBlock.node);
+
+ this.removeElementFromActiveFormattingElements(formattingElement);
+ this.activeFormattingElements.splice(Math.min(bookmark, this.activeFormattingElements.length), 0, formattingClone);
+
+ this.openElements.remove(formattingElement);
+ this.openElements.elements.splice(this.openElements.elements.indexOf(furthestBlock) + 1, 0, formattingClone);
+ }
+
+ return true;
+};
+
+TreeBuilder.prototype.start = function() {
+ throw "Not mplemented";
+};
+
+TreeBuilder.prototype.startTokenization = function(tokenizer) {
+ this.tokenizer = tokenizer;
+ this.compatMode = "no quirks";
+ this.originalInsertionMode = "initial";
+ this.framesetOk = true;
+ this.openElements = new ElementStack();
+ this.activeFormattingElements = [];
+ this.start();
+ if (this.context) {
+ switch(this.context) {
+ case 'title':
+ case 'textarea':
+ this.tokenizer.setState(Tokenizer.RCDATA);
+ break;
+ case 'style':
+ case 'xmp':
+ case 'iframe':
+ case 'noembed':
+ case 'noframes':
+ this.tokenizer.setState(Tokenizer.RAWTEXT);
+ break;
+ case 'script':
+ this.tokenizer.setState(Tokenizer.SCRIPT_DATA);
+ break;
+ case 'noscript':
+ if (this.scriptingEnabled)
+ this.tokenizer.setState(Tokenizer.RAWTEXT);
+ break;
+ case 'plaintext':
+ this.tokenizer.setState(Tokenizer.PLAINTEXT);
+ break;
+ }
+ this.insertHtmlElement();
+ this.resetInsertionMode();
+ } else {
+ this.setInsertionMode('initial');
+ }
+};
+
+TreeBuilder.prototype.processToken = function(token) {
+ this.selfClosingFlagAcknowledged = false;
+
+ var currentNode = this.openElements.top || null;
+ var insertionMode;
+ if (!currentNode || !currentNode.isForeign() ||
+ (currentNode.isMathMLTextIntegrationPoint() &&
+ ((token.type == 'StartTag' &&
+ !(token.name in {mglyph:0, malignmark:0})) ||
+ (token.type === 'Characters'))
+ ) ||
+ (currentNode.namespaceURI == "http://www.w3.org/1998/Math/MathML" &&
+ currentNode.localName == 'annotation-xml' &&
+ token.type == 'StartTag' && token.name == 'svg'
+ ) ||
+ (currentNode.isHtmlIntegrationPoint() &&
+ token.type in {StartTag:0, Characters:0}
+ ) ||
+ token.type == 'EOF'
+ ) {
+ insertionMode = this.insertionMode;
+ } else {
+ insertionMode = this.insertionModes.inForeignContent;
+ }
+ switch(token.type) {
+ case 'Characters':
+ var buffer = new CharacterBuffer(token.data);
+ insertionMode.processCharacters(buffer);
+ break;
+ case 'Comment':
+ insertionMode.processComment(token.data);
+ break;
+ case 'StartTag':
+ insertionMode.processStartTag(token.name, token.data, token.selfClosing);
+ break;
+ case 'EndTag':
+ insertionMode.processEndTag(token.name);
+ break;
+ case 'Doctype':
+ insertionMode.processDoctype(token.name, token.publicId, token.systemId, token.forceQuirks);
+ break;
+ case 'EOF':
+ insertionMode.processEOF();
+ break;
+ }
+};
+TreeBuilder.prototype.isCdataSectionAllowed = function() {
+ return this.openElements.length > 0 && this.currentStackItem().isForeign();
+};
+TreeBuilder.prototype.isSelfClosingFlagAcknowledged = function() {
+ return this.selfClosingFlagAcknowledged;
+};
+
+TreeBuilder.prototype.createElement = function(namespaceURI, localName, attributes) {
+ throw new Error("Not implemented");
+};
+
+TreeBuilder.prototype.attachNode = function(child, parent) {
+ throw new Error("Not implemented");
+};
+
+TreeBuilder.prototype.attachNodeToFosterParent = function(child, table, stackParent) {
+ throw new Error("Not implemented");
+};
+
+TreeBuilder.prototype.detachFromParent = function(node) {
+ throw new Error("Not implemented");
+};
+
+TreeBuilder.prototype.addAttributesToElement = function(element, attributes) {
+ throw new Error("Not implemented");
+};
+
+TreeBuilder.prototype.insertHtmlElement = function(attributes) {
+ var root = this.createElement("http://www.w3.org/1999/xhtml", 'html', attributes);
+ this.attachNode(root, this.document);
+ this.openElements.pushHtmlElement(new StackItem("http://www.w3.org/1999/xhtml", 'html', attributes, root));
+ return root;
+};
+
+TreeBuilder.prototype.insertHeadElement = function(attributes) {
+ var element = this.createElement("http://www.w3.org/1999/xhtml", "head", attributes);
+ this.head = new StackItem("http://www.w3.org/1999/xhtml", "head", attributes, element);
+ this.attachNode(element, this.openElements.top.node);
+ this.openElements.pushHeadElement(this.head);
+ return element;
+};
+
+TreeBuilder.prototype.insertBodyElement = function(attributes) {
+ var element = this.createElement("http://www.w3.org/1999/xhtml", "body", attributes);
+ this.attachNode(element, this.openElements.top.node);
+ this.openElements.pushBodyElement(new StackItem("http://www.w3.org/1999/xhtml", "body", attributes, element));
+ return element;
+};
+
+TreeBuilder.prototype.insertIntoFosterParent = function(node) {
+ var tableIndex = this.openElements.findIndex('table');
+ var tableElement = this.openElements.item(tableIndex).node;
+ if (tableIndex === 0)
+ return this.attachNode(node, tableElement);
+ this.attachNodeToFosterParent(node, tableElement, this.openElements.item(tableIndex - 1).node);
+};
+
+TreeBuilder.prototype.insertElement = function(name, attributes, namespaceURI, selfClosing) {
+ if (!namespaceURI)
+ namespaceURI = "http://www.w3.org/1999/xhtml";
+ var element = this.createElement(namespaceURI, name, attributes);
+ if (this.shouldFosterParent())
+ this.insertIntoFosterParent(element);
+ else
+ this.attachNode(element, this.openElements.top.node);
+ if (!selfClosing)
+ this.openElements.push(new StackItem(namespaceURI, name, attributes, element));
+};
+
+TreeBuilder.prototype.insertFormattingElement = function(name, attributes) {
+ this.insertElement(name, attributes, "http://www.w3.org/1999/xhtml");
+ this.appendElementToActiveFormattingElements(this.currentStackItem());
+};
+
+TreeBuilder.prototype.insertSelfClosingElement = function(name, attributes) {
+ this.selfClosingFlagAcknowledged = true;
+ this.insertElement(name, attributes, "http://www.w3.org/1999/xhtml", true);
+};
+
+TreeBuilder.prototype.insertForeignElement = function(name, attributes, namespaceURI, selfClosing) {
+ if (selfClosing)
+ this.selfClosingFlagAcknowledged = true;
+ this.insertElement(name, attributes, namespaceURI, selfClosing);
+};
+
+TreeBuilder.prototype.insertComment = function(data, parent) {
+ throw new Error("Not implemented");
+};
+
+TreeBuilder.prototype.insertDoctype = function(name, publicId, systemId) {
+ throw new Error("Not implemented");
+};
+
+TreeBuilder.prototype.insertText = function(data) {
+ throw new Error("Not implemented");
+};
+TreeBuilder.prototype.currentStackItem = function() {
+ return this.openElements.top;
+};
+TreeBuilder.prototype.popElement = function() {
+ return this.openElements.pop();
+};
+TreeBuilder.prototype.shouldFosterParent = function() {
+ return this.redirectAttachToFosterParent && this.currentStackItem().isFosterParenting();
+};
+TreeBuilder.prototype.generateImpliedEndTags = function(exclude) {
+ var name = this.openElements.top.localName;
+ if (['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'].indexOf(name) != -1 && name != exclude) {
+ this.popElement();
+ this.generateImpliedEndTags(exclude);
+ }
+};
+TreeBuilder.prototype.reconstructActiveFormattingElements = function() {
+ if (this.activeFormattingElements.length === 0)
+ return;
+ var i = this.activeFormattingElements.length - 1;
+ var entry = this.activeFormattingElements[i];
+ if (entry == Marker || this.openElements.contains(entry))
+ return;
+
+ while (entry != Marker && !this.openElements.contains(entry)) {
+ i -= 1;
+ entry = this.activeFormattingElements[i];
+ if (!entry)
+ break;
+ }
+
+ while (true) {
+ i += 1;
+ entry = this.activeFormattingElements[i];
+ this.insertElement(entry.localName, entry.attributes);
+ var element = this.currentStackItem();
+ this.activeFormattingElements[i] = element;
+ if (element == this.activeFormattingElements[this.activeFormattingElements.length -1])
+ break;
+ }
+
+};
+TreeBuilder.prototype.ensureNoahsArkCondition = function(item) {
+ var kNoahsArkCapacity = 3;
+ if (this.activeFormattingElements.length < kNoahsArkCapacity)
+ return;
+ var candidates = [];
+ var newItemAttributeCount = item.attributes.length;
+ for (var i = this.activeFormattingElements.length - 1; i >= 0; i--) {
+ var candidate = this.activeFormattingElements[i];
+ if (candidate === Marker)
+ break;
+ if (item.localName !== candidate.localName || item.namespaceURI !== candidate.namespaceURI)
+ continue;
+ if (candidate.attributes.length != newItemAttributeCount)
+ continue;
+ candidates.push(candidate);
+ }
+ if (candidates.length < kNoahsArkCapacity)
+ return;
+
+ var remainingCandidates = [];
+ var attributes = item.attributes;
+ for (var i = 0; i < attributes.length; i++) {
+ var attribute = attributes[i];
+
+ for (var j = 0; j < candidates.length; j++) {
+ var candidate = candidates[j];
+ var candidateAttribute = getAttribute(candidate, attribute.nodeName);
+ if (candidateAttribute && candidateAttribute.nodeValue === attribute.nodeValue)
+ remainingCandidates.push(candidate);
+ }
+ if (remainingCandidates.length < kNoahsArkCapacity)
+ return;
+ candidates = remainingCandidates;
+ remainingCandidates = [];
+ }
+ for (var i = kNoahsArkCapacity - 1; i < candidates.length; i++)
+ this.removeElementFromActiveFormattingElements(candidates[i]);
+};
+TreeBuilder.prototype.appendElementToActiveFormattingElements = function(item) {
+ this.ensureNoahsArkCondition(item);
+ this.activeFormattingElements.push(item);
+};
+TreeBuilder.prototype.removeElementFromActiveFormattingElements = function(item) {
+ var index = this.activeFormattingElements.indexOf(item);
+ if (index >= 0)
+ this.activeFormattingElements.splice(index, 1);
+};
+
+TreeBuilder.prototype.elementInActiveFormattingElements = function(name) {
+ var els = this.activeFormattingElements;
+ for (var i = els.length - 1; i >= 0; i--) {
+ if (els[i] == Marker) break;
+ if (els[i].localName == name) return els[i];
+ }
+ return false;
+};
+
+TreeBuilder.prototype.clearActiveFormattingElements = function() {
+ while (!(this.activeFormattingElements.length === 0 || this.activeFormattingElements.pop() == Marker));
+};
+
+TreeBuilder.prototype.reparentChildren = function(oldParent, newParent) {
+ throw new Error("Not implemented");
+};
+TreeBuilder.prototype.setFragmentContext = function(context) {
+ this.context = context;
+};
+TreeBuilder.prototype.parseError = function(code, args) {
+ if (!this.errorHandler)
+ return;
+ var message = formatMessage(messages[code], args);
+ this.errorHandler.error(message, this.tokenizer._inputStream.location(), code);
+};
+TreeBuilder.prototype.resetInsertionMode = function() {
+ var last = false;
+ var node = null;
+ for (var i = this.openElements.length - 1; i >= 0; i--) {
+ node = this.openElements.item(i);
+ if (i === 0) {
+ assert.ok(this.context);
+ last = true;
+ node = new StackItem("http://www.w3.org/1999/xhtml", this.context, [], null);
+ }
+
+ if (node.namespaceURI === "http://www.w3.org/1999/xhtml") {
+ if (node.localName === 'select')
+ return this.setInsertionMode('inSelect');
+ if (node.localName === 'td' || node.localName === 'th')
+ return this.setInsertionMode('inCell');
+ if (node.localName === 'tr')
+ return this.setInsertionMode('inRow');
+ if (node.localName === 'tbody' || node.localName === 'thead' || node.localName === 'tfoot')
+ return this.setInsertionMode('inTableBody');
+ if (node.localName === 'caption')
+ return this.setInsertionMode('inCaption');
+ if (node.localName === 'colgroup')
+ return this.setInsertionMode('inColumnGroup');
+ if (node.localName === 'table')
+ return this.setInsertionMode('inTable');
+ if (node.localName === 'head' && !last)
+ return this.setInsertionMode('inHead');
+ if (node.localName === 'body')
+ return this.setInsertionMode('inBody');
+ if (node.localName === 'frameset')
+ return this.setInsertionMode('inFrameset');
+ if (node.localName === 'html')
+ if (!this.openElements.headElement)
+ return this.setInsertionMode('beforeHead');
+ else
+ return this.setInsertionMode('afterHead');
+ }
+
+ if (last)
+ return this.setInsertionMode('inBody');
+ }
+};
+
+TreeBuilder.prototype.processGenericRCDATAStartTag = function(name, attributes) {
+ this.insertElement(name, attributes);
+ this.tokenizer.setState(Tokenizer.RCDATA);
+ this.originalInsertionMode = this.insertionModeName;
+ this.setInsertionMode('text');
+};
+
+TreeBuilder.prototype.processGenericRawTextStartTag = function(name, attributes) {
+ this.insertElement(name, attributes);
+ this.tokenizer.setState(Tokenizer.RAWTEXT);
+ this.originalInsertionMode = this.insertionModeName;
+ this.setInsertionMode('text');
+};
+
+TreeBuilder.prototype.adjustMathMLAttributes = function(attributes) {
+ attributes.forEach(function(a) {
+ a.namespaceURI = "http://www.w3.org/1998/Math/MathML";
+ if (constants.MATHMLAttributeMap[a.nodeName])
+ a.nodeName = constants.MATHMLAttributeMap[a.nodeName];
+ });
+ return attributes;
+};
+
+TreeBuilder.prototype.adjustSVGTagNameCase = function(name) {
+ return constants.SVGTagMap[name] || name;
+};
+
+TreeBuilder.prototype.adjustSVGAttributes = function(attributes) {
+ attributes.forEach(function(a) {
+ a.namespaceURI = "http://www.w3.org/2000/svg";
+ if (constants.SVGAttributeMap[a.nodeName])
+ a.nodeName = constants.SVGAttributeMap[a.nodeName];
+ });
+ return attributes;
+};
+
+TreeBuilder.prototype.adjustForeignAttributes = function(attributes) {
+ for (var i = 0; i < attributes.length; i++) {
+ var attribute = attributes[i];
+ var adjusted = constants.ForeignAttributeMap[attribute.nodeName];
+ if (adjusted) {
+ attribute.nodeName = adjusted.localName;
+ attribute.prefix = adjusted.prefix;
+ attribute.namespaceURI = adjusted.namespaceURI;
+ }
+ }
+ return attributes;
+};
+
+function formatMessage(format, args) {
+ return format.replace(new RegExp('{[0-9a-z-]+}', 'gi'), function(match) {
+ return args[match.slice(1, -1)] || match;
+ });
+}
+
+exports.TreeBuilder = TreeBuilder;
+
+},
+{"./ElementStack":1,"./StackItem":4,"./Tokenizer":5,"./constants":7,"./messages.json":8,"assert":13,"events":16}],
+7:[function(_dereq_,module,exports){
+exports.SVGTagMap = {
+ "altglyph": "altGlyph",
+ "altglyphdef": "altGlyphDef",
+ "altglyphitem": "altGlyphItem",
+ "animatecolor": "animateColor",
+ "animatemotion": "animateMotion",
+ "animatetransform": "animateTransform",
+ "clippath": "clipPath",
+ "feblend": "feBlend",
+ "fecolormatrix": "feColorMatrix",
+ "fecomponenttransfer": "feComponentTransfer",
+ "fecomposite": "feComposite",
+ "feconvolvematrix": "feConvolveMatrix",
+ "fediffuselighting": "feDiffuseLighting",
+ "fedisplacementmap": "feDisplacementMap",
+ "fedistantlight": "feDistantLight",
+ "feflood": "feFlood",
+ "fefunca": "feFuncA",
+ "fefuncb": "feFuncB",
+ "fefuncg": "feFuncG",
+ "fefuncr": "feFuncR",
+ "fegaussianblur": "feGaussianBlur",
+ "feimage": "feImage",
+ "femerge": "feMerge",
+ "femergenode": "feMergeNode",
+ "femorphology": "feMorphology",
+ "feoffset": "feOffset",
+ "fepointlight": "fePointLight",
+ "fespecularlighting": "feSpecularLighting",
+ "fespotlight": "feSpotLight",
+ "fetile": "feTile",
+ "feturbulence": "feTurbulence",
+ "foreignobject": "foreignObject",
+ "glyphref": "glyphRef",
+ "lineargradient": "linearGradient",
+ "radialgradient": "radialGradient",
+ "textpath": "textPath"
+};
+
+exports.MATHMLAttributeMap = {
+ definitionurl: 'definitionURL'
+};
+
+exports.SVGAttributeMap = {
+ attributename: 'attributeName',
+ attributetype: 'attributeType',
+ basefrequency: 'baseFrequency',
+ baseprofile: 'baseProfile',
+ calcmode: 'calcMode',
+ clippathunits: 'clipPathUnits',
+ contentscripttype: 'contentScriptType',
+ contentstyletype: 'contentStyleType',
+ diffuseconstant: 'diffuseConstant',
+ edgemode: 'edgeMode',
+ externalresourcesrequired: 'externalResourcesRequired',
+ filterres: 'filterRes',
+ filterunits: 'filterUnits',
+ glyphref: 'glyphRef',
+ gradienttransform: 'gradientTransform',
+ gradientunits: 'gradientUnits',
+ kernelmatrix: 'kernelMatrix',
+ kernelunitlength: 'kernelUnitLength',
+ keypoints: 'keyPoints',
+ keysplines: 'keySplines',
+ keytimes: 'keyTimes',
+ lengthadjust: 'lengthAdjust',
+ limitingconeangle: 'limitingConeAngle',
+ markerheight: 'markerHeight',
+ markerunits: 'markerUnits',
+ markerwidth: 'markerWidth',
+ maskcontentunits: 'maskContentUnits',
+ maskunits: 'maskUnits',
+ numoctaves: 'numOctaves',
+ pathlength: 'pathLength',
+ patterncontentunits: 'patternContentUnits',
+ patterntransform: 'patternTransform',
+ patternunits: 'patternUnits',
+ pointsatx: 'pointsAtX',
+ pointsaty: 'pointsAtY',
+ pointsatz: 'pointsAtZ',
+ preservealpha: 'preserveAlpha',
+ preserveaspectratio: 'preserveAspectRatio',
+ primitiveunits: 'primitiveUnits',
+ refx: 'refX',
+ refy: 'refY',
+ repeatcount: 'repeatCount',
+ repeatdur: 'repeatDur',
+ requiredextensions: 'requiredExtensions',
+ requiredfeatures: 'requiredFeatures',
+ specularconstant: 'specularConstant',
+ specularexponent: 'specularExponent',
+ spreadmethod: 'spreadMethod',
+ startoffset: 'startOffset',
+ stddeviation: 'stdDeviation',
+ stitchtiles: 'stitchTiles',
+ surfacescale: 'surfaceScale',
+ systemlanguage: 'systemLanguage',
+ tablevalues: 'tableValues',
+ targetx: 'targetX',
+ targety: 'targetY',
+ textlength: 'textLength',
+ viewbox: 'viewBox',
+ viewtarget: 'viewTarget',
+ xchannelselector: 'xChannelSelector',
+ ychannelselector: 'yChannelSelector',
+ zoomandpan: 'zoomAndPan'
+};
+
+exports.ForeignAttributeMap = {
+ "xlink:actuate": {prefix: "xlink", localName: "actuate", namespaceURI: "http://www.w3.org/1999/xlink"},
+ "xlink:arcrole": {prefix: "xlink", localName: "arcrole", namespaceURI: "http://www.w3.org/1999/xlink"},
+ "xlink:href": {prefix: "xlink", localName: "href", namespaceURI: "http://www.w3.org/1999/xlink"},
+ "xlink:role": {prefix: "xlink", localName: "role", namespaceURI: "http://www.w3.org/1999/xlink"},
+ "xlink:show": {prefix: "xlink", localName: "show", namespaceURI: "http://www.w3.org/1999/xlink"},
+ "xlink:title": {prefix: "xlink", localName: "title", namespaceURI: "http://www.w3.org/1999/xlink"},
+ "xlink:type": {prefix: "xlink", localName: "title", namespaceURI: "http://www.w3.org/1999/xlink"},
+ "xml:base": {prefix: "xml", localName: "base", namespaceURI: "http://www.w3.org/XML/1998/namespace"},
+ "xml:lang": {prefix: "xml", localName: "lang", namespaceURI: "http://www.w3.org/XML/1998/namespace"},
+ "xml:space": {prefix: "xml", localName: "space", namespaceURI: "http://www.w3.org/XML/1998/namespace"},
+ "xmlns": {prefix: null, localName: "xmlns", namespaceURI: "http://www.w3.org/2000/xmlns/"},
+ "xmlns:xlink": {prefix: "xmlns", localName: "xlink", namespaceURI: "http://www.w3.org/2000/xmlns/"},
+};
+},
+{}],
+8:[function(_dereq_,module,exports){
+module.exports={
+ "null-character":
+ "Null character in input stream, replaced with U+FFFD.",
+ "invalid-codepoint":
+ "Invalid codepoint in stream",
+ "incorrectly-placed-solidus":
+ "Solidus (/) incorrectly placed in tag.",
+ "incorrect-cr-newline-entity":
+ "Incorrect CR newline entity, replaced with LF.",
+ "illegal-windows-1252-entity":
+ "Entity used with illegal number (windows-1252 reference).",
+ "cant-convert-numeric-entity":
+ "Numeric entity couldn't be converted to character (codepoint U+{charAsInt}).",
+ "invalid-numeric-entity-replaced":
+ "Numeric entity represents an illegal codepoint. Expanded to the C1 controls range.",
+ "numeric-entity-without-semicolon":
+ "Numeric entity didn't end with ';'.",
+ "expected-numeric-entity-but-got-eof":
+ "Numeric entity expected. Got end of file instead.",
+ "expected-numeric-entity":
+ "Numeric entity expected but none found.",
+ "named-entity-without-semicolon":
+ "Named entity didn't end with ';'.",
+ "expected-named-entity":
+ "Named entity expected. Got none.",
+ "attributes-in-end-tag":
+ "End tag contains unexpected attributes.",
+ "self-closing-flag-on-end-tag":
+ "End tag contains unexpected self-closing flag.",
+ "bare-less-than-sign-at-eof":
+ "End of file after <.",
+ "expected-tag-name-but-got-right-bracket":
+ "Expected tag name. Got '>' instead.",
+ "expected-tag-name-but-got-question-mark":
+ "Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.)",
+ "expected-tag-name":
+ "Expected tag name. Got something else instead.",
+ "expected-closing-tag-but-got-right-bracket":
+ "Expected closing tag. Got '>' instead. Ignoring '</>'.",
+ "expected-closing-tag-but-got-eof":
+ "Expected closing tag. Unexpected end of file.",
+ "expected-closing-tag-but-got-char":
+ "Expected closing tag. Unexpected character '{data}' found.",
+ "eof-in-tag-name":
+ "Unexpected end of file in the tag name.",
+ "expected-attribute-name-but-got-eof":
+ "Unexpected end of file. Expected attribute name instead.",
+ "eof-in-attribute-name":
+ "Unexpected end of file in attribute name.",
+ "invalid-character-in-attribute-name":
+ "Invalid character in attribute name.",
+ "duplicate-attribute":
+ "Dropped duplicate attribute '{name}' on tag.",
+ "expected-end-of-tag-but-got-eof":
+ "Unexpected end of file. Expected = or end of tag.",
+ "expected-attribute-value-but-got-eof":
+ "Unexpected end of file. Expected attribute value.",
+ "expected-attribute-value-but-got-right-bracket":
+ "Expected attribute value. Got '>' instead.",
+ "unexpected-character-in-unquoted-attribute-value":
+ "Unexpected character in unquoted attribute",
+ "invalid-character-after-attribute-name":
+ "Unexpected character after attribute name.",
+ "unexpected-character-after-attribute-value":
+ "Unexpected character after attribute value.",
+ "eof-in-attribute-value-double-quote":
+ "Unexpected end of file in attribute value (\").",
+ "eof-in-attribute-value-single-quote":
+ "Unexpected end of file in attribute value (').",
+ "eof-in-attribute-value-no-quotes":
+ "Unexpected end of file in attribute value.",
+ "eof-after-attribute-value":
+ "Unexpected end of file after attribute value.",
+ "unexpected-eof-after-solidus-in-tag":
+ "Unexpected end of file in tag. Expected >.",
+ "unexpected-character-after-solidus-in-tag":
+ "Unexpected character after / in tag. Expected >.",
+ "expected-dashes-or-doctype":
+ "Expected '--' or 'DOCTYPE'. Not found.",
+ "unexpected-bang-after-double-dash-in-comment":
+ "Unexpected ! after -- in comment.",
+ "incorrect-comment":
+ "Incorrect comment.",
+ "eof-in-comment":
+ "Unexpected end of file in comment.",
+ "eof-in-comment-end-dash":
+ "Unexpected end of file in comment (-).",
+ "unexpected-dash-after-double-dash-in-comment":
+ "Unexpected '-' after '--' found in comment.",
+ "eof-in-comment-double-dash":
+ "Unexpected end of file in comment (--).",
+ "eof-in-comment-end-bang-state":
+ "Unexpected end of file in comment.",
+ "unexpected-char-in-comment":
+ "Unexpected character in comment found.",
+ "need-space-after-doctype":
+ "No space after literal string 'DOCTYPE'.",
+ "expected-doctype-name-but-got-right-bracket":
+ "Unexpected > character. Expected DOCTYPE name.",
+ "expected-doctype-name-but-got-eof":
+ "Unexpected end of file. Expected DOCTYPE name.",
+ "eof-in-doctype-name":
+ "Unexpected end of file in DOCTYPE name.",
+ "eof-in-doctype":
+ "Unexpected end of file in DOCTYPE.",
+ "expected-space-or-right-bracket-in-doctype":
+ "Expected space or '>'. Got '{data}'.",
+ "unexpected-end-of-doctype":
+ "Unexpected end of DOCTYPE.",
+ "unexpected-char-in-doctype":
+ "Unexpected character in DOCTYPE.",
+ "eof-in-bogus-doctype":
+ "Unexpected end of file in bogus doctype.",
+ "eof-in-innerhtml":
+ "Unexpected EOF in inner html mode.",
+ "unexpected-doctype":
+ "Unexpected DOCTYPE. Ignored.",
+ "non-html-root":
+ "html needs to be the first start tag.",
+ "expected-doctype-but-got-eof":
+ "Unexpected End of file. Expected DOCTYPE.",
+ "unknown-doctype":
+ "Erroneous DOCTYPE. Expected <!DOCTYPE html>.",
+ "quirky-doctype":
+ "Quirky doctype. Expected <!DOCTYPE html>.",
+ "almost-standards-doctype":
+ "Almost standards mode doctype. Expected <!DOCTYPE html>.",
+ "obsolete-doctype":
+ "Obsolete doctype. Expected <!DOCTYPE html>.",
+ "expected-doctype-but-got-chars":
+ "Non-space characters found without seeing a doctype first. Expected e.g. <!DOCTYPE html>.",
+ "expected-doctype-but-got-start-tag":
+ "Start tag seen without seeing a doctype first. Expected e.g. <!DOCTYPE html>.",
+ "expected-doctype-but-got-end-tag":
+ "End tag seen without seeing a doctype first. Expected e.g. <!DOCTYPE html>.",
+ "end-tag-after-implied-root":
+ "Unexpected end tag ({name}) after the (implied) root element.",
+ "expected-named-closing-tag-but-got-eof":
+ "Unexpected end of file. Expected end tag ({name}).",
+ "two-heads-are-not-better-than-one":
+ "Unexpected start tag head in existing head. Ignored.",
+ "unexpected-end-tag":
+ "Unexpected end tag ({name}). Ignored.",
+ "unexpected-implied-end-tag":
+ "End tag {name} implied, but there were open elements.",
+ "unexpected-start-tag-out-of-my-head":
+ "Unexpected start tag ({name}) that can be in head. Moved.",
+ "unexpected-start-tag":
+ "Unexpected start tag ({name}).",
+ "missing-end-tag":
+ "Missing end tag ({name}).",
+ "missing-end-tags":
+ "Missing end tags ({name}).",
+ "unexpected-start-tag-implies-end-tag":
+ "Unexpected start tag ({startName}) implies end tag ({endName}).",
+ "unexpected-start-tag-treated-as":
+ "Unexpected start tag ({originalName}). Treated as {newName}.",
+ "deprecated-tag":
+ "Unexpected start tag {name}. Don't use it!",
+ "unexpected-start-tag-ignored":
+ "Unexpected start tag {name}. Ignored.",
+ "expected-one-end-tag-but-got-another":
+ "Unexpected end tag ({gotName}). Missing end tag ({expectedName}).",
+ "end-tag-too-early":
+ "End tag ({name}) seen too early. Expected other end tag.",
+ "end-tag-too-early-named":
+ "Unexpected end tag ({gotName}). Expected end tag ({expectedName}.",
+ "end-tag-too-early-ignored":
+ "End tag ({name}) seen too early. Ignored.",
+ "adoption-agency-1.1":
+ "End tag ({name}) violates step 1, paragraph 1 of the adoption agency algorithm.",
+ "adoption-agency-1.2":
+ "End tag ({name}) violates step 1, paragraph 2 of the adoption agency algorithm.",
+ "adoption-agency-1.3":
+ "End tag ({name}) violates step 1, paragraph 3 of the adoption agency algorithm.",
+ "adoption-agency-4.4":
+ "End tag ({name}) violates step 4, paragraph 4 of the adoption agency algorithm.",
+ "unexpected-end-tag-treated-as":
+ "Unexpected end tag ({originalName}). Treated as {newName}.",
+ "no-end-tag":
+ "This element ({name}) has no end tag.",
+ "unexpected-implied-end-tag-in-table":
+ "Unexpected implied end tag ({name}) in the table phase.",
+ "unexpected-implied-end-tag-in-table-body":
+ "Unexpected implied end tag ({name}) in the table body phase.",
+ "unexpected-char-implies-table-voodoo":
+ "Unexpected non-space characters in table context caused voodoo mode.",
+ "unexpected-hidden-input-in-table":
+ "Unexpected input with type hidden in table context.",
+ "unexpected-form-in-table":
+ "Unexpected form in table context.",
+ "unexpected-start-tag-implies-table-voodoo":
+ "Unexpected start tag ({name}) in table context caused voodoo mode.",
+ "unexpected-end-tag-implies-table-voodoo":
+ "Unexpected end tag ({name}) in table context caused voodoo mode.",
+ "unexpected-cell-in-table-body":
+ "Unexpected table cell start tag ({name}) in the table body phase.",
+ "unexpected-cell-end-tag":
+ "Got table cell end tag ({name}) while required end tags are missing.",
+ "unexpected-end-tag-in-table-body":
+ "Unexpected end tag ({name}) in the table body phase. Ignored.",
+ "unexpected-implied-end-tag-in-table-row":
+ "Unexpected implied end tag ({name}) in the table row phase.",
+ "unexpected-end-tag-in-table-row":
+ "Unexpected end tag ({name}) in the table row phase. Ignored.",
+ "unexpected-select-in-select":
+ "Unexpected select start tag in the select phase treated as select end tag.",
+ "unexpected-input-in-select":
+ "Unexpected input start tag in the select phase.",
+ "unexpected-start-tag-in-select":
+ "Unexpected start tag token ({name}) in the select phase. Ignored.",
+ "unexpected-end-tag-in-select":
+ "Unexpected end tag ({name}) in the select phase. Ignored.",
+ "unexpected-table-element-start-tag-in-select-in-table":
+ "Unexpected table element start tag ({name}) in the select in table phase.",
+ "unexpected-table-element-end-tag-in-select-in-table":
+ "Unexpected table element end tag ({name}) in the select in table phase.",
+ "unexpected-char-after-body":
+ "Unexpected non-space characters in the after body phase.",
+ "unexpected-start-tag-after-body":
+ "Unexpected start tag token ({name}) in the after body phase.",
+ "unexpected-end-tag-after-body":
+ "Unexpected end tag token ({name}) in the after body phase.",
+ "unexpected-char-in-frameset":
+ "Unepxected characters in the frameset phase. Characters ignored.",
+ "unexpected-start-tag-in-frameset":
+ "Unexpected start tag token ({name}) in the frameset phase. Ignored.",
+ "unexpected-frameset-in-frameset-innerhtml":
+ "Unexpected end tag token (frameset in the frameset phase (innerHTML).",
+ "unexpected-end-tag-in-frameset":
+ "Unexpected end tag token ({name}) in the frameset phase. Ignored.",
+ "unexpected-char-after-frameset":
+ "Unexpected non-space characters in the after frameset phase. Ignored.",
+ "unexpected-start-tag-after-frameset":
+ "Unexpected start tag ({name}) in the after frameset phase. Ignored.",
+ "unexpected-end-tag-after-frameset":
+ "Unexpected end tag ({name}) in the after frameset phase. Ignored.",
+ "expected-eof-but-got-char":
+ "Unexpected non-space characters. Expected end of file.",
+ "expected-eof-but-got-start-tag":
+ "Unexpected start tag ({name}). Expected end of file.",
+ "expected-eof-but-got-end-tag":
+ "Unexpected end tag ({name}). Expected end of file.",
+ "unexpected-end-table-in-caption":
+ "Unexpected end table tag in caption. Generates implied end caption.",
+ "end-html-in-innerhtml":
+ "Unexpected html end tag in inner html mode.",
+ "eof-in-table":
+ "Unexpected end of file. Expected table content.",
+ "eof-in-script":
+ "Unexpected end of file. Expected script content.",
+ "non-void-element-with-trailing-solidus":
+ "Trailing solidus not allowed on element {name}.",
+ "unexpected-html-element-in-foreign-content":
+ "HTML start tag \"{name}\" in a foreign namespace context.",
+ "unexpected-start-tag-in-table":
+ "Unexpected {name}. Expected table content."
+}
+},
+{}],
+9:[function(_dereq_,module,exports){
+var SAXTreeBuilder = _dereq_('./SAXTreeBuilder').SAXTreeBuilder;
+var Tokenizer = _dereq_('../Tokenizer').Tokenizer;
+var TreeParser = _dereq_('./TreeParser').TreeParser;
+
+function SAXParser() {
+ this.contentHandler = null;
+ this._errorHandler = null;
+ this._treeBuilder = new SAXTreeBuilder();
+ this._tokenizer = new Tokenizer(this._treeBuilder);
+ this._scriptingEnabled = false;
+}
+
+SAXParser.prototype.parse = function(source) {
+ this._tokenizer.tokenize(source);
+ var document = this._treeBuilder.document;
+ if (document) {
+ new TreeParser(this.contentHandler).parse(document);
+ }
+};
+
+SAXParser.prototype.parseFragment = function(source, context) {
+ this._treeBuilder.setFragmentContext(context);
+ this._tokenizer.tokenize(source);
+ var fragment = this._treeBuilder.getFragment();
+ if (fragment) {
+ new TreeParser(this.contentHandler).parse(fragment);
+ }
+};
+
+Object.defineProperty(SAXParser.prototype, 'scriptingEnabled', {
+ get: function() {
+ return this._scriptingEnabled;
+ },
+ set: function(value) {
+ this._scriptingEnabled = value;
+ this._treeBuilder.scriptingEnabled = value;
+ }
+});
+
+Object.defineProperty(SAXParser.prototype, 'errorHandler', {
+ get: function() {
+ return this._errorHandler;
+ },
+ set: function(value) {
+ this._errorHandler = value;
+ this._treeBuilder.errorHandler = value;
+ }
+});
+
+exports.SAXParser = SAXParser;
+
+},
+{"../Tokenizer":5,"./SAXTreeBuilder":10,"./TreeParser":11}],
+10:[function(_dereq_,module,exports){
+var util = _dereq_('util');
+var TreeBuilder = _dereq_('../TreeBuilder').TreeBuilder;
+
+function SAXTreeBuilder() {
+ TreeBuilder.call(this);
+}
+
+util.inherits(SAXTreeBuilder, TreeBuilder);
+
+SAXTreeBuilder.prototype.start = function(tokenizer) {
+ this.document = new Document(this.tokenizer);
+};
+
+SAXTreeBuilder.prototype.end = function() {
+ this.document.endLocator = this.tokenizer;
+};
+
+SAXTreeBuilder.prototype.insertDoctype = function(name, publicId, systemId) {
+ var doctype = new DTD(this.tokenizer, name, publicId, systemId);
+ doctype.endLocator = this.tokenizer;
+ this.document.appendChild(doctype);
+};
+
+SAXTreeBuilder.prototype.createElement = function(namespaceURI, localName, attributes) {
+ var element = new Element(this.tokenizer, namespaceURI, localName, localName, attributes || []);
+ return element;
+};
+
+SAXTreeBuilder.prototype.insertComment = function(data, parent) {
+ if (!parent)
+ parent = this.currentStackItem();
+ var comment = new Comment(this.tokenizer, data);
+ parent.appendChild(comment);
+};
+
+SAXTreeBuilder.prototype.appendCharacters = function(parent, data) {
+ var text = new Characters(this.tokenizer, data);
+ parent.appendChild(text);
+};
+
+SAXTreeBuilder.prototype.insertText = function(data) {
+ if (this.redirectAttachToFosterParent && this.openElements.top.isFosterParenting()) {
+ var tableIndex = this.openElements.findIndex('table');
+ var tableItem = this.openElements.item(tableIndex);
+ var table = tableItem.node;
+ if (tableIndex === 0) {
+ return this.appendCharacters(table, data);
+ }
+ var text = new Characters(this.tokenizer, data);
+ var parent = table.parentNode;
+ if (parent) {
+ parent.insertBetween(text, table.previousSibling, table);
+ return;
+ }
+ var stackParent = this.openElements.item(tableIndex - 1).node;
+ stackParent.appendChild(text);
+ return;
+ }
+ this.appendCharacters(this.currentStackItem().node, data);
+};
+
+SAXTreeBuilder.prototype.attachNode = function(node, parent) {
+ parent.appendChild(node);
+};
+
+SAXTreeBuilder.prototype.attachNodeToFosterParent = function(child, table, stackParent) {
+ var parent = table.parentNode;
+ if (parent)
+ parent.insertBetween(child, table.previousSibling, table);
+ else
+ stackParent.appendChild(child);
+};
+
+SAXTreeBuilder.prototype.detachFromParent = function(element) {
+ element.detach();
+};
+
+SAXTreeBuilder.prototype.reparentChildren = function(oldParent, newParent) {
+ newParent.appendChildren(oldParent.firstChild);
+};
+
+SAXTreeBuilder.prototype.getFragment = function() {
+ var fragment = new DocumentFragment();
+ this.reparentChildren(this.openElements.rootNode, fragment);
+ return fragment;
+};
+
+function getAttribute(node, name) {
+ for (var i = 0; i < node.attributes.length; i++) {
+ var attribute = node.attributes[i];
+ if (attribute.nodeName === name)
+ return attribute.nodeValue;
+ }
+}
+
+SAXTreeBuilder.prototype.addAttributesToElement = function(element, attributes) {
+ for (var i = 0; i < attributes.length; i++) {
+ var attribute = attributes[i];
+ if (!getAttribute(element, attribute.nodeName))
+ element.attributes.push(attribute);
+ }
+};
+
+var NodeType = {
+ CDATA: 1,
+ CHARACTERS: 2,
+ COMMENT: 3,
+ DOCUMENT: 4,
+ DOCUMENT_FRAGMENT: 5,
+ DTD: 6,
+ ELEMENT: 7,
+ ENTITY: 8,
+ IGNORABLE_WHITESPACE: 9,
+ PROCESSING_INSTRUCTION: 10,
+ SKIPPED_ENTITY: 11
+};
+function Node(locator) {
+ if (!locator) {
+ this.columnNumber = -1;
+ this.lineNumber = -1;
+ } else {
+ this.columnNumber = locator.columnNumber;
+ this.lineNumber = locator.lineNumber;
+ }
+ this.parentNode = null;
+ this.nextSibling = null;
+ this.firstChild = null;
+}
+Node.prototype.visit = function(treeParser) {
+ throw new Error("Not Implemented");
+};
+Node.prototype.revisit = function(treeParser) {
+ return;
+};
+Node.prototype.detach = function() {
+ if (this.parentNode !== null) {
+ this.parentNode.removeChild(this);
+ this.parentNode = null;
+ }
+};
+
+Object.defineProperty(Node.prototype, 'previousSibling', {
+ get: function() {
+ var prev = null;
+ var next = this.parentNode.firstChild;
+ for(;;) {
+ if (this == next) {
+ return prev;
+ }
+ prev = next;
+ next = next.nextSibling;
+ }
+ }
+});
+
+
+function ParentNode(locator) {
+ Node.call(this, locator);
+ this.lastChild = null;
+ this._endLocator = null;
+}
+
+ParentNode.prototype = Object.create(Node.prototype);
+ParentNode.prototype.insertBefore = function(child, sibling) {
+ if (!sibling) {
+ return this.appendChild(child);
+ }
+ child.detach();
+ child.parentNode = this;
+ if (this.firstChild == sibling) {
+ child.nextSibling = sibling;
+ this.firstChild = child;
+ } else {
+ var prev = this.firstChild;
+ var next = this.firstChild.nextSibling;
+ while (next != sibling) {
+ prev = next;
+ next = next.nextSibling;
+ }
+ prev.nextSibling = child;
+ child.nextSibling = next;
+ }
+ return child;
+};
+
+ParentNode.prototype.insertBetween = function(child, prev, next) {
+ if (!next) {
+ return this.appendChild(child);
+ }
+ child.detach();
+ child.parentNode = this;
+ child.nextSibling = next;
+ if (!prev) {
+ firstChild = child;
+ } else {
+ prev.nextSibling = child;
+ }
+ return child;
+};
+ParentNode.prototype.appendChild = function(child) {
+ child.detach();
+ child.parentNode = this;
+ if (!this.firstChild) {
+ this.firstChild = child;
+ } else {
+ this.lastChild.nextSibling = child;
+ }
+ this.lastChild = child;
+ return child;
+};
+ParentNode.prototype.appendChildren = function(parent) {
+ var child = parent.firstChild;
+ if (!child) {
+ return;
+ }
+ var another = parent;
+ if (!this.firstChild) {
+ this.firstChild = child;
+ } else {
+ this.lastChild.nextSibling = child;
+ }
+ this.lastChild = another.lastChild;
+ do {
+ child.parentNode = this;
+ } while ((child = child.nextSibling));
+ another.firstChild = null;
+ another.lastChild = null;
+};
+ParentNode.prototype.removeChild = function(node) {
+ if (this.firstChild == node) {
+ this.firstChild = node.nextSibling;
+ if (this.lastChild == node) {
+ this.lastChild = null;
+ }
+ } else {
+ var prev = this.firstChild;
+ var next = this.firstChild.nextSibling;
+ while (next != node) {
+ prev = next;
+ next = next.nextSibling;
+ }
+ prev.nextSibling = node.nextSibling;
+ if (this.lastChild == node) {
+ this.lastChild = prev;
+ }
+ }
+ node.parentNode = null;
+ return node;
+};
+
+Object.defineProperty(ParentNode.prototype, 'endLocator', {
+ get: function() {
+ return this._endLocator;
+ },
+ set: function(endLocator) {
+ this._endLocator = {
+ lineNumber: endLocator.lineNumber,
+ columnNumber: endLocator.columnNumber
+ };
+ }
+});
+function Document (locator) {
+ ParentNode.call(this, locator);
+ this.nodeType = NodeType.DOCUMENT;
+}
+
+Document.prototype = Object.create(ParentNode.prototype);
+Document.prototype.visit = function(treeParser) {
+ treeParser.startDocument(this);
+};
+Document.prototype.revisit = function(treeParser) {
+ treeParser.endDocument(this.endLocator);
+};
+function DocumentFragment() {
+ ParentNode.call(this, new Locator());
+ this.nodeType = NodeType.DOCUMENT_FRAGMENT;
+}
+
+DocumentFragment.prototype = Object.create(ParentNode.prototype);
+DocumentFragment.prototype.visit = function(treeParser) {
+};
+function Element(locator, uri, localName, qName, atts, prefixMappings) {
+ ParentNode.call(this, locator);
+ this.uri = uri;
+ this.localName = localName;
+ this.qName = qName;
+ this.attributes = atts;
+ this.prefixMappings = prefixMappings;
+ this.nodeType = NodeType.ELEMENT;
+}
+
+Element.prototype = Object.create(ParentNode.prototype);
+Element.prototype.visit = function(treeParser) {
+ if (this.prefixMappings) {
+ for (var key in prefixMappings) {
+ var mapping = prefixMappings[key];
+ treeParser.startPrefixMapping(mapping.getPrefix(),
+ mapping.getUri(), this);
+ }
+ }
+ treeParser.startElement(this.uri, this.localName, this.qName, this.attributes, this);
+};
+Element.prototype.revisit = function(treeParser) {
+ treeParser.endElement(this.uri, this.localName, this.qName, this.endLocator);
+ if (this.prefixMappings) {
+ for (var key in prefixMappings) {
+ var mapping = prefixMappings[key];
+ treeParser.endPrefixMapping(mapping.getPrefix(), this.endLocator);
+ }
+ }
+};
+function Characters(locator, data){
+ Node.call(this, locator);
+ this.data = data;
+ this.nodeType = NodeType.CHARACTERS;
+}
+
+Characters.prototype = Object.create(Node.prototype);
+Characters.prototype.visit = function (treeParser) {
+ treeParser.characters(this.data, 0, this.data.length, this);
+};
+function IgnorableWhitespace(locator, data) {
+ Node.call(this, locator);
+ this.data = data;
+ this.nodeType = NodeType.IGNORABLE_WHITESPACE;
+}
+
+IgnorableWhitespace.prototype = Object.create(Node.prototype);
+IgnorableWhitespace.prototype.visit = function(treeParser) {
+ treeParser.ignorableWhitespace(this.data, 0, this.data.length, this);
+};
+function Comment(locator, data) {
+ Node.call(this, locator);
+ this.data = data;
+ this.nodeType = NodeType.COMMENT;
+}
+
+Comment.prototype = Object.create(Node.prototype);
+Comment.prototype.visit = function(treeParser) {
+ treeParser.comment(this.data, 0, this.data.length, this);
+};
+function CDATA(locator) {
+ ParentNode.call(this, locator);
+ this.nodeType = NodeType.CDATA;
+}
+
+CDATA.prototype = Object.create(ParentNode.prototype);
+CDATA.prototype.visit = function(treeParser) {
+ treeParser.startCDATA(this);
+};
+CDATA.prototype.revisit = function(treeParser) {
+ treeParser.endCDATA(this.endLocator);
+};
+function Entity(name) {
+ ParentNode.call(this);
+ this.name = name;
+ this.nodeType = NodeType.ENTITY;
+}
+
+Entity.prototype = Object.create(ParentNode.prototype);
+Entity.prototype.visit = function(treeParser) {
+ treeParser.startEntity(this.name, this);
+};
+Entity.prototype.revisit = function(treeParser) {
+ treeParser.endEntity(this.name);
+};
+
+function SkippedEntity(name) {
+ Node.call(this);
+ this.name = name;
+ this.nodeType = NodeType.SKIPPED_ENTITY;
+}
+
+SkippedEntity.prototype = Object.create(Node.prototype);
+SkippedEntity.prototype.visit = function(treeParser) {
+ treeParser.skippedEntity(this.name, this);
+};
+function ProcessingInstruction(target, data) {
+ Node.call(this);
+ this.target = target;
+ this.data = data;
+}
+
+ProcessingInstruction.prototype = Object.create(Node.prototype);
+ProcessingInstruction.prototype.visit = function(treeParser) {
+ treeParser.processingInstruction(this.target, this.data, this);
+};
+ProcessingInstruction.prototype.getNodeType = function() {
+ return NodeType.PROCESSING_INSTRUCTION;
+};
+function DTD(name, publicIdentifier, systemIdentifier) {
+ ParentNode.call(this);
+ this.name = name;
+ this.publicIdentifier = publicIdentifier;
+ this.systemIdentifier = systemIdentifier;
+ this.nodeType = NodeType.DTD;
+}
+
+DTD.prototype = Object.create(ParentNode.prototype);
+DTD.prototype.visit = function(treeParser) {
+ treeParser.startDTD(this.name, this.publicIdentifier, this.systemIdentifier, this);
+};
+DTD.prototype.revisit = function(treeParser) {
+ treeParser.endDTD();
+};
+
+exports.SAXTreeBuilder = SAXTreeBuilder;
+
+},
+{"../TreeBuilder":6,"util":20}],
+11:[function(_dereq_,module,exports){
+function TreeParser(contentHandler, lexicalHandler){
+ this.contentHandler;
+ this.lexicalHandler;
+ this.locatorDelegate;
+
+ if (!contentHandler) {
+ throw new IllegalArgumentException("contentHandler was null.");
+ }
+ this.contentHandler = contentHandler;
+ if (!lexicalHandler) {
+ this.lexicalHandler = new NullLexicalHandler();
+ } else {
+ this.lexicalHandler = lexicalHandler;
+ }
+}
+TreeParser.prototype.parse = function(node) {
+ this.contentHandler.documentLocator = this;
+ var current = node;
+ var next;
+ for (;;) {
+ current.visit(this);
+ if (next = current.firstChild) {
+ current = next;
+ continue;
+ }
+ for (;;) {
+ current.revisit(this);
+ if (current == node) {
+ return;
+ }
+ if (next = current.nextSibling) {
+ current = next;
+ break;
+ }
+ current = current.parentNode;
+ }
+ }
+};
+TreeParser.prototype.characters = function(ch, start, length, locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.characters(ch, start, length);
+};
+TreeParser.prototype.endDocument = function(locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.endDocument();
+};
+TreeParser.prototype.endElement = function(uri, localName, qName, locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.endElement(uri, localName, qName);
+};
+TreeParser.prototype.endPrefixMapping = function(prefix, locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.endPrefixMapping(prefix);
+};
+TreeParser.prototype.ignorableWhitespace = function(ch, start, length, locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.ignorableWhitespace(ch, start, length);
+};
+TreeParser.prototype.processingInstruction = function(target, data, locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.processingInstruction(target, data);
+};
+TreeParser.prototype.skippedEntity = function(name, locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.skippedEntity(name);
+};
+TreeParser.prototype.startDocument = function(locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.startDocument();
+};
+TreeParser.prototype.startElement = function(uri, localName, qName, atts, locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.startElement(uri, localName, qName, atts);
+};
+TreeParser.prototype.startPrefixMapping = function(prefix, uri, locator) {
+ this.locatorDelegate = locator;
+ this.contentHandler.startPrefixMapping(prefix, uri);
+};
+TreeParser.prototype.comment = function(ch, start, length, locator) {
+ this.locatorDelegate = locator;
+ this.lexicalHandler.comment(ch, start, length);
+};
+TreeParser.prototype.endCDATA = function(locator) {
+ this.locatorDelegate = locator;
+ this.lexicalHandler.endCDATA();
+};
+TreeParser.prototype.endDTD = function(locator) {
+ this.locatorDelegate = locator;
+ this.lexicalHandler.endDTD();
+};
+TreeParser.prototype.endEntity = function(name, locator) {
+ this.locatorDelegate = locator;
+ this.lexicalHandler.endEntity(name);
+};
+TreeParser.prototype.startCDATA = function(locator) {
+ this.locatorDelegate = locator;
+ this.lexicalHandler.startCDATA();
+};
+TreeParser.prototype.startDTD = function(name, publicId, systemId, locator) {
+ this.locatorDelegate = locator;
+ this.lexicalHandler.startDTD(name, publicId, systemId);
+};
+TreeParser.prototype.startEntity = function(name, locator) {
+ this.locatorDelegate = locator;
+ this.lexicalHandler.startEntity(name);
+};
+
+Object.defineProperty(TreeParser.prototype, 'columnNumber', {
+ get: function() {
+ if (!this.locatorDelegate)
+ return -1;
+ else
+ return this.locatorDelegate.columnNumber;
+ }
+});
+
+Object.defineProperty(TreeParser.prototype, 'lineNumber', {
+ get: function() {
+ if (!this.locatorDelegate)
+ return -1;
+ else
+ return this.locatorDelegate.lineNumber;
+ }
+});
+function NullLexicalHandler() {
+
+}
+
+NullLexicalHandler.prototype.comment = function() {};
+NullLexicalHandler.prototype.endCDATA = function() {};
+NullLexicalHandler.prototype.endDTD = function() {};
+NullLexicalHandler.prototype.endEntity = function() {};
+NullLexicalHandler.prototype.startCDATA = function() {};
+NullLexicalHandler.prototype.startDTD = function() {};
+NullLexicalHandler.prototype.startEntity = function() {};
+
+exports.TreeParser = TreeParser;
+
+},
+{}],
+12:[function(_dereq_,module,exports){
+module.exports = {
+ "Aacute;": "\u00C1",
+ "Aacute": "\u00C1",
+ "aacute;": "\u00E1",
+ "aacute": "\u00E1",
+ "Abreve;": "\u0102",
+ "abreve;": "\u0103",
+ "ac;": "\u223E",
+ "acd;": "\u223F",
+ "acE;": "\u223E\u0333",
+ "Acirc;": "\u00C2",
+ "Acirc": "\u00C2",
+ "acirc;": "\u00E2",
+ "acirc": "\u00E2",
+ "acute;": "\u00B4",
+ "acute": "\u00B4",
+ "Acy;": "\u0410",
+ "acy;": "\u0430",
+ "AElig;": "\u00C6",
+ "AElig": "\u00C6",
+ "aelig;": "\u00E6",
+ "aelig": "\u00E6",
+ "af;": "\u2061",
+ "Afr;": "\uD835\uDD04",
+ "afr;": "\uD835\uDD1E",
+ "Agrave;": "\u00C0",
+ "Agrave": "\u00C0",
+ "agrave;": "\u00E0",
+ "agrave": "\u00E0",
+ "alefsym;": "\u2135",
+ "aleph;": "\u2135",
+ "Alpha;": "\u0391",
+ "alpha;": "\u03B1",
+ "Amacr;": "\u0100",
+ "amacr;": "\u0101",
+ "amalg;": "\u2A3F",
+ "amp;": "\u0026",
+ "amp": "\u0026",
+ "AMP;": "\u0026",
+ "AMP": "\u0026",
+ "andand;": "\u2A55",
+ "And;": "\u2A53",
+ "and;": "\u2227",
+ "andd;": "\u2A5C",
+ "andslope;": "\u2A58",
+ "andv;": "\u2A5A",
+ "ang;": "\u2220",
+ "ange;": "\u29A4",
+ "angle;": "\u2220",
+ "angmsdaa;": "\u29A8",
+ "angmsdab;": "\u29A9",
+ "angmsdac;": "\u29AA",
+ "angmsdad;": "\u29AB",
+ "angmsdae;": "\u29AC",
+ "angmsdaf;": "\u29AD",
+ "angmsdag;": "\u29AE",
+ "angmsdah;": "\u29AF",
+ "angmsd;": "\u2221",
+ "angrt;": "\u221F",
+ "angrtvb;": "\u22BE",
+ "angrtvbd;": "\u299D",
+ "angsph;": "\u2222",
+ "angst;": "\u00C5",
+ "angzarr;": "\u237C",
+ "Aogon;": "\u0104",
+ "aogon;": "\u0105",
+ "Aopf;": "\uD835\uDD38",
+ "aopf;": "\uD835\uDD52",
+ "apacir;": "\u2A6F",
+ "ap;": "\u2248",
+ "apE;": "\u2A70",
+ "ape;": "\u224A",
+ "apid;": "\u224B",
+ "apos;": "\u0027",
+ "ApplyFunction;": "\u2061",
+ "approx;": "\u2248",
+ "approxeq;": "\u224A",
+ "Aring;": "\u00C5",
+ "Aring": "\u00C5",
+ "aring;": "\u00E5",
+ "aring": "\u00E5",
+ "Ascr;": "\uD835\uDC9C",
+ "ascr;": "\uD835\uDCB6",
+ "Assign;": "\u2254",
+ "ast;": "\u002A",
+ "asymp;": "\u2248",
+ "asympeq;": "\u224D",
+ "Atilde;": "\u00C3",
+ "Atilde": "\u00C3",
+ "atilde;": "\u00E3",
+ "atilde": "\u00E3",
+ "Auml;": "\u00C4",
+ "Auml": "\u00C4",
+ "auml;": "\u00E4",
+ "auml": "\u00E4",
+ "awconint;": "\u2233",
+ "awint;": "\u2A11",
+ "backcong;": "\u224C",
+ "backepsilon;": "\u03F6",
+ "backprime;": "\u2035",
+ "backsim;": "\u223D",
+ "backsimeq;": "\u22CD",
+ "Backslash;": "\u2216",
+ "Barv;": "\u2AE7",
+ "barvee;": "\u22BD",
+ "barwed;": "\u2305",
+ "Barwed;": "\u2306",
+ "barwedge;": "\u2305",
+ "bbrk;": "\u23B5",
+ "bbrktbrk;": "\u23B6",
+ "bcong;": "\u224C",
+ "Bcy;": "\u0411",
+ "bcy;": "\u0431",
+ "bdquo;": "\u201E",
+ "becaus;": "\u2235",
+ "because;": "\u2235",
+ "Because;": "\u2235",
+ "bemptyv;": "\u29B0",
+ "bepsi;": "\u03F6",
+ "bernou;": "\u212C",
+ "Bernoullis;": "\u212C",
+ "Beta;": "\u0392",
+ "beta;": "\u03B2",
+ "beth;": "\u2136",
+ "between;": "\u226C",
+ "Bfr;": "\uD835\uDD05",
+ "bfr;": "\uD835\uDD1F",
+ "bigcap;": "\u22C2",
+ "bigcirc;": "\u25EF",
+ "bigcup;": "\u22C3",
+ "bigodot;": "\u2A00",
+ "bigoplus;": "\u2A01",
+ "bigotimes;": "\u2A02",
+ "bigsqcup;": "\u2A06",
+ "bigstar;": "\u2605",
+ "bigtriangledown;": "\u25BD",
+ "bigtriangleup;": "\u25B3",
+ "biguplus;": "\u2A04",
+ "bigvee;": "\u22C1",
+ "bigwedge;": "\u22C0",
+ "bkarow;": "\u290D",
+ "blacklozenge;": "\u29EB",
+ "blacksquare;": "\u25AA",
+ "blacktriangle;": "\u25B4",
+ "blacktriangledown;": "\u25BE",
+ "blacktriangleleft;": "\u25C2",
+ "blacktriangleright;": "\u25B8",
+ "blank;": "\u2423",
+ "blk12;": "\u2592",
+ "blk14;": "\u2591",
+ "blk34;": "\u2593",
+ "block;": "\u2588",
+ "bne;": "\u003D\u20E5",
+ "bnequiv;": "\u2261\u20E5",
+ "bNot;": "\u2AED",
+ "bnot;": "\u2310",
+ "Bopf;": "\uD835\uDD39",
+ "bopf;": "\uD835\uDD53",
+ "bot;": "\u22A5",
+ "bottom;": "\u22A5",
+ "bowtie;": "\u22C8",
+ "boxbox;": "\u29C9",
+ "boxdl;": "\u2510",
+ "boxdL;": "\u2555",
+ "boxDl;": "\u2556",
+ "boxDL;": "\u2557",
+ "boxdr;": "\u250C",
+ "boxdR;": "\u2552",
+ "boxDr;": "\u2553",
+ "boxDR;": "\u2554",
+ "boxh;": "\u2500",
+ "boxH;": "\u2550",
+ "boxhd;": "\u252C",
+ "boxHd;": "\u2564",
+ "boxhD;": "\u2565",
+ "boxHD;": "\u2566",
+ "boxhu;": "\u2534",
+ "boxHu;": "\u2567",
+ "boxhU;": "\u2568",
+ "boxHU;": "\u2569",
+ "boxminus;": "\u229F",
+ "boxplus;": "\u229E",
+ "boxtimes;": "\u22A0",
+ "boxul;": "\u2518",
+ "boxuL;": "\u255B",
+ "boxUl;": "\u255C",
+ "boxUL;": "\u255D",
+ "boxur;": "\u2514",
+ "boxuR;": "\u2558",
+ "boxUr;": "\u2559",
+ "boxUR;": "\u255A",
+ "boxv;": "\u2502",
+ "boxV;": "\u2551",
+ "boxvh;": "\u253C",
+ "boxvH;": "\u256A",
+ "boxVh;": "\u256B",
+ "boxVH;": "\u256C",
+ "boxvl;": "\u2524",
+ "boxvL;": "\u2561",
+ "boxVl;": "\u2562",
+ "boxVL;": "\u2563",
+ "boxvr;": "\u251C",
+ "boxvR;": "\u255E",
+ "boxVr;": "\u255F",
+ "boxVR;": "\u2560",
+ "bprime;": "\u2035",
+ "breve;": "\u02D8",
+ "Breve;": "\u02D8",
+ "brvbar;": "\u00A6",
+ "brvbar": "\u00A6",
+ "bscr;": "\uD835\uDCB7",
+ "Bscr;": "\u212C",
+ "bsemi;": "\u204F",
+ "bsim;": "\u223D",
+ "bsime;": "\u22CD",
+ "bsolb;": "\u29C5",
+ "bsol;": "\u005C",
+ "bsolhsub;": "\u27C8",
+ "bull;": "\u2022",
+ "bullet;": "\u2022",
+ "bump;": "\u224E",
+ "bumpE;": "\u2AAE",
+ "bumpe;": "\u224F",
+ "Bumpeq;": "\u224E",
+ "bumpeq;": "\u224F",
+ "Cacute;": "\u0106",
+ "cacute;": "\u0107",
+ "capand;": "\u2A44",
+ "capbrcup;": "\u2A49",
+ "capcap;": "\u2A4B",
+ "cap;": "\u2229",
+ "Cap;": "\u22D2",
+ "capcup;": "\u2A47",
+ "capdot;": "\u2A40",
+ "CapitalDifferentialD;": "\u2145",
+ "caps;": "\u2229\uFE00",
+ "caret;": "\u2041",
+ "caron;": "\u02C7",
+ "Cayleys;": "\u212D",
+ "ccaps;": "\u2A4D",
+ "Ccaron;": "\u010C",
+ "ccaron;": "\u010D",
+ "Ccedil;": "\u00C7",
+ "Ccedil": "\u00C7",
+ "ccedil;": "\u00E7",
+ "ccedil": "\u00E7",
+ "Ccirc;": "\u0108",
+ "ccirc;": "\u0109",
+ "Cconint;": "\u2230",
+ "ccups;": "\u2A4C",
+ "ccupssm;": "\u2A50",
+ "Cdot;": "\u010A",
+ "cdot;": "\u010B",
+ "cedil;": "\u00B8",
+ "cedil": "\u00B8",
+ "Cedilla;": "\u00B8",
+ "cemptyv;": "\u29B2",
+ "cent;": "\u00A2",
+ "cent": "\u00A2",
+ "centerdot;": "\u00B7",
+ "CenterDot;": "\u00B7",
+ "cfr;": "\uD835\uDD20",
+ "Cfr;": "\u212D",
+ "CHcy;": "\u0427",
+ "chcy;": "\u0447",
+ "check;": "\u2713",
+ "checkmark;": "\u2713",
+ "Chi;": "\u03A7",
+ "chi;": "\u03C7",
+ "circ;": "\u02C6",
+ "circeq;": "\u2257",
+ "circlearrowleft;": "\u21BA",
+ "circlearrowright;": "\u21BB",
+ "circledast;": "\u229B",
+ "circledcirc;": "\u229A",
+ "circleddash;": "\u229D",
+ "CircleDot;": "\u2299",
+ "circledR;": "\u00AE",
+ "circledS;": "\u24C8",
+ "CircleMinus;": "\u2296",
+ "CirclePlus;": "\u2295",
+ "CircleTimes;": "\u2297",
+ "cir;": "\u25CB",
+ "cirE;": "\u29C3",
+ "cire;": "\u2257",
+ "cirfnint;": "\u2A10",
+ "cirmid;": "\u2AEF",
+ "cirscir;": "\u29C2",
+ "ClockwiseContourIntegral;": "\u2232",
+ "CloseCurlyDoubleQuote;": "\u201D",
+ "CloseCurlyQuote;": "\u2019",
+ "clubs;": "\u2663",
+ "clubsuit;": "\u2663",
+ "colon;": "\u003A",
+ "Colon;": "\u2237",
+ "Colone;": "\u2A74",
+ "colone;": "\u2254",
+ "coloneq;": "\u2254",
+ "comma;": "\u002C",
+ "commat;": "\u0040",
+ "comp;": "\u2201",
+ "compfn;": "\u2218",
+ "complement;": "\u2201",
+ "complexes;": "\u2102",
+ "cong;": "\u2245",
+ "congdot;": "\u2A6D",
+ "Congruent;": "\u2261",
+ "conint;": "\u222E",
+ "Conint;": "\u222F",
+ "ContourIntegral;": "\u222E",
+ "copf;": "\uD835\uDD54",
+ "Copf;": "\u2102",
+ "coprod;": "\u2210",
+ "Coproduct;": "\u2210",
+ "copy;": "\u00A9",
+ "copy": "\u00A9",
+ "COPY;": "\u00A9",
+ "COPY": "\u00A9",
+ "copysr;": "\u2117",
+ "CounterClockwiseContourIntegral;": "\u2233",
+ "crarr;": "\u21B5",
+ "cross;": "\u2717",
+ "Cross;": "\u2A2F",
+ "Cscr;": "\uD835\uDC9E",
+ "cscr;": "\uD835\uDCB8",
+ "csub;": "\u2ACF",
+ "csube;": "\u2AD1",
+ "csup;": "\u2AD0",
+ "csupe;": "\u2AD2",
+ "ctdot;": "\u22EF",
+ "cudarrl;": "\u2938",
+ "cudarrr;": "\u2935",
+ "cuepr;": "\u22DE",
+ "cuesc;": "\u22DF",
+ "cularr;": "\u21B6",
+ "cularrp;": "\u293D",
+ "cupbrcap;": "\u2A48",
+ "cupcap;": "\u2A46",
+ "CupCap;": "\u224D",
+ "cup;": "\u222A",
+ "Cup;": "\u22D3",
+ "cupcup;": "\u2A4A",
+ "cupdot;": "\u228D",
+ "cupor;": "\u2A45",
+ "cups;": "\u222A\uFE00",
+ "curarr;": "\u21B7",
+ "curarrm;": "\u293C",
+ "curlyeqprec;": "\u22DE",
+ "curlyeqsucc;": "\u22DF",
+ "curlyvee;": "\u22CE",
+ "curlywedge;": "\u22CF",
+ "curren;": "\u00A4",
+ "curren": "\u00A4",
+ "curvearrowleft;": "\u21B6",
+ "curvearrowright;": "\u21B7",
+ "cuvee;": "\u22CE",
+ "cuwed;": "\u22CF",
+ "cwconint;": "\u2232",
+ "cwint;": "\u2231",
+ "cylcty;": "\u232D",
+ "dagger;": "\u2020",
+ "Dagger;": "\u2021",
+ "daleth;": "\u2138",
+ "darr;": "\u2193",
+ "Darr;": "\u21A1",
+ "dArr;": "\u21D3",
+ "dash;": "\u2010",
+ "Dashv;": "\u2AE4",
+ "dashv;": "\u22A3",
+ "dbkarow;": "\u290F",
+ "dblac;": "\u02DD",
+ "Dcaron;": "\u010E",
+ "dcaron;": "\u010F",
+ "Dcy;": "\u0414",
+ "dcy;": "\u0434",
+ "ddagger;": "\u2021",
+ "ddarr;": "\u21CA",
+ "DD;": "\u2145",
+ "dd;": "\u2146",
+ "DDotrahd;": "\u2911",
+ "ddotseq;": "\u2A77",
+ "deg;": "\u00B0",
+ "deg": "\u00B0",
+ "Del;": "\u2207",
+ "Delta;": "\u0394",
+ "delta;": "\u03B4",
+ "demptyv;": "\u29B1",
+ "dfisht;": "\u297F",
+ "Dfr;": "\uD835\uDD07",
+ "dfr;": "\uD835\uDD21",
+ "dHar;": "\u2965",
+ "dharl;": "\u21C3",
+ "dharr;": "\u21C2",
+ "DiacriticalAcute;": "\u00B4",
+ "DiacriticalDot;": "\u02D9",
+ "DiacriticalDoubleAcute;": "\u02DD",
+ "DiacriticalGrave;": "\u0060",
+ "DiacriticalTilde;": "\u02DC",
+ "diam;": "\u22C4",
+ "diamond;": "\u22C4",
+ "Diamond;": "\u22C4",
+ "diamondsuit;": "\u2666",
+ "diams;": "\u2666",
+ "die;": "\u00A8",
+ "DifferentialD;": "\u2146",
+ "digamma;": "\u03DD",
+ "disin;": "\u22F2",
+ "div;": "\u00F7",
+ "divide;": "\u00F7",
+ "divide": "\u00F7",
+ "divideontimes;": "\u22C7",
+ "divonx;": "\u22C7",
+ "DJcy;": "\u0402",
+ "djcy;": "\u0452",
+ "dlcorn;": "\u231E",
+ "dlcrop;": "\u230D",
+ "dollar;": "\u0024",
+ "Dopf;": "\uD835\uDD3B",
+ "dopf;": "\uD835\uDD55",
+ "Dot;": "\u00A8",
+ "dot;": "\u02D9",
+ "DotDot;": "\u20DC",
+ "doteq;": "\u2250",
+ "doteqdot;": "\u2251",
+ "DotEqual;": "\u2250",
+ "dotminus;": "\u2238",
+ "dotplus;": "\u2214",
+ "dotsquare;": "\u22A1",
+ "doublebarwedge;": "\u2306",
+ "DoubleContourIntegral;": "\u222F",
+ "DoubleDot;": "\u00A8",
+ "DoubleDownArrow;": "\u21D3",
+ "DoubleLeftArrow;": "\u21D0",
+ "DoubleLeftRightArrow;": "\u21D4",
+ "DoubleLeftTee;": "\u2AE4",
+ "DoubleLongLeftArrow;": "\u27F8",
+ "DoubleLongLeftRightArrow;": "\u27FA",
+ "DoubleLongRightArrow;": "\u27F9",
+ "DoubleRightArrow;": "\u21D2",
+ "DoubleRightTee;": "\u22A8",
+ "DoubleUpArrow;": "\u21D1",
+ "DoubleUpDownArrow;": "\u21D5",
+ "DoubleVerticalBar;": "\u2225",
+ "DownArrowBar;": "\u2913",
+ "downarrow;": "\u2193",
+ "DownArrow;": "\u2193",
+ "Downarrow;": "\u21D3",
+ "DownArrowUpArrow;": "\u21F5",
+ "DownBreve;": "\u0311",
+ "downdownarrows;": "\u21CA",
+ "downharpoonleft;": "\u21C3",
+ "downharpoonright;": "\u21C2",
+ "DownLeftRightVector;": "\u2950",
+ "DownLeftTeeVector;": "\u295E",
+ "DownLeftVectorBar;": "\u2956",
+ "DownLeftVector;": "\u21BD",
+ "DownRightTeeVector;": "\u295F",
+ "DownRightVectorBar;": "\u2957",
+ "DownRightVector;": "\u21C1",
+ "DownTeeArrow;": "\u21A7",
+ "DownTee;": "\u22A4",
+ "drbkarow;": "\u2910",
+ "drcorn;": "\u231F",
+ "drcrop;": "\u230C",
+ "Dscr;": "\uD835\uDC9F",
+ "dscr;": "\uD835\uDCB9",
+ "DScy;": "\u0405",
+ "dscy;": "\u0455",
+ "dsol;": "\u29F6",
+ "Dstrok;": "\u0110",
+ "dstrok;": "\u0111",
+ "dtdot;": "\u22F1",
+ "dtri;": "\u25BF",
+ "dtrif;": "\u25BE",
+ "duarr;": "\u21F5",
+ "duhar;": "\u296F",
+ "dwangle;": "\u29A6",
+ "DZcy;": "\u040F",
+ "dzcy;": "\u045F",
+ "dzigrarr;": "\u27FF",
+ "Eacute;": "\u00C9",
+ "Eacute": "\u00C9",
+ "eacute;": "\u00E9",
+ "eacute": "\u00E9",
+ "easter;": "\u2A6E",
+ "Ecaron;": "\u011A",
+ "ecaron;": "\u011B",
+ "Ecirc;": "\u00CA",
+ "Ecirc": "\u00CA",
+ "ecirc;": "\u00EA",
+ "ecirc": "\u00EA",
+ "ecir;": "\u2256",
+ "ecolon;": "\u2255",
+ "Ecy;": "\u042D",
+ "ecy;": "\u044D",
+ "eDDot;": "\u2A77",
+ "Edot;": "\u0116",
+ "edot;": "\u0117",
+ "eDot;": "\u2251",
+ "ee;": "\u2147",
+ "efDot;": "\u2252",
+ "Efr;": "\uD835\uDD08",
+ "efr;": "\uD835\uDD22",
+ "eg;": "\u2A9A",
+ "Egrave;": "\u00C8",
+ "Egrave": "\u00C8",
+ "egrave;": "\u00E8",
+ "egrave": "\u00E8",
+ "egs;": "\u2A96",
+ "egsdot;": "\u2A98",
+ "el;": "\u2A99",
+ "Element;": "\u2208",
+ "elinters;": "\u23E7",
+ "ell;": "\u2113",
+ "els;": "\u2A95",
+ "elsdot;": "\u2A97",
+ "Emacr;": "\u0112",
+ "emacr;": "\u0113",
+ "empty;": "\u2205",
+ "emptyset;": "\u2205",
+ "EmptySmallSquare;": "\u25FB",
+ "emptyv;": "\u2205",
+ "EmptyVerySmallSquare;": "\u25AB",
+ "emsp13;": "\u2004",
+ "emsp14;": "\u2005",
+ "emsp;": "\u2003",
+ "ENG;": "\u014A",
+ "eng;": "\u014B",
+ "ensp;": "\u2002",
+ "Eogon;": "\u0118",
+ "eogon;": "\u0119",
+ "Eopf;": "\uD835\uDD3C",
+ "eopf;": "\uD835\uDD56",
+ "epar;": "\u22D5",
+ "eparsl;": "\u29E3",
+ "eplus;": "\u2A71",
+ "epsi;": "\u03B5",
+ "Epsilon;": "\u0395",
+ "epsilon;": "\u03B5",
+ "epsiv;": "\u03F5",
+ "eqcirc;": "\u2256",
+ "eqcolon;": "\u2255",
+ "eqsim;": "\u2242",
+ "eqslantgtr;": "\u2A96",
+ "eqslantless;": "\u2A95",
+ "Equal;": "\u2A75",
+ "equals;": "\u003D",
+ "EqualTilde;": "\u2242",
+ "equest;": "\u225F",
+ "Equilibrium;": "\u21CC",
+ "equiv;": "\u2261",
+ "equivDD;": "\u2A78",
+ "eqvparsl;": "\u29E5",
+ "erarr;": "\u2971",
+ "erDot;": "\u2253",
+ "escr;": "\u212F",
+ "Escr;": "\u2130",
+ "esdot;": "\u2250",
+ "Esim;": "\u2A73",
+ "esim;": "\u2242",
+ "Eta;": "\u0397",
+ "eta;": "\u03B7",
+ "ETH;": "\u00D0",
+ "ETH": "\u00D0",
+ "eth;": "\u00F0",
+ "eth": "\u00F0",
+ "Euml;": "\u00CB",
+ "Euml": "\u00CB",
+ "euml;": "\u00EB",
+ "euml": "\u00EB",
+ "euro;": "\u20AC",
+ "excl;": "\u0021",
+ "exist;": "\u2203",
+ "Exists;": "\u2203",
+ "expectation;": "\u2130",
+ "exponentiale;": "\u2147",
+ "ExponentialE;": "\u2147",
+ "fallingdotseq;": "\u2252",
+ "Fcy;": "\u0424",
+ "fcy;": "\u0444",
+ "female;": "\u2640",
+ "ffilig;": "\uFB03",
+ "fflig;": "\uFB00",
+ "ffllig;": "\uFB04",
+ "Ffr;": "\uD835\uDD09",
+ "ffr;": "\uD835\uDD23",
+ "filig;": "\uFB01",
+ "FilledSmallSquare;": "\u25FC",
+ "FilledVerySmallSquare;": "\u25AA",
+ "fjlig;": "\u0066\u006A",
+ "flat;": "\u266D",
+ "fllig;": "\uFB02",
+ "fltns;": "\u25B1",
+ "fnof;": "\u0192",
+ "Fopf;": "\uD835\uDD3D",
+ "fopf;": "\uD835\uDD57",
+ "forall;": "\u2200",
+ "ForAll;": "\u2200",
+ "fork;": "\u22D4",
+ "forkv;": "\u2AD9",
+ "Fouriertrf;": "\u2131",
+ "fpartint;": "\u2A0D",
+ "frac12;": "\u00BD",
+ "frac12": "\u00BD",
+ "frac13;": "\u2153",
+ "frac14;": "\u00BC",
+ "frac14": "\u00BC",
+ "frac15;": "\u2155",
+ "frac16;": "\u2159",
+ "frac18;": "\u215B",
+ "frac23;": "\u2154",
+ "frac25;": "\u2156",
+ "frac34;": "\u00BE",
+ "frac34": "\u00BE",
+ "frac35;": "\u2157",
+ "frac38;": "\u215C",
+ "frac45;": "\u2158",
+ "frac56;": "\u215A",
+ "frac58;": "\u215D",
+ "frac78;": "\u215E",
+ "frasl;": "\u2044",
+ "frown;": "\u2322",
+ "fscr;": "\uD835\uDCBB",
+ "Fscr;": "\u2131",
+ "gacute;": "\u01F5",
+ "Gamma;": "\u0393",
+ "gamma;": "\u03B3",
+ "Gammad;": "\u03DC",
+ "gammad;": "\u03DD",
+ "gap;": "\u2A86",
+ "Gbreve;": "\u011E",
+ "gbreve;": "\u011F",
+ "Gcedil;": "\u0122",
+ "Gcirc;": "\u011C",
+ "gcirc;": "\u011D",
+ "Gcy;": "\u0413",
+ "gcy;": "\u0433",
+ "Gdot;": "\u0120",
+ "gdot;": "\u0121",
+ "ge;": "\u2265",
+ "gE;": "\u2267",
+ "gEl;": "\u2A8C",
+ "gel;": "\u22DB",
+ "geq;": "\u2265",
+ "geqq;": "\u2267",
+ "geqslant;": "\u2A7E",
+ "gescc;": "\u2AA9",
+ "ges;": "\u2A7E",
+ "gesdot;": "\u2A80",
+ "gesdoto;": "\u2A82",
+ "gesdotol;": "\u2A84",
+ "gesl;": "\u22DB\uFE00",
+ "gesles;": "\u2A94",
+ "Gfr;": "\uD835\uDD0A",
+ "gfr;": "\uD835\uDD24",
+ "gg;": "\u226B",
+ "Gg;": "\u22D9",
+ "ggg;": "\u22D9",
+ "gimel;": "\u2137",
+ "GJcy;": "\u0403",
+ "gjcy;": "\u0453",
+ "gla;": "\u2AA5",
+ "gl;": "\u2277",
+ "glE;": "\u2A92",
+ "glj;": "\u2AA4",
+ "gnap;": "\u2A8A",
+ "gnapprox;": "\u2A8A",
+ "gne;": "\u2A88",
+ "gnE;": "\u2269",
+ "gneq;": "\u2A88",
+ "gneqq;": "\u2269",
+ "gnsim;": "\u22E7",
+ "Gopf;": "\uD835\uDD3E",
+ "gopf;": "\uD835\uDD58",
+ "grave;": "\u0060",
+ "GreaterEqual;": "\u2265",
+ "GreaterEqualLess;": "\u22DB",
+ "GreaterFullEqual;": "\u2267",
+ "GreaterGreater;": "\u2AA2",
+ "GreaterLess;": "\u2277",
+ "GreaterSlantEqual;": "\u2A7E",
+ "GreaterTilde;": "\u2273",
+ "Gscr;": "\uD835\uDCA2",
+ "gscr;": "\u210A",
+ "gsim;": "\u2273",
+ "gsime;": "\u2A8E",
+ "gsiml;": "\u2A90",
+ "gtcc;": "\u2AA7",
+ "gtcir;": "\u2A7A",
+ "gt;": "\u003E",
+ "gt": "\u003E",
+ "GT;": "\u003E",
+ "GT": "\u003E",
+ "Gt;": "\u226B",
+ "gtdot;": "\u22D7",
+ "gtlPar;": "\u2995",
+ "gtquest;": "\u2A7C",
+ "gtrapprox;": "\u2A86",
+ "gtrarr;": "\u2978",
+ "gtrdot;": "\u22D7",
+ "gtreqless;": "\u22DB",
+ "gtreqqless;": "\u2A8C",
+ "gtrless;": "\u2277",
+ "gtrsim;": "\u2273",
+ "gvertneqq;": "\u2269\uFE00",
+ "gvnE;": "\u2269\uFE00",
+ "Hacek;": "\u02C7",
+ "hairsp;": "\u200A",
+ "half;": "\u00BD",
+ "hamilt;": "\u210B",
+ "HARDcy;": "\u042A",
+ "hardcy;": "\u044A",
+ "harrcir;": "\u2948",
+ "harr;": "\u2194",
+ "hArr;": "\u21D4",
+ "harrw;": "\u21AD",
+ "Hat;": "\u005E",
+ "hbar;": "\u210F",
+ "Hcirc;": "\u0124",
+ "hcirc;": "\u0125",
+ "hearts;": "\u2665",
+ "heartsuit;": "\u2665",
+ "hellip;": "\u2026",
+ "hercon;": "\u22B9",
+ "hfr;": "\uD835\uDD25",
+ "Hfr;": "\u210C",
+ "HilbertSpace;": "\u210B",
+ "hksearow;": "\u2925",
+ "hkswarow;": "\u2926",
+ "hoarr;": "\u21FF",
+ "homtht;": "\u223B",
+ "hookleftarrow;": "\u21A9",
+ "hookrightarrow;": "\u21AA",
+ "hopf;": "\uD835\uDD59",
+ "Hopf;": "\u210D",
+ "horbar;": "\u2015",
+ "HorizontalLine;": "\u2500",
+ "hscr;": "\uD835\uDCBD",
+ "Hscr;": "\u210B",
+ "hslash;": "\u210F",
+ "Hstrok;": "\u0126",
+ "hstrok;": "\u0127",
+ "HumpDownHump;": "\u224E",
+ "HumpEqual;": "\u224F",
+ "hybull;": "\u2043",
+ "hyphen;": "\u2010",
+ "Iacute;": "\u00CD",
+ "Iacute": "\u00CD",
+ "iacute;": "\u00ED",
+ "iacute": "\u00ED",
+ "ic;": "\u2063",
+ "Icirc;": "\u00CE",
+ "Icirc": "\u00CE",
+ "icirc;": "\u00EE",
+ "icirc": "\u00EE",
+ "Icy;": "\u0418",
+ "icy;": "\u0438",
+ "Idot;": "\u0130",
+ "IEcy;": "\u0415",
+ "iecy;": "\u0435",
+ "iexcl;": "\u00A1",
+ "iexcl": "\u00A1",
+ "iff;": "\u21D4",
+ "ifr;": "\uD835\uDD26",
+ "Ifr;": "\u2111",
+ "Igrave;": "\u00CC",
+ "Igrave": "\u00CC",
+ "igrave;": "\u00EC",
+ "igrave": "\u00EC",
+ "ii;": "\u2148",
+ "iiiint;": "\u2A0C",
+ "iiint;": "\u222D",
+ "iinfin;": "\u29DC",
+ "iiota;": "\u2129",
+ "IJlig;": "\u0132",
+ "ijlig;": "\u0133",
+ "Imacr;": "\u012A",
+ "imacr;": "\u012B",
+ "image;": "\u2111",
+ "ImaginaryI;": "\u2148",
+ "imagline;": "\u2110",
+ "imagpart;": "\u2111",
+ "imath;": "\u0131",
+ "Im;": "\u2111",
+ "imof;": "\u22B7",
+ "imped;": "\u01B5",
+ "Implies;": "\u21D2",
+ "incare;": "\u2105",
+ "in;": "\u2208",
+ "infin;": "\u221E",
+ "infintie;": "\u29DD",
+ "inodot;": "\u0131",
+ "intcal;": "\u22BA",
+ "int;": "\u222B",
+ "Int;": "\u222C",
+ "integers;": "\u2124",
+ "Integral;": "\u222B",
+ "intercal;": "\u22BA",
+ "Intersection;": "\u22C2",
+ "intlarhk;": "\u2A17",
+ "intprod;": "\u2A3C",
+ "InvisibleComma;": "\u2063",
+ "InvisibleTimes;": "\u2062",
+ "IOcy;": "\u0401",
+ "iocy;": "\u0451",
+ "Iogon;": "\u012E",
+ "iogon;": "\u012F",
+ "Iopf;": "\uD835\uDD40",
+ "iopf;": "\uD835\uDD5A",
+ "Iota;": "\u0399",
+ "iota;": "\u03B9",
+ "iprod;": "\u2A3C",
+ "iquest;": "\u00BF",
+ "iquest": "\u00BF",
+ "iscr;": "\uD835\uDCBE",
+ "Iscr;": "\u2110",
+ "isin;": "\u2208",
+ "isindot;": "\u22F5",
+ "isinE;": "\u22F9",
+ "isins;": "\u22F4",
+ "isinsv;": "\u22F3",
+ "isinv;": "\u2208",
+ "it;": "\u2062",
+ "Itilde;": "\u0128",
+ "itilde;": "\u0129",
+ "Iukcy;": "\u0406",
+ "iukcy;": "\u0456",
+ "Iuml;": "\u00CF",
+ "Iuml": "\u00CF",
+ "iuml;": "\u00EF",
+ "iuml": "\u00EF",
+ "Jcirc;": "\u0134",
+ "jcirc;": "\u0135",
+ "Jcy;": "\u0419",
+ "jcy;": "\u0439",
+ "Jfr;": "\uD835\uDD0D",
+ "jfr;": "\uD835\uDD27",
+ "jmath;": "\u0237",
+ "Jopf;": "\uD835\uDD41",
+ "jopf;": "\uD835\uDD5B",
+ "Jscr;": "\uD835\uDCA5",
+ "jscr;": "\uD835\uDCBF",
+ "Jsercy;": "\u0408",
+ "jsercy;": "\u0458",
+ "Jukcy;": "\u0404",
+ "jukcy;": "\u0454",
+ "Kappa;": "\u039A",
+ "kappa;": "\u03BA",
+ "kappav;": "\u03F0",
+ "Kcedil;": "\u0136",
+ "kcedil;": "\u0137",
+ "Kcy;": "\u041A",
+ "kcy;": "\u043A",
+ "Kfr;": "\uD835\uDD0E",
+ "kfr;": "\uD835\uDD28",
+ "kgreen;": "\u0138",
+ "KHcy;": "\u0425",
+ "khcy;": "\u0445",
+ "KJcy;": "\u040C",
+ "kjcy;": "\u045C",
+ "Kopf;": "\uD835\uDD42",
+ "kopf;": "\uD835\uDD5C",
+ "Kscr;": "\uD835\uDCA6",
+ "kscr;": "\uD835\uDCC0",
+ "lAarr;": "\u21DA",
+ "Lacute;": "\u0139",
+ "lacute;": "\u013A",
+ "laemptyv;": "\u29B4",
+ "lagran;": "\u2112",
+ "Lambda;": "\u039B",
+ "lambda;": "\u03BB",
+ "lang;": "\u27E8",
+ "Lang;": "\u27EA",
+ "langd;": "\u2991",
+ "langle;": "\u27E8",
+ "lap;": "\u2A85",
+ "Laplacetrf;": "\u2112",
+ "laquo;": "\u00AB",
+ "laquo": "\u00AB",
+ "larrb;": "\u21E4",
+ "larrbfs;": "\u291F",
+ "larr;": "\u2190",
+ "Larr;": "\u219E",
+ "lArr;": "\u21D0",
+ "larrfs;": "\u291D",
+ "larrhk;": "\u21A9",
+ "larrlp;": "\u21AB",
+ "larrpl;": "\u2939",
+ "larrsim;": "\u2973",
+ "larrtl;": "\u21A2",
+ "latail;": "\u2919",
+ "lAtail;": "\u291B",
+ "lat;": "\u2AAB",
+ "late;": "\u2AAD",
+ "lates;": "\u2AAD\uFE00",
+ "lbarr;": "\u290C",
+ "lBarr;": "\u290E",
+ "lbbrk;": "\u2772",
+ "lbrace;": "\u007B",
+ "lbrack;": "\u005B",
+ "lbrke;": "\u298B",
+ "lbrksld;": "\u298F",
+ "lbrkslu;": "\u298D",
+ "Lcaron;": "\u013D",
+ "lcaron;": "\u013E",
+ "Lcedil;": "\u013B",
+ "lcedil;": "\u013C",
+ "lceil;": "\u2308",
+ "lcub;": "\u007B",
+ "Lcy;": "\u041B",
+ "lcy;": "\u043B",
+ "ldca;": "\u2936",
+ "ldquo;": "\u201C",
+ "ldquor;": "\u201E",
+ "ldrdhar;": "\u2967",
+ "ldrushar;": "\u294B",
+ "ldsh;": "\u21B2",
+ "le;": "\u2264",
+ "lE;": "\u2266",
+ "LeftAngleBracket;": "\u27E8",
+ "LeftArrowBar;": "\u21E4",
+ "leftarrow;": "\u2190",
+ "LeftArrow;": "\u2190",
+ "Leftarrow;": "\u21D0",
+ "LeftArrowRightArrow;": "\u21C6",
+ "leftarrowtail;": "\u21A2",
+ "LeftCeiling;": "\u2308",
+ "LeftDoubleBracket;": "\u27E6",
+ "LeftDownTeeVector;": "\u2961",
+ "LeftDownVectorBar;": "\u2959",
+ "LeftDownVector;": "\u21C3",
+ "LeftFloor;": "\u230A",
+ "leftharpoondown;": "\u21BD",
+ "leftharpoonup;": "\u21BC",
+ "leftleftarrows;": "\u21C7",
+ "leftrightarrow;": "\u2194",
+ "LeftRightArrow;": "\u2194",
+ "Leftrightarrow;": "\u21D4",
+ "leftrightarrows;": "\u21C6",
+ "leftrightharpoons;": "\u21CB",
+ "leftrightsquigarrow;": "\u21AD",
+ "LeftRightVector;": "\u294E",
+ "LeftTeeArrow;": "\u21A4",
+ "LeftTee;": "\u22A3",
+ "LeftTeeVector;": "\u295A",
+ "leftthreetimes;": "\u22CB",
+ "LeftTriangleBar;": "\u29CF",
+ "LeftTriangle;": "\u22B2",
+ "LeftTriangleEqual;": "\u22B4",
+ "LeftUpDownVector;": "\u2951",
+ "LeftUpTeeVector;": "\u2960",
+ "LeftUpVectorBar;": "\u2958",
+ "LeftUpVector;": "\u21BF",
+ "LeftVectorBar;": "\u2952",
+ "LeftVector;": "\u21BC",
+ "lEg;": "\u2A8B",
+ "leg;": "\u22DA",
+ "leq;": "\u2264",
+ "leqq;": "\u2266",
+ "leqslant;": "\u2A7D",
+ "lescc;": "\u2AA8",
+ "les;": "\u2A7D",
+ "lesdot;": "\u2A7F",
+ "lesdoto;": "\u2A81",
+ "lesdotor;": "\u2A83",
+ "lesg;": "\u22DA\uFE00",
+ "lesges;": "\u2A93",
+ "lessapprox;": "\u2A85",
+ "lessdot;": "\u22D6",
+ "lesseqgtr;": "\u22DA",
+ "lesseqqgtr;": "\u2A8B",
+ "LessEqualGreater;": "\u22DA",
+ "LessFullEqual;": "\u2266",
+ "LessGreater;": "\u2276",
+ "lessgtr;": "\u2276",
+ "LessLess;": "\u2AA1",
+ "lesssim;": "\u2272",
+ "LessSlantEqual;": "\u2A7D",
+ "LessTilde;": "\u2272",
+ "lfisht;": "\u297C",
+ "lfloor;": "\u230A",
+ "Lfr;": "\uD835\uDD0F",
+ "lfr;": "\uD835\uDD29",
+ "lg;": "\u2276",
+ "lgE;": "\u2A91",
+ "lHar;": "\u2962",
+ "lhard;": "\u21BD",
+ "lharu;": "\u21BC",
+ "lharul;": "\u296A",
+ "lhblk;": "\u2584",
+ "LJcy;": "\u0409",
+ "ljcy;": "\u0459",
+ "llarr;": "\u21C7",
+ "ll;": "\u226A",
+ "Ll;": "\u22D8",
+ "llcorner;": "\u231E",
+ "Lleftarrow;": "\u21DA",
+ "llhard;": "\u296B",
+ "lltri;": "\u25FA",
+ "Lmidot;": "\u013F",
+ "lmidot;": "\u0140",
+ "lmoustache;": "\u23B0",
+ "lmoust;": "\u23B0",
+ "lnap;": "\u2A89",
+ "lnapprox;": "\u2A89",
+ "lne;": "\u2A87",
+ "lnE;": "\u2268",
+ "lneq;": "\u2A87",
+ "lneqq;": "\u2268",
+ "lnsim;": "\u22E6",
+ "loang;": "\u27EC",
+ "loarr;": "\u21FD",
+ "lobrk;": "\u27E6",
+ "longleftarrow;": "\u27F5",
+ "LongLeftArrow;": "\u27F5",
+ "Longleftarrow;": "\u27F8",
+ "longleftrightarrow;": "\u27F7",
+ "LongLeftRightArrow;": "\u27F7",
+ "Longleftrightarrow;": "\u27FA",
+ "longmapsto;": "\u27FC",
+ "longrightarrow;": "\u27F6",
+ "LongRightArrow;": "\u27F6",
+ "Longrightarrow;": "\u27F9",
+ "looparrowleft;": "\u21AB",
+ "looparrowright;": "\u21AC",
+ "lopar;": "\u2985",
+ "Lopf;": "\uD835\uDD43",
+ "lopf;": "\uD835\uDD5D",
+ "loplus;": "\u2A2D",
+ "lotimes;": "\u2A34",
+ "lowast;": "\u2217",
+ "lowbar;": "\u005F",
+ "LowerLeftArrow;": "\u2199",
+ "LowerRightArrow;": "\u2198",
+ "loz;": "\u25CA",
+ "lozenge;": "\u25CA",
+ "lozf;": "\u29EB",
+ "lpar;": "\u0028",
+ "lparlt;": "\u2993",
+ "lrarr;": "\u21C6",
+ "lrcorner;": "\u231F",
+ "lrhar;": "\u21CB",
+ "lrhard;": "\u296D",
+ "lrm;": "\u200E",
+ "lrtri;": "\u22BF",
+ "lsaquo;": "\u2039",
+ "lscr;": "\uD835\uDCC1",
+ "Lscr;": "\u2112",
+ "lsh;": "\u21B0",
+ "Lsh;": "\u21B0",
+ "lsim;": "\u2272",
+ "lsime;": "\u2A8D",
+ "lsimg;": "\u2A8F",
+ "lsqb;": "\u005B",
+ "lsquo;": "\u2018",
+ "lsquor;": "\u201A",
+ "Lstrok;": "\u0141",
+ "lstrok;": "\u0142",
+ "ltcc;": "\u2AA6",
+ "ltcir;": "\u2A79",
+ "lt;": "\u003C",
+ "lt": "\u003C",
+ "LT;": "\u003C",
+ "LT": "\u003C",
+ "Lt;": "\u226A",
+ "ltdot;": "\u22D6",
+ "lthree;": "\u22CB",
+ "ltimes;": "\u22C9",
+ "ltlarr;": "\u2976",
+ "ltquest;": "\u2A7B",
+ "ltri;": "\u25C3",
+ "ltrie;": "\u22B4",
+ "ltrif;": "\u25C2",
+ "ltrPar;": "\u2996",
+ "lurdshar;": "\u294A",
+ "luruhar;": "\u2966",
+ "lvertneqq;": "\u2268\uFE00",
+ "lvnE;": "\u2268\uFE00",
+ "macr;": "\u00AF",
+ "macr": "\u00AF",
+ "male;": "\u2642",
+ "malt;": "\u2720",
+ "maltese;": "\u2720",
+ "Map;": "\u2905",
+ "map;": "\u21A6",
+ "mapsto;": "\u21A6",
+ "mapstodown;": "\u21A7",
+ "mapstoleft;": "\u21A4",
+ "mapstoup;": "\u21A5",
+ "marker;": "\u25AE",
+ "mcomma;": "\u2A29",
+ "Mcy;": "\u041C",
+ "mcy;": "\u043C",
+ "mdash;": "\u2014",
+ "mDDot;": "\u223A",
+ "measuredangle;": "\u2221",
+ "MediumSpace;": "\u205F",
+ "Mellintrf;": "\u2133",
+ "Mfr;": "\uD835\uDD10",
+ "mfr;": "\uD835\uDD2A",
+ "mho;": "\u2127",
+ "micro;": "\u00B5",
+ "micro": "\u00B5",
+ "midast;": "\u002A",
+ "midcir;": "\u2AF0",
+ "mid;": "\u2223",
+ "middot;": "\u00B7",
+ "middot": "\u00B7",
+ "minusb;": "\u229F",
+ "minus;": "\u2212",
+ "minusd;": "\u2238",
+ "minusdu;": "\u2A2A",
+ "MinusPlus;": "\u2213",
+ "mlcp;": "\u2ADB",
+ "mldr;": "\u2026",
+ "mnplus;": "\u2213",
+ "models;": "\u22A7",
+ "Mopf;": "\uD835\uDD44",
+ "mopf;": "\uD835\uDD5E",
+ "mp;": "\u2213",
+ "mscr;": "\uD835\uDCC2",
+ "Mscr;": "\u2133",
+ "mstpos;": "\u223E",
+ "Mu;": "\u039C",
+ "mu;": "\u03BC",
+ "multimap;": "\u22B8",
+ "mumap;": "\u22B8",
+ "nabla;": "\u2207",
+ "Nacute;": "\u0143",
+ "nacute;": "\u0144",
+ "nang;": "\u2220\u20D2",
+ "nap;": "\u2249",
+ "napE;": "\u2A70\u0338",
+ "napid;": "\u224B\u0338",
+ "napos;": "\u0149",
+ "napprox;": "\u2249",
+ "natural;": "\u266E",
+ "naturals;": "\u2115",
+ "natur;": "\u266E",
+ "nbsp;": "\u00A0",
+ "nbsp": "\u00A0",
+ "nbump;": "\u224E\u0338",
+ "nbumpe;": "\u224F\u0338",
+ "ncap;": "\u2A43",
+ "Ncaron;": "\u0147",
+ "ncaron;": "\u0148",
+ "Ncedil;": "\u0145",
+ "ncedil;": "\u0146",
+ "ncong;": "\u2247",
+ "ncongdot;": "\u2A6D\u0338",
+ "ncup;": "\u2A42",
+ "Ncy;": "\u041D",
+ "ncy;": "\u043D",
+ "ndash;": "\u2013",
+ "nearhk;": "\u2924",
+ "nearr;": "\u2197",
+ "neArr;": "\u21D7",
+ "nearrow;": "\u2197",
+ "ne;": "\u2260",
+ "nedot;": "\u2250\u0338",
+ "NegativeMediumSpace;": "\u200B",
+ "NegativeThickSpace;": "\u200B",
+ "NegativeThinSpace;": "\u200B",
+ "NegativeVeryThinSpace;": "\u200B",
+ "nequiv;": "\u2262",
+ "nesear;": "\u2928",
+ "nesim;": "\u2242\u0338",
+ "NestedGreaterGreater;": "\u226B",
+ "NestedLessLess;": "\u226A",
+ "NewLine;": "\u000A",
+ "nexist;": "\u2204",
+ "nexists;": "\u2204",
+ "Nfr;": "\uD835\uDD11",
+ "nfr;": "\uD835\uDD2B",
+ "ngE;": "\u2267\u0338",
+ "nge;": "\u2271",
+ "ngeq;": "\u2271",
+ "ngeqq;": "\u2267\u0338",
+ "ngeqslant;": "\u2A7E\u0338",
+ "nges;": "\u2A7E\u0338",
+ "nGg;": "\u22D9\u0338",
+ "ngsim;": "\u2275",
+ "nGt;": "\u226B\u20D2",
+ "ngt;": "\u226F",
+ "ngtr;": "\u226F",
+ "nGtv;": "\u226B\u0338",
+ "nharr;": "\u21AE",
+ "nhArr;": "\u21CE",
+ "nhpar;": "\u2AF2",
+ "ni;": "\u220B",
+ "nis;": "\u22FC",
+ "nisd;": "\u22FA",
+ "niv;": "\u220B",
+ "NJcy;": "\u040A",
+ "njcy;": "\u045A",
+ "nlarr;": "\u219A",
+ "nlArr;": "\u21CD",
+ "nldr;": "\u2025",
+ "nlE;": "\u2266\u0338",
+ "nle;": "\u2270",
+ "nleftarrow;": "\u219A",
+ "nLeftarrow;": "\u21CD",
+ "nleftrightarrow;": "\u21AE",
+ "nLeftrightarrow;": "\u21CE",
+ "nleq;": "\u2270",
+ "nleqq;": "\u2266\u0338",
+ "nleqslant;": "\u2A7D\u0338",
+ "nles;": "\u2A7D\u0338",
+ "nless;": "\u226E",
+ "nLl;": "\u22D8\u0338",
+ "nlsim;": "\u2274",
+ "nLt;": "\u226A\u20D2",
+ "nlt;": "\u226E",
+ "nltri;": "\u22EA",
+ "nltrie;": "\u22EC",
+ "nLtv;": "\u226A\u0338",
+ "nmid;": "\u2224",
+ "NoBreak;": "\u2060",
+ "NonBreakingSpace;": "\u00A0",
+ "nopf;": "\uD835\uDD5F",
+ "Nopf;": "\u2115",
+ "Not;": "\u2AEC",
+ "not;": "\u00AC",
+ "not": "\u00AC",
+ "NotCongruent;": "\u2262",
+ "NotCupCap;": "\u226D",
+ "NotDoubleVerticalBar;": "\u2226",
+ "NotElement;": "\u2209",
+ "NotEqual;": "\u2260",
+ "NotEqualTilde;": "\u2242\u0338",
+ "NotExists;": "\u2204",
+ "NotGreater;": "\u226F",
+ "NotGreaterEqual;": "\u2271",
+ "NotGreaterFullEqual;": "\u2267\u0338",
+ "NotGreaterGreater;": "\u226B\u0338",
+ "NotGreaterLess;": "\u2279",
+ "NotGreaterSlantEqual;": "\u2A7E\u0338",
+ "NotGreaterTilde;": "\u2275",
+ "NotHumpDownHump;": "\u224E\u0338",
+ "NotHumpEqual;": "\u224F\u0338",
+ "notin;": "\u2209",
+ "notindot;": "\u22F5\u0338",
+ "notinE;": "\u22F9\u0338",
+ "notinva;": "\u2209",
+ "notinvb;": "\u22F7",
+ "notinvc;": "\u22F6",
+ "NotLeftTriangleBar;": "\u29CF\u0338",
+ "NotLeftTriangle;": "\u22EA",
+ "NotLeftTriangleEqual;": "\u22EC",
+ "NotLess;": "\u226E",
+ "NotLessEqual;": "\u2270",
+ "NotLessGreater;": "\u2278",
+ "NotLessLess;": "\u226A\u0338",
+ "NotLessSlantEqual;": "\u2A7D\u0338",
+ "NotLessTilde;": "\u2274",
+ "NotNestedGreaterGreater;": "\u2AA2\u0338",
+ "NotNestedLessLess;": "\u2AA1\u0338",
+ "notni;": "\u220C",
+ "notniva;": "\u220C",
+ "notnivb;": "\u22FE",
+ "notnivc;": "\u22FD",
+ "NotPrecedes;": "\u2280",
+ "NotPrecedesEqual;": "\u2AAF\u0338",
+ "NotPrecedesSlantEqual;": "\u22E0",
+ "NotReverseElement;": "\u220C",
+ "NotRightTriangleBar;": "\u29D0\u0338",
+ "NotRightTriangle;": "\u22EB",
+ "NotRightTriangleEqual;": "\u22ED",
+ "NotSquareSubset;": "\u228F\u0338",
+ "NotSquareSubsetEqual;": "\u22E2",
+ "NotSquareSuperset;": "\u2290\u0338",
+ "NotSquareSupersetEqual;": "\u22E3",
+ "NotSubset;": "\u2282\u20D2",
+ "NotSubsetEqual;": "\u2288",
+ "NotSucceeds;": "\u2281",
+ "NotSucceedsEqual;": "\u2AB0\u0338",
+ "NotSucceedsSlantEqual;": "\u22E1",
+ "NotSucceedsTilde;": "\u227F\u0338",
+ "NotSuperset;": "\u2283\u20D2",
+ "NotSupersetEqual;": "\u2289",
+ "NotTilde;": "\u2241",
+ "NotTildeEqual;": "\u2244",
+ "NotTildeFullEqual;": "\u2247",
+ "NotTildeTilde;": "\u2249",
+ "NotVerticalBar;": "\u2224",
+ "nparallel;": "\u2226",
+ "npar;": "\u2226",
+ "nparsl;": "\u2AFD\u20E5",
+ "npart;": "\u2202\u0338",
+ "npolint;": "\u2A14",
+ "npr;": "\u2280",
+ "nprcue;": "\u22E0",
+ "nprec;": "\u2280",
+ "npreceq;": "\u2AAF\u0338",
+ "npre;": "\u2AAF\u0338",
+ "nrarrc;": "\u2933\u0338",
+ "nrarr;": "\u219B",
+ "nrArr;": "\u21CF",
+ "nrarrw;": "\u219D\u0338",
+ "nrightarrow;": "\u219B",
+ "nRightarrow;": "\u21CF",
+ "nrtri;": "\u22EB",
+ "nrtrie;": "\u22ED",
+ "nsc;": "\u2281",
+ "nsccue;": "\u22E1",
+ "nsce;": "\u2AB0\u0338",
+ "Nscr;": "\uD835\uDCA9",
+ "nscr;": "\uD835\uDCC3",
+ "nshortmid;": "\u2224",
+ "nshortparallel;": "\u2226",
+ "nsim;": "\u2241",
+ "nsime;": "\u2244",
+ "nsimeq;": "\u2244",
+ "nsmid;": "\u2224",
+ "nspar;": "\u2226",
+ "nsqsube;": "\u22E2",
+ "nsqsupe;": "\u22E3",
+ "nsub;": "\u2284",
+ "nsubE;": "\u2AC5\u0338",
+ "nsube;": "\u2288",
+ "nsubset;": "\u2282\u20D2",
+ "nsubseteq;": "\u2288",
+ "nsubseteqq;": "\u2AC5\u0338",
+ "nsucc;": "\u2281",
+ "nsucceq;": "\u2AB0\u0338",
+ "nsup;": "\u2285",
+ "nsupE;": "\u2AC6\u0338",
+ "nsupe;": "\u2289",
+ "nsupset;": "\u2283\u20D2",
+ "nsupseteq;": "\u2289",
+ "nsupseteqq;": "\u2AC6\u0338",
+ "ntgl;": "\u2279",
+ "Ntilde;": "\u00D1",
+ "Ntilde": "\u00D1",
+ "ntilde;": "\u00F1",
+ "ntilde": "\u00F1",
+ "ntlg;": "\u2278",
+ "ntriangleleft;": "\u22EA",
+ "ntrianglelefteq;": "\u22EC",
+ "ntriangleright;": "\u22EB",
+ "ntrianglerighteq;": "\u22ED",
+ "Nu;": "\u039D",
+ "nu;": "\u03BD",
+ "num;": "\u0023",
+ "numero;": "\u2116",
+ "numsp;": "\u2007",
+ "nvap;": "\u224D\u20D2",
+ "nvdash;": "\u22AC",
+ "nvDash;": "\u22AD",
+ "nVdash;": "\u22AE",
+ "nVDash;": "\u22AF",
+ "nvge;": "\u2265\u20D2",
+ "nvgt;": "\u003E\u20D2",
+ "nvHarr;": "\u2904",
+ "nvinfin;": "\u29DE",
+ "nvlArr;": "\u2902",
+ "nvle;": "\u2264\u20D2",
+ "nvlt;": "\u003C\u20D2",
+ "nvltrie;": "\u22B4\u20D2",
+ "nvrArr;": "\u2903",
+ "nvrtrie;": "\u22B5\u20D2",
+ "nvsim;": "\u223C\u20D2",
+ "nwarhk;": "\u2923",
+ "nwarr;": "\u2196",
+ "nwArr;": "\u21D6",
+ "nwarrow;": "\u2196",
+ "nwnear;": "\u2927",
+ "Oacute;": "\u00D3",
+ "Oacute": "\u00D3",
+ "oacute;": "\u00F3",
+ "oacute": "\u00F3",
+ "oast;": "\u229B",
+ "Ocirc;": "\u00D4",
+ "Ocirc": "\u00D4",
+ "ocirc;": "\u00F4",
+ "ocirc": "\u00F4",
+ "ocir;": "\u229A",
+ "Ocy;": "\u041E",
+ "ocy;": "\u043E",
+ "odash;": "\u229D",
+ "Odblac;": "\u0150",
+ "odblac;": "\u0151",
+ "odiv;": "\u2A38",
+ "odot;": "\u2299",
+ "odsold;": "\u29BC",
+ "OElig;": "\u0152",
+ "oelig;": "\u0153",
+ "ofcir;": "\u29BF",
+ "Ofr;": "\uD835\uDD12",
+ "ofr;": "\uD835\uDD2C",
+ "ogon;": "\u02DB",
+ "Ograve;": "\u00D2",
+ "Ograve": "\u00D2",
+ "ograve;": "\u00F2",
+ "ograve": "\u00F2",
+ "ogt;": "\u29C1",
+ "ohbar;": "\u29B5",
+ "ohm;": "\u03A9",
+ "oint;": "\u222E",
+ "olarr;": "\u21BA",
+ "olcir;": "\u29BE",
+ "olcross;": "\u29BB",
+ "oline;": "\u203E",
+ "olt;": "\u29C0",
+ "Omacr;": "\u014C",
+ "omacr;": "\u014D",
+ "Omega;": "\u03A9",
+ "omega;": "\u03C9",
+ "Omicron;": "\u039F",
+ "omicron;": "\u03BF",
+ "omid;": "\u29B6",
+ "ominus;": "\u2296",
+ "Oopf;": "\uD835\uDD46",
+ "oopf;": "\uD835\uDD60",
+ "opar;": "\u29B7",
+ "OpenCurlyDoubleQuote;": "\u201C",
+ "OpenCurlyQuote;": "\u2018",
+ "operp;": "\u29B9",
+ "oplus;": "\u2295",
+ "orarr;": "\u21BB",
+ "Or;": "\u2A54",
+ "or;": "\u2228",
+ "ord;": "\u2A5D",
+ "order;": "\u2134",
+ "orderof;": "\u2134",
+ "ordf;": "\u00AA",
+ "ordf": "\u00AA",
+ "ordm;": "\u00BA",
+ "ordm": "\u00BA",
+ "origof;": "\u22B6",
+ "oror;": "\u2A56",
+ "orslope;": "\u2A57",
+ "orv;": "\u2A5B",
+ "oS;": "\u24C8",
+ "Oscr;": "\uD835\uDCAA",
+ "oscr;": "\u2134",
+ "Oslash;": "\u00D8",
+ "Oslash": "\u00D8",
+ "oslash;": "\u00F8",
+ "oslash": "\u00F8",
+ "osol;": "\u2298",
+ "Otilde;": "\u00D5",
+ "Otilde": "\u00D5",
+ "otilde;": "\u00F5",
+ "otilde": "\u00F5",
+ "otimesas;": "\u2A36",
+ "Otimes;": "\u2A37",
+ "otimes;": "\u2297",
+ "Ouml;": "\u00D6",
+ "Ouml": "\u00D6",
+ "ouml;": "\u00F6",
+ "ouml": "\u00F6",
+ "ovbar;": "\u233D",
+ "OverBar;": "\u203E",
+ "OverBrace;": "\u23DE",
+ "OverBracket;": "\u23B4",
+ "OverParenthesis;": "\u23DC",
+ "para;": "\u00B6",
+ "para": "\u00B6",
+ "parallel;": "\u2225",
+ "par;": "\u2225",
+ "parsim;": "\u2AF3",
+ "parsl;": "\u2AFD",
+ "part;": "\u2202",
+ "PartialD;": "\u2202",
+ "Pcy;": "\u041F",
+ "pcy;": "\u043F",
+ "percnt;": "\u0025",
+ "period;": "\u002E",
+ "permil;": "\u2030",
+ "perp;": "\u22A5",
+ "pertenk;": "\u2031",
+ "Pfr;": "\uD835\uDD13",
+ "pfr;": "\uD835\uDD2D",
+ "Phi;": "\u03A6",
+ "phi;": "\u03C6",
+ "phiv;": "\u03D5",
+ "phmmat;": "\u2133",
+ "phone;": "\u260E",
+ "Pi;": "\u03A0",
+ "pi;": "\u03C0",
+ "pitchfork;": "\u22D4",
+ "piv;": "\u03D6",
+ "planck;": "\u210F",
+ "planckh;": "\u210E",
+ "plankv;": "\u210F",
+ "plusacir;": "\u2A23",
+ "plusb;": "\u229E",
+ "pluscir;": "\u2A22",
+ "plus;": "\u002B",
+ "plusdo;": "\u2214",
+ "plusdu;": "\u2A25",
+ "pluse;": "\u2A72",
+ "PlusMinus;": "\u00B1",
+ "plusmn;": "\u00B1",
+ "plusmn": "\u00B1",
+ "plussim;": "\u2A26",
+ "plustwo;": "\u2A27",
+ "pm;": "\u00B1",
+ "Poincareplane;": "\u210C",
+ "pointint;": "\u2A15",
+ "popf;": "\uD835\uDD61",
+ "Popf;": "\u2119",
+ "pound;": "\u00A3",
+ "pound": "\u00A3",
+ "prap;": "\u2AB7",
+ "Pr;": "\u2ABB",
+ "pr;": "\u227A",
+ "prcue;": "\u227C",
+ "precapprox;": "\u2AB7",
+ "prec;": "\u227A",
+ "preccurlyeq;": "\u227C",
+ "Precedes;": "\u227A",
+ "PrecedesEqual;": "\u2AAF",
+ "PrecedesSlantEqual;": "\u227C",
+ "PrecedesTilde;": "\u227E",
+ "preceq;": "\u2AAF",
+ "precnapprox;": "\u2AB9",
+ "precneqq;": "\u2AB5",
+ "precnsim;": "\u22E8",
+ "pre;": "\u2AAF",
+ "prE;": "\u2AB3",
+ "precsim;": "\u227E",
+ "prime;": "\u2032",
+ "Prime;": "\u2033",
+ "primes;": "\u2119",
+ "prnap;": "\u2AB9",
+ "prnE;": "\u2AB5",
+ "prnsim;": "\u22E8",
+ "prod;": "\u220F",
+ "Product;": "\u220F",
+ "profalar;": "\u232E",
+ "profline;": "\u2312",
+ "profsurf;": "\u2313",
+ "prop;": "\u221D",
+ "Proportional;": "\u221D",
+ "Proportion;": "\u2237",
+ "propto;": "\u221D",
+ "prsim;": "\u227E",
+ "prurel;": "\u22B0",
+ "Pscr;": "\uD835\uDCAB",
+ "pscr;": "\uD835\uDCC5",
+ "Psi;": "\u03A8",
+ "psi;": "\u03C8",
+ "puncsp;": "\u2008",
+ "Qfr;": "\uD835\uDD14",
+ "qfr;": "\uD835\uDD2E",
+ "qint;": "\u2A0C",
+ "qopf;": "\uD835\uDD62",
+ "Qopf;": "\u211A",
+ "qprime;": "\u2057",
+ "Qscr;": "\uD835\uDCAC",
+ "qscr;": "\uD835\uDCC6",
+ "quaternions;": "\u210D",
+ "quatint;": "\u2A16",
+ "quest;": "\u003F",
+ "questeq;": "\u225F",
+ "quot;": "\u0022",
+ "quot": "\u0022",
+ "QUOT;": "\u0022",
+ "QUOT": "\u0022",
+ "rAarr;": "\u21DB",
+ "race;": "\u223D\u0331",
+ "Racute;": "\u0154",
+ "racute;": "\u0155",
+ "radic;": "\u221A",
+ "raemptyv;": "\u29B3",
+ "rang;": "\u27E9",
+ "Rang;": "\u27EB",
+ "rangd;": "\u2992",
+ "range;": "\u29A5",
+ "rangle;": "\u27E9",
+ "raquo;": "\u00BB",
+ "raquo": "\u00BB",
+ "rarrap;": "\u2975",
+ "rarrb;": "\u21E5",
+ "rarrbfs;": "\u2920",
+ "rarrc;": "\u2933",
+ "rarr;": "\u2192",
+ "Rarr;": "\u21A0",
+ "rArr;": "\u21D2",
+ "rarrfs;": "\u291E",
+ "rarrhk;": "\u21AA",
+ "rarrlp;": "\u21AC",
+ "rarrpl;": "\u2945",
+ "rarrsim;": "\u2974",
+ "Rarrtl;": "\u2916",
+ "rarrtl;": "\u21A3",
+ "rarrw;": "\u219D",
+ "ratail;": "\u291A",
+ "rAtail;": "\u291C",
+ "ratio;": "\u2236",
+ "rationals;": "\u211A",
+ "rbarr;": "\u290D",
+ "rBarr;": "\u290F",
+ "RBarr;": "\u2910",
+ "rbbrk;": "\u2773",
+ "rbrace;": "\u007D",
+ "rbrack;": "\u005D",
+ "rbrke;": "\u298C",
+ "rbrksld;": "\u298E",
+ "rbrkslu;": "\u2990",
+ "Rcaron;": "\u0158",
+ "rcaron;": "\u0159",
+ "Rcedil;": "\u0156",
+ "rcedil;": "\u0157",
+ "rceil;": "\u2309",
+ "rcub;": "\u007D",
+ "Rcy;": "\u0420",
+ "rcy;": "\u0440",
+ "rdca;": "\u2937",
+ "rdldhar;": "\u2969",
+ "rdquo;": "\u201D",
+ "rdquor;": "\u201D",
+ "rdsh;": "\u21B3",
+ "real;": "\u211C",
+ "realine;": "\u211B",
+ "realpart;": "\u211C",
+ "reals;": "\u211D",
+ "Re;": "\u211C",
+ "rect;": "\u25AD",
+ "reg;": "\u00AE",
+ "reg": "\u00AE",
+ "REG;": "\u00AE",
+ "REG": "\u00AE",
+ "ReverseElement;": "\u220B",
+ "ReverseEquilibrium;": "\u21CB",
+ "ReverseUpEquilibrium;": "\u296F",
+ "rfisht;": "\u297D",
+ "rfloor;": "\u230B",
+ "rfr;": "\uD835\uDD2F",
+ "Rfr;": "\u211C",
+ "rHar;": "\u2964",
+ "rhard;": "\u21C1",
+ "rharu;": "\u21C0",
+ "rharul;": "\u296C",
+ "Rho;": "\u03A1",
+ "rho;": "\u03C1",
+ "rhov;": "\u03F1",
+ "RightAngleBracket;": "\u27E9",
+ "RightArrowBar;": "\u21E5",
+ "rightarrow;": "\u2192",
+ "RightArrow;": "\u2192",
+ "Rightarrow;": "\u21D2",
+ "RightArrowLeftArrow;": "\u21C4",
+ "rightarrowtail;": "\u21A3",
+ "RightCeiling;": "\u2309",
+ "RightDoubleBracket;": "\u27E7",
+ "RightDownTeeVector;": "\u295D",
+ "RightDownVectorBar;": "\u2955",
+ "RightDownVector;": "\u21C2",
+ "RightFloor;": "\u230B",
+ "rightharpoondown;": "\u21C1",
+ "rightharpoonup;": "\u21C0",
+ "rightleftarrows;": "\u21C4",
+ "rightleftharpoons;": "\u21CC",
+ "rightrightarrows;": "\u21C9",
+ "rightsquigarrow;": "\u219D",
+ "RightTeeArrow;": "\u21A6",
+ "RightTee;": "\u22A2",
+ "RightTeeVector;": "\u295B",
+ "rightthreetimes;": "\u22CC",
+ "RightTriangleBar;": "\u29D0",
+ "RightTriangle;": "\u22B3",
+ "RightTriangleEqual;": "\u22B5",
+ "RightUpDownVector;": "\u294F",
+ "RightUpTeeVector;": "\u295C",
+ "RightUpVectorBar;": "\u2954",
+ "RightUpVector;": "\u21BE",
+ "RightVectorBar;": "\u2953",
+ "RightVector;": "\u21C0",
+ "ring;": "\u02DA",
+ "risingdotseq;": "\u2253",
+ "rlarr;": "\u21C4",
+ "rlhar;": "\u21CC",
+ "rlm;": "\u200F",
+ "rmoustache;": "\u23B1",
+ "rmoust;": "\u23B1",
+ "rnmid;": "\u2AEE",
+ "roang;": "\u27ED",
+ "roarr;": "\u21FE",
+ "robrk;": "\u27E7",
+ "ropar;": "\u2986",
+ "ropf;": "\uD835\uDD63",
+ "Ropf;": "\u211D",
+ "roplus;": "\u2A2E",
+ "rotimes;": "\u2A35",
+ "RoundImplies;": "\u2970",
+ "rpar;": "\u0029",
+ "rpargt;": "\u2994",
+ "rppolint;": "\u2A12",
+ "rrarr;": "\u21C9",
+ "Rrightarrow;": "\u21DB",
+ "rsaquo;": "\u203A",
+ "rscr;": "\uD835\uDCC7",
+ "Rscr;": "\u211B",
+ "rsh;": "\u21B1",
+ "Rsh;": "\u21B1",
+ "rsqb;": "\u005D",
+ "rsquo;": "\u2019",
+ "rsquor;": "\u2019",
+ "rthree;": "\u22CC",
+ "rtimes;": "\u22CA",
+ "rtri;": "\u25B9",
+ "rtrie;": "\u22B5",
+ "rtrif;": "\u25B8",
+ "rtriltri;": "\u29CE",
+ "RuleDelayed;": "\u29F4",
+ "ruluhar;": "\u2968",
+ "rx;": "\u211E",
+ "Sacute;": "\u015A",
+ "sacute;": "\u015B",
+ "sbquo;": "\u201A",
+ "scap;": "\u2AB8",
+ "Scaron;": "\u0160",
+ "scaron;": "\u0161",
+ "Sc;": "\u2ABC",
+ "sc;": "\u227B",
+ "sccue;": "\u227D",
+ "sce;": "\u2AB0",
+ "scE;": "\u2AB4",
+ "Scedil;": "\u015E",
+ "scedil;": "\u015F",
+ "Scirc;": "\u015C",
+ "scirc;": "\u015D",
+ "scnap;": "\u2ABA",
+ "scnE;": "\u2AB6",
+ "scnsim;": "\u22E9",
+ "scpolint;": "\u2A13",
+ "scsim;": "\u227F",
+ "Scy;": "\u0421",
+ "scy;": "\u0441",
+ "sdotb;": "\u22A1",
+ "sdot;": "\u22C5",
+ "sdote;": "\u2A66",
+ "searhk;": "\u2925",
+ "searr;": "\u2198",
+ "seArr;": "\u21D8",
+ "searrow;": "\u2198",
+ "sect;": "\u00A7",
+ "sect": "\u00A7",
+ "semi;": "\u003B",
+ "seswar;": "\u2929",
+ "setminus;": "\u2216",
+ "setmn;": "\u2216",
+ "sext;": "\u2736",
+ "Sfr;": "\uD835\uDD16",
+ "sfr;": "\uD835\uDD30",
+ "sfrown;": "\u2322",
+ "sharp;": "\u266F",
+ "SHCHcy;": "\u0429",
+ "shchcy;": "\u0449",
+ "SHcy;": "\u0428",
+ "shcy;": "\u0448",
+ "ShortDownArrow;": "\u2193",
+ "ShortLeftArrow;": "\u2190",
+ "shortmid;": "\u2223",
+ "shortparallel;": "\u2225",
+ "ShortRightArrow;": "\u2192",
+ "ShortUpArrow;": "\u2191",
+ "shy;": "\u00AD",
+ "shy": "\u00AD",
+ "Sigma;": "\u03A3",
+ "sigma;": "\u03C3",
+ "sigmaf;": "\u03C2",
+ "sigmav;": "\u03C2",
+ "sim;": "\u223C",
+ "simdot;": "\u2A6A",
+ "sime;": "\u2243",
+ "simeq;": "\u2243",
+ "simg;": "\u2A9E",
+ "simgE;": "\u2AA0",
+ "siml;": "\u2A9D",
+ "simlE;": "\u2A9F",
+ "simne;": "\u2246",
+ "simplus;": "\u2A24",
+ "simrarr;": "\u2972",
+ "slarr;": "\u2190",
+ "SmallCircle;": "\u2218",
+ "smallsetminus;": "\u2216",
+ "smashp;": "\u2A33",
+ "smeparsl;": "\u29E4",
+ "smid;": "\u2223",
+ "smile;": "\u2323",
+ "smt;": "\u2AAA",
+ "smte;": "\u2AAC",
+ "smtes;": "\u2AAC\uFE00",
+ "SOFTcy;": "\u042C",
+ "softcy;": "\u044C",
+ "solbar;": "\u233F",
+ "solb;": "\u29C4",
+ "sol;": "\u002F",
+ "Sopf;": "\uD835\uDD4A",
+ "sopf;": "\uD835\uDD64",
+ "spades;": "\u2660",
+ "spadesuit;": "\u2660",
+ "spar;": "\u2225",
+ "sqcap;": "\u2293",
+ "sqcaps;": "\u2293\uFE00",
+ "sqcup;": "\u2294",
+ "sqcups;": "\u2294\uFE00",
+ "Sqrt;": "\u221A",
+ "sqsub;": "\u228F",
+ "sqsube;": "\u2291",
+ "sqsubset;": "\u228F",
+ "sqsubseteq;": "\u2291",
+ "sqsup;": "\u2290",
+ "sqsupe;": "\u2292",
+ "sqsupset;": "\u2290",
+ "sqsupseteq;": "\u2292",
+ "square;": "\u25A1",
+ "Square;": "\u25A1",
+ "SquareIntersection;": "\u2293",
+ "SquareSubset;": "\u228F",
+ "SquareSubsetEqual;": "\u2291",
+ "SquareSuperset;": "\u2290",
+ "SquareSupersetEqual;": "\u2292",
+ "SquareUnion;": "\u2294",
+ "squarf;": "\u25AA",
+ "squ;": "\u25A1",
+ "squf;": "\u25AA",
+ "srarr;": "\u2192",
+ "Sscr;": "\uD835\uDCAE",
+ "sscr;": "\uD835\uDCC8",
+ "ssetmn;": "\u2216",
+ "ssmile;": "\u2323",
+ "sstarf;": "\u22C6",
+ "Star;": "\u22C6",
+ "star;": "\u2606",
+ "starf;": "\u2605",
+ "straightepsilon;": "\u03F5",
+ "straightphi;": "\u03D5",
+ "strns;": "\u00AF",
+ "sub;": "\u2282",
+ "Sub;": "\u22D0",
+ "subdot;": "\u2ABD",
+ "subE;": "\u2AC5",
+ "sube;": "\u2286",
+ "subedot;": "\u2AC3",
+ "submult;": "\u2AC1",
+ "subnE;": "\u2ACB",
+ "subne;": "\u228A",
+ "subplus;": "\u2ABF",
+ "subrarr;": "\u2979",
+ "subset;": "\u2282",
+ "Subset;": "\u22D0",
+ "subseteq;": "\u2286",
+ "subseteqq;": "\u2AC5",
+ "SubsetEqual;": "\u2286",
+ "subsetneq;": "\u228A",
+ "subsetneqq;": "\u2ACB",
+ "subsim;": "\u2AC7",
+ "subsub;": "\u2AD5",
+ "subsup;": "\u2AD3",
+ "succapprox;": "\u2AB8",
+ "succ;": "\u227B",
+ "succcurlyeq;": "\u227D",
+ "Succeeds;": "\u227B",
+ "SucceedsEqual;": "\u2AB0",
+ "SucceedsSlantEqual;": "\u227D",
+ "SucceedsTilde;": "\u227F",
+ "succeq;": "\u2AB0",
+ "succnapprox;": "\u2ABA",
+ "succneqq;": "\u2AB6",
+ "succnsim;": "\u22E9",
+ "succsim;": "\u227F",
+ "SuchThat;": "\u220B",
+ "sum;": "\u2211",
+ "Sum;": "\u2211",
+ "sung;": "\u266A",
+ "sup1;": "\u00B9",
+ "sup1": "\u00B9",
+ "sup2;": "\u00B2",
+ "sup2": "\u00B2",
+ "sup3;": "\u00B3",
+ "sup3": "\u00B3",
+ "sup;": "\u2283",
+ "Sup;": "\u22D1",
+ "supdot;": "\u2ABE",
+ "supdsub;": "\u2AD8",
+ "supE;": "\u2AC6",
+ "supe;": "\u2287",
+ "supedot;": "\u2AC4",
+ "Superset;": "\u2283",
+ "SupersetEqual;": "\u2287",
+ "suphsol;": "\u27C9",
+ "suphsub;": "\u2AD7",
+ "suplarr;": "\u297B",
+ "supmult;": "\u2AC2",
+ "supnE;": "\u2ACC",
+ "supne;": "\u228B",
+ "supplus;": "\u2AC0",
+ "supset;": "\u2283",
+ "Supset;": "\u22D1",
+ "supseteq;": "\u2287",
+ "supseteqq;": "\u2AC6",
+ "supsetneq;": "\u228B",
+ "supsetneqq;": "\u2ACC",
+ "supsim;": "\u2AC8",
+ "supsub;": "\u2AD4",
+ "supsup;": "\u2AD6",
+ "swarhk;": "\u2926",
+ "swarr;": "\u2199",
+ "swArr;": "\u21D9",
+ "swarrow;": "\u2199",
+ "swnwar;": "\u292A",
+ "szlig;": "\u00DF",
+ "szlig": "\u00DF",
+ "Tab;": "\u0009",
+ "target;": "\u2316",
+ "Tau;": "\u03A4",
+ "tau;": "\u03C4",
+ "tbrk;": "\u23B4",
+ "Tcaron;": "\u0164",
+ "tcaron;": "\u0165",
+ "Tcedil;": "\u0162",
+ "tcedil;": "\u0163",
+ "Tcy;": "\u0422",
+ "tcy;": "\u0442",
+ "tdot;": "\u20DB",
+ "telrec;": "\u2315",
+ "Tfr;": "\uD835\uDD17",
+ "tfr;": "\uD835\uDD31",
+ "there4;": "\u2234",
+ "therefore;": "\u2234",
+ "Therefore;": "\u2234",
+ "Theta;": "\u0398",
+ "theta;": "\u03B8",
+ "thetasym;": "\u03D1",
+ "thetav;": "\u03D1",
+ "thickapprox;": "\u2248",
+ "thicksim;": "\u223C",
+ "ThickSpace;": "\u205F\u200A",
+ "ThinSpace;": "\u2009",
+ "thinsp;": "\u2009",
+ "thkap;": "\u2248",
+ "thksim;": "\u223C",
+ "THORN;": "\u00DE",
+ "THORN": "\u00DE",
+ "thorn;": "\u00FE",
+ "thorn": "\u00FE",
+ "tilde;": "\u02DC",
+ "Tilde;": "\u223C",
+ "TildeEqual;": "\u2243",
+ "TildeFullEqual;": "\u2245",
+ "TildeTilde;": "\u2248",
+ "timesbar;": "\u2A31",
+ "timesb;": "\u22A0",
+ "times;": "\u00D7",
+ "times": "\u00D7",
+ "timesd;": "\u2A30",
+ "tint;": "\u222D",
+ "toea;": "\u2928",
+ "topbot;": "\u2336",
+ "topcir;": "\u2AF1",
+ "top;": "\u22A4",
+ "Topf;": "\uD835\uDD4B",
+ "topf;": "\uD835\uDD65",
+ "topfork;": "\u2ADA",
+ "tosa;": "\u2929",
+ "tprime;": "\u2034",
+ "trade;": "\u2122",
+ "TRADE;": "\u2122",
+ "triangle;": "\u25B5",
+ "triangledown;": "\u25BF",
+ "triangleleft;": "\u25C3",
+ "trianglelefteq;": "\u22B4",
+ "triangleq;": "\u225C",
+ "triangleright;": "\u25B9",
+ "trianglerighteq;": "\u22B5",
+ "tridot;": "\u25EC",
+ "trie;": "\u225C",
+ "triminus;": "\u2A3A",
+ "TripleDot;": "\u20DB",
+ "triplus;": "\u2A39",
+ "trisb;": "\u29CD",
+ "tritime;": "\u2A3B",
+ "trpezium;": "\u23E2",
+ "Tscr;": "\uD835\uDCAF",
+ "tscr;": "\uD835\uDCC9",
+ "TScy;": "\u0426",
+ "tscy;": "\u0446",
+ "TSHcy;": "\u040B",
+ "tshcy;": "\u045B",
+ "Tstrok;": "\u0166",
+ "tstrok;": "\u0167",
+ "twixt;": "\u226C",
+ "twoheadleftarrow;": "\u219E",
+ "twoheadrightarrow;": "\u21A0",
+ "Uacute;": "\u00DA",
+ "Uacute": "\u00DA",
+ "uacute;": "\u00FA",
+ "uacute": "\u00FA",
+ "uarr;": "\u2191",
+ "Uarr;": "\u219F",
+ "uArr;": "\u21D1",
+ "Uarrocir;": "\u2949",
+ "Ubrcy;": "\u040E",
+ "ubrcy;": "\u045E",
+ "Ubreve;": "\u016C",
+ "ubreve;": "\u016D",
+ "Ucirc;": "\u00DB",
+ "Ucirc": "\u00DB",
+ "ucirc;": "\u00FB",
+ "ucirc": "\u00FB",
+ "Ucy;": "\u0423",
+ "ucy;": "\u0443",
+ "udarr;": "\u21C5",
+ "Udblac;": "\u0170",
+ "udblac;": "\u0171",
+ "udhar;": "\u296E",
+ "ufisht;": "\u297E",
+ "Ufr;": "\uD835\uDD18",
+ "ufr;": "\uD835\uDD32",
+ "Ugrave;": "\u00D9",
+ "Ugrave": "\u00D9",
+ "ugrave;": "\u00F9",
+ "ugrave": "\u00F9",
+ "uHar;": "\u2963",
+ "uharl;": "\u21BF",
+ "uharr;": "\u21BE",
+ "uhblk;": "\u2580",
+ "ulcorn;": "\u231C",
+ "ulcorner;": "\u231C",
+ "ulcrop;": "\u230F",
+ "ultri;": "\u25F8",
+ "Umacr;": "\u016A",
+ "umacr;": "\u016B",
+ "uml;": "\u00A8",
+ "uml": "\u00A8",
+ "UnderBar;": "\u005F",
+ "UnderBrace;": "\u23DF",
+ "UnderBracket;": "\u23B5",
+ "UnderParenthesis;": "\u23DD",
+ "Union;": "\u22C3",
+ "UnionPlus;": "\u228E",
+ "Uogon;": "\u0172",
+ "uogon;": "\u0173",
+ "Uopf;": "\uD835\uDD4C",
+ "uopf;": "\uD835\uDD66",
+ "UpArrowBar;": "\u2912",
+ "uparrow;": "\u2191",
+ "UpArrow;": "\u2191",
+ "Uparrow;": "\u21D1",
+ "UpArrowDownArrow;": "\u21C5",
+ "updownarrow;": "\u2195",
+ "UpDownArrow;": "\u2195",
+ "Updownarrow;": "\u21D5",
+ "UpEquilibrium;": "\u296E",
+ "upharpoonleft;": "\u21BF",
+ "upharpoonright;": "\u21BE",
+ "uplus;": "\u228E",
+ "UpperLeftArrow;": "\u2196",
+ "UpperRightArrow;": "\u2197",
+ "upsi;": "\u03C5",
+ "Upsi;": "\u03D2",
+ "upsih;": "\u03D2",
+ "Upsilon;": "\u03A5",
+ "upsilon;": "\u03C5",
+ "UpTeeArrow;": "\u21A5",
+ "UpTee;": "\u22A5",
+ "upuparrows;": "\u21C8",
+ "urcorn;": "\u231D",
+ "urcorner;": "\u231D",
+ "urcrop;": "\u230E",
+ "Uring;": "\u016E",
+ "uring;": "\u016F",
+ "urtri;": "\u25F9",
+ "Uscr;": "\uD835\uDCB0",
+ "uscr;": "\uD835\uDCCA",
+ "utdot;": "\u22F0",
+ "Utilde;": "\u0168",
+ "utilde;": "\u0169",
+ "utri;": "\u25B5",
+ "utrif;": "\u25B4",
+ "uuarr;": "\u21C8",
+ "Uuml;": "\u00DC",
+ "Uuml": "\u00DC",
+ "uuml;": "\u00FC",
+ "uuml": "\u00FC",
+ "uwangle;": "\u29A7",
+ "vangrt;": "\u299C",
+ "varepsilon;": "\u03F5",
+ "varkappa;": "\u03F0",
+ "varnothing;": "\u2205",
+ "varphi;": "\u03D5",
+ "varpi;": "\u03D6",
+ "varpropto;": "\u221D",
+ "varr;": "\u2195",
+ "vArr;": "\u21D5",
+ "varrho;": "\u03F1",
+ "varsigma;": "\u03C2",
+ "varsubsetneq;": "\u228A\uFE00",
+ "varsubsetneqq;": "\u2ACB\uFE00",
+ "varsupsetneq;": "\u228B\uFE00",
+ "varsupsetneqq;": "\u2ACC\uFE00",
+ "vartheta;": "\u03D1",
+ "vartriangleleft;": "\u22B2",
+ "vartriangleright;": "\u22B3",
+ "vBar;": "\u2AE8",
+ "Vbar;": "\u2AEB",
+ "vBarv;": "\u2AE9",
+ "Vcy;": "\u0412",
+ "vcy;": "\u0432",
+ "vdash;": "\u22A2",
+ "vDash;": "\u22A8",
+ "Vdash;": "\u22A9",
+ "VDash;": "\u22AB",
+ "Vdashl;": "\u2AE6",
+ "veebar;": "\u22BB",
+ "vee;": "\u2228",
+ "Vee;": "\u22C1",
+ "veeeq;": "\u225A",
+ "vellip;": "\u22EE",
+ "verbar;": "\u007C",
+ "Verbar;": "\u2016",
+ "vert;": "\u007C",
+ "Vert;": "\u2016",
+ "VerticalBar;": "\u2223",
+ "VerticalLine;": "\u007C",
+ "VerticalSeparator;": "\u2758",
+ "VerticalTilde;": "\u2240",
+ "VeryThinSpace;": "\u200A",
+ "Vfr;": "\uD835\uDD19",
+ "vfr;": "\uD835\uDD33",
+ "vltri;": "\u22B2",
+ "vnsub;": "\u2282\u20D2",
+ "vnsup;": "\u2283\u20D2",
+ "Vopf;": "\uD835\uDD4D",
+ "vopf;": "\uD835\uDD67",
+ "vprop;": "\u221D",
+ "vrtri;": "\u22B3",
+ "Vscr;": "\uD835\uDCB1",
+ "vscr;": "\uD835\uDCCB",
+ "vsubnE;": "\u2ACB\uFE00",
+ "vsubne;": "\u228A\uFE00",
+ "vsupnE;": "\u2ACC\uFE00",
+ "vsupne;": "\u228B\uFE00",
+ "Vvdash;": "\u22AA",
+ "vzigzag;": "\u299A",
+ "Wcirc;": "\u0174",
+ "wcirc;": "\u0175",
+ "wedbar;": "\u2A5F",
+ "wedge;": "\u2227",
+ "Wedge;": "\u22C0",
+ "wedgeq;": "\u2259",
+ "weierp;": "\u2118",
+ "Wfr;": "\uD835\uDD1A",
+ "wfr;": "\uD835\uDD34",
+ "Wopf;": "\uD835\uDD4E",
+ "wopf;": "\uD835\uDD68",
+ "wp;": "\u2118",
+ "wr;": "\u2240",
+ "wreath;": "\u2240",
+ "Wscr;": "\uD835\uDCB2",
+ "wscr;": "\uD835\uDCCC",
+ "xcap;": "\u22C2",
+ "xcirc;": "\u25EF",
+ "xcup;": "\u22C3",
+ "xdtri;": "\u25BD",
+ "Xfr;": "\uD835\uDD1B",
+ "xfr;": "\uD835\uDD35",
+ "xharr;": "\u27F7",
+ "xhArr;": "\u27FA",
+ "Xi;": "\u039E",
+ "xi;": "\u03BE",
+ "xlarr;": "\u27F5",
+ "xlArr;": "\u27F8",
+ "xmap;": "\u27FC",
+ "xnis;": "\u22FB",
+ "xodot;": "\u2A00",
+ "Xopf;": "\uD835\uDD4F",
+ "xopf;": "\uD835\uDD69",
+ "xoplus;": "\u2A01",
+ "xotime;": "\u2A02",
+ "xrarr;": "\u27F6",
+ "xrArr;": "\u27F9",
+ "Xscr;": "\uD835\uDCB3",
+ "xscr;": "\uD835\uDCCD",
+ "xsqcup;": "\u2A06",
+ "xuplus;": "\u2A04",
+ "xutri;": "\u25B3",
+ "xvee;": "\u22C1",
+ "xwedge;": "\u22C0",
+ "Yacute;": "\u00DD",
+ "Yacute": "\u00DD",
+ "yacute;": "\u00FD",
+ "yacute": "\u00FD",
+ "YAcy;": "\u042F",
+ "yacy;": "\u044F",
+ "Ycirc;": "\u0176",
+ "ycirc;": "\u0177",
+ "Ycy;": "\u042B",
+ "ycy;": "\u044B",
+ "yen;": "\u00A5",
+ "yen": "\u00A5",
+ "Yfr;": "\uD835\uDD1C",
+ "yfr;": "\uD835\uDD36",
+ "YIcy;": "\u0407",
+ "yicy;": "\u0457",
+ "Yopf;": "\uD835\uDD50",
+ "yopf;": "\uD835\uDD6A",
+ "Yscr;": "\uD835\uDCB4",
+ "yscr;": "\uD835\uDCCE",
+ "YUcy;": "\u042E",
+ "yucy;": "\u044E",
+ "yuml;": "\u00FF",
+ "yuml": "\u00FF",
+ "Yuml;": "\u0178",
+ "Zacute;": "\u0179",
+ "zacute;": "\u017A",
+ "Zcaron;": "\u017D",
+ "zcaron;": "\u017E",
+ "Zcy;": "\u0417",
+ "zcy;": "\u0437",
+ "Zdot;": "\u017B",
+ "zdot;": "\u017C",
+ "zeetrf;": "\u2128",
+ "ZeroWidthSpace;": "\u200B",
+ "Zeta;": "\u0396",
+ "zeta;": "\u03B6",
+ "zfr;": "\uD835\uDD37",
+ "Zfr;": "\u2128",
+ "ZHcy;": "\u0416",
+ "zhcy;": "\u0436",
+ "zigrarr;": "\u21DD",
+ "zopf;": "\uD835\uDD6B",
+ "Zopf;": "\u2124",
+ "Zscr;": "\uD835\uDCB5",
+ "zscr;": "\uD835\uDCCF",
+ "zwj;": "\u200D",
+ "zwnj;": "\u200C"
+};
+
+},
+{}],
+13:[function(_dereq_,module,exports){
+var util = _dereq_('util/');
+
+var pSlice = Array.prototype.slice;
+var hasOwn = Object.prototype.hasOwnProperty;
+
+var assert = module.exports = ok;
+
+assert.AssertionError = function AssertionError(options) {
+ this.name = 'AssertionError';
+ this.actual = options.actual;
+ this.expected = options.expected;
+ this.operator = options.operator;
+ if (options.message) {
+ this.message = options.message;
+ this.generatedMessage = false;
+ } else {
+ this.message = getMessage(this);
+ this.generatedMessage = true;
+ }
+ var stackStartFunction = options.stackStartFunction || fail;
+
+ if (Error.captureStackTrace) {
+ Error.captureStackTrace(this, stackStartFunction);
+ }
+ else {
+ var err = new Error();
+ if (err.stack) {
+ var out = err.stack;
+ var fn_name = stackStartFunction.name;
+ var idx = out.indexOf('\n' + fn_name);
+ if (idx >= 0) {
+ var next_line = out.indexOf('\n', idx + 1);
+ out = out.substring(next_line + 1);
+ }
+
+ this.stack = out;
+ }
+ }
+};
+util.inherits(assert.AssertionError, Error);
+
+function replacer(key, value) {
+ if (util.isUndefined(value)) {
+ return '' + value;
+ }
+ if (util.isNumber(value) && (isNaN(value) || !isFinite(value))) {
+ return value.toString();
+ }
+ if (util.isFunction(value) || util.isRegExp(value)) {
+ return value.toString();
+ }
+ return value;
+}
+
+function truncate(s, n) {
+ if (util.isString(s)) {
+ return s.length < n ? s : s.slice(0, n);
+ } else {
+ return s;
+ }
+}
+
+function getMessage(self) {
+ return truncate(JSON.stringify(self.actual, replacer), 128) + ' ' +
+ self.operator + ' ' +
+ truncate(JSON.stringify(self.expected, replacer), 128);
+}
+
+function fail(actual, expected, message, operator, stackStartFunction) {
+ throw new assert.AssertionError({
+ message: message,
+ actual: actual,
+ expected: expected,
+ operator: operator,
+ stackStartFunction: stackStartFunction
+ });
+}
+assert.fail = fail;
+
+function ok(value, message) {
+ if (!value) fail(value, true, message, '==', assert.ok);
+}
+assert.ok = ok;
+
+assert.equal = function equal(actual, expected, message) {
+ if (actual != expected) fail(actual, expected, message, '==', assert.equal);
+};
+
+assert.notEqual = function notEqual(actual, expected, message) {
+ if (actual == expected) {
+ fail(actual, expected, message, '!=', assert.notEqual);
+ }
+};
+
+assert.deepEqual = function deepEqual(actual, expected, message) {
+ if (!_deepEqual(actual, expected)) {
+ fail(actual, expected, message, 'deepEqual', assert.deepEqual);
+ }
+};
+
+function _deepEqual(actual, expected) {
+ if (actual === expected) {
+ return true;
+
+ } else if (util.isBuffer(actual) && util.isBuffer(expected)) {
+ if (actual.length != expected.length) return false;
+
+ for (var i = 0; i < actual.length; i++) {
+ if (actual[i] !== expected[i]) return false;
+ }
+
+ return true;
+ } else if (util.isDate(actual) && util.isDate(expected)) {
+ return actual.getTime() === expected.getTime();
+ } else if (util.isRegExp(actual) && util.isRegExp(expected)) {
+ return actual.source === expected.source &&
+ actual.global === expected.global &&
+ actual.multiline === expected.multiline &&
+ actual.lastIndex === expected.lastIndex &&
+ actual.ignoreCase === expected.ignoreCase;
+ } else if (!util.isObject(actual) && !util.isObject(expected)) {
+ return actual == expected;
+ } else {
+ return objEquiv(actual, expected);
+ }
+}
+
+function isArguments(object) {
+ return Object.prototype.toString.call(object) == '[object Arguments]';
+}
+
+function objEquiv(a, b) {
+ if (util.isNullOrUndefined(a) || util.isNullOrUndefined(b))
+ return false;
+ if (a.prototype !== b.prototype) return false;
+ if (isArguments(a)) {
+ if (!isArguments(b)) {
+ return false;
+ }
+ a = pSlice.call(a);
+ b = pSlice.call(b);
+ return _deepEqual(a, b);
+ }
+ try {
+ var ka = objectKeys(a),
+ kb = objectKeys(b),
+ key, i;
+ } catch (e) {//happens when one is a string literal and the other isn't
+ return false;
+ }
+ if (ka.length != kb.length)
+ return false;
+ ka.sort();
+ kb.sort();
+ for (i = ka.length - 1; i >= 0; i--) {
+ if (ka[i] != kb[i])
+ return false;
+ }
+ for (i = ka.length - 1; i >= 0; i--) {
+ key = ka[i];
+ if (!_deepEqual(a[key], b[key])) return false;
+ }
+ return true;
+}
+
+assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
+ if (_deepEqual(actual, expected)) {
+ fail(actual, expected, message, 'notDeepEqual', assert.notDeepEqual);
+ }
+};
+
+assert.strictEqual = function strictEqual(actual, expected, message) {
+ if (actual !== expected) {
+ fail(actual, expected, message, '===', assert.strictEqual);
+ }
+};
+
+assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
+ if (actual === expected) {
+ fail(actual, expected, message, '!==', assert.notStrictEqual);
+ }
+};
+
+function expectedException(actual, expected) {
+ if (!actual || !expected) {
+ return false;
+ }
+
+ if (Object.prototype.toString.call(expected) == '[object RegExp]') {
+ return expected.test(actual);
+ } else if (actual instanceof expected) {
+ return true;
+ } else if (expected.call({}, actual) === true) {
+ return true;
+ }
+
+ return false;
+}
+
+function _throws(shouldThrow, block, expected, message) {
+ var actual;
+
+ if (util.isString(expected)) {
+ message = expected;
+ expected = null;
+ }
+
+ try {
+ block();
+ } catch (e) {
+ actual = e;
+ }
+
+ message = (expected && expected.name ? ' (' + expected.name + ').' : '.') +
+ (message ? ' ' + message : '.');
+
+ if (shouldThrow && !actual) {
+ fail(actual, expected, 'Missing expected exception' + message);
+ }
+
+ if (!shouldThrow && expectedException(actual, expected)) {
+ fail(actual, expected, 'Got unwanted exception' + message);
+ }
+
+ if ((shouldThrow && actual && expected &&
+ !expectedException(actual, expected)) || (!shouldThrow && actual)) {
+ throw actual;
+ }
+}
+
+assert.throws = function(block, /*optional*/error, /*optional*/message) {
+ _throws.apply(this, [true].concat(pSlice.call(arguments)));
+};
+assert.doesNotThrow = function(block, /*optional*/message) {
+ _throws.apply(this, [false].concat(pSlice.call(arguments)));
+};
+
+assert.ifError = function(err) { if (err) {throw err;}};
+
+var objectKeys = Object.keys || function (obj) {
+ var keys = [];
+ for (var key in obj) {
+ if (hasOwn.call(obj, key)) keys.push(key);
+ }
+ return keys;
+};
+
+},
+{"util/":15}],
+14:[function(_dereq_,module,exports){
+module.exports = function isBuffer(arg) {
+ return arg && typeof arg === 'object'
+ && typeof arg.copy === 'function'
+ && typeof arg.fill === 'function'
+ && typeof arg.readUInt8 === 'function';
+}
+},
+{}],
+15:[function(_dereq_,module,exports){
+(function (process,global){
+
+var formatRegExp = /%[sdj%]/g;
+exports.format = function(f) {
+ if (!isString(f)) {
+ var objects = [];
+ for (var i = 0; i < arguments.length; i++) {
+ objects.push(inspect(arguments[i]));
+ }
+ return objects.join(' ');
+ }
+
+ var i = 1;
+ var args = arguments;
+ var len = args.length;
+ var str = String(f).replace(formatRegExp, function(x) {
+ if (x === '%%') return '%';
+ if (i >= len) return x;
+ switch (x) {
+ case '%s': return String(args[i++]);
+ case '%d': return Number(args[i++]);
+ case '%j':
+ try {
+ return JSON.stringify(args[i++]);
+ } catch (_) {
+ return '[Circular]';
+ }
+ default:
+ return x;
+ }
+ });
+ for (var x = args[i]; i < len; x = args[++i]) {
+ if (isNull(x) || !isObject(x)) {
+ str += ' ' + x;
+ } else {
+ str += ' ' + inspect(x);
+ }
+ }
+ return str;
+};
+exports.deprecate = function(fn, msg) {
+ if (isUndefined(global.process)) {
+ return function() {
+ return exports.deprecate(fn, msg).apply(this, arguments);
+ };
+ }
+
+ if (process.noDeprecation === true) {
+ return fn;
+ }
+
+ var warned = false;
+ function deprecated() {
+ if (!warned) {
+ if (process.throwDeprecation) {
+ throw new Error(msg);
+ } else if (process.traceDeprecation) {
+ console.trace(msg);
+ } else {
+ console.error(msg);
+ }
+ warned = true;
+ }
+ return fn.apply(this, arguments);
+ }
+
+ return deprecated;
+};
+
+
+var debugs = {};
+var debugEnviron;
+exports.debuglog = function(set) {
+ if (isUndefined(debugEnviron))
+ debugEnviron = process.env.NODE_DEBUG || '';
+ set = set.toUpperCase();
+ if (!debugs[set]) {
+ if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
+ var pid = process.pid;
+ debugs[set] = function() {
+ var msg = exports.format.apply(exports, arguments);
+ console.error('%s %d: %s', set, pid, msg);
+ };
+ } else {
+ debugs[set] = function() {};
+ }
+ }
+ return debugs[set];
+};
+function inspect(obj, opts) {
+ var ctx = {
+ seen: [],
+ stylize: stylizeNoColor
+ };
+ if (arguments.length >= 3) ctx.depth = arguments[2];
+ if (arguments.length >= 4) ctx.colors = arguments[3];
+ if (isBoolean(opts)) {
+ ctx.showHidden = opts;
+ } else if (opts) {
+ exports._extend(ctx, opts);
+ }
+ if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
+ if (isUndefined(ctx.depth)) ctx.depth = 2;
+ if (isUndefined(ctx.colors)) ctx.colors = false;
+ if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
+ if (ctx.colors) ctx.stylize = stylizeWithColor;
+ return formatValue(ctx, obj, ctx.depth);
+}
+exports.inspect = inspect;
+inspect.colors = {
+ 'bold' : [1, 22],
+ 'italic' : [3, 23],
+ 'underline' : [4, 24],
+ 'inverse' : [7, 27],
+ 'white' : [37, 39],
+ 'grey' : [90, 39],
+ 'black' : [30, 39],
+ 'blue' : [34, 39],
+ 'cyan' : [36, 39],
+ 'green' : [32, 39],
+ 'magenta' : [35, 39],
+ 'red' : [31, 39],
+ 'yellow' : [33, 39]
+};
+inspect.styles = {
+ 'special': 'cyan',
+ 'number': 'yellow',
+ 'boolean': 'yellow',
+ 'undefined': 'grey',
+ 'null': 'bold',
+ 'string': 'green',
+ 'date': 'magenta',
+ 'regexp': 'red'
+};
+
+
+function stylizeWithColor(str, styleType) {
+ var style = inspect.styles[styleType];
+
+ if (style) {
+ return '\u001b[' + inspect.colors[style][0] + 'm' + str +
+ '\u001b[' + inspect.colors[style][1] + 'm';
+ } else {
+ return str;
+ }
+}
+
+
+function stylizeNoColor(str, styleType) {
+ return str;
+}
+
+
+function arrayToHash(array) {
+ var hash = {};
+
+ array.forEach(function(val, idx) {
+ hash[val] = true;
+ });
+
+ return hash;
+}
+
+
+function formatValue(ctx, value, recurseTimes) {
+ if (ctx.customInspect &&
+ value &&
+ isFunction(value.inspect) &&
+ value.inspect !== exports.inspect &&
+ !(value.constructor && value.constructor.prototype === value)) {
+ var ret = value.inspect(recurseTimes, ctx);
+ if (!isString(ret)) {
+ ret = formatValue(ctx, ret, recurseTimes);
+ }
+ return ret;
+ }
+ var primitive = formatPrimitive(ctx, value);
+ if (primitive) {
+ return primitive;
+ }
+ var keys = Object.keys(value);
+ var visibleKeys = arrayToHash(keys);
+
+ if (ctx.showHidden) {
+ keys = Object.getOwnPropertyNames(value);
+ }
+ if (isError(value)
+ && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
+ return formatError(value);
+ }
+ if (keys.length === 0) {
+ if (isFunction(value)) {
+ var name = value.name ? ': ' + value.name : '';
+ return ctx.stylize('[Function' + name + ']', 'special');
+ }
+ if (isRegExp(value)) {
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+ }
+ if (isDate(value)) {
+ return ctx.stylize(Date.prototype.toString.call(value), 'date');
+ }
+ if (isError(value)) {
+ return formatError(value);
+ }
+ }
+
+ var base = '', array = false, braces = ['{', '}'];
+ if (isArray(value)) {
+ array = true;
+ braces = ['[', ']'];
+ }
+ if (isFunction(value)) {
+ var n = value.name ? ': ' + value.name : '';
+ base = ' [Function' + n + ']';
+ }
+ if (isRegExp(value)) {
+ base = ' ' + RegExp.prototype.toString.call(value);
+ }
+ if (isDate(value)) {
+ base = ' ' + Date.prototype.toUTCString.call(value);
+ }
+ if (isError(value)) {
+ base = ' ' + formatError(value);
+ }
+
+ if (keys.length === 0 && (!array || value.length == 0)) {
+ return braces[0] + base + braces[1];
+ }
+
+ if (recurseTimes < 0) {
+ if (isRegExp(value)) {
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
+ } else {
+ return ctx.stylize('[Object]', 'special');
+ }
+ }
+
+ ctx.seen.push(value);
+
+ var output;
+ if (array) {
+ output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
+ } else {
+ output = keys.map(function(key) {
+ return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
+ });
+ }
+
+ ctx.seen.pop();
+
+ return reduceToSingleString(output, base, braces);
+}
+
+
+function formatPrimitive(ctx, value) {
+ if (isUndefined(value))
+ return ctx.stylize('undefined', 'undefined');
+ if (isString(value)) {
+ var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
+ .replace(/'/g, "\\'")
+ .replace(/\\"/g, '"') + '\'';
+ return ctx.stylize(simple, 'string');
+ }
+ if (isNumber(value))
+ return ctx.stylize('' + value, 'number');
+ if (isBoolean(value))
+ return ctx.stylize('' + value, 'boolean');
+ if (isNull(value))
+ return ctx.stylize('null', 'null');
+}
+
+
+function formatError(value) {
+ return '[' + Error.prototype.toString.call(value) + ']';
+}
+
+
+function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
+ var output = [];
+ for (var i = 0, l = value.length; i < l; ++i) {
+ if (hasOwnProperty(value, String(i))) {
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+ String(i), true));
+ } else {
+ output.push('');
+ }
+ }
+ keys.forEach(function(key) {
+ if (!key.match(/^\d+$/)) {
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
+ key, true));
+ }
+ });
+ return output;
+}
+
+
+function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
+ var name, str, desc;
+ desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
+ if (desc.get) {
+ if (desc.set) {
+ str = ctx.stylize('[Getter/Setter]', 'special');
+ } else {
+ str = ctx.stylize('[Getter]', 'special');
+ }
+ } else {
+ if (desc.set) {
+ str = ctx.stylize('[Setter]', 'special');
+ }
+ }
+ if (!hasOwnProperty(visibleKeys, key)) {
+ name = '[' + key + ']';
+ }
+ if (!str) {
+ if (ctx.seen.indexOf(desc.value) < 0) {
+ if (isNull(recurseTimes)) {
+ str = formatValue(ctx, desc.value, null);
+ } else {
+ str = formatValue(ctx, desc.value, recurseTimes - 1);
+ }
+ if (str.indexOf('\n') > -1) {
+ if (array) {
+ str = str.split('\n').map(function(line) {
+ return ' ' + line;
+ }).join('\n').substr(2);
+ } else {
+ str = '\n' + str.split('\n').map(function(line) {
+ return ' ' + line;
+ }).join('\n');
+ }
+ }
+ } else {
+ str = ctx.stylize('[Circular]', 'special');
+ }
+ }
+ if (isUndefined(name)) {
+ if (array && key.match(/^\d+$/)) {
+ return str;
+ }
+ name = JSON.stringify('' + key);
+ if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
+ name = name.substr(1, name.length - 2);
+ name = ctx.stylize(name, 'name');
+ } else {
+ name = name.replace(/'/g, "\\'")
+ .replace(/\\"/g, '"')
+ .replace(/(^"|"$)/g, "'");
+ name = ctx.stylize(name, 'string');
+ }
+ }
+
+ return name + ': ' + str;
+}
+
+
+function reduceToSingleString(output, base, braces) {
+ var numLinesEst = 0;
+ var length = output.reduce(function(prev, cur) {
+ numLinesEst++;
+ if (cur.indexOf('\n') >= 0) numLinesEst++;
+ return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
+ }, 0);
+
+ if (length > 60) {
+ return braces[0] +
+ (base === '' ? '' : base + '\n ') +
+ ' ' +
+ output.join(',\n ') +
+ ' ' +
+ braces[1];
+ }
+
+ return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
+}
+function isArray(ar) {
+ return Array.isArray(ar);
+}
+exports.isArray = isArray;
+
+function isBoolean(arg) {
+ return typeof arg === 'boolean';
+}
+exports.isBoolean = isBoolean;
+
+function isNull(arg) {
+ return arg === null;
+}
+exports.isNull = isNull;
+
+function isNullOrUndefined(arg) {
+ return arg == null;
+}
+exports.isNullOrUndefined = isNullOrUndefined;
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+exports.isNumber = isNumber;
+
+function isString(arg) {
+ return typeof arg === 'string';
+}
+exports.isString = isString;
+
+function isSymbol(arg) {
+ return typeof arg === 'symbol';
+}
+exports.isSymbol = isSymbol;
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+exports.isUndefined = isUndefined;
+
+function isRegExp(re) {
+ return isObject(re) && objectToString(re) === '[object RegExp]';
+}
+exports.isRegExp = isRegExp;
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+exports.isObject = isObject;
+
+function isDate(d) {
+ return isObject(d) && objectToString(d) === '[object Date]';
+}
+exports.isDate = isDate;
+
+function isError(e) {
+ return isObject(e) &&
+ (objectToString(e) === '[object Error]' || e instanceof Error);
+}
+exports.isError = isError;
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+exports.isFunction = isFunction;
+
+function isPrimitive(arg) {
+ return arg === null ||
+ typeof arg === 'boolean' ||
+ typeof arg === 'number' ||
+ typeof arg === 'string' ||
+ typeof arg === 'symbol' || // ES6 symbol
+ typeof arg === 'undefined';
+}
+exports.isPrimitive = isPrimitive;
+
+exports.isBuffer = _dereq_('./support/isBuffer');
+
+function objectToString(o) {
+ return Object.prototype.toString.call(o);
+}
+
+
+function pad(n) {
+ return n < 10 ? '0' + n.toString(10) : n.toString(10);
+}
+
+
+var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
+ 'Oct', 'Nov', 'Dec'];
+function timestamp() {
+ var d = new Date();
+ var time = [pad(d.getHours()),
+ pad(d.getMinutes()),
+ pad(d.getSeconds())].join(':');
+ return [d.getDate(), months[d.getMonth()], time].join(' ');
+}
+exports.log = function() {
+ console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
+};
+exports.inherits = _dereq_('inherits');
+
+exports._extend = function(origin, add) {
+ if (!add || !isObject(add)) return origin;
+
+ var keys = Object.keys(add);
+ var i = keys.length;
+ while (i--) {
+ origin[keys[i]] = add[keys[i]];
+ }
+ return origin;
+};
+
+function hasOwnProperty(obj, prop) {
+ return Object.prototype.hasOwnProperty.call(obj, prop);
+}
+
+}).call(this,_dereq_("/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},
+{"./support/isBuffer":14,"/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":18,"inherits":17}],
+16:[function(_dereq_,module,exports){
+
+function EventEmitter() {
+ this._events = this._events || {};
+ this._maxListeners = this._maxListeners || undefined;
+}
+module.exports = EventEmitter;
+EventEmitter.EventEmitter = EventEmitter;
+
+EventEmitter.prototype._events = undefined;
+EventEmitter.prototype._maxListeners = undefined;
+EventEmitter.defaultMaxListeners = 10;
+EventEmitter.prototype.setMaxListeners = function(n) {
+ if (!isNumber(n) || n < 0 || isNaN(n))
+ throw TypeError('n must be a positive number');
+ this._maxListeners = n;
+ return this;
+};
+
+EventEmitter.prototype.emit = function(type) {
+ var er, handler, len, args, i, listeners;
+
+ if (!this._events)
+ this._events = {};
+ if (type === 'error') {
+ if (!this._events.error ||
+ (isObject(this._events.error) && !this._events.error.length)) {
+ er = arguments[1];
+ if (er instanceof Error) {
+ throw er; // Unhandled 'error' event
+ } else {
+ throw TypeError('Uncaught, unspecified "error" event.');
+ }
+ return false;
+ }
+ }
+
+ handler = this._events[type];
+
+ if (isUndefined(handler))
+ return false;
+
+ if (isFunction(handler)) {
+ switch (arguments.length) {
+ case 1:
+ handler.call(this);
+ break;
+ case 2:
+ handler.call(this, arguments[1]);
+ break;
+ case 3:
+ handler.call(this, arguments[1], arguments[2]);
+ break;
+ default:
+ len = arguments.length;
+ args = new Array(len - 1);
+ for (i = 1; i < len; i++)
+ args[i - 1] = arguments[i];
+ handler.apply(this, args);
+ }
+ } else if (isObject(handler)) {
+ len = arguments.length;
+ args = new Array(len - 1);
+ for (i = 1; i < len; i++)
+ args[i - 1] = arguments[i];
+
+ listeners = handler.slice();
+ len = listeners.length;
+ for (i = 0; i < len; i++)
+ listeners[i].apply(this, args);
+ }
+
+ return true;
+};
+
+EventEmitter.prototype.addListener = function(type, listener) {
+ var m;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events)
+ this._events = {};
+ if (this._events.newListener)
+ this.emit('newListener', type,
+ isFunction(listener.listener) ?
+ listener.listener : listener);
+
+ if (!this._events[type])
+ this._events[type] = listener;
+ else if (isObject(this._events[type]))
+ this._events[type].push(listener);
+ else
+ this._events[type] = [this._events[type], listener];
+ if (isObject(this._events[type]) && !this._events[type].warned) {
+ var m;
+ if (!isUndefined(this._maxListeners)) {
+ m = this._maxListeners;
+ } else {
+ m = EventEmitter.defaultMaxListeners;
+ }
+
+ if (m && m > 0 && this._events[type].length > m) {
+ this._events[type].warned = true;
+ console.error('(node) warning: possible EventEmitter memory ' +
+ 'leak detected. %d listeners added. ' +
+ 'Use emitter.setMaxListeners() to increase limit.',
+ this._events[type].length);
+ console.trace();
+ }
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.on = EventEmitter.prototype.addListener;
+
+EventEmitter.prototype.once = function(type, listener) {
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ var fired = false;
+
+ function g() {
+ this.removeListener(type, g);
+
+ if (!fired) {
+ fired = true;
+ listener.apply(this, arguments);
+ }
+ }
+
+ g.listener = listener;
+ this.on(type, g);
+
+ return this;
+};
+EventEmitter.prototype.removeListener = function(type, listener) {
+ var list, position, length, i;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events || !this._events[type])
+ return this;
+
+ list = this._events[type];
+ length = list.length;
+ position = -1;
+
+ if (list === listener ||
+ (isFunction(list.listener) && list.listener === listener)) {
+ delete this._events[type];
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+
+ } else if (isObject(list)) {
+ for (i = length; i-- > 0;) {
+ if (list[i] === listener ||
+ (list[i].listener && list[i].listener === listener)) {
+ position = i;
+ break;
+ }
+ }
+
+ if (position < 0)
+ return this;
+
+ if (list.length === 1) {
+ list.length = 0;
+ delete this._events[type];
+ } else {
+ list.splice(position, 1);
+ }
+
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.removeAllListeners = function(type) {
+ var key, listeners;
+
+ if (!this._events)
+ return this;
+ if (!this._events.removeListener) {
+ if (arguments.length === 0)
+ this._events = {};
+ else if (this._events[type])
+ delete this._events[type];
+ return this;
+ }
+ if (arguments.length === 0) {
+ for (key in this._events) {
+ if (key === 'removeListener') continue;
+ this.removeAllListeners(key);
+ }
+ this.removeAllListeners('removeListener');
+ this._events = {};
+ return this;
+ }
+
+ listeners = this._events[type];
+
+ if (isFunction(listeners)) {
+ this.removeListener(type, listeners);
+ } else {
+ while (listeners.length)
+ this.removeListener(type, listeners[listeners.length - 1]);
+ }
+ delete this._events[type];
+
+ return this;
+};
+
+EventEmitter.prototype.listeners = function(type) {
+ var ret;
+ if (!this._events || !this._events[type])
+ ret = [];
+ else if (isFunction(this._events[type]))
+ ret = [this._events[type]];
+ else
+ ret = this._events[type].slice();
+ return ret;
+};
+
+EventEmitter.listenerCount = function(emitter, type) {
+ var ret;
+ if (!emitter._events || !emitter._events[type])
+ ret = 0;
+ else if (isFunction(emitter._events[type]))
+ ret = 1;
+ else
+ ret = emitter._events[type].length;
+ return ret;
+};
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+
+},
+{}],
+17:[function(_dereq_,module,exports){
+if (typeof Object.create === 'function') {
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+ };
+} else {
+ module.exports = function inherits(ctor, superCtor) {
+ ctor.super_ = superCtor
+ var TempCtor = function () {}
+ TempCtor.prototype = superCtor.prototype
+ ctor.prototype = new TempCtor()
+ ctor.prototype.constructor = ctor
+ }
+}
+
+},
+{}],
+18:[function(_dereq_,module,exports){
+
+var process = module.exports = {};
+
+process.nextTick = (function () {
+ var canSetImmediate = typeof window !== 'undefined'
+ && window.setImmediate;
+ var canPost = typeof window !== 'undefined'
+ && window.postMessage && window.addEventListener
+ ;
+
+ if (canSetImmediate) {
+ return function (f) { return window.setImmediate(f) };
+ }
+
+ if (canPost) {
+ var queue = [];
+ window.addEventListener('message', function (ev) {
+ var source = ev.source;
+ if ((source === window || source === null) && ev.data === 'process-tick') {
+ ev.stopPropagation();
+ if (queue.length > 0) {
+ var fn = queue.shift();
+ fn();
+ }
+ }
+ }, true);
+
+ return function nextTick(fn) {
+ queue.push(fn);
+ window.postMessage('process-tick', '*');
+ };
+ }
+
+ return function nextTick(fn) {
+ setTimeout(fn, 0);
+ };
+})();
+
+process.title = 'browser';
+process.browser = true;
+process.env = {};
+process.argv = [];
+
+function noop() {}
+
+process.on = noop;
+process.once = noop;
+process.off = noop;
+process.emit = noop;
+
+process.binding = function (name) {
+ throw new Error('process.binding is not supported');
+}
+process.cwd = function () { return '/' };
+process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported');
+};
+
+},
+{}],
+19:[function(_dereq_,module,exports){
+module.exports=_dereq_(14)
+},
+{}],
+20:[function(_dereq_,module,exports){
+module.exports=_dereq_(15)
+},
+{"./support/isBuffer":19,"/usr/local/lib/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":18,"inherits":17}]},{},[9])
+(9)
+
+});
+
+ace.define("ace/mode/html_worker",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/worker/mirror","ace/mode/html/saxparser"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var Mirror = require("../worker/mirror").Mirror;
+var SAXParser = require("./html/saxparser").SAXParser;
+
+var errorTypes = {
+ "expected-doctype-but-got-start-tag": "info",
+ "expected-doctype-but-got-chars": "info",
+ "non-html-root": "info"
+}
+
+var Worker = exports.Worker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(400);
+ this.context = null;
+};
+
+oop.inherits(Worker, Mirror);
+
+(function() {
+
+ this.setOptions = function(options) {
+ this.context = options.context;
+ };
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+ if (!value)
+ return;
+ var parser = new SAXParser();
+ var errors = [];
+ var noop = function(){};
+ parser.contentHandler = {
+ startDocument: noop,
+ endDocument: noop,
+ startElement: noop,
+ endElement: noop,
+ characters: noop
+ };
+ parser.errorHandler = {
+ error: function(message, location, code) {
+ errors.push({
+ row: location.line,
+ column: location.column,
+ text: message,
+ type: errorTypes[code] || "error"
+ });
+ }
+ };
+ if (this.context)
+ parser.parseFragment(value, this.context);
+ else
+ parser.parse(value);
+ this.sender.emit("error", errors);
+ };
+
+}).call(Worker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ 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 ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ 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, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ 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("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ 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("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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 || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+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, "");
+ };
+}
+
+function toInteger(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;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/worker-javascript.js b/www/wiki/extensions/CodeEditor/modules/ace/worker-javascript.js
new file mode 100644
index 00000000..3a71fd4e
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/worker-javascript.js
@@ -0,0 +1,12528 @@
+"no use strict";
+;(function(window) {
+if (typeof window.window != "undefined" && window.document)
+ return;
+if (window.require && window.define)
+ return;
+
+if (!window.console) {
+ window.console = function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+ };
+ window.console.error =
+ window.console.warn =
+ window.console.log =
+ window.console.trace = window.console;
+}
+window.window = window;
+window.ace = window;
+
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ data: err.data,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
+window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
+ if (moduleName.indexOf("!") !== -1) {
+ var chunks = moduleName.split("!");
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
+ }
+ // normalize relative requires
+ if (moduleName.charAt(0) == ".") {
+ var base = parentId.split("/").slice(0, -1).join("/");
+ moduleName = (base ? base + "/" : "") + moduleName;
+
+ while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
+ var previous = moduleName;
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ }
+ }
+
+ return moduleName;
+};
+
+window.require = function require(parentId, id) {
+ if (!id) {
+ id = parentId;
+ parentId = null;
+ }
+ if (!id.charAt)
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+ id = window.normalizeModule(parentId, id);
+
+ var module = window.require.modules[id];
+ if (module) {
+ if (!module.initialized) {
+ module.initialized = true;
+ module.exports = module.factory().exports;
+ }
+ return module.exports;
+ }
+
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+
+ var path = resolveModuleId(id, window.require.tlns);
+ if (path.slice(-3) != ".js") path += ".js";
+
+ window.require.id = id;
+ window.require.modules[id] = {}; // prevent infinite loop on broken modules
+ importScripts(path);
+ return window.require(parentId, id);
+};
+function resolveModuleId(id, paths) {
+ var testPath = id, tail = "";
+ while (testPath) {
+ var alias = paths[testPath];
+ if (typeof alias == "string") {
+ return alias + tail;
+ } else if (alias) {
+ return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name);
+ } else if (alias === false) {
+ return "";
+ }
+ var i = testPath.lastIndexOf("/");
+ if (i === -1) break;
+ tail = testPath.substr(i) + tail;
+ testPath = testPath.slice(0, i);
+ }
+ return id;
+}
+window.require.modules = {};
+window.require.tlns = {};
+
+window.define = function(id, deps, factory) {
+ if (arguments.length == 2) {
+ factory = deps;
+ if (typeof id != "string") {
+ deps = id;
+ id = window.require.id;
+ }
+ } else if (arguments.length == 1) {
+ factory = id;
+ deps = [];
+ id = window.require.id;
+ }
+
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject "require", "exports" and
+ // "module" as dependencies, to provide CommonJS compatibility.
+ deps = ["require", "exports", "module"];
+
+ var req = function(childId) {
+ return window.require(id, childId);
+ };
+
+ window.require.modules[id] = {
+ exports: {},
+ factory: function() {
+ var module = this;
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch (dep) {
+ // Because "require", "exports" and "module" aren't actual
+ // dependencies, we must handle them seperately.
+ case "require": return req;
+ case "exports": return module.exports;
+ case "module": return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
+ if (returnExports)
+ module.exports = returnExports;
+ return module;
+ }
+ };
+};
+window.define.amd = {};
+require.tlns = {};
+window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
+ for (var i in topLevelNamespaces)
+ require.tlns[i] = topLevelNamespaces[i];
+};
+
+window.initSender = function initSender() {
+
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("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 = window.main = null;
+var sender = window.sender = null;
+
+window.onmessage = function(e) {
+ var msg = e.data;
+ if (msg.event && sender) {
+ sender._signal(msg.event, msg.data);
+ }
+ else if (msg.command) {
+ if (main[msg.command])
+ main[msg.command].apply(main, msg.args);
+ else if (window[msg.command])
+ window[msg.command].apply(window, msg.args);
+ else
+ throw new Error("Unknown command:" + msg.command);
+ }
+ else if (msg.init) {
+ window.initBaseUrls(msg.tlns);
+ require("ace/lib/es5-shim");
+ sender = window.sender = window.initSender();
+ var clazz = require(msg.module)[msg.classname];
+ main = window.main = new clazz(sender);
+ }
+};
+})(this);
+
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+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};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
+
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {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
+ );
+ };
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
+ };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
+
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+
+
+exports.Range = Range;
+});
+
+ace.define("ace/apply_delta",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+function throwDeltaError(delta, errorText){
+ console.log("Invalid Delta:", delta);
+ throw "Invalid Delta: " + errorText;
+}
+
+function positionInDocument(docLines, position) {
+ return position.row >= 0 && position.row < docLines.length &&
+ position.column >= 0 && position.column <= docLines[position.row].length;
+}
+
+function validateDelta(docLines, delta) {
+ if (delta.action != "insert" && delta.action != "remove")
+ throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
+ if (!(delta.lines instanceof Array))
+ throwDeltaError(delta, "delta.lines must be an Array");
+ if (!delta.start || !delta.end)
+ throwDeltaError(delta, "delta.start/end must be an present");
+ var start = delta.start;
+ if (!positionInDocument(docLines, delta.start))
+ throwDeltaError(delta, "delta.start must be contained in document");
+ var end = delta.end;
+ if (delta.action == "remove" && !positionInDocument(docLines, end))
+ throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
+ var numRangeRows = end.row - start.row;
+ var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
+ if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
+ throwDeltaError(delta, "delta.range must match delta lines");
+}
+
+exports.applyDelta = function(docLines, delta, doNotValidate) {
+
+ var row = delta.start.row;
+ var startColumn = delta.start.column;
+ var line = docLines[row] || "";
+ switch (delta.action) {
+ case "insert":
+ var lines = delta.lines;
+ if (lines.length === 1) {
+ docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
+ } else {
+ var args = [row, 1].concat(delta.lines);
+ docLines.splice.apply(docLines, args);
+ docLines[row] = line.substring(0, startColumn) + docLines[row];
+ docLines[row + delta.lines.length - 1] += line.substring(startColumn);
+ }
+ break;
+ case "remove":
+ var endColumn = delta.end.column;
+ var endRow = delta.end.row;
+ if (row === endRow) {
+ docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
+ } else {
+ docLines.splice(
+ row, endRow - row + 1,
+ line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
+ );
+ }
+ break;
+ }
+}
+});
+
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
+
+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 = stopPropagation;
+ if (!e.preventDefault)
+ e.preventDefault = preventDefault;
+
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e, this);
+ if (e.propagationStopped)
+ break;
+ }
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e, this);
+};
+
+
+EventEmitter._signal = function(eventName, e) {
+ var listeners = (this._eventRegistry || {})[eventName];
+ if (!listeners)
+ return;
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++)
+ listeners[i](e, this);
+};
+
+EventEmitter.once = function(eventName, callback) {
+ var _self = this;
+ callback && this.addEventListener(eventName, function newCallback() {
+ _self.removeEventListener(eventName, newCallback);
+ callback.apply(null, arguments);
+ });
+};
+
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ handlers = this._defaultHandlers = {_disabled_: {}};
+
+ if (handlers[eventName]) {
+ var old = handlers[eventName];
+ var disabled = handlers._disabled_[eventName];
+ if (!disabled)
+ handlers._disabled_[eventName] = disabled = [];
+ disabled.push(old);
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+ handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ return;
+ var disabled = handlers._disabled_[eventName];
+
+ if (handlers[eventName] == callback) {
+ var old = handlers[eventName];
+ if (disabled)
+ this.setDefaultHandler(eventName, disabled.pop());
+ } else if (disabled) {
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
+
+ if (listeners.indexOf(callback) == -1)
+ listeners[capturing ? "unshift" : "push"](callback);
+ return callback;
+};
+
+EventEmitter.off =
+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/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;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+ this.getDocument = function() {
+ return this.document;
+ };
+ this.$insertRight = false;
+ this.onChange = function(delta) {
+ if (delta.start.row == delta.end.row && delta.start.row != this.row)
+ return;
+
+ if (delta.start.row > this.row)
+ return;
+
+ var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
+ this.setPosition(point.row, point.column, true);
+ };
+
+ function $pointsInOrder(point1, point2, equalPointsInOrder) {
+ var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
+ return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
+ }
+
+ function $getTransformedPoint(delta, point, moveIfEqual) {
+ var deltaIsInsert = delta.action == "insert";
+ var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
+ var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
+ var deltaStart = delta.start;
+ var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
+ if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
+ return {
+ row: point.row,
+ column: point.column
+ };
+ }
+ if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
+ return {
+ row: point.row + deltaRowShift,
+ column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
+ };
+ }
+
+ return {
+ row: deltaStart.row,
+ column: deltaStart.column
+ };
+ }
+ 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._signal("change", {
+ old: old,
+ value: pos
+ });
+ };
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
+ };
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("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/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var applyDelta = require("./apply_delta").applyDelta;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(textOrLines) {
+ this.$lines = [""];
+ if (textOrLines.length === 0) {
+ this.$lines = [""];
+ } else if (Array.isArray(textOrLines)) {
+ this.insertMergedLines({row: 0, column: 0}, textOrLines);
+ } else {
+ this.insert({row: 0, column:0}, textOrLines);
+ }
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setValue = function(text) {
+ var len = this.getLength() - 1;
+ this.remove(new Range(0, 0, len, this.getLine(len).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);
+ this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
+ };
+ this.getNewLineCharacter = function() {
+ switch (this.$newLineMode) {
+ case "windows":
+ return "\r\n";
+ case "unix":
+ return "\n";
+ default:
+ return this.$autoNewLine || "\n";
+ }
+ };
+
+ this.$autoNewLine = "";
+ this.$newLineMode = "auto";
+ this.setNewLineMode = function(newLineMode) {
+ if (this.$newLineMode === newLineMode)
+ return;
+
+ this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
+ };
+ 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) {
+ return this.getLinesForRange(range).join(this.getNewLineCharacter());
+ };
+ this.getLinesForRange = function(range) {
+ var lines;
+ if (range.start.row === range.end.row) {
+ lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
+ } else {
+ lines = this.getLines(range.start.row, range.end.row);
+ lines[0] = (lines[0] || "").substring(range.start.column);
+ var l = lines.length - 1;
+ if (range.end.row - range.start.row == l)
+ lines[l] = lines[l].substring(0, range.end.column);
+ }
+ return lines;
+ };
+ this.insertLines = function(row, lines) {
+ console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
+ return this.insertFullLines(row, lines);
+ };
+ this.removeLines = function(firstRow, lastRow) {
+ console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
+ return this.removeFullLines(firstRow, lastRow);
+ };
+ this.insertNewLine = function(position) {
+ console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
+ return this.insertMergedLines(position, ["", ""]);
+ };
+ this.insert = function(position, text) {
+ if (this.getLength() <= 1)
+ this.$detectNewLine(text);
+
+ return this.insertMergedLines(position, this.$split(text));
+ };
+ this.insertInLine = function(position, text) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = this.pos(position.row, position.column + text.length);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: [text]
+ }, true);
+
+ return this.clonePos(end);
+ };
+
+ this.clippedPos = function(row, column) {
+ var length = this.getLength();
+ if (row === undefined) {
+ row = length;
+ } else if (row < 0) {
+ row = 0;
+ } else if (row >= length) {
+ row = length - 1;
+ column = undefined;
+ }
+ var line = this.getLine(row);
+ if (column == undefined)
+ column = line.length;
+ column = Math.min(Math.max(column, 0), line.length);
+ return {row: row, column: column};
+ };
+
+ this.clonePos = function(pos) {
+ return {row: pos.row, column: pos.column};
+ };
+
+ this.pos = function(row, column) {
+ return {row: row, column: column};
+ };
+
+ 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;
+ } else {
+ position.row = Math.max(0, position.row);
+ position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
+ }
+ return position;
+ };
+ this.insertFullLines = function(row, lines) {
+ row = Math.min(Math.max(row, 0), this.getLength());
+ var column = 0;
+ if (row < this.getLength()) {
+ lines = lines.concat([""]);
+ column = 0;
+ } else {
+ lines = [""].concat(lines);
+ row--;
+ column = this.$lines[row].length;
+ }
+ this.insertMergedLines({row: row, column: column}, lines);
+ };
+ this.insertMergedLines = function(position, lines) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = {
+ row: start.row + lines.length - 1,
+ column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
+ };
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: lines
+ });
+
+ return this.clonePos(end);
+ };
+ this.remove = function(range) {
+ var start = this.clippedPos(range.start.row, range.start.column);
+ var end = this.clippedPos(range.end.row, range.end.column);
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ });
+ return this.clonePos(start);
+ };
+ this.removeInLine = function(row, startColumn, endColumn) {
+ var start = this.clippedPos(row, startColumn);
+ var end = this.clippedPos(row, endColumn);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ }, true);
+
+ return this.clonePos(start);
+ };
+ this.removeFullLines = function(firstRow, lastRow) {
+ firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
+ lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
+ var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
+ var deleteLastNewLine = lastRow < this.getLength() - 1;
+ var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );
+ var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );
+ var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );
+ var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length );
+ var range = new Range(startRow, startCol, endRow, endCol);
+ var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
+
+ this.applyDelta({
+ start: range.start,
+ end: range.end,
+ action: "remove",
+ lines: this.getLinesForRange(range)
+ });
+ return deletedLines;
+ };
+ this.removeNewLine = function(row) {
+ if (row < this.getLength() - 1 && row >= 0) {
+ this.applyDelta({
+ start: this.pos(row, this.getLine(row).length),
+ end: this.pos(row + 1, 0),
+ action: "remove",
+ lines: ["", ""]
+ });
+ }
+ };
+ this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
+ if (text.length === 0 && range.isEmpty())
+ return range.start;
+ if (text == this.getTextRange(range))
+ return range.end;
+
+ this.remove(range);
+ var end;
+ if (text) {
+ end = this.insert(range.start, text);
+ }
+ else {
+ end = range.start;
+ }
+
+ return end;
+ };
+ this.applyDeltas = function(deltas) {
+ for (var i=0; i<deltas.length; i++) {
+ this.applyDelta(deltas[i]);
+ }
+ };
+ this.revertDeltas = function(deltas) {
+ for (var i=deltas.length-1; i>=0; i--) {
+ this.revertDelta(deltas[i]);
+ }
+ };
+ this.applyDelta = function(delta, doNotValidate) {
+ var isInsert = delta.action == "insert";
+ if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
+ : !Range.comparePoints(delta.start, delta.end)) {
+ return;
+ }
+
+ if (isInsert && delta.lines.length > 20000)
+ this.$splitAndapplyLargeDelta(delta, 20000);
+ applyDelta(this.$lines, delta, doNotValidate);
+ this._signal("change", delta);
+ };
+
+ this.$splitAndapplyLargeDelta = function(delta, MAX) {
+ var lines = delta.lines;
+ var l = lines.length;
+ var row = delta.start.row;
+ var column = delta.start.column;
+ var from = 0, to = 0;
+ do {
+ from = to;
+ to += MAX - 1;
+ var chunk = lines.slice(from, to);
+ if (to > l) {
+ delta.lines = chunk;
+ delta.start.row = row + from;
+ delta.start.column = column;
+ break;
+ }
+ chunk.push("");
+ this.applyDelta({
+ start: this.pos(row + from, column),
+ end: this.pos(row + to, column = 0),
+ action: delta.action,
+ lines: chunk
+ }, true);
+ } while(true);
+ };
+ this.revertDelta = function(delta) {
+ this.applyDelta({
+ start: this.clonePos(delta.start),
+ end: this.clonePos(delta.end),
+ action: (delta.action == "insert" ? "remove" : "insert"),
+ lines: delta.lines.slice()
+ });
+ };
+ 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 + newlineLength;
+
+ return index + pos.column;
+ };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.last = function(a) {
+ return a[a.length - 1];
+};
+
+exports.stringReverse = function(string) {
+ return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+ var result = '';
+ while (count > 0) {
+ if (count & 1)
+ result += string;
+
+ if (count >>= 1)
+ string += string;
+ }
+ return result;
+};
+
+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 deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
+ return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
+ }
+ if (Object.prototype.toString.call(obj) !== "[object Object]")
+ return obj;
+
+ copy = {};
+ for (var key in obj)
+ copy[key] = deepCopy(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;
+ };
+
+ deferred.isPending = function() {
+ return timer;
+ };
+
+ return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+ _self.schedule = _self;
+
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
+
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ _self.isPending = function() {
+ return timer;
+ };
+
+ return _self;
+};
+});
+
+ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+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.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ var data = e.data;
+ if (data[0].start) {
+ doc.applyDeltas(data);
+ } else {
+ for (var i = 0; i < data.length; i += 2) {
+ if (Array.isArray(data[i+1])) {
+ var d = {action: "insert", start: data[i], lines: data[i+1]};
+ } else {
+ var d = {action: "remove", start: data[i], end: data[i+1]};
+ }
+ doc.applyDelta(d, true);
+ }
+ }
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
+};
+
+(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() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+ace.define("ace/mode/javascript/jshint",["require","exports","module"], function(require, exports, module) {
+module.exports = (function outer (modules, cache, entry) {
+ var previousRequire = typeof require == "function" && require;
+ function newRequire(name, jumped){
+ if(!cache[name]) {
+ if(!modules[name]) {
+ var currentRequire = typeof require == "function" && require;
+ if (!jumped && currentRequire) return currentRequire(name, true);
+ if (previousRequire) return previousRequire(name, true);
+ var err = new Error('Cannot find module \'' + name + '\'');
+ err.code = 'MODULE_NOT_FOUND';
+ throw err;
+ }
+ var m = cache[name] = {exports:{}};
+ modules[name][0].call(m.exports, function(x){
+ var id = modules[name][1][x];
+ return newRequire(id ? id : x);
+ },m,m.exports,outer,modules,cache,entry);
+ }
+ return cache[name].exports;
+ }
+ for(var i=0;i<entry.length;i++) newRequire(entry[i]);
+ return newRequire(entry[0]);
+})
+({"/node_modules/browserify/node_modules/events/events.js":[function(_dereq_,module,exports){
+
+function EventEmitter() {
+ this._events = this._events || {};
+ this._maxListeners = this._maxListeners || undefined;
+}
+module.exports = EventEmitter;
+EventEmitter.EventEmitter = EventEmitter;
+
+EventEmitter.prototype._events = undefined;
+EventEmitter.prototype._maxListeners = undefined;
+EventEmitter.defaultMaxListeners = 10;
+EventEmitter.prototype.setMaxListeners = function(n) {
+ if (!isNumber(n) || n < 0 || isNaN(n))
+ throw TypeError('n must be a positive number');
+ this._maxListeners = n;
+ return this;
+};
+
+EventEmitter.prototype.emit = function(type) {
+ var er, handler, len, args, i, listeners;
+
+ if (!this._events)
+ this._events = {};
+ if (type === 'error') {
+ if (!this._events.error ||
+ (isObject(this._events.error) && !this._events.error.length)) {
+ er = arguments[1];
+ if (er instanceof Error) {
+ throw er; // Unhandled 'error' event
+ }
+ throw TypeError('Uncaught, unspecified "error" event.');
+ }
+ }
+
+ handler = this._events[type];
+
+ if (isUndefined(handler))
+ return false;
+
+ if (isFunction(handler)) {
+ switch (arguments.length) {
+ case 1:
+ handler.call(this);
+ break;
+ case 2:
+ handler.call(this, arguments[1]);
+ break;
+ case 3:
+ handler.call(this, arguments[1], arguments[2]);
+ break;
+ default:
+ len = arguments.length;
+ args = new Array(len - 1);
+ for (i = 1; i < len; i++)
+ args[i - 1] = arguments[i];
+ handler.apply(this, args);
+ }
+ } else if (isObject(handler)) {
+ len = arguments.length;
+ args = new Array(len - 1);
+ for (i = 1; i < len; i++)
+ args[i - 1] = arguments[i];
+
+ listeners = handler.slice();
+ len = listeners.length;
+ for (i = 0; i < len; i++)
+ listeners[i].apply(this, args);
+ }
+
+ return true;
+};
+
+EventEmitter.prototype.addListener = function(type, listener) {
+ var m;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events)
+ this._events = {};
+ if (this._events.newListener)
+ this.emit('newListener', type,
+ isFunction(listener.listener) ?
+ listener.listener : listener);
+
+ if (!this._events[type])
+ this._events[type] = listener;
+ else if (isObject(this._events[type]))
+ this._events[type].push(listener);
+ else
+ this._events[type] = [this._events[type], listener];
+ if (isObject(this._events[type]) && !this._events[type].warned) {
+ var m;
+ if (!isUndefined(this._maxListeners)) {
+ m = this._maxListeners;
+ } else {
+ m = EventEmitter.defaultMaxListeners;
+ }
+
+ if (m && m > 0 && this._events[type].length > m) {
+ this._events[type].warned = true;
+ console.error('(node) warning: possible EventEmitter memory ' +
+ 'leak detected. %d listeners added. ' +
+ 'Use emitter.setMaxListeners() to increase limit.',
+ this._events[type].length);
+ if (typeof console.trace === 'function') {
+ console.trace();
+ }
+ }
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.on = EventEmitter.prototype.addListener;
+
+EventEmitter.prototype.once = function(type, listener) {
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ var fired = false;
+
+ function g() {
+ this.removeListener(type, g);
+
+ if (!fired) {
+ fired = true;
+ listener.apply(this, arguments);
+ }
+ }
+
+ g.listener = listener;
+ this.on(type, g);
+
+ return this;
+};
+EventEmitter.prototype.removeListener = function(type, listener) {
+ var list, position, length, i;
+
+ if (!isFunction(listener))
+ throw TypeError('listener must be a function');
+
+ if (!this._events || !this._events[type])
+ return this;
+
+ list = this._events[type];
+ length = list.length;
+ position = -1;
+
+ if (list === listener ||
+ (isFunction(list.listener) && list.listener === listener)) {
+ delete this._events[type];
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+
+ } else if (isObject(list)) {
+ for (i = length; i-- > 0;) {
+ if (list[i] === listener ||
+ (list[i].listener && list[i].listener === listener)) {
+ position = i;
+ break;
+ }
+ }
+
+ if (position < 0)
+ return this;
+
+ if (list.length === 1) {
+ list.length = 0;
+ delete this._events[type];
+ } else {
+ list.splice(position, 1);
+ }
+
+ if (this._events.removeListener)
+ this.emit('removeListener', type, listener);
+ }
+
+ return this;
+};
+
+EventEmitter.prototype.removeAllListeners = function(type) {
+ var key, listeners;
+
+ if (!this._events)
+ return this;
+ if (!this._events.removeListener) {
+ if (arguments.length === 0)
+ this._events = {};
+ else if (this._events[type])
+ delete this._events[type];
+ return this;
+ }
+ if (arguments.length === 0) {
+ for (key in this._events) {
+ if (key === 'removeListener') continue;
+ this.removeAllListeners(key);
+ }
+ this.removeAllListeners('removeListener');
+ this._events = {};
+ return this;
+ }
+
+ listeners = this._events[type];
+
+ if (isFunction(listeners)) {
+ this.removeListener(type, listeners);
+ } else {
+ while (listeners.length)
+ this.removeListener(type, listeners[listeners.length - 1]);
+ }
+ delete this._events[type];
+
+ return this;
+};
+
+EventEmitter.prototype.listeners = function(type) {
+ var ret;
+ if (!this._events || !this._events[type])
+ ret = [];
+ else if (isFunction(this._events[type]))
+ ret = [this._events[type]];
+ else
+ ret = this._events[type].slice();
+ return ret;
+};
+
+EventEmitter.listenerCount = function(emitter, type) {
+ var ret;
+ if (!emitter._events || !emitter._events[type])
+ ret = 0;
+ else if (isFunction(emitter._events[type]))
+ ret = 1;
+ else
+ ret = emitter._events[type].length;
+ return ret;
+};
+
+function isFunction(arg) {
+ return typeof arg === 'function';
+}
+
+function isNumber(arg) {
+ return typeof arg === 'number';
+}
+
+function isObject(arg) {
+ return typeof arg === 'object' && arg !== null;
+}
+
+function isUndefined(arg) {
+ return arg === void 0;
+}
+
+},{}],"/node_modules/jshint/data/ascii-identifier-data.js":[function(_dereq_,module,exports){
+var identifierStartTable = [];
+
+for (var i = 0; i < 128; i++) {
+ identifierStartTable[i] =
+ i === 36 || // $
+ i >= 65 && i <= 90 || // A-Z
+ i === 95 || // _
+ i >= 97 && i <= 122; // a-z
+}
+
+var identifierPartTable = [];
+
+for (var i = 0; i < 128; i++) {
+ identifierPartTable[i] =
+ identifierStartTable[i] || // $, _, A-Z, a-z
+ i >= 48 && i <= 57; // 0-9
+}
+
+module.exports = {
+ asciiIdentifierStartTable: identifierStartTable,
+ asciiIdentifierPartTable: identifierPartTable
+};
+
+},{}],"/node_modules/jshint/lodash.js":[function(_dereq_,module,exports){
+(function (global){
+;(function() {
+
+ var undefined;
+
+ var VERSION = '3.7.0';
+
+ var FUNC_ERROR_TEXT = 'Expected a function';
+
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ weakMapTag = '[object WeakMap]';
+
+ var arrayBufferTag = '[object ArrayBuffer]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+
+ var reIsDeepProp = /\.|\[(?:[^[\]]+|(["'])(?:(?!\1)[^\n\\]|\\.)*?)\1\]/,
+ reIsPlainProp = /^\w*$/,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
+
+ var reRegExpChars = /[.*+?^${}()|[\]\/\\]/g,
+ reHasRegExpChars = RegExp(reRegExpChars.source);
+
+ var reEscapeChar = /\\(\\)?/g;
+
+ var reFlags = /\w*$/;
+
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+
+ var typedArrayTags = {};
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+ typedArrayTags[uint32Tag] = true;
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+ typedArrayTags[dateTag] = typedArrayTags[errorTag] =
+ typedArrayTags[funcTag] = typedArrayTags[mapTag] =
+ typedArrayTags[numberTag] = typedArrayTags[objectTag] =
+ typedArrayTags[regexpTag] = typedArrayTags[setTag] =
+ typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
+
+ var cloneableTags = {};
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
+ cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
+ cloneableTags[dateTag] = cloneableTags[float32Tag] =
+ cloneableTags[float64Tag] = cloneableTags[int8Tag] =
+ cloneableTags[int16Tag] = cloneableTags[int32Tag] =
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
+ cloneableTags[regexpTag] = cloneableTags[stringTag] =
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
+ cloneableTags[mapTag] = cloneableTags[setTag] =
+ cloneableTags[weakMapTag] = false;
+
+ var objectTypes = {
+ 'function': true,
+ 'object': true
+ };
+
+ var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
+
+ var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
+
+ var freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global;
+
+ var freeSelf = objectTypes[typeof self] && self && self.Object && self;
+
+ var freeWindow = objectTypes[typeof window] && window && window.Object && window;
+
+ var moduleExports = freeModule && freeModule.exports === freeExports && freeExports;
+
+ var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
+
+ function baseFindIndex(array, predicate, fromRight) {
+ var length = array.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ function baseIndexOf(array, value, fromIndex) {
+ if (value !== value) {
+ return indexOfNaN(array, fromIndex);
+ }
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ function baseIsFunction(value) {
+ return typeof value == 'function' || false;
+ }
+
+ function baseToString(value) {
+ if (typeof value == 'string') {
+ return value;
+ }
+ return value == null ? '' : (value + '');
+ }
+
+ function indexOfNaN(array, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 0 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ var other = array[index];
+ if (other !== other) {
+ return index;
+ }
+ }
+ return -1;
+ }
+
+ function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+ }
+
+ var arrayProto = Array.prototype,
+ objectProto = Object.prototype;
+
+ var fnToString = Function.prototype.toString;
+
+ var hasOwnProperty = objectProto.hasOwnProperty;
+
+ var objToString = objectProto.toString;
+
+ var reIsNative = RegExp('^' +
+ escapeRegExp(objToString)
+ .replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
+
+ var ArrayBuffer = isNative(ArrayBuffer = root.ArrayBuffer) && ArrayBuffer,
+ bufferSlice = isNative(bufferSlice = ArrayBuffer && new ArrayBuffer(0).slice) && bufferSlice,
+ floor = Math.floor,
+ getOwnPropertySymbols = isNative(getOwnPropertySymbols = Object.getOwnPropertySymbols) && getOwnPropertySymbols,
+ getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf,
+ push = arrayProto.push,
+ preventExtensions = isNative(Object.preventExtensions = Object.preventExtensions) && preventExtensions,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
+ Uint8Array = isNative(Uint8Array = root.Uint8Array) && Uint8Array;
+
+ var Float64Array = (function() {
+ try {
+ var func = isNative(func = root.Float64Array) && func,
+ result = new func(new ArrayBuffer(10), 0, 1) && func;
+ } catch(e) {}
+ return result;
+ }());
+
+ var nativeAssign = (function() {
+ var object = { '1': 0 },
+ func = preventExtensions && isNative(func = Object.assign) && func;
+
+ try { func(preventExtensions(object), 'xo'); } catch(e) {}
+ return !object[1] && func;
+ }());
+
+ var nativeIsArray = isNative(nativeIsArray = Array.isArray) && nativeIsArray,
+ nativeKeys = isNative(nativeKeys = Object.keys) && nativeKeys,
+ nativeMax = Math.max,
+ nativeMin = Math.min;
+
+ var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY;
+
+ var MAX_ARRAY_LENGTH = Math.pow(2, 32) - 1,
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
+ HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+
+ var FLOAT64_BYTES_PER_ELEMENT = Float64Array ? Float64Array.BYTES_PER_ELEMENT : 0;
+
+ var MAX_SAFE_INTEGER = Math.pow(2, 53) - 1;
+
+ function lodash() {
+ }
+
+ var support = lodash.support = {};
+
+ (function(x) {
+ var Ctor = function() { this.x = x; },
+ object = { '0': x, 'length': x },
+ props = [];
+
+ Ctor.prototype = { 'valueOf': x, 'y': x };
+ for (var key in new Ctor) { props.push(key); }
+
+ support.funcDecomp = /\bthis\b/.test(function() { return this; });
+
+ support.funcNames = typeof Function.name == 'string';
+
+ try {
+ support.nonEnumArgs = !propertyIsEnumerable.call(arguments, 1);
+ } catch(e) {
+ support.nonEnumArgs = true;
+ }
+ }(1, 0));
+
+ function arrayCopy(source, array) {
+ var index = -1,
+ length = source.length;
+
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+ }
+
+ function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+
+ function arrayFilter(array, predicate) {
+ var index = -1,
+ length = array.length,
+ resIndex = -1,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result[++resIndex] = value;
+ }
+ }
+ return result;
+ }
+
+ function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+ }
+
+ function arrayMax(array) {
+ var index = -1,
+ length = array.length,
+ result = NEGATIVE_INFINITY;
+
+ while (++index < length) {
+ var value = array[index];
+ if (value > result) {
+ result = value;
+ }
+ }
+ return result;
+ }
+
+ function arraySome(array, predicate) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ function assignWith(object, source, customizer) {
+ var props = keys(source);
+ push.apply(props, getSymbols(source));
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index],
+ value = object[key],
+ result = customizer(value, source[key], key, object, source);
+
+ if ((result === result ? (result !== value) : (value === value)) ||
+ (value === undefined && !(key in object))) {
+ object[key] = result;
+ }
+ }
+ return object;
+ }
+
+ var baseAssign = nativeAssign || function(object, source) {
+ return source == null
+ ? object
+ : baseCopy(source, getSymbols(source), baseCopy(source, keys(source), object));
+ };
+
+ function baseCopy(source, props, object) {
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+ object[key] = source[key];
+ }
+ return object;
+ }
+
+ function baseCallback(func, thisArg, argCount) {
+ var type = typeof func;
+ if (type == 'function') {
+ return thisArg === undefined
+ ? func
+ : bindCallback(func, thisArg, argCount);
+ }
+ if (func == null) {
+ return identity;
+ }
+ if (type == 'object') {
+ return baseMatches(func);
+ }
+ return thisArg === undefined
+ ? property(func)
+ : baseMatchesProperty(func, thisArg);
+ }
+
+ function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
+ var result;
+ if (customizer) {
+ result = object ? customizer(value, key, object) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return arrayCopy(value, result);
+ }
+ } else {
+ var tag = objToString.call(value),
+ isFunc = tag == funcTag;
+
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ result = initCloneObject(isFunc ? {} : value);
+ if (!isDeep) {
+ return baseAssign(result, value);
+ }
+ } else {
+ return cloneableTags[tag]
+ ? initCloneByTag(value, tag, isDeep)
+ : (object ? value : {});
+ }
+ }
+ stackA || (stackA = []);
+ stackB || (stackB = []);
+
+ var length = stackA.length;
+ while (length--) {
+ if (stackA[length] == value) {
+ return stackB[length];
+ }
+ }
+ stackA.push(value);
+ stackB.push(result);
+
+ (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
+ result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB);
+ });
+ return result;
+ }
+
+ var baseEach = createBaseEach(baseForOwn);
+
+ function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+ }
+
+ var baseFor = createBaseFor();
+
+ function baseForIn(object, iteratee) {
+ return baseFor(object, iteratee, keysIn);
+ }
+
+ function baseForOwn(object, iteratee) {
+ return baseFor(object, iteratee, keys);
+ }
+
+ function baseGet(object, path, pathKey) {
+ if (object == null) {
+ return;
+ }
+ if (pathKey !== undefined && pathKey in toObject(object)) {
+ path = [pathKey];
+ }
+ var index = -1,
+ length = path.length;
+
+ while (object != null && ++index < length) {
+ var result = object = object[path[index]];
+ }
+ return result;
+ }
+
+ function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {
+ if (value === other) {
+ return value !== 0 || (1 / value == 1 / other);
+ }
+ var valType = typeof value,
+ othType = typeof other;
+
+ if ((valType != 'function' && valType != 'object' && othType != 'function' && othType != 'object') ||
+ value == null || other == null) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
+ }
+
+ function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = arrayTag,
+ othTag = arrayTag;
+
+ if (!objIsArr) {
+ objTag = objToString.call(object);
+ if (objTag == argsTag) {
+ objTag = objectTag;
+ } else if (objTag != objectTag) {
+ objIsArr = isTypedArray(object);
+ }
+ }
+ if (!othIsArr) {
+ othTag = objToString.call(other);
+ if (othTag == argsTag) {
+ othTag = objectTag;
+ } else if (othTag != objectTag) {
+ othIsArr = isTypedArray(other);
+ }
+ }
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && !(objIsArr || objIsObj)) {
+ return equalByTag(object, other, objTag);
+ }
+ if (!isLoose) {
+ var valWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (valWrapped || othWrapped) {
+ return equalFunc(valWrapped ? object.value() : object, othWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stackA || (stackA = []);
+ stackB || (stackB = []);
+
+ var length = stackA.length;
+ while (length--) {
+ if (stackA[length] == object) {
+ return stackB[length] == other;
+ }
+ }
+ stackA.push(object);
+ stackB.push(other);
+
+ var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB);
+
+ stackA.pop();
+ stackB.pop();
+
+ return result;
+ }
+
+ function baseIsMatch(object, props, values, strictCompareFlags, customizer) {
+ var index = -1,
+ length = props.length,
+ noCustomizer = !customizer;
+
+ while (++index < length) {
+ if ((noCustomizer && strictCompareFlags[index])
+ ? values[index] !== object[props[index]]
+ : !(props[index] in object)
+ ) {
+ return false;
+ }
+ }
+ index = -1;
+ while (++index < length) {
+ var key = props[index],
+ objValue = object[key],
+ srcValue = values[index];
+
+ if (noCustomizer && strictCompareFlags[index]) {
+ var result = objValue !== undefined || (key in object);
+ } else {
+ result = customizer ? customizer(objValue, srcValue, key) : undefined;
+ if (result === undefined) {
+ result = baseIsEqual(srcValue, objValue, customizer, true);
+ }
+ }
+ if (!result) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ function baseMatches(source) {
+ var props = keys(source),
+ length = props.length;
+
+ if (!length) {
+ return constant(true);
+ }
+ if (length == 1) {
+ var key = props[0],
+ value = source[key];
+
+ if (isStrictComparable(value)) {
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === value && (value !== undefined || (key in toObject(object)));
+ };
+ }
+ }
+ var values = Array(length),
+ strictCompareFlags = Array(length);
+
+ while (length--) {
+ value = source[props[length]];
+ values[length] = value;
+ strictCompareFlags[length] = isStrictComparable(value);
+ }
+ return function(object) {
+ return object != null && baseIsMatch(toObject(object), props, values, strictCompareFlags);
+ };
+ }
+
+ function baseMatchesProperty(path, value) {
+ var isArr = isArray(path),
+ isCommon = isKey(path) && isStrictComparable(value),
+ pathKey = (path + '');
+
+ path = toPath(path);
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ var key = pathKey;
+ object = toObject(object);
+ if ((isArr || !isCommon) && !(key in object)) {
+ object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ if (object == null) {
+ return false;
+ }
+ key = last(path);
+ object = toObject(object);
+ }
+ return object[key] === value
+ ? (value !== undefined || (key in object))
+ : baseIsEqual(value, object[key], null, true);
+ };
+ }
+
+ function baseMerge(object, source, customizer, stackA, stackB) {
+ if (!isObject(object)) {
+ return object;
+ }
+ var isSrcArr = isLength(source.length) && (isArray(source) || isTypedArray(source));
+ if (!isSrcArr) {
+ var props = keys(source);
+ push.apply(props, getSymbols(source));
+ }
+ arrayEach(props || source, function(srcValue, key) {
+ if (props) {
+ key = srcValue;
+ srcValue = source[key];
+ }
+ if (isObjectLike(srcValue)) {
+ stackA || (stackA = []);
+ stackB || (stackB = []);
+ baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);
+ }
+ else {
+ var value = object[key],
+ result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
+ isCommon = result === undefined;
+
+ if (isCommon) {
+ result = srcValue;
+ }
+ if ((isSrcArr || result !== undefined) &&
+ (isCommon || (result === result ? (result !== value) : (value === value)))) {
+ object[key] = result;
+ }
+ }
+ });
+ return object;
+ }
+
+ function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {
+ var length = stackA.length,
+ srcValue = source[key];
+
+ while (length--) {
+ if (stackA[length] == srcValue) {
+ object[key] = stackB[length];
+ return;
+ }
+ }
+ var value = object[key],
+ result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
+ isCommon = result === undefined;
+
+ if (isCommon) {
+ result = srcValue;
+ if (isLength(srcValue.length) && (isArray(srcValue) || isTypedArray(srcValue))) {
+ result = isArray(value)
+ ? value
+ : (getLength(value) ? arrayCopy(value) : []);
+ }
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ result = isArguments(value)
+ ? toPlainObject(value)
+ : (isPlainObject(value) ? value : {});
+ }
+ else {
+ isCommon = false;
+ }
+ }
+ stackA.push(srcValue);
+ stackB.push(result);
+
+ if (isCommon) {
+ object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);
+ } else if (result === result ? (result !== value) : (value === value)) {
+ object[key] = result;
+ }
+ }
+
+ function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+ }
+
+ function basePropertyDeep(path) {
+ var pathKey = (path + '');
+ path = toPath(path);
+ return function(object) {
+ return baseGet(object, path, pathKey);
+ };
+ }
+
+ function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ start = start == null ? 0 : (+start || 0);
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = (end === undefined || end > length) ? length : (+end || 0);
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+ }
+
+ function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+ }
+
+ function baseValues(object, props) {
+ var index = -1,
+ length = props.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = object[props[index]];
+ }
+ return result;
+ }
+
+ function binaryIndex(array, value, retHighest) {
+ var low = 0,
+ high = array ? array.length : low;
+
+ if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
+ while (low < high) {
+ var mid = (low + high) >>> 1,
+ computed = array[mid];
+
+ if (retHighest ? (computed <= value) : (computed < value)) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return high;
+ }
+ return binaryIndexBy(array, value, identity, retHighest);
+ }
+
+ function binaryIndexBy(array, value, iteratee, retHighest) {
+ value = iteratee(value);
+
+ var low = 0,
+ high = array ? array.length : 0,
+ valIsNaN = value !== value,
+ valIsUndef = value === undefined;
+
+ while (low < high) {
+ var mid = floor((low + high) / 2),
+ computed = iteratee(array[mid]),
+ isReflexive = computed === computed;
+
+ if (valIsNaN) {
+ var setLow = isReflexive || retHighest;
+ } else if (valIsUndef) {
+ setLow = isReflexive && (retHighest || computed !== undefined);
+ } else {
+ setLow = retHighest ? (computed <= value) : (computed < value);
+ }
+ if (setLow) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return nativeMin(high, MAX_ARRAY_INDEX);
+ }
+
+ function bindCallback(func, thisArg, argCount) {
+ if (typeof func != 'function') {
+ return identity;
+ }
+ if (thisArg === undefined) {
+ return func;
+ }
+ switch (argCount) {
+ case 1: return function(value) {
+ return func.call(thisArg, value);
+ };
+ case 3: return function(value, index, collection) {
+ return func.call(thisArg, value, index, collection);
+ };
+ case 4: return function(accumulator, value, index, collection) {
+ return func.call(thisArg, accumulator, value, index, collection);
+ };
+ case 5: return function(value, other, key, object, source) {
+ return func.call(thisArg, value, other, key, object, source);
+ };
+ }
+ return function() {
+ return func.apply(thisArg, arguments);
+ };
+ }
+
+ function bufferClone(buffer) {
+ return bufferSlice.call(buffer, 0);
+ }
+ if (!bufferSlice) {
+ bufferClone = !(ArrayBuffer && Uint8Array) ? constant(null) : function(buffer) {
+ var byteLength = buffer.byteLength,
+ floatLength = Float64Array ? floor(byteLength / FLOAT64_BYTES_PER_ELEMENT) : 0,
+ offset = floatLength * FLOAT64_BYTES_PER_ELEMENT,
+ result = new ArrayBuffer(byteLength);
+
+ if (floatLength) {
+ var view = new Float64Array(result, 0, floatLength);
+ view.set(new Float64Array(buffer, 0, floatLength));
+ }
+ if (byteLength != offset) {
+ view = new Uint8Array(result, offset);
+ view.set(new Uint8Array(buffer, offset));
+ }
+ return result;
+ };
+ }
+
+ function createAssigner(assigner) {
+ return restParam(function(object, sources) {
+ var index = -1,
+ length = object == null ? 0 : sources.length,
+ customizer = length > 2 && sources[length - 2],
+ guard = length > 2 && sources[2],
+ thisArg = length > 1 && sources[length - 1];
+
+ if (typeof customizer == 'function') {
+ customizer = bindCallback(customizer, thisArg, 5);
+ length -= 2;
+ } else {
+ customizer = typeof thisArg == 'function' ? thisArg : null;
+ length -= (customizer ? 1 : 0);
+ }
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? null : customizer;
+ length = 1;
+ }
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, customizer);
+ }
+ }
+ return object;
+ });
+ }
+
+ function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ var length = collection ? getLength(collection) : 0;
+ if (!isLength(length)) {
+ return eachFunc(collection, iteratee);
+ }
+ var index = fromRight ? length : -1,
+ iterable = toObject(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+ }
+
+ function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var iterable = toObject(object),
+ props = keysFunc(object),
+ length = props.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length)) {
+ var key = props[index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+ }
+
+ function createFindIndex(fromRight) {
+ return function(array, predicate, thisArg) {
+ if (!(array && array.length)) {
+ return -1;
+ }
+ predicate = getCallback(predicate, thisArg, 3);
+ return baseFindIndex(array, predicate, fromRight);
+ };
+ }
+
+ function createForEach(arrayFunc, eachFunc) {
+ return function(collection, iteratee, thisArg) {
+ return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection))
+ ? arrayFunc(collection, iteratee)
+ : eachFunc(collection, bindCallback(iteratee, thisArg, 3));
+ };
+ }
+
+ function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {
+ var index = -1,
+ arrLength = array.length,
+ othLength = other.length,
+ result = true;
+
+ if (arrLength != othLength && !(isLoose && othLength > arrLength)) {
+ return false;
+ }
+ while (result && ++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index];
+
+ result = undefined;
+ if (customizer) {
+ result = isLoose
+ ? customizer(othValue, arrValue, index)
+ : customizer(arrValue, othValue, index);
+ }
+ if (result === undefined) {
+ if (isLoose) {
+ var othIndex = othLength;
+ while (othIndex--) {
+ othValue = other[othIndex];
+ result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
+ if (result) {
+ break;
+ }
+ }
+ } else {
+ result = (arrValue && arrValue === othValue) || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
+ }
+ }
+ }
+ return !!result;
+ }
+
+ function equalByTag(object, other, tag) {
+ switch (tag) {
+ case boolTag:
+ case dateTag:
+ return +object == +other;
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case numberTag:
+ return (object != +object)
+ ? other != +other
+ : (object == 0 ? ((1 / object) == (1 / other)) : object == +other);
+
+ case regexpTag:
+ case stringTag:
+ return object == (other + '');
+ }
+ return false;
+ }
+
+ function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
+ var objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isLoose) {
+ return false;
+ }
+ var skipCtor = isLoose,
+ index = -1;
+
+ while (++index < objLength) {
+ var key = objProps[index],
+ result = isLoose ? key in other : hasOwnProperty.call(other, key);
+
+ if (result) {
+ var objValue = object[key],
+ othValue = other[key];
+
+ result = undefined;
+ if (customizer) {
+ result = isLoose
+ ? customizer(othValue, objValue, key)
+ : customizer(objValue, othValue, key);
+ }
+ if (result === undefined) {
+ result = (objValue && objValue === othValue) || equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB);
+ }
+ }
+ if (!result) {
+ return false;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (!skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ function getCallback(func, thisArg, argCount) {
+ var result = lodash.callback || callback;
+ result = result === callback ? baseCallback : result;
+ return argCount ? result(func, thisArg, argCount) : result;
+ }
+
+ function getIndexOf(collection, target, fromIndex) {
+ var result = lodash.indexOf || indexOf;
+ result = result === indexOf ? baseIndexOf : result;
+ return collection ? result(collection, target, fromIndex) : result;
+ }
+
+ var getLength = baseProperty('length');
+
+ var getSymbols = !getOwnPropertySymbols ? constant([]) : function(object) {
+ return getOwnPropertySymbols(toObject(object));
+ };
+
+ function initCloneArray(array) {
+ var length = array.length,
+ result = new array.constructor(length);
+
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
+ }
+
+ function initCloneObject(object) {
+ var Ctor = object.constructor;
+ if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) {
+ Ctor = Object;
+ }
+ return new Ctor;
+ }
+
+ function initCloneByTag(object, tag, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return bufferClone(object);
+
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
+
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ var buffer = object.buffer;
+ return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length);
+
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
+
+ case regexpTag:
+ var result = new Ctor(object.source, reFlags.exec(object));
+ result.lastIndex = object.lastIndex;
+ }
+ return result;
+ }
+
+ function isIndex(value, length) {
+ value = +value;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return value > -1 && value % 1 == 0 && value < length;
+ }
+
+ function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number') {
+ var length = getLength(object),
+ prereq = isLength(length) && isIndex(index, length);
+ } else {
+ prereq = type == 'string' && index in object;
+ }
+ if (prereq) {
+ var other = object[index];
+ return value === value ? (value === other) : (other !== other);
+ }
+ return false;
+ }
+
+ function isKey(value, object) {
+ var type = typeof value;
+ if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {
+ return true;
+ }
+ if (isArray(value)) {
+ return false;
+ }
+ var result = !reIsDeepProp.test(value);
+ return result || (object != null && value in toObject(object));
+ }
+
+ function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
+
+ function isStrictComparable(value) {
+ return value === value && (value === 0 ? ((1 / value) > 0) : !isObject(value));
+ }
+
+ function shimIsPlainObject(value) {
+ var Ctor,
+ support = lodash.support;
+
+ if (!(isObjectLike(value) && objToString.call(value) == objectTag) ||
+ (!hasOwnProperty.call(value, 'constructor') &&
+ (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {
+ return false;
+ }
+ var result;
+ baseForIn(value, function(subValue, key) {
+ result = key;
+ });
+ return result === undefined || hasOwnProperty.call(value, result);
+ }
+
+ function shimKeys(object) {
+ var props = keysIn(object),
+ propsLength = props.length,
+ length = propsLength && object.length,
+ support = lodash.support;
+
+ var allowIndexes = length && isLength(length) &&
+ (isArray(object) || (support.nonEnumArgs && isArguments(object)));
+
+ var index = -1,
+ result = [];
+
+ while (++index < propsLength) {
+ var key = props[index];
+ if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ function toObject(value) {
+ return isObject(value) ? value : Object(value);
+ }
+
+ function toPath(value) {
+ if (isArray(value)) {
+ return value;
+ }
+ var result = [];
+ baseToString(value).replace(rePropName, function(match, number, quote, string) {
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+ }
+
+ var findLastIndex = createFindIndex(true);
+
+ function indexOf(array, value, fromIndex) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return -1;
+ }
+ if (typeof fromIndex == 'number') {
+ fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;
+ } else if (fromIndex) {
+ var index = binaryIndex(array, value),
+ other = array[index];
+
+ if (value === value ? (value === other) : (other !== other)) {
+ return index;
+ }
+ return -1;
+ }
+ return baseIndexOf(array, value, fromIndex || 0);
+ }
+
+ function last(array) {
+ var length = array ? array.length : 0;
+ return length ? array[length - 1] : undefined;
+ }
+
+ function slice(array, start, end) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
+ start = 0;
+ end = length;
+ }
+ return baseSlice(array, start, end);
+ }
+
+ function unzip(array) {
+ var index = -1,
+ length = (array && array.length && arrayMax(arrayMap(array, getLength))) >>> 0,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = arrayMap(array, baseProperty(index));
+ }
+ return result;
+ }
+
+ var zip = restParam(unzip);
+
+ var forEach = createForEach(arrayEach, baseEach);
+
+ function includes(collection, target, fromIndex, guard) {
+ var length = collection ? getLength(collection) : 0;
+ if (!isLength(length)) {
+ collection = values(collection);
+ length = collection.length;
+ }
+ if (!length) {
+ return false;
+ }
+ if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) {
+ fromIndex = 0;
+ } else {
+ fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0);
+ }
+ return (typeof collection == 'string' || !isArray(collection) && isString(collection))
+ ? (fromIndex < length && collection.indexOf(target, fromIndex) > -1)
+ : (getIndexOf(collection, target, fromIndex) > -1);
+ }
+
+ function reject(collection, predicate, thisArg) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ predicate = getCallback(predicate, thisArg, 3);
+ return func(collection, function(value, index, collection) {
+ return !predicate(value, index, collection);
+ });
+ }
+
+ function some(collection, predicate, thisArg) {
+ var func = isArray(collection) ? arraySome : baseSome;
+ if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
+ predicate = null;
+ }
+ if (typeof predicate != 'function' || thisArg !== undefined) {
+ predicate = getCallback(predicate, thisArg, 3);
+ }
+ return func(collection, predicate);
+ }
+
+ function restParam(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ rest = Array(length);
+
+ while (++index < length) {
+ rest[index] = args[start + index];
+ }
+ switch (start) {
+ case 0: return func.call(this, rest);
+ case 1: return func.call(this, args[0], rest);
+ case 2: return func.call(this, args[0], args[1], rest);
+ }
+ var otherArgs = Array(start + 1);
+ index = -1;
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = rest;
+ return func.apply(this, otherArgs);
+ };
+ }
+
+ function clone(value, isDeep, customizer, thisArg) {
+ if (isDeep && typeof isDeep != 'boolean' && isIterateeCall(value, isDeep, customizer)) {
+ isDeep = false;
+ }
+ else if (typeof isDeep == 'function') {
+ thisArg = customizer;
+ customizer = isDeep;
+ isDeep = false;
+ }
+ customizer = typeof customizer == 'function' && bindCallback(customizer, thisArg, 1);
+ return baseClone(value, isDeep, customizer);
+ }
+
+ function isArguments(value) {
+ var length = isObjectLike(value) ? value.length : undefined;
+ return isLength(length) && objToString.call(value) == argsTag;
+ }
+
+ var isArray = nativeIsArray || function(value) {
+ return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
+ };
+
+ function isEmpty(value) {
+ if (value == null) {
+ return true;
+ }
+ var length = getLength(value);
+ if (isLength(length) && (isArray(value) || isString(value) || isArguments(value) ||
+ (isObjectLike(value) && isFunction(value.splice)))) {
+ return !length;
+ }
+ return !keys(value).length;
+ }
+
+ var isFunction = !(baseIsFunction(/x/) || (Uint8Array && !baseIsFunction(Uint8Array))) ? baseIsFunction : function(value) {
+ return objToString.call(value) == funcTag;
+ };
+
+ function isObject(value) {
+ var type = typeof value;
+ return type == 'function' || (!!value && type == 'object');
+ }
+
+ function isNative(value) {
+ if (value == null) {
+ return false;
+ }
+ if (objToString.call(value) == funcTag) {
+ return reIsNative.test(fnToString.call(value));
+ }
+ return isObjectLike(value) && reIsHostCtor.test(value);
+ }
+
+ function isNumber(value) {
+ return typeof value == 'number' || (isObjectLike(value) && objToString.call(value) == numberTag);
+ }
+
+ var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) {
+ if (!(value && objToString.call(value) == objectTag)) {
+ return false;
+ }
+ var valueOf = value.valueOf,
+ objProto = isNative(valueOf) && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto);
+
+ return objProto
+ ? (value == objProto || getPrototypeOf(value) == objProto)
+ : shimIsPlainObject(value);
+ };
+
+ function isString(value) {
+ return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag);
+ }
+
+ function isTypedArray(value) {
+ return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];
+ }
+
+ function toPlainObject(value) {
+ return baseCopy(value, keysIn(value));
+ }
+
+ var assign = createAssigner(function(object, source, customizer) {
+ return customizer
+ ? assignWith(object, source, customizer)
+ : baseAssign(object, source);
+ });
+
+ function has(object, path) {
+ if (object == null) {
+ return false;
+ }
+ var result = hasOwnProperty.call(object, path);
+ if (!result && !isKey(path)) {
+ path = toPath(path);
+ object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ path = last(path);
+ result = object != null && hasOwnProperty.call(object, path);
+ }
+ return result;
+ }
+
+ var keys = !nativeKeys ? shimKeys : function(object) {
+ if (object) {
+ var Ctor = object.constructor,
+ length = object.length;
+ }
+ if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
+ (typeof object != 'function' && isLength(length))) {
+ return shimKeys(object);
+ }
+ return isObject(object) ? nativeKeys(object) : [];
+ };
+
+ function keysIn(object) {
+ if (object == null) {
+ return [];
+ }
+ if (!isObject(object)) {
+ object = Object(object);
+ }
+ var length = object.length;
+ length = (length && isLength(length) &&
+ (isArray(object) || (support.nonEnumArgs && isArguments(object))) && length) || 0;
+
+ var Ctor = object.constructor,
+ index = -1,
+ isProto = typeof Ctor == 'function' && Ctor.prototype === object,
+ result = Array(length),
+ skipIndexes = length > 0;
+
+ while (++index < length) {
+ result[index] = (index + '');
+ }
+ for (var key in object) {
+ if (!(skipIndexes && isIndex(key, length)) &&
+ !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+
+ var merge = createAssigner(baseMerge);
+
+ function values(object) {
+ return baseValues(object, keys(object));
+ }
+
+ function escapeRegExp(string) {
+ string = baseToString(string);
+ return (string && reHasRegExpChars.test(string))
+ ? string.replace(reRegExpChars, '\\$&')
+ : string;
+ }
+
+ function callback(func, thisArg, guard) {
+ if (guard && isIterateeCall(func, thisArg, guard)) {
+ thisArg = null;
+ }
+ return baseCallback(func, thisArg);
+ }
+
+ function constant(value) {
+ return function() {
+ return value;
+ };
+ }
+
+ function identity(value) {
+ return value;
+ }
+
+ function property(path) {
+ return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
+ }
+ lodash.assign = assign;
+ lodash.callback = callback;
+ lodash.constant = constant;
+ lodash.forEach = forEach;
+ lodash.keys = keys;
+ lodash.keysIn = keysIn;
+ lodash.merge = merge;
+ lodash.property = property;
+ lodash.reject = reject;
+ lodash.restParam = restParam;
+ lodash.slice = slice;
+ lodash.toPlainObject = toPlainObject;
+ lodash.unzip = unzip;
+ lodash.values = values;
+ lodash.zip = zip;
+
+ lodash.each = forEach;
+ lodash.extend = assign;
+ lodash.iteratee = callback;
+ lodash.clone = clone;
+ lodash.escapeRegExp = escapeRegExp;
+ lodash.findLastIndex = findLastIndex;
+ lodash.has = has;
+ lodash.identity = identity;
+ lodash.includes = includes;
+ lodash.indexOf = indexOf;
+ lodash.isArguments = isArguments;
+ lodash.isArray = isArray;
+ lodash.isEmpty = isEmpty;
+ lodash.isFunction = isFunction;
+ lodash.isNative = isNative;
+ lodash.isNumber = isNumber;
+ lodash.isObject = isObject;
+ lodash.isPlainObject = isPlainObject;
+ lodash.isString = isString;
+ lodash.isTypedArray = isTypedArray;
+ lodash.last = last;
+ lodash.some = some;
+
+ lodash.any = some;
+ lodash.contains = includes;
+ lodash.include = includes;
+
+ lodash.VERSION = VERSION;
+ if (freeExports && freeModule) {
+ if (moduleExports) {
+ (freeModule.exports = lodash)._ = lodash;
+ }
+ else {
+ freeExports._ = lodash;
+ }
+ }
+ else {
+ root._ = lodash;
+ }
+}.call(this));
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}],"/node_modules/jshint/src/jshint.js":[function(_dereq_,module,exports){
+
+var _ = _dereq_("../lodash");
+var events = _dereq_("events");
+var vars = _dereq_("./vars.js");
+var messages = _dereq_("./messages.js");
+var Lexer = _dereq_("./lex.js").Lexer;
+var reg = _dereq_("./reg.js");
+var state = _dereq_("./state.js").state;
+var style = _dereq_("./style.js");
+var options = _dereq_("./options.js");
+var scopeManager = _dereq_("./scope-manager.js");
+
+var JSHINT = (function() {
+ "use strict";
+
+ var api, // Extension API
+ bang = {
+ "<" : true,
+ "<=" : true,
+ "==" : true,
+ "===": true,
+ "!==": true,
+ "!=" : true,
+ ">" : true,
+ ">=" : true,
+ "+" : true,
+ "-" : true,
+ "*" : true,
+ "/" : true,
+ "%" : true
+ },
+
+ declared, // Globals that were declared using /*global ... */ syntax.
+
+ functionicity = [
+ "closure", "exception", "global", "label",
+ "outer", "unused", "var"
+ ],
+
+ functions, // All of the functions
+
+ inblock,
+ indent,
+ lookahead,
+ lex,
+ member,
+ membersOnly,
+ predefined, // Global variables defined by option
+
+ stack,
+ urls,
+
+ extraModules = [],
+ emitter = new events.EventEmitter();
+
+ function checkOption(name, t) {
+ name = name.trim();
+
+ if (/^[+-]W\d{3}$/g.test(name)) {
+ return true;
+ }
+
+ if (options.validNames.indexOf(name) === -1) {
+ if (t.type !== "jslint" && !_.has(options.removed, name)) {
+ error("E001", t, name);
+ return false;
+ }
+ }
+
+ return true;
+ }
+
+ function isString(obj) {
+ return Object.prototype.toString.call(obj) === "[object String]";
+ }
+
+ function isIdentifier(tkn, value) {
+ if (!tkn)
+ return false;
+
+ if (!tkn.identifier || tkn.value !== value)
+ return false;
+
+ return true;
+ }
+
+ function isReserved(token) {
+ if (!token.reserved) {
+ return false;
+ }
+ var meta = token.meta;
+
+ if (meta && meta.isFutureReservedWord && state.inES5()) {
+ if (!meta.es5) {
+ return false;
+ }
+ if (meta.strictOnly) {
+ if (!state.option.strict && !state.isStrict()) {
+ return false;
+ }
+ }
+
+ if (token.isProperty) {
+ 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(dest, src) {
+ Object.keys(src).forEach(function(name) {
+ if (_.has(JSHINT.blacklist, name)) return;
+ dest[name] = src[name];
+ });
+ }
+
+ function processenforceall() {
+ if (state.option.enforceall) {
+ for (var enforceopt in options.bool.enforcing) {
+ if (state.option[enforceopt] === undefined &&
+ !options.noenforceall[enforceopt]) {
+ state.option[enforceopt] = true;
+ }
+ }
+ for (var relaxopt in options.bool.relaxing) {
+ if (state.option[relaxopt] === undefined) {
+ state.option[relaxopt] = false;
+ }
+ }
+ }
+ }
+
+ function assume() {
+ processenforceall();
+ if (!state.option.esversion && !state.option.moz) {
+ if (state.option.es3) {
+ state.option.esversion = 3;
+ } else if (state.option.esnext) {
+ state.option.esversion = 6;
+ } else {
+ state.option.esversion = 5;
+ }
+ }
+
+ if (state.inES5()) {
+ combine(predefined, vars.ecmaIdentifiers[5]);
+ }
+
+ if (state.inES6()) {
+ combine(predefined, vars.ecmaIdentifiers[6]);
+ }
+
+ if (state.option.module) {
+ if (state.option.strict === true) {
+ state.option.strict = "global";
+ }
+ if (!state.inES6()) {
+ warning("W134", state.tokens.next, "module", 6);
+ }
+ }
+
+ if (state.option.couch) {
+ combine(predefined, vars.couch);
+ }
+
+ if (state.option.qunit) {
+ combine(predefined, vars.qunit);
+ }
+
+ if (state.option.rhino) {
+ combine(predefined, vars.rhino);
+ }
+
+ if (state.option.shelljs) {
+ combine(predefined, vars.shelljs);
+ combine(predefined, vars.node);
+ }
+ if (state.option.typed) {
+ combine(predefined, vars.typed);
+ }
+
+ if (state.option.phantom) {
+ combine(predefined, vars.phantom);
+ if (state.option.strict === true) {
+ state.option.strict = "global";
+ }
+ }
+
+ if (state.option.prototypejs) {
+ combine(predefined, vars.prototypejs);
+ }
+
+ if (state.option.node) {
+ combine(predefined, vars.node);
+ combine(predefined, vars.typed);
+ if (state.option.strict === true) {
+ state.option.strict = "global";
+ }
+ }
+
+ if (state.option.devel) {
+ combine(predefined, vars.devel);
+ }
+
+ if (state.option.dojo) {
+ combine(predefined, vars.dojo);
+ }
+
+ if (state.option.browser) {
+ combine(predefined, vars.browser);
+ combine(predefined, vars.typed);
+ }
+
+ if (state.option.browserify) {
+ combine(predefined, vars.browser);
+ combine(predefined, vars.typed);
+ combine(predefined, vars.browserify);
+ if (state.option.strict === true) {
+ state.option.strict = "global";
+ }
+ }
+
+ if (state.option.nonstandard) {
+ combine(predefined, vars.nonstandard);
+ }
+
+ if (state.option.jasmine) {
+ combine(predefined, vars.jasmine);
+ }
+
+ if (state.option.jquery) {
+ combine(predefined, vars.jquery);
+ }
+
+ if (state.option.mootools) {
+ combine(predefined, vars.mootools);
+ }
+
+ if (state.option.worker) {
+ combine(predefined, vars.worker);
+ }
+
+ if (state.option.wsh) {
+ combine(predefined, vars.wsh);
+ }
+
+ if (state.option.globalstrict && state.option.strict !== false) {
+ state.option.strict = "global";
+ }
+
+ if (state.option.yui) {
+ combine(predefined, vars.yui);
+ }
+
+ if (state.option.mocha) {
+ combine(predefined, vars.mocha);
+ }
+ }
+ function quit(code, line, chr) {
+ var percentage = Math.floor((line / state.lines.length) * 100);
+ var message = messages.errors[code].desc;
+
+ throw {
+ name: "JSHintError",
+ line: line,
+ character: chr,
+ message: message + " (" + percentage + "% scanned).",
+ raw: message,
+ code: code
+ };
+ }
+
+ function removeIgnoredMessages() {
+ var ignored = state.ignoredLines;
+
+ if (_.isEmpty(ignored)) return;
+ JSHINT.errors = _.reject(JSHINT.errors, function(err) { return ignored[err.line] });
+ }
+
+ function warning(code, t, a, b, c, d) {
+ var ch, l, w, msg;
+
+ if (/^W\d{3}$/.test(code)) {
+ if (state.ignored[code])
+ return;
+
+ msg = messages.warnings[code];
+ } else if (/E\d{3}/.test(code)) {
+ msg = messages.errors[code];
+ } else if (/I\d{3}/.test(code)) {
+ msg = messages.info[code];
+ }
+
+ t = t || state.tokens.next || {};
+ if (t.id === "(end)") { // `~
+ t = state.tokens.curr;
+ }
+
+ l = t.line || 0;
+ ch = t.from || 0;
+
+ w = {
+ id: "(error)",
+ raw: msg.desc,
+ code: msg.code,
+ evidence: state.lines[l - 1] || "",
+ line: l,
+ character: ch,
+ scope: JSHINT.scope,
+ a: a,
+ b: b,
+ c: c,
+ d: d
+ };
+
+ w.reason = supplant(msg.desc, w);
+ JSHINT.errors.push(w);
+
+ removeIgnoredMessages();
+
+ if (JSHINT.errors.length >= state.option.maxerr)
+ quit("E043", 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;
+ }
+
+ function doOption() {
+ var nt = state.tokens.next;
+ var body = nt.body.match(/(-\s+)?[^\s,:]+(?:\s*:\s*(-\s+)?[^\s,]+)?/g) || [];
+
+ var predef = {};
+ if (nt.type === "globals") {
+ body.forEach(function(g, idx) {
+ g = g.split(":");
+ var key = (g[0] || "").trim();
+ var val = (g[1] || "").trim();
+
+ if (key === "-" || !key.length) {
+ if (idx > 0 && idx === body.length - 1) {
+ return;
+ }
+ error("E002", nt);
+ return;
+ }
+
+ if (key.charAt(0) === "-") {
+ key = key.slice(1);
+ val = false;
+
+ JSHINT.blacklist[key] = key;
+ delete predefined[key];
+ } else {
+ predef[key] = (val === "true");
+ }
+ });
+
+ combine(predefined, predef);
+
+ for (var key in predef) {
+ if (_.has(predef, key)) {
+ declared[key] = nt;
+ }
+ }
+ }
+
+ if (nt.type === "exported") {
+ body.forEach(function(e, idx) {
+ if (!e.length) {
+ if (idx > 0 && idx === body.length - 1) {
+ return;
+ }
+ error("E002", nt);
+ return;
+ }
+
+ state.funct["(scope)"].addExported(e);
+ });
+ }
+
+ if (nt.type === "members") {
+ membersOnly = membersOnly || {};
+
+ body.forEach(function(m) {
+ var ch1 = m.charAt(0);
+ var ch2 = m.charAt(m.length - 1);
+
+ if (ch1 === ch2 && (ch1 === "\"" || ch1 === "'")) {
+ m = m
+ .substr(1, m.length - 2)
+ .replace("\\\"", "\"");
+ }
+
+ membersOnly[m] = false;
+ });
+ }
+
+ var numvals = [
+ "maxstatements",
+ "maxparams",
+ "maxdepth",
+ "maxcomplexity",
+ "maxerr",
+ "maxlen",
+ "indent"
+ ];
+
+ if (nt.type === "jshint" || nt.type === "jslint") {
+ body.forEach(function(g) {
+ g = g.split(":");
+ var key = (g[0] || "").trim();
+ var val = (g[1] || "").trim();
+
+ if (!checkOption(key, nt)) {
+ return;
+ }
+
+ if (numvals.indexOf(key) >= 0) {
+ if (val !== "false") {
+ val = +val;
+
+ if (typeof val !== "number" || !isFinite(val) || val <= 0 || Math.floor(val) !== val) {
+ error("E032", nt, g[1].trim());
+ return;
+ }
+
+ state.option[key] = val;
+ } else {
+ state.option[key] = key === "indent" ? 4 : false;
+ }
+
+ return;
+ }
+
+ if (key === "validthis") {
+
+ if (state.funct["(global)"])
+ return void error("E009");
+
+ if (val !== "true" && val !== "false")
+ return void error("E002", nt);
+
+ state.option.validthis = (val === "true");
+ return;
+ }
+
+ if (key === "quotmark") {
+ switch (val) {
+ case "true":
+ case "false":
+ state.option.quotmark = (val === "true");
+ break;
+ case "double":
+ case "single":
+ state.option.quotmark = val;
+ break;
+ default:
+ error("E002", nt);
+ }
+ return;
+ }
+
+ if (key === "shadow") {
+ switch (val) {
+ case "true":
+ state.option.shadow = true;
+ break;
+ case "outer":
+ state.option.shadow = "outer";
+ break;
+ case "false":
+ case "inner":
+ state.option.shadow = "inner";
+ break;
+ default:
+ error("E002", nt);
+ }
+ return;
+ }
+
+ if (key === "unused") {
+ switch (val) {
+ case "true":
+ state.option.unused = true;
+ break;
+ case "false":
+ state.option.unused = false;
+ break;
+ case "vars":
+ case "strict":
+ state.option.unused = val;
+ break;
+ default:
+ error("E002", nt);
+ }
+ return;
+ }
+
+ if (key === "latedef") {
+ switch (val) {
+ case "true":
+ state.option.latedef = true;
+ break;
+ case "false":
+ state.option.latedef = false;
+ break;
+ case "nofunc":
+ state.option.latedef = "nofunc";
+ break;
+ default:
+ error("E002", nt);
+ }
+ return;
+ }
+
+ if (key === "ignore") {
+ switch (val) {
+ case "line":
+ state.ignoredLines[nt.line] = true;
+ removeIgnoredMessages();
+ break;
+ default:
+ error("E002", nt);
+ }
+ return;
+ }
+
+ if (key === "strict") {
+ switch (val) {
+ case "true":
+ state.option.strict = true;
+ break;
+ case "false":
+ state.option.strict = false;
+ break;
+ case "func":
+ case "global":
+ case "implied":
+ state.option.strict = val;
+ break;
+ default:
+ error("E002", nt);
+ }
+ return;
+ }
+
+ if (key === "module") {
+ if (!hasParsedCode(state.funct)) {
+ error("E055", state.tokens.next, "module");
+ }
+ }
+ var esversions = {
+ es3 : 3,
+ es5 : 5,
+ esnext: 6
+ };
+ if (_.has(esversions, key)) {
+ switch (val) {
+ case "true":
+ state.option.moz = false;
+ state.option.esversion = esversions[key];
+ break;
+ case "false":
+ if (!state.option.moz) {
+ state.option.esversion = 5;
+ }
+ break;
+ default:
+ error("E002", nt);
+ }
+ return;
+ }
+
+ if (key === "esversion") {
+ switch (val) {
+ case "5":
+ if (state.inES5(true)) {
+ warning("I003");
+ }
+ case "3":
+ case "6":
+ state.option.moz = false;
+ state.option.esversion = +val;
+ break;
+ case "2015":
+ state.option.moz = false;
+ state.option.esversion = 6;
+ break;
+ default:
+ error("E002", nt);
+ }
+ if (!hasParsedCode(state.funct)) {
+ error("E055", state.tokens.next, "esversion");
+ }
+ return;
+ }
+
+ var match = /^([+-])(W\d{3})$/g.exec(key);
+ if (match) {
+ state.ignored[match[2]] = (match[1] === "-");
+ return;
+ }
+
+ var tn;
+ if (val === "true" || val === "false") {
+ if (nt.type === "jslint") {
+ tn = options.renamed[key] || key;
+ state.option[tn] = (val === "true");
+
+ if (options.inverted[tn] !== undefined) {
+ state.option[tn] = !state.option[tn];
+ }
+ } else {
+ state.option[key] = (val === "true");
+ }
+
+ if (key === "newcap") {
+ state.option["(explicitNewcap)"] = true;
+ }
+ return;
+ }
+
+ error("E002", nt);
+ });
+
+ assume();
+ }
+ }
+
+ function peek(p) {
+ var i = p || 0, j = lookahead.length, t;
+
+ if (i < j) {
+ return lookahead[i];
+ }
+
+ while (j <= i) {
+ t = lookahead[j];
+ if (!t) {
+ t = lookahead[j] = lex.token();
+ }
+ j += 1;
+ }
+ if (!t && state.tokens.next.id === "(end)") {
+ return state.tokens.next;
+ }
+
+ return t;
+ }
+
+ function peekIgnoreEOL() {
+ var i = 0;
+ var t;
+ do {
+ t = peek(i++);
+ } while (t.id === "(endline)");
+ return t;
+ }
+
+ function advance(id, t) {
+
+ switch (state.tokens.curr.id) {
+ case "(number)":
+ if (state.tokens.next.id === ".") {
+ warning("W005", state.tokens.curr);
+ }
+ break;
+ case "-":
+ if (state.tokens.next.id === "-" || state.tokens.next.id === "--") {
+ warning("W006");
+ }
+ break;
+ case "+":
+ if (state.tokens.next.id === "+" || state.tokens.next.id === "++") {
+ warning("W007");
+ }
+ break;
+ }
+
+ if (id && state.tokens.next.id !== id) {
+ if (t) {
+ if (state.tokens.next.id === "(end)") {
+ error("E019", t, t.id);
+ } else {
+ error("E020", state.tokens.next, id, t.id, t.line, state.tokens.next.value);
+ }
+ } else if (state.tokens.next.type !== "(identifier)" || state.tokens.next.value !== id) {
+ warning("W116", state.tokens.next, id, state.tokens.next.value);
+ }
+ }
+
+ state.tokens.prev = state.tokens.curr;
+ state.tokens.curr = state.tokens.next;
+ for (;;) {
+ state.tokens.next = lookahead.shift() || lex.token();
+
+ if (!state.tokens.next) { // No more tokens left, give up
+ quit("E041", state.tokens.curr.line);
+ }
+
+ if (state.tokens.next.id === "(end)" || state.tokens.next.id === "(error)") {
+ return;
+ }
+
+ if (state.tokens.next.check) {
+ state.tokens.next.check();
+ }
+
+ if (state.tokens.next.isSpecial) {
+ if (state.tokens.next.type === "falls through") {
+ state.tokens.curr.caseFallsThrough = true;
+ } else {
+ doOption();
+ }
+ } else {
+ if (state.tokens.next.id !== "(endline)") {
+ break;
+ }
+ }
+ }
+ }
+
+ function isInfix(token) {
+ return token.infix || (!token.identifier && !token.template && !!token.led);
+ }
+
+ function isEndOfExpr() {
+ var curr = state.tokens.curr;
+ var next = state.tokens.next;
+ if (next.id === ";" || next.id === "}" || next.id === ":") {
+ return true;
+ }
+ if (isInfix(next) === isInfix(curr) || (curr.id === "yield" && state.inMoz())) {
+ return curr.line !== startLine(next);
+ }
+ return false;
+ }
+
+ function isBeginOfExpr(prev) {
+ return !prev.left && prev.arity !== "unary";
+ }
+
+ function expression(rbp, initial) {
+ var left, isArray = false, isObject = false, isLetExpr = false;
+
+ state.nameStack.push();
+ if (!initial && state.tokens.next.value === "let" && peek(0).value === "(") {
+ if (!state.inMoz()) {
+ warning("W118", state.tokens.next, "let expressions");
+ }
+ isLetExpr = true;
+ state.funct["(scope)"].stack();
+ advance("let");
+ advance("(");
+ state.tokens.prev.fud();
+ advance(")");
+ }
+
+ if (state.tokens.next.id === "(end)")
+ error("E006", state.tokens.curr);
+
+ var isDangerous =
+ state.option.asi &&
+ state.tokens.prev.line !== startLine(state.tokens.curr) &&
+ _.contains(["]", ")"], state.tokens.prev.id) &&
+ _.contains(["[", "("], state.tokens.curr.id);
+
+ if (isDangerous)
+ warning("W014", state.tokens.curr, state.tokens.curr.id);
+
+ advance();
+
+ if (initial) {
+ state.funct["(verb)"] = state.tokens.curr.value;
+ state.tokens.curr.beginsStmt = true;
+ }
+
+ if (initial === true && state.tokens.curr.fud) {
+ left = state.tokens.curr.fud();
+ } else {
+ if (state.tokens.curr.nud) {
+ left = state.tokens.curr.nud();
+ } else {
+ error("E030", state.tokens.curr, state.tokens.curr.id);
+ }
+ while ((rbp < state.tokens.next.lbp || state.tokens.next.type === "(template)") &&
+ !isEndOfExpr()) {
+ isArray = state.tokens.curr.value === "Array";
+ isObject = state.tokens.curr.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 !== state.tokens.curr.value) {
+ isObject = false;
+ }
+ }
+ }
+
+ advance();
+
+ if (isArray && state.tokens.curr.id === "(" && state.tokens.next.id === ")") {
+ warning("W009", state.tokens.curr);
+ }
+
+ if (isObject && state.tokens.curr.id === "(" && state.tokens.next.id === ")") {
+ warning("W010", state.tokens.curr);
+ }
+
+ if (left && state.tokens.curr.led) {
+ left = state.tokens.curr.led(left);
+ } else {
+ error("E033", state.tokens.curr, state.tokens.curr.id);
+ }
+ }
+ }
+ if (isLetExpr) {
+ state.funct["(scope)"].unstack();
+ }
+
+ state.nameStack.pop();
+
+ return left;
+ }
+
+ function startLine(token) {
+ return token.startLine || token.line;
+ }
+
+ function nobreaknonadjacent(left, right) {
+ left = left || state.tokens.curr;
+ right = right || state.tokens.next;
+ if (!state.option.laxbreak && left.line !== startLine(right)) {
+ warning("W014", right, right.value);
+ }
+ }
+
+ function nolinebreak(t) {
+ t = t || state.tokens.curr;
+ if (t.line !== startLine(state.tokens.next)) {
+ warning("E022", t, t.value);
+ }
+ }
+
+ function nobreakcomma(left, right) {
+ if (left.line !== startLine(right)) {
+ if (!state.option.laxcomma) {
+ if (comma.first) {
+ warning("I001");
+ comma.first = false;
+ }
+ warning("W014", left, right.value);
+ }
+ }
+ }
+
+ function comma(opts) {
+ opts = opts || {};
+
+ if (!opts.peek) {
+ nobreakcomma(state.tokens.curr, state.tokens.next);
+ advance(",");
+ } else {
+ nobreakcomma(state.tokens.prev, state.tokens.curr);
+ }
+
+ if (state.tokens.next.identifier && !(opts.property && state.inES5())) {
+ switch (state.tokens.next.value) {
+ case "break":
+ case "case":
+ case "catch":
+ case "continue":
+ case "default":
+ case "do":
+ case "else":
+ case "finally":
+ case "for":
+ case "if":
+ case "in":
+ case "instanceof":
+ case "return":
+ case "switch":
+ case "throw":
+ case "try":
+ case "var":
+ case "let":
+ case "while":
+ case "with":
+ error("E024", state.tokens.next, state.tokens.next.value);
+ return false;
+ }
+ }
+
+ if (state.tokens.next.type === "(punctuator)") {
+ switch (state.tokens.next.value) {
+ case "}":
+ case "]":
+ case ",":
+ if (opts.allowTrailing) {
+ return true;
+ }
+ case ")":
+ error("E024", state.tokens.next, state.tokens.next.value);
+ return false;
+ }
+ }
+ return true;
+ }
+
+ function symbol(s, p) {
+ var x = state.syntax[s];
+ if (!x || typeof x !== "object") {
+ state.syntax[s] = x = {
+ id: s,
+ lbp: p,
+ value: s
+ };
+ }
+ return x;
+ }
+
+ function delim(s) {
+ var x = symbol(s, 0);
+ x.delim = true;
+ return x;
+ }
+
+ 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.arity = "unary";
+ this.right = expression(150);
+
+ if (this.id === "++" || this.id === "--") {
+ if (state.option.plusplus) {
+ warning("W016", this, this.id);
+ } else if (this.right && (!this.right.identifier || isReserved(this.right)) &&
+ this.right.id !== "." && this.right.id !== "[") {
+ warning("W017", this);
+ }
+
+ if (this.right && this.right.isMetaProperty) {
+ error("E031", this);
+ } else if (this.right && this.right.identifier) {
+ state.funct["(scope)"].block.modify(this.right.value, this);
+ }
+ }
+
+ return this;
+ };
+
+ return x;
+ }
+
+ function type(s, f) {
+ var x = delim(s);
+ x.type = s;
+ x.nud = f;
+ return x;
+ }
+
+ function reserve(name, func) {
+ var x = type(name, func);
+ x.identifier = true;
+ x.reserved = true;
+ return x;
+ }
+
+ function FutureReservedWord(name, meta) {
+ var x = type(name, (meta && meta.nud) || function() {
+ return this;
+ });
+
+ meta = meta || {};
+ meta.isFutureReservedWord = true;
+
+ x.value = name;
+ x.identifier = true;
+ x.reserved = true;
+ x.meta = meta;
+
+ 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.infix = true;
+ x.led = function(left) {
+ if (!w) {
+ nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
+ }
+ if ((s === "in" || s === "instanceof") && left.id === "!") {
+ warning("W018", left, "!");
+ }
+ if (typeof f === "function") {
+ return f(left, this);
+ } else {
+ this.left = left;
+ this.right = expression(p);
+ return this;
+ }
+ };
+ return x;
+ }
+
+ function application(s) {
+ var x = symbol(s, 42);
+
+ x.led = function(left) {
+ nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
+
+ this.left = left;
+ this.right = doFunction({ type: "arrow", loneArg: left });
+ return this;
+ };
+ return x;
+ }
+
+ function relation(s, f) {
+ var x = symbol(s, 100);
+
+ x.led = function(left) {
+ nobreaknonadjacent(state.tokens.prev, state.tokens.curr);
+ this.left = left;
+ var right = this.right = expression(100);
+
+ if (isIdentifier(left, "NaN") || isIdentifier(right, "NaN")) {
+ warning("W019", this);
+ } else if (f) {
+ f.apply(this, [left, right]);
+ }
+
+ if (!left || !right) {
+ quit("E041", state.tokens.curr.line);
+ }
+
+ if (left.id === "!") {
+ warning("W018", left, "!");
+ }
+
+ if (right.id === "!") {
+ warning("W018", right, "!");
+ }
+
+ return this;
+ };
+ return x;
+ }
+
+ function isPoorRelation(node) {
+ return node &&
+ ((node.type === "(number)" && +node.value === 0) ||
+ (node.type === "(string)" && node.value === "") ||
+ (node.type === "null" && !state.option.eqnull) ||
+ node.type === "true" ||
+ node.type === "false" ||
+ node.type === "undefined");
+ }
+
+ var typeofValues = {};
+ typeofValues.legacy = [
+ "xml",
+ "unknown"
+ ];
+ typeofValues.es3 = [
+ "undefined", "boolean", "number", "string", "function", "object",
+ ];
+ typeofValues.es3 = typeofValues.es3.concat(typeofValues.legacy);
+ typeofValues.es6 = typeofValues.es3.concat("symbol");
+ function isTypoTypeof(left, right, state) {
+ var values;
+
+ if (state.option.notypeof)
+ return false;
+
+ if (!left || !right)
+ return false;
+
+ values = state.inES6() ? typeofValues.es6 : typeofValues.es3;
+
+ if (right.type === "(identifier)" && right.value === "typeof" && left.type === "(string)")
+ return !_.contains(values, left.value);
+
+ return false;
+ }
+
+ function isGlobalEval(left, state) {
+ var isGlobal = false;
+ if (left.type === "this" && state.funct["(context)"] === null) {
+ isGlobal = true;
+ }
+ else if (left.type === "(identifier)") {
+ if (state.option.node && left.value === "global") {
+ isGlobal = true;
+ }
+
+ else if (state.option.browser && (left.value === "window" || left.value === "document")) {
+ isGlobal = true;
+ }
+ }
+
+ return isGlobal;
+ }
+
+ function findNativePrototype(left) {
+ var natives = [
+ "Array", "ArrayBuffer", "Boolean", "Collator", "DataView", "Date",
+ "DateTimeFormat", "Error", "EvalError", "Float32Array", "Float64Array",
+ "Function", "Infinity", "Intl", "Int16Array", "Int32Array", "Int8Array",
+ "Iterator", "Number", "NumberFormat", "Object", "RangeError",
+ "ReferenceError", "RegExp", "StopIteration", "String", "SyntaxError",
+ "TypeError", "Uint16Array", "Uint32Array", "Uint8Array", "Uint8ClampedArray",
+ "URIError"
+ ];
+
+ function walkPrototype(obj) {
+ if (typeof obj !== "object") return;
+ return obj.right === "prototype" ? obj : walkPrototype(obj.left);
+ }
+
+ function walkNative(obj) {
+ while (!obj.identifier && typeof obj.left === "object")
+ obj = obj.left;
+
+ if (obj.identifier && natives.indexOf(obj.value) >= 0)
+ return obj.value;
+ }
+
+ var prototype = walkPrototype(left);
+ if (prototype) return walkNative(prototype);
+ }
+ function checkLeftSideAssign(left, assignToken, options) {
+
+ var allowDestructuring = options && options.allowDestructuring;
+
+ assignToken = assignToken || left;
+
+ if (state.option.freeze) {
+ var nativeObject = findNativePrototype(left);
+ if (nativeObject)
+ warning("W121", left, nativeObject);
+ }
+
+ if (left.identifier && !left.isMetaProperty) {
+ state.funct["(scope)"].block.reassign(left.value, left);
+ }
+
+ if (left.id === ".") {
+ if (!left.left || left.left.value === "arguments" && !state.isStrict()) {
+ warning("E031", assignToken);
+ }
+
+ state.nameStack.set(state.tokens.prev);
+ return true;
+ } else if (left.id === "{" || left.id === "[") {
+ if (allowDestructuring && state.tokens.curr.left.destructAssign) {
+ state.tokens.curr.left.destructAssign.forEach(function(t) {
+ if (t.id) {
+ state.funct["(scope)"].block.modify(t.id, t.token);
+ }
+ });
+ } else {
+ if (left.id === "{" || !left.left) {
+ warning("E031", assignToken);
+ } else if (left.left.value === "arguments" && !state.isStrict()) {
+ warning("E031", assignToken);
+ }
+ }
+
+ if (left.id === "[") {
+ state.nameStack.set(left.right);
+ }
+
+ return true;
+ } else if (left.isMetaProperty) {
+ error("E031", assignToken);
+ return true;
+ } else if (left.identifier && !isReserved(left)) {
+ if (state.funct["(scope)"].labeltype(left.value) === "exception") {
+ warning("W022", left);
+ }
+ state.nameStack.set(left);
+ return true;
+ }
+
+ if (left === state.syntax["function"]) {
+ warning("W023", state.tokens.curr);
+ }
+
+ return false;
+ }
+
+ function assignop(s, f, p) {
+ var x = infix(s, typeof f === "function" ? f : function(left, that) {
+ that.left = left;
+
+ if (left && checkLeftSideAssign(left, that, { allowDestructuring: true })) {
+ that.right = expression(10);
+ return that;
+ }
+
+ error("E031", that);
+ }, p);
+
+ x.exps = true;
+ x.assign = true;
+ return x;
+ }
+
+
+ function bitwise(s, f, p) {
+ var x = symbol(s, p);
+ reserveName(x);
+ x.led = (typeof f === "function") ? f : function(left) {
+ if (state.option.bitwise) {
+ warning("W016", this, this.id);
+ }
+ this.left = left;
+ this.right = expression(p);
+ return this;
+ };
+ return x;
+ }
+
+ function bitwiseassignop(s) {
+ return assignop(s, function(left, that) {
+ if (state.option.bitwise) {
+ warning("W016", that, that.id);
+ }
+
+ if (left && checkLeftSideAssign(left, that)) {
+ that.right = expression(10);
+ return that;
+ }
+ error("E031", that);
+ }, 20);
+ }
+
+ function suffix(s) {
+ var x = symbol(s, 150);
+
+ x.led = function(left) {
+ if (state.option.plusplus) {
+ warning("W016", this, this.id);
+ } else if ((!left.identifier || isReserved(left)) && left.id !== "." && left.id !== "[") {
+ warning("W017", this);
+ }
+
+ if (left.isMetaProperty) {
+ error("E031", this);
+ } else if (left && left.identifier) {
+ state.funct["(scope)"].block.modify(left.value, left);
+ }
+
+ this.left = left;
+ return this;
+ };
+ return x;
+ }
+
+ function optionalidentifier(fnparam, prop, preserve) {
+ if (!state.tokens.next.identifier) {
+ return;
+ }
+
+ if (!preserve) {
+ advance();
+ }
+
+ var curr = state.tokens.curr;
+ var val = state.tokens.curr.value;
+
+ if (!isReserved(curr)) {
+ return val;
+ }
+
+ if (prop) {
+ if (state.inES5()) {
+ return val;
+ }
+ }
+
+ if (fnparam && val === "undefined") {
+ return val;
+ }
+
+ warning("W024", state.tokens.curr, state.tokens.curr.id);
+ return val;
+ }
+ function identifier(fnparam, prop) {
+ var i = optionalidentifier(fnparam, prop, false);
+ if (i) {
+ return i;
+ }
+ if (state.tokens.next.value === "...") {
+ if (!state.inES6(true)) {
+ warning("W119", state.tokens.next, "spread/rest operator", "6");
+ }
+ advance();
+
+ if (checkPunctuator(state.tokens.next, "...")) {
+ warning("E024", state.tokens.next, "...");
+ while (checkPunctuator(state.tokens.next, "...")) {
+ advance();
+ }
+ }
+
+ if (!state.tokens.next.identifier) {
+ warning("E024", state.tokens.curr, "...");
+ return;
+ }
+
+ return identifier(fnparam, prop);
+ } else {
+ error("E030", state.tokens.next, state.tokens.next.value);
+ if (state.tokens.next.id !== ";") {
+ advance();
+ }
+ }
+ }
+
+
+ function reachable(controlToken) {
+ var i = 0, t;
+ if (state.tokens.next.id !== ";" || controlToken.inBracelessBlock) {
+ return;
+ }
+ for (;;) {
+ do {
+ t = peek(i);
+ i += 1;
+ } while (t.id !== "(end)" && t.id === "(comment)");
+
+ if (t.reach) {
+ return;
+ }
+ if (t.id !== "(endline)") {
+ if (t.id === "function") {
+ if (state.option.latedef === true) {
+ warning("W026", t);
+ }
+ break;
+ }
+
+ warning("W027", t, t.value, controlToken.value);
+ break;
+ }
+ }
+ }
+
+ function parseFinalSemicolon() {
+ if (state.tokens.next.id !== ";") {
+ if (state.tokens.next.isUnclosed) return advance();
+
+ var sameLine = startLine(state.tokens.next) === state.tokens.curr.line &&
+ state.tokens.next.id !== "(end)";
+ var blockEnd = checkPunctuator(state.tokens.next, "}");
+
+ if (sameLine && !blockEnd) {
+ errorAt("E058", state.tokens.curr.line, state.tokens.curr.character);
+ } else if (!state.option.asi) {
+ if ((blockEnd && !state.option.lastsemic) || !sameLine) {
+ warningAt("W033", state.tokens.curr.line, state.tokens.curr.character);
+ }
+ }
+ } else {
+ advance(";");
+ }
+ }
+
+ function statement() {
+ var i = indent, r, t = state.tokens.next, hasOwnScope = false;
+
+ if (t.id === ";") {
+ advance(";");
+ return;
+ }
+ var res = isReserved(t);
+
+ if (res && t.meta && t.meta.isFutureReservedWord && peek().id === ":") {
+ warning("W024", t, t.id);
+ res = false;
+ }
+
+ if (t.identifier && !res && peek().id === ":") {
+ advance();
+ advance(":");
+
+ hasOwnScope = true;
+ state.funct["(scope)"].stack();
+ state.funct["(scope)"].block.addBreakLabel(t.value, { token: state.tokens.curr });
+
+ if (!state.tokens.next.labelled && state.tokens.next.value !== "{") {
+ warning("W028", state.tokens.next, t.value, state.tokens.next.value);
+ }
+
+ state.tokens.next.label = t.value;
+ t = state.tokens.next;
+ }
+
+ if (t.id === "{") {
+ var iscase = (state.funct["(verb)"] === "case" && state.tokens.curr.value === ":");
+ block(true, true, false, false, iscase);
+ return;
+ }
+
+ r = expression(0, true);
+
+ if (r && !(r.identifier && r.value === "function") &&
+ !(r.type === "(punctuator)" && r.left &&
+ r.left.identifier && r.left.value === "function")) {
+ if (!state.isStrict() &&
+ state.option.strict === "global") {
+ warning("E007");
+ }
+ }
+
+ if (!t.block) {
+ if (!state.option.expr && (!r || !r.exps)) {
+ warning("W030", state.tokens.curr);
+ } else if (state.option.nonew && r && r.left && r.id === "(" && r.left.id === "new") {
+ warning("W031", t);
+ }
+ parseFinalSemicolon();
+ }
+
+ indent = i;
+ if (hasOwnScope) {
+ state.funct["(scope)"].unstack();
+ }
+ return r;
+ }
+
+
+ function statements() {
+ var a = [], p;
+
+ while (!state.tokens.next.reach && state.tokens.next.id !== "(end)") {
+ if (state.tokens.next.id === ";") {
+ p = peek();
+
+ if (!p || (p.id !== "(" && p.id !== "[")) {
+ warning("W032");
+ }
+
+ advance(";");
+ } else {
+ a.push(statement());
+ }
+ }
+ return a;
+ }
+ function directives() {
+ var i, p, pn;
+
+ while (state.tokens.next.id === "(string)") {
+ p = peek(0);
+ if (p.id === "(endline)") {
+ i = 1;
+ do {
+ pn = peek(i++);
+ } while (pn.id === "(endline)");
+ if (pn.id === ";") {
+ p = pn;
+ } else if (pn.value === "[" || pn.value === ".") {
+ break;
+ } else if (!state.option.asi || pn.value === "(") {
+ warning("W033", state.tokens.next);
+ }
+ } else if (p.id === "." || p.id === "[") {
+ break;
+ } else if (p.id !== ";") {
+ warning("W033", p);
+ }
+
+ advance();
+ var directive = state.tokens.curr.value;
+ if (state.directive[directive] ||
+ (directive === "use strict" && state.option.strict === "implied")) {
+ warning("W034", state.tokens.curr, directive);
+ }
+ state.directive[directive] = true;
+
+ if (p.id === ";") {
+ advance(";");
+ }
+ }
+
+ if (state.isStrict()) {
+ if (!state.option["(explicitNewcap)"]) {
+ state.option.newcap = true;
+ }
+ state.option.undef = true;
+ }
+ }
+ function block(ordinary, stmt, isfunc, isfatarrow, iscase) {
+ var a,
+ b = inblock,
+ old_indent = indent,
+ m,
+ t,
+ line,
+ d;
+
+ inblock = ordinary;
+
+ t = state.tokens.next;
+
+ var metrics = state.funct["(metrics)"];
+ metrics.nestedBlockDepth += 1;
+ metrics.verifyMaxNestedBlockDepthPerFunction();
+
+ if (state.tokens.next.id === "{") {
+ advance("{");
+ state.funct["(scope)"].stack();
+
+ line = state.tokens.curr.line;
+ if (state.tokens.next.id !== "}") {
+ indent += state.option.indent;
+ while (!ordinary && state.tokens.next.from > indent) {
+ indent += state.option.indent;
+ }
+
+ if (isfunc) {
+ m = {};
+ for (d in state.directive) {
+ if (_.has(state.directive, d)) {
+ m[d] = state.directive[d];
+ }
+ }
+ directives();
+
+ if (state.option.strict && state.funct["(context)"]["(global)"]) {
+ if (!m["use strict"] && !state.isStrict()) {
+ warning("E007");
+ }
+ }
+ }
+
+ a = statements();
+
+ metrics.statementCount += a.length;
+
+ indent -= state.option.indent;
+ }
+
+ advance("}", t);
+
+ if (isfunc) {
+ state.funct["(scope)"].validateParams();
+ if (m) {
+ state.directive = m;
+ }
+ }
+
+ state.funct["(scope)"].unstack();
+
+ indent = old_indent;
+ } else if (!ordinary) {
+ if (isfunc) {
+ state.funct["(scope)"].stack();
+
+ m = {};
+ if (stmt && !isfatarrow && !state.inMoz()) {
+ error("W118", state.tokens.curr, "function closure expressions");
+ }
+
+ if (!stmt) {
+ for (d in state.directive) {
+ if (_.has(state.directive, d)) {
+ m[d] = state.directive[d];
+ }
+ }
+ }
+ expression(10);
+
+ if (state.option.strict && state.funct["(context)"]["(global)"]) {
+ if (!m["use strict"] && !state.isStrict()) {
+ warning("E007");
+ }
+ }
+
+ state.funct["(scope)"].unstack();
+ } else {
+ error("E021", state.tokens.next, "{", state.tokens.next.value);
+ }
+ } else {
+ state.funct["(noblockscopedvar)"] = state.tokens.next.id !== "for";
+ state.funct["(scope)"].stack();
+
+ if (!stmt || state.option.curly) {
+ warning("W116", state.tokens.next, "{", state.tokens.next.value);
+ }
+
+ state.tokens.next.inBracelessBlock = true;
+ indent += state.option.indent;
+ a = [statement()];
+ indent -= state.option.indent;
+
+ state.funct["(scope)"].unstack();
+ delete state.funct["(noblockscopedvar)"];
+ }
+ switch (state.funct["(verb)"]) {
+ case "break":
+ case "continue":
+ case "return":
+ case "throw":
+ if (iscase) {
+ break;
+ }
+ default:
+ state.funct["(verb)"] = null;
+ }
+
+ inblock = b;
+ if (ordinary && state.option.noempty && (!a || a.length === 0)) {
+ warning("W035", state.tokens.prev);
+ }
+ metrics.nestedBlockDepth -= 1;
+ return a;
+ }
+
+
+ function countMember(m) {
+ if (membersOnly && typeof membersOnly[m] !== "boolean") {
+ warning("W036", state.tokens.curr, m);
+ }
+ if (typeof member[m] === "number") {
+ member[m] += 1;
+ } else {
+ member[m] = 1;
+ }
+ }
+
+ type("(number)", function() {
+ return this;
+ });
+
+ type("(string)", function() {
+ return this;
+ });
+
+ state.syntax["(identifier)"] = {
+ type: "(identifier)",
+ lbp: 0,
+ identifier: true,
+
+ nud: function() {
+ var v = this.value;
+ if (state.tokens.next.id === "=>") {
+ return this;
+ }
+
+ if (!state.funct["(comparray)"].check(v)) {
+ state.funct["(scope)"].block.use(v, state.tokens.curr);
+ }
+ return this;
+ },
+
+ led: function() {
+ error("E033", state.tokens.next, state.tokens.next.value);
+ }
+ };
+
+ var baseTemplateSyntax = {
+ lbp: 0,
+ identifier: false,
+ template: true,
+ };
+ state.syntax["(template)"] = _.extend({
+ type: "(template)",
+ nud: doTemplateLiteral,
+ led: doTemplateLiteral,
+ noSubst: false
+ }, baseTemplateSyntax);
+
+ state.syntax["(template middle)"] = _.extend({
+ type: "(template middle)",
+ middle: true,
+ noSubst: false
+ }, baseTemplateSyntax);
+
+ state.syntax["(template tail)"] = _.extend({
+ type: "(template tail)",
+ tail: true,
+ noSubst: false
+ }, baseTemplateSyntax);
+
+ state.syntax["(no subst template)"] = _.extend({
+ type: "(template)",
+ nud: doTemplateLiteral,
+ led: doTemplateLiteral,
+ noSubst: true,
+ tail: true // mark as tail, since it's always the last component
+ }, baseTemplateSyntax);
+
+ type("(regexp)", function() {
+ return this;
+ });
+
+ delim("(endline)");
+ delim("(begin)");
+ delim("(end)").reach = true;
+ delim("(error)").reach = true;
+ delim("}").reach = true;
+ delim(")");
+ delim("]");
+ delim("\"").reach = true;
+ delim("'").reach = true;
+ delim(";");
+ delim(":").reach = true;
+ delim("#");
+
+ reserve("else");
+ reserve("case").reach = true;
+ reserve("catch");
+ reserve("default").reach = true;
+ reserve("finally");
+ reservevar("arguments", function(x) {
+ if (state.isStrict() && state.funct["(global)"]) {
+ warning("E008", x);
+ }
+ });
+ reservevar("eval");
+ reservevar("false");
+ reservevar("Infinity");
+ reservevar("null");
+ reservevar("this", function(x) {
+ if (state.isStrict() && !isMethod() &&
+ !state.option.validthis && ((state.funct["(statement)"] &&
+ state.funct["(name)"].charAt(0) > "Z") || state.funct["(global)"])) {
+ warning("W040", x);
+ }
+ });
+ reservevar("true");
+ reservevar("undefined");
+
+ assignop("=", "assign", 20);
+ assignop("+=", "assignadd", 20);
+ assignop("-=", "assignsub", 20);
+ assignop("*=", "assignmult", 20);
+ assignop("/=", "assigndiv", 20).nud = function() {
+ error("E014");
+ };
+ assignop("%=", "assignmod", 20);
+
+ bitwiseassignop("&=");
+ bitwiseassignop("|=");
+ bitwiseassignop("^=");
+ bitwiseassignop("<<=");
+ bitwiseassignop(">>=");
+ bitwiseassignop(">>>=");
+ infix(",", function(left, that) {
+ var expr;
+ that.exprs = [left];
+
+ if (state.option.nocomma) {
+ warning("W127");
+ }
+
+ if (!comma({ peek: true })) {
+ return that;
+ }
+ while (true) {
+ if (!(expr = expression(10))) {
+ break;
+ }
+ that.exprs.push(expr);
+ if (state.tokens.next.value !== "," || !comma()) {
+ break;
+ }
+ }
+ return that;
+ }, 10, true);
+
+ infix("?", function(left, that) {
+ increaseComplexityCount();
+ that.left = left;
+ that.right = expression(10);
+ advance(":");
+ that["else"] = expression(10);
+ return that;
+ }, 30);
+
+ var orPrecendence = 40;
+ infix("||", function(left, that) {
+ increaseComplexityCount();
+ that.left = left;
+ that.right = expression(orPrecendence);
+ return that;
+ }, orPrecendence);
+ infix("&&", "and", 50);
+ bitwise("|", "bitor", 70);
+ bitwise("^", "bitxor", 80);
+ bitwise("&", "bitand", 90);
+ relation("==", function(left, right) {
+ var eqnull = state.option.eqnull &&
+ ((left && left.value) === "null" || (right && right.value) === "null");
+
+ switch (true) {
+ case !eqnull && state.option.eqeqeq:
+ this.from = this.character;
+ warning("W116", this, "===", "==");
+ break;
+ case isPoorRelation(left):
+ warning("W041", this, "===", left.value);
+ break;
+ case isPoorRelation(right):
+ warning("W041", this, "===", right.value);
+ break;
+ case isTypoTypeof(right, left, state):
+ warning("W122", this, right.value);
+ break;
+ case isTypoTypeof(left, right, state):
+ warning("W122", this, left.value);
+ break;
+ }
+
+ return this;
+ });
+ relation("===", function(left, right) {
+ if (isTypoTypeof(right, left, state)) {
+ warning("W122", this, right.value);
+ } else if (isTypoTypeof(left, right, state)) {
+ warning("W122", this, left.value);
+ }
+ return this;
+ });
+ relation("!=", function(left, right) {
+ var eqnull = state.option.eqnull &&
+ ((left && left.value) === "null" || (right && right.value) === "null");
+
+ if (!eqnull && state.option.eqeqeq) {
+ this.from = this.character;
+ warning("W116", this, "!==", "!=");
+ } else if (isPoorRelation(left)) {
+ warning("W041", this, "!==", left.value);
+ } else if (isPoorRelation(right)) {
+ warning("W041", this, "!==", right.value);
+ } else if (isTypoTypeof(right, left, state)) {
+ warning("W122", this, right.value);
+ } else if (isTypoTypeof(left, right, state)) {
+ warning("W122", this, left.value);
+ }
+ return this;
+ });
+ relation("!==", function(left, right) {
+ if (isTypoTypeof(right, left, state)) {
+ warning("W122", this, right.value);
+ } else if (isTypoTypeof(left, right, state)) {
+ warning("W122", this, left.value);
+ }
+ return this;
+ });
+ 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;
+ that.left = left;
+ that.right = right = expression(130);
+
+ if (left && right && left.id === "(string)" && right.id === "(string)") {
+ left.value += right.value;
+ left.character = right.character;
+ if (!state.option.scripturl && reg.javascriptURL.test(left.value)) {
+ warning("W050", left);
+ }
+ return left;
+ }
+
+ return that;
+ }, 130);
+ prefix("+", "num");
+ prefix("+++", function() {
+ warning("W007");
+ this.arity = "unary";
+ this.right = expression(150);
+ return this;
+ });
+ infix("+++", function(left) {
+ warning("W007");
+ this.left = left;
+ this.right = expression(130);
+ return this;
+ }, 130);
+ infix("-", "sub", 130);
+ prefix("-", "neg");
+ prefix("---", function() {
+ warning("W006");
+ this.arity = "unary";
+ this.right = expression(150);
+ return this;
+ });
+ infix("---", function(left) {
+ warning("W006");
+ this.left = left;
+ this.right = expression(130);
+ return this;
+ }, 130);
+ infix("*", "mult", 140);
+ infix("/", "div", 140);
+ infix("%", "mod", 140);
+
+ suffix("++");
+ prefix("++", "preinc");
+ state.syntax["++"].exps = true;
+
+ suffix("--");
+ prefix("--", "predec");
+ state.syntax["--"].exps = true;
+ prefix("delete", function() {
+ var p = expression(10);
+ if (!p) {
+ return this;
+ }
+
+ if (p.id !== "." && p.id !== "[") {
+ warning("W051");
+ }
+ this.first = p;
+ if (p.identifier && !state.isStrict()) {
+ p.forgiveUndef = true;
+ }
+ return this;
+ }).exps = true;
+
+ prefix("~", function() {
+ if (state.option.bitwise) {
+ warning("W016", this, "~");
+ }
+ this.arity = "unary";
+ this.right = expression(150);
+ return this;
+ });
+
+ prefix("...", function() {
+ if (!state.inES6(true)) {
+ warning("W119", this, "spread/rest operator", "6");
+ }
+ if (!state.tokens.next.identifier &&
+ state.tokens.next.type !== "(string)" &&
+ !checkPunctuators(state.tokens.next, ["[", "("])) {
+
+ error("E030", state.tokens.next, state.tokens.next.value);
+ }
+ expression(150);
+ return this;
+ });
+
+ prefix("!", function() {
+ this.arity = "unary";
+ this.right = expression(150);
+
+ if (!this.right) { // '!' followed by nothing? Give up.
+ quit("E041", this.line || 0);
+ }
+
+ if (bang[this.right.id] === true) {
+ warning("W018", this, "!");
+ }
+ return this;
+ });
+
+ prefix("typeof", (function() {
+ var p = expression(150);
+ this.first = this.right = p;
+
+ if (!p) { // 'typeof' followed by nothing? Give up.
+ quit("E041", this.line || 0, this.character || 0);
+ }
+ if (p.identifier) {
+ p.forgiveUndef = true;
+ }
+ return this;
+ }));
+ prefix("new", function() {
+ var mp = metaProperty("target", function() {
+ if (!state.inES6(true)) {
+ warning("W119", state.tokens.prev, "new.target", "6");
+ }
+ var inFunction, c = state.funct;
+ while (c) {
+ inFunction = !c["(global)"];
+ if (!c["(arrow)"]) { break; }
+ c = c["(context)"];
+ }
+ if (!inFunction) {
+ warning("W136", state.tokens.prev, "new.target");
+ }
+ });
+ if (mp) { return mp; }
+
+ 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("W053", state.tokens.prev, c.value);
+ break;
+ case "Symbol":
+ if (state.inES6()) {
+ warning("W053", state.tokens.prev, c.value);
+ }
+ break;
+ case "Function":
+ if (!state.option.evil) {
+ warning("W054");
+ }
+ break;
+ case "Date":
+ case "RegExp":
+ case "this":
+ break;
+ default:
+ if (c.id !== "function") {
+ i = c.value.substr(0, 1);
+ if (state.option.newcap && (i < "A" || i > "Z") &&
+ !state.funct["(scope)"].isPredefined(c.value)) {
+ warning("W055", state.tokens.curr);
+ }
+ }
+ }
+ } else {
+ if (c.id !== "." && c.id !== "[" && c.id !== "(") {
+ warning("W056", state.tokens.curr);
+ }
+ }
+ } else {
+ if (!state.option.supernew)
+ warning("W057", this);
+ }
+ if (state.tokens.next.id !== "(" && !state.option.supernew) {
+ warning("W058", state.tokens.curr, state.tokens.curr.value);
+ }
+ this.first = this.right = c;
+ return this;
+ });
+ state.syntax["new"].exps = true;
+
+ prefix("void").exps = true;
+
+ infix(".", function(left, that) {
+ var m = identifier(false, true);
+
+ if (typeof m === "string") {
+ countMember(m);
+ }
+
+ that.left = left;
+ that.right = m;
+
+ if (m && m === "hasOwnProperty" && state.tokens.next.value === "=") {
+ warning("W001");
+ }
+
+ if (left && left.value === "arguments" && (m === "callee" || m === "caller")) {
+ if (state.option.noarg)
+ warning("W059", left, m);
+ else if (state.isStrict())
+ error("E008");
+ } else if (!state.option.evil && left && left.value === "document" &&
+ (m === "write" || m === "writeln")) {
+ warning("W060", left);
+ }
+
+ if (!state.option.evil && (m === "eval" || m === "execScript")) {
+ if (isGlobalEval(left, state)) {
+ warning("W061");
+ }
+ }
+
+ return that;
+ }, 160, true);
+
+ infix("(", function(left, that) {
+ if (state.option.immed && left && !left.immed && left.id === "function") {
+ warning("W062");
+ }
+
+ var n = 0;
+ var p = [];
+
+ if (left) {
+ if (left.type === "(identifier)") {
+ if (left.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)) {
+ if ("Array Number String Boolean Date Object Error Symbol".indexOf(left.value) === -1) {
+ if (left.value === "Math") {
+ warning("W063", left);
+ } else if (state.option.newcap) {
+ warning("W064", left);
+ }
+ }
+ }
+ }
+ }
+
+ if (state.tokens.next.id !== ")") {
+ for (;;) {
+ p[p.length] = expression(10);
+ n += 1;
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ }
+
+ advance(")");
+
+ if (typeof left === "object") {
+ if (!state.inES5() && left.value === "parseInt" && n === 1) {
+ warning("W065", state.tokens.curr);
+ }
+ if (!state.option.evil) {
+ if (left.value === "eval" || left.value === "Function" ||
+ left.value === "execScript") {
+ warning("W061", 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("W066", 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("W066", left);
+ addInternalSrc(left, p[0].value);
+ }
+ }
+ if (!left.identifier && left.id !== "." && left.id !== "[" && left.id !== "=>" &&
+ left.id !== "(" && left.id !== "&&" && left.id !== "||" && left.id !== "?" &&
+ !(state.inES6() && left["(name)"])) {
+ warning("W067", that);
+ }
+ }
+
+ that.left = left;
+ return that;
+ }, 155, true).exps = true;
+
+ prefix("(", function() {
+ var pn = state.tokens.next, pn1, i = -1;
+ var ret, triggerFnExpr, first, last;
+ var parens = 1;
+ var opening = state.tokens.curr;
+ var preceeding = state.tokens.prev;
+ var isNecessary = !state.option.singleGroups;
+
+ do {
+ if (pn.value === "(") {
+ parens += 1;
+ } else if (pn.value === ")") {
+ parens -= 1;
+ }
+
+ i += 1;
+ pn1 = pn;
+ pn = peek(i);
+ } while (!(parens === 0 && pn1.value === ")") && pn.value !== ";" && pn.type !== "(end)");
+
+ if (state.tokens.next.id === "function") {
+ triggerFnExpr = state.tokens.next.immed = true;
+ }
+ if (pn.value === "=>") {
+ return doFunction({ type: "arrow", parsedOpening: true });
+ }
+
+ var exprs = [];
+
+ if (state.tokens.next.id !== ")") {
+ for (;;) {
+ exprs.push(expression(10));
+
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+
+ if (state.option.nocomma) {
+ warning("W127");
+ }
+
+ comma();
+ }
+ }
+
+ advance(")", this);
+ if (state.option.immed && exprs[0] && exprs[0].id === "function") {
+ if (state.tokens.next.id !== "(" &&
+ state.tokens.next.id !== "." && state.tokens.next.id !== "[") {
+ warning("W068", this);
+ }
+ }
+
+ if (!exprs.length) {
+ return;
+ }
+ if (exprs.length > 1) {
+ ret = Object.create(state.syntax[","]);
+ ret.exprs = exprs;
+
+ first = exprs[0];
+ last = exprs[exprs.length - 1];
+
+ if (!isNecessary) {
+ isNecessary = preceeding.assign || preceeding.delim;
+ }
+ } else {
+ ret = first = last = exprs[0];
+
+ if (!isNecessary) {
+ isNecessary =
+ (opening.beginsStmt && (ret.id === "{" || triggerFnExpr || isFunctor(ret))) ||
+ (triggerFnExpr &&
+ (!isEndOfExpr() || state.tokens.prev.id !== "}")) ||
+ (isFunctor(ret) && !isEndOfExpr()) ||
+ (ret.id === "{" && preceeding.id === "=>") ||
+ (ret.type === "(number)" &&
+ checkPunctuator(pn, ".") && /^\d+$/.test(ret.value));
+ }
+ }
+
+ if (ret) {
+ if (!isNecessary && (first.left || first.right || ret.exprs)) {
+ isNecessary =
+ (!isBeginOfExpr(preceeding) && first.lbp <= preceeding.lbp) ||
+ (!isEndOfExpr() && last.lbp < state.tokens.next.lbp);
+ }
+
+ if (!isNecessary) {
+ warning("W126", opening);
+ }
+
+ ret.paren = true;
+ }
+
+ return ret;
+ });
+
+ application("=>");
+
+ infix("[", function(left, that) {
+ var e = expression(10), s;
+ if (e && e.type === "(string)") {
+ if (!state.option.evil && (e.value === "eval" || e.value === "execScript")) {
+ if (isGlobalEval(left, state)) {
+ warning("W061");
+ }
+ }
+
+ countMember(e.value);
+ if (!state.option.sub && reg.identifier.test(e.value)) {
+ s = state.syntax[e.value];
+ if (!s || !isReserved(s)) {
+ warning("W069", state.tokens.prev, e.value);
+ }
+ }
+ }
+ advance("]", that);
+
+ if (e && e.value === "hasOwnProperty" && state.tokens.next.value === "=") {
+ warning("W001");
+ }
+
+ that.left = left;
+ that.right = e;
+ return that;
+ }, 160, true);
+
+ function comprehensiveArrayExpression() {
+ var res = {};
+ res.exps = true;
+ state.funct["(comparray)"].stack();
+ var reversed = false;
+ if (state.tokens.next.value !== "for") {
+ reversed = true;
+ if (!state.inMoz()) {
+ warning("W116", state.tokens.next, "for", state.tokens.next.value);
+ }
+ state.funct["(comparray)"].setState("use");
+ res.right = expression(10);
+ }
+
+ advance("for");
+ if (state.tokens.next.value === "each") {
+ advance("each");
+ if (!state.inMoz()) {
+ warning("W118", state.tokens.curr, "for each");
+ }
+ }
+ advance("(");
+ state.funct["(comparray)"].setState("define");
+ res.left = expression(130);
+ if (_.contains(["in", "of"], state.tokens.next.value)) {
+ advance();
+ } else {
+ error("E045", state.tokens.curr);
+ }
+ state.funct["(comparray)"].setState("generate");
+ expression(10);
+
+ advance(")");
+ if (state.tokens.next.value === "if") {
+ advance("if");
+ advance("(");
+ state.funct["(comparray)"].setState("filter");
+ res.filter = expression(10);
+ advance(")");
+ }
+
+ if (!reversed) {
+ state.funct["(comparray)"].setState("use");
+ res.right = expression(10);
+ }
+
+ advance("]");
+ state.funct["(comparray)"].unstack();
+ return res;
+ }
+
+ prefix("[", function() {
+ var blocktype = lookupBlockType();
+ if (blocktype.isCompArray) {
+ if (!state.option.esnext && !state.inMoz()) {
+ warning("W118", state.tokens.curr, "array comprehension");
+ }
+ return comprehensiveArrayExpression();
+ } else if (blocktype.isDestAssign) {
+ this.destructAssign = destructuringPattern({ openingParsed: true, assignment: true });
+ return this;
+ }
+ var b = state.tokens.curr.line !== startLine(state.tokens.next);
+ this.first = [];
+ if (b) {
+ indent += state.option.indent;
+ if (state.tokens.next.from === indent + state.option.indent) {
+ indent += state.option.indent;
+ }
+ }
+ while (state.tokens.next.id !== "(end)") {
+ while (state.tokens.next.id === ",") {
+ if (!state.option.elision) {
+ if (!state.inES5()) {
+ warning("W070");
+ } else {
+ warning("W128");
+ do {
+ advance(",");
+ } while (state.tokens.next.id === ",");
+ continue;
+ }
+ }
+ advance(",");
+ }
+
+ if (state.tokens.next.id === "]") {
+ break;
+ }
+
+ this.first.push(expression(10));
+ if (state.tokens.next.id === ",") {
+ comma({ allowTrailing: true });
+ if (state.tokens.next.id === "]" && !state.inES5()) {
+ warning("W070", state.tokens.curr);
+ break;
+ }
+ } else {
+ break;
+ }
+ }
+ if (b) {
+ indent -= state.option.indent;
+ }
+ advance("]", this);
+ return this;
+ });
+
+
+ function isMethod() {
+ return state.funct["(statement)"] && state.funct["(statement)"].type === "class" ||
+ state.funct["(context)"] && state.funct["(context)"]["(verb)"] === "class";
+ }
+
+
+ function isPropertyName(token) {
+ return token.identifier || token.id === "(string)" || token.id === "(number)";
+ }
+
+
+ function propertyName(preserveOrToken) {
+ var id;
+ var preserve = true;
+ if (typeof preserveOrToken === "object") {
+ id = preserveOrToken;
+ } else {
+ preserve = preserveOrToken;
+ id = optionalidentifier(false, true, preserve);
+ }
+
+ if (!id) {
+ if (state.tokens.next.id === "(string)") {
+ id = state.tokens.next.value;
+ if (!preserve) {
+ advance();
+ }
+ } else if (state.tokens.next.id === "(number)") {
+ id = state.tokens.next.value.toString();
+ if (!preserve) {
+ advance();
+ }
+ }
+ } else if (typeof id === "object") {
+ if (id.id === "(string)" || id.id === "(identifier)") id = id.value;
+ else if (id.id === "(number)") id = id.value.toString();
+ }
+
+ if (id === "hasOwnProperty") {
+ warning("W001");
+ }
+
+ return id;
+ }
+ function functionparams(options) {
+ var next;
+ var paramsIds = [];
+ var ident;
+ var tokens = [];
+ var t;
+ var pastDefault = false;
+ var pastRest = false;
+ var arity = 0;
+ var loneArg = options && options.loneArg;
+
+ if (loneArg && loneArg.identifier === true) {
+ state.funct["(scope)"].addParam(loneArg.value, loneArg);
+ return { arity: 1, params: [ loneArg.value ] };
+ }
+
+ next = state.tokens.next;
+
+ if (!options || !options.parsedOpening) {
+ advance("(");
+ }
+
+ if (state.tokens.next.id === ")") {
+ advance(")");
+ return;
+ }
+
+ function addParam(addParamArgs) {
+ state.funct["(scope)"].addParam.apply(state.funct["(scope)"], addParamArgs);
+ }
+
+ for (;;) {
+ arity++;
+ var currentParams = [];
+
+ if (_.contains(["{", "["], state.tokens.next.id)) {
+ tokens = destructuringPattern();
+ for (t in tokens) {
+ t = tokens[t];
+ if (t.id) {
+ paramsIds.push(t.id);
+ currentParams.push([t.id, t.token]);
+ }
+ }
+ } else {
+ if (checkPunctuator(state.tokens.next, "...")) pastRest = true;
+ ident = identifier(true);
+ if (ident) {
+ paramsIds.push(ident);
+ currentParams.push([ident, state.tokens.curr]);
+ } else {
+ while (!checkPunctuators(state.tokens.next, [",", ")"])) advance();
+ }
+ }
+ if (pastDefault) {
+ if (state.tokens.next.id !== "=") {
+ error("W138", state.tokens.current);
+ }
+ }
+ if (state.tokens.next.id === "=") {
+ if (!state.inES6()) {
+ warning("W119", state.tokens.next, "default parameters", "6");
+ }
+ advance("=");
+ pastDefault = true;
+ expression(10);
+ }
+ currentParams.forEach(addParam);
+
+ if (state.tokens.next.id === ",") {
+ if (pastRest) {
+ warning("W131", state.tokens.next);
+ }
+ comma();
+ } else {
+ advance(")", next);
+ return { arity: arity, params: paramsIds };
+ }
+ }
+ }
+
+ function functor(name, token, overwrites) {
+ var funct = {
+ "(name)" : name,
+ "(breakage)" : 0,
+ "(loopage)" : 0,
+ "(tokens)" : {},
+ "(properties)": {},
+
+ "(catch)" : false,
+ "(global)" : false,
+
+ "(line)" : null,
+ "(character)" : null,
+ "(metrics)" : null,
+ "(statement)" : null,
+ "(context)" : null,
+ "(scope)" : null,
+ "(comparray)" : null,
+ "(generator)" : null,
+ "(arrow)" : null,
+ "(params)" : null
+ };
+
+ if (token) {
+ _.extend(funct, {
+ "(line)" : token.line,
+ "(character)": token.character,
+ "(metrics)" : createMetrics(token)
+ });
+ }
+
+ _.extend(funct, overwrites);
+
+ if (funct["(context)"]) {
+ funct["(scope)"] = funct["(context)"]["(scope)"];
+ funct["(comparray)"] = funct["(context)"]["(comparray)"];
+ }
+
+ return funct;
+ }
+
+ function isFunctor(token) {
+ return "(scope)" in token;
+ }
+ function hasParsedCode(funct) {
+ return funct["(global)"] && !funct["(verb)"];
+ }
+
+ function doTemplateLiteral(left) {
+ var ctx = this.context;
+ var noSubst = this.noSubst;
+ var depth = this.depth;
+
+ if (!noSubst) {
+ while (!end()) {
+ if (!state.tokens.next.template || state.tokens.next.depth > depth) {
+ expression(0); // should probably have different rbp?
+ } else {
+ advance();
+ }
+ }
+ }
+
+ return {
+ id: "(template)",
+ type: "(template)",
+ tag: left
+ };
+
+ function end() {
+ if (state.tokens.curr.template && state.tokens.curr.tail &&
+ state.tokens.curr.context === ctx) return true;
+ var complete = (state.tokens.next.template && state.tokens.next.tail &&
+ state.tokens.next.context === ctx);
+ if (complete) advance();
+ return complete || state.tokens.next.isUnclosed;
+ }
+ }
+ function doFunction(options) {
+ var f, token, name, statement, classExprBinding, isGenerator, isArrow, ignoreLoopFunc;
+ var oldOption = state.option;
+ var oldIgnored = state.ignored;
+
+ if (options) {
+ name = options.name;
+ statement = options.statement;
+ classExprBinding = options.classExprBinding;
+ isGenerator = options.type === "generator";
+ isArrow = options.type === "arrow";
+ ignoreLoopFunc = options.ignoreLoopFunc;
+ }
+
+ state.option = Object.create(state.option);
+ state.ignored = Object.create(state.ignored);
+
+ state.funct = functor(name || state.nameStack.infer(), state.tokens.next, {
+ "(statement)": statement,
+ "(context)": state.funct,
+ "(arrow)": isArrow,
+ "(generator)": isGenerator
+ });
+
+ f = state.funct;
+ token = state.tokens.curr;
+ token.funct = state.funct;
+
+ functions.push(state.funct);
+ state.funct["(scope)"].stack("functionouter");
+ var internallyAccessibleName = name || classExprBinding;
+ if (internallyAccessibleName) {
+ state.funct["(scope)"].block.add(internallyAccessibleName,
+ classExprBinding ? "class" : "function", state.tokens.curr, false);
+ }
+ state.funct["(scope)"].stack("functionparams");
+
+ var paramsInfo = functionparams(options);
+
+ if (paramsInfo) {
+ state.funct["(params)"] = paramsInfo.params;
+ state.funct["(metrics)"].arity = paramsInfo.arity;
+ state.funct["(metrics)"].verifyMaxParametersPerFunction();
+ } else {
+ state.funct["(metrics)"].arity = 0;
+ }
+
+ if (isArrow) {
+ if (!state.inES6(true)) {
+ warning("W119", state.tokens.curr, "arrow function syntax (=>)", "6");
+ }
+
+ if (!options.loneArg) {
+ advance("=>");
+ }
+ }
+
+ block(false, true, true, isArrow);
+
+ if (!state.option.noyield && isGenerator &&
+ state.funct["(generator)"] !== "yielded") {
+ warning("W124", state.tokens.curr);
+ }
+
+ state.funct["(metrics)"].verifyMaxStatementsPerFunction();
+ state.funct["(metrics)"].verifyMaxComplexityPerFunction();
+ state.funct["(unusedOption)"] = state.option.unused;
+ state.option = oldOption;
+ state.ignored = oldIgnored;
+ state.funct["(last)"] = state.tokens.curr.line;
+ state.funct["(lastcharacter)"] = state.tokens.curr.character;
+ state.funct["(scope)"].unstack(); // also does usage and label checks
+ state.funct["(scope)"].unstack();
+
+ state.funct = state.funct["(context)"];
+
+ if (!ignoreLoopFunc && !state.option.loopfunc && state.funct["(loopage)"]) {
+ if (f["(isCapturing)"]) {
+ warning("W083", token);
+ }
+ }
+
+ return f;
+ }
+
+ function createMetrics(functionStartToken) {
+ return {
+ statementCount: 0,
+ nestedBlockDepth: -1,
+ ComplexityCount: 1,
+ arity: 0,
+
+ verifyMaxStatementsPerFunction: function() {
+ if (state.option.maxstatements &&
+ this.statementCount > state.option.maxstatements) {
+ warning("W071", functionStartToken, this.statementCount);
+ }
+ },
+
+ verifyMaxParametersPerFunction: function() {
+ if (_.isNumber(state.option.maxparams) &&
+ this.arity > state.option.maxparams) {
+ warning("W072", functionStartToken, this.arity);
+ }
+ },
+
+ verifyMaxNestedBlockDepthPerFunction: function() {
+ if (state.option.maxdepth &&
+ this.nestedBlockDepth > 0 &&
+ this.nestedBlockDepth === state.option.maxdepth + 1) {
+ warning("W073", null, this.nestedBlockDepth);
+ }
+ },
+
+ verifyMaxComplexityPerFunction: function() {
+ var max = state.option.maxcomplexity;
+ var cc = this.ComplexityCount;
+ if (max && cc > max) {
+ warning("W074", functionStartToken, cc);
+ }
+ }
+ };
+ }
+
+ function increaseComplexityCount() {
+ state.funct["(metrics)"].ComplexityCount += 1;
+ }
+
+ function checkCondAssignment(expr) {
+ var id, paren;
+ if (expr) {
+ id = expr.id;
+ paren = expr.paren;
+ if (id === "," && (expr = expr.exprs[expr.exprs.length - 1])) {
+ id = expr.id;
+ paren = paren || expr.paren;
+ }
+ }
+ switch (id) {
+ case "=":
+ case "+=":
+ case "-=":
+ case "*=":
+ case "%=":
+ case "&=":
+ case "|=":
+ case "^=":
+ case "/=":
+ if (!paren && !state.option.boss) {
+ warning("W084");
+ }
+ }
+ }
+ function checkProperties(props) {
+ if (state.inES5()) {
+ for (var name in props) {
+ if (props[name] && props[name].setterToken && !props[name].getterToken) {
+ warning("W078", props[name].setterToken);
+ }
+ }
+ }
+ }
+
+ function metaProperty(name, c) {
+ if (checkPunctuator(state.tokens.next, ".")) {
+ var left = state.tokens.curr.id;
+ advance(".");
+ var id = identifier();
+ state.tokens.curr.isMetaProperty = true;
+ if (name !== id) {
+ error("E057", state.tokens.prev, left, id);
+ } else {
+ c();
+ }
+ return state.tokens.curr;
+ }
+ }
+
+ (function(x) {
+ x.nud = function() {
+ var b, f, i, p, t, isGeneratorMethod = false, nextVal;
+ var props = Object.create(null); // All properties, including accessors
+
+ b = state.tokens.curr.line !== startLine(state.tokens.next);
+ if (b) {
+ indent += state.option.indent;
+ if (state.tokens.next.from === indent + state.option.indent) {
+ indent += state.option.indent;
+ }
+ }
+
+ var blocktype = lookupBlockType();
+ if (blocktype.isDestAssign) {
+ this.destructAssign = destructuringPattern({ openingParsed: true, assignment: true });
+ return this;
+ }
+
+ for (;;) {
+ if (state.tokens.next.id === "}") {
+ break;
+ }
+
+ nextVal = state.tokens.next.value;
+ if (state.tokens.next.identifier &&
+ (peekIgnoreEOL().id === "," || peekIgnoreEOL().id === "}")) {
+ if (!state.inES6()) {
+ warning("W104", state.tokens.next, "object short notation", "6");
+ }
+ i = propertyName(true);
+ saveProperty(props, i, state.tokens.next);
+
+ expression(10);
+
+ } else if (peek().id !== ":" && (nextVal === "get" || nextVal === "set")) {
+ advance(nextVal);
+
+ if (!state.inES5()) {
+ error("E034");
+ }
+
+ i = propertyName();
+ if (!i && !state.inES6()) {
+ error("E035");
+ }
+ if (i) {
+ saveAccessor(nextVal, props, i, state.tokens.curr);
+ }
+
+ t = state.tokens.next;
+ f = doFunction();
+ p = f["(params)"];
+ if (nextVal === "get" && i && p) {
+ warning("W076", t, p[0], i);
+ } else if (nextVal === "set" && i && (!p || p.length !== 1)) {
+ warning("W077", t, i);
+ }
+ } else {
+ if (state.tokens.next.value === "*" && state.tokens.next.type === "(punctuator)") {
+ if (!state.inES6()) {
+ warning("W104", state.tokens.next, "generator functions", "6");
+ }
+ advance("*");
+ isGeneratorMethod = true;
+ } else {
+ isGeneratorMethod = false;
+ }
+
+ if (state.tokens.next.id === "[") {
+ i = computedPropertyName();
+ state.nameStack.set(i);
+ } else {
+ state.nameStack.set(state.tokens.next);
+ i = propertyName();
+ saveProperty(props, i, state.tokens.next);
+
+ if (typeof i !== "string") {
+ break;
+ }
+ }
+
+ if (state.tokens.next.value === "(") {
+ if (!state.inES6()) {
+ warning("W104", state.tokens.curr, "concise methods", "6");
+ }
+ doFunction({ type: isGeneratorMethod ? "generator" : null });
+ } else {
+ advance(":");
+ expression(10);
+ }
+ }
+
+ countMember(i);
+
+ if (state.tokens.next.id === ",") {
+ comma({ allowTrailing: true, property: true });
+ if (state.tokens.next.id === ",") {
+ warning("W070", state.tokens.curr);
+ } else if (state.tokens.next.id === "}" && !state.inES5()) {
+ warning("W070", state.tokens.curr);
+ }
+ } else {
+ break;
+ }
+ }
+ if (b) {
+ indent -= state.option.indent;
+ }
+ advance("}", this);
+
+ checkProperties(props);
+
+ return this;
+ };
+ x.fud = function() {
+ error("E036", state.tokens.curr);
+ };
+ }(delim("{")));
+
+ function destructuringPattern(options) {
+ var isAssignment = options && options.assignment;
+
+ if (!state.inES6()) {
+ warning("W104", state.tokens.curr,
+ isAssignment ? "destructuring assignment" : "destructuring binding", "6");
+ }
+
+ return destructuringPatternRecursive(options);
+ }
+
+ function destructuringPatternRecursive(options) {
+ var ids;
+ var identifiers = [];
+ var openingParsed = options && options.openingParsed;
+ var isAssignment = options && options.assignment;
+ var recursiveOptions = isAssignment ? { assignment: isAssignment } : null;
+ var firstToken = openingParsed ? state.tokens.curr : state.tokens.next;
+
+ var nextInnerDE = function() {
+ var ident;
+ if (checkPunctuators(state.tokens.next, ["[", "{"])) {
+ ids = destructuringPatternRecursive(recursiveOptions);
+ for (var id in ids) {
+ id = ids[id];
+ identifiers.push({ id: id.id, token: id.token });
+ }
+ } else if (checkPunctuator(state.tokens.next, ",")) {
+ identifiers.push({ id: null, token: state.tokens.curr });
+ } else if (checkPunctuator(state.tokens.next, "(")) {
+ advance("(");
+ nextInnerDE();
+ advance(")");
+ } else {
+ var is_rest = checkPunctuator(state.tokens.next, "...");
+
+ if (isAssignment) {
+ var identifierToken = is_rest ? peek(0) : state.tokens.next;
+ if (!identifierToken.identifier) {
+ warning("E030", identifierToken, identifierToken.value);
+ }
+ var assignTarget = expression(155);
+ if (assignTarget) {
+ checkLeftSideAssign(assignTarget);
+ if (assignTarget.identifier) {
+ ident = assignTarget.value;
+ }
+ }
+ } else {
+ ident = identifier();
+ }
+ if (ident) {
+ identifiers.push({ id: ident, token: state.tokens.curr });
+ }
+ return is_rest;
+ }
+ return false;
+ };
+ var assignmentProperty = function() {
+ var id;
+ if (checkPunctuator(state.tokens.next, "[")) {
+ advance("[");
+ expression(10);
+ advance("]");
+ advance(":");
+ nextInnerDE();
+ } else if (state.tokens.next.id === "(string)" ||
+ state.tokens.next.id === "(number)") {
+ advance();
+ advance(":");
+ nextInnerDE();
+ } else {
+ id = identifier();
+ if (checkPunctuator(state.tokens.next, ":")) {
+ advance(":");
+ nextInnerDE();
+ } else if (id) {
+ if (isAssignment) {
+ checkLeftSideAssign(state.tokens.curr);
+ }
+ identifiers.push({ id: id, token: state.tokens.curr });
+ }
+ }
+ };
+ if (checkPunctuator(firstToken, "[")) {
+ if (!openingParsed) {
+ advance("[");
+ }
+ if (checkPunctuator(state.tokens.next, "]")) {
+ warning("W137", state.tokens.curr);
+ }
+ var element_after_rest = false;
+ while (!checkPunctuator(state.tokens.next, "]")) {
+ if (nextInnerDE() && !element_after_rest &&
+ checkPunctuator(state.tokens.next, ",")) {
+ warning("W130", state.tokens.next);
+ element_after_rest = true;
+ }
+ if (checkPunctuator(state.tokens.next, "=")) {
+ if (checkPunctuator(state.tokens.prev, "...")) {
+ advance("]");
+ } else {
+ advance("=");
+ }
+ if (state.tokens.next.id === "undefined") {
+ warning("W080", state.tokens.prev, state.tokens.prev.value);
+ }
+ expression(10);
+ }
+ if (!checkPunctuator(state.tokens.next, "]")) {
+ advance(",");
+ }
+ }
+ advance("]");
+ } else if (checkPunctuator(firstToken, "{")) {
+
+ if (!openingParsed) {
+ advance("{");
+ }
+ if (checkPunctuator(state.tokens.next, "}")) {
+ warning("W137", state.tokens.curr);
+ }
+ while (!checkPunctuator(state.tokens.next, "}")) {
+ assignmentProperty();
+ if (checkPunctuator(state.tokens.next, "=")) {
+ advance("=");
+ if (state.tokens.next.id === "undefined") {
+ warning("W080", state.tokens.prev, state.tokens.prev.value);
+ }
+ expression(10);
+ }
+ if (!checkPunctuator(state.tokens.next, "}")) {
+ advance(",");
+ if (checkPunctuator(state.tokens.next, "}")) {
+ break;
+ }
+ }
+ }
+ advance("}");
+ }
+ return identifiers;
+ }
+
+ function destructuringPatternMatch(tokens, value) {
+ var first = value.first;
+
+ if (!first)
+ return;
+
+ _.zip(tokens, Array.isArray(first) ? first : [ first ]).forEach(function(val) {
+ var token = val[0];
+ var value = val[1];
+
+ if (token && value)
+ token.first = value;
+ else if (token && token.first && !value)
+ warning("W080", token.first, token.first.value);
+ });
+ }
+
+ function blockVariableStatement(type, statement, context) {
+
+ var prefix = context && context.prefix;
+ var inexport = context && context.inexport;
+ var isLet = type === "let";
+ var isConst = type === "const";
+ var tokens, lone, value, letblock;
+
+ if (!state.inES6()) {
+ warning("W104", state.tokens.curr, type, "6");
+ }
+
+ if (isLet && state.tokens.next.value === "(") {
+ if (!state.inMoz()) {
+ warning("W118", state.tokens.next, "let block");
+ }
+ advance("(");
+ state.funct["(scope)"].stack();
+ letblock = true;
+ } else if (state.funct["(noblockscopedvar)"]) {
+ error("E048", state.tokens.curr, isConst ? "Const" : "Let");
+ }
+
+ statement.first = [];
+ for (;;) {
+ var names = [];
+ if (_.contains(["{", "["], state.tokens.next.value)) {
+ tokens = destructuringPattern();
+ lone = false;
+ } else {
+ tokens = [ { id: identifier(), token: state.tokens.curr } ];
+ lone = true;
+ }
+
+ if (!prefix && isConst && state.tokens.next.id !== "=") {
+ warning("E012", state.tokens.curr, state.tokens.curr.value);
+ }
+
+ for (var t in tokens) {
+ if (tokens.hasOwnProperty(t)) {
+ t = tokens[t];
+ if (state.funct["(scope)"].block.isGlobal()) {
+ if (predefined[t.id] === false) {
+ warning("W079", t.token, t.id);
+ }
+ }
+ if (t.id && !state.funct["(noblockscopedvar)"]) {
+ state.funct["(scope)"].addlabel(t.id, {
+ type: type,
+ token: t.token });
+ names.push(t.token);
+
+ if (lone && inexport) {
+ state.funct["(scope)"].setExported(t.token.value, t.token);
+ }
+ }
+ }
+ }
+
+ if (state.tokens.next.id === "=") {
+ advance("=");
+ if (!prefix && state.tokens.next.id === "undefined") {
+ warning("W080", state.tokens.prev, state.tokens.prev.value);
+ }
+ if (!prefix && peek(0).id === "=" && state.tokens.next.identifier) {
+ warning("W120", state.tokens.next, state.tokens.next.value);
+ }
+ value = expression(prefix ? 120 : 10);
+ if (lone) {
+ tokens[0].first = value;
+ } else {
+ destructuringPatternMatch(names, value);
+ }
+ }
+
+ statement.first = statement.first.concat(names);
+
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ if (letblock) {
+ advance(")");
+ block(true, true);
+ statement.block = true;
+ state.funct["(scope)"].unstack();
+ }
+
+ return statement;
+ }
+
+ var conststatement = stmt("const", function(context) {
+ return blockVariableStatement("const", this, context);
+ });
+ conststatement.exps = true;
+
+ var letstatement = stmt("let", function(context) {
+ return blockVariableStatement("let", this, context);
+ });
+ letstatement.exps = true;
+
+ var varstatement = stmt("var", function(context) {
+ var prefix = context && context.prefix;
+ var inexport = context && context.inexport;
+ var tokens, lone, value;
+ var implied = context && context.implied;
+ var report = !(context && context.ignore);
+
+ this.first = [];
+ for (;;) {
+ var names = [];
+ if (_.contains(["{", "["], state.tokens.next.value)) {
+ tokens = destructuringPattern();
+ lone = false;
+ } else {
+ tokens = [ { id: identifier(), token: state.tokens.curr } ];
+ lone = true;
+ }
+
+ if (!(prefix && implied) && report && state.option.varstmt) {
+ warning("W132", this);
+ }
+
+ this.first = this.first.concat(names);
+
+ for (var t in tokens) {
+ if (tokens.hasOwnProperty(t)) {
+ t = tokens[t];
+ if (!implied && state.funct["(global)"]) {
+ if (predefined[t.id] === false) {
+ warning("W079", t.token, t.id);
+ } else if (state.option.futurehostile === false) {
+ if ((!state.inES5() && vars.ecmaIdentifiers[5][t.id] === false) ||
+ (!state.inES6() && vars.ecmaIdentifiers[6][t.id] === false)) {
+ warning("W129", t.token, t.id);
+ }
+ }
+ }
+ if (t.id) {
+ if (implied === "for") {
+
+ if (!state.funct["(scope)"].has(t.id)) {
+ if (report) warning("W088", t.token, t.id);
+ }
+ state.funct["(scope)"].block.use(t.id, t.token);
+ } else {
+ state.funct["(scope)"].addlabel(t.id, {
+ type: "var",
+ token: t.token });
+
+ if (lone && inexport) {
+ state.funct["(scope)"].setExported(t.id, t.token);
+ }
+ }
+ names.push(t.token);
+ }
+ }
+ }
+
+ if (state.tokens.next.id === "=") {
+ state.nameStack.set(state.tokens.curr);
+
+ advance("=");
+ if (!prefix && report && !state.funct["(loopage)"] &&
+ state.tokens.next.id === "undefined") {
+ warning("W080", state.tokens.prev, state.tokens.prev.value);
+ }
+ if (peek(0).id === "=" && state.tokens.next.identifier) {
+ if (!prefix && report &&
+ !state.funct["(params)"] ||
+ state.funct["(params)"].indexOf(state.tokens.next.value) === -1) {
+ warning("W120", state.tokens.next, state.tokens.next.value);
+ }
+ }
+ value = expression(prefix ? 120 : 10);
+ if (lone) {
+ tokens[0].first = value;
+ } else {
+ destructuringPatternMatch(names, value);
+ }
+ }
+
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+
+ return this;
+ });
+ varstatement.exps = true;
+
+ blockstmt("class", function() {
+ return classdef.call(this, true);
+ });
+
+ function classdef(isStatement) {
+ if (!state.inES6()) {
+ warning("W104", state.tokens.curr, "class", "6");
+ }
+ if (isStatement) {
+ this.name = identifier();
+
+ state.funct["(scope)"].addlabel(this.name, {
+ type: "class",
+ token: state.tokens.curr });
+ } else if (state.tokens.next.identifier && state.tokens.next.value !== "extends") {
+ this.name = identifier();
+ this.namedExpr = true;
+ } else {
+ this.name = state.nameStack.infer();
+ }
+ classtail(this);
+ return this;
+ }
+
+ function classtail(c) {
+ var wasInClassBody = state.inClassBody;
+ if (state.tokens.next.value === "extends") {
+ advance("extends");
+ c.heritage = expression(10);
+ }
+
+ state.inClassBody = true;
+ advance("{");
+ c.body = classbody(c);
+ advance("}");
+ state.inClassBody = wasInClassBody;
+ }
+
+ function classbody(c) {
+ var name;
+ var isStatic;
+ var isGenerator;
+ var getset;
+ var props = Object.create(null);
+ var staticProps = Object.create(null);
+ var computed;
+ for (var i = 0; state.tokens.next.id !== "}"; ++i) {
+ name = state.tokens.next;
+ isStatic = false;
+ isGenerator = false;
+ getset = null;
+ if (name.id === ";") {
+ warning("W032");
+ advance(";");
+ continue;
+ }
+
+ if (name.id === "*") {
+ isGenerator = true;
+ advance("*");
+ name = state.tokens.next;
+ }
+ if (name.id === "[") {
+ name = computedPropertyName();
+ computed = true;
+ } else if (isPropertyName(name)) {
+ advance();
+ computed = false;
+ if (name.identifier && name.value === "static") {
+ if (checkPunctuator(state.tokens.next, "*")) {
+ isGenerator = true;
+ advance("*");
+ }
+ if (isPropertyName(state.tokens.next) || state.tokens.next.id === "[") {
+ computed = state.tokens.next.id === "[";
+ isStatic = true;
+ name = state.tokens.next;
+ if (state.tokens.next.id === "[") {
+ name = computedPropertyName();
+ } else advance();
+ }
+ }
+
+ if (name.identifier && (name.value === "get" || name.value === "set")) {
+ if (isPropertyName(state.tokens.next) || state.tokens.next.id === "[") {
+ computed = state.tokens.next.id === "[";
+ getset = name;
+ name = state.tokens.next;
+ if (state.tokens.next.id === "[") {
+ name = computedPropertyName();
+ } else advance();
+ }
+ }
+ } else {
+ warning("W052", state.tokens.next, state.tokens.next.value || state.tokens.next.type);
+ advance();
+ continue;
+ }
+
+ if (!checkPunctuator(state.tokens.next, "(")) {
+ error("E054", state.tokens.next, state.tokens.next.value);
+ while (state.tokens.next.id !== "}" &&
+ !checkPunctuator(state.tokens.next, "(")) {
+ advance();
+ }
+ if (state.tokens.next.value !== "(") {
+ doFunction({ statement: c });
+ }
+ }
+
+ if (!computed) {
+ if (getset) {
+ saveAccessor(
+ getset.value, isStatic ? staticProps : props, name.value, name, true, isStatic);
+ } else {
+ if (name.value === "constructor") {
+ state.nameStack.set(c);
+ } else {
+ state.nameStack.set(name);
+ }
+ saveProperty(isStatic ? staticProps : props, name.value, name, true, isStatic);
+ }
+ }
+
+ if (getset && name.value === "constructor") {
+ var propDesc = getset.value === "get" ? "class getter method" : "class setter method";
+ error("E049", name, propDesc, "constructor");
+ } else if (name.value === "prototype") {
+ error("E049", name, "class method", "prototype");
+ }
+
+ propertyName(name);
+
+ doFunction({
+ statement: c,
+ type: isGenerator ? "generator" : null,
+ classExprBinding: c.namedExpr ? c.name : null
+ });
+ }
+
+ checkProperties(props);
+ }
+
+ blockstmt("function", function(context) {
+ var inexport = context && context.inexport;
+ var generator = false;
+ if (state.tokens.next.value === "*") {
+ advance("*");
+ if (state.inES6({ strict: true })) {
+ generator = true;
+ } else {
+ warning("W119", state.tokens.curr, "function*", "6");
+ }
+ }
+ if (inblock) {
+ warning("W082", state.tokens.curr);
+ }
+ var i = optionalidentifier();
+
+ state.funct["(scope)"].addlabel(i, {
+ type: "function",
+ token: state.tokens.curr });
+
+ if (i === undefined) {
+ warning("W025");
+ } else if (inexport) {
+ state.funct["(scope)"].setExported(i, state.tokens.prev);
+ }
+
+ doFunction({
+ name: i,
+ statement: this,
+ type: generator ? "generator" : null,
+ ignoreLoopFunc: inblock // a declaration may already have warned
+ });
+ if (state.tokens.next.id === "(" && state.tokens.next.line === state.tokens.curr.line) {
+ error("E039");
+ }
+ return this;
+ });
+
+ prefix("function", function() {
+ var generator = false;
+
+ if (state.tokens.next.value === "*") {
+ if (!state.inES6()) {
+ warning("W119", state.tokens.curr, "function*", "6");
+ }
+ advance("*");
+ generator = true;
+ }
+
+ var i = optionalidentifier();
+ doFunction({ name: i, type: generator ? "generator" : null });
+ return this;
+ });
+
+ blockstmt("if", function() {
+ var t = state.tokens.next;
+ increaseComplexityCount();
+ state.condition = true;
+ advance("(");
+ var expr = expression(0);
+ checkCondAssignment(expr);
+ var forinifcheck = null;
+ if (state.option.forin && state.forinifcheckneeded) {
+ state.forinifcheckneeded = false; // We only need to analyze the first if inside the loop
+ forinifcheck = state.forinifchecks[state.forinifchecks.length - 1];
+ if (expr.type === "(punctuator)" && expr.value === "!") {
+ forinifcheck.type = "(negative)";
+ } else {
+ forinifcheck.type = "(positive)";
+ }
+ }
+
+ advance(")", t);
+ state.condition = false;
+ var s = block(true, true);
+ if (forinifcheck && forinifcheck.type === "(negative)") {
+ if (s && s[0] && s[0].type === "(identifier)" && s[0].value === "continue") {
+ forinifcheck.type = "(negative-with-continue)";
+ }
+ }
+
+ if (state.tokens.next.id === "else") {
+ advance("else");
+ if (state.tokens.next.id === "if" || state.tokens.next.id === "switch") {
+ statement();
+ } else {
+ block(true, true);
+ }
+ }
+ return this;
+ });
+
+ blockstmt("try", function() {
+ var b;
+
+ function doCatch() {
+ advance("catch");
+ advance("(");
+
+ state.funct["(scope)"].stack("catchparams");
+
+ if (checkPunctuators(state.tokens.next, ["[", "{"])) {
+ var tokens = destructuringPattern();
+ _.each(tokens, function(token) {
+ if (token.id) {
+ state.funct["(scope)"].addParam(token.id, token, "exception");
+ }
+ });
+ } else if (state.tokens.next.type !== "(identifier)") {
+ warning("E030", state.tokens.next, state.tokens.next.value);
+ } else {
+ state.funct["(scope)"].addParam(identifier(), state.tokens.curr, "exception");
+ }
+
+ if (state.tokens.next.value === "if") {
+ if (!state.inMoz()) {
+ warning("W118", state.tokens.curr, "catch filter");
+ }
+ advance("if");
+ expression(0);
+ }
+
+ advance(")");
+
+ block(false);
+
+ state.funct["(scope)"].unstack();
+ }
+
+ block(true);
+
+ while (state.tokens.next.id === "catch") {
+ increaseComplexityCount();
+ if (b && (!state.inMoz())) {
+ warning("W118", state.tokens.next, "multiple catch blocks");
+ }
+ doCatch();
+ b = true;
+ }
+
+ if (state.tokens.next.id === "finally") {
+ advance("finally");
+ block(true);
+ return;
+ }
+
+ if (!b) {
+ error("E021", state.tokens.next, "catch", state.tokens.next.value);
+ }
+
+ return this;
+ });
+
+ blockstmt("while", function() {
+ var t = state.tokens.next;
+ state.funct["(breakage)"] += 1;
+ state.funct["(loopage)"] += 1;
+ increaseComplexityCount();
+ advance("(");
+ checkCondAssignment(expression(0));
+ advance(")", t);
+ block(true, true);
+ state.funct["(breakage)"] -= 1;
+ state.funct["(loopage)"] -= 1;
+ return this;
+ }).labelled = true;
+
+ blockstmt("with", function() {
+ var t = state.tokens.next;
+ if (state.isStrict()) {
+ error("E010", state.tokens.curr);
+ } else if (!state.option.withstmt) {
+ warning("W085", state.tokens.curr);
+ }
+
+ advance("(");
+ expression(0);
+ advance(")", t);
+ block(true, true);
+
+ return this;
+ });
+
+ blockstmt("switch", function() {
+ var t = state.tokens.next;
+ var g = false;
+ var noindent = false;
+
+ state.funct["(breakage)"] += 1;
+ advance("(");
+ checkCondAssignment(expression(0));
+ advance(")", t);
+ t = state.tokens.next;
+ advance("{");
+
+ if (state.tokens.next.from === indent)
+ noindent = true;
+
+ if (!noindent)
+ indent += state.option.indent;
+
+ this.cases = [];
+
+ for (;;) {
+ switch (state.tokens.next.id) {
+ case "case":
+ switch (state.funct["(verb)"]) {
+ case "yield":
+ case "break":
+ case "case":
+ case "continue":
+ case "return":
+ case "switch":
+ case "throw":
+ break;
+ default:
+ if (!state.tokens.curr.caseFallsThrough) {
+ warning("W086", state.tokens.curr, "case");
+ }
+ }
+
+ advance("case");
+ this.cases.push(expression(0));
+ increaseComplexityCount();
+ g = true;
+ advance(":");
+ state.funct["(verb)"] = "case";
+ break;
+ case "default":
+ switch (state.funct["(verb)"]) {
+ case "yield":
+ case "break":
+ case "continue":
+ case "return":
+ case "throw":
+ break;
+ default:
+ if (this.cases.length) {
+ if (!state.tokens.curr.caseFallsThrough) {
+ warning("W086", state.tokens.curr, "default");
+ }
+ }
+ }
+
+ advance("default");
+ g = true;
+ advance(":");
+ break;
+ case "}":
+ if (!noindent)
+ indent -= state.option.indent;
+
+ advance("}", t);
+ state.funct["(breakage)"] -= 1;
+ state.funct["(verb)"] = undefined;
+ return;
+ case "(end)":
+ error("E023", state.tokens.next, "}");
+ return;
+ default:
+ indent += state.option.indent;
+ if (g) {
+ switch (state.tokens.curr.id) {
+ case ",":
+ error("E040");
+ return;
+ case ":":
+ g = false;
+ statements();
+ break;
+ default:
+ error("E025", state.tokens.curr);
+ return;
+ }
+ } else {
+ if (state.tokens.curr.id === ":") {
+ advance(":");
+ error("E024", state.tokens.curr, ":");
+ statements();
+ } else {
+ error("E021", state.tokens.next, "case", state.tokens.next.value);
+ return;
+ }
+ }
+ indent -= state.option.indent;
+ }
+ }
+ return this;
+ }).labelled = true;
+
+ stmt("debugger", function() {
+ if (!state.option.debug) {
+ warning("W087", this);
+ }
+ return this;
+ }).exps = true;
+
+ (function() {
+ var x = stmt("do", function() {
+ state.funct["(breakage)"] += 1;
+ state.funct["(loopage)"] += 1;
+ increaseComplexityCount();
+
+ this.first = block(true, true);
+ advance("while");
+ var t = state.tokens.next;
+ advance("(");
+ checkCondAssignment(expression(0));
+ advance(")", t);
+ state.funct["(breakage)"] -= 1;
+ state.funct["(loopage)"] -= 1;
+ return this;
+ });
+ x.labelled = true;
+ x.exps = true;
+ }());
+
+ blockstmt("for", function() {
+ var s, t = state.tokens.next;
+ var letscope = false;
+ var foreachtok = null;
+
+ if (t.value === "each") {
+ foreachtok = t;
+ advance("each");
+ if (!state.inMoz()) {
+ warning("W118", state.tokens.curr, "for each");
+ }
+ }
+
+ increaseComplexityCount();
+ advance("(");
+ var nextop; // contains the token of the "in" or "of" operator
+ var i = 0;
+ var inof = ["in", "of"];
+ var level = 0; // BindingPattern "level" --- level 0 === no BindingPattern
+ var comma; // First comma punctuator at level 0
+ var initializer; // First initializer at level 0
+ if (checkPunctuators(state.tokens.next, ["{", "["])) ++level;
+ do {
+ nextop = peek(i);
+ ++i;
+ if (checkPunctuators(nextop, ["{", "["])) ++level;
+ else if (checkPunctuators(nextop, ["}", "]"])) --level;
+ if (level < 0) break;
+ if (level === 0) {
+ if (!comma && checkPunctuator(nextop, ",")) comma = nextop;
+ else if (!initializer && checkPunctuator(nextop, "=")) initializer = nextop;
+ }
+ } while (level > 0 || !_.contains(inof, nextop.value) && nextop.value !== ";" &&
+ nextop.type !== "(end)"); // Is this a JSCS bug? This looks really weird.
+ if (_.contains(inof, nextop.value)) {
+ if (!state.inES6() && nextop.value === "of") {
+ warning("W104", nextop, "for of", "6");
+ }
+
+ var ok = !(initializer || comma);
+ if (initializer) {
+ error("W133", comma, nextop.value, "initializer is forbidden");
+ }
+
+ if (comma) {
+ error("W133", comma, nextop.value, "more than one ForBinding");
+ }
+
+ if (state.tokens.next.id === "var") {
+ advance("var");
+ state.tokens.curr.fud({ prefix: true });
+ } else if (state.tokens.next.id === "let" || state.tokens.next.id === "const") {
+ advance(state.tokens.next.id);
+ letscope = true;
+ state.funct["(scope)"].stack();
+ state.tokens.curr.fud({ prefix: true });
+ } else {
+ Object.create(varstatement).fud({ prefix: true, implied: "for", ignore: !ok });
+ }
+ advance(nextop.value);
+ expression(20);
+ advance(")", t);
+
+ if (nextop.value === "in" && state.option.forin) {
+ state.forinifcheckneeded = true;
+
+ if (state.forinifchecks === undefined) {
+ state.forinifchecks = [];
+ }
+ state.forinifchecks.push({
+ type: "(none)"
+ });
+ }
+
+ state.funct["(breakage)"] += 1;
+ state.funct["(loopage)"] += 1;
+
+ s = block(true, true);
+
+ if (nextop.value === "in" && state.option.forin) {
+ if (state.forinifchecks && state.forinifchecks.length > 0) {
+ var check = state.forinifchecks.pop();
+
+ if (// No if statement or not the first statement in loop body
+ s && s.length > 0 && (typeof s[0] !== "object" || s[0].value !== "if") ||
+ check.type === "(positive)" && s.length > 1 ||
+ check.type === "(negative)") {
+ warning("W089", this);
+ }
+ }
+ state.forinifcheckneeded = false;
+ }
+
+ state.funct["(breakage)"] -= 1;
+ state.funct["(loopage)"] -= 1;
+ } else {
+ if (foreachtok) {
+ error("E045", foreachtok);
+ }
+ if (state.tokens.next.id !== ";") {
+ if (state.tokens.next.id === "var") {
+ advance("var");
+ state.tokens.curr.fud();
+ } else if (state.tokens.next.id === "let") {
+ advance("let");
+ letscope = true;
+ state.funct["(scope)"].stack();
+ state.tokens.curr.fud();
+ } else {
+ for (;;) {
+ expression(0, "for");
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ }
+ }
+ nolinebreak(state.tokens.curr);
+ advance(";");
+ state.funct["(loopage)"] += 1;
+ if (state.tokens.next.id !== ";") {
+ checkCondAssignment(expression(0));
+ }
+ nolinebreak(state.tokens.curr);
+ advance(";");
+ if (state.tokens.next.id === ";") {
+ error("E021", state.tokens.next, ")", ";");
+ }
+ if (state.tokens.next.id !== ")") {
+ for (;;) {
+ expression(0, "for");
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ comma();
+ }
+ }
+ advance(")", t);
+ state.funct["(breakage)"] += 1;
+ block(true, true);
+ state.funct["(breakage)"] -= 1;
+ state.funct["(loopage)"] -= 1;
+
+ }
+ if (letscope) {
+ state.funct["(scope)"].unstack();
+ }
+ return this;
+ }).labelled = true;
+
+
+ stmt("break", function() {
+ var v = state.tokens.next.value;
+
+ if (!state.option.asi)
+ nolinebreak(this);
+
+ if (state.tokens.next.id !== ";" && !state.tokens.next.reach &&
+ state.tokens.curr.line === startLine(state.tokens.next)) {
+ if (!state.funct["(scope)"].funct.hasBreakLabel(v)) {
+ warning("W090", state.tokens.next, v);
+ }
+ this.first = state.tokens.next;
+ advance();
+ } else {
+ if (state.funct["(breakage)"] === 0)
+ warning("W052", state.tokens.next, this.value);
+ }
+
+ reachable(this);
+
+ return this;
+ }).exps = true;
+
+
+ stmt("continue", function() {
+ var v = state.tokens.next.value;
+
+ if (state.funct["(breakage)"] === 0)
+ warning("W052", state.tokens.next, this.value);
+ if (!state.funct["(loopage)"])
+ warning("W052", state.tokens.next, this.value);
+
+ if (!state.option.asi)
+ nolinebreak(this);
+
+ if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
+ if (state.tokens.curr.line === startLine(state.tokens.next)) {
+ if (!state.funct["(scope)"].funct.hasBreakLabel(v)) {
+ warning("W090", state.tokens.next, v);
+ }
+ this.first = state.tokens.next;
+ advance();
+ }
+ }
+
+ reachable(this);
+
+ return this;
+ }).exps = true;
+
+
+ stmt("return", function() {
+ if (this.line === startLine(state.tokens.next)) {
+ if (state.tokens.next.id !== ";" && !state.tokens.next.reach) {
+ this.first = expression(0);
+
+ if (this.first &&
+ this.first.type === "(punctuator)" && this.first.value === "=" &&
+ !this.first.paren && !state.option.boss) {
+ warningAt("W093", this.first.line, this.first.character);
+ }
+ }
+ } else {
+ if (state.tokens.next.type === "(punctuator)" &&
+ ["[", "{", "+", "-"].indexOf(state.tokens.next.value) > -1) {
+ nolinebreak(this); // always warn (Line breaking error)
+ }
+ }
+
+ reachable(this);
+
+ return this;
+ }).exps = true;
+
+ (function(x) {
+ x.exps = true;
+ x.lbp = 25;
+ }(prefix("yield", function() {
+ var prev = state.tokens.prev;
+ if (state.inES6(true) && !state.funct["(generator)"]) {
+ if (!("(catch)" === state.funct["(name)"] && state.funct["(context)"]["(generator)"])) {
+ error("E046", state.tokens.curr, "yield");
+ }
+ } else if (!state.inES6()) {
+ warning("W104", state.tokens.curr, "yield", "6");
+ }
+ state.funct["(generator)"] = "yielded";
+ var delegatingYield = false;
+
+ if (state.tokens.next.value === "*") {
+ delegatingYield = true;
+ advance("*");
+ }
+
+ if (this.line === startLine(state.tokens.next) || !state.inMoz()) {
+ if (delegatingYield ||
+ (state.tokens.next.id !== ";" && !state.option.asi &&
+ !state.tokens.next.reach && state.tokens.next.nud)) {
+
+ nobreaknonadjacent(state.tokens.curr, state.tokens.next);
+ this.first = expression(10);
+
+ if (this.first.type === "(punctuator)" && this.first.value === "=" &&
+ !this.first.paren && !state.option.boss) {
+ warningAt("W093", this.first.line, this.first.character);
+ }
+ }
+
+ if (state.inMoz() && state.tokens.next.id !== ")" &&
+ (prev.lbp > 30 || (!prev.assign && !isEndOfExpr()) || prev.id === "yield")) {
+ error("E050", this);
+ }
+ } else if (!state.option.asi) {
+ nolinebreak(this); // always warn (Line breaking error)
+ }
+ return this;
+ })));
+
+
+ stmt("throw", function() {
+ nolinebreak(this);
+ this.first = expression(20);
+
+ reachable(this);
+
+ return this;
+ }).exps = true;
+
+ stmt("import", function() {
+ if (!state.inES6()) {
+ warning("W119", state.tokens.curr, "import", "6");
+ }
+
+ if (state.tokens.next.type === "(string)") {
+ advance("(string)");
+ return this;
+ }
+
+ if (state.tokens.next.identifier) {
+ this.name = identifier();
+ state.funct["(scope)"].addlabel(this.name, {
+ type: "const",
+ token: state.tokens.curr });
+
+ if (state.tokens.next.value === ",") {
+ advance(",");
+ } else {
+ advance("from");
+ advance("(string)");
+ return this;
+ }
+ }
+
+ if (state.tokens.next.id === "*") {
+ advance("*");
+ advance("as");
+ if (state.tokens.next.identifier) {
+ this.name = identifier();
+ state.funct["(scope)"].addlabel(this.name, {
+ type: "const",
+ token: state.tokens.curr });
+ }
+ } else {
+ advance("{");
+ for (;;) {
+ if (state.tokens.next.value === "}") {
+ advance("}");
+ break;
+ }
+ var importName;
+ if (state.tokens.next.type === "default") {
+ importName = "default";
+ advance("default");
+ } else {
+ importName = identifier();
+ }
+ if (state.tokens.next.value === "as") {
+ advance("as");
+ importName = identifier();
+ }
+ state.funct["(scope)"].addlabel(importName, {
+ type: "const",
+ token: state.tokens.curr });
+
+ if (state.tokens.next.value === ",") {
+ advance(",");
+ } else if (state.tokens.next.value === "}") {
+ advance("}");
+ break;
+ } else {
+ error("E024", state.tokens.next, state.tokens.next.value);
+ break;
+ }
+ }
+ }
+ advance("from");
+ advance("(string)");
+ return this;
+ }).exps = true;
+
+ stmt("export", function() {
+ var ok = true;
+ var token;
+ var identifier;
+
+ if (!state.inES6()) {
+ warning("W119", state.tokens.curr, "export", "6");
+ ok = false;
+ }
+
+ if (!state.funct["(scope)"].block.isGlobal()) {
+ error("E053", state.tokens.curr);
+ ok = false;
+ }
+
+ if (state.tokens.next.value === "*") {
+ advance("*");
+ advance("from");
+ advance("(string)");
+ return this;
+ }
+
+ if (state.tokens.next.type === "default") {
+ state.nameStack.set(state.tokens.next);
+ advance("default");
+ var exportType = state.tokens.next.id;
+ if (exportType === "function" || exportType === "class") {
+ this.block = true;
+ }
+
+ token = peek();
+
+ expression(10);
+
+ identifier = token.value;
+
+ if (this.block) {
+ state.funct["(scope)"].addlabel(identifier, {
+ type: exportType,
+ token: token });
+
+ state.funct["(scope)"].setExported(identifier, token);
+ }
+
+ return this;
+ }
+
+ if (state.tokens.next.value === "{") {
+ advance("{");
+ var exportedTokens = [];
+ for (;;) {
+ if (!state.tokens.next.identifier) {
+ error("E030", state.tokens.next, state.tokens.next.value);
+ }
+ advance();
+
+ exportedTokens.push(state.tokens.curr);
+
+ if (state.tokens.next.value === "as") {
+ advance("as");
+ if (!state.tokens.next.identifier) {
+ error("E030", state.tokens.next, state.tokens.next.value);
+ }
+ advance();
+ }
+
+ if (state.tokens.next.value === ",") {
+ advance(",");
+ } else if (state.tokens.next.value === "}") {
+ advance("}");
+ break;
+ } else {
+ error("E024", state.tokens.next, state.tokens.next.value);
+ break;
+ }
+ }
+ if (state.tokens.next.value === "from") {
+ advance("from");
+ advance("(string)");
+ } else if (ok) {
+ exportedTokens.forEach(function(token) {
+ state.funct["(scope)"].setExported(token.value, token);
+ });
+ }
+ return this;
+ }
+
+ if (state.tokens.next.id === "var") {
+ advance("var");
+ state.tokens.curr.fud({ inexport:true });
+ } else if (state.tokens.next.id === "let") {
+ advance("let");
+ state.tokens.curr.fud({ inexport:true });
+ } else if (state.tokens.next.id === "const") {
+ advance("const");
+ state.tokens.curr.fud({ inexport:true });
+ } else if (state.tokens.next.id === "function") {
+ this.block = true;
+ advance("function");
+ state.syntax["function"].fud({ inexport:true });
+ } else if (state.tokens.next.id === "class") {
+ this.block = true;
+ advance("class");
+ var classNameToken = state.tokens.next;
+ state.syntax["class"].fud();
+ state.funct["(scope)"].setExported(classNameToken.value, classNameToken);
+ } else {
+ error("E024", state.tokens.next, state.tokens.next.value);
+ }
+
+ return this;
+ }).exps = true;
+
+ FutureReservedWord("abstract");
+ FutureReservedWord("boolean");
+ FutureReservedWord("byte");
+ FutureReservedWord("char");
+ FutureReservedWord("class", { es5: true, nud: classdef });
+ FutureReservedWord("double");
+ FutureReservedWord("enum", { es5: true });
+ FutureReservedWord("export", { es5: true });
+ FutureReservedWord("extends", { es5: true });
+ FutureReservedWord("final");
+ FutureReservedWord("float");
+ FutureReservedWord("goto");
+ FutureReservedWord("implements", { es5: true, strictOnly: true });
+ FutureReservedWord("import", { es5: true });
+ FutureReservedWord("int");
+ FutureReservedWord("interface", { es5: true, strictOnly: true });
+ FutureReservedWord("long");
+ FutureReservedWord("native");
+ FutureReservedWord("package", { es5: true, strictOnly: true });
+ FutureReservedWord("private", { es5: true, strictOnly: true });
+ FutureReservedWord("protected", { es5: true, strictOnly: true });
+ FutureReservedWord("public", { es5: true, strictOnly: true });
+ FutureReservedWord("short");
+ FutureReservedWord("static", { es5: true, strictOnly: true });
+ FutureReservedWord("super", { es5: true });
+ FutureReservedWord("synchronized");
+ FutureReservedWord("transient");
+ FutureReservedWord("volatile");
+
+ var lookupBlockType = function() {
+ var pn, pn1, prev;
+ var i = -1;
+ var bracketStack = 0;
+ var ret = {};
+ if (checkPunctuators(state.tokens.curr, ["[", "{"])) {
+ bracketStack += 1;
+ }
+ do {
+ prev = i === -1 ? state.tokens.curr : pn;
+ pn = i === -1 ? state.tokens.next : peek(i);
+ pn1 = peek(i + 1);
+ i = i + 1;
+ if (checkPunctuators(pn, ["[", "{"])) {
+ bracketStack += 1;
+ } else if (checkPunctuators(pn, ["]", "}"])) {
+ bracketStack -= 1;
+ }
+ if (bracketStack === 1 && pn.identifier && pn.value === "for" &&
+ !checkPunctuator(prev, ".")) {
+ ret.isCompArray = true;
+ ret.notJson = true;
+ break;
+ }
+ if (bracketStack === 0 && checkPunctuators(pn, ["}", "]"])) {
+ if (pn1.value === "=") {
+ ret.isDestAssign = true;
+ ret.notJson = true;
+ break;
+ } else if (pn1.value === ".") {
+ ret.notJson = true;
+ break;
+ }
+ }
+ if (checkPunctuator(pn, ";")) {
+ ret.isBlock = true;
+ ret.notJson = true;
+ }
+ } while (bracketStack > 0 && pn.id !== "(end)");
+ return ret;
+ };
+
+ function saveProperty(props, name, tkn, isClass, isStatic) {
+ var msg = ["key", "class method", "static class method"];
+ msg = msg[(isClass || false) + (isStatic || false)];
+ if (tkn.identifier) {
+ name = tkn.value;
+ }
+
+ if (props[name] && name !== "__proto__") {
+ warning("W075", state.tokens.next, msg, name);
+ } else {
+ props[name] = Object.create(null);
+ }
+
+ props[name].basic = true;
+ props[name].basictkn = tkn;
+ }
+ function saveAccessor(accessorType, props, name, tkn, isClass, isStatic) {
+ var flagName = accessorType === "get" ? "getterToken" : "setterToken";
+ var msg = "";
+
+ if (isClass) {
+ if (isStatic) {
+ msg += "static ";
+ }
+ msg += accessorType + "ter method";
+ } else {
+ msg = "key";
+ }
+
+ state.tokens.curr.accessorType = accessorType;
+ state.nameStack.set(tkn);
+
+ if (props[name]) {
+ if ((props[name].basic || props[name][flagName]) && name !== "__proto__") {
+ warning("W075", state.tokens.next, msg, name);
+ }
+ } else {
+ props[name] = Object.create(null);
+ }
+
+ props[name][flagName] = tkn;
+ }
+
+ function computedPropertyName() {
+ advance("[");
+ if (!state.inES6()) {
+ warning("W119", state.tokens.curr, "computed property names", "6");
+ }
+ var value = expression(10);
+ advance("]");
+ return value;
+ }
+ function checkPunctuators(token, values) {
+ if (token.type === "(punctuator)") {
+ return _.contains(values, token.value);
+ }
+ return false;
+ }
+ function checkPunctuator(token, value) {
+ return token.type === "(punctuator)" && token.value === value;
+ }
+ function destructuringAssignOrJsonValue() {
+
+ var block = lookupBlockType();
+ if (block.notJson) {
+ if (!state.inES6() && block.isDestAssign) {
+ warning("W104", state.tokens.curr, "destructuring assignment", "6");
+ }
+ statements();
+ } else {
+ state.option.laxbreak = true;
+ state.jsonMode = true;
+ jsonValue();
+ }
+ }
+
+ var arrayComprehension = function() {
+ var CompArray = function() {
+ this.mode = "use";
+ this.variables = [];
+ };
+ var _carrays = [];
+ var _current;
+ function declare(v) {
+ var l = _current.variables.filter(function(elt) {
+ if (elt.value === v) {
+ elt.undef = false;
+ return v;
+ }
+ }).length;
+ return l !== 0;
+ }
+ function use(v) {
+ var l = _current.variables.filter(function(elt) {
+ if (elt.value === v && !elt.undef) {
+ if (elt.unused === true) {
+ elt.unused = false;
+ }
+ return v;
+ }
+ }).length;
+ return (l === 0);
+ }
+ return { stack: function() {
+ _current = new CompArray();
+ _carrays.push(_current);
+ },
+ unstack: function() {
+ _current.variables.filter(function(v) {
+ if (v.unused)
+ warning("W098", v.token, v.raw_text || v.value);
+ if (v.undef)
+ state.funct["(scope)"].block.use(v.value, v.token);
+ });
+ _carrays.splice(-1, 1);
+ _current = _carrays[_carrays.length - 1];
+ },
+ setState: function(s) {
+ if (_.contains(["use", "define", "generate", "filter"], s))
+ _current.mode = s;
+ },
+ check: function(v) {
+ if (!_current) {
+ return;
+ }
+ if (_current && _current.mode === "use") {
+ if (use(v)) {
+ _current.variables.push({
+ funct: state.funct,
+ token: state.tokens.curr,
+ value: v,
+ undef: true,
+ unused: false
+ });
+ }
+ return true;
+ } else if (_current && _current.mode === "define") {
+ if (!declare(v)) {
+ _current.variables.push({
+ funct: state.funct,
+ token: state.tokens.curr,
+ value: v,
+ undef: false,
+ unused: true
+ });
+ }
+ return true;
+ } else if (_current && _current.mode === "generate") {
+ state.funct["(scope)"].block.use(v, state.tokens.curr);
+ return true;
+ } else if (_current && _current.mode === "filter") {
+ if (use(v)) {
+ state.funct["(scope)"].block.use(v, state.tokens.curr);
+ }
+ return true;
+ }
+ return false;
+ }
+ };
+ };
+
+ function jsonValue() {
+ function jsonObject() {
+ var o = {}, t = state.tokens.next;
+ advance("{");
+ if (state.tokens.next.id !== "}") {
+ for (;;) {
+ if (state.tokens.next.id === "(end)") {
+ error("E026", state.tokens.next, t.line);
+ } else if (state.tokens.next.id === "}") {
+ warning("W094", state.tokens.curr);
+ break;
+ } else if (state.tokens.next.id === ",") {
+ error("E028", state.tokens.next);
+ } else if (state.tokens.next.id !== "(string)") {
+ warning("W095", state.tokens.next, state.tokens.next.value);
+ }
+ if (o[state.tokens.next.value] === true) {
+ warning("W075", state.tokens.next, "key", state.tokens.next.value);
+ } else if ((state.tokens.next.value === "__proto__" &&
+ !state.option.proto) || (state.tokens.next.value === "__iterator__" &&
+ !state.option.iterator)) {
+ warning("W096", state.tokens.next, state.tokens.next.value);
+ } else {
+ o[state.tokens.next.value] = true;
+ }
+ advance();
+ advance(":");
+ jsonValue();
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ advance(",");
+ }
+ }
+ advance("}");
+ }
+
+ function jsonArray() {
+ var t = state.tokens.next;
+ advance("[");
+ if (state.tokens.next.id !== "]") {
+ for (;;) {
+ if (state.tokens.next.id === "(end)") {
+ error("E027", state.tokens.next, t.line);
+ } else if (state.tokens.next.id === "]") {
+ warning("W094", state.tokens.curr);
+ break;
+ } else if (state.tokens.next.id === ",") {
+ error("E028", state.tokens.next);
+ }
+ jsonValue();
+ if (state.tokens.next.id !== ",") {
+ break;
+ }
+ advance(",");
+ }
+ }
+ advance("]");
+ }
+
+ switch (state.tokens.next.id) {
+ case "{":
+ jsonObject();
+ break;
+ case "[":
+ jsonArray();
+ break;
+ case "true":
+ case "false":
+ case "null":
+ case "(number)":
+ case "(string)":
+ advance();
+ break;
+ case "-":
+ advance("-");
+ advance("(number)");
+ break;
+ default:
+ error("E003", state.tokens.next);
+ }
+ }
+
+ var escapeRegex = function(str) {
+ return str.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
+ };
+ var itself = function(s, o, g) {
+ var i, k, x, reIgnoreStr, reIgnore;
+ var optionKeys;
+ var newOptionObj = {};
+ var newIgnoredObj = {};
+
+ o = _.clone(o);
+ state.reset();
+
+ if (o && o.scope) {
+ JSHINT.scope = o.scope;
+ } else {
+ JSHINT.errors = [];
+ JSHINT.undefs = [];
+ JSHINT.internals = [];
+ JSHINT.blacklist = {};
+ JSHINT.scope = "(main)";
+ }
+
+ predefined = Object.create(null);
+ combine(predefined, vars.ecmaIdentifiers[3]);
+ combine(predefined, vars.reservedVars);
+
+ combine(predefined, g || {});
+
+ declared = Object.create(null);
+ var exported = Object.create(null); // Variables that live outside the current file
+
+ function each(obj, cb) {
+ if (!obj)
+ return;
+
+ if (!Array.isArray(obj) && typeof obj === "object")
+ obj = Object.keys(obj);
+
+ obj.forEach(cb);
+ }
+
+ if (o) {
+ each(o.predef || null, function(item) {
+ var slice, prop;
+
+ if (item[0] === "-") {
+ slice = item.slice(1);
+ JSHINT.blacklist[slice] = slice;
+ delete predefined[slice];
+ } else {
+ prop = Object.getOwnPropertyDescriptor(o.predef, item);
+ predefined[item] = prop ? prop.value : false;
+ }
+ });
+
+ each(o.exported || null, function(item) {
+ exported[item] = true;
+ });
+
+ delete o.predef;
+ delete o.exported;
+
+ optionKeys = Object.keys(o);
+ for (x = 0; x < optionKeys.length; x++) {
+ if (/^-W\d{3}$/g.test(optionKeys[x])) {
+ newIgnoredObj[optionKeys[x].slice(1)] = true;
+ } else {
+ var optionKey = optionKeys[x];
+ newOptionObj[optionKey] = o[optionKey];
+ if ((optionKey === "esversion" && o[optionKey] === 5) ||
+ (optionKey === "es5" && o[optionKey])) {
+ warning("I003");
+ }
+
+ if (optionKeys[x] === "newcap" && o[optionKey] === false)
+ newOptionObj["(explicitNewcap)"] = true;
+ }
+ }
+ }
+
+ state.option = newOptionObj;
+ state.ignored = newIgnoredObj;
+
+ state.option.indent = state.option.indent || 4;
+ state.option.maxerr = state.option.maxerr || 50;
+
+ indent = 1;
+
+ var scopeManagerInst = scopeManager(state, predefined, exported, declared);
+ scopeManagerInst.on("warning", function(ev) {
+ warning.apply(null, [ ev.code, ev.token].concat(ev.data));
+ });
+
+ scopeManagerInst.on("error", function(ev) {
+ error.apply(null, [ ev.code, ev.token ].concat(ev.data));
+ });
+
+ state.funct = functor("(global)", null, {
+ "(global)" : true,
+ "(scope)" : scopeManagerInst,
+ "(comparray)" : arrayComprehension(),
+ "(metrics)" : createMetrics(state.tokens.next)
+ });
+
+ functions = [state.funct];
+ urls = [];
+ stack = null;
+ member = {};
+ membersOnly = null;
+ inblock = false;
+ lookahead = [];
+
+ if (!isString(s) && !Array.isArray(s)) {
+ errorAt("E004", 0);
+ return false;
+ }
+
+ api = {
+ get isJSON() {
+ return state.jsonMode;
+ },
+
+ getOption: function(name) {
+ return state.option[name] || null;
+ },
+
+ getCache: function(name) {
+ return state.cache[name];
+ },
+
+ setCache: function(name, value) {
+ state.cache[name] = value;
+ },
+
+ warn: function(code, data) {
+ warningAt.apply(null, [ code, data.line, data.char ].concat(data.data));
+ },
+
+ on: function(names, listener) {
+ names.split(" ").forEach(function(name) {
+ emitter.on(name, listener);
+ }.bind(this));
+ }
+ };
+
+ emitter.removeAllListeners();
+ (extraModules || []).forEach(function(func) {
+ func(api);
+ });
+
+ state.tokens.prev = state.tokens.curr = state.tokens.next = state.syntax["(begin)"];
+
+ if (o && o.ignoreDelimiters) {
+
+ if (!Array.isArray(o.ignoreDelimiters)) {
+ o.ignoreDelimiters = [o.ignoreDelimiters];
+ }
+
+ o.ignoreDelimiters.forEach(function(delimiterPair) {
+ if (!delimiterPair.start || !delimiterPair.end)
+ return;
+
+ reIgnoreStr = escapeRegex(delimiterPair.start) +
+ "[\\s\\S]*?" +
+ escapeRegex(delimiterPair.end);
+
+ reIgnore = new RegExp(reIgnoreStr, "ig");
+
+ s = s.replace(reIgnore, function(match) {
+ return match.replace(/./g, " ");
+ });
+ });
+ }
+
+ lex = new Lexer(s);
+
+ lex.on("warning", function(ev) {
+ warningAt.apply(null, [ ev.code, ev.line, ev.character].concat(ev.data));
+ });
+
+ lex.on("error", function(ev) {
+ errorAt.apply(null, [ ev.code, ev.line, ev.character ].concat(ev.data));
+ });
+
+ lex.on("fatal", function(ev) {
+ quit("E041", ev.line, ev.from);
+ });
+
+ lex.on("Identifier", function(ev) {
+ emitter.emit("Identifier", ev);
+ });
+
+ lex.on("String", function(ev) {
+ emitter.emit("String", ev);
+ });
+
+ lex.on("Number", function(ev) {
+ emitter.emit("Number", ev);
+ });
+
+ lex.start();
+ for (var name in o) {
+ if (_.has(o, name)) {
+ checkOption(name, state.tokens.curr);
+ }
+ }
+
+ assume();
+ combine(predefined, g || {});
+ comma.first = true;
+
+ try {
+ advance();
+ switch (state.tokens.next.id) {
+ case "{":
+ case "[":
+ destructuringAssignOrJsonValue();
+ break;
+ default:
+ directives();
+
+ if (state.directive["use strict"]) {
+ if (state.option.strict !== "global") {
+ warning("W097", state.tokens.prev);
+ }
+ }
+
+ statements();
+ }
+
+ if (state.tokens.next.id !== "(end)") {
+ quit("E041", state.tokens.curr.line);
+ }
+
+ state.funct["(scope)"].unstack();
+
+ } catch (err) {
+ if (err && err.name === "JSHintError") {
+ var nt = state.tokens.next || {};
+ JSHINT.errors.push({
+ scope : "(main)",
+ raw : err.raw,
+ code : err.code,
+ reason : err.message,
+ line : err.line || nt.line,
+ character : err.character || nt.from
+ }, null);
+ } else {
+ throw err;
+ }
+ }
+
+ 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.addModule = function(func) {
+ extraModules.push(func);
+ };
+
+ itself.addModule(style.register);
+ itself.data = function() {
+ var data = {
+ functions: [],
+ options: state.option
+ };
+
+ var fu, f, i, j, n, globals;
+
+ if (itself.errors.length) {
+ data.errors = itself.errors;
+ }
+
+ if (state.jsonMode) {
+ data.json = true;
+ }
+
+ var impliedGlobals = state.funct["(scope)"].getImpliedGlobals();
+ if (impliedGlobals.length > 0) {
+ data.implieds = impliedGlobals;
+ }
+
+ if (urls.length > 0) {
+ data.urls = urls;
+ }
+
+ globals = state.funct["(scope)"].getUsedOrDefinedGlobals();
+ 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)"];
+
+ fu.metrics = {
+ complexity: f["(metrics)"].ComplexityCount,
+ parameters: f["(metrics)"].arity,
+ statements: f["(metrics)"].statementCount
+ };
+
+ data.functions.push(fu);
+ }
+
+ var unuseds = state.funct["(scope)"].getUnuseds();
+ if (unuseds.length > 0) {
+ data.unused = unuseds;
+ }
+
+ 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;
+}
+
+},{"../lodash":"/node_modules/jshint/lodash.js","./lex.js":"/node_modules/jshint/src/lex.js","./messages.js":"/node_modules/jshint/src/messages.js","./options.js":"/node_modules/jshint/src/options.js","./reg.js":"/node_modules/jshint/src/reg.js","./scope-manager.js":"/node_modules/jshint/src/scope-manager.js","./state.js":"/node_modules/jshint/src/state.js","./style.js":"/node_modules/jshint/src/style.js","./vars.js":"/node_modules/jshint/src/vars.js","events":"/node_modules/browserify/node_modules/events/events.js"}],"/node_modules/jshint/src/lex.js":[function(_dereq_,module,exports){
+
+"use strict";
+
+var _ = _dereq_("../lodash");
+var events = _dereq_("events");
+var reg = _dereq_("./reg.js");
+var state = _dereq_("./state.js").state;
+
+var unicodeData = _dereq_("../data/ascii-identifier-data.js");
+var asciiIdentifierStartTable = unicodeData.asciiIdentifierStartTable;
+var asciiIdentifierPartTable = unicodeData.asciiIdentifierPartTable;
+
+var Token = {
+ Identifier: 1,
+ Punctuator: 2,
+ NumericLiteral: 3,
+ StringLiteral: 4,
+ Comment: 5,
+ Keyword: 6,
+ NullLiteral: 7,
+ BooleanLiteral: 8,
+ RegExp: 9,
+ TemplateHead: 10,
+ TemplateMiddle: 11,
+ TemplateTail: 12,
+ NoSubstTemplate: 13
+};
+
+var Context = {
+ Block: 1,
+ Template: 2
+};
+
+function asyncTrigger() {
+ var _checks = [];
+
+ return {
+ push: function(fn) {
+ _checks.push(fn);
+ },
+
+ check: function() {
+ for (var check = 0; check < _checks.length; ++check) {
+ _checks[check]();
+ }
+
+ _checks.splice(0, _checks.length);
+ }
+ };
+}
+function Lexer(source) {
+ var lines = source;
+
+ if (typeof lines === "string") {
+ lines = lines
+ .replace(/\r\n/g, "\n")
+ .replace(/\r/g, "\n")
+ .split("\n");
+ }
+
+ if (lines[0] && lines[0].substr(0, 2) === "#!") {
+ if (lines[0].indexOf("node") !== -1) {
+ state.option.node = true;
+ }
+ lines[0] = "";
+ }
+
+ this.emitter = new events.EventEmitter();
+ this.source = source;
+ this.setLines(lines);
+ this.prereg = true;
+
+ this.line = 0;
+ this.char = 1;
+ this.from = 1;
+ this.input = "";
+ this.inComment = false;
+ this.context = [];
+ this.templateStarts = [];
+
+ for (var i = 0; i < state.option.indent; i += 1) {
+ state.tab += " ";
+ }
+ this.ignoreLinterErrors = false;
+}
+
+Lexer.prototype = {
+ _lines: [],
+
+ inContext: function(ctxType) {
+ return this.context.length > 0 && this.context[this.context.length - 1].type === ctxType;
+ },
+
+ pushContext: function(ctxType) {
+ this.context.push({ type: ctxType });
+ },
+
+ popContext: function() {
+ return this.context.pop();
+ },
+
+ isContext: function(context) {
+ return this.context.length > 0 && this.context[this.context.length - 1] === context;
+ },
+
+ currentContext: function() {
+ return this.context.length > 0 && this.context[this.context.length - 1];
+ },
+
+ getLines: function() {
+ this._lines = state.lines;
+ return this._lines;
+ },
+
+ setLines: function(val) {
+ this._lines = val;
+ state.lines = this._lines;
+ },
+ peek: function(i) {
+ return this.input.charAt(i || 0);
+ },
+ skip: function(i) {
+ i = i || 1;
+ this.char += i;
+ this.input = this.input.slice(i);
+ },
+ on: function(names, listener) {
+ names.split(" ").forEach(function(name) {
+ this.emitter.on(name, listener);
+ }.bind(this));
+ },
+ trigger: function() {
+ this.emitter.emit.apply(this.emitter, Array.prototype.slice.call(arguments));
+ },
+ triggerAsync: function(type, args, checks, fn) {
+ checks.push(function() {
+ if (fn()) {
+ this.trigger(type, args);
+ }
+ }.bind(this));
+ },
+ scanPunctuator: function() {
+ var ch1 = this.peek();
+ var ch2, ch3, ch4;
+
+ switch (ch1) {
+ case ".":
+ if ((/^[0-9]$/).test(this.peek(1))) {
+ return null;
+ }
+ if (this.peek(1) === "." && this.peek(2) === ".") {
+ return {
+ type: Token.Punctuator,
+ value: "..."
+ };
+ }
+ case "(":
+ case ")":
+ case ";":
+ case ",":
+ case "[":
+ case "]":
+ case ":":
+ case "~":
+ case "?":
+ return {
+ type: Token.Punctuator,
+ value: ch1
+ };
+ case "{":
+ this.pushContext(Context.Block);
+ return {
+ type: Token.Punctuator,
+ value: ch1
+ };
+ case "}":
+ if (this.inContext(Context.Block)) {
+ this.popContext();
+ }
+ return {
+ type: Token.Punctuator,
+ value: ch1
+ };
+ case "#":
+ return {
+ type: Token.Punctuator,
+ value: ch1
+ };
+ case "":
+ return null;
+ }
+
+ ch2 = this.peek(1);
+ ch3 = this.peek(2);
+ ch4 = this.peek(3);
+
+ if (ch1 === ">" && ch2 === ">" && ch3 === ">" && ch4 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: ">>>="
+ };
+ }
+
+ if (ch1 === "=" && ch2 === "=" && ch3 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: "==="
+ };
+ }
+
+ if (ch1 === "!" && ch2 === "=" && ch3 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: "!=="
+ };
+ }
+
+ if (ch1 === ">" && ch2 === ">" && ch3 === ">") {
+ return {
+ type: Token.Punctuator,
+ value: ">>>"
+ };
+ }
+
+ if (ch1 === "<" && ch2 === "<" && ch3 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: "<<="
+ };
+ }
+
+ if (ch1 === ">" && ch2 === ">" && ch3 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: ">>="
+ };
+ }
+ if (ch1 === "=" && ch2 === ">") {
+ return {
+ type: Token.Punctuator,
+ value: ch1 + ch2
+ };
+ }
+ if (ch1 === ch2 && ("+-<>&|".indexOf(ch1) >= 0)) {
+ return {
+ type: Token.Punctuator,
+ value: ch1 + ch2
+ };
+ }
+
+ if ("<>=!+-*%&|^".indexOf(ch1) >= 0) {
+ if (ch2 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: ch1 + ch2
+ };
+ }
+
+ return {
+ type: Token.Punctuator,
+ value: ch1
+ };
+ }
+
+ if (ch1 === "/") {
+ if (ch2 === "=") {
+ return {
+ type: Token.Punctuator,
+ value: "/="
+ };
+ }
+
+ return {
+ type: Token.Punctuator,
+ value: "/"
+ };
+ }
+
+ return null;
+ },
+ scanComments: function() {
+ var ch1 = this.peek();
+ var ch2 = this.peek(1);
+ var rest = this.input.substr(2);
+ var startLine = this.line;
+ var startChar = this.char;
+ var self = this;
+
+ function commentToken(label, body, opt) {
+ var special = ["jshint", "jslint", "members", "member", "globals", "global", "exported"];
+ var isSpecial = false;
+ var value = label + body;
+ var commentType = "plain";
+ opt = opt || {};
+
+ if (opt.isMultiline) {
+ value += "*/";
+ }
+
+ body = body.replace(/\n/g, " ");
+
+ if (label === "/*" && reg.fallsThrough.test(body)) {
+ isSpecial = true;
+ commentType = "falls through";
+ }
+
+ special.forEach(function(str) {
+ if (isSpecial) {
+ return;
+ }
+ if (label === "//" && str !== "jshint") {
+ return;
+ }
+
+ if (body.charAt(str.length) === " " && body.substr(0, str.length) === str) {
+ isSpecial = true;
+ label = label + str;
+ body = body.substr(str.length);
+ }
+
+ if (!isSpecial && body.charAt(0) === " " && body.charAt(str.length + 1) === " " &&
+ body.substr(1, str.length) === str) {
+ isSpecial = true;
+ label = label + " " + str;
+ body = body.substr(str.length + 1);
+ }
+
+ if (!isSpecial) {
+ return;
+ }
+
+ switch (str) {
+ case "member":
+ commentType = "members";
+ break;
+ case "global":
+ commentType = "globals";
+ break;
+ default:
+ var options = body.split(":").map(function(v) {
+ return v.replace(/^\s+/, "").replace(/\s+$/, "");
+ });
+
+ if (options.length === 2) {
+ switch (options[0]) {
+ case "ignore":
+ switch (options[1]) {
+ case "start":
+ self.ignoringLinterErrors = true;
+ isSpecial = false;
+ break;
+ case "end":
+ self.ignoringLinterErrors = false;
+ isSpecial = false;
+ break;
+ }
+ }
+ }
+
+ commentType = str;
+ }
+ });
+
+ return {
+ type: Token.Comment,
+ commentType: commentType,
+ value: value,
+ body: body,
+ isSpecial: isSpecial,
+ isMultiline: opt.isMultiline || false,
+ isMalformed: opt.isMalformed || false
+ };
+ }
+ if (ch1 === "*" && ch2 === "/") {
+ this.trigger("error", {
+ code: "E018",
+ line: startLine,
+ character: startChar
+ });
+
+ this.skip(2);
+ return null;
+ }
+ if (ch1 !== "/" || (ch2 !== "*" && ch2 !== "/")) {
+ return null;
+ }
+ if (ch2 === "/") {
+ this.skip(this.input.length); // Skip to the EOL.
+ return commentToken("//", rest);
+ }
+
+ var body = "";
+ if (ch2 === "*") {
+ this.inComment = true;
+ this.skip(2);
+
+ while (this.peek() !== "*" || this.peek(1) !== "/") {
+ if (this.peek() === "") { // End of Line
+ body += "\n";
+ if (!this.nextLine()) {
+ this.trigger("error", {
+ code: "E017",
+ line: startLine,
+ character: startChar
+ });
+
+ this.inComment = false;
+ return commentToken("/*", body, {
+ isMultiline: true,
+ isMalformed: true
+ });
+ }
+ } else {
+ body += this.peek();
+ this.skip();
+ }
+ }
+
+ this.skip(2);
+ this.inComment = false;
+ return commentToken("/*", body, { isMultiline: true });
+ }
+ },
+ scanKeyword: function() {
+ var result = /^[a-zA-Z_$][a-zA-Z0-9_$]*/.exec(this.input);
+ var keywords = [
+ "if", "in", "do", "var", "for", "new",
+ "try", "let", "this", "else", "case",
+ "void", "with", "enum", "while", "break",
+ "catch", "throw", "const", "yield", "class",
+ "super", "return", "typeof", "delete",
+ "switch", "export", "import", "default",
+ "finally", "extends", "function", "continue",
+ "debugger", "instanceof"
+ ];
+
+ if (result && keywords.indexOf(result[0]) >= 0) {
+ return {
+ type: Token.Keyword,
+ value: result[0]
+ };
+ }
+
+ return null;
+ },
+ scanIdentifier: function() {
+ var id = "";
+ var index = 0;
+ var type, char;
+
+ function isNonAsciiIdentifierStart(code) {
+ return code > 256;
+ }
+
+ function isNonAsciiIdentifierPart(code) {
+ return code > 256;
+ }
+
+ function isHexDigit(str) {
+ return (/^[0-9a-fA-F]$/).test(str);
+ }
+
+ var readUnicodeEscapeSequence = function() {
+ index += 1;
+
+ if (this.peek(index) !== "u") {
+ return null;
+ }
+
+ var ch1 = this.peek(index + 1);
+ var ch2 = this.peek(index + 2);
+ var ch3 = this.peek(index + 3);
+ var ch4 = this.peek(index + 4);
+ var code;
+
+ if (isHexDigit(ch1) && isHexDigit(ch2) && isHexDigit(ch3) && isHexDigit(ch4)) {
+ code = parseInt(ch1 + ch2 + ch3 + ch4, 16);
+
+ if (asciiIdentifierPartTable[code] || isNonAsciiIdentifierPart(code)) {
+ index += 5;
+ return "\\u" + ch1 + ch2 + ch3 + ch4;
+ }
+
+ return null;
+ }
+
+ return null;
+ }.bind(this);
+
+ var getIdentifierStart = function() {
+ var chr = this.peek(index);
+ var code = chr.charCodeAt(0);
+
+ if (code === 92) {
+ return readUnicodeEscapeSequence();
+ }
+
+ if (code < 128) {
+ if (asciiIdentifierStartTable[code]) {
+ index += 1;
+ return chr;
+ }
+
+ return null;
+ }
+
+ if (isNonAsciiIdentifierStart(code)) {
+ index += 1;
+ return chr;
+ }
+
+ return null;
+ }.bind(this);
+
+ var getIdentifierPart = function() {
+ var chr = this.peek(index);
+ var code = chr.charCodeAt(0);
+
+ if (code === 92) {
+ return readUnicodeEscapeSequence();
+ }
+
+ if (code < 128) {
+ if (asciiIdentifierPartTable[code]) {
+ index += 1;
+ return chr;
+ }
+
+ return null;
+ }
+
+ if (isNonAsciiIdentifierPart(code)) {
+ index += 1;
+ return chr;
+ }
+
+ return null;
+ }.bind(this);
+
+ function removeEscapeSequences(id) {
+ return id.replace(/\\u([0-9a-fA-F]{4})/g, function(m0, codepoint) {
+ return String.fromCharCode(parseInt(codepoint, 16));
+ });
+ }
+
+ char = getIdentifierStart();
+ if (char === null) {
+ return null;
+ }
+
+ id = char;
+ for (;;) {
+ char = getIdentifierPart();
+
+ if (char === null) {
+ break;
+ }
+
+ id += char;
+ }
+
+ switch (id) {
+ case "true":
+ case "false":
+ type = Token.BooleanLiteral;
+ break;
+ case "null":
+ type = Token.NullLiteral;
+ break;
+ default:
+ type = Token.Identifier;
+ }
+
+ return {
+ type: type,
+ value: removeEscapeSequences(id),
+ text: id,
+ tokenLength: id.length
+ };
+ },
+ scanNumericLiteral: function() {
+ var index = 0;
+ var value = "";
+ var length = this.input.length;
+ var char = this.peek(index);
+ var bad;
+ var isAllowedDigit = isDecimalDigit;
+ var base = 10;
+ var isLegacy = false;
+
+ function isDecimalDigit(str) {
+ return (/^[0-9]$/).test(str);
+ }
+
+ function isOctalDigit(str) {
+ return (/^[0-7]$/).test(str);
+ }
+
+ function isBinaryDigit(str) {
+ return (/^[01]$/).test(str);
+ }
+
+ function isHexDigit(str) {
+ return (/^[0-9a-fA-F]$/).test(str);
+ }
+
+ function isIdentifierStart(ch) {
+ return (ch === "$") || (ch === "_") || (ch === "\\") ||
+ (ch >= "a" && ch <= "z") || (ch >= "A" && ch <= "Z");
+ }
+
+ if (char !== "." && !isDecimalDigit(char)) {
+ return null;
+ }
+
+ if (char !== ".") {
+ value = this.peek(index);
+ index += 1;
+ char = this.peek(index);
+
+ if (value === "0") {
+ if (char === "x" || char === "X") {
+ isAllowedDigit = isHexDigit;
+ base = 16;
+
+ index += 1;
+ value += char;
+ }
+ if (char === "o" || char === "O") {
+ isAllowedDigit = isOctalDigit;
+ base = 8;
+
+ if (!state.inES6(true)) {
+ this.trigger("warning", {
+ code: "W119",
+ line: this.line,
+ character: this.char,
+ data: [ "Octal integer literal", "6" ]
+ });
+ }
+
+ index += 1;
+ value += char;
+ }
+ if (char === "b" || char === "B") {
+ isAllowedDigit = isBinaryDigit;
+ base = 2;
+
+ if (!state.inES6(true)) {
+ this.trigger("warning", {
+ code: "W119",
+ line: this.line,
+ character: this.char,
+ data: [ "Binary integer literal", "6" ]
+ });
+ }
+
+ index += 1;
+ value += char;
+ }
+ if (isOctalDigit(char)) {
+ isAllowedDigit = isOctalDigit;
+ base = 8;
+ isLegacy = true;
+ bad = false;
+
+ index += 1;
+ value += char;
+ }
+
+ if (!isOctalDigit(char) && isDecimalDigit(char)) {
+ index += 1;
+ value += char;
+ }
+ }
+
+ while (index < length) {
+ char = this.peek(index);
+
+ if (isLegacy && isDecimalDigit(char)) {
+ bad = true;
+ } else if (!isAllowedDigit(char)) {
+ break;
+ }
+ value += char;
+ index += 1;
+ }
+
+ if (isAllowedDigit !== isDecimalDigit) {
+ if (!isLegacy && value.length <= 2) { // 0x
+ return {
+ type: Token.NumericLiteral,
+ value: value,
+ isMalformed: true
+ };
+ }
+
+ if (index < length) {
+ char = this.peek(index);
+ if (isIdentifierStart(char)) {
+ return null;
+ }
+ }
+
+ return {
+ type: Token.NumericLiteral,
+ value: value,
+ base: base,
+ isLegacy: isLegacy,
+ isMalformed: false
+ };
+ }
+ }
+
+ if (char === ".") {
+ value += char;
+ index += 1;
+
+ while (index < length) {
+ char = this.peek(index);
+ if (!isDecimalDigit(char)) {
+ break;
+ }
+ value += char;
+ index += 1;
+ }
+ }
+
+ if (char === "e" || char === "E") {
+ value += char;
+ index += 1;
+ char = this.peek(index);
+
+ if (char === "+" || char === "-") {
+ value += this.peek(index);
+ index += 1;
+ }
+
+ char = this.peek(index);
+ if (isDecimalDigit(char)) {
+ value += char;
+ index += 1;
+
+ while (index < length) {
+ char = this.peek(index);
+ if (!isDecimalDigit(char)) {
+ break;
+ }
+ value += char;
+ index += 1;
+ }
+ } else {
+ return null;
+ }
+ }
+
+ if (index < length) {
+ char = this.peek(index);
+ if (isIdentifierStart(char)) {
+ return null;
+ }
+ }
+
+ return {
+ type: Token.NumericLiteral,
+ value: value,
+ base: base,
+ isMalformed: !isFinite(value)
+ };
+ },
+ scanEscapeSequence: function(checks) {
+ var allowNewLine = false;
+ var jump = 1;
+ this.skip();
+ var char = this.peek();
+
+ switch (char) {
+ case "'":
+ this.triggerAsync("warning", {
+ code: "W114",
+ line: this.line,
+ character: this.char,
+ data: [ "\\'" ]
+ }, checks, function() {return state.jsonMode; });
+ break;
+ case "b":
+ char = "\\b";
+ break;
+ case "f":
+ char = "\\f";
+ break;
+ case "n":
+ char = "\\n";
+ break;
+ case "r":
+ char = "\\r";
+ break;
+ case "t":
+ char = "\\t";
+ break;
+ case "0":
+ char = "\\0";
+ var n = parseInt(this.peek(1), 10);
+ this.triggerAsync("warning", {
+ code: "W115",
+ line: this.line,
+ character: this.char
+ }, checks,
+ function() { return n >= 0 && n <= 7 && state.isStrict(); });
+ break;
+ case "u":
+ var hexCode = this.input.substr(1, 4);
+ var code = parseInt(hexCode, 16);
+ if (isNaN(code)) {
+ this.trigger("warning", {
+ code: "W052",
+ line: this.line,
+ character: this.char,
+ data: [ "u" + hexCode ]
+ });
+ }
+ char = String.fromCharCode(code);
+ jump = 5;
+ break;
+ case "v":
+ this.triggerAsync("warning", {
+ code: "W114",
+ line: this.line,
+ character: this.char,
+ data: [ "\\v" ]
+ }, checks, function() { return state.jsonMode; });
+
+ char = "\v";
+ break;
+ case "x":
+ var x = parseInt(this.input.substr(1, 2), 16);
+
+ this.triggerAsync("warning", {
+ code: "W114",
+ line: this.line,
+ character: this.char,
+ data: [ "\\x-" ]
+ }, checks, function() { return state.jsonMode; });
+
+ char = String.fromCharCode(x);
+ jump = 3;
+ break;
+ case "\\":
+ char = "\\\\";
+ break;
+ case "\"":
+ char = "\\\"";
+ break;
+ case "/":
+ break;
+ case "":
+ allowNewLine = true;
+ char = "";
+ break;
+ }
+
+ return { char: char, jump: jump, allowNewLine: allowNewLine };
+ },
+ scanTemplateLiteral: function(checks) {
+ var tokenType;
+ var value = "";
+ var ch;
+ var startLine = this.line;
+ var startChar = this.char;
+ var depth = this.templateStarts.length;
+
+ if (!state.inES6(true)) {
+ return null;
+ } else if (this.peek() === "`") {
+ tokenType = Token.TemplateHead;
+ this.templateStarts.push({ line: this.line, char: this.char });
+ depth = this.templateStarts.length;
+ this.skip(1);
+ this.pushContext(Context.Template);
+ } else if (this.inContext(Context.Template) && this.peek() === "}") {
+ tokenType = Token.TemplateMiddle;
+ } else {
+ return null;
+ }
+
+ while (this.peek() !== "`") {
+ while ((ch = this.peek()) === "") {
+ value += "\n";
+ if (!this.nextLine()) {
+ var startPos = this.templateStarts.pop();
+ this.trigger("error", {
+ code: "E052",
+ line: startPos.line,
+ character: startPos.char
+ });
+ return {
+ type: tokenType,
+ value: value,
+ startLine: startLine,
+ startChar: startChar,
+ isUnclosed: true,
+ depth: depth,
+ context: this.popContext()
+ };
+ }
+ }
+
+ if (ch === '$' && this.peek(1) === '{') {
+ value += '${';
+ this.skip(2);
+ return {
+ type: tokenType,
+ value: value,
+ startLine: startLine,
+ startChar: startChar,
+ isUnclosed: false,
+ depth: depth,
+ context: this.currentContext()
+ };
+ } else if (ch === '\\') {
+ var escape = this.scanEscapeSequence(checks);
+ value += escape.char;
+ this.skip(escape.jump);
+ } else if (ch !== '`') {
+ value += ch;
+ this.skip(1);
+ }
+ }
+ tokenType = tokenType === Token.TemplateHead ? Token.NoSubstTemplate : Token.TemplateTail;
+ this.skip(1);
+ this.templateStarts.pop();
+
+ return {
+ type: tokenType,
+ value: value,
+ startLine: startLine,
+ startChar: startChar,
+ isUnclosed: false,
+ depth: depth,
+ context: this.popContext()
+ };
+ },
+ scanStringLiteral: function(checks) {
+ var quote = this.peek();
+ if (quote !== "\"" && quote !== "'") {
+ return null;
+ }
+ this.triggerAsync("warning", {
+ code: "W108",
+ line: this.line,
+ character: this.char // +1?
+ }, checks, function() { return state.jsonMode && quote !== "\""; });
+
+ var value = "";
+ var startLine = this.line;
+ var startChar = this.char;
+ var allowNewLine = false;
+
+ this.skip();
+
+ while (this.peek() !== quote) {
+ if (this.peek() === "") { // End Of Line
+
+ if (!allowNewLine) {
+ this.trigger("warning", {
+ code: "W112",
+ line: this.line,
+ character: this.char
+ });
+ } else {
+ allowNewLine = false;
+
+ this.triggerAsync("warning", {
+ code: "W043",
+ line: this.line,
+ character: this.char
+ }, checks, function() { return !state.option.multistr; });
+
+ this.triggerAsync("warning", {
+ code: "W042",
+ line: this.line,
+ character: this.char
+ }, checks, function() { return state.jsonMode && state.option.multistr; });
+ }
+
+ if (!this.nextLine()) {
+ this.trigger("error", {
+ code: "E029",
+ line: startLine,
+ character: startChar
+ });
+
+ return {
+ type: Token.StringLiteral,
+ value: value,
+ startLine: startLine,
+ startChar: startChar,
+ isUnclosed: true,
+ quote: quote
+ };
+ }
+
+ } else { // Any character other than End Of Line
+
+ allowNewLine = false;
+ var char = this.peek();
+ var jump = 1; // A length of a jump, after we're done
+
+ if (char < " ") {
+ this.trigger("warning", {
+ code: "W113",
+ line: this.line,
+ character: this.char,
+ data: [ "<non-printable>" ]
+ });
+ }
+ if (char === "\\") {
+ var parsed = this.scanEscapeSequence(checks);
+ char = parsed.char;
+ jump = parsed.jump;
+ allowNewLine = parsed.allowNewLine;
+ }
+
+ value += char;
+ this.skip(jump);
+ }
+ }
+
+ this.skip();
+ return {
+ type: Token.StringLiteral,
+ value: value,
+ startLine: startLine,
+ startChar: startChar,
+ isUnclosed: false,
+ quote: quote
+ };
+ },
+ scanRegExp: function() {
+ var index = 0;
+ var length = this.input.length;
+ var char = this.peek();
+ var value = char;
+ var body = "";
+ var flags = [];
+ var malformed = false;
+ var isCharSet = false;
+ var terminated;
+
+ var scanUnexpectedChars = function() {
+ if (char < " ") {
+ malformed = true;
+ this.trigger("warning", {
+ code: "W048",
+ line: this.line,
+ character: this.char
+ });
+ }
+ if (char === "<") {
+ malformed = true;
+ this.trigger("warning", {
+ code: "W049",
+ line: this.line,
+ character: this.char,
+ data: [ char ]
+ });
+ }
+ }.bind(this);
+ if (!this.prereg || char !== "/") {
+ return null;
+ }
+
+ index += 1;
+ terminated = false;
+
+ while (index < length) {
+ char = this.peek(index);
+ value += char;
+ body += char;
+
+ if (isCharSet) {
+ if (char === "]") {
+ if (this.peek(index - 1) !== "\\" || this.peek(index - 2) === "\\") {
+ isCharSet = false;
+ }
+ }
+
+ if (char === "\\") {
+ index += 1;
+ char = this.peek(index);
+ body += char;
+ value += char;
+
+ scanUnexpectedChars();
+ }
+
+ index += 1;
+ continue;
+ }
+
+ if (char === "\\") {
+ index += 1;
+ char = this.peek(index);
+ body += char;
+ value += char;
+
+ scanUnexpectedChars();
+
+ if (char === "/") {
+ index += 1;
+ continue;
+ }
+
+ if (char === "[") {
+ index += 1;
+ continue;
+ }
+ }
+
+ if (char === "[") {
+ isCharSet = true;
+ index += 1;
+ continue;
+ }
+
+ if (char === "/") {
+ body = body.substr(0, body.length - 1);
+ terminated = true;
+ index += 1;
+ break;
+ }
+
+ index += 1;
+ }
+
+ if (!terminated) {
+ this.trigger("error", {
+ code: "E015",
+ line: this.line,
+ character: this.from
+ });
+
+ return void this.trigger("fatal", {
+ line: this.line,
+ from: this.from
+ });
+ }
+
+ while (index < length) {
+ char = this.peek(index);
+ if (!/[gim]/.test(char)) {
+ break;
+ }
+ flags.push(char);
+ value += char;
+ index += 1;
+ }
+
+ try {
+ new RegExp(body, flags.join(""));
+ } catch (err) {
+ malformed = true;
+ this.trigger("error", {
+ code: "E016",
+ line: this.line,
+ character: this.char,
+ data: [ err.message ] // Platform dependent!
+ });
+ }
+
+ return {
+ type: Token.RegExp,
+ value: value,
+ flags: flags,
+ isMalformed: malformed
+ };
+ },
+ scanNonBreakingSpaces: function() {
+ return state.option.nonbsp ?
+ this.input.search(/(\u00A0)/) : -1;
+ },
+ scanUnsafeChars: function() {
+ return this.input.search(reg.unsafeChars);
+ },
+ next: function(checks) {
+ this.from = this.char;
+ var start;
+ if (/\s/.test(this.peek())) {
+ start = this.char;
+
+ while (/\s/.test(this.peek())) {
+ this.from += 1;
+ this.skip();
+ }
+ }
+
+ var match = this.scanComments() ||
+ this.scanStringLiteral(checks) ||
+ this.scanTemplateLiteral(checks);
+
+ if (match) {
+ return match;
+ }
+
+ match =
+ this.scanRegExp() ||
+ this.scanPunctuator() ||
+ this.scanKeyword() ||
+ this.scanIdentifier() ||
+ this.scanNumericLiteral();
+
+ if (match) {
+ this.skip(match.tokenLength || match.value.length);
+ return match;
+ }
+
+ return null;
+ },
+ nextLine: function() {
+ var char;
+
+ if (this.line >= this.getLines().length) {
+ return false;
+ }
+
+ this.input = this.getLines()[this.line];
+ this.line += 1;
+ this.char = 1;
+ this.from = 1;
+
+ var inputTrimmed = this.input.trim();
+
+ var startsWith = function() {
+ return _.some(arguments, function(prefix) {
+ return inputTrimmed.indexOf(prefix) === 0;
+ });
+ };
+
+ var endsWith = function() {
+ return _.some(arguments, function(suffix) {
+ return inputTrimmed.indexOf(suffix, inputTrimmed.length - suffix.length) !== -1;
+ });
+ };
+ if (this.ignoringLinterErrors === true) {
+ if (!startsWith("/*", "//") && !(this.inComment && endsWith("*/"))) {
+ this.input = "";
+ }
+ }
+
+ char = this.scanNonBreakingSpaces();
+ if (char >= 0) {
+ this.trigger("warning", { code: "W125", line: this.line, character: char + 1 });
+ }
+
+ this.input = this.input.replace(/\t/g, state.tab);
+ char = this.scanUnsafeChars();
+
+ if (char >= 0) {
+ this.trigger("warning", { code: "W100", line: this.line, character: char });
+ }
+
+ if (!this.ignoringLinterErrors && state.option.maxlen &&
+ state.option.maxlen < this.input.length) {
+ var inComment = this.inComment ||
+ startsWith.call(inputTrimmed, "//") ||
+ startsWith.call(inputTrimmed, "/*");
+
+ var shouldTriggerError = !inComment || !reg.maxlenException.test(inputTrimmed);
+
+ if (shouldTriggerError) {
+ this.trigger("warning", { code: "W101", line: this.line, character: this.input.length });
+ }
+ }
+
+ return true;
+ },
+ start: function() {
+ this.nextLine();
+ },
+ token: function() {
+ var checks = asyncTrigger();
+ var token;
+
+
+ function isReserved(token, isProperty) {
+ if (!token.reserved) {
+ return false;
+ }
+ var meta = token.meta;
+
+ if (meta && meta.isFutureReservedWord && state.inES5()) {
+ if (!meta.es5) {
+ return false;
+ }
+ if (meta.strictOnly) {
+ if (!state.option.strict && !state.isStrict()) {
+ return false;
+ }
+ }
+
+ if (isProperty) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+ var create = function(type, value, isProperty, token) {
+ var obj;
+
+ if (type !== "(endline)" && type !== "(end)") {
+ this.prereg = false;
+ }
+
+ if (type === "(punctuator)") {
+ switch (value) {
+ case ".":
+ case ")":
+ case "~":
+ case "#":
+ case "]":
+ case "++":
+ case "--":
+ this.prereg = false;
+ break;
+ default:
+ this.prereg = true;
+ }
+
+ obj = Object.create(state.syntax[value] || state.syntax["(error)"]);
+ }
+
+ if (type === "(identifier)") {
+ if (value === "return" || value === "case" || value === "typeof") {
+ this.prereg = true;
+ }
+
+ if (_.has(state.syntax, value)) {
+ obj = Object.create(state.syntax[value] || state.syntax["(error)"]);
+ if (!isReserved(obj, isProperty && type === "(identifier)")) {
+ obj = null;
+ }
+ }
+ }
+
+ if (!obj) {
+ obj = Object.create(state.syntax[type]);
+ }
+
+ obj.identifier = (type === "(identifier)");
+ obj.type = obj.type || type;
+ obj.value = value;
+ obj.line = this.line;
+ obj.character = this.char;
+ obj.from = this.from;
+ if (obj.identifier && token) obj.raw_text = token.text || token.value;
+ if (token && token.startLine && token.startLine !== this.line) {
+ obj.startLine = token.startLine;
+ }
+ if (token && token.context) {
+ obj.context = token.context;
+ }
+ if (token && token.depth) {
+ obj.depth = token.depth;
+ }
+ if (token && token.isUnclosed) {
+ obj.isUnclosed = token.isUnclosed;
+ }
+
+ if (isProperty && obj.identifier) {
+ obj.isProperty = isProperty;
+ }
+
+ obj.check = checks.check;
+
+ return obj;
+ }.bind(this);
+
+ for (;;) {
+ if (!this.input.length) {
+ if (this.nextLine()) {
+ return create("(endline)", "");
+ }
+
+ if (this.exhausted) {
+ return null;
+ }
+
+ this.exhausted = true;
+ return create("(end)", "");
+ }
+
+ token = this.next(checks);
+
+ if (!token) {
+ if (this.input.length) {
+ this.trigger("error", {
+ code: "E024",
+ line: this.line,
+ character: this.char,
+ data: [ this.peek() ]
+ });
+
+ this.input = "";
+ }
+
+ continue;
+ }
+
+ switch (token.type) {
+ case Token.StringLiteral:
+ this.triggerAsync("String", {
+ line: this.line,
+ char: this.char,
+ from: this.from,
+ startLine: token.startLine,
+ startChar: token.startChar,
+ value: token.value,
+ quote: token.quote
+ }, checks, function() { return true; });
+
+ return create("(string)", token.value, null, token);
+
+ case Token.TemplateHead:
+ this.trigger("TemplateHead", {
+ line: this.line,
+ char: this.char,
+ from: this.from,
+ startLine: token.startLine,
+ startChar: token.startChar,
+ value: token.value
+ });
+ return create("(template)", token.value, null, token);
+
+ case Token.TemplateMiddle:
+ this.trigger("TemplateMiddle", {
+ line: this.line,
+ char: this.char,
+ from: this.from,
+ startLine: token.startLine,
+ startChar: token.startChar,
+ value: token.value
+ });
+ return create("(template middle)", token.value, null, token);
+
+ case Token.TemplateTail:
+ this.trigger("TemplateTail", {
+ line: this.line,
+ char: this.char,
+ from: this.from,
+ startLine: token.startLine,
+ startChar: token.startChar,
+ value: token.value
+ });
+ return create("(template tail)", token.value, null, token);
+
+ case Token.NoSubstTemplate:
+ this.trigger("NoSubstTemplate", {
+ line: this.line,
+ char: this.char,
+ from: this.from,
+ startLine: token.startLine,
+ startChar: token.startChar,
+ value: token.value
+ });
+ return create("(no subst template)", token.value, null, token);
+
+ case Token.Identifier:
+ this.triggerAsync("Identifier", {
+ line: this.line,
+ char: this.char,
+ from: this.form,
+ name: token.value,
+ raw_name: token.text,
+ isProperty: state.tokens.curr.id === "."
+ }, checks, function() { return true; });
+ case Token.Keyword:
+ case Token.NullLiteral:
+ case Token.BooleanLiteral:
+ return create("(identifier)", token.value, state.tokens.curr.id === ".", token);
+
+ case Token.NumericLiteral:
+ if (token.isMalformed) {
+ this.trigger("warning", {
+ code: "W045",
+ line: this.line,
+ character: this.char,
+ data: [ token.value ]
+ });
+ }
+
+ this.triggerAsync("warning", {
+ code: "W114",
+ line: this.line,
+ character: this.char,
+ data: [ "0x-" ]
+ }, checks, function() { return token.base === 16 && state.jsonMode; });
+
+ this.triggerAsync("warning", {
+ code: "W115",
+ line: this.line,
+ character: this.char
+ }, checks, function() {
+ return state.isStrict() && token.base === 8 && token.isLegacy;
+ });
+
+ this.trigger("Number", {
+ line: this.line,
+ char: this.char,
+ from: this.from,
+ value: token.value,
+ base: token.base,
+ isMalformed: token.malformed
+ });
+
+ return create("(number)", token.value);
+
+ case Token.RegExp:
+ return create("(regexp)", token.value);
+
+ case Token.Comment:
+ state.tokens.curr.comment = true;
+
+ if (token.isSpecial) {
+ return {
+ id: '(comment)',
+ value: token.value,
+ body: token.body,
+ type: token.commentType,
+ isSpecial: token.isSpecial,
+ line: this.line,
+ character: this.char,
+ from: this.from
+ };
+ }
+
+ break;
+
+ case "":
+ break;
+
+ default:
+ return create("(punctuator)", token.value);
+ }
+ }
+ }
+};
+
+exports.Lexer = Lexer;
+exports.Context = Context;
+
+},{"../data/ascii-identifier-data.js":"/node_modules/jshint/data/ascii-identifier-data.js","../lodash":"/node_modules/jshint/lodash.js","./reg.js":"/node_modules/jshint/src/reg.js","./state.js":"/node_modules/jshint/src/state.js","events":"/node_modules/browserify/node_modules/events/events.js"}],"/node_modules/jshint/src/messages.js":[function(_dereq_,module,exports){
+"use strict";
+
+var _ = _dereq_("../lodash");
+
+var errors = {
+ E001: "Bad option: '{a}'.",
+ E002: "Bad option value.",
+ E003: "Expected a JSON value.",
+ E004: "Input is neither a string nor an array of strings.",
+ E005: "Input is empty.",
+ E006: "Unexpected early end of program.",
+ E007: "Missing \"use strict\" statement.",
+ E008: "Strict violation.",
+ E009: "Option 'validthis' can't be used in a global scope.",
+ E010: "'with' is not allowed in strict mode.",
+ E011: "'{a}' has already been declared.",
+ E012: "const '{a}' is initialized to 'undefined'.",
+ E013: "Attempting to override '{a}' which is a constant.",
+ E014: "A regular expression literal can be confused with '/='.",
+ E015: "Unclosed regular expression.",
+ E016: "Invalid regular expression.",
+ E017: "Unclosed comment.",
+ E018: "Unbegun comment.",
+ E019: "Unmatched '{a}'.",
+ E020: "Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",
+ E021: "Expected '{a}' and instead saw '{b}'.",
+ E022: "Line breaking error '{a}'.",
+ E023: "Missing '{a}'.",
+ E024: "Unexpected '{a}'.",
+ E025: "Missing ':' on a case clause.",
+ E026: "Missing '}' to match '{' from line {a}.",
+ E027: "Missing ']' to match '[' from line {a}.",
+ E028: "Illegal comma.",
+ E029: "Unclosed string.",
+ E030: "Expected an identifier and instead saw '{a}'.",
+ E031: "Bad assignment.", // FIXME: Rephrase
+ E032: "Expected a small integer or 'false' and instead saw '{a}'.",
+ E033: "Expected an operator and instead saw '{a}'.",
+ E034: "get/set are ES5 features.",
+ E035: "Missing property name.",
+ E036: "Expected to see a statement and instead saw a block.",
+ E037: null,
+ E038: null,
+ E039: "Function declarations are not invocable. Wrap the whole function invocation in parens.",
+ E040: "Each value should have its own case label.",
+ E041: "Unrecoverable syntax error.",
+ E042: "Stopping.",
+ E043: "Too many errors.",
+ E044: null,
+ E045: "Invalid for each loop.",
+ E046: "A yield statement shall be within a generator function (with syntax: `function*`)",
+ E047: null,
+ E048: "{a} declaration not directly within block.",
+ E049: "A {a} cannot be named '{b}'.",
+ E050: "Mozilla requires the yield expression to be parenthesized here.",
+ E051: null,
+ E052: "Unclosed template literal.",
+ E053: "Export declaration must be in global scope.",
+ E054: "Class properties must be methods. Expected '(' but instead saw '{a}'.",
+ E055: "The '{a}' option cannot be set after any executable code.",
+ E056: "'{a}' was used before it was declared, which is illegal for '{b}' variables.",
+ E057: "Invalid meta property: '{a}.{b}'.",
+ E058: "Missing semicolon."
+};
+
+var warnings = {
+ W001: "'hasOwnProperty' is a really bad name.",
+ W002: "Value of '{a}' may be overwritten in IE 8 and earlier.",
+ W003: "'{a}' was used before it was defined.",
+ W004: "'{a}' is already defined.",
+ W005: "A dot following a number can be confused with a decimal point.",
+ W006: "Confusing minuses.",
+ W007: "Confusing plusses.",
+ W008: "A leading decimal point can be confused with a dot: '{a}'.",
+ W009: "The array literal notation [] is preferable.",
+ W010: "The object literal notation {} is preferable.",
+ W011: null,
+ W012: null,
+ W013: null,
+ W014: "Bad line breaking before '{a}'.",
+ W015: null,
+ W016: "Unexpected use of '{a}'.",
+ W017: "Bad operand.",
+ W018: "Confusing use of '{a}'.",
+ W019: "Use the isNaN function to compare with NaN.",
+ W020: "Read only.",
+ W021: "Reassignment of '{a}', which is is a {b}. " +
+ "Use 'var' or 'let' to declare bindings that may change.",
+ W022: "Do not assign to the exception parameter.",
+ W023: "Expected an identifier in an assignment and instead saw a function invocation.",
+ W024: "Expected an identifier and instead saw '{a}' (a reserved word).",
+ W025: "Missing name in function declaration.",
+ W026: "Inner functions should be listed at the top of the outer function.",
+ W027: "Unreachable '{a}' after '{b}'.",
+ W028: "Label '{a}' on {b} statement.",
+ W030: "Expected an assignment or function call and instead saw an expression.",
+ W031: "Do not use 'new' for side effects.",
+ W032: "Unnecessary semicolon.",
+ W033: "Missing semicolon.",
+ W034: "Unnecessary directive \"{a}\".",
+ W035: "Empty block.",
+ W036: "Unexpected /*member '{a}'.",
+ W037: "'{a}' is a statement label.",
+ W038: "'{a}' used out of scope.",
+ W039: "'{a}' is not allowed.",
+ W040: "Possible strict violation.",
+ W041: "Use '{a}' to compare with '{b}'.",
+ W042: "Avoid EOL escaping.",
+ W043: "Bad escaping of EOL. Use option multistr if needed.",
+ W044: "Bad or unnecessary escaping.", /* TODO(caitp): remove W044 */
+ W045: "Bad number '{a}'.",
+ W046: "Don't use extra leading zeros '{a}'.",
+ W047: "A trailing decimal point can be confused with a dot: '{a}'.",
+ W048: "Unexpected control character in regular expression.",
+ W049: "Unexpected escaped character '{a}' in regular expression.",
+ W050: "JavaScript URL.",
+ W051: "Variables should not be deleted.",
+ W052: "Unexpected '{a}'.",
+ W053: "Do not use {a} as a constructor.",
+ W054: "The Function constructor is a form of eval.",
+ W055: "A constructor name should start with an uppercase letter.",
+ W056: "Bad constructor.",
+ W057: "Weird construction. Is 'new' necessary?",
+ W058: "Missing '()' invoking a constructor.",
+ W059: "Avoid arguments.{a}.",
+ W060: "document.write can be a form of eval.",
+ W061: "eval can be harmful.",
+ W062: "Wrap an immediate function invocation in parens " +
+ "to assist the reader in understanding that the expression " +
+ "is the result of a function, and not the function itself.",
+ W063: "Math is not a function.",
+ W064: "Missing 'new' prefix when invoking a constructor.",
+ W065: "Missing radix parameter.",
+ W066: "Implied eval. Consider passing a function instead of a string.",
+ W067: "Bad invocation.",
+ W068: "Wrapping non-IIFE function literals in parens is unnecessary.",
+ W069: "['{a}'] is better written in dot notation.",
+ W070: "Extra comma. (it breaks older versions of IE)",
+ W071: "This function has too many statements. ({a})",
+ W072: "This function has too many parameters. ({a})",
+ W073: "Blocks are nested too deeply. ({a})",
+ W074: "This function's cyclomatic complexity is too high. ({a})",
+ W075: "Duplicate {a} '{b}'.",
+ W076: "Unexpected parameter '{a}' in get {b} function.",
+ W077: "Expected a single parameter in set {a} function.",
+ W078: "Setter is defined without getter.",
+ W079: "Redefinition of '{a}'.",
+ W080: "It's not necessary to initialize '{a}' to 'undefined'.",
+ W081: null,
+ W082: "Function declarations should not be placed in blocks. " +
+ "Use a function expression or move the statement to the top of " +
+ "the outer function.",
+ W083: "Don't make functions within a loop.",
+ W084: "Assignment in conditional expression",
+ W085: "Don't use 'with'.",
+ W086: "Expected a 'break' statement before '{a}'.",
+ W087: "Forgotten 'debugger' statement?",
+ W088: "Creating global 'for' variable. Should be 'for (var {a} ...'.",
+ W089: "The body of a for in should be wrapped in an if statement to filter " +
+ "unwanted properties from the prototype.",
+ W090: "'{a}' is not a statement label.",
+ W091: null,
+ W093: "Did you mean to return a conditional instead of an assignment?",
+ W094: "Unexpected comma.",
+ W095: "Expected a string and instead saw {a}.",
+ W096: "The '{a}' key may produce unexpected results.",
+ W097: "Use the function form of \"use strict\".",
+ W098: "'{a}' is defined but never used.",
+ W099: null,
+ W100: "This character may get silently deleted by one or more browsers.",
+ W101: "Line is too long.",
+ W102: null,
+ W103: "The '{a}' property is deprecated.",
+ W104: "'{a}' is available in ES{b} (use 'esversion: {b}') or Mozilla JS extensions (use moz).",
+ W105: "Unexpected {a} in '{b}'.",
+ W106: "Identifier '{a}' is not in camel case.",
+ W107: "Script URL.",
+ W108: "Strings must use doublequote.",
+ W109: "Strings must use singlequote.",
+ W110: "Mixed double and single quotes.",
+ W112: "Unclosed string.",
+ W113: "Control character in string: {a}.",
+ W114: "Avoid {a}.",
+ W115: "Octal literals are not allowed in strict mode.",
+ W116: "Expected '{a}' and instead saw '{b}'.",
+ W117: "'{a}' is not defined.",
+ W118: "'{a}' is only available in Mozilla JavaScript extensions (use moz option).",
+ W119: "'{a}' is only available in ES{b} (use 'esversion: {b}').",
+ W120: "You might be leaking a variable ({a}) here.",
+ W121: "Extending prototype of native object: '{a}'.",
+ W122: "Invalid typeof value '{a}'",
+ W123: "'{a}' is already defined in outer scope.",
+ W124: "A generator function shall contain a yield statement.",
+ W125: "This line contains non-breaking spaces: http://jshint.com/doc/options/#nonbsp",
+ W126: "Unnecessary grouping operator.",
+ W127: "Unexpected use of a comma operator.",
+ W128: "Empty array elements require elision=true.",
+ W129: "'{a}' is defined in a future version of JavaScript. Use a " +
+ "different variable name to avoid migration issues.",
+ W130: "Invalid element after rest element.",
+ W131: "Invalid parameter after rest parameter.",
+ W132: "`var` declarations are forbidden. Use `let` or `const` instead.",
+ W133: "Invalid for-{a} loop left-hand-side: {b}.",
+ W134: "The '{a}' option is only available when linting ECMAScript {b} code.",
+ W135: "{a} may not be supported by non-browser environments.",
+ W136: "'{a}' must be in function scope.",
+ W137: "Empty destructuring.",
+ W138: "Regular parameters should not come after default parameters."
+};
+
+var info = {
+ I001: "Comma warnings can be turned off with 'laxcomma'.",
+ I002: null,
+ I003: "ES5 option is now set per default"
+};
+
+exports.errors = {};
+exports.warnings = {};
+exports.info = {};
+
+_.each(errors, function(desc, code) {
+ exports.errors[code] = { code: code, desc: desc };
+});
+
+_.each(warnings, function(desc, code) {
+ exports.warnings[code] = { code: code, desc: desc };
+});
+
+_.each(info, function(desc, code) {
+ exports.info[code] = { code: code, desc: desc };
+});
+
+},{"../lodash":"/node_modules/jshint/lodash.js"}],"/node_modules/jshint/src/name-stack.js":[function(_dereq_,module,exports){
+"use strict";
+
+function NameStack() {
+ this._stack = [];
+}
+
+Object.defineProperty(NameStack.prototype, "length", {
+ get: function() {
+ return this._stack.length;
+ }
+});
+NameStack.prototype.push = function() {
+ this._stack.push(null);
+};
+NameStack.prototype.pop = function() {
+ this._stack.pop();
+};
+NameStack.prototype.set = function(token) {
+ this._stack[this.length - 1] = token;
+};
+NameStack.prototype.infer = function() {
+ var nameToken = this._stack[this.length - 1];
+ var prefix = "";
+ var type;
+ if (!nameToken || nameToken.type === "class") {
+ nameToken = this._stack[this.length - 2];
+ }
+
+ if (!nameToken) {
+ return "(empty)";
+ }
+
+ type = nameToken.type;
+
+ if (type !== "(string)" && type !== "(number)" && type !== "(identifier)" && type !== "default") {
+ return "(expression)";
+ }
+
+ if (nameToken.accessorType) {
+ prefix = nameToken.accessorType + " ";
+ }
+
+ return prefix + nameToken.value;
+};
+
+module.exports = NameStack;
+
+},{}],"/node_modules/jshint/src/options.js":[function(_dereq_,module,exports){
+"use strict";
+exports.bool = {
+ enforcing: {
+ bitwise : true,
+ freeze : true,
+ camelcase : true,
+ curly : true,
+ eqeqeq : true,
+ futurehostile: true,
+ notypeof : true,
+ es3 : true,
+ es5 : true,
+ forin : true,
+ funcscope : true,
+ immed : true,
+ iterator : true,
+ newcap : true,
+ noarg : true,
+ nocomma : true,
+ noempty : true,
+ nonbsp : true,
+ nonew : true,
+ undef : true,
+ singleGroups: false,
+ varstmt: false,
+ enforceall : false
+ },
+ relaxing: {
+ asi : true,
+ multistr : true,
+ debug : true,
+ boss : true,
+ evil : true,
+ globalstrict: true,
+ plusplus : true,
+ proto : true,
+ scripturl : true,
+ sub : true,
+ supernew : true,
+ laxbreak : true,
+ laxcomma : true,
+ validthis : true,
+ withstmt : true,
+ moz : true,
+ noyield : true,
+ eqnull : true,
+ lastsemic : true,
+ loopfunc : true,
+ expr : true,
+ esnext : true,
+ elision : true,
+ },
+ environments: {
+ mootools : true,
+ couch : true,
+ jasmine : true,
+ jquery : true,
+ node : true,
+ qunit : true,
+ rhino : true,
+ shelljs : true,
+ prototypejs : true,
+ yui : true,
+ mocha : true,
+ module : true,
+ wsh : true,
+ worker : true,
+ nonstandard : true,
+ browser : true,
+ browserify : true,
+ devel : true,
+ dojo : true,
+ typed : true,
+ phantom : true
+ },
+ obsolete: {
+ onecase : true, // if one case switch statements should be allowed
+ regexp : true, // if the . should not be allowed in regexp literals
+ regexdash : true // if unescaped first/last dash (-) inside brackets
+ }
+};
+exports.val = {
+ maxlen : false,
+ indent : false,
+ maxerr : false,
+ predef : false,
+ globals : false,
+ quotmark : false,
+
+ scope : false,
+ maxstatements: false,
+ maxdepth : false,
+ maxparams : false,
+ maxcomplexity: false,
+ shadow : false,
+ strict : true,
+ unused : true,
+ latedef : false,
+
+ ignore : false, // start/end ignoring lines of code, bypassing the lexer
+
+ ignoreDelimiters: false, // array of start/end delimiters used to ignore
+ esversion: 5
+};
+exports.inverted = {
+ bitwise : true,
+ forin : true,
+ newcap : true,
+ plusplus: true,
+ regexp : true,
+ undef : true,
+ eqeqeq : true,
+ strict : true
+};
+
+exports.validNames = Object.keys(exports.val)
+ .concat(Object.keys(exports.bool.relaxing))
+ .concat(Object.keys(exports.bool.enforcing))
+ .concat(Object.keys(exports.bool.obsolete))
+ .concat(Object.keys(exports.bool.environments));
+exports.renamed = {
+ eqeq : "eqeqeq",
+ windows: "wsh",
+ sloppy : "strict"
+};
+
+exports.removed = {
+ nomen: true,
+ onevar: true,
+ passfail: true,
+ white: true,
+ gcl: true,
+ smarttabs: true,
+ trailing: true
+};
+exports.noenforceall = {
+ varstmt: true,
+ strict: true
+};
+
+},{}],"/node_modules/jshint/src/reg.js":[function(_dereq_,module,exports){
+
+"use strict";
+exports.unsafeString =
+ /@cc|<\/?|script|\]\s*\]|<\s*!|&lt/i;
+exports.unsafeChars =
+ /[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
+exports.needEsc =
+ /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/;
+
+exports.needEscGlobal =
+ /[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
+exports.starSlash = /\*\//;
+exports.identifier = /^([a-zA-Z_$][a-zA-Z0-9_$]*)$/;
+exports.javascriptURL = /^(?:javascript|jscript|ecmascript|vbscript|livescript)\s*:/i;
+exports.fallsThrough = /^\s*falls?\sthrough\s*$/;
+exports.maxlenException = /^(?:(?:\/\/|\/\*|\*) ?)?[^ ]+$/;
+
+},{}],"/node_modules/jshint/src/scope-manager.js":[function(_dereq_,module,exports){
+"use strict";
+
+var _ = _dereq_("../lodash");
+var events = _dereq_("events");
+var marker = {};
+var scopeManager = function(state, predefined, exported, declared) {
+
+ var _current;
+ var _scopeStack = [];
+
+ function _newScope(type) {
+ _current = {
+ "(labels)": Object.create(null),
+ "(usages)": Object.create(null),
+ "(breakLabels)": Object.create(null),
+ "(parent)": _current,
+ "(type)": type,
+ "(params)": (type === "functionparams" || type === "catchparams") ? [] : null
+ };
+ _scopeStack.push(_current);
+ }
+
+ _newScope("global");
+ _current["(predefined)"] = predefined;
+
+ var _currentFunctBody = _current; // this is the block after the params = function
+
+ var usedPredefinedAndGlobals = Object.create(null);
+ var impliedGlobals = Object.create(null);
+ var unuseds = [];
+ var emitter = new events.EventEmitter();
+
+ function warning(code, token) {
+ emitter.emit("warning", {
+ code: code,
+ token: token,
+ data: _.slice(arguments, 2)
+ });
+ }
+
+ function error(code, token) {
+ emitter.emit("warning", {
+ code: code,
+ token: token,
+ data: _.slice(arguments, 2)
+ });
+ }
+
+ function _setupUsages(labelName) {
+ if (!_current["(usages)"][labelName]) {
+ _current["(usages)"][labelName] = {
+ "(modified)": [],
+ "(reassigned)": [],
+ "(tokens)": []
+ };
+ }
+ }
+
+ var _getUnusedOption = function(unused_opt) {
+ if (unused_opt === undefined) {
+ unused_opt = state.option.unused;
+ }
+
+ if (unused_opt === true) {
+ unused_opt = "last-param";
+ }
+
+ return unused_opt;
+ };
+
+ var _warnUnused = function(name, tkn, type, unused_opt) {
+ var line = tkn.line;
+ var chr = tkn.from;
+ var raw_name = tkn.raw_text || name;
+
+ unused_opt = _getUnusedOption(unused_opt);
+
+ var warnable_types = {
+ "vars": ["var"],
+ "last-param": ["var", "param"],
+ "strict": ["var", "param", "last-param"]
+ };
+
+ if (unused_opt) {
+ if (warnable_types[unused_opt] && warnable_types[unused_opt].indexOf(type) !== -1) {
+ warning("W098", { line: line, from: chr }, raw_name);
+ }
+ }
+ if (unused_opt || type === "var") {
+ unuseds.push({
+ name: name,
+ line: line,
+ character: chr
+ });
+ }
+ };
+ function _checkForUnused() {
+ if (_current["(type)"] === "functionparams") {
+ _checkParams();
+ return;
+ }
+ var curentLabels = _current["(labels)"];
+ for (var labelName in curentLabels) {
+ if (curentLabels[labelName]) {
+ if (curentLabels[labelName]["(type)"] !== "exception" &&
+ curentLabels[labelName]["(unused)"]) {
+ _warnUnused(labelName, curentLabels[labelName]["(token)"], "var");
+ }
+ }
+ }
+ }
+ function _checkParams() {
+ var params = _current["(params)"];
+
+ if (!params) {
+ return;
+ }
+
+ var param = params.pop();
+ var unused_opt;
+
+ while (param) {
+ var label = _current["(labels)"][param];
+
+ unused_opt = _getUnusedOption(state.funct["(unusedOption)"]);
+ if (param === "undefined")
+ return;
+
+ if (label["(unused)"]) {
+ _warnUnused(param, label["(token)"], "param", state.funct["(unusedOption)"]);
+ } else if (unused_opt === "last-param") {
+ return;
+ }
+
+ param = params.pop();
+ }
+ }
+ function _getLabel(labelName) {
+ for (var i = _scopeStack.length - 1 ; i >= 0; --i) {
+ var scopeLabels = _scopeStack[i]["(labels)"];
+ if (scopeLabels[labelName]) {
+ return scopeLabels;
+ }
+ }
+ }
+
+ function usedSoFarInCurrentFunction(labelName) {
+ for (var i = _scopeStack.length - 1; i >= 0; i--) {
+ var current = _scopeStack[i];
+ if (current["(usages)"][labelName]) {
+ return current["(usages)"][labelName];
+ }
+ if (current === _currentFunctBody) {
+ break;
+ }
+ }
+ return false;
+ }
+
+ function _checkOuterShadow(labelName, token) {
+ if (state.option.shadow !== "outer") {
+ return;
+ }
+
+ var isGlobal = _currentFunctBody["(type)"] === "global",
+ isNewFunction = _current["(type)"] === "functionparams";
+
+ var outsideCurrentFunction = !isGlobal;
+ for (var i = 0; i < _scopeStack.length; i++) {
+ var stackItem = _scopeStack[i];
+
+ if (!isNewFunction && _scopeStack[i + 1] === _currentFunctBody) {
+ outsideCurrentFunction = false;
+ }
+ if (outsideCurrentFunction && stackItem["(labels)"][labelName]) {
+ warning("W123", token, labelName);
+ }
+ if (stackItem["(breakLabels)"][labelName]) {
+ warning("W123", token, labelName);
+ }
+ }
+ }
+
+ function _latedefWarning(type, labelName, token) {
+ if (state.option.latedef) {
+ if ((state.option.latedef === true && type === "function") ||
+ type !== "function") {
+ warning("W003", token, labelName);
+ }
+ }
+ }
+
+ var scopeManagerInst = {
+
+ on: function(names, listener) {
+ names.split(" ").forEach(function(name) {
+ emitter.on(name, listener);
+ });
+ },
+
+ isPredefined: function(labelName) {
+ return !this.has(labelName) && _.has(_scopeStack[0]["(predefined)"], labelName);
+ },
+ stack: function(type) {
+ var previousScope = _current;
+ _newScope(type);
+
+ if (!type && previousScope["(type)"] === "functionparams") {
+
+ _current["(isFuncBody)"] = true;
+ _current["(context)"] = _currentFunctBody;
+ _currentFunctBody = _current;
+ }
+ },
+
+ unstack: function() {
+ var subScope = _scopeStack.length > 1 ? _scopeStack[_scopeStack.length - 2] : null;
+ var isUnstackingFunctionBody = _current === _currentFunctBody,
+ isUnstackingFunctionParams = _current["(type)"] === "functionparams",
+ isUnstackingFunctionOuter = _current["(type)"] === "functionouter";
+
+ var i, j;
+ var currentUsages = _current["(usages)"];
+ var currentLabels = _current["(labels)"];
+ var usedLabelNameList = Object.keys(currentUsages);
+
+ if (currentUsages.__proto__ && usedLabelNameList.indexOf("__proto__") === -1) {
+ usedLabelNameList.push("__proto__");
+ }
+
+ for (i = 0; i < usedLabelNameList.length; i++) {
+ var usedLabelName = usedLabelNameList[i];
+
+ var usage = currentUsages[usedLabelName];
+ var usedLabel = currentLabels[usedLabelName];
+ if (usedLabel) {
+ var usedLabelType = usedLabel["(type)"];
+
+ if (usedLabel["(useOutsideOfScope)"] && !state.option.funcscope) {
+ var usedTokens = usage["(tokens)"];
+ if (usedTokens) {
+ for (j = 0; j < usedTokens.length; j++) {
+ if (usedLabel["(function)"] === usedTokens[j]["(function)"]) {
+ error("W038", usedTokens[j], usedLabelName);
+ }
+ }
+ }
+ }
+ _current["(labels)"][usedLabelName]["(unused)"] = false;
+ if (usedLabelType === "const" && usage["(modified)"]) {
+ for (j = 0; j < usage["(modified)"].length; j++) {
+ error("E013", usage["(modified)"][j], usedLabelName);
+ }
+ }
+ if ((usedLabelType === "function" || usedLabelType === "class") &&
+ usage["(reassigned)"]) {
+ for (j = 0; j < usage["(reassigned)"].length; j++) {
+ error("W021", usage["(reassigned)"][j], usedLabelName, usedLabelType);
+ }
+ }
+ continue;
+ }
+
+ if (isUnstackingFunctionOuter) {
+ state.funct["(isCapturing)"] = true;
+ }
+
+ if (subScope) {
+ if (!subScope["(usages)"][usedLabelName]) {
+ subScope["(usages)"][usedLabelName] = usage;
+ if (isUnstackingFunctionBody) {
+ subScope["(usages)"][usedLabelName]["(onlyUsedSubFunction)"] = true;
+ }
+ } else {
+ var subScopeUsage = subScope["(usages)"][usedLabelName];
+ subScopeUsage["(modified)"] = subScopeUsage["(modified)"].concat(usage["(modified)"]);
+ subScopeUsage["(tokens)"] = subScopeUsage["(tokens)"].concat(usage["(tokens)"]);
+ subScopeUsage["(reassigned)"] =
+ subScopeUsage["(reassigned)"].concat(usage["(reassigned)"]);
+ subScopeUsage["(onlyUsedSubFunction)"] = false;
+ }
+ } else {
+ if (typeof _current["(predefined)"][usedLabelName] === "boolean") {
+ delete declared[usedLabelName];
+ usedPredefinedAndGlobals[usedLabelName] = marker;
+ if (_current["(predefined)"][usedLabelName] === false && usage["(reassigned)"]) {
+ for (j = 0; j < usage["(reassigned)"].length; j++) {
+ warning("W020", usage["(reassigned)"][j]);
+ }
+ }
+ }
+ else {
+ if (usage["(tokens)"]) {
+ for (j = 0; j < usage["(tokens)"].length; j++) {
+ var undefinedToken = usage["(tokens)"][j];
+ if (!undefinedToken.forgiveUndef) {
+ if (state.option.undef && !undefinedToken.ignoreUndef) {
+ warning("W117", undefinedToken, usedLabelName);
+ }
+ if (impliedGlobals[usedLabelName]) {
+ impliedGlobals[usedLabelName].line.push(undefinedToken.line);
+ } else {
+ impliedGlobals[usedLabelName] = {
+ name: usedLabelName,
+ line: [undefinedToken.line]
+ };
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ if (!subScope) {
+ Object.keys(declared)
+ .forEach(function(labelNotUsed) {
+ _warnUnused(labelNotUsed, declared[labelNotUsed], "var");
+ });
+ }
+ if (subScope && !isUnstackingFunctionBody &&
+ !isUnstackingFunctionParams && !isUnstackingFunctionOuter) {
+ var labelNames = Object.keys(currentLabels);
+ for (i = 0; i < labelNames.length; i++) {
+
+ var defLabelName = labelNames[i];
+ if (!currentLabels[defLabelName]["(blockscoped)"] &&
+ currentLabels[defLabelName]["(type)"] !== "exception" &&
+ !this.funct.has(defLabelName, { excludeCurrent: true })) {
+ subScope["(labels)"][defLabelName] = currentLabels[defLabelName];
+ if (_currentFunctBody["(type)"] !== "global") {
+ subScope["(labels)"][defLabelName]["(useOutsideOfScope)"] = true;
+ }
+ delete currentLabels[defLabelName];
+ }
+ }
+ }
+
+ _checkForUnused();
+
+ _scopeStack.pop();
+ if (isUnstackingFunctionBody) {
+ _currentFunctBody = _scopeStack[_.findLastIndex(_scopeStack, function(scope) {
+ return scope["(isFuncBody)"] || scope["(type)"] === "global";
+ })];
+ }
+
+ _current = subScope;
+ },
+ addParam: function(labelName, token, type) {
+ type = type || "param";
+
+ if (type === "exception") {
+ var previouslyDefinedLabelType = this.funct.labeltype(labelName);
+ if (previouslyDefinedLabelType && previouslyDefinedLabelType !== "exception") {
+ if (!state.option.node) {
+ warning("W002", state.tokens.next, labelName);
+ }
+ }
+ }
+ if (_.has(_current["(labels)"], labelName)) {
+ _current["(labels)"][labelName].duplicated = true;
+ } else {
+ _checkOuterShadow(labelName, token, type);
+
+ _current["(labels)"][labelName] = {
+ "(type)" : type,
+ "(token)": token,
+ "(unused)": true };
+
+ _current["(params)"].push(labelName);
+ }
+
+ if (_.has(_current["(usages)"], labelName)) {
+ var usage = _current["(usages)"][labelName];
+ if (usage["(onlyUsedSubFunction)"]) {
+ _latedefWarning(type, labelName, token);
+ } else {
+ warning("E056", token, labelName, type);
+ }
+ }
+ },
+
+ validateParams: function() {
+ if (_currentFunctBody["(type)"] === "global") {
+ return;
+ }
+
+ var isStrict = state.isStrict();
+ var currentFunctParamScope = _currentFunctBody["(parent)"];
+
+ if (!currentFunctParamScope["(params)"]) {
+ return;
+ }
+
+ currentFunctParamScope["(params)"].forEach(function(labelName) {
+ var label = currentFunctParamScope["(labels)"][labelName];
+
+ if (label && label.duplicated) {
+ if (isStrict) {
+ warning("E011", label["(token)"], labelName);
+ } else if (state.option.shadow !== true) {
+ warning("W004", label["(token)"], labelName);
+ }
+ }
+ });
+ },
+
+ getUsedOrDefinedGlobals: function() {
+ var list = Object.keys(usedPredefinedAndGlobals);
+ if (usedPredefinedAndGlobals.__proto__ === marker &&
+ list.indexOf("__proto__") === -1) {
+ list.push("__proto__");
+ }
+
+ return list;
+ },
+ getImpliedGlobals: function() {
+ var values = _.values(impliedGlobals);
+ var hasProto = false;
+ if (impliedGlobals.__proto__) {
+ hasProto = values.some(function(value) {
+ return value.name === "__proto__";
+ });
+
+ if (!hasProto) {
+ values.push(impliedGlobals.__proto__);
+ }
+ }
+
+ return values;
+ },
+ getUnuseds: function() {
+ return unuseds;
+ },
+
+ has: function(labelName) {
+ return Boolean(_getLabel(labelName));
+ },
+
+ labeltype: function(labelName) {
+ var scopeLabels = _getLabel(labelName);
+ if (scopeLabels) {
+ return scopeLabels[labelName]["(type)"];
+ }
+ return null;
+ },
+ addExported: function(labelName) {
+ var globalLabels = _scopeStack[0]["(labels)"];
+ if (_.has(declared, labelName)) {
+ delete declared[labelName];
+ } else if (_.has(globalLabels, labelName)) {
+ globalLabels[labelName]["(unused)"] = false;
+ } else {
+ for (var i = 1; i < _scopeStack.length; i++) {
+ var scope = _scopeStack[i];
+ if (!scope["(type)"]) {
+ if (_.has(scope["(labels)"], labelName) &&
+ !scope["(labels)"][labelName]["(blockscoped)"]) {
+ scope["(labels)"][labelName]["(unused)"] = false;
+ return;
+ }
+ } else {
+ break;
+ }
+ }
+ exported[labelName] = true;
+ }
+ },
+ setExported: function(labelName, token) {
+ this.block.use(labelName, token);
+ },
+ addlabel: function(labelName, opts) {
+
+ var type = opts.type;
+ var token = opts.token;
+ var isblockscoped = type === "let" || type === "const" || type === "class";
+ var isexported = (isblockscoped ? _current : _currentFunctBody)["(type)"] === "global" &&
+ _.has(exported, labelName);
+ _checkOuterShadow(labelName, token, type);
+ if (isblockscoped) {
+
+ var declaredInCurrentScope = _current["(labels)"][labelName];
+ if (!declaredInCurrentScope && _current === _currentFunctBody &&
+ _current["(type)"] !== "global") {
+ declaredInCurrentScope = !!_currentFunctBody["(parent)"]["(labels)"][labelName];
+ }
+ if (!declaredInCurrentScope && _current["(usages)"][labelName]) {
+ var usage = _current["(usages)"][labelName];
+ if (usage["(onlyUsedSubFunction)"]) {
+ _latedefWarning(type, labelName, token);
+ } else {
+ warning("E056", token, labelName, type);
+ }
+ }
+ if (declaredInCurrentScope) {
+ warning("E011", token, labelName);
+ }
+ else if (state.option.shadow === "outer") {
+ if (scopeManagerInst.funct.has(labelName)) {
+ warning("W004", token, labelName);
+ }
+ }
+
+ scopeManagerInst.block.add(labelName, type, token, !isexported);
+
+ } else {
+
+ var declaredInCurrentFunctionScope = scopeManagerInst.funct.has(labelName);
+ if (!declaredInCurrentFunctionScope && usedSoFarInCurrentFunction(labelName)) {
+ _latedefWarning(type, labelName, token);
+ }
+ if (scopeManagerInst.funct.has(labelName, { onlyBlockscoped: true })) {
+ warning("E011", token, labelName);
+ } else if (state.option.shadow !== true) {
+ if (declaredInCurrentFunctionScope && labelName !== "__proto__") {
+ if (_currentFunctBody["(type)"] !== "global") {
+ warning("W004", token, labelName);
+ }
+ }
+ }
+
+ scopeManagerInst.funct.add(labelName, type, token, !isexported);
+
+ if (_currentFunctBody["(type)"] === "global") {
+ usedPredefinedAndGlobals[labelName] = marker;
+ }
+ }
+ },
+
+ funct: {
+ labeltype: function(labelName, options) {
+ var onlyBlockscoped = options && options.onlyBlockscoped;
+ var excludeParams = options && options.excludeParams;
+ var currentScopeIndex = _scopeStack.length - (options && options.excludeCurrent ? 2 : 1);
+ for (var i = currentScopeIndex; i >= 0; i--) {
+ var current = _scopeStack[i];
+ if (current["(labels)"][labelName] &&
+ (!onlyBlockscoped || current["(labels)"][labelName]["(blockscoped)"])) {
+ return current["(labels)"][labelName]["(type)"];
+ }
+ var scopeCheck = excludeParams ? _scopeStack[ i - 1 ] : current;
+ if (scopeCheck && scopeCheck["(type)"] === "functionparams") {
+ return null;
+ }
+ }
+ return null;
+ },
+ hasBreakLabel: function(labelName) {
+ for (var i = _scopeStack.length - 1; i >= 0; i--) {
+ var current = _scopeStack[i];
+
+ if (current["(breakLabels)"][labelName]) {
+ return true;
+ }
+ if (current["(type)"] === "functionparams") {
+ return false;
+ }
+ }
+ return false;
+ },
+ has: function(labelName, options) {
+ return Boolean(this.labeltype(labelName, options));
+ },
+ add: function(labelName, type, tok, unused) {
+ _current["(labels)"][labelName] = {
+ "(type)" : type,
+ "(token)": tok,
+ "(blockscoped)": false,
+ "(function)": _currentFunctBody,
+ "(unused)": unused };
+ }
+ },
+
+ block: {
+ isGlobal: function() {
+ return _current["(type)"] === "global";
+ },
+
+ use: function(labelName, token) {
+ var paramScope = _currentFunctBody["(parent)"];
+ if (paramScope && paramScope["(labels)"][labelName] &&
+ paramScope["(labels)"][labelName]["(type)"] === "param") {
+ if (!scopeManagerInst.funct.has(labelName,
+ { excludeParams: true, onlyBlockscoped: true })) {
+ paramScope["(labels)"][labelName]["(unused)"] = false;
+ }
+ }
+
+ if (token && (state.ignored.W117 || state.option.undef === false)) {
+ token.ignoreUndef = true;
+ }
+
+ _setupUsages(labelName);
+
+ if (token) {
+ token["(function)"] = _currentFunctBody;
+ _current["(usages)"][labelName]["(tokens)"].push(token);
+ }
+ },
+
+ reassign: function(labelName, token) {
+
+ this.modify(labelName, token);
+
+ _current["(usages)"][labelName]["(reassigned)"].push(token);
+ },
+
+ modify: function(labelName, token) {
+
+ _setupUsages(labelName);
+
+ _current["(usages)"][labelName]["(modified)"].push(token);
+ },
+ add: function(labelName, type, tok, unused) {
+ _current["(labels)"][labelName] = {
+ "(type)" : type,
+ "(token)": tok,
+ "(blockscoped)": true,
+ "(unused)": unused };
+ },
+
+ addBreakLabel: function(labelName, opts) {
+ var token = opts.token;
+ if (scopeManagerInst.funct.hasBreakLabel(labelName)) {
+ warning("E011", token, labelName);
+ }
+ else if (state.option.shadow === "outer") {
+ if (scopeManagerInst.funct.has(labelName)) {
+ warning("W004", token, labelName);
+ } else {
+ _checkOuterShadow(labelName, token);
+ }
+ }
+ _current["(breakLabels)"][labelName] = token;
+ }
+ }
+ };
+ return scopeManagerInst;
+};
+
+module.exports = scopeManager;
+
+},{"../lodash":"/node_modules/jshint/lodash.js","events":"/node_modules/browserify/node_modules/events/events.js"}],"/node_modules/jshint/src/state.js":[function(_dereq_,module,exports){
+"use strict";
+var NameStack = _dereq_("./name-stack.js");
+
+var state = {
+ syntax: {},
+ isStrict: function() {
+ return this.directive["use strict"] || this.inClassBody ||
+ this.option.module || this.option.strict === "implied";
+ },
+
+ inMoz: function() {
+ return this.option.moz;
+ },
+ inES6: function() {
+ return this.option.moz || this.option.esversion >= 6;
+ },
+ inES5: function(strict) {
+ if (strict) {
+ return (!this.option.esversion || this.option.esversion === 5) && !this.option.moz;
+ }
+ return !this.option.esversion || this.option.esversion >= 5 || this.option.moz;
+ },
+
+
+ reset: function() {
+ this.tokens = {
+ prev: null,
+ next: null,
+ curr: null
+ };
+
+ this.option = {};
+ this.funct = null;
+ this.ignored = {};
+ this.directive = {};
+ this.jsonMode = false;
+ this.jsonWarnings = [];
+ this.lines = [];
+ this.tab = "";
+ this.cache = {}; // Node.JS doesn't have Map. Sniff.
+ this.ignoredLines = {};
+ this.forinifcheckneeded = false;
+ this.nameStack = new NameStack();
+ this.inClassBody = false;
+ }
+};
+
+exports.state = state;
+
+},{"./name-stack.js":"/node_modules/jshint/src/name-stack.js"}],"/node_modules/jshint/src/style.js":[function(_dereq_,module,exports){
+"use strict";
+
+exports.register = function(linter) {
+
+ linter.on("Identifier", function style_scanProto(data) {
+ if (linter.getOption("proto")) {
+ return;
+ }
+
+ if (data.name === "__proto__") {
+ linter.warn("W103", {
+ line: data.line,
+ char: data.char,
+ data: [ data.name, "6" ]
+ });
+ }
+ });
+
+ linter.on("Identifier", function style_scanIterator(data) {
+ if (linter.getOption("iterator")) {
+ return;
+ }
+
+ if (data.name === "__iterator__") {
+ linter.warn("W103", {
+ line: data.line,
+ char: data.char,
+ data: [ data.name ]
+ });
+ }
+ });
+
+ linter.on("Identifier", function style_scanCamelCase(data) {
+ if (!linter.getOption("camelcase")) {
+ return;
+ }
+
+ if (data.name.replace(/^_+|_+$/g, "").indexOf("_") > -1 && !data.name.match(/^[A-Z0-9_]*$/)) {
+ linter.warn("W106", {
+ line: data.line,
+ char: data.from,
+ data: [ data.name ]
+ });
+ }
+ });
+
+ linter.on("String", function style_scanQuotes(data) {
+ var quotmark = linter.getOption("quotmark");
+ var code;
+
+ if (!quotmark) {
+ return;
+ }
+
+ if (quotmark === "single" && data.quote !== "'") {
+ code = "W109";
+ }
+
+ if (quotmark === "double" && data.quote !== "\"") {
+ code = "W108";
+ }
+
+ if (quotmark === true) {
+ if (!linter.getCache("quotmark")) {
+ linter.setCache("quotmark", data.quote);
+ }
+
+ if (linter.getCache("quotmark") !== data.quote) {
+ code = "W110";
+ }
+ }
+
+ if (code) {
+ linter.warn(code, {
+ line: data.line,
+ char: data.char,
+ });
+ }
+ });
+
+ linter.on("Number", function style_scanNumbers(data) {
+ if (data.value.charAt(0) === ".") {
+ linter.warn("W008", {
+ line: data.line,
+ char: data.char,
+ data: [ data.value ]
+ });
+ }
+
+ if (data.value.substr(data.value.length - 1) === ".") {
+ linter.warn("W047", {
+ line: data.line,
+ char: data.char,
+ data: [ data.value ]
+ });
+ }
+
+ if (/^00+/.test(data.value)) {
+ linter.warn("W046", {
+ line: data.line,
+ char: data.char,
+ data: [ data.value ]
+ });
+ }
+ });
+
+ linter.on("String", function style_scanJavaScriptURLs(data) {
+ var re = /^(?:javascript|jscript|ecmascript|vbscript|livescript)\s*:/i;
+
+ if (linter.getOption("scripturl")) {
+ return;
+ }
+
+ if (re.test(data.value)) {
+ linter.warn("W107", {
+ line: data.line,
+ char: data.char
+ });
+ }
+ });
+};
+
+},{}],"/node_modules/jshint/src/vars.js":[function(_dereq_,module,exports){
+
+"use strict";
+
+exports.reservedVars = {
+ arguments : false,
+ NaN : false
+};
+
+exports.ecmaIdentifiers = {
+ 3: {
+ 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,
+ Math : false,
+ Number : false,
+ Object : false,
+ parseInt : false,
+ parseFloat : false,
+ RangeError : false,
+ ReferenceError : false,
+ RegExp : false,
+ String : false,
+ SyntaxError : false,
+ TypeError : false,
+ URIError : false
+ },
+ 5: {
+ JSON : false
+ },
+ 6: {
+ Map : false,
+ Promise : false,
+ Proxy : false,
+ Reflect : false,
+ Set : false,
+ Symbol : false,
+ WeakMap : false,
+ WeakSet : false
+ }
+};
+
+exports.browser = {
+ Audio : false,
+ Blob : false,
+ addEventListener : false,
+ applicationCache : false,
+ atob : false,
+ blur : false,
+ btoa : false,
+ cancelAnimationFrame : false,
+ CanvasGradient : false,
+ CanvasPattern : false,
+ CanvasRenderingContext2D: false,
+ CSS : false,
+ clearInterval : false,
+ clearTimeout : false,
+ close : false,
+ closed : false,
+ Comment : false,
+ CustomEvent : false,
+ DOMParser : false,
+ defaultStatus : false,
+ Document : false,
+ document : false,
+ DocumentFragment : false,
+ Element : false,
+ ElementTimeControl : false,
+ Event : false,
+ event : false,
+ fetch : false,
+ FileReader : 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,
+ HTMLCollection : 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,
+ HTMLTemplateElement : false,
+ HTMLTextAreaElement : false,
+ HTMLTitleElement : false,
+ HTMLUListElement : false,
+ HTMLVideoElement : false,
+ history : false,
+ Image : false,
+ Intl : false,
+ length : false,
+ localStorage : false,
+ location : false,
+ matchMedia : false,
+ MessageChannel : false,
+ MessageEvent : false,
+ MessagePort : false,
+ MouseEvent : false,
+ moveBy : false,
+ moveTo : false,
+ MutationObserver : false,
+ name : false,
+ Node : false,
+ NodeFilter : false,
+ NodeList : false,
+ Notification : 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,
+ performance : false,
+ print : false,
+ Range : false,
+ requestAnimationFrame : 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,
+ SVGAElement : false,
+ SVGAltGlyphDefElement: false,
+ SVGAltGlyphElement : false,
+ SVGAltGlyphItemElement: false,
+ SVGAngle : false,
+ SVGAnimateColorElement: false,
+ SVGAnimateElement : false,
+ SVGAnimateMotionElement: false,
+ SVGAnimateTransformElement: false,
+ SVGAnimatedAngle : false,
+ SVGAnimatedBoolean : false,
+ SVGAnimatedEnumeration: false,
+ SVGAnimatedInteger : false,
+ SVGAnimatedLength : false,
+ SVGAnimatedLengthList: false,
+ SVGAnimatedNumber : false,
+ SVGAnimatedNumberList: false,
+ SVGAnimatedPathData : false,
+ SVGAnimatedPoints : false,
+ SVGAnimatedPreserveAspectRatio: false,
+ SVGAnimatedRect : false,
+ SVGAnimatedString : false,
+ SVGAnimatedTransformList: false,
+ SVGAnimationElement : false,
+ SVGCSSRule : false,
+ SVGCircleElement : false,
+ SVGClipPathElement : false,
+ SVGColor : false,
+ SVGColorProfileElement: false,
+ SVGColorProfileRule : false,
+ SVGComponentTransferFunctionElement: false,
+ SVGCursorElement : false,
+ SVGDefsElement : false,
+ SVGDescElement : false,
+ SVGDocument : false,
+ SVGElement : false,
+ SVGElementInstance : false,
+ SVGElementInstanceList: false,
+ SVGEllipseElement : false,
+ SVGExternalResourcesRequired: false,
+ SVGFEBlendElement : false,
+ SVGFEColorMatrixElement: false,
+ SVGFEComponentTransferElement: false,
+ SVGFECompositeElement: false,
+ SVGFEConvolveMatrixElement: false,
+ SVGFEDiffuseLightingElement: false,
+ SVGFEDisplacementMapElement: false,
+ SVGFEDistantLightElement: false,
+ SVGFEFloodElement : false,
+ SVGFEFuncAElement : false,
+ SVGFEFuncBElement : false,
+ SVGFEFuncGElement : false,
+ SVGFEFuncRElement : false,
+ SVGFEGaussianBlurElement: false,
+ SVGFEImageElement : false,
+ SVGFEMergeElement : false,
+ SVGFEMergeNodeElement: false,
+ SVGFEMorphologyElement: false,
+ SVGFEOffsetElement : false,
+ SVGFEPointLightElement: false,
+ SVGFESpecularLightingElement: false,
+ SVGFESpotLightElement: false,
+ SVGFETileElement : false,
+ SVGFETurbulenceElement: false,
+ SVGFilterElement : false,
+ SVGFilterPrimitiveStandardAttributes: false,
+ SVGFitToViewBox : false,
+ SVGFontElement : false,
+ SVGFontFaceElement : false,
+ SVGFontFaceFormatElement: false,
+ SVGFontFaceNameElement: false,
+ SVGFontFaceSrcElement: false,
+ SVGFontFaceUriElement: false,
+ SVGForeignObjectElement: false,
+ SVGGElement : false,
+ SVGGlyphElement : false,
+ SVGGlyphRefElement : false,
+ SVGGradientElement : false,
+ SVGHKernElement : false,
+ SVGICCColor : false,
+ SVGImageElement : false,
+ SVGLangSpace : false,
+ SVGLength : false,
+ SVGLengthList : false,
+ SVGLineElement : false,
+ SVGLinearGradientElement: false,
+ SVGLocatable : false,
+ SVGMPathElement : false,
+ SVGMarkerElement : false,
+ SVGMaskElement : false,
+ SVGMatrix : false,
+ SVGMetadataElement : false,
+ SVGMissingGlyphElement: false,
+ SVGNumber : false,
+ SVGNumberList : false,
+ SVGPaint : false,
+ SVGPathElement : false,
+ SVGPathSeg : false,
+ SVGPathSegArcAbs : false,
+ SVGPathSegArcRel : false,
+ SVGPathSegClosePath : false,
+ SVGPathSegCurvetoCubicAbs: false,
+ SVGPathSegCurvetoCubicRel: false,
+ SVGPathSegCurvetoCubicSmoothAbs: false,
+ SVGPathSegCurvetoCubicSmoothRel: false,
+ SVGPathSegCurvetoQuadraticAbs: false,
+ SVGPathSegCurvetoQuadraticRel: false,
+ SVGPathSegCurvetoQuadraticSmoothAbs: false,
+ SVGPathSegCurvetoQuadraticSmoothRel: false,
+ SVGPathSegLinetoAbs : false,
+ SVGPathSegLinetoHorizontalAbs: false,
+ SVGPathSegLinetoHorizontalRel: false,
+ SVGPathSegLinetoRel : false,
+ SVGPathSegLinetoVerticalAbs: false,
+ SVGPathSegLinetoVerticalRel: false,
+ SVGPathSegList : false,
+ SVGPathSegMovetoAbs : false,
+ SVGPathSegMovetoRel : false,
+ SVGPatternElement : false,
+ SVGPoint : false,
+ SVGPointList : false,
+ SVGPolygonElement : false,
+ SVGPolylineElement : false,
+ SVGPreserveAspectRatio: false,
+ SVGRadialGradientElement: false,
+ SVGRect : false,
+ SVGRectElement : false,
+ SVGRenderingIntent : false,
+ SVGSVGElement : false,
+ SVGScriptElement : false,
+ SVGSetElement : false,
+ SVGStopElement : false,
+ SVGStringList : false,
+ SVGStylable : false,
+ SVGStyleElement : false,
+ SVGSwitchElement : false,
+ SVGSymbolElement : false,
+ SVGTRefElement : false,
+ SVGTSpanElement : false,
+ SVGTests : false,
+ SVGTextContentElement: false,
+ SVGTextElement : false,
+ SVGTextPathElement : false,
+ SVGTextPositioningElement: false,
+ SVGTitleElement : false,
+ SVGTransform : false,
+ SVGTransformList : false,
+ SVGTransformable : false,
+ SVGURIReference : false,
+ SVGUnitTypes : false,
+ SVGUseElement : false,
+ SVGVKernElement : false,
+ SVGViewElement : false,
+ SVGViewSpec : false,
+ SVGZoomAndPan : false,
+ Text : false,
+ TextDecoder : false,
+ TextEncoder : false,
+ TimeEvent : false,
+ top : false,
+ URL : false,
+ WebGLActiveInfo : false,
+ WebGLBuffer : false,
+ WebGLContextEvent : false,
+ WebGLFramebuffer : false,
+ WebGLProgram : false,
+ WebGLRenderbuffer : false,
+ WebGLRenderingContext: false,
+ WebGLShader : false,
+ WebGLShaderPrecisionFormat: false,
+ WebGLTexture : false,
+ WebGLUniformLocation : false,
+ WebSocket : false,
+ window : false,
+ Window : false,
+ Worker : false,
+ XDomainRequest : false,
+ XMLHttpRequest : false,
+ XMLSerializer : false,
+ XPathEvaluator : false,
+ XPathException : false,
+ XPathExpression : false,
+ XPathNamespace : false,
+ XPathNSResolver : false,
+ XPathResult : false
+};
+
+exports.devel = {
+ alert : false,
+ confirm: false,
+ console: false,
+ Debug : false,
+ opera : false,
+ prompt : false
+};
+
+exports.worker = {
+ importScripts : true,
+ postMessage : true,
+ self : true,
+ FileReaderSync : true
+};
+exports.nonstandard = {
+ escape : false,
+ unescape: false
+};
+
+exports.couch = {
+ "require" : false,
+ respond : false,
+ getRow : false,
+ emit : false,
+ send : false,
+ start : false,
+ sum : false,
+ log : false,
+ exports : false,
+ module : false,
+ provides : false
+};
+
+exports.node = {
+ __filename : false,
+ __dirname : false,
+ GLOBAL : false,
+ global : false,
+ module : false,
+ require : false,
+
+ Buffer : true,
+ console : true,
+ exports : true,
+ process : true,
+ setTimeout : true,
+ clearTimeout : true,
+ setInterval : true,
+ clearInterval : true,
+ setImmediate : true, // v0.9.1+
+ clearImmediate: true // v0.9.1+
+};
+
+exports.browserify = {
+ __filename : false,
+ __dirname : false,
+ global : false,
+ module : false,
+ require : false,
+ Buffer : true,
+ exports : true,
+ process : true
+};
+
+exports.phantom = {
+ phantom : true,
+ require : true,
+ WebPage : true,
+ console : true, // in examples, but undocumented
+ exports : true // v1.7+
+};
+
+exports.qunit = {
+ asyncTest : false,
+ deepEqual : false,
+ equal : false,
+ expect : false,
+ module : false,
+ notDeepEqual : false,
+ notEqual : false,
+ notPropEqual : false,
+ notStrictEqual : false,
+ ok : false,
+ propEqual : false,
+ QUnit : false,
+ raises : false,
+ start : false,
+ stop : false,
+ strictEqual : false,
+ test : false,
+ "throws" : false
+};
+
+exports.rhino = {
+ defineClass : false,
+ deserialize : false,
+ gc : false,
+ help : false,
+ importClass : false,
+ importPackage: false,
+ "java" : false,
+ load : false,
+ loadClass : false,
+ Packages : false,
+ print : false,
+ quit : false,
+ readFile : false,
+ readUrl : false,
+ runCommand : false,
+ seal : false,
+ serialize : false,
+ spawn : false,
+ sync : false,
+ toint32 : false,
+ version : false
+};
+
+exports.shelljs = {
+ target : false,
+ echo : false,
+ exit : false,
+ cd : false,
+ pwd : false,
+ ls : false,
+ find : false,
+ cp : false,
+ rm : false,
+ mv : false,
+ mkdir : false,
+ test : false,
+ cat : false,
+ sed : false,
+ grep : false,
+ which : false,
+ dirs : false,
+ pushd : false,
+ popd : false,
+ env : false,
+ exec : false,
+ chmod : false,
+ config : false,
+ error : false,
+ tempdir : false
+};
+
+exports.typed = {
+ ArrayBuffer : false,
+ ArrayBufferView : false,
+ DataView : false,
+ Float32Array : false,
+ Float64Array : false,
+ Int16Array : false,
+ Int32Array : false,
+ Int8Array : false,
+ Uint16Array : false,
+ Uint32Array : false,
+ Uint8Array : false,
+ Uint8ClampedArray : false
+};
+
+exports.wsh = {
+ ActiveXObject : true,
+ Enumerator : true,
+ GetObject : true,
+ ScriptEngine : true,
+ ScriptEngineBuildVersion : true,
+ ScriptEngineMajorVersion : true,
+ ScriptEngineMinorVersion : true,
+ VBArray : true,
+ WSH : true,
+ WScript : true,
+ XDomainRequest : true
+};
+
+exports.dojo = {
+ dojo : false,
+ dijit : false,
+ dojox : false,
+ define : false,
+ "require": false
+};
+
+exports.jquery = {
+ "$" : false,
+ jQuery : false
+};
+
+exports.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
+};
+
+exports.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
+};
+
+exports.yui = {
+ YUI : false,
+ Y : false,
+ YUI_config: false
+};
+
+exports.mocha = {
+ mocha : false,
+ describe : false,
+ xdescribe : false,
+ it : false,
+ xit : false,
+ context : false,
+ xcontext : false,
+ before : false,
+ after : false,
+ beforeEach : false,
+ afterEach : false,
+ suite : false,
+ test : false,
+ setup : false,
+ teardown : false,
+ suiteSetup : false,
+ suiteTeardown : false
+};
+
+exports.jasmine = {
+ jasmine : false,
+ describe : false,
+ xdescribe : false,
+ it : false,
+ xit : false,
+ beforeEach : false,
+ afterEach : false,
+ setFixtures : false,
+ loadFixtures: false,
+ spyOn : false,
+ expect : false,
+ runs : false,
+ waitsFor : false,
+ waits : false,
+ beforeAll : false,
+ afterAll : false,
+ fail : false,
+ fdescribe : false,
+ fit : false,
+ pending : false
+};
+
+},{}]},{},["/node_modules/jshint/src/jshint.js"]);
+
+});
+
+ace.define("ace/mode/javascript_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/javascript/jshint"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+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 || {
+ esnext: true,
+ moz: 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");
+ if (!value)
+ return this.sender.emit("annotate", []);
+
+ var errors = [];
+ var maxErrorLevel = this.isValidJS(value) ? "warning" : "error";
+ lint(value, this.options, this.options.globals);
+ 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("annotate", errors);
+ };
+
+}).call(JavaScriptWorker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ 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 ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ 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, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ 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("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ 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("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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 || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+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, "");
+ };
+}
+
+function toInteger(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;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/worker-json.js b/www/wiki/extensions/CodeEditor/modules/ace/worker-json.js
new file mode 100644
index 00000000..e22fa899
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/worker-json.js
@@ -0,0 +1,2396 @@
+"no use strict";
+;(function(window) {
+if (typeof window.window != "undefined" && window.document)
+ return;
+if (window.require && window.define)
+ return;
+
+if (!window.console) {
+ window.console = function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+ };
+ window.console.error =
+ window.console.warn =
+ window.console.log =
+ window.console.trace = window.console;
+}
+window.window = window;
+window.ace = window;
+
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ data: err.data,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
+window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
+ if (moduleName.indexOf("!") !== -1) {
+ var chunks = moduleName.split("!");
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
+ }
+ // normalize relative requires
+ if (moduleName.charAt(0) == ".") {
+ var base = parentId.split("/").slice(0, -1).join("/");
+ moduleName = (base ? base + "/" : "") + moduleName;
+
+ while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
+ var previous = moduleName;
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ }
+ }
+
+ return moduleName;
+};
+
+window.require = function require(parentId, id) {
+ if (!id) {
+ id = parentId;
+ parentId = null;
+ }
+ if (!id.charAt)
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+ id = window.normalizeModule(parentId, id);
+
+ var module = window.require.modules[id];
+ if (module) {
+ if (!module.initialized) {
+ module.initialized = true;
+ module.exports = module.factory().exports;
+ }
+ return module.exports;
+ }
+
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+
+ var path = resolveModuleId(id, window.require.tlns);
+ if (path.slice(-3) != ".js") path += ".js";
+
+ window.require.id = id;
+ window.require.modules[id] = {}; // prevent infinite loop on broken modules
+ importScripts(path);
+ return window.require(parentId, id);
+};
+function resolveModuleId(id, paths) {
+ var testPath = id, tail = "";
+ while (testPath) {
+ var alias = paths[testPath];
+ if (typeof alias == "string") {
+ return alias + tail;
+ } else if (alias) {
+ return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name);
+ } else if (alias === false) {
+ return "";
+ }
+ var i = testPath.lastIndexOf("/");
+ if (i === -1) break;
+ tail = testPath.substr(i) + tail;
+ testPath = testPath.slice(0, i);
+ }
+ return id;
+}
+window.require.modules = {};
+window.require.tlns = {};
+
+window.define = function(id, deps, factory) {
+ if (arguments.length == 2) {
+ factory = deps;
+ if (typeof id != "string") {
+ deps = id;
+ id = window.require.id;
+ }
+ } else if (arguments.length == 1) {
+ factory = id;
+ deps = [];
+ id = window.require.id;
+ }
+
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject "require", "exports" and
+ // "module" as dependencies, to provide CommonJS compatibility.
+ deps = ["require", "exports", "module"];
+
+ var req = function(childId) {
+ return window.require(id, childId);
+ };
+
+ window.require.modules[id] = {
+ exports: {},
+ factory: function() {
+ var module = this;
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch (dep) {
+ // Because "require", "exports" and "module" aren't actual
+ // dependencies, we must handle them seperately.
+ case "require": return req;
+ case "exports": return module.exports;
+ case "module": return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
+ if (returnExports)
+ module.exports = returnExports;
+ return module;
+ }
+ };
+};
+window.define.amd = {};
+require.tlns = {};
+window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
+ for (var i in topLevelNamespaces)
+ require.tlns[i] = topLevelNamespaces[i];
+};
+
+window.initSender = function initSender() {
+
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("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 = window.main = null;
+var sender = window.sender = null;
+
+window.onmessage = function(e) {
+ var msg = e.data;
+ if (msg.event && sender) {
+ sender._signal(msg.event, msg.data);
+ }
+ else if (msg.command) {
+ if (main[msg.command])
+ main[msg.command].apply(main, msg.args);
+ else if (window[msg.command])
+ window[msg.command].apply(window, msg.args);
+ else
+ throw new Error("Unknown command:" + msg.command);
+ }
+ else if (msg.init) {
+ window.initBaseUrls(msg.tlns);
+ require("ace/lib/es5-shim");
+ sender = window.sender = window.initSender();
+ var clazz = require(msg.module)[msg.classname];
+ main = window.main = new clazz(sender);
+ }
+};
+})(this);
+
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+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};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
+
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {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
+ );
+ };
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
+ };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
+
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+
+
+exports.Range = Range;
+});
+
+ace.define("ace/apply_delta",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+function throwDeltaError(delta, errorText){
+ console.log("Invalid Delta:", delta);
+ throw "Invalid Delta: " + errorText;
+}
+
+function positionInDocument(docLines, position) {
+ return position.row >= 0 && position.row < docLines.length &&
+ position.column >= 0 && position.column <= docLines[position.row].length;
+}
+
+function validateDelta(docLines, delta) {
+ if (delta.action != "insert" && delta.action != "remove")
+ throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
+ if (!(delta.lines instanceof Array))
+ throwDeltaError(delta, "delta.lines must be an Array");
+ if (!delta.start || !delta.end)
+ throwDeltaError(delta, "delta.start/end must be an present");
+ var start = delta.start;
+ if (!positionInDocument(docLines, delta.start))
+ throwDeltaError(delta, "delta.start must be contained in document");
+ var end = delta.end;
+ if (delta.action == "remove" && !positionInDocument(docLines, end))
+ throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
+ var numRangeRows = end.row - start.row;
+ var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
+ if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
+ throwDeltaError(delta, "delta.range must match delta lines");
+}
+
+exports.applyDelta = function(docLines, delta, doNotValidate) {
+
+ var row = delta.start.row;
+ var startColumn = delta.start.column;
+ var line = docLines[row] || "";
+ switch (delta.action) {
+ case "insert":
+ var lines = delta.lines;
+ if (lines.length === 1) {
+ docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
+ } else {
+ var args = [row, 1].concat(delta.lines);
+ docLines.splice.apply(docLines, args);
+ docLines[row] = line.substring(0, startColumn) + docLines[row];
+ docLines[row + delta.lines.length - 1] += line.substring(startColumn);
+ }
+ break;
+ case "remove":
+ var endColumn = delta.end.column;
+ var endRow = delta.end.row;
+ if (row === endRow) {
+ docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
+ } else {
+ docLines.splice(
+ row, endRow - row + 1,
+ line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
+ );
+ }
+ break;
+ }
+}
+});
+
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
+
+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 = stopPropagation;
+ if (!e.preventDefault)
+ e.preventDefault = preventDefault;
+
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e, this);
+ if (e.propagationStopped)
+ break;
+ }
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e, this);
+};
+
+
+EventEmitter._signal = function(eventName, e) {
+ var listeners = (this._eventRegistry || {})[eventName];
+ if (!listeners)
+ return;
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++)
+ listeners[i](e, this);
+};
+
+EventEmitter.once = function(eventName, callback) {
+ var _self = this;
+ callback && this.addEventListener(eventName, function newCallback() {
+ _self.removeEventListener(eventName, newCallback);
+ callback.apply(null, arguments);
+ });
+};
+
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ handlers = this._defaultHandlers = {_disabled_: {}};
+
+ if (handlers[eventName]) {
+ var old = handlers[eventName];
+ var disabled = handlers._disabled_[eventName];
+ if (!disabled)
+ handlers._disabled_[eventName] = disabled = [];
+ disabled.push(old);
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+ handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ return;
+ var disabled = handlers._disabled_[eventName];
+
+ if (handlers[eventName] == callback) {
+ var old = handlers[eventName];
+ if (disabled)
+ this.setDefaultHandler(eventName, disabled.pop());
+ } else if (disabled) {
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
+
+ if (listeners.indexOf(callback) == -1)
+ listeners[capturing ? "unshift" : "push"](callback);
+ return callback;
+};
+
+EventEmitter.off =
+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/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;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+ this.getDocument = function() {
+ return this.document;
+ };
+ this.$insertRight = false;
+ this.onChange = function(delta) {
+ if (delta.start.row == delta.end.row && delta.start.row != this.row)
+ return;
+
+ if (delta.start.row > this.row)
+ return;
+
+ var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
+ this.setPosition(point.row, point.column, true);
+ };
+
+ function $pointsInOrder(point1, point2, equalPointsInOrder) {
+ var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
+ return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
+ }
+
+ function $getTransformedPoint(delta, point, moveIfEqual) {
+ var deltaIsInsert = delta.action == "insert";
+ var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
+ var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
+ var deltaStart = delta.start;
+ var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
+ if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
+ return {
+ row: point.row,
+ column: point.column
+ };
+ }
+ if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
+ return {
+ row: point.row + deltaRowShift,
+ column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
+ };
+ }
+
+ return {
+ row: deltaStart.row,
+ column: deltaStart.column
+ };
+ }
+ 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._signal("change", {
+ old: old,
+ value: pos
+ });
+ };
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
+ };
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("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/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var applyDelta = require("./apply_delta").applyDelta;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(textOrLines) {
+ this.$lines = [""];
+ if (textOrLines.length === 0) {
+ this.$lines = [""];
+ } else if (Array.isArray(textOrLines)) {
+ this.insertMergedLines({row: 0, column: 0}, textOrLines);
+ } else {
+ this.insert({row: 0, column:0}, textOrLines);
+ }
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setValue = function(text) {
+ var len = this.getLength() - 1;
+ this.remove(new Range(0, 0, len, this.getLine(len).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);
+ this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
+ };
+ this.getNewLineCharacter = function() {
+ switch (this.$newLineMode) {
+ case "windows":
+ return "\r\n";
+ case "unix":
+ return "\n";
+ default:
+ return this.$autoNewLine || "\n";
+ }
+ };
+
+ this.$autoNewLine = "";
+ this.$newLineMode = "auto";
+ this.setNewLineMode = function(newLineMode) {
+ if (this.$newLineMode === newLineMode)
+ return;
+
+ this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
+ };
+ 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) {
+ return this.getLinesForRange(range).join(this.getNewLineCharacter());
+ };
+ this.getLinesForRange = function(range) {
+ var lines;
+ if (range.start.row === range.end.row) {
+ lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
+ } else {
+ lines = this.getLines(range.start.row, range.end.row);
+ lines[0] = (lines[0] || "").substring(range.start.column);
+ var l = lines.length - 1;
+ if (range.end.row - range.start.row == l)
+ lines[l] = lines[l].substring(0, range.end.column);
+ }
+ return lines;
+ };
+ this.insertLines = function(row, lines) {
+ console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
+ return this.insertFullLines(row, lines);
+ };
+ this.removeLines = function(firstRow, lastRow) {
+ console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
+ return this.removeFullLines(firstRow, lastRow);
+ };
+ this.insertNewLine = function(position) {
+ console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
+ return this.insertMergedLines(position, ["", ""]);
+ };
+ this.insert = function(position, text) {
+ if (this.getLength() <= 1)
+ this.$detectNewLine(text);
+
+ return this.insertMergedLines(position, this.$split(text));
+ };
+ this.insertInLine = function(position, text) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = this.pos(position.row, position.column + text.length);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: [text]
+ }, true);
+
+ return this.clonePos(end);
+ };
+
+ this.clippedPos = function(row, column) {
+ var length = this.getLength();
+ if (row === undefined) {
+ row = length;
+ } else if (row < 0) {
+ row = 0;
+ } else if (row >= length) {
+ row = length - 1;
+ column = undefined;
+ }
+ var line = this.getLine(row);
+ if (column == undefined)
+ column = line.length;
+ column = Math.min(Math.max(column, 0), line.length);
+ return {row: row, column: column};
+ };
+
+ this.clonePos = function(pos) {
+ return {row: pos.row, column: pos.column};
+ };
+
+ this.pos = function(row, column) {
+ return {row: row, column: column};
+ };
+
+ 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;
+ } else {
+ position.row = Math.max(0, position.row);
+ position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
+ }
+ return position;
+ };
+ this.insertFullLines = function(row, lines) {
+ row = Math.min(Math.max(row, 0), this.getLength());
+ var column = 0;
+ if (row < this.getLength()) {
+ lines = lines.concat([""]);
+ column = 0;
+ } else {
+ lines = [""].concat(lines);
+ row--;
+ column = this.$lines[row].length;
+ }
+ this.insertMergedLines({row: row, column: column}, lines);
+ };
+ this.insertMergedLines = function(position, lines) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = {
+ row: start.row + lines.length - 1,
+ column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
+ };
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: lines
+ });
+
+ return this.clonePos(end);
+ };
+ this.remove = function(range) {
+ var start = this.clippedPos(range.start.row, range.start.column);
+ var end = this.clippedPos(range.end.row, range.end.column);
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ });
+ return this.clonePos(start);
+ };
+ this.removeInLine = function(row, startColumn, endColumn) {
+ var start = this.clippedPos(row, startColumn);
+ var end = this.clippedPos(row, endColumn);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ }, true);
+
+ return this.clonePos(start);
+ };
+ this.removeFullLines = function(firstRow, lastRow) {
+ firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
+ lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
+ var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
+ var deleteLastNewLine = lastRow < this.getLength() - 1;
+ var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );
+ var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );
+ var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );
+ var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length );
+ var range = new Range(startRow, startCol, endRow, endCol);
+ var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
+
+ this.applyDelta({
+ start: range.start,
+ end: range.end,
+ action: "remove",
+ lines: this.getLinesForRange(range)
+ });
+ return deletedLines;
+ };
+ this.removeNewLine = function(row) {
+ if (row < this.getLength() - 1 && row >= 0) {
+ this.applyDelta({
+ start: this.pos(row, this.getLine(row).length),
+ end: this.pos(row + 1, 0),
+ action: "remove",
+ lines: ["", ""]
+ });
+ }
+ };
+ this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
+ if (text.length === 0 && range.isEmpty())
+ return range.start;
+ if (text == this.getTextRange(range))
+ return range.end;
+
+ this.remove(range);
+ var end;
+ if (text) {
+ end = this.insert(range.start, text);
+ }
+ else {
+ end = range.start;
+ }
+
+ return end;
+ };
+ this.applyDeltas = function(deltas) {
+ for (var i=0; i<deltas.length; i++) {
+ this.applyDelta(deltas[i]);
+ }
+ };
+ this.revertDeltas = function(deltas) {
+ for (var i=deltas.length-1; i>=0; i--) {
+ this.revertDelta(deltas[i]);
+ }
+ };
+ this.applyDelta = function(delta, doNotValidate) {
+ var isInsert = delta.action == "insert";
+ if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
+ : !Range.comparePoints(delta.start, delta.end)) {
+ return;
+ }
+
+ if (isInsert && delta.lines.length > 20000)
+ this.$splitAndapplyLargeDelta(delta, 20000);
+ applyDelta(this.$lines, delta, doNotValidate);
+ this._signal("change", delta);
+ };
+
+ this.$splitAndapplyLargeDelta = function(delta, MAX) {
+ var lines = delta.lines;
+ var l = lines.length;
+ var row = delta.start.row;
+ var column = delta.start.column;
+ var from = 0, to = 0;
+ do {
+ from = to;
+ to += MAX - 1;
+ var chunk = lines.slice(from, to);
+ if (to > l) {
+ delta.lines = chunk;
+ delta.start.row = row + from;
+ delta.start.column = column;
+ break;
+ }
+ chunk.push("");
+ this.applyDelta({
+ start: this.pos(row + from, column),
+ end: this.pos(row + to, column = 0),
+ action: delta.action,
+ lines: chunk
+ }, true);
+ } while(true);
+ };
+ this.revertDelta = function(delta) {
+ this.applyDelta({
+ start: this.clonePos(delta.start),
+ end: this.clonePos(delta.end),
+ action: (delta.action == "insert" ? "remove" : "insert"),
+ lines: delta.lines.slice()
+ });
+ };
+ 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 + newlineLength;
+
+ return index + pos.column;
+ };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.last = function(a) {
+ return a[a.length - 1];
+};
+
+exports.stringReverse = function(string) {
+ return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+ var result = '';
+ while (count > 0) {
+ if (count & 1)
+ result += string;
+
+ if (count >>= 1)
+ string += string;
+ }
+ return result;
+};
+
+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 deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
+ return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
+ }
+ if (Object.prototype.toString.call(obj) !== "[object Object]")
+ return obj;
+
+ copy = {};
+ for (var key in obj)
+ copy[key] = deepCopy(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;
+ };
+
+ deferred.isPending = function() {
+ return timer;
+ };
+
+ return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+ _self.schedule = _self;
+
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
+
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ _self.isPending = function() {
+ return timer;
+ };
+
+ return _self;
+};
+});
+
+ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+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.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ var data = e.data;
+ if (data[0].start) {
+ doc.applyDeltas(data);
+ } else {
+ for (var i = 0; i < data.length; i += 2) {
+ if (Array.isArray(data[i+1])) {
+ var d = {action: "insert", start: data[i], lines: data[i+1]};
+ } else {
+ var d = {action: "remove", start: data[i], end: data[i+1]};
+ }
+ doc.applyDelta(d, true);
+ }
+ }
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
+};
+
+(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() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+ace.define("ace/mode/json/json_parse",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+ 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;
+ };
+});
+
+ace.define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"], function(require, exports, module) {
+"use strict";
+
+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();
+ var errors = [];
+ try {
+ if (value)
+ parse(value);
+ } catch (e) {
+ var pos = this.doc.indexToPosition(e.at-1);
+ errors.push({
+ row: pos.row,
+ column: pos.column,
+ text: e.message,
+ type: "error"
+ });
+ }
+ this.sender.emit("annotate", errors);
+ };
+
+}).call(JsonWorker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ 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 ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ 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, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ 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("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ 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("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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 || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+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, "");
+ };
+}
+
+function toInteger(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;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/worker-lua.js b/www/wiki/extensions/CodeEditor/modules/ace/worker-lua.js
new file mode 100644
index 00000000..e5026eab
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/worker-lua.js
@@ -0,0 +1,3632 @@
+"no use strict";
+;(function(window) {
+if (typeof window.window != "undefined" && window.document)
+ return;
+if (window.require && window.define)
+ return;
+
+if (!window.console) {
+ window.console = function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+ };
+ window.console.error =
+ window.console.warn =
+ window.console.log =
+ window.console.trace = window.console;
+}
+window.window = window;
+window.ace = window;
+
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ data: err.data,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
+window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
+ if (moduleName.indexOf("!") !== -1) {
+ var chunks = moduleName.split("!");
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
+ }
+ // normalize relative requires
+ if (moduleName.charAt(0) == ".") {
+ var base = parentId.split("/").slice(0, -1).join("/");
+ moduleName = (base ? base + "/" : "") + moduleName;
+
+ while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
+ var previous = moduleName;
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ }
+ }
+
+ return moduleName;
+};
+
+window.require = function require(parentId, id) {
+ if (!id) {
+ id = parentId;
+ parentId = null;
+ }
+ if (!id.charAt)
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+ id = window.normalizeModule(parentId, id);
+
+ var module = window.require.modules[id];
+ if (module) {
+ if (!module.initialized) {
+ module.initialized = true;
+ module.exports = module.factory().exports;
+ }
+ return module.exports;
+ }
+
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+
+ var path = resolveModuleId(id, window.require.tlns);
+ if (path.slice(-3) != ".js") path += ".js";
+
+ window.require.id = id;
+ window.require.modules[id] = {}; // prevent infinite loop on broken modules
+ importScripts(path);
+ return window.require(parentId, id);
+};
+function resolveModuleId(id, paths) {
+ var testPath = id, tail = "";
+ while (testPath) {
+ var alias = paths[testPath];
+ if (typeof alias == "string") {
+ return alias + tail;
+ } else if (alias) {
+ return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name);
+ } else if (alias === false) {
+ return "";
+ }
+ var i = testPath.lastIndexOf("/");
+ if (i === -1) break;
+ tail = testPath.substr(i) + tail;
+ testPath = testPath.slice(0, i);
+ }
+ return id;
+}
+window.require.modules = {};
+window.require.tlns = {};
+
+window.define = function(id, deps, factory) {
+ if (arguments.length == 2) {
+ factory = deps;
+ if (typeof id != "string") {
+ deps = id;
+ id = window.require.id;
+ }
+ } else if (arguments.length == 1) {
+ factory = id;
+ deps = [];
+ id = window.require.id;
+ }
+
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject "require", "exports" and
+ // "module" as dependencies, to provide CommonJS compatibility.
+ deps = ["require", "exports", "module"];
+
+ var req = function(childId) {
+ return window.require(id, childId);
+ };
+
+ window.require.modules[id] = {
+ exports: {},
+ factory: function() {
+ var module = this;
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch (dep) {
+ // Because "require", "exports" and "module" aren't actual
+ // dependencies, we must handle them seperately.
+ case "require": return req;
+ case "exports": return module.exports;
+ case "module": return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
+ if (returnExports)
+ module.exports = returnExports;
+ return module;
+ }
+ };
+};
+window.define.amd = {};
+require.tlns = {};
+window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
+ for (var i in topLevelNamespaces)
+ require.tlns[i] = topLevelNamespaces[i];
+};
+
+window.initSender = function initSender() {
+
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("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 = window.main = null;
+var sender = window.sender = null;
+
+window.onmessage = function(e) {
+ var msg = e.data;
+ if (msg.event && sender) {
+ sender._signal(msg.event, msg.data);
+ }
+ else if (msg.command) {
+ if (main[msg.command])
+ main[msg.command].apply(main, msg.args);
+ else if (window[msg.command])
+ window[msg.command].apply(window, msg.args);
+ else
+ throw new Error("Unknown command:" + msg.command);
+ }
+ else if (msg.init) {
+ window.initBaseUrls(msg.tlns);
+ require("ace/lib/es5-shim");
+ sender = window.sender = window.initSender();
+ var clazz = require(msg.module)[msg.classname];
+ main = window.main = new clazz(sender);
+ }
+};
+})(this);
+
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+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};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
+
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {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
+ );
+ };
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
+ };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
+
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+
+
+exports.Range = Range;
+});
+
+ace.define("ace/apply_delta",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+function throwDeltaError(delta, errorText){
+ console.log("Invalid Delta:", delta);
+ throw "Invalid Delta: " + errorText;
+}
+
+function positionInDocument(docLines, position) {
+ return position.row >= 0 && position.row < docLines.length &&
+ position.column >= 0 && position.column <= docLines[position.row].length;
+}
+
+function validateDelta(docLines, delta) {
+ if (delta.action != "insert" && delta.action != "remove")
+ throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
+ if (!(delta.lines instanceof Array))
+ throwDeltaError(delta, "delta.lines must be an Array");
+ if (!delta.start || !delta.end)
+ throwDeltaError(delta, "delta.start/end must be an present");
+ var start = delta.start;
+ if (!positionInDocument(docLines, delta.start))
+ throwDeltaError(delta, "delta.start must be contained in document");
+ var end = delta.end;
+ if (delta.action == "remove" && !positionInDocument(docLines, end))
+ throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
+ var numRangeRows = end.row - start.row;
+ var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
+ if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
+ throwDeltaError(delta, "delta.range must match delta lines");
+}
+
+exports.applyDelta = function(docLines, delta, doNotValidate) {
+
+ var row = delta.start.row;
+ var startColumn = delta.start.column;
+ var line = docLines[row] || "";
+ switch (delta.action) {
+ case "insert":
+ var lines = delta.lines;
+ if (lines.length === 1) {
+ docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
+ } else {
+ var args = [row, 1].concat(delta.lines);
+ docLines.splice.apply(docLines, args);
+ docLines[row] = line.substring(0, startColumn) + docLines[row];
+ docLines[row + delta.lines.length - 1] += line.substring(startColumn);
+ }
+ break;
+ case "remove":
+ var endColumn = delta.end.column;
+ var endRow = delta.end.row;
+ if (row === endRow) {
+ docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
+ } else {
+ docLines.splice(
+ row, endRow - row + 1,
+ line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
+ );
+ }
+ break;
+ }
+}
+});
+
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
+
+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 = stopPropagation;
+ if (!e.preventDefault)
+ e.preventDefault = preventDefault;
+
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e, this);
+ if (e.propagationStopped)
+ break;
+ }
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e, this);
+};
+
+
+EventEmitter._signal = function(eventName, e) {
+ var listeners = (this._eventRegistry || {})[eventName];
+ if (!listeners)
+ return;
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++)
+ listeners[i](e, this);
+};
+
+EventEmitter.once = function(eventName, callback) {
+ var _self = this;
+ callback && this.addEventListener(eventName, function newCallback() {
+ _self.removeEventListener(eventName, newCallback);
+ callback.apply(null, arguments);
+ });
+};
+
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ handlers = this._defaultHandlers = {_disabled_: {}};
+
+ if (handlers[eventName]) {
+ var old = handlers[eventName];
+ var disabled = handlers._disabled_[eventName];
+ if (!disabled)
+ handlers._disabled_[eventName] = disabled = [];
+ disabled.push(old);
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+ handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ return;
+ var disabled = handlers._disabled_[eventName];
+
+ if (handlers[eventName] == callback) {
+ var old = handlers[eventName];
+ if (disabled)
+ this.setDefaultHandler(eventName, disabled.pop());
+ } else if (disabled) {
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
+
+ if (listeners.indexOf(callback) == -1)
+ listeners[capturing ? "unshift" : "push"](callback);
+ return callback;
+};
+
+EventEmitter.off =
+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/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;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+ this.getDocument = function() {
+ return this.document;
+ };
+ this.$insertRight = false;
+ this.onChange = function(delta) {
+ if (delta.start.row == delta.end.row && delta.start.row != this.row)
+ return;
+
+ if (delta.start.row > this.row)
+ return;
+
+ var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
+ this.setPosition(point.row, point.column, true);
+ };
+
+ function $pointsInOrder(point1, point2, equalPointsInOrder) {
+ var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
+ return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
+ }
+
+ function $getTransformedPoint(delta, point, moveIfEqual) {
+ var deltaIsInsert = delta.action == "insert";
+ var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
+ var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
+ var deltaStart = delta.start;
+ var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
+ if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
+ return {
+ row: point.row,
+ column: point.column
+ };
+ }
+ if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
+ return {
+ row: point.row + deltaRowShift,
+ column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
+ };
+ }
+
+ return {
+ row: deltaStart.row,
+ column: deltaStart.column
+ };
+ }
+ 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._signal("change", {
+ old: old,
+ value: pos
+ });
+ };
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
+ };
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("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/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var applyDelta = require("./apply_delta").applyDelta;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(textOrLines) {
+ this.$lines = [""];
+ if (textOrLines.length === 0) {
+ this.$lines = [""];
+ } else if (Array.isArray(textOrLines)) {
+ this.insertMergedLines({row: 0, column: 0}, textOrLines);
+ } else {
+ this.insert({row: 0, column:0}, textOrLines);
+ }
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setValue = function(text) {
+ var len = this.getLength() - 1;
+ this.remove(new Range(0, 0, len, this.getLine(len).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);
+ this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
+ };
+ this.getNewLineCharacter = function() {
+ switch (this.$newLineMode) {
+ case "windows":
+ return "\r\n";
+ case "unix":
+ return "\n";
+ default:
+ return this.$autoNewLine || "\n";
+ }
+ };
+
+ this.$autoNewLine = "";
+ this.$newLineMode = "auto";
+ this.setNewLineMode = function(newLineMode) {
+ if (this.$newLineMode === newLineMode)
+ return;
+
+ this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
+ };
+ 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) {
+ return this.getLinesForRange(range).join(this.getNewLineCharacter());
+ };
+ this.getLinesForRange = function(range) {
+ var lines;
+ if (range.start.row === range.end.row) {
+ lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
+ } else {
+ lines = this.getLines(range.start.row, range.end.row);
+ lines[0] = (lines[0] || "").substring(range.start.column);
+ var l = lines.length - 1;
+ if (range.end.row - range.start.row == l)
+ lines[l] = lines[l].substring(0, range.end.column);
+ }
+ return lines;
+ };
+ this.insertLines = function(row, lines) {
+ console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
+ return this.insertFullLines(row, lines);
+ };
+ this.removeLines = function(firstRow, lastRow) {
+ console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
+ return this.removeFullLines(firstRow, lastRow);
+ };
+ this.insertNewLine = function(position) {
+ console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
+ return this.insertMergedLines(position, ["", ""]);
+ };
+ this.insert = function(position, text) {
+ if (this.getLength() <= 1)
+ this.$detectNewLine(text);
+
+ return this.insertMergedLines(position, this.$split(text));
+ };
+ this.insertInLine = function(position, text) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = this.pos(position.row, position.column + text.length);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: [text]
+ }, true);
+
+ return this.clonePos(end);
+ };
+
+ this.clippedPos = function(row, column) {
+ var length = this.getLength();
+ if (row === undefined) {
+ row = length;
+ } else if (row < 0) {
+ row = 0;
+ } else if (row >= length) {
+ row = length - 1;
+ column = undefined;
+ }
+ var line = this.getLine(row);
+ if (column == undefined)
+ column = line.length;
+ column = Math.min(Math.max(column, 0), line.length);
+ return {row: row, column: column};
+ };
+
+ this.clonePos = function(pos) {
+ return {row: pos.row, column: pos.column};
+ };
+
+ this.pos = function(row, column) {
+ return {row: row, column: column};
+ };
+
+ 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;
+ } else {
+ position.row = Math.max(0, position.row);
+ position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
+ }
+ return position;
+ };
+ this.insertFullLines = function(row, lines) {
+ row = Math.min(Math.max(row, 0), this.getLength());
+ var column = 0;
+ if (row < this.getLength()) {
+ lines = lines.concat([""]);
+ column = 0;
+ } else {
+ lines = [""].concat(lines);
+ row--;
+ column = this.$lines[row].length;
+ }
+ this.insertMergedLines({row: row, column: column}, lines);
+ };
+ this.insertMergedLines = function(position, lines) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = {
+ row: start.row + lines.length - 1,
+ column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
+ };
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: lines
+ });
+
+ return this.clonePos(end);
+ };
+ this.remove = function(range) {
+ var start = this.clippedPos(range.start.row, range.start.column);
+ var end = this.clippedPos(range.end.row, range.end.column);
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ });
+ return this.clonePos(start);
+ };
+ this.removeInLine = function(row, startColumn, endColumn) {
+ var start = this.clippedPos(row, startColumn);
+ var end = this.clippedPos(row, endColumn);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ }, true);
+
+ return this.clonePos(start);
+ };
+ this.removeFullLines = function(firstRow, lastRow) {
+ firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
+ lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
+ var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
+ var deleteLastNewLine = lastRow < this.getLength() - 1;
+ var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );
+ var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );
+ var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );
+ var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length );
+ var range = new Range(startRow, startCol, endRow, endCol);
+ var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
+
+ this.applyDelta({
+ start: range.start,
+ end: range.end,
+ action: "remove",
+ lines: this.getLinesForRange(range)
+ });
+ return deletedLines;
+ };
+ this.removeNewLine = function(row) {
+ if (row < this.getLength() - 1 && row >= 0) {
+ this.applyDelta({
+ start: this.pos(row, this.getLine(row).length),
+ end: this.pos(row + 1, 0),
+ action: "remove",
+ lines: ["", ""]
+ });
+ }
+ };
+ this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
+ if (text.length === 0 && range.isEmpty())
+ return range.start;
+ if (text == this.getTextRange(range))
+ return range.end;
+
+ this.remove(range);
+ var end;
+ if (text) {
+ end = this.insert(range.start, text);
+ }
+ else {
+ end = range.start;
+ }
+
+ return end;
+ };
+ this.applyDeltas = function(deltas) {
+ for (var i=0; i<deltas.length; i++) {
+ this.applyDelta(deltas[i]);
+ }
+ };
+ this.revertDeltas = function(deltas) {
+ for (var i=deltas.length-1; i>=0; i--) {
+ this.revertDelta(deltas[i]);
+ }
+ };
+ this.applyDelta = function(delta, doNotValidate) {
+ var isInsert = delta.action == "insert";
+ if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
+ : !Range.comparePoints(delta.start, delta.end)) {
+ return;
+ }
+
+ if (isInsert && delta.lines.length > 20000)
+ this.$splitAndapplyLargeDelta(delta, 20000);
+ applyDelta(this.$lines, delta, doNotValidate);
+ this._signal("change", delta);
+ };
+
+ this.$splitAndapplyLargeDelta = function(delta, MAX) {
+ var lines = delta.lines;
+ var l = lines.length;
+ var row = delta.start.row;
+ var column = delta.start.column;
+ var from = 0, to = 0;
+ do {
+ from = to;
+ to += MAX - 1;
+ var chunk = lines.slice(from, to);
+ if (to > l) {
+ delta.lines = chunk;
+ delta.start.row = row + from;
+ delta.start.column = column;
+ break;
+ }
+ chunk.push("");
+ this.applyDelta({
+ start: this.pos(row + from, column),
+ end: this.pos(row + to, column = 0),
+ action: delta.action,
+ lines: chunk
+ }, true);
+ } while(true);
+ };
+ this.revertDelta = function(delta) {
+ this.applyDelta({
+ start: this.clonePos(delta.start),
+ end: this.clonePos(delta.end),
+ action: (delta.action == "insert" ? "remove" : "insert"),
+ lines: delta.lines.slice()
+ });
+ };
+ 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 + newlineLength;
+
+ return index + pos.column;
+ };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.last = function(a) {
+ return a[a.length - 1];
+};
+
+exports.stringReverse = function(string) {
+ return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+ var result = '';
+ while (count > 0) {
+ if (count & 1)
+ result += string;
+
+ if (count >>= 1)
+ string += string;
+ }
+ return result;
+};
+
+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 deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
+ return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
+ }
+ if (Object.prototype.toString.call(obj) !== "[object Object]")
+ return obj;
+
+ copy = {};
+ for (var key in obj)
+ copy[key] = deepCopy(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;
+ };
+
+ deferred.isPending = function() {
+ return timer;
+ };
+
+ return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+ _self.schedule = _self;
+
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
+
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ _self.isPending = function() {
+ return timer;
+ };
+
+ return _self;
+};
+});
+
+ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+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.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ var data = e.data;
+ if (data[0].start) {
+ doc.applyDeltas(data);
+ } else {
+ for (var i = 0; i < data.length; i += 2) {
+ if (Array.isArray(data[i+1])) {
+ var d = {action: "insert", start: data[i], lines: data[i+1]};
+ } else {
+ var d = {action: "remove", start: data[i], end: data[i+1]};
+ }
+ doc.applyDelta(d, true);
+ }
+ }
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
+};
+
+(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() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+ace.define("ace/mode/lua/luaparse",["require","exports","module"], function(require, exports, module) {
+
+(function (root, name, factory) {
+ factory(exports)
+}(this, 'luaparse', function (exports) {
+ 'use strict';
+
+ exports.version = '0.1.4';
+
+ var input, options, length;
+ var defaultOptions = exports.defaultOptions = {
+ wait: false
+ , comments: true
+ , scope: false
+ , locations: false
+ , ranges: false
+ };
+
+ var EOF = 1, StringLiteral = 2, Keyword = 4, Identifier = 8
+ , NumericLiteral = 16, Punctuator = 32, BooleanLiteral = 64
+ , NilLiteral = 128, VarargLiteral = 256;
+
+ exports.tokenTypes = { EOF: EOF, StringLiteral: StringLiteral
+ , Keyword: Keyword, Identifier: Identifier, NumericLiteral: NumericLiteral
+ , Punctuator: Punctuator, BooleanLiteral: BooleanLiteral
+ , NilLiteral: NilLiteral, VarargLiteral: VarargLiteral
+ };
+
+ var errors = exports.errors = {
+ unexpected: 'Unexpected %1 \'%2\' near \'%3\''
+ , expected: '\'%1\' expected near \'%2\''
+ , expectedToken: '%1 expected near \'%2\''
+ , unfinishedString: 'unfinished string near \'%1\''
+ , malformedNumber: 'malformed number near \'%1\''
+ };
+
+ var ast = exports.ast = {
+ labelStatement: function(label) {
+ return {
+ type: 'LabelStatement'
+ , label: label
+ };
+ }
+
+ , breakStatement: function() {
+ return {
+ type: 'BreakStatement'
+ };
+ }
+
+ , gotoStatement: function(label) {
+ return {
+ type: 'GotoStatement'
+ , label: label
+ };
+ }
+
+ , returnStatement: function(args) {
+ return {
+ type: 'ReturnStatement'
+ , 'arguments': args
+ };
+ }
+
+ , ifStatement: function(clauses) {
+ return {
+ type: 'IfStatement'
+ , clauses: clauses
+ };
+ }
+ , ifClause: function(condition, body) {
+ return {
+ type: 'IfClause'
+ , condition: condition
+ , body: body
+ };
+ }
+ , elseifClause: function(condition, body) {
+ return {
+ type: 'ElseifClause'
+ , condition: condition
+ , body: body
+ };
+ }
+ , elseClause: function(body) {
+ return {
+ type: 'ElseClause'
+ , body: body
+ };
+ }
+
+ , whileStatement: function(condition, body) {
+ return {
+ type: 'WhileStatement'
+ , condition: condition
+ , body: body
+ };
+ }
+
+ , doStatement: function(body) {
+ return {
+ type: 'DoStatement'
+ , body: body
+ };
+ }
+
+ , repeatStatement: function(condition, body) {
+ return {
+ type: 'RepeatStatement'
+ , condition: condition
+ , body: body
+ };
+ }
+
+ , localStatement: function(variables, init) {
+ return {
+ type: 'LocalStatement'
+ , variables: variables
+ , init: init
+ };
+ }
+
+ , assignmentStatement: function(variables, init) {
+ return {
+ type: 'AssignmentStatement'
+ , variables: variables
+ , init: init
+ };
+ }
+
+ , callStatement: function(expression) {
+ return {
+ type: 'CallStatement'
+ , expression: expression
+ };
+ }
+
+ , functionStatement: function(identifier, parameters, isLocal, body) {
+ return {
+ type: 'FunctionDeclaration'
+ , identifier: identifier
+ , isLocal: isLocal
+ , parameters: parameters
+ , body: body
+ };
+ }
+
+ , forNumericStatement: function(variable, start, end, step, body) {
+ return {
+ type: 'ForNumericStatement'
+ , variable: variable
+ , start: start
+ , end: end
+ , step: step
+ , body: body
+ };
+ }
+
+ , forGenericStatement: function(variables, iterators, body) {
+ return {
+ type: 'ForGenericStatement'
+ , variables: variables
+ , iterators: iterators
+ , body: body
+ };
+ }
+
+ , chunk: function(body) {
+ return {
+ type: 'Chunk'
+ , body: body
+ };
+ }
+
+ , identifier: function(name) {
+ return {
+ type: 'Identifier'
+ , name: name
+ };
+ }
+
+ , literal: function(type, value, raw) {
+ type = (type === StringLiteral) ? 'StringLiteral'
+ : (type === NumericLiteral) ? 'NumericLiteral'
+ : (type === BooleanLiteral) ? 'BooleanLiteral'
+ : (type === NilLiteral) ? 'NilLiteral'
+ : 'VarargLiteral';
+
+ return {
+ type: type
+ , value: value
+ , raw: raw
+ };
+ }
+
+ , tableKey: function(key, value) {
+ return {
+ type: 'TableKey'
+ , key: key
+ , value: value
+ };
+ }
+ , tableKeyString: function(key, value) {
+ return {
+ type: 'TableKeyString'
+ , key: key
+ , value: value
+ };
+ }
+ , tableValue: function(value) {
+ return {
+ type: 'TableValue'
+ , value: value
+ };
+ }
+
+
+ , tableConstructorExpression: function(fields) {
+ return {
+ type: 'TableConstructorExpression'
+ , fields: fields
+ };
+ }
+ , binaryExpression: function(operator, left, right) {
+ var type = ('and' === operator || 'or' === operator) ?
+ 'LogicalExpression' :
+ 'BinaryExpression';
+
+ return {
+ type: type
+ , operator: operator
+ , left: left
+ , right: right
+ };
+ }
+ , unaryExpression: function(operator, argument) {
+ return {
+ type: 'UnaryExpression'
+ , operator: operator
+ , argument: argument
+ };
+ }
+ , memberExpression: function(base, indexer, identifier) {
+ return {
+ type: 'MemberExpression'
+ , indexer: indexer
+ , identifier: identifier
+ , base: base
+ };
+ }
+
+ , indexExpression: function(base, index) {
+ return {
+ type: 'IndexExpression'
+ , base: base
+ , index: index
+ };
+ }
+
+ , callExpression: function(base, args) {
+ return {
+ type: 'CallExpression'
+ , base: base
+ , 'arguments': args
+ };
+ }
+
+ , tableCallExpression: function(base, args) {
+ return {
+ type: 'TableCallExpression'
+ , base: base
+ , 'arguments': args
+ };
+ }
+
+ , stringCallExpression: function(base, argument) {
+ return {
+ type: 'StringCallExpression'
+ , base: base
+ , argument: argument
+ };
+ }
+
+ , comment: function(value, raw) {
+ return {
+ type: 'Comment'
+ , value: value
+ , raw: raw
+ };
+ }
+ };
+
+ function finishNode(node) {
+ if (trackLocations) {
+ var location = locations.pop();
+ location.complete();
+ if (options.locations) node.loc = location.loc;
+ if (options.ranges) node.range = location.range;
+ }
+ return node;
+ }
+
+ var slice = Array.prototype.slice
+ , toString = Object.prototype.toString
+ , indexOf = function indexOf(array, element) {
+ for (var i = 0, length = array.length; i < length; i++) {
+ if (array[i] === element) return i;
+ }
+ return -1;
+ };
+
+ function indexOfObject(array, property, element) {
+ for (var i = 0, length = array.length; i < length; i++) {
+ if (array[i][property] === element) return i;
+ }
+ return -1;
+ }
+
+ function sprintf(format) {
+ var args = slice.call(arguments, 1);
+ format = format.replace(/%(\d)/g, function (match, index) {
+ return '' + args[index - 1] || '';
+ });
+ return format;
+ }
+
+ function extend() {
+ var args = slice.call(arguments)
+ , dest = {}
+ , src, prop;
+
+ for (var i = 0, length = args.length; i < length; i++) {
+ src = args[i];
+ for (prop in src) if (src.hasOwnProperty(prop)) {
+ dest[prop] = src[prop];
+ }
+ }
+ return dest;
+ }
+
+ function raise(token) {
+ var message = sprintf.apply(null, slice.call(arguments, 1))
+ , error, col;
+
+ if ('undefined' !== typeof token.line) {
+ col = token.range[0] - token.lineStart;
+ error = new SyntaxError(sprintf('[%1:%2] %3', token.line, col, message));
+ error.line = token.line;
+ error.index = token.range[0];
+ error.column = col;
+ } else {
+ col = index - lineStart + 1;
+ error = new SyntaxError(sprintf('[%1:%2] %3', line, col, message));
+ error.index = index;
+ error.line = line;
+ error.column = col;
+ }
+ throw error;
+ }
+
+ function raiseUnexpectedToken(type, token) {
+ raise(token, errors.expectedToken, type, token.value);
+ }
+
+ function unexpected(found, near) {
+ if ('undefined' === typeof near) near = lookahead.value;
+ if ('undefined' !== typeof found.type) {
+ var type;
+ switch (found.type) {
+ case StringLiteral: type = 'string'; break;
+ case Keyword: type = 'keyword'; break;
+ case Identifier: type = 'identifier'; break;
+ case NumericLiteral: type = 'number'; break;
+ case Punctuator: type = 'symbol'; break;
+ case BooleanLiteral: type = 'boolean'; break;
+ case NilLiteral:
+ return raise(found, errors.unexpected, 'symbol', 'nil', near);
+ }
+ return raise(found, errors.unexpected, type, found.value, near);
+ }
+ return raise(found, errors.unexpected, 'symbol', found, near);
+ }
+
+ var index
+ , token
+ , previousToken
+ , lookahead
+ , comments
+ , tokenStart
+ , line
+ , lineStart;
+
+ exports.lex = lex;
+
+ function lex() {
+ skipWhiteSpace();
+ while (45 === input.charCodeAt(index) &&
+ 45 === input.charCodeAt(index + 1)) {
+ scanComment();
+ skipWhiteSpace();
+ }
+ if (index >= length) return {
+ type : EOF
+ , value: '<eof>'
+ , line: line
+ , lineStart: lineStart
+ , range: [index, index]
+ };
+
+ var charCode = input.charCodeAt(index)
+ , next = input.charCodeAt(index + 1);
+ tokenStart = index;
+ if (isIdentifierStart(charCode)) return scanIdentifierOrKeyword();
+
+ switch (charCode) {
+ case 39: case 34: // '"
+ return scanStringLiteral();
+ case 48: case 49: case 50: case 51: case 52: case 53:
+ case 54: case 55: case 56: case 57:
+ return scanNumericLiteral();
+
+ case 46: // .
+ if (isDecDigit(next)) return scanNumericLiteral();
+ if (46 === next) {
+ if (46 === input.charCodeAt(index + 2)) return scanVarargLiteral();
+ return scanPunctuator('..');
+ }
+ return scanPunctuator('.');
+
+ case 61: // =
+ if (61 === next) return scanPunctuator('==');
+ return scanPunctuator('=');
+
+ case 62: // >
+ if (61 === next) return scanPunctuator('>=');
+ return scanPunctuator('>');
+
+ case 60: // <
+ if (61 === next) return scanPunctuator('<=');
+ return scanPunctuator('<');
+
+ case 126: // ~
+ if (61 === next) return scanPunctuator('~=');
+ return scanPunctuator('~');
+
+ case 58: // :
+ if (58 === next) return scanPunctuator('::');
+ return scanPunctuator(':');
+
+ case 91: // [
+ if (91 === next || 61 === next) return scanLongStringLiteral();
+ return scanPunctuator('[');
+ case 42: case 47: case 94: case 37: case 44: case 123: case 125:
+ case 93: case 40: case 41: case 59: case 35: case 45: case 43:
+ return scanPunctuator(input.charAt(index));
+ }
+
+ return unexpected(input.charAt(index));
+ }
+
+ function skipWhiteSpace() {
+ while (index < length) {
+ var charCode = input.charCodeAt(index);
+ if (isWhiteSpace(charCode)) {
+ index++;
+ } else if (isLineTerminator(charCode)) {
+ line++;
+ lineStart = ++index;
+ } else {
+ break;
+ }
+ }
+ }
+
+ function scanIdentifierOrKeyword() {
+ var value, type;
+ while (isIdentifierPart(input.charCodeAt(++index)));
+ value = input.slice(tokenStart, index);
+ if (isKeyword(value)) {
+ type = Keyword;
+ } else if ('true' === value || 'false' === value) {
+ type = BooleanLiteral;
+ value = ('true' === value);
+ } else if ('nil' === value) {
+ type = NilLiteral;
+ value = null;
+ } else {
+ type = Identifier;
+ }
+
+ return {
+ type: type
+ , value: value
+ , line: line
+ , lineStart: lineStart
+ , range: [tokenStart, index]
+ };
+ }
+
+ function scanPunctuator(value) {
+ index += value.length;
+ return {
+ type: Punctuator
+ , value: value
+ , line: line
+ , lineStart: lineStart
+ , range: [tokenStart, index]
+ };
+ }
+
+ function scanVarargLiteral() {
+ index += 3;
+ return {
+ type: VarargLiteral
+ , value: '...'
+ , line: line
+ , lineStart: lineStart
+ , range: [tokenStart, index]
+ };
+ }
+
+ function scanStringLiteral() {
+ var delimiter = input.charCodeAt(index++)
+ , stringStart = index
+ , string = ''
+ , charCode;
+
+ while (index < length) {
+ charCode = input.charCodeAt(index++);
+ if (delimiter === charCode) break;
+ if (92 === charCode) { // \
+ string += input.slice(stringStart, index - 1) + readEscapeSequence();
+ stringStart = index;
+ }
+ else if (index >= length || isLineTerminator(charCode)) {
+ string += input.slice(stringStart, index - 1);
+ raise({}, errors.unfinishedString, string + String.fromCharCode(charCode));
+ }
+ }
+ string += input.slice(stringStart, index - 1);
+
+ return {
+ type: StringLiteral
+ , value: string
+ , line: line
+ , lineStart: lineStart
+ , range: [tokenStart, index]
+ };
+ }
+
+ function scanLongStringLiteral() {
+ var string = readLongString();
+ if (false === string) raise(token, errors.expected, '[', token.value);
+
+ return {
+ type: StringLiteral
+ , value: string
+ , line: line
+ , lineStart: lineStart
+ , range: [tokenStart, index]
+ };
+ }
+
+ function scanNumericLiteral() {
+ var character = input.charAt(index)
+ , next = input.charAt(index + 1);
+
+ var value = ('0' === character && 'xX'.indexOf(next || null) >= 0) ?
+ readHexLiteral() : readDecLiteral();
+
+ return {
+ type: NumericLiteral
+ , value: value
+ , line: line
+ , lineStart: lineStart
+ , range: [tokenStart, index]
+ };
+ }
+
+ function readHexLiteral() {
+ var fraction = 0 // defaults to 0 as it gets summed
+ , binaryExponent = 1 // defaults to 1 as it gets multiplied
+ , binarySign = 1 // positive
+ , digit, fractionStart, exponentStart, digitStart;
+
+ digitStart = index += 2; // Skip 0x part
+ if (!isHexDigit(input.charCodeAt(index)))
+ raise({}, errors.malformedNumber, input.slice(tokenStart, index));
+
+ while (isHexDigit(input.charCodeAt(index))) index++;
+ digit = parseInt(input.slice(digitStart, index), 16);
+ if ('.' === input.charAt(index)) {
+ fractionStart = ++index;
+
+ while (isHexDigit(input.charCodeAt(index))) index++;
+ fraction = input.slice(fractionStart, index);
+ fraction = (fractionStart === index) ? 0
+ : parseInt(fraction, 16) / Math.pow(16, index - fractionStart);
+ }
+ if ('pP'.indexOf(input.charAt(index) || null) >= 0) {
+ index++;
+ if ('+-'.indexOf(input.charAt(index) || null) >= 0)
+ binarySign = ('+' === input.charAt(index++)) ? 1 : -1;
+
+ exponentStart = index;
+ if (!isDecDigit(input.charCodeAt(index)))
+ raise({}, errors.malformedNumber, input.slice(tokenStart, index));
+
+ while (isDecDigit(input.charCodeAt(index))) index++;
+ binaryExponent = input.slice(exponentStart, index);
+ binaryExponent = Math.pow(2, binaryExponent * binarySign);
+ }
+
+ return (digit + fraction) * binaryExponent;
+ }
+
+ function readDecLiteral() {
+ while (isDecDigit(input.charCodeAt(index))) index++;
+ if ('.' === input.charAt(index)) {
+ index++;
+ while (isDecDigit(input.charCodeAt(index))) index++;
+ }
+ if ('eE'.indexOf(input.charAt(index) || null) >= 0) {
+ index++;
+ if ('+-'.indexOf(input.charAt(index) || null) >= 0) index++;
+ if (!isDecDigit(input.charCodeAt(index)))
+ raise({}, errors.malformedNumber, input.slice(tokenStart, index));
+
+ while (isDecDigit(input.charCodeAt(index))) index++;
+ }
+
+ return parseFloat(input.slice(tokenStart, index));
+ }
+
+ function readEscapeSequence() {
+ var sequenceStart = index;
+ switch (input.charAt(index)) {
+ case 'n': index++; return '\n';
+ case 'r': index++; return '\r';
+ case 't': index++; return '\t';
+ case 'v': index++; return '\x0B';
+ case 'b': index++; return '\b';
+ case 'f': index++; return '\f';
+ case 'z': index++; skipWhiteSpace(); return '';
+ case 'x':
+ if (isHexDigit(input.charCodeAt(index + 1)) &&
+ isHexDigit(input.charCodeAt(index + 2))) {
+ index += 3;
+ return '\\' + input.slice(sequenceStart, index);
+ }
+ return '\\' + input.charAt(index++);
+ default:
+ if (isDecDigit(input.charCodeAt(index))) {
+ while (isDecDigit(input.charCodeAt(++index)));
+ return '\\' + input.slice(sequenceStart, index);
+ }
+ return input.charAt(index++);
+ }
+ }
+
+ function scanComment() {
+ tokenStart = index;
+ index += 2; // --
+
+ var character = input.charAt(index)
+ , content = ''
+ , isLong = false
+ , commentStart = index
+ , lineStartComment = lineStart
+ , lineComment = line;
+
+ if ('[' === character) {
+ content = readLongString();
+ if (false === content) content = character;
+ else isLong = true;
+ }
+ if (!isLong) {
+ while (index < length) {
+ if (isLineTerminator(input.charCodeAt(index))) break;
+ index++;
+ }
+ if (options.comments) content = input.slice(commentStart, index);
+ }
+
+ if (options.comments) {
+ var node = ast.comment(content, input.slice(tokenStart, index));
+ if (options.locations) {
+ node.loc = {
+ start: { line: lineComment, column: tokenStart - lineStartComment }
+ , end: { line: line, column: index - lineStart }
+ };
+ }
+ if (options.ranges) {
+ node.range = [tokenStart, index];
+ }
+ comments.push(node);
+ }
+ }
+
+ function readLongString() {
+ var level = 0
+ , content = ''
+ , terminator = false
+ , character, stringStart;
+
+ index++; // [
+ while ('=' === input.charAt(index + level)) level++;
+ if ('[' !== input.charAt(index + level)) return false;
+
+ index += level + 1;
+ if (isLineTerminator(input.charCodeAt(index))) {
+ line++;
+ lineStart = index++;
+ }
+
+ stringStart = index;
+ while (index < length) {
+ character = input.charAt(index++);
+ if (isLineTerminator(character.charCodeAt(0))) {
+ line++;
+ lineStart = index;
+ }
+ if (']' === character) {
+ terminator = true;
+ for (var i = 0; i < level; i++) {
+ if ('=' !== input.charAt(index + i)) terminator = false;
+ }
+ if (']' !== input.charAt(index + level)) terminator = false;
+ }
+ if (terminator) break;
+ }
+ content += input.slice(stringStart, index - 1);
+ index += level + 1;
+
+ return content;
+ }
+
+ function next() {
+ previousToken = token;
+ token = lookahead;
+ lookahead = lex();
+ }
+
+ function consume(value) {
+ if (value === token.value) {
+ next();
+ return true;
+ }
+ return false;
+ }
+
+ function expect(value) {
+ if (value === token.value) next();
+ else raise(token, errors.expected, value, token.value);
+ }
+
+ function isWhiteSpace(charCode) {
+ return 9 === charCode || 32 === charCode || 0xB === charCode || 0xC === charCode;
+ }
+
+ function isLineTerminator(charCode) {
+ return 10 === charCode || 13 === charCode;
+ }
+
+ function isDecDigit(charCode) {
+ return charCode >= 48 && charCode <= 57;
+ }
+
+ function isHexDigit(charCode) {
+ return (charCode >= 48 && charCode <= 57) || (charCode >= 97 && charCode <= 102) || (charCode >= 65 && charCode <= 70);
+ }
+
+ function isIdentifierStart(charCode) {
+ return (charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode;
+ }
+
+ function isIdentifierPart(charCode) {
+ return (charCode >= 65 && charCode <= 90) || (charCode >= 97 && charCode <= 122) || 95 === charCode || (charCode >= 48 && charCode <= 57);
+ }
+
+ function isKeyword(id) {
+ switch (id.length) {
+ case 2:
+ return 'do' === id || 'if' === id || 'in' === id || 'or' === id;
+ case 3:
+ return 'and' === id || 'end' === id || 'for' === id || 'not' === id;
+ case 4:
+ return 'else' === id || 'goto' === id || 'then' === id;
+ case 5:
+ return 'break' === id || 'local' === id || 'until' === id || 'while' === id;
+ case 6:
+ return 'elseif' === id || 'repeat' === id || 'return' === id;
+ case 8:
+ return 'function' === id;
+ }
+ return false;
+ }
+
+ function isUnary(token) {
+ if (Punctuator === token.type) return '#-~'.indexOf(token.value) >= 0;
+ if (Keyword === token.type) return 'not' === token.value;
+ return false;
+ }
+ function isCallExpression(expression) {
+ switch (expression.type) {
+ case 'CallExpression':
+ case 'TableCallExpression':
+ case 'StringCallExpression':
+ return true;
+ }
+ return false;
+ }
+
+ function isBlockFollow(token) {
+ if (EOF === token.type) return true;
+ if (Keyword !== token.type) return false;
+ switch (token.value) {
+ case 'else': case 'elseif':
+ case 'end': case 'until':
+ return true;
+ default:
+ return false;
+ }
+ }
+ var scopes
+ , scopeDepth
+ , globals;
+ function createScope() {
+ scopes.push(Array.apply(null, scopes[scopeDepth++]));
+ }
+ function exitScope() {
+ scopes.pop();
+ scopeDepth--;
+ }
+ function scopeIdentifierName(name) {
+ if (-1 !== indexOf(scopes[scopeDepth], name)) return;
+ scopes[scopeDepth].push(name);
+ }
+ function scopeIdentifier(node) {
+ scopeIdentifierName(node.name);
+ attachScope(node, true);
+ }
+ function attachScope(node, isLocal) {
+ if (!isLocal && -1 === indexOfObject(globals, 'name', node.name))
+ globals.push(node);
+
+ node.isLocal = isLocal;
+ }
+ function scopeHasName(name) {
+ return (-1 !== indexOf(scopes[scopeDepth], name));
+ }
+
+ var locations = []
+ , trackLocations;
+
+ function createLocationMarker() {
+ return new Marker(token);
+ }
+
+ function Marker(token) {
+ if (options.locations) {
+ this.loc = {
+ start: {
+ line: token.line
+ , column: token.range[0] - token.lineStart
+ }
+ , end: {
+ line: 0
+ , column: 0
+ }
+ };
+ }
+ if (options.ranges) this.range = [token.range[0], 0];
+ }
+ Marker.prototype.complete = function() {
+ if (options.locations) {
+ this.loc.end.line = previousToken.line;
+ this.loc.end.column = previousToken.range[1] - previousToken.lineStart;
+ }
+ if (options.ranges) {
+ this.range[1] = previousToken.range[1];
+ }
+ };
+ function markLocation() {
+ if (trackLocations) locations.push(createLocationMarker());
+ }
+ function pushLocation(marker) {
+ if (trackLocations) locations.push(marker);
+ }
+
+ function parseChunk() {
+ next();
+ markLocation();
+ var body = parseBlock();
+ if (EOF !== token.type) unexpected(token);
+ if (trackLocations && !body.length) previousToken = token;
+ return finishNode(ast.chunk(body));
+ }
+
+ function parseBlock(terminator) {
+ var block = []
+ , statement;
+ if (options.scope) createScope();
+
+ while (!isBlockFollow(token)) {
+ if ('return' === token.value) {
+ block.push(parseStatement());
+ break;
+ }
+ statement = parseStatement();
+ if (statement) block.push(statement);
+ }
+
+ if (options.scope) exitScope();
+ return block;
+ }
+
+ function parseStatement() {
+ markLocation();
+ if (Keyword === token.type) {
+ switch (token.value) {
+ case 'local': next(); return parseLocalStatement();
+ case 'if': next(); return parseIfStatement();
+ case 'return': next(); return parseReturnStatement();
+ case 'function': next();
+ var name = parseFunctionName();
+ return parseFunctionDeclaration(name);
+ case 'while': next(); return parseWhileStatement();
+ case 'for': next(); return parseForStatement();
+ case 'repeat': next(); return parseRepeatStatement();
+ case 'break': next(); return parseBreakStatement();
+ case 'do': next(); return parseDoStatement();
+ case 'goto': next(); return parseGotoStatement();
+ }
+ }
+
+ if (Punctuator === token.type) {
+ if (consume('::')) return parseLabelStatement();
+ }
+ if (trackLocations) locations.pop();
+ if (consume(';')) return;
+
+ return parseAssignmentOrCallStatement();
+ }
+
+ function parseLabelStatement() {
+ var name = token.value
+ , label = parseIdentifier();
+
+ if (options.scope) {
+ scopeIdentifierName('::' + name + '::');
+ attachScope(label, true);
+ }
+
+ expect('::');
+ return finishNode(ast.labelStatement(label));
+ }
+
+ function parseBreakStatement() {
+ return finishNode(ast.breakStatement());
+ }
+
+ function parseGotoStatement() {
+ var name = token.value
+ , label = parseIdentifier();
+
+ if (options.scope) label.isLabel = scopeHasName('::' + name + '::');
+ return finishNode(ast.gotoStatement(label));
+ }
+
+ function parseDoStatement() {
+ var body = parseBlock();
+ expect('end');
+ return finishNode(ast.doStatement(body));
+ }
+
+ function parseWhileStatement() {
+ var condition = parseExpectedExpression();
+ expect('do');
+ var body = parseBlock();
+ expect('end');
+ return finishNode(ast.whileStatement(condition, body));
+ }
+
+ function parseRepeatStatement() {
+ var body = parseBlock();
+ expect('until');
+ var condition = parseExpectedExpression();
+ return finishNode(ast.repeatStatement(condition, body));
+ }
+
+ function parseReturnStatement() {
+ var expressions = [];
+
+ if ('end' !== token.value) {
+ var expression = parseExpression();
+ if (null != expression) expressions.push(expression);
+ while (consume(',')) {
+ expression = parseExpectedExpression();
+ expressions.push(expression);
+ }
+ consume(';'); // grammar tells us ; is optional here.
+ }
+ return finishNode(ast.returnStatement(expressions));
+ }
+
+ function parseIfStatement() {
+ var clauses = []
+ , condition
+ , body
+ , marker;
+ if (trackLocations) {
+ marker = locations[locations.length - 1];
+ locations.push(marker);
+ }
+ condition = parseExpectedExpression();
+ expect('then');
+ body = parseBlock();
+ clauses.push(finishNode(ast.ifClause(condition, body)));
+
+ if (trackLocations) marker = createLocationMarker();
+ while (consume('elseif')) {
+ pushLocation(marker);
+ condition = parseExpectedExpression();
+ expect('then');
+ body = parseBlock();
+ clauses.push(finishNode(ast.elseifClause(condition, body)));
+ if (trackLocations) marker = createLocationMarker();
+ }
+
+ if (consume('else')) {
+ if (trackLocations) {
+ marker = new Marker(previousToken);
+ locations.push(marker);
+ }
+ body = parseBlock();
+ clauses.push(finishNode(ast.elseClause(body)));
+ }
+
+ expect('end');
+ return finishNode(ast.ifStatement(clauses));
+ }
+
+ function parseForStatement() {
+ var variable = parseIdentifier()
+ , body;
+ if (options.scope) scopeIdentifier(variable);
+ if (consume('=')) {
+ var start = parseExpectedExpression();
+ expect(',');
+ var end = parseExpectedExpression();
+ var step = consume(',') ? parseExpectedExpression() : null;
+
+ expect('do');
+ body = parseBlock();
+ expect('end');
+
+ return finishNode(ast.forNumericStatement(variable, start, end, step, body));
+ }
+ else {
+ var variables = [variable];
+ while (consume(',')) {
+ variable = parseIdentifier();
+ if (options.scope) scopeIdentifier(variable);
+ variables.push(variable);
+ }
+ expect('in');
+ var iterators = [];
+ do {
+ var expression = parseExpectedExpression();
+ iterators.push(expression);
+ } while (consume(','));
+
+ expect('do');
+ body = parseBlock();
+ expect('end');
+
+ return finishNode(ast.forGenericStatement(variables, iterators, body));
+ }
+ }
+
+ function parseLocalStatement() {
+ var name;
+
+ if (Identifier === token.type) {
+ var variables = []
+ , init = [];
+
+ do {
+ name = parseIdentifier();
+
+ variables.push(name);
+ } while (consume(','));
+
+ if (consume('=')) {
+ do {
+ var expression = parseExpectedExpression();
+ init.push(expression);
+ } while (consume(','));
+ }
+ if (options.scope) {
+ for (var i = 0, l = variables.length; i < l; i++) {
+ scopeIdentifier(variables[i]);
+ }
+ }
+
+ return finishNode(ast.localStatement(variables, init));
+ }
+ if (consume('function')) {
+ name = parseIdentifier();
+ if (options.scope) scopeIdentifier(name);
+ return parseFunctionDeclaration(name, true);
+ } else {
+ raiseUnexpectedToken('<name>', token);
+ }
+ }
+
+ function parseAssignmentOrCallStatement() {
+ var previous = token
+ , expression, marker;
+
+ if (trackLocations) marker = createLocationMarker();
+ expression = parsePrefixExpression();
+
+ if (null == expression) return unexpected(token);
+ if (',='.indexOf(token.value) >= 0) {
+ var variables = [expression]
+ , init = []
+ , exp;
+
+ while (consume(',')) {
+ exp = parsePrefixExpression();
+ if (null == exp) raiseUnexpectedToken('<expression>', token);
+ variables.push(exp);
+ }
+ expect('=');
+ do {
+ exp = parseExpectedExpression();
+ init.push(exp);
+ } while (consume(','));
+
+ pushLocation(marker);
+ return finishNode(ast.assignmentStatement(variables, init));
+ }
+ if (isCallExpression(expression)) {
+ pushLocation(marker);
+ return finishNode(ast.callStatement(expression));
+ }
+ return unexpected(previous);
+ }
+
+ function parseIdentifier() {
+ markLocation();
+ var identifier = token.value;
+ if (Identifier !== token.type) raiseUnexpectedToken('<name>', token);
+ next();
+ return finishNode(ast.identifier(identifier));
+ }
+
+ function parseFunctionDeclaration(name, isLocal) {
+ var parameters = [];
+ expect('(');
+ if (!consume(')')) {
+ while (true) {
+ if (Identifier === token.type) {
+ var parameter = parseIdentifier();
+ if (options.scope) scopeIdentifier(parameter);
+
+ parameters.push(parameter);
+
+ if (consume(',')) continue;
+ else if (consume(')')) break;
+ }
+ else if (VarargLiteral === token.type) {
+ parameters.push(parsePrimaryExpression());
+ expect(')');
+ break;
+ } else {
+ raiseUnexpectedToken('<name> or \'...\'', token);
+ }
+ }
+ }
+
+ var body = parseBlock();
+ expect('end');
+
+ isLocal = isLocal || false;
+ return finishNode(ast.functionStatement(name, parameters, isLocal, body));
+ }
+
+ function parseFunctionName() {
+ var base, name, marker;
+
+ if (trackLocations) marker = createLocationMarker();
+ base = parseIdentifier();
+
+ if (options.scope) attachScope(base, false);
+
+ while (consume('.')) {
+ pushLocation(marker);
+ name = parseIdentifier();
+ if (options.scope) attachScope(name, false);
+ base = finishNode(ast.memberExpression(base, '.', name));
+ }
+
+ if (consume(':')) {
+ pushLocation(marker);
+ name = parseIdentifier();
+ if (options.scope) attachScope(name, false);
+ base = finishNode(ast.memberExpression(base, ':', name));
+ }
+
+ return base;
+ }
+
+ function parseTableConstructor() {
+ var fields = []
+ , key, value;
+
+ while (true) {
+ markLocation();
+ if (Punctuator === token.type && consume('[')) {
+ key = parseExpectedExpression();
+ expect(']');
+ expect('=');
+ value = parseExpectedExpression();
+ fields.push(finishNode(ast.tableKey(key, value)));
+ } else if (Identifier === token.type) {
+ key = parseExpectedExpression();
+ if (consume('=')) {
+ value = parseExpectedExpression();
+ fields.push(finishNode(ast.tableKeyString(key, value)));
+ } else {
+ fields.push(finishNode(ast.tableValue(key)));
+ }
+ } else {
+ if (null == (value = parseExpression())) {
+ locations.pop();
+ break;
+ }
+ fields.push(finishNode(ast.tableValue(value)));
+ }
+ if (',;'.indexOf(token.value) >= 0) {
+ next();
+ continue;
+ }
+ if ('}' === token.value) break;
+ }
+ expect('}');
+ return finishNode(ast.tableConstructorExpression(fields));
+ }
+
+ function parseExpression() {
+ var expression = parseSubExpression(0);
+ return expression;
+ }
+
+ function parseExpectedExpression() {
+ var expression = parseExpression();
+ if (null == expression) raiseUnexpectedToken('<expression>', token);
+ else return expression;
+ }
+
+ function binaryPrecedence(operator) {
+ var charCode = operator.charCodeAt(0)
+ , length = operator.length;
+
+ if (1 === length) {
+ switch (charCode) {
+ case 94: return 10; // ^
+ case 42: case 47: case 37: return 7; // * / %
+ case 43: case 45: return 6; // + -
+ case 60: case 62: return 3; // < >
+ }
+ } else if (2 === length) {
+ switch (charCode) {
+ case 46: return 5; // ..
+ case 60: case 62: case 61: case 126: return 3; // <= >= == ~=
+ case 111: return 1; // or
+ }
+ } else if (97 === charCode && 'and' === operator) return 2;
+ return 0;
+ }
+
+ function parseSubExpression(minPrecedence) {
+ var operator = token.value
+ , expression, marker;
+
+ if (trackLocations) marker = createLocationMarker();
+ if (isUnary(token)) {
+ markLocation();
+ next();
+ var argument = parseSubExpression(8);
+ if (argument == null) raiseUnexpectedToken('<expression>', token);
+ expression = finishNode(ast.unaryExpression(operator, argument));
+ }
+ if (null == expression) {
+ expression = parsePrimaryExpression();
+ if (null == expression) {
+ expression = parsePrefixExpression();
+ }
+ }
+ if (null == expression) return null;
+
+ var precedence;
+ while (true) {
+ operator = token.value;
+
+ precedence = (Punctuator === token.type || Keyword === token.type) ?
+ binaryPrecedence(operator) : 0;
+
+ if (precedence === 0 || precedence <= minPrecedence) break;
+ if ('^' === operator || '..' === operator) precedence--;
+ next();
+ var right = parseSubExpression(precedence);
+ if (null == right) raiseUnexpectedToken('<expression>', token);
+ if (trackLocations) locations.push(marker);
+ expression = finishNode(ast.binaryExpression(operator, expression, right));
+
+ }
+ return expression;
+ }
+
+ function parsePrefixExpression() {
+ var base, name, marker
+ , isLocal;
+
+ if (trackLocations) marker = createLocationMarker();
+ if (Identifier === token.type) {
+ name = token.value;
+ base = parseIdentifier();
+ if (options.scope) attachScope(base, isLocal = scopeHasName(name));
+ } else if (consume('(')) {
+ base = parseExpectedExpression();
+ expect(')');
+ if (options.scope) isLocal = base.isLocal;
+ } else {
+ return null;
+ }
+ var expression, identifier;
+ while (true) {
+ if (Punctuator === token.type) {
+ switch (token.value) {
+ case '[':
+ pushLocation(marker);
+ next();
+ expression = parseExpectedExpression();
+ base = finishNode(ast.indexExpression(base, expression));
+ expect(']');
+ break;
+ case '.':
+ pushLocation(marker);
+ next();
+ identifier = parseIdentifier();
+ if (options.scope) attachScope(identifier, isLocal);
+ base = finishNode(ast.memberExpression(base, '.', identifier));
+ break;
+ case ':':
+ pushLocation(marker);
+ next();
+ identifier = parseIdentifier();
+ if (options.scope) attachScope(identifier, isLocal);
+ base = finishNode(ast.memberExpression(base, ':', identifier));
+ pushLocation(marker);
+ base = parseCallExpression(base);
+ break;
+ case '(': case '{': // args
+ pushLocation(marker);
+ base = parseCallExpression(base);
+ break;
+ default:
+ return base;
+ }
+ } else if (StringLiteral === token.type) {
+ pushLocation(marker);
+ base = parseCallExpression(base);
+ } else {
+ break;
+ }
+ }
+
+ return base;
+ }
+
+ function parseCallExpression(base) {
+ if (Punctuator === token.type) {
+ switch (token.value) {
+ case '(':
+ next();
+ var expressions = [];
+ var expression = parseExpression();
+ if (null != expression) expressions.push(expression);
+ while (consume(',')) {
+ expression = parseExpectedExpression();
+ expressions.push(expression);
+ }
+
+ expect(')');
+ return finishNode(ast.callExpression(base, expressions));
+
+ case '{':
+ markLocation();
+ next();
+ var table = parseTableConstructor();
+ return finishNode(ast.tableCallExpression(base, table));
+ }
+ } else if (StringLiteral === token.type) {
+ return finishNode(ast.stringCallExpression(base, parsePrimaryExpression()));
+ }
+
+ raiseUnexpectedToken('function arguments', token);
+ }
+
+ function parsePrimaryExpression() {
+ var literals = StringLiteral | NumericLiteral | BooleanLiteral | NilLiteral | VarargLiteral
+ , value = token.value
+ , type = token.type
+ , marker;
+
+ if (trackLocations) marker = createLocationMarker();
+
+ if (type & literals) {
+ pushLocation(marker);
+ var raw = input.slice(token.range[0], token.range[1]);
+ next();
+ return finishNode(ast.literal(type, value, raw));
+ } else if (Keyword === type && 'function' === value) {
+ pushLocation(marker);
+ next();
+ return parseFunctionDeclaration(null);
+ } else if (consume('{')) {
+ pushLocation(marker);
+ return parseTableConstructor();
+ }
+ }
+
+ exports.parse = parse;
+
+ function parse(_input, _options) {
+ if ('undefined' === typeof _options && 'object' === typeof _input) {
+ _options = _input;
+ _input = undefined;
+ }
+ if (!_options) _options = {};
+
+ input = _input || '';
+ options = extend(defaultOptions, _options);
+ index = 0;
+ line = 1;
+ lineStart = 0;
+ length = input.length;
+ scopes = [[]];
+ scopeDepth = 0;
+ globals = [];
+ locations = [];
+
+ if (options.comments) comments = [];
+ if (!options.wait) return end();
+ return exports;
+ }
+ exports.write = write;
+
+ function write(_input) {
+ input += String(_input);
+ length = input.length;
+ return exports;
+ }
+ exports.end = end;
+
+ function end(_input) {
+ if ('undefined' !== typeof _input) write(_input);
+
+ length = input.length;
+ trackLocations = options.locations || options.ranges;
+ lookahead = lex();
+
+ var chunk = parseChunk();
+ if (options.comments) chunk.comments = comments;
+ if (options.scope) chunk.globals = globals;
+
+ if (locations.length > 0)
+ throw new Error('Location tracking failed. This is most likely a bug in luaparse');
+
+ return chunk;
+ }
+
+}));
+
+});
+
+ace.define("ace/mode/lua_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/lua/luaparse"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var luaparse = require("../mode/lua/luaparse");
+
+var Worker = exports.Worker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(500);
+};
+
+oop.inherits(Worker, Mirror);
+
+(function() {
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+ var errors = [];
+ try {
+ luaparse.parse(value);
+ } catch(e) {
+ if (e instanceof SyntaxError) {
+ errors.push({
+ row: e.line - 1,
+ column: e.column,
+ text: e.message,
+ type: "error"
+ });
+ }
+ }
+ this.sender.emit("annotate", errors);
+ };
+
+}).call(Worker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ 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 ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ 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, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ 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("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ 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("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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 || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+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, "");
+ };
+}
+
+function toInteger(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;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/worker-php.js b/www/wiki/extensions/CodeEditor/modules/ace/worker-php.js
new file mode 100644
index 00000000..3752c846
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/worker-php.js
@@ -0,0 +1,4302 @@
+"no use strict";
+;(function(window) {
+if (typeof window.window != "undefined" && window.document)
+ return;
+if (window.require && window.define)
+ return;
+
+if (!window.console) {
+ window.console = function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+ };
+ window.console.error =
+ window.console.warn =
+ window.console.log =
+ window.console.trace = window.console;
+}
+window.window = window;
+window.ace = window;
+
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ data: err.data,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
+window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
+ if (moduleName.indexOf("!") !== -1) {
+ var chunks = moduleName.split("!");
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
+ }
+ // normalize relative requires
+ if (moduleName.charAt(0) == ".") {
+ var base = parentId.split("/").slice(0, -1).join("/");
+ moduleName = (base ? base + "/" : "") + moduleName;
+
+ while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
+ var previous = moduleName;
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ }
+ }
+
+ return moduleName;
+};
+
+window.require = function require(parentId, id) {
+ if (!id) {
+ id = parentId;
+ parentId = null;
+ }
+ if (!id.charAt)
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+ id = window.normalizeModule(parentId, id);
+
+ var module = window.require.modules[id];
+ if (module) {
+ if (!module.initialized) {
+ module.initialized = true;
+ module.exports = module.factory().exports;
+ }
+ return module.exports;
+ }
+
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+
+ var path = resolveModuleId(id, window.require.tlns);
+ if (path.slice(-3) != ".js") path += ".js";
+
+ window.require.id = id;
+ window.require.modules[id] = {}; // prevent infinite loop on broken modules
+ importScripts(path);
+ return window.require(parentId, id);
+};
+function resolveModuleId(id, paths) {
+ var testPath = id, tail = "";
+ while (testPath) {
+ var alias = paths[testPath];
+ if (typeof alias == "string") {
+ return alias + tail;
+ } else if (alias) {
+ return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name);
+ } else if (alias === false) {
+ return "";
+ }
+ var i = testPath.lastIndexOf("/");
+ if (i === -1) break;
+ tail = testPath.substr(i) + tail;
+ testPath = testPath.slice(0, i);
+ }
+ return id;
+}
+window.require.modules = {};
+window.require.tlns = {};
+
+window.define = function(id, deps, factory) {
+ if (arguments.length == 2) {
+ factory = deps;
+ if (typeof id != "string") {
+ deps = id;
+ id = window.require.id;
+ }
+ } else if (arguments.length == 1) {
+ factory = id;
+ deps = [];
+ id = window.require.id;
+ }
+
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject "require", "exports" and
+ // "module" as dependencies, to provide CommonJS compatibility.
+ deps = ["require", "exports", "module"];
+
+ var req = function(childId) {
+ return window.require(id, childId);
+ };
+
+ window.require.modules[id] = {
+ exports: {},
+ factory: function() {
+ var module = this;
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch (dep) {
+ // Because "require", "exports" and "module" aren't actual
+ // dependencies, we must handle them seperately.
+ case "require": return req;
+ case "exports": return module.exports;
+ case "module": return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
+ if (returnExports)
+ module.exports = returnExports;
+ return module;
+ }
+ };
+};
+window.define.amd = {};
+require.tlns = {};
+window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
+ for (var i in topLevelNamespaces)
+ require.tlns[i] = topLevelNamespaces[i];
+};
+
+window.initSender = function initSender() {
+
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("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 = window.main = null;
+var sender = window.sender = null;
+
+window.onmessage = function(e) {
+ var msg = e.data;
+ if (msg.event && sender) {
+ sender._signal(msg.event, msg.data);
+ }
+ else if (msg.command) {
+ if (main[msg.command])
+ main[msg.command].apply(main, msg.args);
+ else if (window[msg.command])
+ window[msg.command].apply(window, msg.args);
+ else
+ throw new Error("Unknown command:" + msg.command);
+ }
+ else if (msg.init) {
+ window.initBaseUrls(msg.tlns);
+ require("ace/lib/es5-shim");
+ sender = window.sender = window.initSender();
+ var clazz = require(msg.module)[msg.classname];
+ main = window.main = new clazz(sender);
+ }
+};
+})(this);
+
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+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};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
+
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {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
+ );
+ };
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
+ };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
+
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+
+
+exports.Range = Range;
+});
+
+ace.define("ace/apply_delta",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+function throwDeltaError(delta, errorText){
+ console.log("Invalid Delta:", delta);
+ throw "Invalid Delta: " + errorText;
+}
+
+function positionInDocument(docLines, position) {
+ return position.row >= 0 && position.row < docLines.length &&
+ position.column >= 0 && position.column <= docLines[position.row].length;
+}
+
+function validateDelta(docLines, delta) {
+ if (delta.action != "insert" && delta.action != "remove")
+ throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
+ if (!(delta.lines instanceof Array))
+ throwDeltaError(delta, "delta.lines must be an Array");
+ if (!delta.start || !delta.end)
+ throwDeltaError(delta, "delta.start/end must be an present");
+ var start = delta.start;
+ if (!positionInDocument(docLines, delta.start))
+ throwDeltaError(delta, "delta.start must be contained in document");
+ var end = delta.end;
+ if (delta.action == "remove" && !positionInDocument(docLines, end))
+ throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
+ var numRangeRows = end.row - start.row;
+ var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
+ if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
+ throwDeltaError(delta, "delta.range must match delta lines");
+}
+
+exports.applyDelta = function(docLines, delta, doNotValidate) {
+
+ var row = delta.start.row;
+ var startColumn = delta.start.column;
+ var line = docLines[row] || "";
+ switch (delta.action) {
+ case "insert":
+ var lines = delta.lines;
+ if (lines.length === 1) {
+ docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
+ } else {
+ var args = [row, 1].concat(delta.lines);
+ docLines.splice.apply(docLines, args);
+ docLines[row] = line.substring(0, startColumn) + docLines[row];
+ docLines[row + delta.lines.length - 1] += line.substring(startColumn);
+ }
+ break;
+ case "remove":
+ var endColumn = delta.end.column;
+ var endRow = delta.end.row;
+ if (row === endRow) {
+ docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
+ } else {
+ docLines.splice(
+ row, endRow - row + 1,
+ line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
+ );
+ }
+ break;
+ }
+}
+});
+
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
+
+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 = stopPropagation;
+ if (!e.preventDefault)
+ e.preventDefault = preventDefault;
+
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e, this);
+ if (e.propagationStopped)
+ break;
+ }
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e, this);
+};
+
+
+EventEmitter._signal = function(eventName, e) {
+ var listeners = (this._eventRegistry || {})[eventName];
+ if (!listeners)
+ return;
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++)
+ listeners[i](e, this);
+};
+
+EventEmitter.once = function(eventName, callback) {
+ var _self = this;
+ callback && this.addEventListener(eventName, function newCallback() {
+ _self.removeEventListener(eventName, newCallback);
+ callback.apply(null, arguments);
+ });
+};
+
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ handlers = this._defaultHandlers = {_disabled_: {}};
+
+ if (handlers[eventName]) {
+ var old = handlers[eventName];
+ var disabled = handlers._disabled_[eventName];
+ if (!disabled)
+ handlers._disabled_[eventName] = disabled = [];
+ disabled.push(old);
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+ handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ return;
+ var disabled = handlers._disabled_[eventName];
+
+ if (handlers[eventName] == callback) {
+ var old = handlers[eventName];
+ if (disabled)
+ this.setDefaultHandler(eventName, disabled.pop());
+ } else if (disabled) {
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
+
+ if (listeners.indexOf(callback) == -1)
+ listeners[capturing ? "unshift" : "push"](callback);
+ return callback;
+};
+
+EventEmitter.off =
+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/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;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+ this.getDocument = function() {
+ return this.document;
+ };
+ this.$insertRight = false;
+ this.onChange = function(delta) {
+ if (delta.start.row == delta.end.row && delta.start.row != this.row)
+ return;
+
+ if (delta.start.row > this.row)
+ return;
+
+ var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
+ this.setPosition(point.row, point.column, true);
+ };
+
+ function $pointsInOrder(point1, point2, equalPointsInOrder) {
+ var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
+ return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
+ }
+
+ function $getTransformedPoint(delta, point, moveIfEqual) {
+ var deltaIsInsert = delta.action == "insert";
+ var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
+ var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
+ var deltaStart = delta.start;
+ var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
+ if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
+ return {
+ row: point.row,
+ column: point.column
+ };
+ }
+ if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
+ return {
+ row: point.row + deltaRowShift,
+ column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
+ };
+ }
+
+ return {
+ row: deltaStart.row,
+ column: deltaStart.column
+ };
+ }
+ 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._signal("change", {
+ old: old,
+ value: pos
+ });
+ };
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
+ };
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("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/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var applyDelta = require("./apply_delta").applyDelta;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(textOrLines) {
+ this.$lines = [""];
+ if (textOrLines.length === 0) {
+ this.$lines = [""];
+ } else if (Array.isArray(textOrLines)) {
+ this.insertMergedLines({row: 0, column: 0}, textOrLines);
+ } else {
+ this.insert({row: 0, column:0}, textOrLines);
+ }
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setValue = function(text) {
+ var len = this.getLength() - 1;
+ this.remove(new Range(0, 0, len, this.getLine(len).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);
+ this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
+ };
+ this.getNewLineCharacter = function() {
+ switch (this.$newLineMode) {
+ case "windows":
+ return "\r\n";
+ case "unix":
+ return "\n";
+ default:
+ return this.$autoNewLine || "\n";
+ }
+ };
+
+ this.$autoNewLine = "";
+ this.$newLineMode = "auto";
+ this.setNewLineMode = function(newLineMode) {
+ if (this.$newLineMode === newLineMode)
+ return;
+
+ this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
+ };
+ 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) {
+ return this.getLinesForRange(range).join(this.getNewLineCharacter());
+ };
+ this.getLinesForRange = function(range) {
+ var lines;
+ if (range.start.row === range.end.row) {
+ lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
+ } else {
+ lines = this.getLines(range.start.row, range.end.row);
+ lines[0] = (lines[0] || "").substring(range.start.column);
+ var l = lines.length - 1;
+ if (range.end.row - range.start.row == l)
+ lines[l] = lines[l].substring(0, range.end.column);
+ }
+ return lines;
+ };
+ this.insertLines = function(row, lines) {
+ console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
+ return this.insertFullLines(row, lines);
+ };
+ this.removeLines = function(firstRow, lastRow) {
+ console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
+ return this.removeFullLines(firstRow, lastRow);
+ };
+ this.insertNewLine = function(position) {
+ console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
+ return this.insertMergedLines(position, ["", ""]);
+ };
+ this.insert = function(position, text) {
+ if (this.getLength() <= 1)
+ this.$detectNewLine(text);
+
+ return this.insertMergedLines(position, this.$split(text));
+ };
+ this.insertInLine = function(position, text) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = this.pos(position.row, position.column + text.length);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: [text]
+ }, true);
+
+ return this.clonePos(end);
+ };
+
+ this.clippedPos = function(row, column) {
+ var length = this.getLength();
+ if (row === undefined) {
+ row = length;
+ } else if (row < 0) {
+ row = 0;
+ } else if (row >= length) {
+ row = length - 1;
+ column = undefined;
+ }
+ var line = this.getLine(row);
+ if (column == undefined)
+ column = line.length;
+ column = Math.min(Math.max(column, 0), line.length);
+ return {row: row, column: column};
+ };
+
+ this.clonePos = function(pos) {
+ return {row: pos.row, column: pos.column};
+ };
+
+ this.pos = function(row, column) {
+ return {row: row, column: column};
+ };
+
+ 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;
+ } else {
+ position.row = Math.max(0, position.row);
+ position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
+ }
+ return position;
+ };
+ this.insertFullLines = function(row, lines) {
+ row = Math.min(Math.max(row, 0), this.getLength());
+ var column = 0;
+ if (row < this.getLength()) {
+ lines = lines.concat([""]);
+ column = 0;
+ } else {
+ lines = [""].concat(lines);
+ row--;
+ column = this.$lines[row].length;
+ }
+ this.insertMergedLines({row: row, column: column}, lines);
+ };
+ this.insertMergedLines = function(position, lines) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = {
+ row: start.row + lines.length - 1,
+ column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
+ };
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: lines
+ });
+
+ return this.clonePos(end);
+ };
+ this.remove = function(range) {
+ var start = this.clippedPos(range.start.row, range.start.column);
+ var end = this.clippedPos(range.end.row, range.end.column);
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ });
+ return this.clonePos(start);
+ };
+ this.removeInLine = function(row, startColumn, endColumn) {
+ var start = this.clippedPos(row, startColumn);
+ var end = this.clippedPos(row, endColumn);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ }, true);
+
+ return this.clonePos(start);
+ };
+ this.removeFullLines = function(firstRow, lastRow) {
+ firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
+ lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
+ var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
+ var deleteLastNewLine = lastRow < this.getLength() - 1;
+ var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );
+ var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );
+ var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );
+ var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length );
+ var range = new Range(startRow, startCol, endRow, endCol);
+ var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
+
+ this.applyDelta({
+ start: range.start,
+ end: range.end,
+ action: "remove",
+ lines: this.getLinesForRange(range)
+ });
+ return deletedLines;
+ };
+ this.removeNewLine = function(row) {
+ if (row < this.getLength() - 1 && row >= 0) {
+ this.applyDelta({
+ start: this.pos(row, this.getLine(row).length),
+ end: this.pos(row + 1, 0),
+ action: "remove",
+ lines: ["", ""]
+ });
+ }
+ };
+ this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
+ if (text.length === 0 && range.isEmpty())
+ return range.start;
+ if (text == this.getTextRange(range))
+ return range.end;
+
+ this.remove(range);
+ var end;
+ if (text) {
+ end = this.insert(range.start, text);
+ }
+ else {
+ end = range.start;
+ }
+
+ return end;
+ };
+ this.applyDeltas = function(deltas) {
+ for (var i=0; i<deltas.length; i++) {
+ this.applyDelta(deltas[i]);
+ }
+ };
+ this.revertDeltas = function(deltas) {
+ for (var i=deltas.length-1; i>=0; i--) {
+ this.revertDelta(deltas[i]);
+ }
+ };
+ this.applyDelta = function(delta, doNotValidate) {
+ var isInsert = delta.action == "insert";
+ if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
+ : !Range.comparePoints(delta.start, delta.end)) {
+ return;
+ }
+
+ if (isInsert && delta.lines.length > 20000)
+ this.$splitAndapplyLargeDelta(delta, 20000);
+ applyDelta(this.$lines, delta, doNotValidate);
+ this._signal("change", delta);
+ };
+
+ this.$splitAndapplyLargeDelta = function(delta, MAX) {
+ var lines = delta.lines;
+ var l = lines.length;
+ var row = delta.start.row;
+ var column = delta.start.column;
+ var from = 0, to = 0;
+ do {
+ from = to;
+ to += MAX - 1;
+ var chunk = lines.slice(from, to);
+ if (to > l) {
+ delta.lines = chunk;
+ delta.start.row = row + from;
+ delta.start.column = column;
+ break;
+ }
+ chunk.push("");
+ this.applyDelta({
+ start: this.pos(row + from, column),
+ end: this.pos(row + to, column = 0),
+ action: delta.action,
+ lines: chunk
+ }, true);
+ } while(true);
+ };
+ this.revertDelta = function(delta) {
+ this.applyDelta({
+ start: this.clonePos(delta.start),
+ end: this.clonePos(delta.end),
+ action: (delta.action == "insert" ? "remove" : "insert"),
+ lines: delta.lines.slice()
+ });
+ };
+ 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 + newlineLength;
+
+ return index + pos.column;
+ };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.last = function(a) {
+ return a[a.length - 1];
+};
+
+exports.stringReverse = function(string) {
+ return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+ var result = '';
+ while (count > 0) {
+ if (count & 1)
+ result += string;
+
+ if (count >>= 1)
+ string += string;
+ }
+ return result;
+};
+
+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 deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
+ return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
+ }
+ if (Object.prototype.toString.call(obj) !== "[object Object]")
+ return obj;
+
+ copy = {};
+ for (var key in obj)
+ copy[key] = deepCopy(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;
+ };
+
+ deferred.isPending = function() {
+ return timer;
+ };
+
+ return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+ _self.schedule = _self;
+
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
+
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ _self.isPending = function() {
+ return timer;
+ };
+
+ return _self;
+};
+});
+
+ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+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.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ var data = e.data;
+ if (data[0].start) {
+ doc.applyDeltas(data);
+ } else {
+ for (var i = 0; i < data.length; i += 2) {
+ if (Array.isArray(data[i+1])) {
+ var d = {action: "insert", start: data[i], lines: data[i+1]};
+ } else {
+ var d = {action: "remove", start: data[i], end: data[i+1]};
+ }
+ doc.applyDelta(d, true);
+ }
+ }
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
+};
+
+(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() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+ace.define("ace/mode/php/php",["require","exports","module"], function(require, exports, module) {
+
+var PHP = {Constants:{}};
+
+PHP.Constants.T_INCLUDE = 257;
+PHP.Constants.T_INCLUDE_ONCE = 258;
+PHP.Constants.T_EVAL = 259;
+PHP.Constants.T_REQUIRE = 260;
+PHP.Constants.T_REQUIRE_ONCE = 261;
+PHP.Constants.T_LOGICAL_OR = 262;
+PHP.Constants.T_LOGICAL_XOR = 263;
+PHP.Constants.T_LOGICAL_AND = 264;
+PHP.Constants.T_PRINT = 265;
+PHP.Constants.T_YIELD = 266;
+PHP.Constants.T_DOUBLE_ARROW = 267;
+PHP.Constants.T_YIELD_FROM = 268;
+PHP.Constants.T_PLUS_EQUAL = 269;
+PHP.Constants.T_MINUS_EQUAL = 270;
+PHP.Constants.T_MUL_EQUAL = 271;
+PHP.Constants.T_DIV_EQUAL = 272;
+PHP.Constants.T_CONCAT_EQUAL = 273;
+PHP.Constants.T_MOD_EQUAL = 274;
+PHP.Constants.T_AND_EQUAL = 275;
+PHP.Constants.T_OR_EQUAL = 276;
+PHP.Constants.T_XOR_EQUAL = 277;
+PHP.Constants.T_SL_EQUAL = 278;
+PHP.Constants.T_SR_EQUAL = 279;
+PHP.Constants.T_POW_EQUAL = 280;
+PHP.Constants.T_COALESCE = 281;
+PHP.Constants.T_BOOLEAN_OR = 282;
+PHP.Constants.T_BOOLEAN_AND = 283;
+PHP.Constants.T_IS_EQUAL = 284;
+PHP.Constants.T_IS_NOT_EQUAL = 285;
+PHP.Constants.T_IS_IDENTICAL = 286;
+PHP.Constants.T_IS_NOT_IDENTICAL = 287;
+PHP.Constants.T_SPACESHIP = 288;
+PHP.Constants.T_IS_SMALLER_OR_EQUAL = 289;
+PHP.Constants.T_IS_GREATER_OR_EQUAL = 290;
+PHP.Constants.T_SL = 291;
+PHP.Constants.T_SR = 292;
+PHP.Constants.T_INSTANCEOF = 293;
+PHP.Constants.T_INC = 294;
+PHP.Constants.T_DEC = 295;
+PHP.Constants.T_INT_CAST = 296;
+PHP.Constants.T_DOUBLE_CAST = 297;
+PHP.Constants.T_STRING_CAST = 298;
+PHP.Constants.T_ARRAY_CAST = 299;
+PHP.Constants.T_OBJECT_CAST = 300;
+PHP.Constants.T_BOOL_CAST = 301;
+PHP.Constants.T_UNSET_CAST = 302;
+PHP.Constants.T_POW = 303;
+PHP.Constants.T_NEW = 304;
+PHP.Constants.T_CLONE = 305;
+PHP.Constants.T_EXIT = 306;
+PHP.Constants.T_IF = 307;
+PHP.Constants.T_ELSEIF = 308;
+PHP.Constants.T_ELSE = 309;
+PHP.Constants.T_ENDIF = 310;
+PHP.Constants.T_LNUMBER = 311;
+PHP.Constants.T_DNUMBER = 312;
+PHP.Constants.T_STRING = 313;
+PHP.Constants.T_STRING_VARNAME = 314;
+PHP.Constants.T_VARIABLE = 315;
+PHP.Constants.T_NUM_STRING = 316;
+PHP.Constants.T_INLINE_HTML = 317;
+PHP.Constants.T_CHARACTER = 318;
+PHP.Constants.T_BAD_CHARACTER = 319;
+PHP.Constants.T_ENCAPSED_AND_WHITESPACE = 320;
+PHP.Constants.T_CONSTANT_ENCAPSED_STRING = 321;
+PHP.Constants.T_ECHO = 322;
+PHP.Constants.T_DO = 323;
+PHP.Constants.T_WHILE = 324;
+PHP.Constants.T_ENDWHILE = 325;
+PHP.Constants.T_FOR = 326;
+PHP.Constants.T_ENDFOR = 327;
+PHP.Constants.T_FOREACH = 328;
+PHP.Constants.T_ENDFOREACH = 329;
+PHP.Constants.T_DECLARE = 330;
+PHP.Constants.T_ENDDECLARE = 331;
+PHP.Constants.T_AS = 332;
+PHP.Constants.T_SWITCH = 333;
+PHP.Constants.T_ENDSWITCH = 334;
+PHP.Constants.T_CASE = 335;
+PHP.Constants.T_DEFAULT = 336;
+PHP.Constants.T_BREAK = 337;
+PHP.Constants.T_CONTINUE = 338;
+PHP.Constants.T_GOTO = 339;
+PHP.Constants.T_FUNCTION = 340;
+PHP.Constants.T_CONST = 341;
+PHP.Constants.T_RETURN = 342;
+PHP.Constants.T_TRY = 343;
+PHP.Constants.T_CATCH = 344;
+PHP.Constants.T_FINALLY = 345;
+PHP.Constants.T_THROW = 346;
+PHP.Constants.T_USE = 347;
+PHP.Constants.T_INSTEADOF = 348;
+PHP.Constants.T_GLOBAL = 349;
+PHP.Constants.T_STATIC = 350;
+PHP.Constants.T_ABSTRACT = 351;
+PHP.Constants.T_FINAL = 352;
+PHP.Constants.T_PRIVATE = 353;
+PHP.Constants.T_PROTECTED = 354;
+PHP.Constants.T_PUBLIC = 355;
+PHP.Constants.T_VAR = 356;
+PHP.Constants.T_UNSET = 357;
+PHP.Constants.T_ISSET = 358;
+PHP.Constants.T_EMPTY = 359;
+PHP.Constants.T_HALT_COMPILER = 360;
+PHP.Constants.T_CLASS = 361;
+PHP.Constants.T_TRAIT = 362;
+PHP.Constants.T_INTERFACE = 363;
+PHP.Constants.T_EXTENDS = 364;
+PHP.Constants.T_IMPLEMENTS = 365;
+PHP.Constants.T_OBJECT_OPERATOR = 366;
+PHP.Constants.T_LIST = 367;
+PHP.Constants.T_ARRAY = 368;
+PHP.Constants.T_CALLABLE = 369;
+PHP.Constants.T_CLASS_C = 370;
+PHP.Constants.T_TRAIT_C = 371;
+PHP.Constants.T_METHOD_C = 372;
+PHP.Constants.T_FUNC_C = 373;
+PHP.Constants.T_LINE = 374;
+PHP.Constants.T_FILE = 375;
+PHP.Constants.T_COMMENT = 376;
+PHP.Constants.T_DOC_COMMENT = 377;
+PHP.Constants.T_OPEN_TAG = 378;
+PHP.Constants.T_OPEN_TAG_WITH_ECHO = 379;
+PHP.Constants.T_CLOSE_TAG = 380;
+PHP.Constants.T_WHITESPACE = 381;
+PHP.Constants.T_START_HEREDOC = 382;
+PHP.Constants.T_END_HEREDOC = 383;
+PHP.Constants.T_DOLLAR_OPEN_CURLY_BRACES = 384;
+PHP.Constants.T_CURLY_OPEN = 385;
+PHP.Constants.T_PAAMAYIM_NEKUDOTAYIM = 386;
+PHP.Constants.T_NAMESPACE = 387;
+PHP.Constants.T_NS_C = 388;
+PHP.Constants.T_DIR = 389;
+PHP.Constants.T_NS_SEPARATOR = 390;
+PHP.Constants.T_ELLIPSIS = 391;
+
+PHP.Lexer = function(src, ini) {
+ var heredoc, heredocEndAllowed,
+
+ stateStack = ['INITIAL'], stackPos = 0,
+ swapState = function(state) {
+ stateStack[stackPos] = state;
+ },
+ pushState = function(state) {
+ stateStack[++stackPos] = state;
+ },
+ popState = function() {
+ --stackPos;
+ },
+
+ shortOpenTag = ini === undefined || /^(on|true|1)$/i.test(ini.short_open_tag),
+ openTag = shortOpenTag
+ ? /^(\<\?php(?:\r\n|[ \t\r\n])|<\?|\<script language\=('|")?php('|")?\>)/i
+ : /^(\<\?php(?:\r\n|[ \t\r\n])|\<script language\=('|")?php('|")?\>)/i,
+ inlineHtml = shortOpenTag
+ ? /[^<]*(?:<(?!\?|script language\=('|")?php('|")?\>)[^<]*)*/i
+ : /[^<]*(?:<(?!\?=|\?php[ \t\r\n]|script language\=('|")?php('|")?\>)[^<]*)*/i;
+ labelRegexPart = '[a-zA-Z_\\x7f-\\uffff][a-zA-Z0-9_\\x7f-\\uffff]*',
+ stringRegexPart = function(quote) {
+ return '[^' + quote + '\\\\${]*(?:(?:\\\\[\\s\\S]|\\$(?!\\{|[a-zA-Z_\\x7f-\\uffff])|\\{(?!\\$))[^' + quote + '\\\\${]*)*';
+ },
+
+ sharedStringTokens = [
+ {
+ value: PHP.Constants.T_VARIABLE,
+ re: new RegExp('^\\$' + labelRegexPart + '(?=\\[)'),
+ func: function() {
+ pushState('VAR_OFFSET');
+ }
+ },
+ {
+ value: PHP.Constants.T_VARIABLE,
+ re: new RegExp('^\\$' + labelRegexPart + '(?=->' + labelRegexPart + ')'),
+ func: function() {
+ pushState('LOOKING_FOR_PROPERTY');
+ }
+ },
+ {
+ value: PHP.Constants.T_DOLLAR_OPEN_CURLY_BRACES,
+ re: new RegExp('^\\$\\{(?=' + labelRegexPart + '[\\[}])'),
+ func: function() {
+ pushState('LOOKING_FOR_VARNAME');
+ }
+ },
+ {
+ value: PHP.Constants.T_VARIABLE,
+ re: new RegExp('^\\$' + labelRegexPart)
+ },
+ {
+ value: PHP.Constants.T_DOLLAR_OPEN_CURLY_BRACES,
+ re: /^\$\{/,
+ func: function() {
+ pushState('IN_SCRIPTING');
+ }
+ },
+ {
+ value: PHP.Constants.T_CURLY_OPEN,
+ re: /^\{(?=\$)/,
+ func: function() {
+ pushState('IN_SCRIPTING');
+ }
+ }
+ ],
+ data = {
+ 'INITIAL': [
+ {
+ value: PHP.Constants.T_OPEN_TAG_WITH_ECHO,
+ re: /^<\?=/i,
+ func: function() {
+ swapState('IN_SCRIPTING');
+ }
+ },
+ {
+ value: PHP.Constants.T_OPEN_TAG,
+ re: openTag,
+ func: function() {
+ swapState('IN_SCRIPTING');
+ }
+ },
+ {
+ value: PHP.Constants.T_INLINE_HTML,
+ re: inlineHtml
+ },
+ ],
+ 'IN_SCRIPTING': [
+ {
+ value: PHP.Constants.T_WHITESPACE,
+ re: /^[ \n\r\t]+/
+ },
+ {
+ value: PHP.Constants.T_ABSTRACT,
+ re: /^abstract\b/i
+ },
+ {
+ value: PHP.Constants.T_LOGICAL_AND,
+ re: /^and\b/i
+ },
+ {
+ value: PHP.Constants.T_ARRAY,
+ re: /^array\b/i
+ },
+ {
+ value: PHP.Constants.T_AS,
+ re: /^as\b/i
+ },
+ {
+ value: PHP.Constants.T_BREAK,
+ re: /^break\b/i
+ },
+ {
+ value: PHP.Constants.T_CALLABLE,
+ re: /^callable\b/i
+ },
+ {
+ value: PHP.Constants.T_CASE,
+ re: /^case\b/i
+ },
+ {
+ value: PHP.Constants.T_CATCH,
+ re: /^catch\b/i
+ },
+ {
+ value: PHP.Constants.T_CLASS,
+ re: /^class\b/i,
+ },
+ {
+ value: PHP.Constants.T_CLONE,
+ re: /^clone\b/i
+ },
+ {
+ value: PHP.Constants.T_CONST,
+ re: /^const\b/i
+ },
+ {
+ value: PHP.Constants.T_CONTINUE,
+ re: /^continue\b/i
+ },
+ {
+ value: PHP.Constants.T_DECLARE,
+ re: /^declare\b/i
+ },
+ {
+ value: PHP.Constants.T_DEFAULT,
+ re: /^default\b/i
+ },
+ {
+ value: PHP.Constants.T_DO,
+ re: /^do\b/i
+ },
+ {
+ value: PHP.Constants.T_ECHO,
+ re: /^echo\b/i
+ },
+ {
+ value: PHP.Constants.T_ELSE,
+ re: /^else\b/i
+ },
+ {
+ value: PHP.Constants.T_ELSEIF,
+ re: /^elseif\b/i
+ },
+ {
+ value: PHP.Constants.T_ENDDECLARE,
+ re: /^enddeclare\b/i
+ },
+ {
+ value: PHP.Constants.T_ENDFOR,
+ re: /^endfor\b/i
+ },
+ {
+ value: PHP.Constants.T_ENDFOREACH,
+ re: /^endforeach\b/i
+ },
+ {
+ value: PHP.Constants.T_ENDIF,
+ re: /^endif\b/i
+ },
+ {
+ value: PHP.Constants.T_ENDSWITCH,
+ re: /^endswitch\b/i
+ },
+ {
+ value: PHP.Constants.T_ENDWHILE,
+ re: /^endwhile\b/i
+ },
+ {
+ value: PHP.Constants.T_EMPTY,
+ re: /^empty\b/i
+ },
+ {
+ value: PHP.Constants.T_EVAL,
+ re: /^eval\b/i
+ },
+ {
+ value: PHP.Constants.T_EXIT,
+ re: /^(?:exit|die)\b/i
+ },
+ {
+ value: PHP.Constants.T_EXTENDS,
+ re: /^extends\b/i
+ },
+ {
+ value: PHP.Constants.T_FINAL,
+ re: /^final\b/i
+ },
+ {
+ value: PHP.Constants.T_FINALLY,
+ re: /^finally\b/i
+ },
+ {
+ value: PHP.Constants.T_FOR,
+ re: /^for\b/i
+ },
+ {
+ value: PHP.Constants.T_FOREACH,
+ re: /^foreach\b/i
+ },
+ {
+ value: PHP.Constants.T_FUNCTION,
+ re: /^function\b/i
+ },
+ {
+ value: PHP.Constants.T_GLOBAL,
+ re: /^global\b/i
+ },
+ {
+ value: PHP.Constants.T_GOTO,
+ re: /^goto\b/i
+ },
+ {
+ value: PHP.Constants.T_IF,
+ re: /^if\b/i
+ },
+ {
+ value: PHP.Constants.T_IMPLEMENTS,
+ re: /^implements\b/i
+ },
+ {
+ value: PHP.Constants.T_INCLUDE,
+ re: /^include\b/i
+ },
+ {
+ value: PHP.Constants.T_INCLUDE_ONCE,
+ re: /^include_once\b/i
+ },
+ {
+ value: PHP.Constants.T_INSTANCEOF,
+ re: /^instanceof\b/i
+ },
+ {
+ value: PHP.Constants.T_INSTEADOF,
+ re: /^insteadof\b/i
+ },
+ {
+ value: PHP.Constants.T_INTERFACE,
+ re: /^interface\b/i
+ },
+ {
+ value: PHP.Constants.T_ISSET,
+ re: /^isset\b/i
+ },
+ {
+ value: PHP.Constants.T_LIST,
+ re: /^list\b/i
+ },
+ {
+ value: PHP.Constants.T_NAMESPACE,
+ re: /^namespace\b/i
+ },
+ {
+ value: PHP.Constants.T_NEW,
+ re: /^new\b/i
+ },
+ {
+ value: PHP.Constants.T_LOGICAL_OR,
+ re: /^or\b/i
+ },
+ {
+ value: PHP.Constants.T_PRINT,
+ re: /^print\b/i
+ },
+ {
+ value: PHP.Constants.T_PRIVATE,
+ re: /^private\b/i
+ },
+ {
+ value: PHP.Constants.T_PROTECTED,
+ re: /^protected\b/i
+ },
+ {
+ value: PHP.Constants.T_PUBLIC,
+ re: /^public\b/i
+ },
+ {
+ value: PHP.Constants.T_REQUIRE,
+ re: /^require\b/i
+ },
+ {
+ value: PHP.Constants.T_REQUIRE_ONCE,
+ re: /^require_once\b/i
+ },
+ {
+ value: PHP.Constants.T_STATIC,
+ re: /^static\b/i
+ },
+ {
+ value: PHP.Constants.T_SWITCH,
+ re: /^switch\b/i
+ },
+ {
+ value: PHP.Constants.T_THROW,
+ re: /^throw\b/i
+ },
+ {
+ value: PHP.Constants.T_TRAIT,
+ re: /^trait\b/i,
+ },
+ {
+ value: PHP.Constants.T_TRY,
+ re: /^try\b/i
+ },
+ {
+ value: PHP.Constants.T_UNSET,
+ re: /^unset\b/i
+ },
+ {
+ value: PHP.Constants.T_USE,
+ re: /^use\b/i
+ },
+ {
+ value: PHP.Constants.T_VAR,
+ re: /^var\b/i
+ },
+ {
+ value: PHP.Constants.T_WHILE,
+ re: /^while\b/i
+ },
+ {
+ value: PHP.Constants.T_LOGICAL_XOR,
+ re: /^xor\b/i
+ },
+ {
+ value: PHP.Constants.T_YIELD_FROM,
+ re: /^yield\s+from\b/i
+ },
+ {
+ value: PHP.Constants.T_YIELD,
+ re: /^yield\b/i
+ },
+ {
+ value: PHP.Constants.T_RETURN,
+ re: /^return\b/i
+ },
+ {
+ value: PHP.Constants.T_METHOD_C,
+ re: /^__METHOD__\b/i
+ },
+ {
+ value: PHP.Constants.T_LINE,
+ re: /^__LINE__\b/i
+ },
+ {
+ value: PHP.Constants.T_FILE,
+ re: /^__FILE__\b/i
+ },
+ {
+ value: PHP.Constants.T_FUNC_C,
+ re: /^__FUNCTION__\b/i
+ },
+ {
+ value: PHP.Constants.T_NS_C,
+ re: /^__NAMESPACE__\b/i
+ },
+ {
+ value: PHP.Constants.T_TRAIT_C,
+ re: /^__TRAIT__\b/i
+ },
+ {
+ value: PHP.Constants.T_DIR,
+ re: /^__DIR__\b/i
+ },
+ {
+ value: PHP.Constants.T_CLASS_C,
+ re: /^__CLASS__\b/i
+ },
+ {
+ value: PHP.Constants.T_AND_EQUAL,
+ re: /^&=/
+ },
+ {
+ value: PHP.Constants.T_ARRAY_CAST,
+ re: /^\([ \t]*array[ \t]*\)/i
+ },
+ {
+ value: PHP.Constants.T_BOOL_CAST,
+ re: /^\([ \t]*(?:bool|boolean)[ \t]*\)/i
+ },
+ {
+ value: PHP.Constants.T_DOUBLE_CAST,
+ re: /^\([ \t]*(?:real|float|double)[ \t]*\)/i
+ },
+ {
+ value: PHP.Constants.T_INT_CAST,
+ re: /^\([ \t]*(?:int|integer)[ \t]*\)/i
+ },
+ {
+ value: PHP.Constants.T_OBJECT_CAST,
+ re: /^\([ \t]*object[ \t]*\)/i
+ },
+ {
+ value: PHP.Constants.T_STRING_CAST,
+ re: /^\([ \t]*(?:binary|string)[ \t]*\)/i
+ },
+ {
+ value: PHP.Constants.T_UNSET_CAST,
+ re: /^\([ \t]*unset[ \t]*\)/i
+ },
+ {
+ value: PHP.Constants.T_BOOLEAN_AND,
+ re: /^&&/
+ },
+ {
+ value: PHP.Constants.T_BOOLEAN_OR,
+ re: /^\|\|/
+ },
+ {
+ value: PHP.Constants.T_CLOSE_TAG,
+ re: /^(?:\?>|<\/script>)(\r\n|\r|\n)?/i,
+ func: function() {
+ swapState('INITIAL');
+ }
+ },
+ {
+ value: PHP.Constants.T_DOUBLE_ARROW,
+ re: /^=>/
+ },
+ {
+ value: PHP.Constants.T_PAAMAYIM_NEKUDOTAYIM,
+ re: /^::/
+ },
+ {
+ value: PHP.Constants.T_INC,
+ re: /^\+\+/
+ },
+ {
+ value: PHP.Constants.T_DEC,
+ re: /^--/
+ },
+ {
+ value: PHP.Constants.T_CONCAT_EQUAL,
+ re: /^\.=/
+ },
+ {
+ value: PHP.Constants.T_DIV_EQUAL,
+ re: /^\/=/
+ },
+ {
+ value: PHP.Constants.T_XOR_EQUAL,
+ re: /^\^=/
+ },
+ {
+ value: PHP.Constants.T_MUL_EQUAL,
+ re: /^\*=/
+ },
+ {
+ value: PHP.Constants.T_MOD_EQUAL,
+ re: /^%=/
+ },
+ {
+ value: PHP.Constants.T_SL_EQUAL,
+ re: /^<<=/
+ },
+ {
+ value: PHP.Constants.T_START_HEREDOC,
+ re: new RegExp('^[bB]?<<<[ \\t]*\'(' + labelRegexPart + ')\'(?:\\r\\n|\\r|\\n)'),
+ func: function(result) {
+ heredoc = result[1];
+ swapState('NOWDOC');
+ }
+ },
+ {
+ value: PHP.Constants.T_START_HEREDOC,
+ re: new RegExp('^[bB]?<<<[ \\t]*("?)(' + labelRegexPart + ')\\1(?:\\r\\n|\\r|\\n)'),
+ func: function(result) {
+ heredoc = result[2];
+ heredocEndAllowed = true;
+ swapState('HEREDOC');
+ }
+ },
+ {
+ value: PHP.Constants.T_SL,
+ re: /^<</
+ },
+ {
+ value: PHP.Constants.T_SPACESHIP,
+ re: /^<=>/
+ },
+ {
+ value: PHP.Constants.T_IS_SMALLER_OR_EQUAL,
+ re: /^<=/
+ },
+ {
+ value: PHP.Constants.T_SR_EQUAL,
+ re: /^>>=/
+ },
+ {
+ value: PHP.Constants.T_SR,
+ re: /^>>/
+ },
+ {
+ value: PHP.Constants.T_IS_GREATER_OR_EQUAL,
+ re: /^>=/
+ },
+ {
+ value: PHP.Constants.T_OR_EQUAL,
+ re: /^\|=/
+ },
+ {
+ value: PHP.Constants.T_PLUS_EQUAL,
+ re: /^\+=/
+ },
+ {
+ value: PHP.Constants.T_MINUS_EQUAL,
+ re: /^-=/
+ },
+ {
+ value: PHP.Constants.T_OBJECT_OPERATOR,
+ re: new RegExp('^->(?=[ \n\r\t]*' + labelRegexPart + ')'),
+ func: function() {
+ pushState('LOOKING_FOR_PROPERTY');
+ }
+ },
+ {
+ value: PHP.Constants.T_OBJECT_OPERATOR,
+ re: /^->/i
+ },
+ {
+ value: PHP.Constants.T_ELLIPSIS,
+ re: /^\.\.\./
+ },
+ {
+ value: PHP.Constants.T_POW_EQUAL,
+ re: /^\*\*=/
+ },
+ {
+ value: PHP.Constants.T_POW,
+ re: /^\*\*/
+ },
+ {
+ value: PHP.Constants.T_COALESCE,
+ re: /^\?\?/
+ },
+ {
+ value: PHP.Constants.T_COMMENT,
+ re: /^\/\*([\S\s]*?)(?:\*\/|$)/
+ },
+ {
+ value: PHP.Constants.T_COMMENT,
+ re: /^(?:\/\/|#)[^\r\n?]*(?:\?(?!>)[^\r\n?]*)*(?:\r\n|\r|\n)?/
+ },
+ {
+ value: PHP.Constants.T_IS_IDENTICAL,
+ re: /^===/
+ },
+ {
+ value: PHP.Constants.T_IS_EQUAL,
+ re: /^==/
+ },
+ {
+ value: PHP.Constants.T_IS_NOT_IDENTICAL,
+ re: /^!==/
+ },
+ {
+ value: PHP.Constants.T_IS_NOT_EQUAL,
+ re: /^(!=|<>)/
+ },
+ {
+ value: PHP.Constants.T_DNUMBER,
+ re: /^(?:[0-9]+\.[0-9]*|\.[0-9]+)(?:[eE][+-]?[0-9]+)?/
+ },
+ {
+ value: PHP.Constants.T_DNUMBER,
+ re: /^[0-9]+[eE][+-]?[0-9]+/
+ },
+ {
+ value: PHP.Constants.T_LNUMBER,
+ re: /^(?:0x[0-9A-F]+|0b[01]+|[0-9]+)/i
+ },
+ {
+ value: PHP.Constants.T_VARIABLE,
+ re: new RegExp('^\\$' + labelRegexPart)
+ },
+ {
+ value: PHP.Constants.T_CONSTANT_ENCAPSED_STRING,
+ re: /^[bB]?'[^'\\]*(?:\\[\s\S][^'\\]*)*'/,
+ },
+ {
+ value: PHP.Constants.T_CONSTANT_ENCAPSED_STRING,
+ re: new RegExp('^[bB]?"' + stringRegexPart('"') + '"')
+ },
+ {
+ value: -1,
+ re: /^[bB]?"/,
+ func: function() {
+ swapState('DOUBLE_QUOTES');
+ }
+ },
+ {
+ value: -1,
+ re: /^`/,
+ func: function() {
+ swapState('BACKTICKS');
+ }
+ },
+ {
+ value: PHP.Constants.T_NS_SEPARATOR,
+ re: /^\\/
+ },
+ {
+ value: PHP.Constants.T_STRING,
+ re: /^[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/
+ },
+ {
+ value: -1,
+ re: /^\{/,
+ func: function() {
+ pushState('IN_SCRIPTING');
+ }
+ },
+ {
+ value: -1,
+ re: /^\}/,
+ func: function() {
+ if (stackPos > 0) {
+ popState();
+ }
+ }
+ },
+ {
+ value: -1,
+ re: /^[\[\];:?()!.,><=+-/*|&@^%"'$~]/
+ }
+ ],
+ 'DOUBLE_QUOTES': sharedStringTokens.concat([
+ {
+ value: -1,
+ re: /^"/,
+ func: function() {
+ swapState('IN_SCRIPTING');
+ }
+ },
+ {
+ value: PHP.Constants.T_ENCAPSED_AND_WHITESPACE,
+ re: new RegExp('^' + stringRegexPart('"'))
+ }
+ ]),
+ 'BACKTICKS': sharedStringTokens.concat([
+ {
+ value: -1,
+ re: /^`/,
+ func: function() {
+ swapState('IN_SCRIPTING');
+ }
+ },
+ {
+ value: PHP.Constants.T_ENCAPSED_AND_WHITESPACE,
+ re: new RegExp('^' + stringRegexPart('`'))
+ }
+ ]),
+ 'VAR_OFFSET': [
+ {
+ value: -1,
+ re: /^\]/,
+ func: function() {
+ popState();
+ }
+ },
+ {
+ value: PHP.Constants.T_NUM_STRING,
+ re: /^(?:0x[0-9A-F]+|0b[01]+|[0-9]+)/i
+ },
+ {
+ value: PHP.Constants.T_VARIABLE,
+ re: new RegExp('^\\$' + labelRegexPart)
+ },
+ {
+ value: PHP.Constants.T_STRING,
+ re: new RegExp('^' + labelRegexPart)
+ },
+ {
+ value: -1,
+ re: /^[;:,.\[()|^&+-/*=%!~$<>?@{}"`]/
+ }
+ ],
+ 'LOOKING_FOR_PROPERTY': [
+ {
+ value: PHP.Constants.T_OBJECT_OPERATOR,
+ re: /^->/
+ },
+ {
+ value: PHP.Constants.T_STRING,
+ re: new RegExp('^' + labelRegexPart),
+ func: function() {
+ popState();
+ }
+ },
+ {
+ value: PHP.Constants.T_WHITESPACE,
+ re: /^[ \n\r\t]+/
+ }
+ ],
+ 'LOOKING_FOR_VARNAME': [
+ {
+ value: PHP.Constants.T_STRING_VARNAME,
+ re: new RegExp('^' + labelRegexPart + '(?=[\\[}])'),
+ func: function() {
+ swapState('IN_SCRIPTING');
+ }
+ }
+ ],
+ 'NOWDOC': [
+ {
+ value: PHP.Constants.T_END_HEREDOC,
+ matchFunc: function(src) {
+ var re = new RegExp('^' + heredoc + '(?=;?[\\r\\n])');
+ if (src.match(re)) {
+ return [src.substr(0, heredoc.length)];
+ } else {
+ return null;
+ }
+ },
+ func: function() {
+ swapState('IN_SCRIPTING');
+ }
+ },
+ {
+ value: PHP.Constants.T_ENCAPSED_AND_WHITESPACE,
+ matchFunc: function(src) {
+ var re = new RegExp('[\\r\\n]' + heredoc + '(?=;?[\\r\\n])');
+ var result = re.exec(src);
+ var end = result ? result.index + 1 : src.length;
+ return [src.substring(0, end)];
+ }
+ }
+ ],
+ 'HEREDOC': sharedStringTokens.concat([
+ {
+ value: PHP.Constants.T_END_HEREDOC,
+ matchFunc: function(src) {
+ if (!heredocEndAllowed) {
+ return null;
+ }
+ var re = new RegExp('^' + heredoc + '(?=;?[\\r\\n])');
+ if (src.match(re)) {
+ return [src.substr(0, heredoc.length)];
+ } else {
+ return null;
+ }
+ },
+ func: function() {
+ swapState('IN_SCRIPTING');
+ }
+ },
+ {
+ value: PHP.Constants.T_ENCAPSED_AND_WHITESPACE,
+ matchFunc: function(src) {
+ var end = src.length;
+ var re = new RegExp('^' + stringRegexPart(''));
+ var result = re.exec(src);
+ if (result) {
+ end = result[0].length;
+ }
+ re = new RegExp('([\\r\\n])' + heredoc + '(?=;?[\\r\\n])');
+ result = re.exec(src.substring(0, end));
+ if (result) {
+ end = result.index + 1;
+ heredocEndAllowed = true;
+ } else {
+ heredocEndAllowed = false;
+ }
+ if (end == 0) {
+ return null;
+ }
+ return [src.substring(0, end)];
+ }
+ }
+ ])
+ };
+
+ var results = [],
+ line = 1,
+ cancel = true;
+
+ if (src === null) {
+ return results;
+ }
+
+ if (typeof src !== "string") {
+ src = src.toString();
+ }
+
+ while (src.length > 0 && cancel === true) {
+ var state = stateStack[stackPos];
+ var tokens = data[state];
+ cancel = tokens.some(function(token){
+ var result = token.matchFunc !== undefined
+ ? token.matchFunc(src)
+ : src.match(token.re);
+ if (result !== null) {
+ if (result[0].length == 0) {
+ throw new Error("empty match");
+ }
+
+ if (token.func !== undefined) {
+ token.func(result);
+ }
+
+ if (token.value === -1) {
+ results.push(result[0]);
+ } else {
+ var resultString = result[0];
+ results.push([
+ parseInt(token.value, 10),
+ resultString,
+ line
+ ]);
+ line += resultString.split('\n').length - 1;
+ }
+
+ src = src.substring(result[0].length);
+
+ return true;
+ }
+ return false;
+ });
+ }
+
+ return results;
+};
+
+
+PHP.Parser = function ( preprocessedTokens, eval ) {
+
+ var yybase = this.yybase,
+ yydefault = this.yydefault,
+ yycheck = this.yycheck,
+ yyaction = this.yyaction,
+ yylen = this.yylen,
+ yygbase = this.yygbase,
+ yygcheck = this.yygcheck,
+ yyp = this.yyp,
+ yygoto = this.yygoto,
+ yylhs = this.yylhs,
+ terminals = this.terminals,
+ translate = this.translate,
+ yygdefault = this.yygdefault;
+
+
+ this.pos = -1;
+ this.line = 1;
+
+ this.tokenMap = this.createTokenMap( );
+
+ this.dropTokens = {};
+ this.dropTokens[ PHP.Constants.T_WHITESPACE ] = 1;
+ this.dropTokens[ PHP.Constants.T_OPEN_TAG ] = 1;
+ var tokens = [];
+ preprocessedTokens.forEach( function( token, index ) {
+ if ( typeof token === "object" && token[ 0 ] === PHP.Constants.T_OPEN_TAG_WITH_ECHO) {
+ tokens.push([
+ PHP.Constants.T_OPEN_TAG,
+ token[ 1 ],
+ token[ 2 ]
+ ]);
+ tokens.push([
+ PHP.Constants.T_ECHO,
+ token[ 1 ],
+ token[ 2 ]
+ ]);
+ } else {
+ tokens.push( token );
+ }
+ });
+ this.tokens = tokens;
+ var tokenId = this.TOKEN_NONE;
+ this.startAttributes = {
+ 'startLine': 1
+ };
+
+ this.endAttributes = {};
+ var attributeStack = [ this.startAttributes ];
+ var state = 0;
+ var stateStack = [ state ];
+ this.yyastk = [];
+ this.stackPos = 0;
+
+ var yyn;
+
+ var origTokenId;
+
+
+ for (;;) {
+
+ if ( yybase[ state ] === 0 ) {
+ yyn = yydefault[ state ];
+ } else {
+ if (tokenId === this.TOKEN_NONE ) {
+ origTokenId = this.getNextToken( );
+ tokenId = (origTokenId >= 0 && origTokenId < this.TOKEN_MAP_SIZE) ? translate[ origTokenId ] : this.TOKEN_INVALID;
+
+ attributeStack[ this.stackPos ] = this.startAttributes;
+ }
+
+ if (((yyn = yybase[ state ] + tokenId) >= 0
+ && yyn < this.YYLAST && yycheck[ yyn ] === tokenId
+ || (state < this.YY2TBLSTATE
+ && (yyn = yybase[state + this.YYNLSTATES] + tokenId) >= 0
+ && yyn < this.YYLAST
+ && yycheck[ yyn ] === tokenId))
+ && (yyn = yyaction[ yyn ]) !== this.YYDEFAULT ) {
+ if (yyn > 0) {
+ ++this.stackPos;
+
+ stateStack[ this.stackPos ] = state = yyn;
+ this.yyastk[ this.stackPos ] = this.tokenValue;
+ attributeStack[ this.stackPos ] = this.startAttributes;
+ tokenId = this.TOKEN_NONE;
+
+ if (yyn < this.YYNLSTATES)
+ continue;
+ yyn -= this.YYNLSTATES;
+ } else {
+ yyn = -yyn;
+ }
+ } else {
+ yyn = yydefault[ state ];
+ }
+ }
+
+ for (;;) {
+
+ if ( yyn === 0 ) {
+ return this.yyval;
+ } else if (yyn !== this.YYUNEXPECTED ) {
+ for (var attr in this.endAttributes) {
+ attributeStack[ this.stackPos - yylen[ yyn ] ][ attr ] = this.endAttributes[ attr ];
+ }
+ this.stackPos -= yylen[ yyn ];
+ yyn = yylhs[ yyn ];
+ if ((yyp = yygbase[ yyn ] + stateStack[ this.stackPos ]) >= 0
+ && yyp < this.YYGLAST
+ && yygcheck[ yyp ] === yyn) {
+ state = yygoto[ yyp ];
+ } else {
+ state = yygdefault[ yyn ];
+ }
+
+ ++this.stackPos;
+
+ stateStack[ this.stackPos ] = state;
+ this.yyastk[ this.stackPos ] = this.yyval;
+ attributeStack[ this.stackPos ] = this.startAttributes;
+ } else {
+ if (eval !== true) {
+
+ var expected = [];
+
+ for (var i = 0; i < this.TOKEN_MAP_SIZE; ++i) {
+ if ((yyn = yybase[ state ] + i) >= 0 && yyn < this.YYLAST && yycheck[ yyn ] == i
+ || state < this.YY2TBLSTATE
+ && (yyn = yybase[ state + this.YYNLSTATES] + i)
+ && yyn < this.YYLAST && yycheck[ yyn ] == i
+ ) {
+ if (yyaction[ yyn ] != this.YYUNEXPECTED) {
+ if (expected.length == 4) {
+ expected = [];
+ break;
+ }
+
+ expected.push( this.terminals[ i ] );
+ }
+ }
+ }
+
+ var expectedString = '';
+ if (expected.length) {
+ expectedString = ', expecting ' + expected.join(' or ');
+ }
+ throw new PHP.ParseError('syntax error, unexpected ' + terminals[ tokenId ] + expectedString, this.startAttributes['startLine']);
+ } else {
+ return this.startAttributes['startLine'];
+ }
+
+ }
+
+ if (state < this.YYNLSTATES)
+ break;
+ yyn = state - this.YYNLSTATES;
+ }
+ }
+};
+
+PHP.ParseError = function( msg, line ) {
+ this.message = msg;
+ this.line = line;
+};
+
+PHP.Parser.prototype.getNextToken = function( ) {
+
+ this.startAttributes = {};
+ this.endAttributes = {};
+
+ var token,
+ tmp;
+
+ while (this.tokens[++this.pos] !== undefined) {
+ token = this.tokens[this.pos];
+
+ if (typeof token === "string") {
+ this.startAttributes['startLine'] = this.line;
+ this.endAttributes['endLine'] = this.line;
+ if ('b"' === token) {
+ this.tokenValue = 'b"';
+ return '"'.charCodeAt(0);
+ } else {
+ this.tokenValue = token;
+ return token.charCodeAt(0);
+ }
+ } else {
+
+
+
+ this.line += ((tmp = token[ 1 ].match(/\n/g)) === null) ? 0 : tmp.length;
+
+ if (PHP.Constants.T_COMMENT === token[0]) {
+
+ if (!Array.isArray(this.startAttributes['comments'])) {
+ this.startAttributes['comments'] = [];
+ }
+
+ this.startAttributes['comments'].push( {
+ type: "comment",
+ comment: token[1],
+ line: token[2]
+ });
+
+ } else if (PHP.Constants.T_DOC_COMMENT === token[0]) {
+ this.startAttributes['comments'].push( new PHPParser_Comment_Doc(token[1], token[2]) );
+ } else if (this.dropTokens[token[0]] === undefined) {
+ this.tokenValue = token[1];
+ this.startAttributes['startLine'] = token[2];
+ this.endAttributes['endLine'] = this.line;
+
+ return this.tokenMap[token[0]];
+ }
+ }
+ }
+
+ this.startAttributes['startLine'] = this.line;
+ return 0;
+};
+
+PHP.Parser.prototype.tokenName = function( token ) {
+ var constants = ["T_INCLUDE","T_INCLUDE_ONCE","T_EVAL","T_REQUIRE","T_REQUIRE_ONCE","T_LOGICAL_OR","T_LOGICAL_XOR","T_LOGICAL_AND","T_PRINT","T_YIELD","T_DOUBLE_ARROW","T_YIELD_FROM","T_PLUS_EQUAL","T_MINUS_EQUAL","T_MUL_EQUAL","T_DIV_EQUAL","T_CONCAT_EQUAL","T_MOD_EQUAL","T_AND_EQUAL","T_OR_EQUAL","T_XOR_EQUAL","T_SL_EQUAL","T_SR_EQUAL","T_POW_EQUAL","T_COALESCE","T_BOOLEAN_OR","T_BOOLEAN_AND","T_IS_EQUAL","T_IS_NOT_EQUAL","T_IS_IDENTICAL","T_IS_NOT_IDENTICAL","T_SPACESHIP","T_IS_SMALLER_OR_EQUAL","T_IS_GREATER_OR_EQUAL","T_SL","T_SR","T_INSTANCEOF","T_INC","T_DEC","T_INT_CAST","T_DOUBLE_CAST","T_STRING_CAST","T_ARRAY_CAST","T_OBJECT_CAST","T_BOOL_CAST","T_UNSET_CAST","T_POW","T_NEW","T_CLONE","T_EXIT","T_IF","T_ELSEIF","T_ELSE","T_ENDIF","T_LNUMBER","T_DNUMBER","T_STRING","T_STRING_VARNAME","T_VARIABLE","T_NUM_STRING","T_INLINE_HTML","T_CHARACTER","T_BAD_CHARACTER","T_ENCAPSED_AND_WHITESPACE","T_CONSTANT_ENCAPSED_STRING","T_ECHO","T_DO","T_WHILE","T_ENDWHILE","T_FOR","T_ENDFOR","T_FOREACH","T_ENDFOREACH","T_DECLARE","T_ENDDECLARE","T_AS","T_SWITCH","T_ENDSWITCH","T_CASE","T_DEFAULT","T_BREAK","T_CONTINUE","T_GOTO","T_FUNCTION","T_CONST","T_RETURN","T_TRY","T_CATCH","T_FINALLY","T_THROW","T_USE","T_INSTEADOF","T_GLOBAL","T_STATIC","T_ABSTRACT","T_FINAL","T_PRIVATE","T_PROTECTED","T_PUBLIC","T_VAR","T_UNSET","T_ISSET","T_EMPTY","T_HALT_COMPILER","T_CLASS","T_TRAIT","T_INTERFACE","T_EXTENDS","T_IMPLEMENTS","T_OBJECT_OPERATOR","T_DOUBLE_ARROW","T_LIST","T_ARRAY","T_CALLABLE","T_CLASS_C","T_TRAIT_C","T_METHOD_C","T_FUNC_C","T_LINE","T_FILE","T_COMMENT","T_DOC_COMMENT","T_OPEN_TAG","T_OPEN_TAG_WITH_ECHO","T_CLOSE_TAG","T_WHITESPACE","T_START_HEREDOC","T_END_HEREDOC","T_DOLLAR_OPEN_CURLY_BRACES","T_CURLY_OPEN","T_PAAMAYIM_NEKUDOTAYIM","T_NAMESPACE","T_NS_C","T_DIR","T_NS_SEPARATOR","T_ELLIPSIS"];
+ var current = "UNKNOWN";
+ constants.some(function( constant ) {
+ if (PHP.Constants[ constant ] === token) {
+ current = constant;
+ return true;
+ } else {
+ return false;
+ }
+ });
+
+ return current;
+};
+
+PHP.Parser.prototype.createTokenMap = function() {
+ var tokenMap = {},
+ name,
+ i;
+ for ( i = 256; i < 1000; ++i ) {
+ if( PHP.Constants.T_OPEN_TAG_WITH_ECHO === i ) {
+ tokenMap[ i ] = PHP.Constants.T_ECHO;
+ } else if( PHP.Constants.T_CLOSE_TAG === i ) {
+ tokenMap[ i ] = 59;
+ } else if ( 'UNKNOWN' !== (name = this.tokenName( i ) ) ) {
+ tokenMap[ i ] = this[name];
+ }
+ }
+ return tokenMap;
+};
+
+PHP.Parser.prototype.TOKEN_NONE = -1;
+PHP.Parser.prototype.TOKEN_INVALID = 157;
+
+PHP.Parser.prototype.TOKEN_MAP_SIZE = 392;
+
+PHP.Parser.prototype.YYLAST = 889;
+PHP.Parser.prototype.YY2TBLSTATE = 337;
+PHP.Parser.prototype.YYGLAST = 410;
+PHP.Parser.prototype.YYNLSTATES = 564;
+PHP.Parser.prototype.YYUNEXPECTED = 32767;
+PHP.Parser.prototype.YYDEFAULT = -32766;
+PHP.Parser.prototype.YYERRTOK = 256;
+PHP.Parser.prototype.T_INCLUDE = 257;
+PHP.Parser.prototype.T_INCLUDE_ONCE = 258;
+PHP.Parser.prototype.T_EVAL = 259;
+PHP.Parser.prototype.T_REQUIRE = 260;
+PHP.Parser.prototype.T_REQUIRE_ONCE = 261;
+PHP.Parser.prototype.T_LOGICAL_OR = 262;
+PHP.Parser.prototype.T_LOGICAL_XOR = 263;
+PHP.Parser.prototype.T_LOGICAL_AND = 264;
+PHP.Parser.prototype.T_PRINT = 265;
+PHP.Parser.prototype.T_YIELD = 266;
+PHP.Parser.prototype.T_DOUBLE_ARROW = 267;
+PHP.Parser.prototype.T_YIELD_FROM = 268;
+PHP.Parser.prototype.T_PLUS_EQUAL = 269;
+PHP.Parser.prototype.T_MINUS_EQUAL = 270;
+PHP.Parser.prototype.T_MUL_EQUAL = 271;
+PHP.Parser.prototype.T_DIV_EQUAL = 272;
+PHP.Parser.prototype.T_CONCAT_EQUAL = 273;
+PHP.Parser.prototype.T_MOD_EQUAL = 274;
+PHP.Parser.prototype.T_AND_EQUAL = 275;
+PHP.Parser.prototype.T_OR_EQUAL = 276;
+PHP.Parser.prototype.T_XOR_EQUAL = 277;
+PHP.Parser.prototype.T_SL_EQUAL = 278;
+PHP.Parser.prototype.T_SR_EQUAL = 279;
+PHP.Parser.prototype.T_POW_EQUAL = 280;
+PHP.Parser.prototype.T_COALESCE = 281;
+PHP.Parser.prototype.T_BOOLEAN_OR = 282;
+PHP.Parser.prototype.T_BOOLEAN_AND = 283;
+PHP.Parser.prototype.T_IS_EQUAL = 284;
+PHP.Parser.prototype.T_IS_NOT_EQUAL = 285;
+PHP.Parser.prototype.T_IS_IDENTICAL = 286;
+PHP.Parser.prototype.T_IS_NOT_IDENTICAL = 287;
+PHP.Parser.prototype.T_SPACESHIP = 288;
+PHP.Parser.prototype.T_IS_SMALLER_OR_EQUAL = 289;
+PHP.Parser.prototype.T_IS_GREATER_OR_EQUAL = 290;
+PHP.Parser.prototype.T_SL = 291;
+PHP.Parser.prototype.T_SR = 292;
+PHP.Parser.prototype.T_INSTANCEOF = 293;
+PHP.Parser.prototype.T_INC = 294;
+PHP.Parser.prototype.T_DEC = 295;
+PHP.Parser.prototype.T_INT_CAST = 296;
+PHP.Parser.prototype.T_DOUBLE_CAST = 297;
+PHP.Parser.prototype.T_STRING_CAST = 298;
+PHP.Parser.prototype.T_ARRAY_CAST = 299;
+PHP.Parser.prototype.T_OBJECT_CAST = 300;
+PHP.Parser.prototype.T_BOOL_CAST = 301;
+PHP.Parser.prototype.T_UNSET_CAST = 302;
+PHP.Parser.prototype.T_POW = 303;
+PHP.Parser.prototype.T_NEW = 304;
+PHP.Parser.prototype.T_CLONE = 305;
+PHP.Parser.prototype.T_EXIT = 306;
+PHP.Parser.prototype.T_IF = 307;
+PHP.Parser.prototype.T_ELSEIF = 308;
+PHP.Parser.prototype.T_ELSE = 309;
+PHP.Parser.prototype.T_ENDIF = 310;
+PHP.Parser.prototype.T_LNUMBER = 311;
+PHP.Parser.prototype.T_DNUMBER = 312;
+PHP.Parser.prototype.T_STRING = 313;
+PHP.Parser.prototype.T_STRING_VARNAME = 314;
+PHP.Parser.prototype.T_VARIABLE = 315;
+PHP.Parser.prototype.T_NUM_STRING = 316;
+PHP.Parser.prototype.T_INLINE_HTML = 317;
+PHP.Parser.prototype.T_CHARACTER = 318;
+PHP.Parser.prototype.T_BAD_CHARACTER = 319;
+PHP.Parser.prototype.T_ENCAPSED_AND_WHITESPACE = 320;
+PHP.Parser.prototype.T_CONSTANT_ENCAPSED_STRING = 321;
+PHP.Parser.prototype.T_ECHO = 322;
+PHP.Parser.prototype.T_DO = 323;
+PHP.Parser.prototype.T_WHILE = 324;
+PHP.Parser.prototype.T_ENDWHILE = 325;
+PHP.Parser.prototype.T_FOR = 326;
+PHP.Parser.prototype.T_ENDFOR = 327;
+PHP.Parser.prototype.T_FOREACH = 328;
+PHP.Parser.prototype.T_ENDFOREACH = 329;
+PHP.Parser.prototype.T_DECLARE = 330;
+PHP.Parser.prototype.T_ENDDECLARE = 331;
+PHP.Parser.prototype.T_AS = 332;
+PHP.Parser.prototype.T_SWITCH = 333;
+PHP.Parser.prototype.T_ENDSWITCH = 334;
+PHP.Parser.prototype.T_CASE = 335;
+PHP.Parser.prototype.T_DEFAULT = 336;
+PHP.Parser.prototype.T_BREAK = 337;
+PHP.Parser.prototype.T_CONTINUE = 338;
+PHP.Parser.prototype.T_GOTO = 339;
+PHP.Parser.prototype.T_FUNCTION = 340;
+PHP.Parser.prototype.T_CONST = 341;
+PHP.Parser.prototype.T_RETURN = 342;
+PHP.Parser.prototype.T_TRY = 343;
+PHP.Parser.prototype.T_CATCH = 344;
+PHP.Parser.prototype.T_FINALLY = 345;
+PHP.Parser.prototype.T_THROW = 346;
+PHP.Parser.prototype.T_USE = 347;
+PHP.Parser.prototype.T_INSTEADOF = 348;
+PHP.Parser.prototype.T_GLOBAL = 349;
+PHP.Parser.prototype.T_STATIC = 350;
+PHP.Parser.prototype.T_ABSTRACT = 351;
+PHP.Parser.prototype.T_FINAL = 352;
+PHP.Parser.prototype.T_PRIVATE = 353;
+PHP.Parser.prototype.T_PROTECTED = 354;
+PHP.Parser.prototype.T_PUBLIC = 355;
+PHP.Parser.prototype.T_VAR = 356;
+PHP.Parser.prototype.T_UNSET = 357;
+PHP.Parser.prototype.T_ISSET = 358;
+PHP.Parser.prototype.T_EMPTY = 359;
+PHP.Parser.prototype.T_HALT_COMPILER = 360;
+PHP.Parser.prototype.T_CLASS = 361;
+PHP.Parser.prototype.T_TRAIT = 362;
+PHP.Parser.prototype.T_INTERFACE = 363;
+PHP.Parser.prototype.T_EXTENDS = 364;
+PHP.Parser.prototype.T_IMPLEMENTS = 365;
+PHP.Parser.prototype.T_OBJECT_OPERATOR = 366;
+PHP.Parser.prototype.T_LIST = 367;
+PHP.Parser.prototype.T_ARRAY = 368;
+PHP.Parser.prototype.T_CALLABLE = 369;
+PHP.Parser.prototype.T_CLASS_C = 370;
+PHP.Parser.prototype.T_TRAIT_C = 371;
+PHP.Parser.prototype.T_METHOD_C = 372;
+PHP.Parser.prototype.T_FUNC_C = 373;
+PHP.Parser.prototype.T_LINE = 374;
+PHP.Parser.prototype.T_FILE = 375;
+PHP.Parser.prototype.T_COMMENT = 376;
+PHP.Parser.prototype.T_DOC_COMMENT = 377;
+PHP.Parser.prototype.T_OPEN_TAG = 378;
+PHP.Parser.prototype.T_OPEN_TAG_WITH_ECHO = 379;
+PHP.Parser.prototype.T_CLOSE_TAG = 380;
+PHP.Parser.prototype.T_WHITESPACE = 381;
+PHP.Parser.prototype.T_START_HEREDOC = 382;
+PHP.Parser.prototype.T_END_HEREDOC = 383;
+PHP.Parser.prototype.T_DOLLAR_OPEN_CURLY_BRACES = 384;
+PHP.Parser.prototype.T_CURLY_OPEN = 385;
+PHP.Parser.prototype.T_PAAMAYIM_NEKUDOTAYIM = 386;
+PHP.Parser.prototype.T_NAMESPACE = 387;
+PHP.Parser.prototype.T_NS_C = 388;
+PHP.Parser.prototype.T_DIR = 389;
+PHP.Parser.prototype.T_NS_SEPARATOR = 390;
+PHP.Parser.prototype.T_ELLIPSIS = 391;
+PHP.Parser.prototype.terminals = [
+ "$EOF",
+ "error",
+ "T_INCLUDE",
+ "T_INCLUDE_ONCE",
+ "T_EVAL",
+ "T_REQUIRE",
+ "T_REQUIRE_ONCE",
+ "','",
+ "T_LOGICAL_OR",
+ "T_LOGICAL_XOR",
+ "T_LOGICAL_AND",
+ "T_PRINT",
+ "T_YIELD",
+ "T_DOUBLE_ARROW",
+ "T_YIELD_FROM",
+ "'='",
+ "T_PLUS_EQUAL",
+ "T_MINUS_EQUAL",
+ "T_MUL_EQUAL",
+ "T_DIV_EQUAL",
+ "T_CONCAT_EQUAL",
+ "T_MOD_EQUAL",
+ "T_AND_EQUAL",
+ "T_OR_EQUAL",
+ "T_XOR_EQUAL",
+ "T_SL_EQUAL",
+ "T_SR_EQUAL",
+ "T_POW_EQUAL",
+ "'?'",
+ "':'",
+ "T_COALESCE",
+ "T_BOOLEAN_OR",
+ "T_BOOLEAN_AND",
+ "'|'",
+ "'^'",
+ "'&'",
+ "T_IS_EQUAL",
+ "T_IS_NOT_EQUAL",
+ "T_IS_IDENTICAL",
+ "T_IS_NOT_IDENTICAL",
+ "T_SPACESHIP",
+ "'<'",
+ "T_IS_SMALLER_OR_EQUAL",
+ "'>'",
+ "T_IS_GREATER_OR_EQUAL",
+ "T_SL",
+ "T_SR",
+ "'+'",
+ "'-'",
+ "'.'",
+ "'*'",
+ "'/'",
+ "'%'",
+ "'!'",
+ "T_INSTANCEOF",
+ "'~'",
+ "T_INC",
+ "T_DEC",
+ "T_INT_CAST",
+ "T_DOUBLE_CAST",
+ "T_STRING_CAST",
+ "T_ARRAY_CAST",
+ "T_OBJECT_CAST",
+ "T_BOOL_CAST",
+ "T_UNSET_CAST",
+ "'@'",
+ "T_POW",
+ "'['",
+ "T_NEW",
+ "T_CLONE",
+ "T_EXIT",
+ "T_IF",
+ "T_ELSEIF",
+ "T_ELSE",
+ "T_ENDIF",
+ "T_LNUMBER",
+ "T_DNUMBER",
+ "T_STRING",
+ "T_STRING_VARNAME",
+ "T_VARIABLE",
+ "T_NUM_STRING",
+ "T_INLINE_HTML",
+ "T_ENCAPSED_AND_WHITESPACE",
+ "T_CONSTANT_ENCAPSED_STRING",
+ "T_ECHO",
+ "T_DO",
+ "T_WHILE",
+ "T_ENDWHILE",
+ "T_FOR",
+ "T_ENDFOR",
+ "T_FOREACH",
+ "T_ENDFOREACH",
+ "T_DECLARE",
+ "T_ENDDECLARE",
+ "T_AS",
+ "T_SWITCH",
+ "T_ENDSWITCH",
+ "T_CASE",
+ "T_DEFAULT",
+ "T_BREAK",
+ "T_CONTINUE",
+ "T_GOTO",
+ "T_FUNCTION",
+ "T_CONST",
+ "T_RETURN",
+ "T_TRY",
+ "T_CATCH",
+ "T_FINALLY",
+ "T_THROW",
+ "T_USE",
+ "T_INSTEADOF",
+ "T_GLOBAL",
+ "T_STATIC",
+ "T_ABSTRACT",
+ "T_FINAL",
+ "T_PRIVATE",
+ "T_PROTECTED",
+ "T_PUBLIC",
+ "T_VAR",
+ "T_UNSET",
+ "T_ISSET",
+ "T_EMPTY",
+ "T_HALT_COMPILER",
+ "T_CLASS",
+ "T_TRAIT",
+ "T_INTERFACE",
+ "T_EXTENDS",
+ "T_IMPLEMENTS",
+ "T_OBJECT_OPERATOR",
+ "T_LIST",
+ "T_ARRAY",
+ "T_CALLABLE",
+ "T_CLASS_C",
+ "T_TRAIT_C",
+ "T_METHOD_C",
+ "T_FUNC_C",
+ "T_LINE",
+ "T_FILE",
+ "T_START_HEREDOC",
+ "T_END_HEREDOC",
+ "T_DOLLAR_OPEN_CURLY_BRACES",
+ "T_CURLY_OPEN",
+ "T_PAAMAYIM_NEKUDOTAYIM",
+ "T_NAMESPACE",
+ "T_NS_C",
+ "T_DIR",
+ "T_NS_SEPARATOR",
+ "T_ELLIPSIS",
+ "';'",
+ "'{'",
+ "'}'",
+ "'('",
+ "')'",
+ "'`'",
+ "']'",
+ "'\"'",
+ "'$'"
+ , "???"
+];
+PHP.Parser.prototype.translate = [
+ 0, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 53, 155, 157, 156, 52, 35, 157,
+ 151, 152, 50, 47, 7, 48, 49, 51, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 29, 148,
+ 41, 15, 43, 28, 65, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 67, 157, 154, 34, 157, 153, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 149, 33, 150, 55, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 157, 157, 157, 157,
+ 157, 157, 157, 157, 157, 157, 1, 2, 3, 4,
+ 5, 6, 8, 9, 10, 11, 12, 13, 14, 16,
+ 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
+ 27, 30, 31, 32, 36, 37, 38, 39, 40, 42,
+ 44, 45, 46, 54, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 66, 68, 69, 70, 71, 72, 73,
+ 74, 75, 76, 77, 78, 79, 80, 81, 157, 157,
+ 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, 157, 157, 157, 157,
+ 157, 157, 138, 139, 140, 141, 142, 143, 144, 145,
+ 146, 147
+];
+
+PHP.Parser.prototype.yyaction = [
+ 569, 570, 571, 572, 573, 215, 574, 575, 576, 612,
+ 613, 0, 27, 99, 100, 101, 102, 103, 104, 105,
+ 106, 107, 108, 109, 110,-32766,-32766,-32766, 95, 96,
+ 97, 24, 240, 226, -267,-32766,-32766,-32766,-32766,-32766,
+ -32766, 530, 344, 114, 98,-32766, 286,-32766,-32766,-32766,
+ -32766,-32766, 577, 870, 872,-32766,-32766,-32766,-32766,-32766,
+ -32766,-32766,-32766, 224,-32766, 714, 578, 579, 580, 581,
+ 582, 583, 584,-32766, 264, 644, 840, 841, 842, 839,
+ 838, 837, 585, 586, 587, 588, 589, 590, 591, 592,
+ 593, 594, 595, 615, 616, 617, 618, 619, 607, 608,
+ 609, 610, 611, 596, 597, 598, 599, 600, 601, 602,
+ 638, 639, 640, 641, 642, 643, 603, 604, 605, 606,
+ 636, 627, 625, 626, 622, 623, 116, 614, 620, 621,
+ 628, 629, 631, 630, 632, 633, 42, 43, 381, 44,
+ 45, 624, 635, 634, -214, 46, 47, 289, 48,-32767,
+ -32767,-32767,-32767, 90, 91, 92, 93, 94, 267, 241,
+ 22, 840, 841, 842, 839, 838, 837, 832,-32766,-32766,
+ -32766, 306, 1000, 1000, 1037, 120, 966, 436, -423, 244,
+ 797, 49, 50, 660, 661, 272, 362, 51,-32766, 52,
+ 219, 220, 53, 54, 55, 56, 57, 58, 59, 60,
+ 1016, 22, 238, 61, 351, 945,-32766,-32766,-32766, 967,
+ 968, 646, 705, 1000, 28, -456, 125, 966,-32766,-32766,
+ -32766, 715, 398, 399, 216, 1000,-32766, 339,-32766,-32766,
+ -32766,-32766, 25, 222, 980, 552, 355, 378,-32766, -423,
+ -32766,-32766,-32766, 121, 65, 1045, 408, 1047, 1046, 274,
+ 274, 131, 244, -423, 394, 395, 358, 519, 945, 537,
+ -423, 111, -426, 398, 399, 130, 972, 973, 974, 975,
+ 969, 970, 243, 128, -422, -421, 1013, 409, 976, 971,
+ 353, 791, 792, 7, -162, 63, 124, 255, 701, 256,
+ 274, 382, -122, -122, -122, -4, 715, 383, 646, 1042,
+ -421, 704, 274, -219, 33, 17, 384, -122, 385, -122,
+ 386, -122, 387, -122, 369, 388, -122, -122, -122, 34,
+ 35, 389, 352, 520, 36, 390, 353, 702, 62, 112,
+ 818, 287, 288, 391, 392, -422, -421, -161, 350, 393,
+ 40, 38, 690, 735, 396, 397, 361, 22, 122, -422,
+ -421,-32766,-32766,-32766, 791, 792, -422, -421, -425, 1000,
+ -456, -421, -238, 966, 409, 41, 382, 353, 717, 535,
+ -122,-32766, 383,-32766,-32766, -421, 704, 21, 813, 33,
+ 17, 384, -421, 385, -466, 386, 224, 387, -467, 273,
+ 388, 367, 945, -458, 34, 35, 389, 352, 345, 36,
+ 390, 248, 247, 62, 254, 715, 287, 288, 391, 392,
+ 399,-32766,-32766,-32766, 393, 295, 1000, 652, 735, 396,
+ 397, 117, 115, 113, 814, 119, 72, 73, 74, -162,
+ 764, 65, 240, 541, 370, 518, 274, 118, 270, 92,
+ 93, 94, 242, 717, 535, -4, 26, 1000, 75, 76,
+ 77, 78, 79, 80, 81, 82, 83, 84, 85, 86,
+ 87, 88, 89, 90, 91, 92, 93, 94, 95, 96,
+ 97, 547, 240, 713, 715, 382, 276,-32766,-32766, 126,
+ 945, 383, -161, 938, 98, 704, 225, 659, 33, 17,
+ 384, 346, 385, 274, 386, 728, 387, 221, 120, 388,
+ 505, 506, 540, 34, 35, 389, 715, -238, 36, 390,
+ 1017, 223, 62, 494, 18, 287, 288, 127, 297, 376,
+ 6, 98, 798, 393, 274, 660, 661, 490, 491, -466,
+ 39, -466, 514, -467, 539, -467, 16, 458, -458, 315,
+ 791, 792, 829, 553, 382, 817, 563, 653, 538, 765,
+ 383, 449, 751, 535, 704, 448, 435, 33, 17, 384,
+ 430, 385, 646, 386, 359, 387, 357, 647, 388, 673,
+ 429, 1040, 34, 35, 389, 715, 382, 36, 390, 941,
+ 492, 62, 383, 503, 287, 288, 704, 434, 440, 33,
+ 17, 384, 393, 385,-32766, 386, 445, 387, 495, 509,
+ 388, 10, 529, 542, 34, 35, 389, 715, 515, 36,
+ 390, 499, 500, 62, 214, -80, 287, 288, 452, 269,
+ 736, 717, 535, 488, 393, 356, 266, 979, 265, 730,
+ 982, 722, 358, 338, 493, 548, 0, 294, 737, 0,
+ 3, 0, 309, 0, 0, 382, 0, 0, 271, 0,
+ 0, 383, 0, 717, 535, 704, 227, 0, 33, 17,
+ 384, 9, 385, 0, 386, 0, 387, -382, 0, 388,
+ 0, 0, 325, 34, 35, 389, 715, 382, 36, 390,
+ 321, 341, 62, 383, 340, 287, 288, 704, 22, 320,
+ 33, 17, 384, 393, 385, 442, 386, 337, 387, 562,
+ 1000, 388, 32, 31, 966, 34, 35, 389, 823, 657,
+ 36, 390, 656, 821, 62, 703, 711, 287, 288, 561,
+ 822, 825, 717, 535, 695, 393, 747, 749, 693, 759,
+ 758, 752, 767, 945, 824, 706, 700, 712, 699, 698,
+ 658, 0, 263, 262, 559, 558, 382, 556, 554, 551,
+ 398, 399, 383, 550, 717, 535, 704, 546, 545, 33,
+ 17, 384, 543, 385, 536, 386, 71, 387, 933, 932,
+ 388, 30, 65, 731, 34, 35, 389, 274, 724, 36,
+ 390, 830, 734, 62, 663, 662, 287, 288,-32766,-32766,
+ -32766, 733, 732, 934, 393, 665, 664, 756, 555, 691,
+ 1041, 1001, 994, 1006, 1011, 1014, 757, 1043,-32766, 654,
+ -32766,-32766,-32766,-32766,-32766,-32766,-32767,-32767,-32767,-32767,
+ -32767, 655, 1044, 717, 535, -446, 926, 348, 343, 268,
+ 237, 236, 235, 234, 218, 217, 132, 129, -426, -425,
+ -424, 123, 20, 23, 70, 69, 29, 37, 64, 68,
+ 66, 67, -448, 0, 15, 19, 250, 910, 296, -217,
+ 467, 484, 909, 472, 528, 913, 11, 964, 955, -215,
+ 525, 379, 375, 373, 371, 14, 13, 12, -214, 0,
+ -393, 0, 1005, 1039, 992, 993, 963, 0, 981
+];
+
+PHP.Parser.prototype.yycheck = [
+ 2, 3, 4, 5, 6, 13, 8, 9, 10, 11,
+ 12, 0, 15, 16, 17, 18, 19, 20, 21, 22,
+ 23, 24, 25, 26, 27, 8, 9, 10, 50, 51,
+ 52, 7, 54, 7, 79, 8, 9, 10, 8, 9,
+ 10, 77, 7, 13, 66, 28, 7, 30, 31, 32,
+ 33, 34, 54, 56, 57, 28, 8, 30, 31, 32,
+ 33, 34, 35, 35, 109, 1, 68, 69, 70, 71,
+ 72, 73, 74, 118, 7, 77, 112, 113, 114, 115,
+ 116, 117, 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, 7, 129, 130, 131,
+ 132, 133, 134, 135, 136, 137, 2, 3, 4, 5,
+ 6, 143, 144, 145, 152, 11, 12, 7, 14, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 109, 7,
+ 67, 112, 113, 114, 115, 116, 117, 118, 8, 9,
+ 10, 79, 79, 79, 82, 147, 83, 82, 67, 28,
+ 152, 47, 48, 102, 103, 7, 7, 53, 28, 55,
+ 56, 57, 58, 59, 60, 61, 62, 63, 64, 65,
+ 1, 67, 68, 69, 70, 112, 8, 9, 10, 75,
+ 76, 77, 148, 79, 13, 7, 67, 83, 8, 9,
+ 10, 1, 129, 130, 13, 79, 28, 146, 30, 31,
+ 32, 33, 140, 141, 139, 29, 102, 7, 28, 128,
+ 30, 31, 32, 149, 151, 77, 112, 79, 80, 156,
+ 156, 15, 28, 142, 120, 121, 146, 77, 112, 149,
+ 149, 15, 151, 129, 130, 15, 132, 133, 134, 135,
+ 136, 137, 138, 15, 67, 67, 77, 143, 144, 145,
+ 146, 130, 131, 7, 7, 151, 15, 153, 148, 155,
+ 156, 71, 72, 73, 74, 0, 1, 77, 77, 150,
+ 67, 81, 156, 152, 84, 85, 86, 87, 88, 89,
+ 90, 91, 92, 93, 29, 95, 96, 97, 98, 99,
+ 100, 101, 102, 143, 104, 105, 146, 148, 108, 15,
+ 150, 111, 112, 113, 114, 128, 128, 7, 7, 119,
+ 67, 67, 122, 123, 124, 125, 7, 67, 149, 142,
+ 142, 8, 9, 10, 130, 131, 149, 149, 151, 79,
+ 152, 128, 7, 83, 143, 7, 71, 146, 148, 149,
+ 150, 28, 77, 30, 31, 142, 81, 7, 148, 84,
+ 85, 86, 149, 88, 7, 90, 35, 92, 7, 33,
+ 95, 7, 112, 7, 99, 100, 101, 102, 103, 104,
+ 105, 128, 128, 108, 109, 1, 111, 112, 113, 114,
+ 130, 8, 9, 10, 119, 142, 79, 122, 123, 124,
+ 125, 15, 149, 149, 148, 29, 8, 9, 10, 152,
+ 29, 151, 54, 29, 149, 79, 156, 15, 143, 47,
+ 48, 49, 29, 148, 149, 150, 28, 79, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 29, 54, 29, 1, 71, 67, 8, 9, 29,
+ 112, 77, 152, 152, 66, 81, 35, 148, 84, 85,
+ 86, 123, 88, 156, 90, 35, 92, 35, 147, 95,
+ 72, 73, 29, 99, 100, 101, 1, 152, 104, 105,
+ 152, 35, 108, 72, 73, 111, 112, 97, 98, 102,
+ 103, 66, 152, 119, 156, 102, 103, 106, 107, 152,
+ 67, 154, 74, 152, 29, 154, 152, 128, 152, 78,
+ 130, 131, 148, 149, 71, 148, 149, 148, 149, 148,
+ 77, 77, 148, 149, 81, 77, 77, 84, 85, 86,
+ 77, 88, 77, 90, 77, 92, 77, 77, 95, 77,
+ 77, 77, 99, 100, 101, 1, 71, 104, 105, 79,
+ 79, 108, 77, 79, 111, 112, 81, 79, 82, 84,
+ 85, 86, 119, 88, 82, 90, 86, 92, 87, 96,
+ 95, 94, 89, 29, 99, 100, 101, 1, 91, 104,
+ 105, 93, 96, 108, 94, 94, 111, 112, 94, 110,
+ 123, 148, 149, 109, 119, 102, 127, 139, 126, 147,
+ 139, 150, 146, 149, 154, 29, -1, 142, 123, -1,
+ 142, -1, 146, -1, -1, 71, -1, -1, 126, -1,
+ -1, 77, -1, 148, 149, 81, 35, -1, 84, 85,
+ 86, 142, 88, -1, 90, -1, 92, 142, -1, 95,
+ -1, -1, 146, 99, 100, 101, 1, 71, 104, 105,
+ 146, 146, 108, 77, 146, 111, 112, 81, 67, 146,
+ 84, 85, 86, 119, 88, 146, 90, 149, 92, 148,
+ 79, 95, 148, 148, 83, 99, 100, 101, 148, 148,
+ 104, 105, 148, 148, 108, 148, 148, 111, 112, 148,
+ 148, 148, 148, 149, 148, 119, 148, 148, 148, 148,
+ 148, 148, 148, 112, 148, 148, 148, 148, 148, 148,
+ 148, -1, 149, 149, 149, 149, 71, 149, 149, 149,
+ 129, 130, 77, 149, 148, 149, 81, 149, 149, 84,
+ 85, 86, 149, 88, 149, 90, 149, 92, 150, 150,
+ 95, 151, 151, 150, 99, 100, 101, 156, 150, 104,
+ 105, 150, 150, 108, 150, 150, 111, 112, 8, 9,
+ 10, 150, 150, 150, 119, 150, 150, 150, 150, 150,
+ 150, 150, 150, 150, 150, 150, 150, 150, 28, 150,
+ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 150, 150, 148, 149, 151, 153, 151, 151, 151,
+ 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
+ 151, 151, 151, 151, 151, 151, 151, 151, 151, 151,
+ 151, 151, 151, -1, 152, 152, 152, 152, 152, 152,
+ 152, 152, 152, 152, 152, 152, 152, 152, 152, 152,
+ 152, 152, 152, 152, 152, 152, 152, 152, 152, -1,
+ 153, -1, 154, 154, 154, 154, 154, -1, 155
+];
+
+PHP.Parser.prototype.yybase = [
+ 0, 220, 295, 94, 180, 560, -2, -2, -2, -2,
+ -36, 473, 574, 606, 574, 505, 404, 675, 675, 675,
+ 28, 351, 462, 462, 462, 461, 396, 476, 451, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 401, 64, 201, 568, 704, 713, 708,
+ 702, 714, 520, 706, 705, 211, 650, 651, 450, 652,
+ 653, 654, 655, 709, 480, 703, 712, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 48, 30, 469, 403, 403, 403, 403,
+ 403, 403, 403, 403, 403, 403, 403, 403, 403, 403,
+ 403, 403, 403, 403, 403, 160, 160, 160, 343, 210,
+ 208, 198, 17, 233, 27, 780, 780, 780, 780, 780,
+ 108, 108, 108, 108, 621, 621, 93, 280, 280, 280,
+ 280, 280, 280, 280, 280, 280, 280, 280, 632, 641,
+ 642, 643, 392, 392, 151, 151, 151, 151, 368, -45,
+ 146, 224, 224, 95, 410, 491, 733, 199, 199, 111,
+ 207, -22, -22, -22, 81, 506, 92, 92, 233, 233,
+ 273, 233, 423, 423, 423, 221, 221, 221, 221, 221,
+ 110, 221, 221, 221, 617, 512, 168, 516, 647, 397,
+ 503, 656, 274, 381, 377, 538, 535, 337, 523, 337,
+ 421, 441, 428, 525, 337, 337, 285, 401, 394, 378,
+ 567, 474, 339, 564, 140, 179, 409, 399, 384, 594,
+ 561, 711, 330, 710, 358, 149, 378, 378, 378, 370,
+ 593, 548, 355, -8, 646, 484, 277, 417, 386, 645,
+ 635, 230, 634, 276, 331, 356, 565, 485, 485, 485,
+ 485, 485, 485, 460, 485, 483, 691, 691, 478, 501,
+ 460, 696, 460, 485, 691, 460, 460, 502, 485, 522,
+ 522, 483, 508, 499, 691, 691, 499, 478, 460, 571,
+ 551, 514, 482, 413, 413, 514, 460, 413, 501, 413,
+ 11, 697, 699, 444, 700, 695, 698, 676, 694, 493,
+ 615, 497, 515, 684, 683, 693, 479, 489, 620, 692,
+ 549, 592, 487, 246, 314, 498, 463, 689, 523, 486,
+ 455, 455, 455, 463, 687, 455, 455, 455, 455, 455,
+ 455, 455, 455, 732, 24, 495, 510, 591, 590, 589,
+ 406, 588, 496, 524, 422, 599, 488, 549, 549, 649,
+ 727, 673, 490, 682, 716, 690, 555, 119, 271, 681,
+ 648, 543, 492, 534, 680, 598, 246, 715, 494, 672,
+ 549, 671, 455, 674, 701, 730, 731, 688, 728, 722,
+ 152, 526, 587, 178, 729, 659, 596, 595, 554, 725,
+ 707, 721, 720, 178, 576, 511, 717, 518, 677, 504,
+ 678, 613, 258, 657, 686, 584, 724, 723, 726, 583,
+ 582, 609, 608, 250, 236, 685, 442, 458, 517, 581,
+ 500, 628, 604, 679, 580, 579, 623, 619, 718, 521,
+ 486, 519, 509, 507, 513, 600, 618, 719, 206, 578,
+ 586, 573, 481, 572, 631, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 134, 134, -2, -2, -2,
+ 0, 0, 0, 0, -2, 134, 134, 134, 134, 134,
+ 134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
+ 134, 134, 134, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, 418, 418, 418, 418, 418, 418,
+ 418, 418, 418, 418, -3, 418, 418, -3, 418, 418,
+ 418, 418, 418, 418, -22, -22, -22, -22, 221, 221,
+ 221, 221, 221, 221, 221, 221, 221, 221, 221, 221,
+ 221, 221, 49, 49, 49, 49, -22, -22, 221, 221,
+ 221, 221, 221, 49, 221, 221, 221, 92, 221, 92,
+ 92, 337, 337, 0, 0, 0, 0, 0, 485, 92,
+ 0, 0, 0, 0, 0, 0, 485, 485, 485, 0,
+ 0, 0, 0, 0, 485, 0, 0, 0, 337, 92,
+ 0, 420, 420, 178, 420, 420, 0, 0, 0, 485,
+ 485, 0, 508, 0, 0, 0, 0, 691, 0, 0,
+ 0, 0, 0, 455, 119, 682, 0, 39, 0, 0,
+ 0, 0, 0, 490, 39, 26, 0, 26, 0, 0,
+ 455, 455, 455, 0, 490, 490, 0, 0, 67, 490,
+ 0, 0, 0, 67, 35, 0, 35, 0, 0, 0,
+ 178
+];
+
+PHP.Parser.prototype.yydefault = [
+ 3,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767, 468, 468, 468,32767,32767,32767,32767, 285,
+ 460, 285, 285,32767, 419, 419, 419, 419, 419, 419,
+ 419, 460,32767,32767,32767,32767,32767, 364,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767, 465,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767, 347, 348, 350,
+ 351, 284, 420, 237, 464, 283, 116, 246, 239, 191,
+ 282, 223, 119, 312, 365, 314, 363, 367, 313, 290,
+ 294, 295, 296, 297, 298, 299, 300, 301, 302, 303,
+ 304, 305, 288, 289, 366, 344, 343, 342, 310, 311,
+ 287, 315, 317, 287, 316, 333, 334, 331, 332, 335,
+ 336, 337, 338, 339,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767, 269, 269,
+ 269, 269, 324, 325, 229, 229, 229, 229,32767, 270,
+ 32767, 229,32767,32767,32767,32767,32767,32767,32767, 413,
+ 341, 319, 320, 318,32767, 392,32767, 394, 307, 309,
+ 387, 291,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767, 389, 421, 421,32767,32767,32767, 381,32767,
+ 159, 210, 212, 397,32767,32767,32767,32767,32767, 329,
+ 32767,32767,32767,32767,32767,32767, 474,32767,32767,32767,
+ 32767,32767, 421,32767,32767,32767, 321, 322, 323,32767,
+ 32767,32767, 421, 421,32767,32767, 421,32767, 421,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767, 163,32767,32767, 395, 395,32767,32767,
+ 163, 390, 163,32767,32767, 163, 163, 176,32767, 174,
+ 174,32767,32767, 178,32767, 435, 178,32767, 163, 196,
+ 196, 373, 165, 231, 231, 373, 163, 231,32767, 231,
+ 32767,32767,32767, 82,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767,32767,
+ 383,32767,32767,32767, 401,32767, 414, 433, 381,32767,
+ 327, 328, 330,32767, 423, 352, 353, 354, 355, 356,
+ 357, 358, 360,32767, 461, 386,32767,32767,32767,32767,
+ 32767,32767, 84, 108, 245,32767, 473, 84, 384,32767,
+ 473,32767,32767,32767,32767,32767,32767, 286,32767,32767,
+ 32767, 84,32767, 84,32767,32767, 457,32767,32767, 421,
+ 385,32767, 326, 398, 439,32767,32767, 422,32767,32767,
+ 218, 84,32767, 177,32767,32767,32767,32767,32767,32767,
+ 401,32767,32767, 179,32767,32767, 421,32767,32767,32767,
+ 32767,32767, 281,32767,32767,32767,32767,32767, 421,32767,
+ 32767,32767,32767, 222,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767,32767,32767,32767,32767, 82,
+ 60,32767, 263,32767,32767,32767,32767,32767,32767,32767,
+ 32767,32767,32767,32767,32767, 121, 121, 3, 3, 121,
+ 121, 121, 121, 121, 121, 121, 121, 121, 121, 121,
+ 121, 121, 121, 121, 248, 154, 248, 204, 248, 248,
+ 207, 196, 196, 255
+];
+
+PHP.Parser.prototype.yygoto = [
+ 163, 163, 135, 135, 135, 146, 148, 179, 164, 161,
+ 145, 161, 161, 161, 162, 162, 162, 162, 162, 162,
+ 162, 145, 157, 158, 159, 160, 176, 174, 177, 410,
+ 411, 299, 412, 415, 416, 417, 418, 419, 420, 421,
+ 422, 857, 136, 137, 138, 139, 140, 141, 142, 143,
+ 144, 147, 173, 175, 178, 195, 198, 199, 201, 202,
+ 204, 205, 206, 207, 208, 209, 210, 211, 212, 213,
+ 232, 233, 251, 252, 253, 316, 317, 318, 462, 180,
+ 181, 182, 183, 184, 185, 186, 187, 188, 189, 190,
+ 191, 192, 193, 149, 194, 150, 165, 166, 167, 196,
+ 168, 151, 152, 153, 169, 154, 197, 133, 170, 155,
+ 171, 172, 156, 521, 200, 257, 246, 464, 432, 687,
+ 649, 278, 481, 482, 527, 200, 437, 437, 437, 766,
+ 5, 746, 650, 557, 437, 426, 775, 770, 428, 431,
+ 444, 465, 466, 468, 483, 279, 651, 336, 450, 453,
+ 437, 560, 485, 487, 508, 511, 763, 516, 517, 777,
+ 524, 762, 526, 532, 773, 534, 480, 480, 965, 965,
+ 965, 965, 965, 965, 965, 965, 965, 965, 965, 965,
+ 413, 413, 413, 413, 413, 413, 413, 413, 413, 413,
+ 413, 413, 413, 413, 942, 502, 478, 496, 512, 456,
+ 298, 437, 437, 451, 471, 437, 437, 674, 437, 229,
+ 456, 230, 231, 463, 828, 533, 681, 438, 513, 826,
+ 461, 475, 460, 414, 414, 414, 414, 414, 414, 414,
+ 414, 414, 414, 414, 414, 414, 414, 301, 674, 674,
+ 443, 454, 1033, 1033, 1034, 1034, 425, 531, 425, 708,
+ 750, 800, 457, 372, 1033, 943, 1034, 1026, 300, 1018,
+ 497, 8, 313, 904, 796, 944, 996, 785, 789, 1007,
+ 285, 670, 1036, 329, 307, 310, 804, 668, 544, 332,
+ 935, 940, 366, 807, 678, 477, 377, 754, 844, 0,
+ 667, 667, 675, 675, 675, 677, 0, 666, 323, 498,
+ 328, 312, 312, 258, 259, 283, 459, 261, 322, 284,
+ 326, 486, 280, 281, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 790, 790, 790, 790, 946, 0, 946,
+ 790, 790, 1004, 790, 1004, 0, 0, 0, 0, 836,
+ 0, 1015, 1015, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 744, 744, 744, 720, 744, 0,
+ 739, 745, 721, 780, 780, 1023, 0, 0, 1002, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 806, 0, 806, 0, 0, 0, 0, 1008, 1009
+];
+
+PHP.Parser.prototype.yygcheck = [
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 52, 45, 112, 112, 80, 8, 10,
+ 10, 64, 55, 55, 55, 45, 8, 8, 8, 10,
+ 92, 10, 11, 10, 8, 10, 10, 10, 38, 38,
+ 38, 38, 38, 38, 62, 62, 12, 62, 28, 8,
+ 8, 28, 28, 28, 28, 28, 28, 28, 28, 28,
+ 28, 28, 28, 28, 28, 28, 70, 70, 70, 70,
+ 70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
+ 113, 113, 113, 113, 113, 113, 113, 113, 113, 113,
+ 113, 113, 113, 113, 76, 56, 35, 35, 56, 69,
+ 56, 8, 8, 8, 8, 8, 8, 19, 8, 60,
+ 69, 60, 60, 7, 7, 7, 25, 8, 7, 7,
+ 2, 2, 8, 115, 115, 115, 115, 115, 115, 115,
+ 115, 115, 115, 115, 115, 115, 115, 53, 19, 19,
+ 53, 53, 123, 123, 124, 124, 109, 5, 109, 44,
+ 29, 78, 114, 53, 123, 76, 124, 122, 41, 120,
+ 43, 53, 42, 96, 74, 76, 76, 72, 75, 117,
+ 14, 21, 123, 18, 9, 13, 79, 20, 66, 17,
+ 102, 104, 58, 81, 22, 59, 100, 63, 94, -1,
+ 19, 19, 19, 19, 19, 19, -1, 19, 45, 45,
+ 45, 45, 45, 45, 45, 45, 45, 45, 45, 45,
+ 45, 45, 64, 64, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 52, 52, 52, 52, 52, -1, 52,
+ 52, 52, 80, 52, 80, -1, -1, -1, -1, 92,
+ -1, 80, 80, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, 52, 52, 52, 52, 52, -1,
+ 52, 52, 52, 69, 69, 69, -1, -1, 80, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 80, -1, 80, -1, -1, -1, -1, 80, 80
+];
+
+PHP.Parser.prototype.yygbase = [
+ 0, 0, -317, 0, 0, 237, 0, 210, -136, 4,
+ 118, 130, 144, -10, 16, 0, 0, -59, 10, -47,
+ -9, 7, -77, -20, 0, 209, 0, 0, -388, 234,
+ 0, 0, 0, 0, 0, 165, 0, 0, 103, 0,
+ 0, 225, 44, 45, 235, 84, 0, 0, 0, 0,
+ 0, 0, 109, -115, 0, -113, -179, 0, -78, -81,
+ -347, 0, -122, -80, -249, 0, -19, 0, 0, 169,
+ -48, 0, 26, 0, 22, 24, -99, 0, 230, -13,
+ 114, -79, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 120, 0, -90, 0, 23, 0, 0, 0,
+ -89, 0, -67, 0, -69, 0, 0, 0, 0, 8,
+ 0, 0, -140, -34, 229, 9, 0, 21, 0, 0,
+ 218, 0, 233, -3, -1, 0
+];
+
+PHP.Parser.prototype.yygdefault = [
+ -32768, 380, 565, 2, 566, 637, 645, 504, 400, 433,
+ 748, 688, 689, 303, 342, 401, 302, 330, 324, 676,
+ 669, 671, 679, 134, 333, 682, 1, 684, 439, 716,
+ 291, 692, 292, 507, 694, 446, 696, 697, 427, 304,
+ 305, 447, 311, 479, 707, 203, 308, 709, 290, 710,
+ 719, 335, 293, 510, 489, 469, 501, 402, 363, 476,
+ 228, 455, 473, 753, 277, 761, 549, 769, 772, 403,
+ 404, 470, 784, 368, 794, 788, 960, 319, 799, 805,
+ 991, 808, 811, 349, 331, 327, 815, 816, 4, 820,
+ 522, 523, 835, 239, 843, 856, 347, 923, 925, 441,
+ 374, 936, 360, 334, 939, 995, 354, 405, 364, 952,
+ 260, 282, 245, 406, 423, 249, 407, 365, 998, 314,
+ 1019, 424, 1027, 1035, 275, 474
+];
+
+PHP.Parser.prototype.yylhs = [
+ 0, 1, 3, 3, 2, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 5, 5, 5, 6, 6, 6, 6, 6, 6, 6,
+ 7, 7, 8, 8, 9, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 14, 14, 15, 15,
+ 15, 15, 17, 17, 13, 13, 18, 18, 19, 19,
+ 20, 20, 21, 21, 16, 16, 22, 24, 24, 25,
+ 26, 26, 28, 27, 27, 27, 27, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+ 29, 29, 29, 29, 29, 29, 29, 29, 29, 29,
+ 29, 29, 10, 10, 48, 48, 51, 51, 50, 49,
+ 49, 42, 42, 53, 53, 54, 54, 11, 12, 12,
+ 12, 57, 57, 57, 58, 58, 61, 61, 59, 59,
+ 62, 62, 36, 36, 44, 44, 47, 47, 47, 46,
+ 46, 63, 37, 37, 37, 37, 64, 64, 65, 65,
+ 66, 66, 34, 34, 30, 30, 67, 32, 32, 68,
+ 31, 31, 33, 33, 43, 43, 43, 43, 55, 55,
+ 71, 71, 72, 72, 74, 74, 75, 75, 75, 73,
+ 73, 56, 56, 76, 76, 77, 77, 78, 78, 78,
+ 39, 39, 79, 40, 40, 81, 81, 60, 60, 82,
+ 82, 82, 82, 87, 87, 88, 88, 89, 89, 89,
+ 89, 89, 90, 91, 91, 86, 86, 83, 83, 85,
+ 85, 93, 93, 92, 92, 92, 92, 92, 92, 84,
+ 84, 94, 94, 41, 41, 35, 35, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
+ 101, 95, 95, 100, 100, 103, 103, 104, 105, 105,
+ 105, 109, 109, 52, 52, 52, 96, 96, 107, 107,
+ 97, 97, 99, 99, 99, 102, 102, 113, 113, 70,
+ 115, 115, 115, 98, 98, 98, 98, 98, 98, 98,
+ 98, 98, 98, 98, 98, 98, 98, 98, 98, 38,
+ 38, 111, 111, 111, 106, 106, 106, 116, 116, 116,
+ 116, 116, 116, 45, 45, 45, 80, 80, 80, 118,
+ 110, 110, 110, 110, 110, 110, 108, 108, 108, 117,
+ 117, 117, 117, 69, 119, 119, 120, 120, 120, 120,
+ 120, 114, 121, 121, 122, 122, 122, 122, 122, 112,
+ 112, 112, 112, 124, 123, 123, 123, 123, 123, 123,
+ 123, 125, 125, 125
+];
+
+PHP.Parser.prototype.yylen = [
+ 1, 1, 2, 0, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 3, 1, 1, 1, 1, 1, 3,
+ 5, 4, 3, 4, 2, 3, 1, 1, 7, 8,
+ 6, 7, 3, 1, 3, 1, 3, 1, 1, 3,
+ 1, 2, 1, 2, 3, 1, 3, 3, 1, 3,
+ 2, 0, 1, 1, 1, 1, 1, 3, 7, 10,
+ 5, 7, 9, 5, 3, 3, 3, 3, 3, 3,
+ 1, 2, 5, 7, 9, 5, 6, 3, 3, 2,
+ 2, 1, 1, 1, 0, 2, 1, 3, 8, 0,
+ 4, 1, 3, 0, 1, 0, 1, 10, 7, 6,
+ 5, 1, 2, 2, 0, 2, 0, 2, 0, 2,
+ 1, 3, 1, 4, 1, 4, 1, 1, 4, 1,
+ 3, 3, 3, 4, 4, 5, 0, 2, 4, 3,
+ 1, 1, 1, 4, 0, 2, 5, 0, 2, 6,
+ 0, 2, 0, 3, 1, 2, 1, 1, 1, 0,
+ 1, 3, 4, 6, 1, 2, 1, 1, 1, 0,
+ 1, 0, 2, 2, 3, 1, 3, 1, 2, 2,
+ 3, 1, 1, 3, 1, 1, 3, 2, 0, 3,
+ 4, 9, 3, 1, 3, 0, 2, 4, 5, 4,
+ 4, 4, 3, 1, 1, 1, 3, 1, 1, 0,
+ 1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
+ 3, 1, 3, 3, 1, 0, 1, 1, 3, 3,
+ 3, 4, 1, 2, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 2, 2, 2, 2,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 2, 2, 2,
+ 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 5, 4, 3, 4, 4, 2, 2, 4,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 1, 3, 2, 1, 2, 4, 2, 10, 11,
+ 7, 3, 2, 0, 4, 1, 3, 2, 2, 2,
+ 4, 1, 1, 1, 2, 3, 1, 1, 1, 1,
+ 0, 3, 0, 1, 1, 0, 1, 1, 3, 3,
+ 4, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 3, 2, 3, 3, 0,
+ 1, 1, 3, 1, 1, 3, 1, 1, 4, 4,
+ 4, 1, 4, 1, 1, 3, 1, 4, 2, 3,
+ 1, 4, 4, 3, 3, 3, 1, 3, 1, 1,
+ 3, 1, 1, 4, 3, 1, 1, 1, 3, 3,
+ 0, 1, 3, 1, 3, 1, 4, 2, 0, 2,
+ 2, 1, 2, 1, 1, 4, 3, 3, 3, 6,
+ 3, 1, 1, 1
+];
+
+
+
+exports.PHP = PHP;
+});
+
+ace.define("ace/mode/php_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/php/php"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var PHP = require("./php/php").PHP;
+
+var PhpWorker = exports.PhpWorker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(500);
+};
+
+oop.inherits(PhpWorker, Mirror);
+
+(function() {
+ this.setOptions = function(opts) {
+ this.inlinePhp = opts && opts.inline;
+ };
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+ var errors = [];
+ if (this.inlinePhp)
+ value = "<?" + value + "?>";
+
+ var tokens = PHP.Lexer(value, {short_open_tag: 1});
+ try {
+ new PHP.Parser(tokens);
+ } catch(e) {
+ errors.push({
+ row: e.line - 1,
+ column: null,
+ text: e.message.charAt(0).toUpperCase() + e.message.substring(1),
+ type: "error"
+ });
+ }
+
+ this.sender.emit("annotate", errors);
+ };
+
+}).call(PhpWorker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ 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 ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ 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, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ 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("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ 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("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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 || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+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, "");
+ };
+}
+
+function toInteger(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;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/worker-xml.js b/www/wiki/extensions/CodeEditor/modules/ace/worker-xml.js
new file mode 100644
index 00000000..c53e518b
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/worker-xml.js
@@ -0,0 +1,3887 @@
+"no use strict";
+;(function(window) {
+if (typeof window.window != "undefined" && window.document)
+ return;
+if (window.require && window.define)
+ return;
+
+if (!window.console) {
+ window.console = function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+ };
+ window.console.error =
+ window.console.warn =
+ window.console.log =
+ window.console.trace = window.console;
+}
+window.window = window;
+window.ace = window;
+
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ data: err.data,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
+window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
+ if (moduleName.indexOf("!") !== -1) {
+ var chunks = moduleName.split("!");
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
+ }
+ // normalize relative requires
+ if (moduleName.charAt(0) == ".") {
+ var base = parentId.split("/").slice(0, -1).join("/");
+ moduleName = (base ? base + "/" : "") + moduleName;
+
+ while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
+ var previous = moduleName;
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ }
+ }
+
+ return moduleName;
+};
+
+window.require = function require(parentId, id) {
+ if (!id) {
+ id = parentId;
+ parentId = null;
+ }
+ if (!id.charAt)
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+ id = window.normalizeModule(parentId, id);
+
+ var module = window.require.modules[id];
+ if (module) {
+ if (!module.initialized) {
+ module.initialized = true;
+ module.exports = module.factory().exports;
+ }
+ return module.exports;
+ }
+
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+
+ var path = resolveModuleId(id, window.require.tlns);
+ if (path.slice(-3) != ".js") path += ".js";
+
+ window.require.id = id;
+ window.require.modules[id] = {}; // prevent infinite loop on broken modules
+ importScripts(path);
+ return window.require(parentId, id);
+};
+function resolveModuleId(id, paths) {
+ var testPath = id, tail = "";
+ while (testPath) {
+ var alias = paths[testPath];
+ if (typeof alias == "string") {
+ return alias + tail;
+ } else if (alias) {
+ return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name);
+ } else if (alias === false) {
+ return "";
+ }
+ var i = testPath.lastIndexOf("/");
+ if (i === -1) break;
+ tail = testPath.substr(i) + tail;
+ testPath = testPath.slice(0, i);
+ }
+ return id;
+}
+window.require.modules = {};
+window.require.tlns = {};
+
+window.define = function(id, deps, factory) {
+ if (arguments.length == 2) {
+ factory = deps;
+ if (typeof id != "string") {
+ deps = id;
+ id = window.require.id;
+ }
+ } else if (arguments.length == 1) {
+ factory = id;
+ deps = [];
+ id = window.require.id;
+ }
+
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject "require", "exports" and
+ // "module" as dependencies, to provide CommonJS compatibility.
+ deps = ["require", "exports", "module"];
+
+ var req = function(childId) {
+ return window.require(id, childId);
+ };
+
+ window.require.modules[id] = {
+ exports: {},
+ factory: function() {
+ var module = this;
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch (dep) {
+ // Because "require", "exports" and "module" aren't actual
+ // dependencies, we must handle them seperately.
+ case "require": return req;
+ case "exports": return module.exports;
+ case "module": return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
+ if (returnExports)
+ module.exports = returnExports;
+ return module;
+ }
+ };
+};
+window.define.amd = {};
+require.tlns = {};
+window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
+ for (var i in topLevelNamespaces)
+ require.tlns[i] = topLevelNamespaces[i];
+};
+
+window.initSender = function initSender() {
+
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("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 = window.main = null;
+var sender = window.sender = null;
+
+window.onmessage = function(e) {
+ var msg = e.data;
+ if (msg.event && sender) {
+ sender._signal(msg.event, msg.data);
+ }
+ else if (msg.command) {
+ if (main[msg.command])
+ main[msg.command].apply(main, msg.args);
+ else if (window[msg.command])
+ window[msg.command].apply(window, msg.args);
+ else
+ throw new Error("Unknown command:" + msg.command);
+ }
+ else if (msg.init) {
+ window.initBaseUrls(msg.tlns);
+ require("ace/lib/es5-shim");
+ sender = window.sender = window.initSender();
+ var clazz = require(msg.module)[msg.classname];
+ main = window.main = new clazz(sender);
+ }
+};
+})(this);
+
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.last = function(a) {
+ return a[a.length - 1];
+};
+
+exports.stringReverse = function(string) {
+ return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+ var result = '';
+ while (count > 0) {
+ if (count & 1)
+ result += string;
+
+ if (count >>= 1)
+ string += string;
+ }
+ return result;
+};
+
+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 deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
+ return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
+ }
+ if (Object.prototype.toString.call(obj) !== "[object Object]")
+ return obj;
+
+ copy = {};
+ for (var key in obj)
+ copy[key] = deepCopy(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;
+ };
+
+ deferred.isPending = function() {
+ return timer;
+ };
+
+ return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+ _self.schedule = _self;
+
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
+
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ _self.isPending = function() {
+ return timer;
+ };
+
+ return _self;
+};
+});
+
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+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};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
+
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {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
+ );
+ };
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
+ };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
+
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+
+
+exports.Range = Range;
+});
+
+ace.define("ace/apply_delta",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+function throwDeltaError(delta, errorText){
+ console.log("Invalid Delta:", delta);
+ throw "Invalid Delta: " + errorText;
+}
+
+function positionInDocument(docLines, position) {
+ return position.row >= 0 && position.row < docLines.length &&
+ position.column >= 0 && position.column <= docLines[position.row].length;
+}
+
+function validateDelta(docLines, delta) {
+ if (delta.action != "insert" && delta.action != "remove")
+ throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
+ if (!(delta.lines instanceof Array))
+ throwDeltaError(delta, "delta.lines must be an Array");
+ if (!delta.start || !delta.end)
+ throwDeltaError(delta, "delta.start/end must be an present");
+ var start = delta.start;
+ if (!positionInDocument(docLines, delta.start))
+ throwDeltaError(delta, "delta.start must be contained in document");
+ var end = delta.end;
+ if (delta.action == "remove" && !positionInDocument(docLines, end))
+ throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
+ var numRangeRows = end.row - start.row;
+ var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
+ if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
+ throwDeltaError(delta, "delta.range must match delta lines");
+}
+
+exports.applyDelta = function(docLines, delta, doNotValidate) {
+
+ var row = delta.start.row;
+ var startColumn = delta.start.column;
+ var line = docLines[row] || "";
+ switch (delta.action) {
+ case "insert":
+ var lines = delta.lines;
+ if (lines.length === 1) {
+ docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
+ } else {
+ var args = [row, 1].concat(delta.lines);
+ docLines.splice.apply(docLines, args);
+ docLines[row] = line.substring(0, startColumn) + docLines[row];
+ docLines[row + delta.lines.length - 1] += line.substring(startColumn);
+ }
+ break;
+ case "remove":
+ var endColumn = delta.end.column;
+ var endRow = delta.end.row;
+ if (row === endRow) {
+ docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
+ } else {
+ docLines.splice(
+ row, endRow - row + 1,
+ line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
+ );
+ }
+ break;
+ }
+}
+});
+
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
+
+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 = stopPropagation;
+ if (!e.preventDefault)
+ e.preventDefault = preventDefault;
+
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e, this);
+ if (e.propagationStopped)
+ break;
+ }
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e, this);
+};
+
+
+EventEmitter._signal = function(eventName, e) {
+ var listeners = (this._eventRegistry || {})[eventName];
+ if (!listeners)
+ return;
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++)
+ listeners[i](e, this);
+};
+
+EventEmitter.once = function(eventName, callback) {
+ var _self = this;
+ callback && this.addEventListener(eventName, function newCallback() {
+ _self.removeEventListener(eventName, newCallback);
+ callback.apply(null, arguments);
+ });
+};
+
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ handlers = this._defaultHandlers = {_disabled_: {}};
+
+ if (handlers[eventName]) {
+ var old = handlers[eventName];
+ var disabled = handlers._disabled_[eventName];
+ if (!disabled)
+ handlers._disabled_[eventName] = disabled = [];
+ disabled.push(old);
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+ handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ return;
+ var disabled = handlers._disabled_[eventName];
+
+ if (handlers[eventName] == callback) {
+ var old = handlers[eventName];
+ if (disabled)
+ this.setDefaultHandler(eventName, disabled.pop());
+ } else if (disabled) {
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
+
+ if (listeners.indexOf(callback) == -1)
+ listeners[capturing ? "unshift" : "push"](callback);
+ return callback;
+};
+
+EventEmitter.off =
+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/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;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+ this.getDocument = function() {
+ return this.document;
+ };
+ this.$insertRight = false;
+ this.onChange = function(delta) {
+ if (delta.start.row == delta.end.row && delta.start.row != this.row)
+ return;
+
+ if (delta.start.row > this.row)
+ return;
+
+ var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
+ this.setPosition(point.row, point.column, true);
+ };
+
+ function $pointsInOrder(point1, point2, equalPointsInOrder) {
+ var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
+ return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
+ }
+
+ function $getTransformedPoint(delta, point, moveIfEqual) {
+ var deltaIsInsert = delta.action == "insert";
+ var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
+ var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
+ var deltaStart = delta.start;
+ var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
+ if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
+ return {
+ row: point.row,
+ column: point.column
+ };
+ }
+ if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
+ return {
+ row: point.row + deltaRowShift,
+ column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
+ };
+ }
+
+ return {
+ row: deltaStart.row,
+ column: deltaStart.column
+ };
+ }
+ 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._signal("change", {
+ old: old,
+ value: pos
+ });
+ };
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
+ };
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("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/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var applyDelta = require("./apply_delta").applyDelta;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(textOrLines) {
+ this.$lines = [""];
+ if (textOrLines.length === 0) {
+ this.$lines = [""];
+ } else if (Array.isArray(textOrLines)) {
+ this.insertMergedLines({row: 0, column: 0}, textOrLines);
+ } else {
+ this.insert({row: 0, column:0}, textOrLines);
+ }
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setValue = function(text) {
+ var len = this.getLength() - 1;
+ this.remove(new Range(0, 0, len, this.getLine(len).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);
+ this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
+ };
+ this.getNewLineCharacter = function() {
+ switch (this.$newLineMode) {
+ case "windows":
+ return "\r\n";
+ case "unix":
+ return "\n";
+ default:
+ return this.$autoNewLine || "\n";
+ }
+ };
+
+ this.$autoNewLine = "";
+ this.$newLineMode = "auto";
+ this.setNewLineMode = function(newLineMode) {
+ if (this.$newLineMode === newLineMode)
+ return;
+
+ this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
+ };
+ 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) {
+ return this.getLinesForRange(range).join(this.getNewLineCharacter());
+ };
+ this.getLinesForRange = function(range) {
+ var lines;
+ if (range.start.row === range.end.row) {
+ lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
+ } else {
+ lines = this.getLines(range.start.row, range.end.row);
+ lines[0] = (lines[0] || "").substring(range.start.column);
+ var l = lines.length - 1;
+ if (range.end.row - range.start.row == l)
+ lines[l] = lines[l].substring(0, range.end.column);
+ }
+ return lines;
+ };
+ this.insertLines = function(row, lines) {
+ console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
+ return this.insertFullLines(row, lines);
+ };
+ this.removeLines = function(firstRow, lastRow) {
+ console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
+ return this.removeFullLines(firstRow, lastRow);
+ };
+ this.insertNewLine = function(position) {
+ console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
+ return this.insertMergedLines(position, ["", ""]);
+ };
+ this.insert = function(position, text) {
+ if (this.getLength() <= 1)
+ this.$detectNewLine(text);
+
+ return this.insertMergedLines(position, this.$split(text));
+ };
+ this.insertInLine = function(position, text) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = this.pos(position.row, position.column + text.length);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: [text]
+ }, true);
+
+ return this.clonePos(end);
+ };
+
+ this.clippedPos = function(row, column) {
+ var length = this.getLength();
+ if (row === undefined) {
+ row = length;
+ } else if (row < 0) {
+ row = 0;
+ } else if (row >= length) {
+ row = length - 1;
+ column = undefined;
+ }
+ var line = this.getLine(row);
+ if (column == undefined)
+ column = line.length;
+ column = Math.min(Math.max(column, 0), line.length);
+ return {row: row, column: column};
+ };
+
+ this.clonePos = function(pos) {
+ return {row: pos.row, column: pos.column};
+ };
+
+ this.pos = function(row, column) {
+ return {row: row, column: column};
+ };
+
+ 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;
+ } else {
+ position.row = Math.max(0, position.row);
+ position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
+ }
+ return position;
+ };
+ this.insertFullLines = function(row, lines) {
+ row = Math.min(Math.max(row, 0), this.getLength());
+ var column = 0;
+ if (row < this.getLength()) {
+ lines = lines.concat([""]);
+ column = 0;
+ } else {
+ lines = [""].concat(lines);
+ row--;
+ column = this.$lines[row].length;
+ }
+ this.insertMergedLines({row: row, column: column}, lines);
+ };
+ this.insertMergedLines = function(position, lines) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = {
+ row: start.row + lines.length - 1,
+ column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
+ };
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: lines
+ });
+
+ return this.clonePos(end);
+ };
+ this.remove = function(range) {
+ var start = this.clippedPos(range.start.row, range.start.column);
+ var end = this.clippedPos(range.end.row, range.end.column);
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ });
+ return this.clonePos(start);
+ };
+ this.removeInLine = function(row, startColumn, endColumn) {
+ var start = this.clippedPos(row, startColumn);
+ var end = this.clippedPos(row, endColumn);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ }, true);
+
+ return this.clonePos(start);
+ };
+ this.removeFullLines = function(firstRow, lastRow) {
+ firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
+ lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
+ var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
+ var deleteLastNewLine = lastRow < this.getLength() - 1;
+ var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );
+ var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );
+ var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );
+ var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length );
+ var range = new Range(startRow, startCol, endRow, endCol);
+ var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
+
+ this.applyDelta({
+ start: range.start,
+ end: range.end,
+ action: "remove",
+ lines: this.getLinesForRange(range)
+ });
+ return deletedLines;
+ };
+ this.removeNewLine = function(row) {
+ if (row < this.getLength() - 1 && row >= 0) {
+ this.applyDelta({
+ start: this.pos(row, this.getLine(row).length),
+ end: this.pos(row + 1, 0),
+ action: "remove",
+ lines: ["", ""]
+ });
+ }
+ };
+ this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
+ if (text.length === 0 && range.isEmpty())
+ return range.start;
+ if (text == this.getTextRange(range))
+ return range.end;
+
+ this.remove(range);
+ var end;
+ if (text) {
+ end = this.insert(range.start, text);
+ }
+ else {
+ end = range.start;
+ }
+
+ return end;
+ };
+ this.applyDeltas = function(deltas) {
+ for (var i=0; i<deltas.length; i++) {
+ this.applyDelta(deltas[i]);
+ }
+ };
+ this.revertDeltas = function(deltas) {
+ for (var i=deltas.length-1; i>=0; i--) {
+ this.revertDelta(deltas[i]);
+ }
+ };
+ this.applyDelta = function(delta, doNotValidate) {
+ var isInsert = delta.action == "insert";
+ if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
+ : !Range.comparePoints(delta.start, delta.end)) {
+ return;
+ }
+
+ if (isInsert && delta.lines.length > 20000)
+ this.$splitAndapplyLargeDelta(delta, 20000);
+ applyDelta(this.$lines, delta, doNotValidate);
+ this._signal("change", delta);
+ };
+
+ this.$splitAndapplyLargeDelta = function(delta, MAX) {
+ var lines = delta.lines;
+ var l = lines.length;
+ var row = delta.start.row;
+ var column = delta.start.column;
+ var from = 0, to = 0;
+ do {
+ from = to;
+ to += MAX - 1;
+ var chunk = lines.slice(from, to);
+ if (to > l) {
+ delta.lines = chunk;
+ delta.start.row = row + from;
+ delta.start.column = column;
+ break;
+ }
+ chunk.push("");
+ this.applyDelta({
+ start: this.pos(row + from, column),
+ end: this.pos(row + to, column = 0),
+ action: delta.action,
+ lines: chunk
+ }, true);
+ } while(true);
+ };
+ this.revertDelta = function(delta) {
+ this.applyDelta({
+ start: this.clonePos(delta.start),
+ end: this.clonePos(delta.end),
+ action: (delta.action == "insert" ? "remove" : "insert"),
+ lines: delta.lines.slice()
+ });
+ };
+ 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 + newlineLength;
+
+ return index + pos.column;
+ };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+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.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ var data = e.data;
+ if (data[0].start) {
+ doc.applyDeltas(data);
+ } else {
+ for (var i = 0; i < data.length; i += 2) {
+ if (Array.isArray(data[i+1])) {
+ var d = {action: "insert", start: data[i], lines: data[i+1]};
+ } else {
+ var d = {action: "remove", start: data[i], end: data[i+1]};
+ }
+ doc.applyDelta(d, true);
+ }
+ }
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
+};
+
+(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() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+ace.define("ace/mode/xml/sax",["require","exports","module"], function(require, exports, module) {
+var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]///\u10000-\uEFFFF
+var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\u00B7\u0300-\u036F\\ux203F-\u2040]");
+var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$');
+var S_TAG = 0;//tag name offerring
+var S_ATTR = 1;//attr name offerring
+var S_ATTR_S=2;//attr name end and space offer
+var S_EQ = 3;//=space?
+var S_V = 4;//attr value(no quot value only)
+var S_E = 5;//attr value end and no space(quot end)
+var S_S = 6;//(attr value end || tag end ) && (space offer)
+var S_C = 7;//closed el<el />
+
+function XMLReader(){
+
+}
+
+XMLReader.prototype = {
+ parse:function(source,defaultNSMap,entityMap){
+ var domBuilder = this.domBuilder;
+ domBuilder.startDocument();
+ _copy(defaultNSMap ,defaultNSMap = {})
+ parse(source,defaultNSMap,entityMap,
+ domBuilder,this.errorHandler);
+ domBuilder.endDocument();
+ }
+}
+function parse(source,defaultNSMapCopy,entityMap,domBuilder,errorHandler){
+ function fixedFromCharCode(code) {
+ if (code > 0xffff) {
+ code -= 0x10000;
+ var surrogate1 = 0xd800 + (code >> 10)
+ , surrogate2 = 0xdc00 + (code & 0x3ff);
+
+ return String.fromCharCode(surrogate1, surrogate2);
+ } else {
+ return String.fromCharCode(code);
+ }
+ }
+ function entityReplacer(a){
+ var k = a.slice(1,-1);
+ if(k in entityMap){
+ return entityMap[k];
+ }else if(k.charAt(0) === '#'){
+ return fixedFromCharCode(parseInt(k.substr(1).replace('x','0x')))
+ }else{
+ errorHandler.error('entity not found:'+a);
+ return a;
+ }
+ }
+ function appendText(end){//has some bugs
+ var xt = source.substring(start,end).replace(/&#?\w+;/g,entityReplacer);
+ locator&&position(start);
+ domBuilder.characters(xt,0,end-start);
+ start = end
+ }
+ function position(start,m){
+ while(start>=endPos && (m = linePattern.exec(source))){
+ startPos = m.index;
+ endPos = startPos + m[0].length;
+ locator.lineNumber++;
+ }
+ locator.columnNumber = start-startPos+1;
+ }
+ var startPos = 0;
+ var endPos = 0;
+ var linePattern = /.+(?:\r\n?|\n)|.*$/g
+ var locator = domBuilder.locator;
+
+ var parseStack = [{currentNSMap:defaultNSMapCopy}]
+ var closeMap = {};
+ var start = 0;
+ while(true){
+ var i = source.indexOf('<',start);
+ if(i<0){
+ if(!source.substr(start).match(/^\s*$/)){
+ var doc = domBuilder.document;
+ var text = doc.createTextNode(source.substr(start));
+ doc.appendChild(text);
+ domBuilder.currentElement = text;
+ }
+ return;
+ }
+ if(i>start){
+ appendText(i);
+ }
+ switch(source.charAt(i+1)){
+ case '/':
+ var end = source.indexOf('>',i+3);
+ var tagName = source.substring(i+2,end);
+ var config;
+ if (parseStack.length > 1) {
+ config = parseStack.pop();
+ } else {
+ errorHandler.fatalError("end tag name not found for: "+tagName);
+ break;
+ }
+ var localNSMap = config.localNSMap;
+
+ if(config.tagName != tagName){
+ errorHandler.fatalError("end tag name: " + tagName + " does not match the current start tagName: "+config.tagName );
+ }
+ domBuilder.endElement(config.uri,config.localName,tagName);
+ if(localNSMap){
+ for(var prefix in localNSMap){
+ domBuilder.endPrefixMapping(prefix) ;
+ }
+ }
+ end++;
+ break;
+ case '?':// <?...?>
+ locator&&position(i);
+ end = parseInstruction(source,i,domBuilder);
+ break;
+ case '!':// <!doctype,<![CDATA,<!--
+ locator&&position(i);
+ end = parseDCC(source,i,domBuilder,errorHandler);
+ break;
+ default:
+ try{
+ locator&&position(i);
+
+ var el = new ElementAttributes();
+ var end = parseElementStartPart(source,i,el,entityReplacer,errorHandler);
+ var len = el.length;
+ if(len && locator){
+ var backup = copyLocator(locator,{});
+ for(var i = 0;i<len;i++){
+ var a = el[i];
+ position(a.offset);
+ a.offset = copyLocator(locator,{});
+ }
+ copyLocator(backup,locator);
+ }
+ if(!el.closed && fixSelfClosed(source,end,el.tagName,closeMap)){
+ el.closed = true;
+ if(!entityMap.nbsp){
+ errorHandler.warning('unclosed xml attribute');
+ }
+ }
+ appendElement(el,domBuilder,parseStack);
+
+
+ if(el.uri === 'http://www.w3.org/1999/xhtml' && !el.closed){
+ end = parseHtmlSpecialContent(source,end,el.tagName,entityReplacer,domBuilder)
+ }else{
+ end++;
+ }
+ }catch(e){
+ errorHandler.error('element parse error: '+e);
+ end = -1;
+ }
+
+ }
+ if(end<0){
+ appendText(i+1);
+ }else{
+ start = end;
+ }
+ }
+}
+function copyLocator(f,t){
+ t.lineNumber = f.lineNumber;
+ t.columnNumber = f.columnNumber;
+ return t;
+
+}
+function parseElementStartPart(source,start,el,entityReplacer,errorHandler){
+ var attrName;
+ var value;
+ var p = ++start;
+ var s = S_TAG;//status
+ while(true){
+ var c = source.charAt(p);
+ switch(c){
+ case '=':
+ if(s === S_ATTR){//attrName
+ attrName = source.slice(start,p);
+ s = S_EQ;
+ }else if(s === S_ATTR_S){
+ s = S_EQ;
+ }else{
+ throw new Error('attribute equal must after attrName');
+ }
+ break;
+ case '\'':
+ case '"':
+ if(s === S_EQ){//equal
+ start = p+1;
+ p = source.indexOf(c,start)
+ if(p>0){
+ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ el.add(attrName,value,start-1);
+ s = S_E;
+ }else{
+ throw new Error('attribute value no end \''+c+'\' match');
+ }
+ }else if(s == S_V){
+ value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ el.add(attrName,value,start);
+ errorHandler.warning('attribute "'+attrName+'" missed start quot('+c+')!!');
+ start = p+1;
+ s = S_E
+ }else{
+ throw new Error('attribute value must after "="');
+ }
+ break;
+ case '/':
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));
+ case S_E:
+ case S_S:
+ case S_C:
+ s = S_C;
+ el.closed = true;
+ case S_V:
+ case S_ATTR:
+ case S_ATTR_S:
+ break;
+ default:
+ throw new Error("attribute invalid close char('/')")
+ }
+ break;
+ case ''://end document
+ errorHandler.error('unexpected end of input');
+ case '>':
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));
+ case S_E:
+ case S_S:
+ case S_C:
+ break;//normal
+ case S_V://Compatible state
+ case S_ATTR:
+ value = source.slice(start,p);
+ if(value.slice(-1) === '/'){
+ el.closed = true;
+ value = value.slice(0,-1)
+ }
+ case S_ATTR_S:
+ if(s === S_ATTR_S){
+ value = attrName;
+ }
+ if(s == S_V){
+ errorHandler.warning('attribute "'+value+'" missed quot(")!!');
+ el.add(attrName,value.replace(/&#?\w+;/g,entityReplacer),start)
+ }else{
+ errorHandler.warning('attribute "'+value+'" missed value!! "'+value+'" instead!!')
+ el.add(value,value,start)
+ }
+ break;
+ case S_EQ:
+ throw new Error('attribute value missed!!');
+ }
+ return p;
+ case '\u0080':
+ c = ' ';
+ default:
+ if(c<= ' '){//space
+ switch(s){
+ case S_TAG:
+ el.setTagName(source.slice(start,p));//tagName
+ s = S_S;
+ break;
+ case S_ATTR:
+ attrName = source.slice(start,p)
+ s = S_ATTR_S;
+ break;
+ case S_V:
+ var value = source.slice(start,p).replace(/&#?\w+;/g,entityReplacer);
+ errorHandler.warning('attribute "'+value+'" missed quot(")!!');
+ el.add(attrName,value,start)
+ case S_E:
+ s = S_S;
+ break;
+ }
+ }else{//not space
+ switch(s){
+ case S_ATTR_S:
+ errorHandler.warning('attribute "'+attrName+'" missed value!! "'+attrName+'" instead!!')
+ el.add(attrName,attrName,start);
+ start = p;
+ s = S_ATTR;
+ break;
+ case S_E:
+ errorHandler.warning('attribute space is required"'+attrName+'"!!')
+ case S_S:
+ s = S_ATTR;
+ start = p;
+ break;
+ case S_EQ:
+ s = S_V;
+ start = p;
+ break;
+ case S_C:
+ throw new Error("elements closed character '/' and '>' must be connected to");
+ }
+ }
+ }
+ p++;
+ }
+}
+function appendElement(el,domBuilder,parseStack){
+ var tagName = el.tagName;
+ var localNSMap = null;
+ var currentNSMap = parseStack[parseStack.length-1].currentNSMap;
+ var i = el.length;
+ while(i--){
+ var a = el[i];
+ var qName = a.qName;
+ var value = a.value;
+ var nsp = qName.indexOf(':');
+ if(nsp>0){
+ var prefix = a.prefix = qName.slice(0,nsp);
+ var localName = qName.slice(nsp+1);
+ var nsPrefix = prefix === 'xmlns' && localName
+ }else{
+ localName = qName;
+ prefix = null
+ nsPrefix = qName === 'xmlns' && ''
+ }
+ a.localName = localName ;
+ if(nsPrefix !== false){//hack!!
+ if(localNSMap == null){
+ localNSMap = {}
+ _copy(currentNSMap,currentNSMap={})
+ }
+ currentNSMap[nsPrefix] = localNSMap[nsPrefix] = value;
+ a.uri = 'http://www.w3.org/2000/xmlns/'
+ domBuilder.startPrefixMapping(nsPrefix, value)
+ }
+ }
+ var i = el.length;
+ while(i--){
+ a = el[i];
+ var prefix = a.prefix;
+ if(prefix){//no prefix attribute has no namespace
+ if(prefix === 'xml'){
+ a.uri = 'http://www.w3.org/XML/1998/namespace';
+ }if(prefix !== 'xmlns'){
+ a.uri = currentNSMap[prefix]
+ }
+ }
+ }
+ var nsp = tagName.indexOf(':');
+ if(nsp>0){
+ prefix = el.prefix = tagName.slice(0,nsp);
+ localName = el.localName = tagName.slice(nsp+1);
+ }else{
+ prefix = null;//important!!
+ localName = el.localName = tagName;
+ }
+ var ns = el.uri = currentNSMap[prefix || ''];
+ domBuilder.startElement(ns,localName,tagName,el);
+ if(el.closed){
+ domBuilder.endElement(ns,localName,tagName);
+ if(localNSMap){
+ for(prefix in localNSMap){
+ domBuilder.endPrefixMapping(prefix)
+ }
+ }
+ }else{
+ el.currentNSMap = currentNSMap;
+ el.localNSMap = localNSMap;
+ parseStack.push(el);
+ }
+}
+function parseHtmlSpecialContent(source,elStartEnd,tagName,entityReplacer,domBuilder){
+ if(/^(?:script|textarea)$/i.test(tagName)){
+ var elEndStart = source.indexOf('</'+tagName+'>',elStartEnd);
+ var text = source.substring(elStartEnd+1,elEndStart);
+ if(/[&<]/.test(text)){
+ if(/^script$/i.test(tagName)){
+ domBuilder.characters(text,0,text.length);
+ return elEndStart;
+ }//}else{//text area
+ text = text.replace(/&#?\w+;/g,entityReplacer);
+ domBuilder.characters(text,0,text.length);
+ return elEndStart;
+
+ }
+ }
+ return elStartEnd+1;
+}
+function fixSelfClosed(source,elStartEnd,tagName,closeMap){
+ var pos = closeMap[tagName];
+ if(pos == null){
+ pos = closeMap[tagName] = source.lastIndexOf('</'+tagName+'>')
+ }
+ return pos<elStartEnd;
+}
+function _copy(source,target){
+ for(var n in source){target[n] = source[n]}
+}
+function parseDCC(source,start,domBuilder,errorHandler){//sure start with '<!'
+ var next= source.charAt(start+2)
+ switch(next){
+ case '-':
+ if(source.charAt(start + 3) === '-'){
+ var end = source.indexOf('-->',start+4);
+ if(end>start){
+ domBuilder.comment(source,start+4,end-start-4);
+ return end+3;
+ }else{
+ errorHandler.error("Unclosed comment");
+ return -1;
+ }
+ }else{
+ return -1;
+ }
+ default:
+ if(source.substr(start+3,6) == 'CDATA['){
+ var end = source.indexOf(']]>',start+9);
+ domBuilder.startCDATA();
+ domBuilder.characters(source,start+9,end-start-9);
+ domBuilder.endCDATA()
+ return end+3;
+ }
+ var matchs = split(source,start);
+ var len = matchs.length;
+ if(len>1 && /!doctype/i.test(matchs[0][0])){
+ var name = matchs[1][0];
+ var pubid = len>3 && /^public$/i.test(matchs[2][0]) && matchs[3][0]
+ var sysid = len>4 && matchs[4][0];
+ var lastMatch = matchs[len-1]
+ domBuilder.startDTD(name,pubid && pubid.replace(/^(['"])(.*?)\1$/,'$2'),
+ sysid && sysid.replace(/^(['"])(.*?)\1$/,'$2'));
+ domBuilder.endDTD();
+
+ return lastMatch.index+lastMatch[0].length
+ }
+ }
+ return -1;
+}
+
+
+
+function parseInstruction(source,start,domBuilder){
+ var end = source.indexOf('?>',start);
+ if(end){
+ var match = source.substring(start,end).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);
+ if(match){
+ var len = match[0].length;
+ domBuilder.processingInstruction(match[1], match[2]) ;
+ return end+2;
+ }else{//error
+ return -1;
+ }
+ }
+ return -1;
+}
+function ElementAttributes(source){
+
+}
+ElementAttributes.prototype = {
+ setTagName:function(tagName){
+ if(!tagNamePattern.test(tagName)){
+ throw new Error('invalid tagName:'+tagName)
+ }
+ this.tagName = tagName
+ },
+ add:function(qName,value,offset){
+ if(!tagNamePattern.test(qName)){
+ throw new Error('invalid attribute:'+qName)
+ }
+ this[this.length++] = {qName:qName,value:value,offset:offset}
+ },
+ length:0,
+ getLocalName:function(i){return this[i].localName},
+ getOffset:function(i){return this[i].offset},
+ getQName:function(i){return this[i].qName},
+ getURI:function(i){return this[i].uri},
+ getValue:function(i){return this[i].value}
+}
+
+
+
+
+function _set_proto_(thiz,parent){
+ thiz.__proto__ = parent;
+ return thiz;
+}
+if(!(_set_proto_({},_set_proto_.prototype) instanceof _set_proto_)){
+ _set_proto_ = function(thiz,parent){
+ function p(){};
+ p.prototype = parent;
+ p = new p();
+ for(parent in thiz){
+ p[parent] = thiz[parent];
+ }
+ return p;
+ }
+}
+
+function split(source,start){
+ var match;
+ var buf = [];
+ var reg = /'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;
+ reg.lastIndex = start;
+ reg.exec(source);//skip <
+ while(match = reg.exec(source)){
+ buf.push(match);
+ if(match[1])return buf;
+ }
+}
+
+return XMLReader;
+});
+
+ace.define("ace/mode/xml/dom",["require","exports","module"], function(require, exports, module) {
+
+function copy(src,dest){
+ for(var p in src){
+ dest[p] = src[p];
+ }
+}
+function _extends(Class,Super){
+ var pt = Class.prototype;
+ if(Object.create){
+ var ppt = Object.create(Super.prototype)
+ pt.__proto__ = ppt;
+ }
+ if(!(pt instanceof Super)){
+ function t(){};
+ t.prototype = Super.prototype;
+ t = new t();
+ copy(pt,t);
+ Class.prototype = pt = t;
+ }
+ if(pt.constructor != Class){
+ if(typeof Class != 'function'){
+ console.error("unknow Class:"+Class)
+ }
+ pt.constructor = Class
+ }
+}
+var htmlns = 'http://www.w3.org/1999/xhtml' ;
+var NodeType = {}
+var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1;
+var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2;
+var TEXT_NODE = NodeType.TEXT_NODE = 3;
+var CDATA_SECTION_NODE = NodeType.CDATA_SECTION_NODE = 4;
+var ENTITY_REFERENCE_NODE = NodeType.ENTITY_REFERENCE_NODE = 5;
+var ENTITY_NODE = NodeType.ENTITY_NODE = 6;
+var PROCESSING_INSTRUCTION_NODE = NodeType.PROCESSING_INSTRUCTION_NODE = 7;
+var COMMENT_NODE = NodeType.COMMENT_NODE = 8;
+var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9;
+var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10;
+var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11;
+var NOTATION_NODE = NodeType.NOTATION_NODE = 12;
+var ExceptionCode = {}
+var ExceptionMessage = {};
+var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1);
+var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2);
+var HIERARCHY_REQUEST_ERR = ExceptionCode.HIERARCHY_REQUEST_ERR = ((ExceptionMessage[3]="Hierarchy request error"),3);
+var WRONG_DOCUMENT_ERR = ExceptionCode.WRONG_DOCUMENT_ERR = ((ExceptionMessage[4]="Wrong document"),4);
+var INVALID_CHARACTER_ERR = ExceptionCode.INVALID_CHARACTER_ERR = ((ExceptionMessage[5]="Invalid character"),5);
+var NO_DATA_ALLOWED_ERR = ExceptionCode.NO_DATA_ALLOWED_ERR = ((ExceptionMessage[6]="No data allowed"),6);
+var NO_MODIFICATION_ALLOWED_ERR = ExceptionCode.NO_MODIFICATION_ALLOWED_ERR = ((ExceptionMessage[7]="No modification allowed"),7);
+var NOT_FOUND_ERR = ExceptionCode.NOT_FOUND_ERR = ((ExceptionMessage[8]="Not found"),8);
+var NOT_SUPPORTED_ERR = ExceptionCode.NOT_SUPPORTED_ERR = ((ExceptionMessage[9]="Not supported"),9);
+var INUSE_ATTRIBUTE_ERR = ExceptionCode.INUSE_ATTRIBUTE_ERR = ((ExceptionMessage[10]="Attribute in use"),10);
+var INVALID_STATE_ERR = ExceptionCode.INVALID_STATE_ERR = ((ExceptionMessage[11]="Invalid state"),11);
+var SYNTAX_ERR = ExceptionCode.SYNTAX_ERR = ((ExceptionMessage[12]="Syntax error"),12);
+var INVALID_MODIFICATION_ERR = ExceptionCode.INVALID_MODIFICATION_ERR = ((ExceptionMessage[13]="Invalid modification"),13);
+var NAMESPACE_ERR = ExceptionCode.NAMESPACE_ERR = ((ExceptionMessage[14]="Invalid namespace"),14);
+var INVALID_ACCESS_ERR = ExceptionCode.INVALID_ACCESS_ERR = ((ExceptionMessage[15]="Invalid access"),15);
+
+
+function DOMException(code, message) {
+ if(message instanceof Error){
+ var error = message;
+ }else{
+ error = this;
+ Error.call(this, ExceptionMessage[code]);
+ this.message = ExceptionMessage[code];
+ if(Error.captureStackTrace) Error.captureStackTrace(this, DOMException);
+ }
+ error.code = code;
+ if(message) this.message = this.message + ": " + message;
+ return error;
+};
+DOMException.prototype = Error.prototype;
+copy(ExceptionCode,DOMException)
+function NodeList() {
+};
+NodeList.prototype = {
+ length:0,
+ item: function(index) {
+ return this[index] || null;
+ }
+};
+function LiveNodeList(node,refresh){
+ this._node = node;
+ this._refresh = refresh
+ _updateLiveList(this);
+}
+function _updateLiveList(list){
+ var inc = list._node._inc || list._node.ownerDocument._inc;
+ if(list._inc != inc){
+ var ls = list._refresh(list._node);
+ __set__(list,'length',ls.length);
+ copy(ls,list);
+ list._inc = inc;
+ }
+}
+LiveNodeList.prototype.item = function(i){
+ _updateLiveList(this);
+ return this[i];
+}
+
+_extends(LiveNodeList,NodeList);
+function NamedNodeMap() {
+};
+
+function _findNodeIndex(list,node){
+ var i = list.length;
+ while(i--){
+ if(list[i] === node){return i}
+ }
+}
+
+function _addNamedNode(el,list,newAttr,oldAttr){
+ if(oldAttr){
+ list[_findNodeIndex(list,oldAttr)] = newAttr;
+ }else{
+ list[list.length++] = newAttr;
+ }
+ if(el){
+ newAttr.ownerElement = el;
+ var doc = el.ownerDocument;
+ if(doc){
+ oldAttr && _onRemoveAttribute(doc,el,oldAttr);
+ _onAddAttribute(doc,el,newAttr);
+ }
+ }
+}
+function _removeNamedNode(el,list,attr){
+ var i = _findNodeIndex(list,attr);
+ if(i>=0){
+ var lastIndex = list.length-1
+ while(i<lastIndex){
+ list[i] = list[++i]
+ }
+ list.length = lastIndex;
+ if(el){
+ var doc = el.ownerDocument;
+ if(doc){
+ _onRemoveAttribute(doc,el,attr);
+ attr.ownerElement = null;
+ }
+ }
+ }else{
+ throw DOMException(NOT_FOUND_ERR,new Error())
+ }
+}
+NamedNodeMap.prototype = {
+ length:0,
+ item:NodeList.prototype.item,
+ getNamedItem: function(key) {
+ var i = this.length;
+ while(i--){
+ var attr = this[i];
+ if(attr.nodeName == key){
+ return attr;
+ }
+ }
+ },
+ setNamedItem: function(attr) {
+ var el = attr.ownerElement;
+ if(el && el!=this._ownerElement){
+ throw new DOMException(INUSE_ATTRIBUTE_ERR);
+ }
+ var oldAttr = this.getNamedItem(attr.nodeName);
+ _addNamedNode(this._ownerElement,this,attr,oldAttr);
+ return oldAttr;
+ },
+ setNamedItemNS: function(attr) {// raises: WRONG_DOCUMENT_ERR,NO_MODIFICATION_ALLOWED_ERR,INUSE_ATTRIBUTE_ERR
+ var el = attr.ownerElement, oldAttr;
+ if(el && el!=this._ownerElement){
+ throw new DOMException(INUSE_ATTRIBUTE_ERR);
+ }
+ oldAttr = this.getNamedItemNS(attr.namespaceURI,attr.localName);
+ _addNamedNode(this._ownerElement,this,attr,oldAttr);
+ return oldAttr;
+ },
+ removeNamedItem: function(key) {
+ var attr = this.getNamedItem(key);
+ _removeNamedNode(this._ownerElement,this,attr);
+ return attr;
+
+
+ },// raises: NOT_FOUND_ERR,NO_MODIFICATION_ALLOWED_ERR
+ removeNamedItemNS:function(namespaceURI,localName){
+ var attr = this.getNamedItemNS(namespaceURI,localName);
+ _removeNamedNode(this._ownerElement,this,attr);
+ return attr;
+ },
+ getNamedItemNS: function(namespaceURI, localName) {
+ var i = this.length;
+ while(i--){
+ var node = this[i];
+ if(node.localName == localName && node.namespaceURI == namespaceURI){
+ return node;
+ }
+ }
+ return null;
+ }
+};
+function DOMImplementation(/* Object */ features) {
+ this._features = {};
+ if (features) {
+ for (var feature in features) {
+ this._features = features[feature];
+ }
+ }
+};
+
+DOMImplementation.prototype = {
+ hasFeature: function(/* string */ feature, /* string */ version) {
+ var versions = this._features[feature.toLowerCase()];
+ if (versions && (!version || version in versions)) {
+ return true;
+ } else {
+ return false;
+ }
+ },
+ createDocument:function(namespaceURI, qualifiedName, doctype){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR,WRONG_DOCUMENT_ERR
+ var doc = new Document();
+ doc.implementation = this;
+ doc.childNodes = new NodeList();
+ doc.doctype = doctype;
+ if(doctype){
+ doc.appendChild(doctype);
+ }
+ if(qualifiedName){
+ var root = doc.createElementNS(namespaceURI,qualifiedName);
+ doc.appendChild(root);
+ }
+ return doc;
+ },
+ createDocumentType:function(qualifiedName, publicId, systemId){// raises:INVALID_CHARACTER_ERR,NAMESPACE_ERR
+ var node = new DocumentType();
+ node.name = qualifiedName;
+ node.nodeName = qualifiedName;
+ node.publicId = publicId;
+ node.systemId = systemId;
+ return node;
+ }
+};
+
+function Node() {
+};
+
+Node.prototype = {
+ firstChild : null,
+ lastChild : null,
+ previousSibling : null,
+ nextSibling : null,
+ attributes : null,
+ parentNode : null,
+ childNodes : null,
+ ownerDocument : null,
+ nodeValue : null,
+ namespaceURI : null,
+ prefix : null,
+ localName : null,
+ insertBefore:function(newChild, refChild){//raises
+ return _insertBefore(this,newChild,refChild);
+ },
+ replaceChild:function(newChild, oldChild){//raises
+ this.insertBefore(newChild,oldChild);
+ if(oldChild){
+ this.removeChild(oldChild);
+ }
+ },
+ removeChild:function(oldChild){
+ return _removeChild(this,oldChild);
+ },
+ appendChild:function(newChild){
+ return this.insertBefore(newChild,null);
+ },
+ hasChildNodes:function(){
+ return this.firstChild != null;
+ },
+ cloneNode:function(deep){
+ return cloneNode(this.ownerDocument||this,this,deep);
+ },
+ normalize:function(){
+ var child = this.firstChild;
+ while(child){
+ var next = child.nextSibling;
+ if(next && next.nodeType == TEXT_NODE && child.nodeType == TEXT_NODE){
+ this.removeChild(next);
+ child.appendData(next.data);
+ }else{
+ child.normalize();
+ child = next;
+ }
+ }
+ },
+ isSupported:function(feature, version){
+ return this.ownerDocument.implementation.hasFeature(feature,version);
+ },
+ hasAttributes:function(){
+ return this.attributes.length>0;
+ },
+ lookupPrefix:function(namespaceURI){
+ var el = this;
+ while(el){
+ var map = el._nsMap;
+ if(map){
+ for(var n in map){
+ if(map[n] == namespaceURI){
+ return n;
+ }
+ }
+ }
+ el = el.nodeType == 2?el.ownerDocument : el.parentNode;
+ }
+ return null;
+ },
+ lookupNamespaceURI:function(prefix){
+ var el = this;
+ while(el){
+ var map = el._nsMap;
+ if(map){
+ if(prefix in map){
+ return map[prefix] ;
+ }
+ }
+ el = el.nodeType == 2?el.ownerDocument : el.parentNode;
+ }
+ return null;
+ },
+ isDefaultNamespace:function(namespaceURI){
+ var prefix = this.lookupPrefix(namespaceURI);
+ return prefix == null;
+ }
+};
+
+
+function _xmlEncoder(c){
+ return c == '<' && '&lt;' ||
+ c == '>' && '&gt;' ||
+ c == '&' && '&amp;' ||
+ c == '"' && '&quot;' ||
+ '&#'+c.charCodeAt()+';'
+}
+
+
+copy(NodeType,Node);
+copy(NodeType,Node.prototype);
+function _visitNode(node,callback){
+ if(callback(node)){
+ return true;
+ }
+ if(node = node.firstChild){
+ do{
+ if(_visitNode(node,callback)){return true}
+ }while(node=node.nextSibling)
+ }
+}
+
+
+
+function Document(){
+}
+function _onAddAttribute(doc,el,newAttr){
+ doc && doc._inc++;
+ var ns = newAttr.namespaceURI ;
+ if(ns == 'http://www.w3.org/2000/xmlns/'){
+ el._nsMap[newAttr.prefix?newAttr.localName:''] = newAttr.value
+ }
+}
+function _onRemoveAttribute(doc,el,newAttr,remove){
+ doc && doc._inc++;
+ var ns = newAttr.namespaceURI ;
+ if(ns == 'http://www.w3.org/2000/xmlns/'){
+ delete el._nsMap[newAttr.prefix?newAttr.localName:'']
+ }
+}
+function _onUpdateChild(doc,el,newChild){
+ if(doc && doc._inc){
+ doc._inc++;
+ var cs = el.childNodes;
+ if(newChild){
+ cs[cs.length++] = newChild;
+ }else{
+ var child = el.firstChild;
+ var i = 0;
+ while(child){
+ cs[i++] = child;
+ child =child.nextSibling;
+ }
+ cs.length = i;
+ }
+ }
+}
+function _removeChild(parentNode,child){
+ var previous = child.previousSibling;
+ var next = child.nextSibling;
+ if(previous){
+ previous.nextSibling = next;
+ }else{
+ parentNode.firstChild = next
+ }
+ if(next){
+ next.previousSibling = previous;
+ }else{
+ parentNode.lastChild = previous;
+ }
+ _onUpdateChild(parentNode.ownerDocument,parentNode);
+ return child;
+}
+function _insertBefore(parentNode,newChild,nextChild){
+ var cp = newChild.parentNode;
+ if(cp){
+ cp.removeChild(newChild);//remove and update
+ }
+ if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
+ var newFirst = newChild.firstChild;
+ if (newFirst == null) {
+ return newChild;
+ }
+ var newLast = newChild.lastChild;
+ }else{
+ newFirst = newLast = newChild;
+ }
+ var pre = nextChild ? nextChild.previousSibling : parentNode.lastChild;
+
+ newFirst.previousSibling = pre;
+ newLast.nextSibling = nextChild;
+
+
+ if(pre){
+ pre.nextSibling = newFirst;
+ }else{
+ parentNode.firstChild = newFirst;
+ }
+ if(nextChild == null){
+ parentNode.lastChild = newLast;
+ }else{
+ nextChild.previousSibling = newLast;
+ }
+ do{
+ newFirst.parentNode = parentNode;
+ }while(newFirst !== newLast && (newFirst= newFirst.nextSibling))
+ _onUpdateChild(parentNode.ownerDocument||parentNode,parentNode);
+ if (newChild.nodeType == DOCUMENT_FRAGMENT_NODE) {
+ newChild.firstChild = newChild.lastChild = null;
+ }
+ return newChild;
+}
+function _appendSingleChild(parentNode,newChild){
+ var cp = newChild.parentNode;
+ if(cp){
+ var pre = parentNode.lastChild;
+ cp.removeChild(newChild);//remove and update
+ var pre = parentNode.lastChild;
+ }
+ var pre = parentNode.lastChild;
+ newChild.parentNode = parentNode;
+ newChild.previousSibling = pre;
+ newChild.nextSibling = null;
+ if(pre){
+ pre.nextSibling = newChild;
+ }else{
+ parentNode.firstChild = newChild;
+ }
+ parentNode.lastChild = newChild;
+ _onUpdateChild(parentNode.ownerDocument,parentNode,newChild);
+ return newChild;
+}
+Document.prototype = {
+ nodeName : '#document',
+ nodeType : DOCUMENT_NODE,
+ doctype : null,
+ documentElement : null,
+ _inc : 1,
+
+ insertBefore : function(newChild, refChild){//raises
+ if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){
+ var child = newChild.firstChild;
+ while(child){
+ var next = child.nextSibling;
+ this.insertBefore(child,refChild);
+ child = next;
+ }
+ return newChild;
+ }
+ if(this.documentElement == null && newChild.nodeType == 1){
+ this.documentElement = newChild;
+ }
+
+ return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild;
+ },
+ removeChild : function(oldChild){
+ if(this.documentElement == oldChild){
+ this.documentElement = null;
+ }
+ return _removeChild(this,oldChild);
+ },
+ importNode : function(importedNode,deep){
+ return importNode(this,importedNode,deep);
+ },
+ getElementById : function(id){
+ var rtv = null;
+ _visitNode(this.documentElement,function(node){
+ if(node.nodeType == 1){
+ if(node.getAttribute('id') == id){
+ rtv = node;
+ return true;
+ }
+ }
+ })
+ return rtv;
+ },
+ createElement : function(tagName){
+ var node = new Element();
+ node.ownerDocument = this;
+ node.nodeName = tagName;
+ node.tagName = tagName;
+ node.childNodes = new NodeList();
+ var attrs = node.attributes = new NamedNodeMap();
+ attrs._ownerElement = node;
+ return node;
+ },
+ createDocumentFragment : function(){
+ var node = new DocumentFragment();
+ node.ownerDocument = this;
+ node.childNodes = new NodeList();
+ return node;
+ },
+ createTextNode : function(data){
+ var node = new Text();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createComment : function(data){
+ var node = new Comment();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createCDATASection : function(data){
+ var node = new CDATASection();
+ node.ownerDocument = this;
+ node.appendData(data)
+ return node;
+ },
+ createProcessingInstruction : function(target,data){
+ var node = new ProcessingInstruction();
+ node.ownerDocument = this;
+ node.tagName = node.target = target;
+ node.nodeValue= node.data = data;
+ return node;
+ },
+ createAttribute : function(name){
+ var node = new Attr();
+ node.ownerDocument = this;
+ node.name = name;
+ node.nodeName = name;
+ node.localName = name;
+ node.specified = true;
+ return node;
+ },
+ createEntityReference : function(name){
+ var node = new EntityReference();
+ node.ownerDocument = this;
+ node.nodeName = name;
+ return node;
+ },
+ createElementNS : function(namespaceURI,qualifiedName){
+ var node = new Element();
+ var pl = qualifiedName.split(':');
+ var attrs = node.attributes = new NamedNodeMap();
+ node.childNodes = new NodeList();
+ node.ownerDocument = this;
+ node.nodeName = qualifiedName;
+ node.tagName = qualifiedName;
+ node.namespaceURI = namespaceURI;
+ if(pl.length == 2){
+ node.prefix = pl[0];
+ node.localName = pl[1];
+ }else{
+ node.localName = qualifiedName;
+ }
+ attrs._ownerElement = node;
+ return node;
+ },
+ createAttributeNS : function(namespaceURI,qualifiedName){
+ var node = new Attr();
+ var pl = qualifiedName.split(':');
+ node.ownerDocument = this;
+ node.nodeName = qualifiedName;
+ node.name = qualifiedName;
+ node.namespaceURI = namespaceURI;
+ node.specified = true;
+ if(pl.length == 2){
+ node.prefix = pl[0];
+ node.localName = pl[1];
+ }else{
+ node.localName = qualifiedName;
+ }
+ return node;
+ }
+};
+_extends(Document,Node);
+
+
+function Element() {
+ this._nsMap = {};
+};
+Element.prototype = {
+ nodeType : ELEMENT_NODE,
+ hasAttribute : function(name){
+ return this.getAttributeNode(name)!=null;
+ },
+ getAttribute : function(name){
+ var attr = this.getAttributeNode(name);
+ return attr && attr.value || '';
+ },
+ getAttributeNode : function(name){
+ return this.attributes.getNamedItem(name);
+ },
+ setAttribute : function(name, value){
+ var attr = this.ownerDocument.createAttribute(name);
+ attr.value = attr.nodeValue = "" + value;
+ this.setAttributeNode(attr)
+ },
+ removeAttribute : function(name){
+ var attr = this.getAttributeNode(name)
+ attr && this.removeAttributeNode(attr);
+ },
+ appendChild:function(newChild){
+ if(newChild.nodeType === DOCUMENT_FRAGMENT_NODE){
+ return this.insertBefore(newChild,null);
+ }else{
+ return _appendSingleChild(this,newChild);
+ }
+ },
+ setAttributeNode : function(newAttr){
+ return this.attributes.setNamedItem(newAttr);
+ },
+ setAttributeNodeNS : function(newAttr){
+ return this.attributes.setNamedItemNS(newAttr);
+ },
+ removeAttributeNode : function(oldAttr){
+ return this.attributes.removeNamedItem(oldAttr.nodeName);
+ },
+ removeAttributeNS : function(namespaceURI, localName){
+ var old = this.getAttributeNodeNS(namespaceURI, localName);
+ old && this.removeAttributeNode(old);
+ },
+
+ hasAttributeNS : function(namespaceURI, localName){
+ return this.getAttributeNodeNS(namespaceURI, localName)!=null;
+ },
+ getAttributeNS : function(namespaceURI, localName){
+ var attr = this.getAttributeNodeNS(namespaceURI, localName);
+ return attr && attr.value || '';
+ },
+ setAttributeNS : function(namespaceURI, qualifiedName, value){
+ var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName);
+ attr.value = attr.nodeValue = "" + value;
+ this.setAttributeNode(attr)
+ },
+ getAttributeNodeNS : function(namespaceURI, localName){
+ return this.attributes.getNamedItemNS(namespaceURI, localName);
+ },
+
+ getElementsByTagName : function(tagName){
+ return new LiveNodeList(this,function(base){
+ var ls = [];
+ _visitNode(base,function(node){
+ if(node !== base && node.nodeType == ELEMENT_NODE && (tagName === '*' || node.tagName == tagName)){
+ ls.push(node);
+ }
+ });
+ return ls;
+ });
+ },
+ getElementsByTagNameNS : function(namespaceURI, localName){
+ return new LiveNodeList(this,function(base){
+ var ls = [];
+ _visitNode(base,function(node){
+ if(node !== base && node.nodeType === ELEMENT_NODE && (namespaceURI === '*' || node.namespaceURI === namespaceURI) && (localName === '*' || node.localName == localName)){
+ ls.push(node);
+ }
+ });
+ return ls;
+ });
+ }
+};
+Document.prototype.getElementsByTagName = Element.prototype.getElementsByTagName;
+Document.prototype.getElementsByTagNameNS = Element.prototype.getElementsByTagNameNS;
+
+
+_extends(Element,Node);
+function Attr() {
+};
+Attr.prototype.nodeType = ATTRIBUTE_NODE;
+_extends(Attr,Node);
+
+
+function CharacterData() {
+};
+CharacterData.prototype = {
+ data : '',
+ substringData : function(offset, count) {
+ return this.data.substring(offset, offset+count);
+ },
+ appendData: function(text) {
+ text = this.data+text;
+ this.nodeValue = this.data = text;
+ this.length = text.length;
+ },
+ insertData: function(offset,text) {
+ this.replaceData(offset,0,text);
+
+ },
+ appendChild:function(newChild){
+ throw new Error(ExceptionMessage[3])
+ return Node.prototype.appendChild.apply(this,arguments)
+ },
+ deleteData: function(offset, count) {
+ this.replaceData(offset,count,"");
+ },
+ replaceData: function(offset, count, text) {
+ var start = this.data.substring(0,offset);
+ var end = this.data.substring(offset+count);
+ text = start + text + end;
+ this.nodeValue = this.data = text;
+ this.length = text.length;
+ }
+}
+_extends(CharacterData,Node);
+function Text() {
+};
+Text.prototype = {
+ nodeName : "#text",
+ nodeType : TEXT_NODE,
+ splitText : function(offset) {
+ var text = this.data;
+ var newText = text.substring(offset);
+ text = text.substring(0, offset);
+ this.data = this.nodeValue = text;
+ this.length = text.length;
+ var newNode = this.ownerDocument.createTextNode(newText);
+ if(this.parentNode){
+ this.parentNode.insertBefore(newNode, this.nextSibling);
+ }
+ return newNode;
+ }
+}
+_extends(Text,CharacterData);
+function Comment() {
+};
+Comment.prototype = {
+ nodeName : "#comment",
+ nodeType : COMMENT_NODE
+}
+_extends(Comment,CharacterData);
+
+function CDATASection() {
+};
+CDATASection.prototype = {
+ nodeName : "#cdata-section",
+ nodeType : CDATA_SECTION_NODE
+}
+_extends(CDATASection,CharacterData);
+
+
+function DocumentType() {
+};
+DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE;
+_extends(DocumentType,Node);
+
+function Notation() {
+};
+Notation.prototype.nodeType = NOTATION_NODE;
+_extends(Notation,Node);
+
+function Entity() {
+};
+Entity.prototype.nodeType = ENTITY_NODE;
+_extends(Entity,Node);
+
+function EntityReference() {
+};
+EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE;
+_extends(EntityReference,Node);
+
+function DocumentFragment() {
+};
+DocumentFragment.prototype.nodeName = "#document-fragment";
+DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE;
+_extends(DocumentFragment,Node);
+
+
+function ProcessingInstruction() {
+}
+ProcessingInstruction.prototype.nodeType = PROCESSING_INSTRUCTION_NODE;
+_extends(ProcessingInstruction,Node);
+function XMLSerializer(){}
+XMLSerializer.prototype.serializeToString = function(node){
+ var buf = [];
+ serializeToString(node,buf);
+ return buf.join('');
+}
+Node.prototype.toString =function(){
+ return XMLSerializer.prototype.serializeToString(this);
+}
+function serializeToString(node,buf){
+ switch(node.nodeType){
+ case ELEMENT_NODE:
+ var attrs = node.attributes;
+ var len = attrs.length;
+ var child = node.firstChild;
+ var nodeName = node.tagName;
+ var isHTML = htmlns === node.namespaceURI
+ buf.push('<',nodeName);
+ for(var i=0;i<len;i++){
+ serializeToString(attrs.item(i),buf,isHTML);
+ }
+ if(child || isHTML && !/^(?:meta|link|img|br|hr|input|button)$/i.test(nodeName)){
+ buf.push('>');
+ if(isHTML && /^script$/i.test(nodeName)){
+ if(child){
+ buf.push(child.data);
+ }
+ }else{
+ while(child){
+ serializeToString(child,buf);
+ child = child.nextSibling;
+ }
+ }
+ buf.push('</',nodeName,'>');
+ }else{
+ buf.push('/>');
+ }
+ return;
+ case DOCUMENT_NODE:
+ case DOCUMENT_FRAGMENT_NODE:
+ var child = node.firstChild;
+ while(child){
+ serializeToString(child,buf);
+ child = child.nextSibling;
+ }
+ return;
+ case ATTRIBUTE_NODE:
+ return buf.push(' ',node.name,'="',node.value.replace(/[<&"]/g,_xmlEncoder),'"');
+ case TEXT_NODE:
+ return buf.push(node.data.replace(/[<&]/g,_xmlEncoder));
+ case CDATA_SECTION_NODE:
+ return buf.push( '<![CDATA[',node.data,']]>');
+ case COMMENT_NODE:
+ return buf.push( "<!--",node.data,"-->");
+ case DOCUMENT_TYPE_NODE:
+ var pubid = node.publicId;
+ var sysid = node.systemId;
+ buf.push('<!DOCTYPE ',node.name);
+ if(pubid){
+ buf.push(' PUBLIC "',pubid);
+ if (sysid && sysid!='.') {
+ buf.push( '" "',sysid);
+ }
+ buf.push('">');
+ }else if(sysid && sysid!='.'){
+ buf.push(' SYSTEM "',sysid,'">');
+ }else{
+ var sub = node.internalSubset;
+ if(sub){
+ buf.push(" [",sub,"]");
+ }
+ buf.push(">");
+ }
+ return;
+ case PROCESSING_INSTRUCTION_NODE:
+ return buf.push( "<?",node.target," ",node.data,"?>");
+ case ENTITY_REFERENCE_NODE:
+ return buf.push( '&',node.nodeName,';');
+ default:
+ buf.push('??',node.nodeName);
+ }
+}
+function importNode(doc,node,deep){
+ var node2;
+ switch (node.nodeType) {
+ case ELEMENT_NODE:
+ node2 = node.cloneNode(false);
+ node2.ownerDocument = doc;
+ case DOCUMENT_FRAGMENT_NODE:
+ break;
+ case ATTRIBUTE_NODE:
+ deep = true;
+ break;
+ }
+ if(!node2){
+ node2 = node.cloneNode(false);//false
+ }
+ node2.ownerDocument = doc;
+ node2.parentNode = null;
+ if(deep){
+ var child = node.firstChild;
+ while(child){
+ node2.appendChild(importNode(doc,child,deep));
+ child = child.nextSibling;
+ }
+ }
+ return node2;
+}
+function cloneNode(doc,node,deep){
+ var node2 = new node.constructor();
+ for(var n in node){
+ var v = node[n];
+ if(typeof v != 'object' ){
+ if(v != node2[n]){
+ node2[n] = v;
+ }
+ }
+ }
+ if(node.childNodes){
+ node2.childNodes = new NodeList();
+ }
+ node2.ownerDocument = doc;
+ switch (node2.nodeType) {
+ case ELEMENT_NODE:
+ var attrs = node.attributes;
+ var attrs2 = node2.attributes = new NamedNodeMap();
+ var len = attrs.length
+ attrs2._ownerElement = node2;
+ for(var i=0;i<len;i++){
+ node2.setAttributeNode(cloneNode(doc,attrs.item(i),true));
+ }
+ break;;
+ case ATTRIBUTE_NODE:
+ deep = true;
+ }
+ if(deep){
+ var child = node.firstChild;
+ while(child){
+ node2.appendChild(cloneNode(doc,child,deep));
+ child = child.nextSibling;
+ }
+ }
+ return node2;
+}
+
+function __set__(object,key,value){
+ object[key] = value
+}
+try{
+ if(Object.defineProperty){
+ Object.defineProperty(LiveNodeList.prototype,'length',{
+ get:function(){
+ _updateLiveList(this);
+ return this.$$length;
+ }
+ });
+ Object.defineProperty(Node.prototype,'textContent',{
+ get:function(){
+ return getTextContent(this);
+ },
+ set:function(data){
+ switch(this.nodeType){
+ case 1:
+ case 11:
+ while(this.firstChild){
+ this.removeChild(this.firstChild);
+ }
+ if(data || String(data)){
+ this.appendChild(this.ownerDocument.createTextNode(data));
+ }
+ break;
+ default:
+ this.data = data;
+ this.value = value;
+ this.nodeValue = data;
+ }
+ }
+ })
+
+ function getTextContent(node){
+ switch(node.nodeType){
+ case 1:
+ case 11:
+ var buf = [];
+ node = node.firstChild;
+ while(node){
+ if(node.nodeType!==7 && node.nodeType !==8){
+ buf.push(getTextContent(node));
+ }
+ node = node.nextSibling;
+ }
+ return buf.join('');
+ default:
+ return node.nodeValue;
+ }
+ }
+ __set__ = function(object,key,value){
+ object['$$'+key] = value
+ }
+ }
+}catch(e){//ie8
+}
+
+return DOMImplementation;
+});
+
+ace.define("ace/mode/xml/dom-parser",["require","exports","module","ace/mode/xml/sax","ace/mode/xml/dom"], function(require, exports, module) {
+ 'use strict';
+
+ var XMLReader = require('./sax'),
+ DOMImplementation = require('./dom');
+
+function DOMParser(options){
+ this.options = options ||{locator:{}};
+
+}
+DOMParser.prototype.parseFromString = function(source,mimeType){
+ var options = this.options;
+ var sax = new XMLReader();
+ var domBuilder = options.domBuilder || new DOMHandler();//contentHandler and LexicalHandler
+ var errorHandler = options.errorHandler;
+ var locator = options.locator;
+ var defaultNSMap = options.xmlns||{};
+ var entityMap = {'lt':'<','gt':'>','amp':'&','quot':'"','apos':"'"}
+ if(locator){
+ domBuilder.setDocumentLocator(locator)
+ }
+
+ sax.errorHandler = buildErrorHandler(errorHandler,domBuilder,locator);
+ sax.domBuilder = options.domBuilder || domBuilder;
+ if(/\/x?html?$/.test(mimeType)){
+ entityMap.nbsp = '\xa0';
+ entityMap.copy = '\xa9';
+ defaultNSMap['']= 'http://www.w3.org/1999/xhtml';
+ }
+ if(source){
+ sax.parse(source,defaultNSMap,entityMap);
+ }else{
+ sax.errorHandler.error("invalid document source");
+ }
+ return domBuilder.document;
+}
+function buildErrorHandler(errorImpl,domBuilder,locator){
+ if(!errorImpl){
+ if(domBuilder instanceof DOMHandler){
+ return domBuilder;
+ }
+ errorImpl = domBuilder ;
+ }
+ var errorHandler = {}
+ var isCallback = errorImpl instanceof Function;
+ locator = locator||{}
+ function build(key){
+ var fn = errorImpl[key];
+ if(!fn){
+ if(isCallback){
+ fn = errorImpl.length == 2?function(msg){errorImpl(key,msg)}:errorImpl;
+ }else{
+ var i=arguments.length;
+ while(--i){
+ if(fn = errorImpl[arguments[i]]){
+ break;
+ }
+ }
+ }
+ }
+ errorHandler[key] = fn && function(msg){
+ fn(msg+_locator(locator), msg, locator);
+ }||function(){};
+ }
+ build('warning','warn');
+ build('error','warn','warning');
+ build('fatalError','warn','warning','error');
+ return errorHandler;
+}
+function DOMHandler() {
+ this.cdata = false;
+}
+function position(locator,node){
+ node.lineNumber = locator.lineNumber;
+ node.columnNumber = locator.columnNumber;
+}
+DOMHandler.prototype = {
+ startDocument : function() {
+ this.document = new DOMImplementation().createDocument(null, null, null);
+ if (this.locator) {
+ this.document.documentURI = this.locator.systemId;
+ }
+ },
+ startElement:function(namespaceURI, localName, qName, attrs) {
+ var doc = this.document;
+ var el = doc.createElementNS(namespaceURI, qName||localName);
+ var len = attrs.length;
+ appendElement(this, el);
+ this.currentElement = el;
+
+ this.locator && position(this.locator,el)
+ for (var i = 0 ; i < len; i++) {
+ var namespaceURI = attrs.getURI(i);
+ var value = attrs.getValue(i);
+ var qName = attrs.getQName(i);
+ var attr = doc.createAttributeNS(namespaceURI, qName);
+ if( attr.getOffset){
+ position(attr.getOffset(1),attr)
+ }
+ attr.value = attr.nodeValue = value;
+ el.setAttributeNode(attr)
+ }
+ },
+ endElement:function(namespaceURI, localName, qName) {
+ var current = this.currentElement
+ var tagName = current.tagName;
+ this.currentElement = current.parentNode;
+ },
+ startPrefixMapping:function(prefix, uri) {
+ },
+ endPrefixMapping:function(prefix) {
+ },
+ processingInstruction:function(target, data) {
+ var ins = this.document.createProcessingInstruction(target, data);
+ this.locator && position(this.locator,ins)
+ appendElement(this, ins);
+ },
+ ignorableWhitespace:function(ch, start, length) {
+ },
+ characters:function(chars, start, length) {
+ chars = _toString.apply(this,arguments)
+ if(this.currentElement && chars){
+ if (this.cdata) {
+ var charNode = this.document.createCDATASection(chars);
+ this.currentElement.appendChild(charNode);
+ } else {
+ var charNode = this.document.createTextNode(chars);
+ this.currentElement.appendChild(charNode);
+ }
+ this.locator && position(this.locator,charNode)
+ }
+ },
+ skippedEntity:function(name) {
+ },
+ endDocument:function() {
+ this.document.normalize();
+ },
+ setDocumentLocator:function (locator) {
+ if(this.locator = locator){// && !('lineNumber' in locator)){
+ locator.lineNumber = 0;
+ }
+ },
+ comment:function(chars, start, length) {
+ chars = _toString.apply(this,arguments)
+ var comm = this.document.createComment(chars);
+ this.locator && position(this.locator,comm)
+ appendElement(this, comm);
+ },
+
+ startCDATA:function() {
+ this.cdata = true;
+ },
+ endCDATA:function() {
+ this.cdata = false;
+ },
+
+ startDTD:function(name, publicId, systemId) {
+ var impl = this.document.implementation;
+ if (impl && impl.createDocumentType) {
+ var dt = impl.createDocumentType(name, publicId, systemId);
+ this.locator && position(this.locator,dt)
+ appendElement(this, dt);
+ }
+ },
+ warning:function(error) {
+ console.warn(error,_locator(this.locator));
+ },
+ error:function(error) {
+ console.error(error,_locator(this.locator));
+ },
+ fatalError:function(error) {
+ console.error(error,_locator(this.locator));
+ throw error;
+ }
+}
+function _locator(l){
+ if(l){
+ return '\n@'+(l.systemId ||'')+'#[line:'+l.lineNumber+',col:'+l.columnNumber+']'
+ }
+}
+function _toString(chars,start,length){
+ if(typeof chars == 'string'){
+ return chars.substr(start,length)
+ }else{//java sax connect width xmldom on rhino(what about: "? && !(chars instanceof String)")
+ if(chars.length >= start+length || start){
+ return new java.lang.String(chars,start,length)+'';
+ }
+ return chars;
+ }
+}
+"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(key){
+ DOMHandler.prototype[key] = function(){return null}
+})
+function appendElement (hander,node) {
+ if (!hander.currentElement) {
+ hander.document.appendChild(node);
+ } else {
+ hander.currentElement.appendChild(node);
+ }
+}//appendChild and setAttributeNS are preformance key
+
+return {
+ DOMParser: DOMParser
+ };
+});
+
+ace.define("ace/mode/xml_worker",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/worker/mirror","ace/mode/xml/dom-parser"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var lang = require("../lib/lang");
+var Mirror = require("../worker/mirror").Mirror;
+var DOMParser = require("./xml/dom-parser").DOMParser;
+
+var Worker = exports.Worker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(400);
+ this.context = null;
+};
+
+oop.inherits(Worker, Mirror);
+
+(function() {
+
+ this.setOptions = function(options) {
+ this.context = options.context;
+ };
+
+ this.onUpdate = function() {
+ var value = this.doc.getValue();
+ if (!value)
+ return;
+ var parser = new DOMParser();
+ var errors = [];
+ parser.options.errorHandler = {
+ fatalError: function(fullMsg, errorMsg, locator) {
+ errors.push({
+ row: locator.lineNumber,
+ column: locator.columnNumber,
+ text: errorMsg,
+ type: "error"
+ });
+ },
+ error: function(fullMsg, errorMsg, locator) {
+ errors.push({
+ row: locator.lineNumber,
+ column: locator.columnNumber,
+ text: errorMsg,
+ type: "error"
+ });
+ },
+ warning: function(fullMsg, errorMsg, locator) {
+ errors.push({
+ row: locator.lineNumber,
+ column: locator.columnNumber,
+ text: errorMsg,
+ type: "warning"
+ });
+ }
+ };
+
+ parser.parseFromString(value);
+ this.sender.emit("error", errors);
+ };
+
+}).call(Worker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ 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 ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ 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, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ 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("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ 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("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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 || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+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, "");
+ };
+}
+
+function toInteger(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;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ace/worker-xquery.js b/www/wiki/extensions/CodeEditor/modules/ace/worker-xquery.js
new file mode 100644
index 00000000..5f52793a
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ace/worker-xquery.js
@@ -0,0 +1,58351 @@
+"no use strict";
+;(function(window) {
+if (typeof window.window != "undefined" && window.document)
+ return;
+if (window.require && window.define)
+ return;
+
+if (!window.console) {
+ window.console = function() {
+ var msgs = Array.prototype.slice.call(arguments, 0);
+ postMessage({type: "log", data: msgs});
+ };
+ window.console.error =
+ window.console.warn =
+ window.console.log =
+ window.console.trace = window.console;
+}
+window.window = window;
+window.ace = window;
+
+window.onerror = function(message, file, line, col, err) {
+ postMessage({type: "error", data: {
+ message: message,
+ data: err.data,
+ file: file,
+ line: line,
+ col: col,
+ stack: err.stack
+ }});
+};
+
+window.normalizeModule = function(parentId, moduleName) {
+ // normalize plugin requires
+ if (moduleName.indexOf("!") !== -1) {
+ var chunks = moduleName.split("!");
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
+ }
+ // normalize relative requires
+ if (moduleName.charAt(0) == ".") {
+ var base = parentId.split("/").slice(0, -1).join("/");
+ moduleName = (base ? base + "/" : "") + moduleName;
+
+ while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
+ var previous = moduleName;
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
+ }
+ }
+
+ return moduleName;
+};
+
+window.require = function require(parentId, id) {
+ if (!id) {
+ id = parentId;
+ parentId = null;
+ }
+ if (!id.charAt)
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
+
+ id = window.normalizeModule(parentId, id);
+
+ var module = window.require.modules[id];
+ if (module) {
+ if (!module.initialized) {
+ module.initialized = true;
+ module.exports = module.factory().exports;
+ }
+ return module.exports;
+ }
+
+ if (!window.require.tlns)
+ return console.log("unable to load " + id);
+
+ var path = resolveModuleId(id, window.require.tlns);
+ if (path.slice(-3) != ".js") path += ".js";
+
+ window.require.id = id;
+ window.require.modules[id] = {}; // prevent infinite loop on broken modules
+ importScripts(path);
+ return window.require(parentId, id);
+};
+function resolveModuleId(id, paths) {
+ var testPath = id, tail = "";
+ while (testPath) {
+ var alias = paths[testPath];
+ if (typeof alias == "string") {
+ return alias + tail;
+ } else if (alias) {
+ return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name);
+ } else if (alias === false) {
+ return "";
+ }
+ var i = testPath.lastIndexOf("/");
+ if (i === -1) break;
+ tail = testPath.substr(i) + tail;
+ testPath = testPath.slice(0, i);
+ }
+ return id;
+}
+window.require.modules = {};
+window.require.tlns = {};
+
+window.define = function(id, deps, factory) {
+ if (arguments.length == 2) {
+ factory = deps;
+ if (typeof id != "string") {
+ deps = id;
+ id = window.require.id;
+ }
+ } else if (arguments.length == 1) {
+ factory = id;
+ deps = [];
+ id = window.require.id;
+ }
+
+ if (typeof factory != "function") {
+ window.require.modules[id] = {
+ exports: factory,
+ initialized: true
+ };
+ return;
+ }
+
+ if (!deps.length)
+ // If there is no dependencies, we inject "require", "exports" and
+ // "module" as dependencies, to provide CommonJS compatibility.
+ deps = ["require", "exports", "module"];
+
+ var req = function(childId) {
+ return window.require(id, childId);
+ };
+
+ window.require.modules[id] = {
+ exports: {},
+ factory: function() {
+ var module = this;
+ var returnExports = factory.apply(this, deps.map(function(dep) {
+ switch (dep) {
+ // Because "require", "exports" and "module" aren't actual
+ // dependencies, we must handle them seperately.
+ case "require": return req;
+ case "exports": return module.exports;
+ case "module": return module;
+ // But for all other dependencies, we can just go ahead and
+ // require them.
+ default: return req(dep);
+ }
+ }));
+ if (returnExports)
+ module.exports = returnExports;
+ return module;
+ }
+ };
+};
+window.define.amd = {};
+require.tlns = {};
+window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
+ for (var i in topLevelNamespaces)
+ require.tlns[i] = topLevelNamespaces[i];
+};
+
+window.initSender = function initSender() {
+
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
+ var oop = window.require("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 = window.main = null;
+var sender = window.sender = null;
+
+window.onmessage = function(e) {
+ var msg = e.data;
+ if (msg.event && sender) {
+ sender._signal(msg.event, msg.data);
+ }
+ else if (msg.command) {
+ if (main[msg.command])
+ main[msg.command].apply(main, msg.args);
+ else if (window[msg.command])
+ window[msg.command].apply(window, msg.args);
+ else
+ throw new Error("Unknown command:" + msg.command);
+ }
+ else if (msg.init) {
+ window.initBaseUrls(msg.tlns);
+ require("ace/lib/es5-shim");
+ sender = window.sender = window.initSender();
+ var clazz = require(msg.module)[msg.classname];
+ main = window.main = new clazz(sender);
+ }
+};
+})(this);
+
+ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.inherits = function(ctor, superCtor) {
+ ctor.super_ = superCtor;
+ ctor.prototype = Object.create(superCtor.prototype, {
+ constructor: {
+ value: ctor,
+ enumerable: false,
+ writable: true,
+ configurable: true
+ }
+ });
+};
+
+exports.mixin = function(obj, mixin) {
+ for (var key in mixin) {
+ obj[key] = mixin[key];
+ }
+ return obj;
+};
+
+exports.implement = function(proto, mixin) {
+ exports.mixin(proto, mixin);
+};
+
+});
+
+ace.define("ace/range",["require","exports","module"], function(require, exports, module) {
+"use strict";
+var comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+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};
+ else if (this.end.row < firstRow)
+ var end = {row: firstRow, column: 0};
+
+ if (this.start.row > lastRow)
+ var start = {row: lastRow + 1, column: 0};
+ else if (this.start.row < firstRow)
+ var start = {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
+ );
+ };
+ this.moveBy = function(row, column) {
+ this.start.row += row;
+ this.start.column += column;
+ this.end.row += row;
+ this.end.column += column;
+ };
+
+}).call(Range.prototype);
+Range.fromPoints = function(start, end) {
+ return new Range(start.row, start.column, end.row, end.column);
+};
+Range.comparePoints = comparePoints;
+
+Range.comparePoints = function(p1, p2) {
+ return p1.row - p2.row || p1.column - p2.column;
+};
+
+
+exports.Range = Range;
+});
+
+ace.define("ace/apply_delta",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+function throwDeltaError(delta, errorText){
+ console.log("Invalid Delta:", delta);
+ throw "Invalid Delta: " + errorText;
+}
+
+function positionInDocument(docLines, position) {
+ return position.row >= 0 && position.row < docLines.length &&
+ position.column >= 0 && position.column <= docLines[position.row].length;
+}
+
+function validateDelta(docLines, delta) {
+ if (delta.action != "insert" && delta.action != "remove")
+ throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
+ if (!(delta.lines instanceof Array))
+ throwDeltaError(delta, "delta.lines must be an Array");
+ if (!delta.start || !delta.end)
+ throwDeltaError(delta, "delta.start/end must be an present");
+ var start = delta.start;
+ if (!positionInDocument(docLines, delta.start))
+ throwDeltaError(delta, "delta.start must be contained in document");
+ var end = delta.end;
+ if (delta.action == "remove" && !positionInDocument(docLines, end))
+ throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
+ var numRangeRows = end.row - start.row;
+ var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
+ if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
+ throwDeltaError(delta, "delta.range must match delta lines");
+}
+
+exports.applyDelta = function(docLines, delta, doNotValidate) {
+
+ var row = delta.start.row;
+ var startColumn = delta.start.column;
+ var line = docLines[row] || "";
+ switch (delta.action) {
+ case "insert":
+ var lines = delta.lines;
+ if (lines.length === 1) {
+ docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
+ } else {
+ var args = [row, 1].concat(delta.lines);
+ docLines.splice.apply(docLines, args);
+ docLines[row] = line.substring(0, startColumn) + docLines[row];
+ docLines[row + delta.lines.length - 1] += line.substring(startColumn);
+ }
+ break;
+ case "remove":
+ var endColumn = delta.end.column;
+ var endRow = delta.end.row;
+ if (row === endRow) {
+ docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
+ } else {
+ docLines.splice(
+ row, endRow - row + 1,
+ line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
+ );
+ }
+ break;
+ }
+}
+});
+
+ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+var EventEmitter = {};
+var stopPropagation = function() { this.propagationStopped = true; };
+var preventDefault = function() { this.defaultPrevented = true; };
+
+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 = stopPropagation;
+ if (!e.preventDefault)
+ e.preventDefault = preventDefault;
+
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++) {
+ listeners[i](e, this);
+ if (e.propagationStopped)
+ break;
+ }
+
+ if (defaultHandler && !e.defaultPrevented)
+ return defaultHandler(e, this);
+};
+
+
+EventEmitter._signal = function(eventName, e) {
+ var listeners = (this._eventRegistry || {})[eventName];
+ if (!listeners)
+ return;
+ listeners = listeners.slice();
+ for (var i=0; i<listeners.length; i++)
+ listeners[i](e, this);
+};
+
+EventEmitter.once = function(eventName, callback) {
+ var _self = this;
+ callback && this.addEventListener(eventName, function newCallback() {
+ _self.removeEventListener(eventName, newCallback);
+ callback.apply(null, arguments);
+ });
+};
+
+
+EventEmitter.setDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ handlers = this._defaultHandlers = {_disabled_: {}};
+
+ if (handlers[eventName]) {
+ var old = handlers[eventName];
+ var disabled = handlers._disabled_[eventName];
+ if (!disabled)
+ handlers._disabled_[eventName] = disabled = [];
+ disabled.push(old);
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+ handlers[eventName] = callback;
+};
+EventEmitter.removeDefaultHandler = function(eventName, callback) {
+ var handlers = this._defaultHandlers
+ if (!handlers)
+ return;
+ var disabled = handlers._disabled_[eventName];
+
+ if (handlers[eventName] == callback) {
+ var old = handlers[eventName];
+ if (disabled)
+ this.setDefaultHandler(eventName, disabled.pop());
+ } else if (disabled) {
+ var i = disabled.indexOf(callback);
+ if (i != -1)
+ disabled.splice(i, 1);
+ }
+};
+
+EventEmitter.on =
+EventEmitter.addEventListener = function(eventName, callback, capturing) {
+ this._eventRegistry = this._eventRegistry || {};
+
+ var listeners = this._eventRegistry[eventName];
+ if (!listeners)
+ listeners = this._eventRegistry[eventName] = [];
+
+ if (listeners.indexOf(callback) == -1)
+ listeners[capturing ? "unshift" : "push"](callback);
+ return callback;
+};
+
+EventEmitter.off =
+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/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;
+
+var Anchor = exports.Anchor = function(doc, row, column) {
+ this.$onChange = this.onChange.bind(this);
+ this.attach(doc);
+
+ if (typeof column == "undefined")
+ this.setPosition(row.row, row.column);
+ else
+ this.setPosition(row, column);
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.getPosition = function() {
+ return this.$clipPositionToDocument(this.row, this.column);
+ };
+ this.getDocument = function() {
+ return this.document;
+ };
+ this.$insertRight = false;
+ this.onChange = function(delta) {
+ if (delta.start.row == delta.end.row && delta.start.row != this.row)
+ return;
+
+ if (delta.start.row > this.row)
+ return;
+
+ var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
+ this.setPosition(point.row, point.column, true);
+ };
+
+ function $pointsInOrder(point1, point2, equalPointsInOrder) {
+ var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
+ return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
+ }
+
+ function $getTransformedPoint(delta, point, moveIfEqual) {
+ var deltaIsInsert = delta.action == "insert";
+ var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
+ var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
+ var deltaStart = delta.start;
+ var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
+ if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
+ return {
+ row: point.row,
+ column: point.column
+ };
+ }
+ if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
+ return {
+ row: point.row + deltaRowShift,
+ column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
+ };
+ }
+
+ return {
+ row: deltaStart.row,
+ column: deltaStart.column
+ };
+ }
+ 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._signal("change", {
+ old: old,
+ value: pos
+ });
+ };
+ this.detach = function() {
+ this.document.removeEventListener("change", this.$onChange);
+ };
+ this.attach = function(doc) {
+ this.document = doc || this.document;
+ this.document.on("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/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) {
+"use strict";
+
+var oop = require("./lib/oop");
+var applyDelta = require("./apply_delta").applyDelta;
+var EventEmitter = require("./lib/event_emitter").EventEmitter;
+var Range = require("./range").Range;
+var Anchor = require("./anchor").Anchor;
+
+var Document = function(textOrLines) {
+ this.$lines = [""];
+ if (textOrLines.length === 0) {
+ this.$lines = [""];
+ } else if (Array.isArray(textOrLines)) {
+ this.insertMergedLines({row: 0, column: 0}, textOrLines);
+ } else {
+ this.insert({row: 0, column:0}, textOrLines);
+ }
+};
+
+(function() {
+
+ oop.implement(this, EventEmitter);
+ this.setValue = function(text) {
+ var len = this.getLength() - 1;
+ this.remove(new Range(0, 0, len, this.getLine(len).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);
+ this.$autoNewLine = match ? match[1] : "\n";
+ this._signal("changeNewLineMode");
+ };
+ this.getNewLineCharacter = function() {
+ switch (this.$newLineMode) {
+ case "windows":
+ return "\r\n";
+ case "unix":
+ return "\n";
+ default:
+ return this.$autoNewLine || "\n";
+ }
+ };
+
+ this.$autoNewLine = "";
+ this.$newLineMode = "auto";
+ this.setNewLineMode = function(newLineMode) {
+ if (this.$newLineMode === newLineMode)
+ return;
+
+ this.$newLineMode = newLineMode;
+ this._signal("changeNewLineMode");
+ };
+ 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) {
+ return this.getLinesForRange(range).join(this.getNewLineCharacter());
+ };
+ this.getLinesForRange = function(range) {
+ var lines;
+ if (range.start.row === range.end.row) {
+ lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
+ } else {
+ lines = this.getLines(range.start.row, range.end.row);
+ lines[0] = (lines[0] || "").substring(range.start.column);
+ var l = lines.length - 1;
+ if (range.end.row - range.start.row == l)
+ lines[l] = lines[l].substring(0, range.end.column);
+ }
+ return lines;
+ };
+ this.insertLines = function(row, lines) {
+ console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
+ return this.insertFullLines(row, lines);
+ };
+ this.removeLines = function(firstRow, lastRow) {
+ console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
+ return this.removeFullLines(firstRow, lastRow);
+ };
+ this.insertNewLine = function(position) {
+ console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
+ return this.insertMergedLines(position, ["", ""]);
+ };
+ this.insert = function(position, text) {
+ if (this.getLength() <= 1)
+ this.$detectNewLine(text);
+
+ return this.insertMergedLines(position, this.$split(text));
+ };
+ this.insertInLine = function(position, text) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = this.pos(position.row, position.column + text.length);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: [text]
+ }, true);
+
+ return this.clonePos(end);
+ };
+
+ this.clippedPos = function(row, column) {
+ var length = this.getLength();
+ if (row === undefined) {
+ row = length;
+ } else if (row < 0) {
+ row = 0;
+ } else if (row >= length) {
+ row = length - 1;
+ column = undefined;
+ }
+ var line = this.getLine(row);
+ if (column == undefined)
+ column = line.length;
+ column = Math.min(Math.max(column, 0), line.length);
+ return {row: row, column: column};
+ };
+
+ this.clonePos = function(pos) {
+ return {row: pos.row, column: pos.column};
+ };
+
+ this.pos = function(row, column) {
+ return {row: row, column: column};
+ };
+
+ 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;
+ } else {
+ position.row = Math.max(0, position.row);
+ position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
+ }
+ return position;
+ };
+ this.insertFullLines = function(row, lines) {
+ row = Math.min(Math.max(row, 0), this.getLength());
+ var column = 0;
+ if (row < this.getLength()) {
+ lines = lines.concat([""]);
+ column = 0;
+ } else {
+ lines = [""].concat(lines);
+ row--;
+ column = this.$lines[row].length;
+ }
+ this.insertMergedLines({row: row, column: column}, lines);
+ };
+ this.insertMergedLines = function(position, lines) {
+ var start = this.clippedPos(position.row, position.column);
+ var end = {
+ row: start.row + lines.length - 1,
+ column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
+ };
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "insert",
+ lines: lines
+ });
+
+ return this.clonePos(end);
+ };
+ this.remove = function(range) {
+ var start = this.clippedPos(range.start.row, range.start.column);
+ var end = this.clippedPos(range.end.row, range.end.column);
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ });
+ return this.clonePos(start);
+ };
+ this.removeInLine = function(row, startColumn, endColumn) {
+ var start = this.clippedPos(row, startColumn);
+ var end = this.clippedPos(row, endColumn);
+
+ this.applyDelta({
+ start: start,
+ end: end,
+ action: "remove",
+ lines: this.getLinesForRange({start: start, end: end})
+ }, true);
+
+ return this.clonePos(start);
+ };
+ this.removeFullLines = function(firstRow, lastRow) {
+ firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
+ lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
+ var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
+ var deleteLastNewLine = lastRow < this.getLength() - 1;
+ var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );
+ var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );
+ var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );
+ var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length );
+ var range = new Range(startRow, startCol, endRow, endCol);
+ var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
+
+ this.applyDelta({
+ start: range.start,
+ end: range.end,
+ action: "remove",
+ lines: this.getLinesForRange(range)
+ });
+ return deletedLines;
+ };
+ this.removeNewLine = function(row) {
+ if (row < this.getLength() - 1 && row >= 0) {
+ this.applyDelta({
+ start: this.pos(row, this.getLine(row).length),
+ end: this.pos(row + 1, 0),
+ action: "remove",
+ lines: ["", ""]
+ });
+ }
+ };
+ this.replace = function(range, text) {
+ if (!(range instanceof Range))
+ range = Range.fromPoints(range.start, range.end);
+ if (text.length === 0 && range.isEmpty())
+ return range.start;
+ if (text == this.getTextRange(range))
+ return range.end;
+
+ this.remove(range);
+ var end;
+ if (text) {
+ end = this.insert(range.start, text);
+ }
+ else {
+ end = range.start;
+ }
+
+ return end;
+ };
+ this.applyDeltas = function(deltas) {
+ for (var i=0; i<deltas.length; i++) {
+ this.applyDelta(deltas[i]);
+ }
+ };
+ this.revertDeltas = function(deltas) {
+ for (var i=deltas.length-1; i>=0; i--) {
+ this.revertDelta(deltas[i]);
+ }
+ };
+ this.applyDelta = function(delta, doNotValidate) {
+ var isInsert = delta.action == "insert";
+ if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
+ : !Range.comparePoints(delta.start, delta.end)) {
+ return;
+ }
+
+ if (isInsert && delta.lines.length > 20000)
+ this.$splitAndapplyLargeDelta(delta, 20000);
+ applyDelta(this.$lines, delta, doNotValidate);
+ this._signal("change", delta);
+ };
+
+ this.$splitAndapplyLargeDelta = function(delta, MAX) {
+ var lines = delta.lines;
+ var l = lines.length;
+ var row = delta.start.row;
+ var column = delta.start.column;
+ var from = 0, to = 0;
+ do {
+ from = to;
+ to += MAX - 1;
+ var chunk = lines.slice(from, to);
+ if (to > l) {
+ delta.lines = chunk;
+ delta.start.row = row + from;
+ delta.start.column = column;
+ break;
+ }
+ chunk.push("");
+ this.applyDelta({
+ start: this.pos(row + from, column),
+ end: this.pos(row + to, column = 0),
+ action: delta.action,
+ lines: chunk
+ }, true);
+ } while(true);
+ };
+ this.revertDelta = function(delta) {
+ this.applyDelta({
+ start: this.clonePos(delta.start),
+ end: this.clonePos(delta.end),
+ action: (delta.action == "insert" ? "remove" : "insert"),
+ lines: delta.lines.slice()
+ });
+ };
+ 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 + newlineLength;
+
+ return index + pos.column;
+ };
+
+}).call(Document.prototype);
+
+exports.Document = Document;
+});
+
+ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) {
+"use strict";
+
+exports.last = function(a) {
+ return a[a.length - 1];
+};
+
+exports.stringReverse = function(string) {
+ return string.split("").reverse().join("");
+};
+
+exports.stringRepeat = function (string, count) {
+ var result = '';
+ while (count > 0) {
+ if (count & 1)
+ result += string;
+
+ if (count >>= 1)
+ string += string;
+ }
+ return result;
+};
+
+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 deepCopy(obj) {
+ if (typeof obj !== "object" || !obj)
+ return obj;
+ var copy;
+ if (Array.isArray(obj)) {
+ copy = [];
+ for (var key = 0; key < obj.length; key++) {
+ copy[key] = deepCopy(obj[key]);
+ }
+ return copy;
+ }
+ if (Object.prototype.toString.call(obj) !== "[object Object]")
+ return obj;
+
+ copy = {};
+ for (var key in obj)
+ copy[key] = deepCopy(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;
+ };
+
+ deferred.isPending = function() {
+ return timer;
+ };
+
+ return deferred;
+};
+
+
+exports.delayedCall = function(fcn, defaultTimeout) {
+ var timer = null;
+ var callback = function() {
+ timer = null;
+ fcn();
+ };
+
+ var _self = function(timeout) {
+ if (timer == null)
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+
+ _self.delay = function(timeout) {
+ timer && clearTimeout(timer);
+ timer = setTimeout(callback, timeout || defaultTimeout);
+ };
+ _self.schedule = _self;
+
+ _self.call = function() {
+ this.cancel();
+ fcn();
+ };
+
+ _self.cancel = function() {
+ timer && clearTimeout(timer);
+ timer = null;
+ };
+
+ _self.isPending = function() {
+ return timer;
+ };
+
+ return _self;
+};
+});
+
+ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"], function(require, exports, module) {
+"use strict";
+
+var Range = require("../range").Range;
+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.delayedCall(this.onUpdate.bind(this));
+
+ var _self = this;
+ sender.on("change", function(e) {
+ var data = e.data;
+ if (data[0].start) {
+ doc.applyDeltas(data);
+ } else {
+ for (var i = 0; i < data.length; i += 2) {
+ if (Array.isArray(data[i+1])) {
+ var d = {action: "insert", start: data[i], lines: data[i+1]};
+ } else {
+ var d = {action: "remove", start: data[i], end: data[i+1]};
+ }
+ doc.applyDelta(d, true);
+ }
+ }
+ if (_self.$timeout)
+ return deferredUpdate.schedule(_self.$timeout);
+ _self.onUpdate();
+ });
+};
+
+(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() {
+ };
+
+ this.isPending = function() {
+ return this.deferredUpdate.isPending();
+ };
+
+}).call(Mirror.prototype);
+
+});
+
+ace.define("ace/mode/xquery/xqlint",["require","exports","module"], function(require, exports, module) {
+module.exports = (function outer (modules, cache, entry) {
+ var previousRequire = typeof require == "function" && require;
+ function newRequire(name, jumped){
+ if(!cache[name]) {
+ if(!modules[name]) {
+ var currentRequire = typeof require == "function" && require;
+ if (!jumped && currentRequire) return currentRequire(name, true);
+ if (previousRequire) return previousRequire(name, true);
+ var err = new Error('Cannot find module \'' + name + '\'');
+ err.code = 'MODULE_NOT_FOUND';
+ throw err;
+ }
+ var m = cache[name] = {exports:{}};
+ modules[name][0].call(m.exports, function(x){
+ var id = modules[name][1][x];
+ return newRequire(id ? id : x);
+ },m,m.exports,outer,modules,cache,entry);
+ }
+ return cache[name].exports;
+ }
+ for(var i=0;i<entry.length;i++) newRequire(entry[i]);
+ return newRequire(entry[0]);
+})
+({"/node_modules/xqlint/lib/compiler/errors.js":[function(_dereq_,module,exports){
+'use strict';
+
+var init = function(that, code, message, pos, type){
+ if(!code) {
+ throw new Error(type + ' code is missing.');
+ }
+
+ if(!message) {
+ throw new Error(type + ' message is missing.');
+ }
+
+ if(!pos) {
+ throw new Error(type + ' position is missing.');
+ }
+
+ that.getCode = function(){
+ return code;
+ };
+
+ that.getMessage = function(){
+ return message;
+ };
+
+ that.getPos = function(){
+ return pos;
+ };
+};
+
+var StaticError = {};
+var StaticWarning = {};
+StaticError.prototype = new Error();
+StaticWarning.prototype = new Error();
+
+exports.StaticError = StaticError.prototype.constructor = function(code, message, pos) {
+ init(this, code, message, pos, 'Error');
+};
+
+exports.StaticWarning = StaticWarning.prototype.constructor = function(code, message, pos) {
+ init(this, code, message, pos, 'Warning');
+};
+},{}],"/node_modules/xqlint/lib/compiler/handlers.js":[function(_dereq_,module,exports){
+'use strict';
+
+var TreeOps = _dereq_('../tree_ops').TreeOps;
+var Errors = _dereq_('./errors');
+var StaticWarning = Errors.StaticWarning;
+exports.ModuleDecl = function(translator, rootSctx, node){
+ var prefix = '';
+ return {
+ NCName: function(ncname){
+ prefix = TreeOps.flatten(ncname);
+ },
+
+ URILiteral: function(uri) {
+ uri = TreeOps.flatten(uri);
+ uri = uri.substring(1, uri.length - 1);
+ translator.apply(function(){
+ rootSctx.moduleNamespace = uri;
+ rootSctx.addNamespace(uri, prefix, node.pos, 'moduleDecl');
+ });
+ }
+ };
+};
+
+exports.ModuleImport = function(translator, rootSctx, node) {
+ var prefix = '';
+ var moduleURI;
+
+ return {
+ NCName: function(ncname){
+ prefix = TreeOps.flatten(ncname);
+ },
+
+ URILiteral: function(uri) {
+ if(moduleURI !== undefined) {
+ return;
+ }
+ uri = TreeOps.flatten(uri);
+ uri = uri.substring(1, uri.length - 1);
+ moduleURI = uri;
+ translator.apply(function(){
+ rootSctx.importModule(uri, prefix, node.pos);
+ });
+ }
+ };
+};
+
+exports.SchemaImport = function(translator, rootSctx, node) {
+ var prefix = '';
+ var schemaURI;
+
+ return {
+ SchemaPrefix: function(schemaPrefix) {
+ var SchemaPrefixHandler = function () {
+ this.NCName = function (ncname) {
+ prefix = TreeOps.flatten(ncname);
+ };
+ };
+ translator.visitChildren(schemaPrefix, new SchemaPrefixHandler());
+ },
+
+ URILiteral: function(uri) {
+ if(schemaURI !== undefined) {
+ return;
+ }
+ uri = TreeOps.flatten(uri);
+ uri = uri.substring(1, uri.length - 1);
+ schemaURI = uri;
+ translator.apply(function(){
+ rootSctx.addNamespace(uri, prefix, node.pos, 'schema');
+ });
+ }
+ };
+};
+
+exports.DefaultNamespaceDecl = function(translator, rootSctx, node) {
+ var fn = false;
+ var ns = '';
+
+ return {
+ TOKEN: function(token){
+ fn = fn ? true : (token.value === 'function');
+ },
+ URILiteral: function(uri){
+ ns = TreeOps.flatten(uri);
+ ns = ns.substring(1, ns.length - 1);
+ if(!fn) {
+ translator.apply(function(){
+ throw new StaticWarning('W06', 'Avoid default element namespace declarations.', node.pos);
+ });
+ rootSctx.defaultElementNamespace = ns;
+ } else {
+ rootSctx.defaultFunctionNamespace = ns;
+ }
+ }
+ };
+};
+
+exports.NamespaceDecl = function(translator, rootSctx, node) {
+ var prefix = '';
+ return {
+ NCName: function(ncname) {
+ prefix = TreeOps.flatten(ncname);
+ },
+ URILiteral: function(uri) {
+ uri = TreeOps.flatten(uri);
+ uri = uri.substring(1, uri.length - 1);
+ translator.apply(function(){
+ rootSctx.addNamespace(uri, prefix, node.pos, 'declare');
+ });
+ }
+ };
+};
+exports.VarHandler = function(translator, sctx, node){
+ var EQNameHandler = function(eqname){
+ var value = TreeOps.flatten(eqname);
+ translator.apply(function(){
+ var qname = sctx.resolveQName(value, eqname.pos);
+ sctx.addVariable(qname, node.name, eqname.pos);
+ });
+ };
+ return {
+ ExprSingle: function(){ return true; },
+ VarValue: function(){ return true; },
+ VarDefaultValue: function(){ return true; },
+ VarName: EQNameHandler,
+ EQName: EQNameHandler
+ };
+};
+
+exports.VarRefHandler = function(translator, sctx, node){
+ return {
+ VarName: function(eqname){
+ var value = TreeOps.flatten(eqname);
+ translator.apply(function(){
+ var qname = sctx.resolveQName(value, node.pos);
+ if(qname.uri !== '') {
+ sctx.root.namespaces[qname.uri].used = true;
+ }
+ sctx.addVarRef(qname, eqname.pos);
+ });
+ }
+ };
+};
+},{"../tree_ops":"/node_modules/xqlint/lib/tree_ops.js","./errors":"/node_modules/xqlint/lib/compiler/errors.js"}],"/node_modules/xqlint/lib/compiler/schema_built-in_types.js":[function(_dereq_,module,exports){
+'use strict';
+exports.getSchemaBuiltinTypes = function(){
+ var ns = 'http://www.w3.org/2001/XMLSchema';
+ var SchemaBuiltinTypes = {};
+ SchemaBuiltinTypes[ns] = {
+ variables: {},
+ functions: {}
+ };
+ SchemaBuiltinTypes[ns].functions[ns + '#string#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'string', arity: 1, eqname: { uri: ns, name: 'string' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#boolean#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'boolean', arity: 1, eqname: { uri: ns, name: 'boolean' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#decimal#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'decimal', arity: 1, eqname: { uri: ns, name: 'decimal' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#float#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'float', arity: 1, eqname: { uri: ns, name: 'float' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#double#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'double', arity: 1, eqname: { uri: ns, name: 'double' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#duration#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'duration', arity: 1, eqname: { uri: ns, name: 'duration' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#dateTime#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'dateTime', arity: 1, eqname: { uri: ns, name: 'dateTime' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#time#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'time', arity: 1, eqname: { uri: ns, name: 'time' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#date#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'date', arity: 1, eqname: { uri: ns, name: 'date' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#gYearMonth#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'gYearMonth', arity: 1, eqname: { uri: ns, name: 'gYearMonth' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#gYear#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'gYear', arity: 1, eqname: { uri: ns, name: 'gYear' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#gMonthDay#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'gMonthDay', arity: 1, eqname: { uri: ns, name: 'gMonthDay' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#gDay#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'gDay', arity: 1, eqname: { uri: ns, name: 'gDay' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#gMonth#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'gMonth', arity: 1, eqname: { uri: ns, name: 'gMonth' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#hexBinary#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'hexBinary', arity: 1, eqname: { uri: ns, name: 'hexBinary' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#base64Binary#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'base64Binary', arity: 1, eqname: { uri: ns, name: 'base64Binary' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#anyURI#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'anyURI', arity: 1, eqname: { uri: ns, name: 'anyURI' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#QName#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'QName', arity: 1, eqname: { uri: ns, name: 'QName' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#normalizedString#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'normalizedString', arity: 1, eqname: { uri: ns, name: 'normalizedString' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#token#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'token', arity: 1, eqname: { uri: ns, name: 'token' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#language#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'language', arity: 1, eqname: { uri: ns, name: 'language' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#NMTOKEN#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'NMTOKEN', arity: 1, eqname: { uri: ns, name: 'NMTOKEN' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#Name#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'Name', arity: 1, eqname: { uri: ns, name: 'Name' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#NCName#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'NCName', arity: 1, eqname: { uri: ns, name: 'NCName' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#ID#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'ID', arity: 1, eqname: { uri: ns, name: 'ID' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#IDREF#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'IDREF', arity: 1, eqname: { uri: ns, name: 'IDREF' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#ENTITY#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'ENTITY', arity: 1, eqname: { uri: ns, name: 'ENTITY' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#integer#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'integer', arity: 1, eqname: { uri: ns, name: 'integer' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#nonPositiveInteger#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'nonPositiveInteger', arity: 1, eqname: { uri: ns, name: 'nonPositiveInteger' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#negativeInteger#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'negativeInteger', arity: 1, eqname: { uri: ns, name: 'negativeInteger' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#long#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'long', arity: 1, eqname: { uri: ns, name: 'long' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#int#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'int', arity: 1, eqname: { uri: ns, name: 'int' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#short#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'short', arity: 1, eqname: { uri: ns, name: 'short' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#byte#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'byte', arity: 1, eqname: { uri: ns, name: 'byte' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#nonNegativeInteger#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'nonNegativeInteger', arity: 1, eqname: { uri: ns, name: 'nonNegativeInteger' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#unsignedLong#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'unsignedLong', arity: 1, eqname: { uri: ns, name: 'unsignedLong' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#unsignedInt#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'unsignedInt', arity: 1, eqname: { uri: ns, name: 'unsignedInt' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#unsignedShort#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'unsignedShort', arity: 1, eqname: { uri: ns, name: 'unsignedShort' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#unsignedByte#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'unsignedByte', arity: 1, eqname: { uri: ns, name: 'unsignedByte' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#positiveInteger#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'positiveInteger', arity: 1, eqname: { uri: ns, name: 'positiveInteger' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#yearMonthDuration#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'yearMonthDuration', arity: 1, eqname: { uri: ns, name: 'yearMonthDuration' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#dayTimeDuration#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'dayTimeDuration', arity: 1, eqname: { uri: ns, name: 'dayTimeDuration' } };
+ SchemaBuiltinTypes[ns].functions[ns + '#untypedAtomic#1'] = { params: ['$arg as xs:anyAtomicType?'], annotations: [], name: 'untypedAtomic', arity: 1, eqname: { uri: ns, name: 'untypedAtomic' } };
+ return SchemaBuiltinTypes;
+};
+},{}],"/node_modules/xqlint/lib/compiler/static_context.js":[function(_dereq_,module,exports){
+exports.StaticContext = function (parent, pos) {
+ 'use strict';
+
+ var TreeOps = _dereq_('../tree_ops').TreeOps;
+
+ var Errors = _dereq_('./errors');
+ var StaticError = Errors.StaticError;
+ var StaticWarning = Errors.StaticWarning;
+
+ var getSchemaBuiltinTypes = _dereq_('./schema_built-in_types').getSchemaBuiltinTypes;
+
+ var emptyPos = { sl:0, sc: 0, el: 0, ec: 0 };
+ var namespaces = {};
+
+ var getVarKey = function(qname) {
+ return qname.uri + '#' + qname.name;
+ };
+
+ var getFnKey = function(qname, arity) {
+ return getVarKey(qname) + '#' + arity;
+ };
+
+ if(!parent) {
+ namespaces['http://jsoniq.org/functions'] = {
+ prefixes: ['jn'],
+ pos: emptyPos,
+ type: 'module',
+ override: true
+ };
+ namespaces['http://www.28msec.com/modules/collections'] = {
+ prefixes: ['db'],
+ pos: emptyPos,
+ type: 'module',
+ override: true
+ };
+ namespaces['http://www.28msec.com/modules/store'] = {
+ prefixes: ['store'],
+ pos: emptyPos,
+ type: 'module',
+ override: true
+ };
+ namespaces['http://jsoniq.org/function-library'] = {
+ prefixes: ['libjn'],
+ pos: emptyPos,
+ type: 'module',
+ override: true
+ };
+ namespaces['http://www.w3.org/2005/xpath-functions'] = {
+ prefixes: ['fn'],
+ pos: emptyPos,
+ type: 'module',
+ override: true
+ };
+ namespaces['http://www.w3.org/2005/xquery-local-functions'] = {
+ prefixes: ['local'],
+ pos: emptyPos,
+ type: 'declare',
+ override: true
+ };
+ namespaces['http://www.w3.org/2001/XMLSchema-instance'] = {
+ prefixes: ['xsi'],
+ pos: emptyPos,
+ type: 'declare'
+ };
+ namespaces['http://www.w3.org/2001/XMLSchema'] = {
+ prefixes: ['xs'],
+ pos: emptyPos,
+ type: 'declare'
+ };
+ namespaces['http://www.w3.org/XML/1998/namespace'] = {
+ prefixes: ['xml'],
+ pos: emptyPos,
+ type: 'declare'
+ };
+ namespaces['http://zorba.io/annotations'] = {
+ prefixes: ['an'],
+ pos: emptyPos,
+ type: 'declare',
+ override: true
+ };
+ namespaces['http://www.28msec.com/annotations/rest'] = {
+ prefixes: ['rest'],
+ pos: emptyPos,
+ type: 'declare',
+ override: true
+ };
+ namespaces['http://www.w3.org/2005/xqt-errors'] = {
+ prefixes: ['err'],
+ pos: emptyPos,
+ type: 'declare',
+ override: true
+ };
+ namespaces['http://zorba.io/errors'] = {
+ prefixes: ['zerr'],
+ pos: emptyPos,
+ type: 'declare',
+ override: true
+ };
+ }
+
+ var s = {
+ parent: parent,
+ children: [],
+ pos: pos,
+ setModuleResolver: function(resolver){
+ this.root.moduleResolver = resolver;
+ return this;
+ },
+ setModules: function(index){
+ if(this !== this.root){
+ throw new Error('setModules() not invoked from the root static context.');
+ }
+ this.moduleResolver = function(uri){
+ return index[uri];
+ };
+ var that = this;
+ Object.keys(this.namespaces).forEach(function(uri){
+ var ns = that.namespaces[uri];
+ if(ns.type === 'module') {
+ var mod = that.moduleResolver(uri);
+ if(mod.variables) {
+ TreeOps.concat(that.variables, mod.variables);
+ }
+ if(mod.functions) {
+ TreeOps.concat(that.functions, mod.functions);
+ }
+ }
+ });
+ return this;
+ },
+ setModulesFromXQDoc: function(xqdoc){
+ if(this !== this.root){
+ throw new Error('setModulesFromXQDoc() not invoked from the root static context.');
+ }
+ var index = {};
+ Object.keys(xqdoc).forEach(function(uri) {
+ var mod = xqdoc[uri];
+ var variables = {};
+ var functions = {};
+ mod.functions.forEach(function(fn){
+ functions[uri + '#' + fn.name + '#' + fn.arity] = {
+ params: [],
+ annotations: [],
+ name: fn.name,
+ arity: fn.arity,
+ eqname: { uri: uri, name: fn.name }
+ };
+ fn.parameters.forEach(function(param){
+ functions[uri + '#' + fn.name + '#' + fn.arity].params.push('$' + param.name);
+ });
+ });
+ mod.variables.forEach(function(variable){
+ var name = variable.name.substring(variable.name.indexOf(':') + 1);
+ variables[uri + '#' + name] = { type: 'VarDecl', annotations: [], eqname: { uri: uri, name: name } };
+ });
+ index[uri] = {
+ variables: variables,
+ functions: functions
+ };
+ });
+ this.root.moduleResolver = function(uri){
+ return index[uri];
+ };
+ var that = this;
+ Object.keys(this.namespaces).forEach(function(uri){
+ var ns = that.namespaces[uri];
+ if(ns.type === 'module') {
+ var mod = that.moduleResolver(uri);
+ if(mod.variables) {
+ TreeOps.concat(that.variables, mod.variables);
+ }
+ if(mod.functions) {
+ TreeOps.concat(that.functions, mod.functions);
+ }
+ }
+ });
+ return this;
+ },
+ moduleNamespace: '',
+ description: '',
+ defaultFunctionNamespace: 'http://www.w3.org/2005/xpath-functions',
+ defaultFunctionNamespaces: [
+ 'http://www.28msec.com/modules/collections',
+ 'http://www.28msec.com/modules/store',
+ 'http://jsoniq.org/functions',
+ 'http://jsoniq.org/function-library',
+ 'http://www.w3.org/2001/XMLSchema' //Built-in type constructors
+ ],
+ defaultElementNamespace: '',
+ namespaces: namespaces,
+ availableModuleNamespaces: [],
+ importModule: function(uri, prefix, pos) {
+ if(this !== this.root){
+ throw new Error('Function not invoked from the root static context.');
+ }
+ this.addNamespace(uri, prefix, pos, 'module');
+ if(this.moduleResolver) {
+ try {
+ var mod = this.moduleResolver(uri, []);
+ if(mod.variables) {
+ TreeOps.concat(this.variables, mod.variables);
+ }
+ if(mod.functions) {
+ TreeOps.concat(this.functions, mod.functions);
+ }
+ } catch(e) {
+ throw new StaticError('XQST0059', 'module "' + uri + '" not found', pos);
+ }
+ }
+ return this;
+ },
+
+ getAvailableModuleNamespaces: function(){
+ return this.root.availableModuleNamespaces;
+ },
+
+ getPrefixesByNamespace: function(uri){
+ return this.root.namespaces[uri].prefixes;
+ },
+
+ addNamespace: function (uri, prefix, pos, type) {
+ if(prefix === '' && type === 'module') {
+ throw new StaticWarning('W01', 'Avoid this type of import. Use import module namespace instead', pos);
+ }
+ if (uri === '') {
+ throw new StaticError('XQST0088', 'empty target namespace in module import or module declaration', pos);
+ }
+ var namespace = this.getNamespace(uri);
+ if (namespace && namespace.type === type && type !== 'declare' && !namespace.override) {
+ throw new StaticError('XQST0047', '"' + uri + '": duplicate target namespace', pos);
+ }
+ namespace = this.getNamespaceByPrefix(prefix);
+ if (namespace && !namespace.override) {
+ throw new StaticError('XQST0033', '"' + prefix + '": namespace prefix already bound to "' + namespace.uri + '"', pos);
+ }
+
+ namespace = this.namespaces[uri];
+ var prefixes = [prefix];
+ if(namespace) {
+ prefixes = prefixes.concat(this.namespaces[uri].prefixes);
+ }
+ this.namespaces[uri] = {
+ prefixes: prefixes,
+ pos: pos,
+ type: type
+ };
+
+ if (namespace) {
+ throw new StaticWarning('W02', '"' + uri + '" already bound to the "' + namespace.prefixes.join(', ') + '" prefix', pos);
+ }
+
+ },
+
+ getNamespaces: function(){
+ return this.root.namespaces;
+ },
+
+ getNamespace: function (uri) {
+ var that = this;
+ while (that) {
+ var namespace = that.namespaces[uri];
+ if (namespace) {
+ return namespace;
+ }
+ that = that.parent;
+ }
+
+ },
+
+ getNamespaceByPrefix: function (prefix) {
+ var found = [];
+ var handler = function (uri) {
+ var namespace = that.namespaces[uri];
+ if (namespace.prefixes.indexOf(prefix) !== -1) {
+ namespace.uri = uri;
+ found.push(namespace);
+ }
+ };
+ var that = this;
+ while (that) {
+ Object.keys(that.namespaces).forEach(handler);
+ that = that.parent;
+ }
+ var result;
+ found.forEach(function(ns){
+ if(ns.type === 'moduleDecl') {
+ result = ns;
+ }
+ });
+ if(result) {
+ return result;
+ } else {
+ return found[0];
+ }
+ },
+
+ resolveQName: function(value, pos){
+ var qname = {
+ uri: '',
+ prefix: '',
+ name: ''
+ };
+ var idx;
+ if (value.substring(0, 2) === 'Q{') {
+ idx = value.indexOf('}');
+ qname.uri = value.substring(2, idx);
+ qname.name = value.substring(idx + 1);
+ } else {
+ idx = value.indexOf(':');
+ qname.prefix = value.substring(0, idx);
+ var namespace = this.getNamespaceByPrefix(qname.prefix);
+ if(!namespace && qname.prefix !== '' && ['fn', 'jn'].indexOf(qname.prefix) === -1) {
+ throw new StaticError('XPST0081', '"' + qname.prefix + '": can not expand prefix of lexical QName to namespace URI', pos);
+ }
+ if(namespace) {
+ qname.uri = namespace.uri;
+ }
+ qname.name = value.substring(idx + 1);
+ }
+ return qname;
+ },
+
+ variables: {},
+ varRefs: {},
+ functionCalls: {},
+
+ addVariable: function(qname, type, pos){
+ if(
+ type === 'VarDecl' && this.moduleNamespace !== '' &&
+ !(this.moduleNamespace === qname.uri || qname.uri === '')
+ ) {
+ throw new StaticError('XQST0048', '"' + qname.prefix + ':' + qname.name + '": Qname not library namespace', pos);
+ }
+ var key = getVarKey(qname);
+ if(type === 'VarDecl' && this.variables[key]) {
+ throw new StaticError('XQST0049', '"' + qname.name + '": duplicate variable declaration', pos);
+ }
+ this.variables[key] = {
+ type: type,
+ pos: pos,
+ qname: qname,
+ annotations: {}
+ };
+ return this;
+ },
+
+ getVariables: function(){
+ var variables = {};
+ var that = this;
+ var handler = function(key){
+ if(!variables[key]){
+ variables[key] = that.variables[key];
+ }
+ };
+ while(that){
+ Object.keys(that.variables).forEach(handler);
+ that = that.parent;
+ }
+ return variables;
+ },
+
+ getVariable: function(qname) {
+ var key = getVarKey(qname);
+ var that = this;
+ while(that) {
+ if(that.variables[key]) {
+ return that.variables[key];
+ }
+ that = that.parent;
+ }
+ },
+
+ addVarRef: function(qname, pos){
+ var varDecl = this.getVariable(qname);
+ if(!varDecl && (qname.uri === '' || this.root.moduleResolver)) {
+ throw new StaticError('XPST0008', '"' + qname.name + '": undeclared variable', pos);
+ }
+ var key = getVarKey(qname);
+ this.varRefs[key] = true;
+ },
+
+ addFunctionCall: function(qname, arity, pos){
+ var fn = this.getFunction(qname, arity);
+ if(!fn && (qname.uri === 'http://www.w3.org/2005/xquery-local-functions' || this.root.moduleResolver)){
+ if((qname.uri === 'http://www.w3.org/2005/xpath-functions' ||
+ (qname.uri === '' && this.root.defaultFunctionNamespaces.concat(this.root.defaultFunctionNamespace).indexOf('http://www.w3.org/2005/xpath-functions') !== -1)) && qname.name === 'concat') {
+ } else if(!fn){
+ throw new StaticError('XPST0008', '"' + qname.name + '#' + arity + '": undeclared function', pos);
+ }
+ }
+ var key = getFnKey(qname, arity);
+ this.functionCalls[key] = true;
+ },
+
+ functions: getSchemaBuiltinTypes()['http://www.w3.org/2001/XMLSchema'].functions,
+
+ getFunctions: function(){
+ return this.root.functions;
+ },
+
+ getFunction: function(qname, arity){
+ var key = getFnKey(qname, arity);
+ var fn;
+ if(qname.uri === '') {
+ var that = this;
+ this.root.defaultFunctionNamespaces.concat([this.root.defaultFunctionNamespace]).forEach(function(defaultFunctionNamespace){
+ if(!fn){
+ fn = that.getFunction({ uri: defaultFunctionNamespace, prefix: qname.prefix, name: qname.name }, arity);
+ } else {
+ return false;
+ }
+ });
+ return fn;
+ } else {
+ return this.root.functions[key];
+ }
+ },
+
+ addFunction: function(qname, pos, params) {
+ if(this !== this.root){
+ throw new Error('addFunction() not invoked from the root static context.');
+ }
+ var arity = params.length;
+ if(
+ this.moduleNamespace !== '' &&
+ !(this.moduleNamespace === qname.uri || (qname.uri === '' && this.defaultFunctionNamespace === this.moduleNamespace))
+ ) {
+ throw new StaticError('XQST0048', '"' + qname.prefix + ':' + qname.name + '": Qname not library namespace', pos);
+ }
+ var key = getFnKey(qname, arity);
+ if(this.functions[key]) {
+ throw new StaticError('XQST0034', '"' + qname.name + '": duplicate function declaration', pos);
+ }
+ this.functions[key] = {
+ pos: pos,
+ params: params
+ };
+ return this;
+ }
+
+ };
+ s.root = parent ? parent.root : s;
+ return s;
+};
+
+},{"../tree_ops":"/node_modules/xqlint/lib/tree_ops.js","./errors":"/node_modules/xqlint/lib/compiler/errors.js","./schema_built-in_types":"/node_modules/xqlint/lib/compiler/schema_built-in_types.js"}],"/node_modules/xqlint/lib/compiler/translator.js":[function(_dereq_,module,exports){
+exports.Translator = function(rootStcx, ast){
+ 'use strict';
+
+ var Errors = _dereq_('./errors');
+ var StaticError = Errors.StaticError;
+ var StaticWarning = Errors.StaticWarning;
+
+ var TreeOps = _dereq_('../tree_ops').TreeOps;
+ var StaticContext = _dereq_('./static_context').StaticContext;
+ var Handlers = _dereq_('./handlers');
+
+ var get = function(node, path){
+ var result = [];
+ if(path.length === 0){
+ return node;
+ }
+ node.children.forEach(function(child){
+ if(child.name === path[0] && path.length > 1) {
+ result = get(child, path.slice(1));
+ } else if(child.name === path[0]) {
+ result.push(child);
+ }
+ });
+ return result;
+ };
+
+ var markers = [];
+ this.apply = function(fn) {
+ try {
+ fn();
+ } catch(e) {
+ if(e instanceof StaticError) {
+ addStaticError(e);
+ } else if(e instanceof StaticWarning) {
+ addWarning(e.getCode(), e.getMessage(), e.getPos());
+ } else {
+ throw e;
+ }
+ }
+ };
+
+ var addStaticError = function(e){
+ markers.push({
+ pos: e.getPos(),
+ type: 'error',
+ level: 'error',
+ message: '[' + e.getCode() + '] ' + e.getMessage()
+ });
+ };
+
+ var addWarning = function(code, message, pos) {
+ markers.push({
+ pos: pos,
+ type: 'warning',
+ level: 'warning',
+ message: '[' + code + '] ' + message
+ });
+ };
+
+ this.getMarkers = function(){
+ return markers;
+ };
+
+ var translator = this;
+
+ rootStcx.pos = ast.pos;
+ var sctx = rootStcx;
+ var pushSctx = function(pos){
+ sctx = new StaticContext(sctx, pos);
+ sctx.parent.children.push(sctx);
+ };
+
+ var popSctx = function(pos){
+ if (pos !== undefined) {
+ sctx.pos.el = pos.el;
+ sctx.pos.ec = pos.ec;
+ }
+
+ Object.keys(sctx.varRefs).forEach(function(key){
+ if(!sctx.variables[key]) {
+ sctx.parent.varRefs[key] = true;
+ }
+ });
+ Object.keys(sctx.variables).forEach(function(key){
+ if(!sctx.varRefs[key] && sctx.variables[key].type !== 'GroupingVariable' && sctx.variables[key].type !== 'CatchVar') {
+ addWarning('W03', 'Unused variable "$' + sctx.variables[key].qname.name + '"', sctx.variables[key].pos);
+ }
+ });
+
+ sctx = sctx.parent;
+ };
+
+ this.visitOnly = function(node, names) {
+ node.children.forEach(function(child){
+ if (names.indexOf(child.name) !== -1){
+ translator.visit(child);
+ }
+ });
+ };
+
+ this.getFirstChild = function(node, name) {
+ var result;
+ node.children.forEach(function(child){
+ if(child.name === name && result === undefined){
+ result = child;
+ }
+ });
+ return result;
+ };
+
+ this.XQuery = function(node) {
+ rootStcx.description = node.comment ? node.comment.description : undefined;
+ };
+
+ this.ModuleDecl = function(node){
+ this.visitChildren(node, Handlers.ModuleDecl(translator, rootStcx, node));
+ return true;
+ };
+
+ this.Prolog = function(node){
+ this.visitOnly(node, ['DefaultNamespaceDecl', 'Setter', 'NamespaceDecl', 'Import']);
+ ast.index.forEach(function(node){
+ if(node.name === 'VarDecl') {
+ node.children.forEach(function(child){
+ if(child.name === 'VarName') {
+ translator.apply(function(){
+ var value = TreeOps.flatten(child);
+ var qname = rootStcx.resolveQName(value, child.pos);
+ rootStcx.addVariable(qname, node.name, child.pos);
+ });
+ }
+ });
+ } else if(node.name === 'FunctionDecl') {
+ var qname, pos, params = [];
+ node.children.forEach(function(child){
+ if(child.name === 'EQName') {
+ qname = child;
+ pos = child.pos;
+ } else if(child.name === 'ParamList'){
+ child.children.forEach(function(c){
+ if(c.name === 'Param') {
+ params.push(TreeOps.flatten(c));
+ }
+ });
+ }
+ });
+ translator.apply(function(){
+ qname = TreeOps.flatten(qname);
+ qname = rootStcx.resolveQName(qname, pos);
+ rootStcx.addFunction(qname, pos, params);
+ });
+ }
+ });
+ this.visitOnly(node, ['ContextItemDecl', 'AnnotatedDecl', 'OptionDecl']);
+ return true;
+ };
+
+ this.ModuleImport = function (node) {
+ this.visitChildren(node, Handlers.ModuleImport(translator, rootStcx, node));
+ return true;
+ };
+
+ this.SchemaImport = function (node) {
+ this.visitChildren(node, Handlers.SchemaImport(translator, rootStcx, node));
+ return true;
+ };
+
+ this.DefaultNamespaceDecl = function(node){
+ this.visitChildren(node, Handlers.DefaultNamespaceDecl(translator, rootStcx, node));
+ return true;
+ };
+
+ this.NamespaceDecl = function (node) {
+ this.visitChildren(node, Handlers.NamespaceDecl(translator, rootStcx, node));
+ return true;
+ };
+
+ var annotations = {};
+ this.AnnotatedDecl = function(node) {
+ annotations = {};
+ this.visitChildren(node, Handlers.NamespaceDecl(translator, rootStcx, node));
+ return true;
+ };
+
+ this.CompatibilityAnnotation = function(){
+ annotations['http://www.w3.org/2012/xquery#updating'] = [];
+ return true;
+ };
+
+ this.Annotation = function(node){
+ this.visitChildren(node, {
+ EQName: function(eqname){
+ var value = TreeOps.flatten(eqname);
+ translator.apply(function(){
+ var qname = sctx.resolveQName(value, eqname.pos);
+ annotations[qname.uri + '#' + qname.name] = [];
+ });
+ }
+ });
+ return true;
+ };
+
+ this.VarDecl = function(node){
+ try {
+ var varname = translator.getFirstChild(node, 'VarName');
+ var value = TreeOps.flatten(varname);
+ var qname = sctx.resolveQName(value, varname.pos);
+ var variable = rootStcx.getVariable(qname);
+ if(variable) {
+ variable.annotations = annotations;
+ variable.description = node.getParent.comment ? node.getParent.comment.description : undefined;
+ variable.type = TreeOps.flatten(get(node, ['TypeDeclaration'])[0]).substring(2).trim();
+ var last = variable.type.substring(variable.type.length - 1);
+ if(last === '?') {
+ variable.occurrence = 0;
+ variable.type = variable.type.substring(0, variable.type.length - 1);
+ } else if(last === '*') {
+ variable.occurrence = -1;
+ variable.type = variable.type.substring(0, variable.type.length - 1);
+ } else if(last === '+') {
+ variable.occurrence = 2;
+ variable.type = variable.type.substring(0, variable.type.length - 1);
+ } else {
+ variable.occurrence = 1;
+ }
+ }
+ } catch(e) {
+ }
+ this.visitOnly(node, ['ExprSingle', 'VarValue', 'VarDefaultValue']);
+ return true;
+ };
+
+ this.FunctionDecl = function(node) {
+ var isUpdating = annotations['http://www.w3.org/2012/xquery#updating'] !== undefined;
+ var typeDecl = get(node, ['ReturnType'])[0];
+ var name = get(node, ['EQName'])[0];
+ if(!typeDecl && !isUpdating){
+ addWarning('W05', 'Untyped return value', name.pos);
+ }
+ var isExternal = false;
+ node.children.forEach(function(child){
+ if(child.name === 'TOKEN' && child.value === 'external') {
+ isExternal = true;
+ return false;
+ }
+ });
+ if(!isExternal) {
+ pushSctx(node.pos);
+ this.visitChildren(node);
+ popSctx();
+ }
+ return true;
+ };
+
+ this.VarRef = function(node) {
+ this.visitChildren(node, Handlers.VarRefHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.Param = function(node){
+ var typeDecl = get(node, ['TypeDeclaration'])[0];
+ if(!typeDecl){
+ addWarning('W05', 'Untyped function parameter', node.pos);
+ }
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.InlineFunctionExpr = function(node) {
+ pushSctx(node.pos);
+ this.visitChildren(node);
+ popSctx();
+ return true;
+ };
+ var statementCount = [];
+ var handleStatements = function(node) {
+ pushSctx(node.pos);
+ statementCount.push(0);
+ translator.visitChildren(node);
+ for (var i = 1; i <= statementCount[statementCount.length - 1]; i++) {
+ popSctx(node.pos);
+ }
+ statementCount.pop();
+ popSctx();
+ };
+
+ this.StatementsAndOptionalExpr = function (node) {
+ handleStatements(node);
+ return true;
+ };
+
+ this.StatementsAndExpr = function (node) {
+ handleStatements(node);
+ return true;
+ };
+
+ this.BlockStatement = function (node) {
+ handleStatements(node);
+ return true;
+ };
+
+ this.VarDeclStatement = function(node){
+ pushSctx(node.pos);
+ statementCount[statementCount.length - 1]++;
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ };
+ var clauses = [];
+ this.FLWORExpr = this.FLWORStatement = function (node) {
+ pushSctx(node.pos);
+ clauses.push(0);
+ this.visitChildren(node);
+ for(var i=1; i <= clauses[clauses.length - 1]; i++) {
+ popSctx(node.pos);
+ }
+ clauses.pop();
+ popSctx();
+ return true;
+ };
+
+ this.ForBinding = function (node) {
+ this.visitOnly(node, ['ExprSingle', 'VarValue', 'VarDefaultValue']);
+ pushSctx(node.pos);
+ clauses[clauses.length - 1]++;
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.LetBinding = function(node){
+ this.visitOnly(node, ['ExprSingle', 'VarValue', 'VarDefaultValue']);
+ pushSctx(node.pos);
+ clauses[clauses.length - 1]++;
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.GroupingSpec = function(node){
+ var isVarDecl = false;
+ node.children.forEach(function(child){
+ if(child.value === ':=') {
+ isVarDecl = true;
+ return false;
+ }
+ });
+ if(isVarDecl) {
+ var groupingVariable = node.children[0];
+ this.visitOnly(node, ['ExprSingle', 'VarValue', 'VarDefaultValue']);
+ pushSctx(node.pos);
+ clauses[clauses.length - 1]++;
+ this.visitChildren(groupingVariable, Handlers.VarHandler(translator, sctx, groupingVariable));
+ return true;
+ } else {
+
+ }
+ };
+
+ this.TumblingWindowClause = function (node) {
+ this.visitOnly(node, ['ExprSingle']);
+ pushSctx(node.pos);
+ clauses[clauses.length - 1]++;
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ this.visitOnly(node, ['WindowStartCondition', 'WindowEndCondition']);
+ return true;
+ };
+
+ this.WindowVars = function (node) {
+ pushSctx(node.pos);
+ clauses[clauses.length - 1]++;
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.SlidingWindowClause = function (node) {
+ this.visitOnly(node, ['ExprSingle', 'VarValue', 'VarDefaultValue']);
+ pushSctx(node.pos);
+ clauses[clauses.length - 1]++;
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ this.visitOnly(node, ['WindowStartCondition', 'WindowEndCondition']);
+ return true;
+ };
+
+ this.PositionalVar = function (node) {
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.PositionalVar = function (node) {
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.CurrentItem = function (node) {
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.PreviousItem = function (node) {
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.NextItem = function (node) {
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.CountClause = function (node) {
+ pushSctx(node.pos);
+ clauses[clauses.length - 1]++;
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.CaseClause = function(node) {
+ pushSctx(node.pos);
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ this.visitOnly(node, ['ExprSingle']);
+ popSctx();
+ return true;
+ };
+ var copies = [];
+ this.TransformExpr = function (node) {
+ pushSctx(node.pos);
+ copies.push(0);
+ this.visitChildren(node);
+ for(var i=1; i <= copies[copies.length - 1]; i++) {
+ popSctx(node.pos);
+ }
+ copies.pop();
+ popSctx();
+ return true;
+ };
+
+ this.TransformSpec = function(node) {
+ this.visitOnly(node, ['ExprSingle']);
+ pushSctx(node.pos);
+ copies[copies.length-1] += 1;
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+ var quantifiedDecls = [];
+ this.QuantifiedExpr = function (node) {
+ pushSctx(node.pos);
+ quantifiedDecls.push(0);
+ this.visitChildren(node);
+ for(var i=1; i <= quantifiedDecls[quantifiedDecls.length - 1]; i++) {
+ popSctx(node.pos);
+ }
+ quantifiedDecls.pop();
+ popSctx();
+ return true;
+ };
+
+ this.QuantifiedVarDecl = function(node) {
+ this.visitOnly(node, ['ExprSingle']);
+ pushSctx(node.pos);
+ quantifiedDecls[quantifiedDecls.length - 1]++;
+ this.visitChildren(node, Handlers.VarHandler(translator, sctx, node));
+ return true;
+ };
+
+ this.FunctionCall = function(node){
+ this.visitOnly(node, ['ArgumentList']);
+ var name = translator.getFirstChild(node, 'EQName');
+ var eqname = TreeOps.flatten(name);
+ var arity = get(node, ['ArgumentList', 'Argument']).length;
+ translator.apply(function(){
+ var qname = sctx.resolveQName(eqname, node.pos);
+ try {
+ if(qname.uri !== '') {
+ sctx.root.namespaces[qname.uri].used = true;
+ }
+ } catch(e){
+ }
+ sctx.addFunctionCall(qname, arity, name.pos);
+ });
+ return true;
+ };
+
+ this.TryClause = function(node){
+ pushSctx(node.pos);
+ this.visitChildren(node);
+ popSctx();
+ return true;
+ };
+
+ this.CatchClause = function(node){
+ pushSctx(node.pos);
+ var prefix = 'err';
+ var uri = 'http://www.w3.org/2005/xqt-errors';
+ var emptyPos = { sl: 0, sc: 0, el: 0, ec: 0 };
+ sctx.addVariable({ prefix: prefix, uri: uri, name: 'code' }, 'CatchVar', emptyPos);
+ sctx.addVariable({ prefix: prefix, uri: uri, name: 'description' }, 'CatchVar', emptyPos);
+ sctx.addVariable({ prefix: prefix, uri: uri, name: 'value' }, 'CatchVar', emptyPos);
+ sctx.addVariable({ prefix: prefix, uri: uri, name: 'module' }, 'CatchVar', emptyPos);
+ sctx.addVariable({ prefix: prefix, uri: uri, name: 'line-number' }, 'CatchVar', emptyPos);
+ sctx.addVariable({ prefix: prefix, uri: uri, name: 'column-number' }, 'CatchVar', emptyPos);
+ sctx.addVariable({ prefix: prefix, uri: uri, name: 'additional' }, 'CatchVar', emptyPos);
+ this.visitChildren(node);
+ popSctx();
+ return true;
+ };
+
+ this.Pragma = function(node){
+ var qname = TreeOps.flatten(get(node, ['EQName'])[0]);
+ qname = rootStcx.resolveQName(qname, node);
+ var value = TreeOps.flatten(get(node, ['PragmaContents'])[0]);
+ if (qname.name === 'xqlint' && qname.uri === 'http://xqlint.io') {
+ pushSctx(node.pos);
+ var commands = value.match(/[a-zA-Z]+\(([^)]+)\)/g);
+ commands.forEach(function (command) {
+ var name = command.substring(0, command.indexOf('('));
+ var args = command.substring(0, command.length - 1).substring(command.indexOf('(') + 1).split(',').map(function (val) {
+ return val.trim();
+ });
+ if (name === 'varrefs') {
+ args.forEach(function (arg) {
+ var qname = sctx.resolveQName(arg.substring(1), node.pos);
+ if (qname.uri !== '') {
+ sctx.root.namespaces[qname.uri].used = true;
+ }
+ sctx.addVarRef(qname, node.pos);
+ });
+ }
+ });
+ this.visitChildren(node);
+ popSctx();
+ return true;
+ }
+ };
+
+ this.visit = function (node) {
+ var name = node.name;
+ var skip = false;
+
+ if (typeof this[name] === 'function') {
+ skip = this[name](node) === true;
+ }
+
+ if (!skip) {
+ this.visitChildren(node);
+ }
+ };
+
+ this.visitChildren = function (node, handler) {
+ for (var i = 0; i < node.children.length; i++) {
+ var child = node.children[i];
+ if (handler !== undefined && typeof handler[child.name] === 'function') {
+ handler[child.name](child);
+ } else {
+ this.visit(child);
+ }
+ }
+ };
+
+ this.visit(ast);
+ Object.keys(rootStcx.variables).forEach(function(key){
+ if(!rootStcx.varRefs[key] && (rootStcx.variables[key].annotations['http://www.w3.org/2005/xpath-functions#private'] || rootStcx.moduleNamespace === '') && rootStcx.variables[key].pos) {
+ addWarning('W03', 'Unused variable "' + rootStcx.variables[key].qname.name + '"', rootStcx.variables[key].pos);
+ }
+ });
+ Object.keys(rootStcx.namespaces).forEach(function(uri){
+ var namespace = rootStcx.namespaces[uri];
+ if(namespace.used === undefined && !namespace.override && namespace.type === 'module') {
+ addWarning('W04', 'Unused module "' + uri + '"', namespace.pos);
+ }
+ });
+};
+
+},{"../tree_ops":"/node_modules/xqlint/lib/tree_ops.js","./errors":"/node_modules/xqlint/lib/compiler/errors.js","./handlers":"/node_modules/xqlint/lib/compiler/handlers.js","./static_context":"/node_modules/xqlint/lib/compiler/static_context.js"}],"/node_modules/xqlint/lib/completion/completer.js":[function(_dereq_,module,exports){
+'use strict';
+
+var TreeOps = _dereq_('../tree_ops').TreeOps;
+
+var ID_REGEX = /[a-zA-Z_0-9\$]/;
+
+function retrievePrecedingIdentifier(text, pos, regex) {
+ regex = regex || ID_REGEX;
+ var buf = [];
+ for (var i = pos-1; i >= 0; i--) {
+ if (regex.test(text[i])) {
+ buf.push(text[i]);
+ } else {
+ break;
+ }
+ }
+ return buf.reverse().join('');
+}
+
+function prefixBinarySearch(items, prefix) {
+ var startIndex = 0;
+ var stopIndex = items.length - 1;
+ var middle = Math.floor((stopIndex + startIndex) / 2);
+
+ while (stopIndex > startIndex && middle >= 0 && items[middle].indexOf(prefix) !== 0) {
+ if (prefix < items[middle]) {
+ stopIndex = middle - 1;
+ } else if (prefix > items[middle]) {
+ startIndex = middle + 1;
+ }
+ middle = Math.floor((stopIndex + startIndex) / 2);
+ }
+ while (middle > 0 && items[middle-1].indexOf(prefix) === 0) {
+ middle--;
+ }
+ return middle >= 0 ? middle : 0; // ensure we're not returning a negative index
+}
+
+var uriRegex = /[a-zA-Z_0-9\/\.:\-#]/;
+var char = '-._A-Za-z0-9:\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02ff\u0300-\u037D\u037F-\u1FFF\u200C\u200D\u203f\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD';
+var nameChar = '[' + char + ']';
+var varChar = '[' + char + '\\$]';
+var nameCharRegExp = new RegExp(nameChar);
+var varCharRegExp = new RegExp(varChar);
+
+var varDeclLabels = {
+ 'LetBinding': 'Let binding',
+ 'Param': 'Function parameter',
+ 'QuantifiedExpr': 'Quantified expression binding',
+ 'VarDeclStatement': 'Local variable',
+ 'ForBinding': 'For binding',
+ 'TumblingWindowClause': 'Tumbling window binding',
+ 'WindowVars': 'Window variable',
+ 'SlidingWindowClause': 'Sliding window binding',
+ 'PositionalVar': 'Positional variable',
+ 'CurrentItem': 'Current item',
+ 'PreviousItem': 'Previous item',
+ 'NextItem': 'Next item',
+ 'CountClause': 'Count binding',
+ 'GroupingVariable': 'Grouping variable',
+ 'VarDecl': 'Module variable'
+};
+
+var findCompletions = function(prefix, allIdentifiers) {
+ allIdentifiers.sort();
+ var startIdx = prefixBinarySearch(allIdentifiers, prefix);
+ var matches = [];
+ for (var i = startIdx; i < allIdentifiers.length && allIdentifiers[i].indexOf(prefix) === 0; i++) {
+ matches.push(allIdentifiers[i]);
+ }
+ return matches;
+};
+
+
+var completePrefix = function(identifier, pos, sctx){
+ var idx = identifier.indexOf(':');
+ if(idx === -1) {
+ var prefixes = [];
+ var namespaces = sctx.getNamespaces();
+ Object.keys(namespaces).forEach(function(key){
+ if(namespaces[key].type === 'module' || key === 'http://www.w3.org/2005/xquery-local-functions') {
+ prefixes.push(namespaces[key].prefixes[0]);
+ }
+ });
+ var matches = findCompletions(identifier, prefixes);
+ var match = function(name) {
+ return {
+ name: name + ':',
+ value: name + ':',
+ meta: 'prefix'
+ };
+ };
+ return matches.map(match);
+ } else {
+ return [];
+ }
+};
+
+var completeFunction = function(identifier, pos, sctx){
+ var names = [];
+ var snippets = {};
+ var functions = sctx.getFunctions();
+ var uri = '';
+ var prefix = '';
+ var name = identifier;
+ var idx = identifier.indexOf(':');
+ var defaultNamespace = false;
+ if(idx !== -1){
+ prefix = identifier.substring(0, idx);
+ name = identifier.substring(idx + 1);
+ var ns = sctx.getNamespaceByPrefix(prefix);
+ if(ns){
+ uri = sctx.getNamespaceByPrefix(prefix).uri;
+ }
+ } else {
+ defaultNamespace = true;
+ uri = sctx.root.defaultFunctionNamespace;
+ }
+ Object.keys(functions).forEach(function(key){
+ var fn = functions[key];
+ var ns = key.substring(0, key.indexOf('#'));
+ var name = key.substring(key.indexOf('#') + 1);
+ name = name.substring(0, name.indexOf('#'));
+ if(ns !== uri) {
+ return;
+ }
+ if(!defaultNamespace){
+ name = sctx.getNamespaces()[ns].prefixes[0] + ':' + name;
+ }
+ name += '(';
+ var snippet = name;
+ snippet += fn.params.map(function(param, index){
+ return '${' + (index + 1) + ':\\' + param.split(' ')[0] + '}';
+ }).join(', ');
+ name += fn.params.join(', ');
+ name += ')';
+ snippet += ')';
+ names.push(name);
+ snippets[name] = snippet;
+ });
+ var matches = findCompletions(identifier, names);
+ var match = function(name) {
+ return {
+ name: name,
+ value: name,
+ meta: 'function',
+ priority: 4,
+ identifierRegex: nameCharRegExp,
+ snippet: snippets[name]
+ };
+ };
+ return matches.map(match);
+};
+
+var completeVariable = function(identifier, pos, sctx){
+ var uri = '';
+ var prefix = '';
+ var idx = identifier.indexOf(':');
+ if(idx !== -1){
+ prefix = identifier.substring(0, idx);
+ uri = sctx.getNamespaceByPrefix(prefix).uri;
+ }
+ var decls = sctx.getVariables();
+ var names = [];
+ var types = {};
+ Object.keys(decls).forEach(function(key){
+ var i = key.indexOf('#');
+ var ns = key.substring(0, i);
+ var name = key.substring(i+1);
+ if(ns !== ''){
+ names.push(sctx.getPrefixesByNamespace(ns)[0] + ':' + name);
+ types[sctx.getPrefixesByNamespace(ns)[0] + ':' + name] = decls[key].type;
+ } else {
+ names.push(name);
+ types[name] = decls[key].type;
+ }
+ });
+
+ var matches = findCompletions(identifier, names);
+ var match = function(name) {
+ return {
+ name: '$' + name,
+ value: '$' + name,
+ meta: varDeclLabels[types[name]],
+ priority: 4,
+ identifierRegex: varCharRegExp
+ };
+ };
+ return matches.map(match);
+};
+
+var completeExpr = function(line, pos, sctx){
+ var identifier = retrievePrecedingIdentifier(line, pos.col, nameCharRegExp);
+ var before = line.substring(0, pos.col - (identifier.length === 0 ? 0 : identifier.length));
+ var isVar = before[before.length - 1] === '$';
+ if(isVar) {
+ return completeVariable(identifier, pos, sctx);
+ } else if(identifier !== '') {
+ return completeFunction(identifier, pos, sctx).concat(completePrefix(identifier, pos, sctx));
+ } else {
+ return completeVariable(identifier, pos, sctx).concat(completeFunction(identifier, pos, sctx)).concat(completePrefix(identifier, pos, sctx));
+ }
+};
+
+var completeModuleUri = function(line, pos, sctx){
+ var identifier = retrievePrecedingIdentifier(line, pos.col, uriRegex);
+ var matches = findCompletions(identifier, sctx.getAvailableModuleNamespaces());
+ var match = function(uri) {
+ return {
+ name: uri,
+ value: uri,
+ meta: 'module',
+ priority: 4,
+ identifierRegex: uriRegex
+ };
+ };
+ return matches.map(match);
+};
+
+exports.complete = function(source, ast, rootSctx, pos){
+ var line = source.split('\n')[pos.line];
+ var node = TreeOps.findNode(ast, pos);
+ var sctx = TreeOps.findNode(rootSctx, pos);
+ sctx = sctx ? sctx : rootSctx;
+ if(node && node.name === 'URILiteral' && node.getParent && node.getParent.name === 'ModuleImport'){
+ return completeModuleUri(line, pos, sctx);
+ } else {
+ return completeExpr(line, pos, sctx);
+ }
+};
+
+},{"../tree_ops":"/node_modules/xqlint/lib/tree_ops.js"}],"/node_modules/xqlint/lib/formatter/style_checker.js":[function(_dereq_,module,exports){
+exports.StyleChecker = function (ast, source) {
+ 'use strict';
+
+ var tab = ' ';
+ var markers = [];
+
+ this.getMarkers = function(){
+ return markers;
+ };
+
+ this.WS = function(node) {
+ var lines = node.value.split('\n');
+ lines.forEach(function(line, index){
+ var isFirst = index === 0;
+ var isLast = index === (lines.length - 1);
+
+ if(/\r$/.test(line)) {
+ markers.push({
+ pos: {
+ sl: node.pos.sl + index,
+ el: node.pos.sl + index,
+ sc: line.length - 1,
+ ec: line.length
+ },
+ type: 'warning',
+ level: 'warning',
+ message: '[SW01] Detected CRLF'
+ });
+ }
+
+ var match = line.match(/\t+/);
+ if(match !== null){
+ markers.push({
+ pos: {
+ sl: node.pos.sl + index,
+ el: node.pos.sl + index,
+ sc: match.index,
+ ec: match.index + match[0].length
+ },
+ type: 'warning',
+ level: 'warning',
+ message: '[SW02] Tabs detected'
+ });
+ }
+
+ if((!isFirst) && isLast){
+ match = line.match(/^\ +/);
+ if(match !== null) {
+ var mod = match[0].length % tab.length;
+ if(mod !== 0) {
+ markers.push({
+ pos: {
+ sl: node.pos.sl + index,
+ el: node.pos.sl + index,
+ sc: match.index,
+ ec: match.index + match[0].length
+ },
+ type: 'warning',
+ level: 'warning',
+ message: '[SW03] Unexcepted indentation of ' + match[0].length
+ });
+ }
+ }
+ }
+ });
+ return true;
+ };
+
+ this.visit = function (node, index) {
+ var name = node.name;
+ var skip = false;
+
+ if (typeof this[name] === 'function') {
+ skip = this[name](node, index) === true;
+ }
+
+ if (!skip) {
+ this.visitChildren(node);
+ }
+ };
+
+ this.visitChildren = function (node, handler) {
+ for (var i = 0; i < node.children.length; i++) {
+ var child = node.children[i];
+ if (handler !== undefined && typeof handler[child.name] === 'function') {
+ handler[child.name](child);
+ } else {
+ this.visit(child);
+ }
+ }
+ };
+
+ source.split('\n').forEach(function(line, index){
+ var match = line.match(/\ +$/);
+ if(match){
+ markers.push({
+ pos: {
+ sl: index,
+ el: index,
+ sc: match.index,
+ ec: match.index + match[0].length
+ },
+ type: 'warning',
+ level: 'warning',
+ message: '[SW04] Trailing whitespace'
+ });
+ }
+ });
+ this.visit(ast);
+};
+},{}],"/node_modules/xqlint/lib/lexers/JSONiqTokenizer.js":[function(_dereq_,module,exports){
+ var JSONiqTokenizer = exports.JSONiqTokenizer = function JSONiqTokenizer(string, parsingEventHandler)
+ {
+ init(string, parsingEventHandler);
+ var self = this;
+
+ this.ParseException = function(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;
+ end = e;
+ eventHandler.reset(input);
+ }
+
+ this.getOffendingToken = function(e)
+ {
+ var o = e.getOffending();
+ return o >= 0 ? JSONiqTokenizer.TOKEN[o] : null;
+ };
+
+ this.getExpectedTokenSet = function(e)
+ {
+ var expected;
+ if (e.getExpected() < 0)
+ {
+ expected = JSONiqTokenizer.getTokenSet(- e.getState());
+ }
+ else
+ {
+ expected = [JSONiqTokenizer.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 = 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 || found != null ? "" : "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_start = function()
+ {
+ eventHandler.startNonterminal("start", e0);
+ lookahead1W(14); // ModuleDecl | Annotation | OptionDecl | Operator | Variable | Tag | AttrTest |
+ switch (l1)
+ {
+ case 58: // '<![CDATA['
+ shift(58); // '<![CDATA['
+ break;
+ case 57: // '<!--'
+ shift(57); // '<!--'
+ break;
+ case 59: // '<?'
+ shift(59); // '<?'
+ break;
+ case 43: // '(#'
+ shift(43); // '(#'
+ break;
+ case 45: // '(:~'
+ shift(45); // '(:~'
+ break;
+ case 44: // '(:'
+ shift(44); // '(:'
+ break;
+ case 37: // '"'
+ shift(37); // '"'
+ break;
+ case 41: // "'"
+ shift(41); // "'"
+ break;
+ case 277: // '}'
+ shift(277); // '}'
+ break;
+ case 274: // '{'
+ shift(274); // '{'
+ break;
+ case 42: // '('
+ shift(42); // '('
+ break;
+ case 46: // ')'
+ shift(46); // ')'
+ break;
+ case 52: // '/'
+ shift(52); // '/'
+ break;
+ case 65: // '['
+ shift(65); // '['
+ break;
+ case 66: // ']'
+ shift(66); // ']'
+ break;
+ case 49: // ','
+ shift(49); // ','
+ break;
+ case 51: // '.'
+ shift(51); // '.'
+ break;
+ case 56: // ';'
+ shift(56); // ';'
+ break;
+ case 54: // ':'
+ shift(54); // ':'
+ break;
+ case 36: // '!'
+ shift(36); // '!'
+ break;
+ case 276: // '|'
+ shift(276); // '|'
+ break;
+ case 40: // '$$'
+ shift(40); // '$$'
+ break;
+ case 5: // Annotation
+ shift(5); // Annotation
+ break;
+ case 4: // ModuleDecl
+ shift(4); // ModuleDecl
+ break;
+ case 6: // OptionDecl
+ shift(6); // OptionDecl
+ break;
+ case 15: // AttrTest
+ shift(15); // AttrTest
+ break;
+ case 16: // Wildcard
+ shift(16); // Wildcard
+ break;
+ case 18: // IntegerLiteral
+ shift(18); // IntegerLiteral
+ break;
+ case 19: // DecimalLiteral
+ shift(19); // DecimalLiteral
+ break;
+ case 20: // DoubleLiteral
+ shift(20); // DoubleLiteral
+ break;
+ case 8: // Variable
+ shift(8); // Variable
+ break;
+ case 9: // Tag
+ shift(9); // Tag
+ break;
+ case 7: // Operator
+ shift(7); // Operator
+ break;
+ case 35: // EOF
+ shift(35); // EOF
+ break;
+ default:
+ parse_EQName();
+ }
+ eventHandler.endNonterminal("start", e0);
+ };
+
+ this.parse_StartTag = function()
+ {
+ eventHandler.startNonterminal("StartTag", e0);
+ lookahead1W(8); // QName | S^WS | EOF | '"' | "'" | '/>' | '=' | '>'
+ switch (l1)
+ {
+ case 61: // '>'
+ shift(61); // '>'
+ break;
+ case 53: // '/>'
+ shift(53); // '/>'
+ break;
+ case 29: // QName
+ shift(29); // QName
+ break;
+ case 60: // '='
+ shift(60); // '='
+ break;
+ case 37: // '"'
+ shift(37); // '"'
+ break;
+ case 41: // "'"
+ shift(41); // "'"
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("StartTag", e0);
+ };
+
+ this.parse_TagContent = function()
+ {
+ eventHandler.startNonterminal("TagContent", e0);
+ lookahead1(11); // Tag | EndTag | PredefinedEntityRef | ElementContentChar | CharRef | EOF |
+ switch (l1)
+ {
+ case 25: // ElementContentChar
+ shift(25); // ElementContentChar
+ break;
+ case 9: // Tag
+ shift(9); // Tag
+ break;
+ case 10: // EndTag
+ shift(10); // EndTag
+ break;
+ case 58: // '<![CDATA['
+ shift(58); // '<![CDATA['
+ break;
+ case 57: // '<!--'
+ shift(57); // '<!--'
+ break;
+ case 21: // PredefinedEntityRef
+ shift(21); // PredefinedEntityRef
+ break;
+ case 31: // CharRef
+ shift(31); // CharRef
+ break;
+ case 275: // '{{'
+ shift(275); // '{{'
+ break;
+ case 278: // '}}'
+ shift(278); // '}}'
+ break;
+ case 274: // '{'
+ shift(274); // '{'
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("TagContent", e0);
+ };
+
+ this.parse_AposAttr = function()
+ {
+ eventHandler.startNonterminal("AposAttr", e0);
+ lookahead1(10); // PredefinedEntityRef | EscapeApos | AposAttrContentChar | CharRef | EOF | "'" |
+ switch (l1)
+ {
+ case 23: // EscapeApos
+ shift(23); // EscapeApos
+ break;
+ case 27: // AposAttrContentChar
+ shift(27); // AposAttrContentChar
+ break;
+ case 21: // PredefinedEntityRef
+ shift(21); // PredefinedEntityRef
+ break;
+ case 31: // CharRef
+ shift(31); // CharRef
+ break;
+ case 275: // '{{'
+ shift(275); // '{{'
+ break;
+ case 278: // '}}'
+ shift(278); // '}}'
+ break;
+ case 274: // '{'
+ shift(274); // '{'
+ break;
+ case 41: // "'"
+ shift(41); // "'"
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("AposAttr", e0);
+ };
+
+ this.parse_QuotAttr = function()
+ {
+ eventHandler.startNonterminal("QuotAttr", e0);
+ lookahead1(9); // PredefinedEntityRef | EscapeQuot | QuotAttrContentChar | CharRef | EOF | '"' |
+ switch (l1)
+ {
+ case 22: // EscapeQuot
+ shift(22); // EscapeQuot
+ break;
+ case 26: // QuotAttrContentChar
+ shift(26); // QuotAttrContentChar
+ break;
+ case 21: // PredefinedEntityRef
+ shift(21); // PredefinedEntityRef
+ break;
+ case 31: // CharRef
+ shift(31); // CharRef
+ break;
+ case 275: // '{{'
+ shift(275); // '{{'
+ break;
+ case 278: // '}}'
+ shift(278); // '}}'
+ break;
+ case 274: // '{'
+ shift(274); // '{'
+ break;
+ case 37: // '"'
+ shift(37); // '"'
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("QuotAttr", e0);
+ };
+
+ this.parse_CData = function()
+ {
+ eventHandler.startNonterminal("CData", e0);
+ lookahead1(1); // CDataSectionContents | EOF | ']]>'
+ switch (l1)
+ {
+ case 14: // CDataSectionContents
+ shift(14); // CDataSectionContents
+ break;
+ case 67: // ']]>'
+ shift(67); // ']]>'
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("CData", e0);
+ };
+
+ this.parse_XMLComment = function()
+ {
+ eventHandler.startNonterminal("XMLComment", e0);
+ lookahead1(0); // DirCommentContents | EOF | '-->'
+ switch (l1)
+ {
+ case 12: // DirCommentContents
+ shift(12); // DirCommentContents
+ break;
+ case 50: // '-->'
+ shift(50); // '-->'
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("XMLComment", e0);
+ };
+
+ this.parse_PI = function()
+ {
+ eventHandler.startNonterminal("PI", e0);
+ lookahead1(3); // DirPIContents | EOF | '?' | '?>'
+ switch (l1)
+ {
+ case 13: // DirPIContents
+ shift(13); // DirPIContents
+ break;
+ case 62: // '?'
+ shift(62); // '?'
+ break;
+ case 63: // '?>'
+ shift(63); // '?>'
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("PI", e0);
+ };
+
+ this.parse_Pragma = function()
+ {
+ eventHandler.startNonterminal("Pragma", e0);
+ lookahead1(2); // PragmaContents | EOF | '#' | '#)'
+ switch (l1)
+ {
+ case 11: // PragmaContents
+ shift(11); // PragmaContents
+ break;
+ case 38: // '#'
+ shift(38); // '#'
+ break;
+ case 39: // '#)'
+ shift(39); // '#)'
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("Pragma", e0);
+ };
+
+ this.parse_Comment = function()
+ {
+ eventHandler.startNonterminal("Comment", e0);
+ lookahead1(4); // CommentContents | EOF | '(:' | ':)'
+ switch (l1)
+ {
+ case 55: // ':)'
+ shift(55); // ':)'
+ break;
+ case 44: // '(:'
+ shift(44); // '(:'
+ break;
+ case 32: // CommentContents
+ shift(32); // CommentContents
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("Comment", e0);
+ };
+
+ this.parse_CommentDoc = function()
+ {
+ eventHandler.startNonterminal("CommentDoc", e0);
+ lookahead1(6); // DocTag | DocCommentContents | EOF | '(:' | ':)'
+ switch (l1)
+ {
+ case 33: // DocTag
+ shift(33); // DocTag
+ break;
+ case 34: // DocCommentContents
+ shift(34); // DocCommentContents
+ break;
+ case 55: // ':)'
+ shift(55); // ':)'
+ break;
+ case 44: // '(:'
+ shift(44); // '(:'
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("CommentDoc", e0);
+ };
+
+ this.parse_QuotString = function()
+ {
+ eventHandler.startNonterminal("QuotString", e0);
+ lookahead1(5); // JSONChar | JSONCharRef | JSONPredefinedCharRef | EOF | '"'
+ switch (l1)
+ {
+ case 3: // JSONPredefinedCharRef
+ shift(3); // JSONPredefinedCharRef
+ break;
+ case 2: // JSONCharRef
+ shift(2); // JSONCharRef
+ break;
+ case 1: // JSONChar
+ shift(1); // JSONChar
+ break;
+ case 37: // '"'
+ shift(37); // '"'
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("QuotString", e0);
+ };
+
+ this.parse_AposString = function()
+ {
+ eventHandler.startNonterminal("AposString", e0);
+ lookahead1(7); // PredefinedEntityRef | EscapeApos | AposChar | CharRef | EOF | "'"
+ switch (l1)
+ {
+ case 21: // PredefinedEntityRef
+ shift(21); // PredefinedEntityRef
+ break;
+ case 31: // CharRef
+ shift(31); // CharRef
+ break;
+ case 23: // EscapeApos
+ shift(23); // EscapeApos
+ break;
+ case 24: // AposChar
+ shift(24); // AposChar
+ break;
+ case 41: // "'"
+ shift(41); // "'"
+ break;
+ default:
+ shift(35); // EOF
+ }
+ eventHandler.endNonterminal("AposString", e0);
+ };
+
+ this.parse_Prefix = function()
+ {
+ eventHandler.startNonterminal("Prefix", e0);
+ lookahead1W(13); // NCName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ whitespace();
+ parse_NCName();
+ eventHandler.endNonterminal("Prefix", e0);
+ };
+
+ this.parse__EQName = function()
+ {
+ eventHandler.startNonterminal("_EQName", e0);
+ lookahead1W(12); // EQName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ whitespace();
+ parse_EQName();
+ eventHandler.endNonterminal("_EQName", e0);
+ };
+
+ function parse_EQName()
+ {
+ eventHandler.startNonterminal("EQName", e0);
+ switch (l1)
+ {
+ case 80: // 'attribute'
+ shift(80); // 'attribute'
+ break;
+ case 94: // 'comment'
+ shift(94); // 'comment'
+ break;
+ case 118: // 'document-node'
+ shift(118); // 'document-node'
+ break;
+ case 119: // 'element'
+ shift(119); // 'element'
+ break;
+ case 122: // 'empty-sequence'
+ shift(122); // 'empty-sequence'
+ break;
+ case 143: // 'function'
+ shift(143); // 'function'
+ break;
+ case 150: // 'if'
+ shift(150); // 'if'
+ break;
+ case 163: // 'item'
+ shift(163); // 'item'
+ break;
+ case 183: // 'namespace-node'
+ shift(183); // 'namespace-node'
+ break;
+ case 189: // 'node'
+ shift(189); // 'node'
+ break;
+ case 214: // 'processing-instruction'
+ shift(214); // 'processing-instruction'
+ break;
+ case 224: // 'schema-attribute'
+ shift(224); // 'schema-attribute'
+ break;
+ case 225: // 'schema-element'
+ shift(225); // 'schema-element'
+ break;
+ case 241: // 'switch'
+ shift(241); // 'switch'
+ break;
+ case 242: // 'text'
+ shift(242); // 'text'
+ break;
+ case 251: // 'typeswitch'
+ shift(251); // 'typeswitch'
+ break;
+ default:
+ parse_FunctionName();
+ }
+ eventHandler.endNonterminal("EQName", e0);
+ }
+
+ function parse_FunctionName()
+ {
+ eventHandler.startNonterminal("FunctionName", e0);
+ switch (l1)
+ {
+ case 17: // EQName^Token
+ shift(17); // EQName^Token
+ break;
+ case 68: // 'after'
+ shift(68); // 'after'
+ break;
+ case 71: // 'ancestor'
+ shift(71); // 'ancestor'
+ break;
+ case 72: // 'ancestor-or-self'
+ shift(72); // 'ancestor-or-self'
+ break;
+ case 73: // 'and'
+ shift(73); // 'and'
+ break;
+ case 77: // 'as'
+ shift(77); // 'as'
+ break;
+ case 78: // 'ascending'
+ shift(78); // 'ascending'
+ break;
+ case 82: // 'before'
+ shift(82); // 'before'
+ break;
+ case 86: // 'case'
+ shift(86); // 'case'
+ break;
+ case 87: // 'cast'
+ shift(87); // 'cast'
+ break;
+ case 88: // 'castable'
+ shift(88); // 'castable'
+ break;
+ case 91: // 'child'
+ shift(91); // 'child'
+ break;
+ case 92: // 'collation'
+ shift(92); // 'collation'
+ break;
+ case 101: // 'copy'
+ shift(101); // 'copy'
+ break;
+ case 103: // 'count'
+ shift(103); // 'count'
+ break;
+ case 106: // 'declare'
+ shift(106); // 'declare'
+ break;
+ case 107: // 'default'
+ shift(107); // 'default'
+ break;
+ case 108: // 'delete'
+ shift(108); // 'delete'
+ break;
+ case 109: // 'descendant'
+ shift(109); // 'descendant'
+ break;
+ case 110: // 'descendant-or-self'
+ shift(110); // 'descendant-or-self'
+ break;
+ case 111: // 'descending'
+ shift(111); // 'descending'
+ break;
+ case 116: // 'div'
+ shift(116); // 'div'
+ break;
+ case 117: // 'document'
+ shift(117); // 'document'
+ break;
+ case 120: // 'else'
+ shift(120); // 'else'
+ break;
+ case 121: // 'empty'
+ shift(121); // 'empty'
+ break;
+ case 124: // 'end'
+ shift(124); // 'end'
+ break;
+ case 126: // 'eq'
+ shift(126); // 'eq'
+ break;
+ case 127: // 'every'
+ shift(127); // 'every'
+ break;
+ case 129: // 'except'
+ shift(129); // 'except'
+ break;
+ case 132: // 'first'
+ shift(132); // 'first'
+ break;
+ case 133: // 'following'
+ shift(133); // 'following'
+ break;
+ case 134: // 'following-sibling'
+ shift(134); // 'following-sibling'
+ break;
+ case 135: // 'for'
+ shift(135); // 'for'
+ break;
+ case 144: // 'ge'
+ shift(144); // 'ge'
+ break;
+ case 146: // 'group'
+ shift(146); // 'group'
+ break;
+ case 148: // 'gt'
+ shift(148); // 'gt'
+ break;
+ case 149: // 'idiv'
+ shift(149); // 'idiv'
+ break;
+ case 151: // 'import'
+ shift(151); // 'import'
+ break;
+ case 157: // 'insert'
+ shift(157); // 'insert'
+ break;
+ case 158: // 'instance'
+ shift(158); // 'instance'
+ break;
+ case 160: // 'intersect'
+ shift(160); // 'intersect'
+ break;
+ case 161: // 'into'
+ shift(161); // 'into'
+ break;
+ case 162: // 'is'
+ shift(162); // 'is'
+ break;
+ case 168: // 'last'
+ shift(168); // 'last'
+ break;
+ case 170: // 'le'
+ shift(170); // 'le'
+ break;
+ case 172: // 'let'
+ shift(172); // 'let'
+ break;
+ case 176: // 'lt'
+ shift(176); // 'lt'
+ break;
+ case 178: // 'mod'
+ shift(178); // 'mod'
+ break;
+ case 179: // 'modify'
+ shift(179); // 'modify'
+ break;
+ case 180: // 'module'
+ shift(180); // 'module'
+ break;
+ case 182: // 'namespace'
+ shift(182); // 'namespace'
+ break;
+ case 184: // 'ne'
+ shift(184); // 'ne'
+ break;
+ case 196: // 'only'
+ shift(196); // 'only'
+ break;
+ case 198: // 'or'
+ shift(198); // 'or'
+ break;
+ case 199: // 'order'
+ shift(199); // 'order'
+ break;
+ case 200: // 'ordered'
+ shift(200); // 'ordered'
+ break;
+ case 204: // 'parent'
+ shift(204); // 'parent'
+ break;
+ case 210: // 'preceding'
+ shift(210); // 'preceding'
+ break;
+ case 211: // 'preceding-sibling'
+ shift(211); // 'preceding-sibling'
+ break;
+ case 216: // 'rename'
+ shift(216); // 'rename'
+ break;
+ case 217: // 'replace'
+ shift(217); // 'replace'
+ break;
+ case 218: // 'return'
+ shift(218); // 'return'
+ break;
+ case 222: // 'satisfies'
+ shift(222); // 'satisfies'
+ break;
+ case 227: // 'self'
+ shift(227); // 'self'
+ break;
+ case 233: // 'some'
+ shift(233); // 'some'
+ break;
+ case 234: // 'stable'
+ shift(234); // 'stable'
+ break;
+ case 235: // 'start'
+ shift(235); // 'start'
+ break;
+ case 246: // 'to'
+ shift(246); // 'to'
+ break;
+ case 247: // 'treat'
+ shift(247); // 'treat'
+ break;
+ case 248: // 'try'
+ shift(248); // 'try'
+ break;
+ case 252: // 'union'
+ shift(252); // 'union'
+ break;
+ case 254: // 'unordered'
+ shift(254); // 'unordered'
+ break;
+ case 258: // 'validate'
+ shift(258); // 'validate'
+ break;
+ case 264: // 'where'
+ shift(264); // 'where'
+ break;
+ case 268: // 'with'
+ shift(268); // 'with'
+ break;
+ case 272: // 'xquery'
+ shift(272); // 'xquery'
+ break;
+ case 70: // 'allowing'
+ shift(70); // 'allowing'
+ break;
+ case 79: // 'at'
+ shift(79); // 'at'
+ break;
+ case 81: // 'base-uri'
+ shift(81); // 'base-uri'
+ break;
+ case 83: // 'boundary-space'
+ shift(83); // 'boundary-space'
+ break;
+ case 84: // 'break'
+ shift(84); // 'break'
+ break;
+ case 89: // 'catch'
+ shift(89); // 'catch'
+ break;
+ case 96: // 'construction'
+ shift(96); // 'construction'
+ break;
+ case 99: // 'context'
+ shift(99); // 'context'
+ break;
+ case 100: // 'continue'
+ shift(100); // 'continue'
+ break;
+ case 102: // 'copy-namespaces'
+ shift(102); // 'copy-namespaces'
+ break;
+ case 104: // 'decimal-format'
+ shift(104); // 'decimal-format'
+ break;
+ case 123: // 'encoding'
+ shift(123); // 'encoding'
+ break;
+ case 130: // 'exit'
+ shift(130); // 'exit'
+ break;
+ case 131: // 'external'
+ shift(131); // 'external'
+ break;
+ case 139: // 'ft-option'
+ shift(139); // 'ft-option'
+ break;
+ case 152: // 'in'
+ shift(152); // 'in'
+ break;
+ case 153: // 'index'
+ shift(153); // 'index'
+ break;
+ case 159: // 'integrity'
+ shift(159); // 'integrity'
+ break;
+ case 169: // 'lax'
+ shift(169); // 'lax'
+ break;
+ case 190: // 'nodes'
+ shift(190); // 'nodes'
+ break;
+ case 197: // 'option'
+ shift(197); // 'option'
+ break;
+ case 201: // 'ordering'
+ shift(201); // 'ordering'
+ break;
+ case 220: // 'revalidation'
+ shift(220); // 'revalidation'
+ break;
+ case 223: // 'schema'
+ shift(223); // 'schema'
+ break;
+ case 226: // 'score'
+ shift(226); // 'score'
+ break;
+ case 232: // 'sliding'
+ shift(232); // 'sliding'
+ break;
+ case 238: // 'strict'
+ shift(238); // 'strict'
+ break;
+ case 249: // 'tumbling'
+ shift(249); // 'tumbling'
+ break;
+ case 250: // 'type'
+ shift(250); // 'type'
+ break;
+ case 255: // 'updating'
+ shift(255); // 'updating'
+ break;
+ case 259: // 'value'
+ shift(259); // 'value'
+ break;
+ case 260: // 'variable'
+ shift(260); // 'variable'
+ break;
+ case 261: // 'version'
+ shift(261); // 'version'
+ break;
+ case 265: // 'while'
+ shift(265); // 'while'
+ break;
+ case 95: // 'constraint'
+ shift(95); // 'constraint'
+ break;
+ case 174: // 'loop'
+ shift(174); // 'loop'
+ break;
+ default:
+ shift(219); // 'returning'
+ }
+ eventHandler.endNonterminal("FunctionName", e0);
+ }
+
+ function parse_NCName()
+ {
+ eventHandler.startNonterminal("NCName", e0);
+ switch (l1)
+ {
+ case 28: // NCName^Token
+ shift(28); // NCName^Token
+ break;
+ case 68: // 'after'
+ shift(68); // 'after'
+ break;
+ case 73: // 'and'
+ shift(73); // 'and'
+ break;
+ case 77: // 'as'
+ shift(77); // 'as'
+ break;
+ case 78: // 'ascending'
+ shift(78); // 'ascending'
+ break;
+ case 82: // 'before'
+ shift(82); // 'before'
+ break;
+ case 86: // 'case'
+ shift(86); // 'case'
+ break;
+ case 87: // 'cast'
+ shift(87); // 'cast'
+ break;
+ case 88: // 'castable'
+ shift(88); // 'castable'
+ break;
+ case 92: // 'collation'
+ shift(92); // 'collation'
+ break;
+ case 103: // 'count'
+ shift(103); // 'count'
+ break;
+ case 107: // 'default'
+ shift(107); // 'default'
+ break;
+ case 111: // 'descending'
+ shift(111); // 'descending'
+ break;
+ case 116: // 'div'
+ shift(116); // 'div'
+ break;
+ case 120: // 'else'
+ shift(120); // 'else'
+ break;
+ case 121: // 'empty'
+ shift(121); // 'empty'
+ break;
+ case 124: // 'end'
+ shift(124); // 'end'
+ break;
+ case 126: // 'eq'
+ shift(126); // 'eq'
+ break;
+ case 129: // 'except'
+ shift(129); // 'except'
+ break;
+ case 135: // 'for'
+ shift(135); // 'for'
+ break;
+ case 144: // 'ge'
+ shift(144); // 'ge'
+ break;
+ case 146: // 'group'
+ shift(146); // 'group'
+ break;
+ case 148: // 'gt'
+ shift(148); // 'gt'
+ break;
+ case 149: // 'idiv'
+ shift(149); // 'idiv'
+ break;
+ case 158: // 'instance'
+ shift(158); // 'instance'
+ break;
+ case 160: // 'intersect'
+ shift(160); // 'intersect'
+ break;
+ case 161: // 'into'
+ shift(161); // 'into'
+ break;
+ case 162: // 'is'
+ shift(162); // 'is'
+ break;
+ case 170: // 'le'
+ shift(170); // 'le'
+ break;
+ case 172: // 'let'
+ shift(172); // 'let'
+ break;
+ case 176: // 'lt'
+ shift(176); // 'lt'
+ break;
+ case 178: // 'mod'
+ shift(178); // 'mod'
+ break;
+ case 179: // 'modify'
+ shift(179); // 'modify'
+ break;
+ case 184: // 'ne'
+ shift(184); // 'ne'
+ break;
+ case 196: // 'only'
+ shift(196); // 'only'
+ break;
+ case 198: // 'or'
+ shift(198); // 'or'
+ break;
+ case 199: // 'order'
+ shift(199); // 'order'
+ break;
+ case 218: // 'return'
+ shift(218); // 'return'
+ break;
+ case 222: // 'satisfies'
+ shift(222); // 'satisfies'
+ break;
+ case 234: // 'stable'
+ shift(234); // 'stable'
+ break;
+ case 235: // 'start'
+ shift(235); // 'start'
+ break;
+ case 246: // 'to'
+ shift(246); // 'to'
+ break;
+ case 247: // 'treat'
+ shift(247); // 'treat'
+ break;
+ case 252: // 'union'
+ shift(252); // 'union'
+ break;
+ case 264: // 'where'
+ shift(264); // 'where'
+ break;
+ case 268: // 'with'
+ shift(268); // 'with'
+ break;
+ case 71: // 'ancestor'
+ shift(71); // 'ancestor'
+ break;
+ case 72: // 'ancestor-or-self'
+ shift(72); // 'ancestor-or-self'
+ break;
+ case 80: // 'attribute'
+ shift(80); // 'attribute'
+ break;
+ case 91: // 'child'
+ shift(91); // 'child'
+ break;
+ case 94: // 'comment'
+ shift(94); // 'comment'
+ break;
+ case 101: // 'copy'
+ shift(101); // 'copy'
+ break;
+ case 106: // 'declare'
+ shift(106); // 'declare'
+ break;
+ case 108: // 'delete'
+ shift(108); // 'delete'
+ break;
+ case 109: // 'descendant'
+ shift(109); // 'descendant'
+ break;
+ case 110: // 'descendant-or-self'
+ shift(110); // 'descendant-or-self'
+ break;
+ case 117: // 'document'
+ shift(117); // 'document'
+ break;
+ case 118: // 'document-node'
+ shift(118); // 'document-node'
+ break;
+ case 119: // 'element'
+ shift(119); // 'element'
+ break;
+ case 122: // 'empty-sequence'
+ shift(122); // 'empty-sequence'
+ break;
+ case 127: // 'every'
+ shift(127); // 'every'
+ break;
+ case 132: // 'first'
+ shift(132); // 'first'
+ break;
+ case 133: // 'following'
+ shift(133); // 'following'
+ break;
+ case 134: // 'following-sibling'
+ shift(134); // 'following-sibling'
+ break;
+ case 143: // 'function'
+ shift(143); // 'function'
+ break;
+ case 150: // 'if'
+ shift(150); // 'if'
+ break;
+ case 151: // 'import'
+ shift(151); // 'import'
+ break;
+ case 157: // 'insert'
+ shift(157); // 'insert'
+ break;
+ case 163: // 'item'
+ shift(163); // 'item'
+ break;
+ case 168: // 'last'
+ shift(168); // 'last'
+ break;
+ case 180: // 'module'
+ shift(180); // 'module'
+ break;
+ case 182: // 'namespace'
+ shift(182); // 'namespace'
+ break;
+ case 183: // 'namespace-node'
+ shift(183); // 'namespace-node'
+ break;
+ case 189: // 'node'
+ shift(189); // 'node'
+ break;
+ case 200: // 'ordered'
+ shift(200); // 'ordered'
+ break;
+ case 204: // 'parent'
+ shift(204); // 'parent'
+ break;
+ case 210: // 'preceding'
+ shift(210); // 'preceding'
+ break;
+ case 211: // 'preceding-sibling'
+ shift(211); // 'preceding-sibling'
+ break;
+ case 214: // 'processing-instruction'
+ shift(214); // 'processing-instruction'
+ break;
+ case 216: // 'rename'
+ shift(216); // 'rename'
+ break;
+ case 217: // 'replace'
+ shift(217); // 'replace'
+ break;
+ case 224: // 'schema-attribute'
+ shift(224); // 'schema-attribute'
+ break;
+ case 225: // 'schema-element'
+ shift(225); // 'schema-element'
+ break;
+ case 227: // 'self'
+ shift(227); // 'self'
+ break;
+ case 233: // 'some'
+ shift(233); // 'some'
+ break;
+ case 241: // 'switch'
+ shift(241); // 'switch'
+ break;
+ case 242: // 'text'
+ shift(242); // 'text'
+ break;
+ case 248: // 'try'
+ shift(248); // 'try'
+ break;
+ case 251: // 'typeswitch'
+ shift(251); // 'typeswitch'
+ break;
+ case 254: // 'unordered'
+ shift(254); // 'unordered'
+ break;
+ case 258: // 'validate'
+ shift(258); // 'validate'
+ break;
+ case 260: // 'variable'
+ shift(260); // 'variable'
+ break;
+ case 272: // 'xquery'
+ shift(272); // 'xquery'
+ break;
+ case 70: // 'allowing'
+ shift(70); // 'allowing'
+ break;
+ case 79: // 'at'
+ shift(79); // 'at'
+ break;
+ case 81: // 'base-uri'
+ shift(81); // 'base-uri'
+ break;
+ case 83: // 'boundary-space'
+ shift(83); // 'boundary-space'
+ break;
+ case 84: // 'break'
+ shift(84); // 'break'
+ break;
+ case 89: // 'catch'
+ shift(89); // 'catch'
+ break;
+ case 96: // 'construction'
+ shift(96); // 'construction'
+ break;
+ case 99: // 'context'
+ shift(99); // 'context'
+ break;
+ case 100: // 'continue'
+ shift(100); // 'continue'
+ break;
+ case 102: // 'copy-namespaces'
+ shift(102); // 'copy-namespaces'
+ break;
+ case 104: // 'decimal-format'
+ shift(104); // 'decimal-format'
+ break;
+ case 123: // 'encoding'
+ shift(123); // 'encoding'
+ break;
+ case 130: // 'exit'
+ shift(130); // 'exit'
+ break;
+ case 131: // 'external'
+ shift(131); // 'external'
+ break;
+ case 139: // 'ft-option'
+ shift(139); // 'ft-option'
+ break;
+ case 152: // 'in'
+ shift(152); // 'in'
+ break;
+ case 153: // 'index'
+ shift(153); // 'index'
+ break;
+ case 159: // 'integrity'
+ shift(159); // 'integrity'
+ break;
+ case 169: // 'lax'
+ shift(169); // 'lax'
+ break;
+ case 190: // 'nodes'
+ shift(190); // 'nodes'
+ break;
+ case 197: // 'option'
+ shift(197); // 'option'
+ break;
+ case 201: // 'ordering'
+ shift(201); // 'ordering'
+ break;
+ case 220: // 'revalidation'
+ shift(220); // 'revalidation'
+ break;
+ case 223: // 'schema'
+ shift(223); // 'schema'
+ break;
+ case 226: // 'score'
+ shift(226); // 'score'
+ break;
+ case 232: // 'sliding'
+ shift(232); // 'sliding'
+ break;
+ case 238: // 'strict'
+ shift(238); // 'strict'
+ break;
+ case 249: // 'tumbling'
+ shift(249); // 'tumbling'
+ break;
+ case 250: // 'type'
+ shift(250); // 'type'
+ break;
+ case 255: // 'updating'
+ shift(255); // 'updating'
+ break;
+ case 259: // 'value'
+ shift(259); // 'value'
+ break;
+ case 261: // 'version'
+ shift(261); // 'version'
+ break;
+ case 265: // 'while'
+ shift(265); // 'while'
+ break;
+ case 95: // 'constraint'
+ shift(95); // 'constraint'
+ break;
+ case 174: // 'loop'
+ shift(174); // 'loop'
+ break;
+ default:
+ shift(219); // 'returning'
+ }
+ eventHandler.endNonterminal("NCName", e0);
+ }
+
+ function shift(t)
+ {
+ if (l1 == t)
+ {
+ whitespace();
+ eventHandler.terminal(JSONiqTokenizer.TOKEN[l1], b1, e1 > size ? size : e1);
+ b0 = b1; e0 = e1; l1 = 0;
+ }
+ else
+ {
+ error(b1, e1, 0, l1, t);
+ }
+ }
+
+ function whitespace()
+ {
+ if (e0 != b1)
+ {
+ b0 = e0;
+ e0 = b1;
+ eventHandler.whitespace(b0, e0);
+ }
+ }
+
+ function matchW(set)
+ {
+ var code;
+ for (;;)
+ {
+ code = match(set);
+ if (code != 30) // S^WS
+ {
+ break;
+ }
+ }
+ return code;
+ }
+
+ function lookahead1W(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = matchW(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function lookahead1(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = match(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function error(b, e, s, l, t)
+ {
+ throw new self.ParseException(b, e, s, l, t);
+ }
+
+ var lk, b0, e0;
+ var l1, b1, e1;
+ var eventHandler;
+
+ var input;
+ var size;
+ var begin;
+ var end;
+
+ function match(tokenSetId)
+ {
+ var nonbmp = false;
+ begin = end;
+ var current = end;
+ var result = JSONiqTokenizer.INITIAL[tokenSetId];
+ var state = 0;
+
+ for (var code = result & 4095; code != 0; )
+ {
+ var charclass;
+ var c0 = current < size ? input.charCodeAt(current) : 0;
+ ++current;
+ if (c0 < 0x80)
+ {
+ charclass = JSONiqTokenizer.MAP0[c0];
+ }
+ else if (c0 < 0xd800)
+ {
+ var c1 = c0 >> 4;
+ charclass = JSONiqTokenizer.MAP1[(c0 & 15) + JSONiqTokenizer.MAP1[(c1 & 31) + JSONiqTokenizer.MAP1[c1 >> 5]]];
+ }
+ 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 (JSONiqTokenizer.MAP2[m] > c0) hi = m - 1;
+ else if (JSONiqTokenizer.MAP2[6 + m] < c0) lo = m + 1;
+ else {charclass = JSONiqTokenizer.MAP2[12 + m]; break;}
+ if (lo > hi) {charclass = 0; break;}
+ }
+ }
+
+ state = code;
+ var i0 = (charclass << 12) + code - 1;
+ code = JSONiqTokenizer.TRANSITION[(i0 & 15) + JSONiqTokenizer.TRANSITION[i0 >> 4]];
+
+ 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;
+ return 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;
+ }
+}
+
+JSONiqTokenizer.getTokenSet = function(tokenSetId)
+{
+ var set = [];
+ var s = tokenSetId < 0 ? - tokenSetId : INITIAL[tokenSetId] & 4095;
+ for (var i = 0; i < 279; i += 32)
+ {
+ var j = i;
+ var i0 = (i >> 5) * 2066 + s - 1;
+ var i1 = i0 >> 2;
+ var i2 = i1 >> 2;
+ var f = JSONiqTokenizer.EXPECTED[(i0 & 3) + JSONiqTokenizer.EXPECTED[(i1 & 3) + JSONiqTokenizer.EXPECTED[(i2 & 3) + JSONiqTokenizer.EXPECTED[i2 >> 2]]]];
+ for ( ; f != 0; f >>>= 1, ++j)
+ {
+ if ((f & 1) != 0)
+ {
+ set.push(JSONiqTokenizer.TOKEN[j]);
+ }
+ }
+ }
+ return set;
+};
+
+JSONiqTokenizer.MAP0 =
+[ 67, 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, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 37, 31, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 31, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 31, 62, 63, 64, 65, 37
+];
+
+JSONiqTokenizer.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, 347, 363, 379, 416, 416, 416, 408, 331, 323, 331, 323, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 433, 433, 433, 433, 433, 433, 433, 316, 331, 331, 331, 331, 331, 331, 331, 331, 394, 416, 416, 417, 415, 416, 416, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 330, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 67, 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, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 37, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 37, 31, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 31, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 31, 62, 63, 64, 65, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 31, 31, 37, 37, 37, 37, 37, 37, 37, 66, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 37, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66
+];
+
+JSONiqTokenizer.MAP2 =
+[ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 37, 31, 37, 31, 31, 37
+];
+
+JSONiqTokenizer.INITIAL =
+[ 1, 2, 49155, 57348, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
+];
+
+JSONiqTokenizer.TRANSITION =
+[ 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 17408, 19288, 17439, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22126, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17672, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19469, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 36919, 18234, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18419, 18432, 18304, 18448, 18485, 18523, 18553, 18583, 18599, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 18825, 18841, 18871, 18906, 18944, 18960, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19074, 36169, 17439, 36866, 17466, 36890, 36866, 22314, 19105, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22126, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17672, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19469, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 36919, 18234, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18419, 18432, 18304, 18448, 18485, 18523, 18553, 18583, 18599, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 18825, 18841, 18871, 18906, 18944, 18960, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22182, 19288, 19121, 36866, 17466, 18345, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19273, 19552, 19304, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19332, 17423, 19363, 36866, 17466, 17537, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 18614, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 19391, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 19427, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36154, 19288, 19457, 36866, 17466, 17740, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22780, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22375, 22197, 18469, 36866, 17466, 36890, 36866, 21991, 24018, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 21331, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 19485, 19501, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19537, 22390, 19568, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19596, 19611, 19457, 36866, 17466, 36890, 36866, 18246, 19627, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22242, 20553, 19457, 36866, 17466, 36890, 36866, 18648, 30477, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36472, 19288, 19457, 36866, 17466, 17809, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 21770, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 19643, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 19672, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 20538, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 17975, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22345, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19726, 19742, 21529, 24035, 23112, 26225, 23511, 27749, 27397, 24035, 34360, 24035, 24036, 23114, 35166, 23114, 23114, 19758, 23511, 35247, 23511, 23511, 28447, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 19821, 23511, 23511, 23511, 23511, 23512, 19441, 36539, 24035, 24035, 24035, 24035, 19846, 19869, 23114, 23114, 23114, 28618, 32187, 19892, 23511, 23511, 23511, 34585, 20402, 36647, 24035, 24035, 24036, 23114, 33757, 23114, 23114, 23029, 20271, 23511, 27070, 23511, 23511, 30562, 24035, 24035, 29274, 26576, 23114, 23114, 31118, 23036, 29695, 23511, 23511, 32431, 23634, 30821, 24035, 23110, 19913, 23114, 23467, 31261, 23261, 34299, 19932, 24035, 32609, 19965, 35389, 19984, 27689, 19830, 29391, 29337, 20041, 22643, 35619, 33728, 20062, 20121, 20166, 35100, 26145, 20211, 23008, 19876, 20208, 20227, 25670, 20132, 26578, 27685, 20141, 20243, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36094, 19288, 19457, 36866, 17466, 21724, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22735, 19552, 20287, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22750, 19288, 21529, 24035, 23112, 28056, 23511, 29483, 28756, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 20327, 23511, 23511, 23511, 23511, 31156, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 20371, 23511, 23511, 23511, 23511, 27443, 20395, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 29457, 29700, 23511, 23511, 23511, 23511, 33444, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 28350, 20421, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 20447, 20475, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 20523, 22257, 20569, 20783, 21715, 17603, 20699, 20837, 20614, 20630, 21149, 20670, 21405, 17486, 17509, 17525, 18373, 19179, 20695, 20716, 20732, 20755, 19194, 18042, 21641, 20592, 20779, 20598, 21412, 17470, 17591, 20896, 17468, 17619, 20799, 20700, 21031, 20744, 20699, 20828, 18075, 21259, 20581, 20853, 18048, 20868, 20884, 17756, 17784, 17800, 17825, 17854, 21171, 21200, 20931, 20947, 21378, 20955, 20971, 18086, 20645, 21002, 20986, 18178, 17960, 18012, 18381, 18064, 29176, 21044, 21438, 21018, 21122, 21393, 21060, 21844, 21094, 20654, 17493, 18150, 18166, 18214, 25967, 20763, 21799, 21110, 21830, 21138, 21246, 21301, 18336, 18361, 21165, 21187, 20812, 21216, 21232, 21287, 21317, 18553, 21347, 21363, 21428, 21454, 21271, 21483, 21499, 21515, 21575, 21467, 18712, 21591, 21633, 21078, 18189, 18198, 20679, 21657, 21701, 21074, 21687, 21740, 21756, 21786, 21815, 21860, 21876, 21892, 21946, 21962, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36457, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 36813, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 21981, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 22151, 22007, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 27898, 17884, 18890, 17906, 17928, 22042, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 22070, 22112, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 22142, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36109, 19288, 18469, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22167, 19288, 19457, 36866, 17466, 17768, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22227, 36487, 22273, 36866, 17466, 36890, 36866, 19316, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18749, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 22304, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 19580, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22330, 19089, 19457, 36866, 17466, 18721, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22765, 19347, 19457, 36866, 17466, 36890, 36866, 18114, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34541, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 22540, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29908, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22561, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 23837, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22584, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 27443, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 22839, 23511, 23511, 23511, 23511, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36442, 19288, 21605, 24035, 23112, 28137, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 31568, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22690, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 27584, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 22659, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22360, 19552, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22675, 22811, 19457, 36866, 17466, 36890, 36866, 19133, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 22827, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36064, 19288, 22865, 22881, 32031, 22897, 22913, 22956, 29939, 24035, 24035, 24035, 23003, 23114, 23114, 23114, 23024, 22420, 23511, 23511, 23511, 23052, 29116, 23073, 29268, 24035, 25563, 26915, 23106, 23131, 23114, 23114, 23159, 23181, 23197, 23248, 23511, 23511, 23282, 23305, 22493, 32364, 24035, 33472, 30138, 26325, 31770, 33508, 27345, 33667, 23114, 23321, 23473, 23351, 35793, 36576, 23511, 23375, 22500, 24145, 24035, 29197, 20192, 24533, 23440, 23114, 19017, 23459, 22839, 23489, 23510, 23511, 33563, 23528, 32076, 25389, 24035, 26576, 23561, 23583, 23114, 32683, 22516, 23622, 23655, 23511, 23634, 35456, 37144, 23110, 23683, 34153, 20499, 32513, 25824, 23705, 24035, 24035, 23111, 23114, 19874, 27078, 33263, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 20507, 32241, 20150, 31862, 27464, 35108, 23727, 23007, 35895, 34953, 26578, 27685, 20141, 24569, 31691, 19787, 33967, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36427, 19552, 21605, 24035, 23112, 32618, 23511, 29483, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 27027, 26576, 23114, 23114, 23114, 31471, 23756, 22468, 23511, 23511, 23511, 34687, 23772, 22493, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34564, 23788, 24035, 24035, 24035, 21559, 23828, 23114, 23114, 23114, 25086, 22839, 23853, 23511, 23511, 23511, 23876, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 31761, 23909, 23953, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36049, 19288, 21605, 30825, 23112, 23987, 23511, 24003, 31001, 27617, 24034, 24035, 24036, 24052, 24089, 23114, 23114, 22420, 24109, 24168, 23511, 23511, 29116, 24188, 27609, 20017, 29516, 24035, 26576, 24222, 19968, 23114, 24252, 33811, 22468, 24270, 33587, 23511, 24320, 27443, 22493, 24035, 24035, 24035, 24035, 24339, 23113, 23114, 23114, 23114, 28128, 28618, 29700, 23511, 23511, 23511, 28276, 34564, 20402, 24035, 24035, 32929, 24036, 23114, 23114, 23114, 24357, 23029, 22839, 23511, 23511, 23511, 24377, 25645, 24035, 34112, 24035, 26576, 23114, 26643, 23114, 32683, 22516, 23511, 25638, 23511, 23711, 24035, 24395, 27809, 23114, 24414, 20499, 24432, 30917, 23628, 24035, 30680, 23111, 23114, 30233, 27078, 25748, 24452, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 24475, 19829, 26577, 26597, 26154, 24519, 24556, 24596, 23007, 20046, 20132, 26578, 24634, 20141, 24569, 31691, 24679, 24727, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36412, 19288, 21605, 19943, 34861, 32618, 26027, 29483, 32016, 32050, 36233, 24776, 35574, 24801, 24819, 32671, 31289, 22420, 24868, 24886, 20087, 26849, 29116, 19803, 24035, 24035, 24035, 36228, 26576, 23114, 23114, 23114, 24981, 33811, 22468, 23511, 23511, 23511, 29028, 27443, 22493, 24923, 27965, 24035, 24035, 32797, 24946, 23443, 23114, 23114, 29636, 24997, 22849, 28252, 23511, 23511, 23511, 25042, 25110, 24035, 24035, 34085, 24036, 25133, 23114, 23114, 25152, 23029, 22839, 25169, 23511, 36764, 23511, 25645, 30403, 24035, 25186, 26576, 31806, 24093, 25212, 32683, 22516, 32713, 26245, 34293, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 24035, 32406, 23111, 23114, 28676, 30944, 27689, 25234, 24035, 23112, 19872, 37063, 23266, 24036, 23114, 30243, 20379, 26100, 29218, 20211, 30105, 25257, 25284, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 24834, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36034, 19288, 21671, 25314, 25072, 25330, 25346, 25362, 29939, 29951, 35288, 29984, 23812, 27216, 25405, 25424, 30456, 22584, 26292, 25461, 25480, 31592, 29116, 25516, 34963, 25545, 27007, 25579, 33937, 25614, 25661, 25686, 34872, 25702, 25718, 25734, 25769, 25795, 25811, 25840, 22493, 26533, 25856, 24035, 25876, 30763, 27481, 25909, 23114, 28987, 25936, 25954, 29700, 25983, 23511, 31412, 26043, 26063, 22568, 29241, 29592, 26116, 31216, 35383, 26170, 34783, 26194, 26221, 22839, 26241, 26261, 22477, 26283, 26308, 27306, 31035, 24655, 26576, 29854, 33386, 26341, 32683, 22516, 32153, 30926, 26361, 19996, 26381, 35463, 26397, 26424, 34646, 26478, 35605, 31386, 26494, 35567, 31964, 22940, 23689, 25218, 30309, 32289, 19830, 33605, 23112, 32109, 27733, 27084, 24496, 35886, 35221, 26525, 36602, 26549, 26558, 26574, 26594, 26613, 26629, 26666, 26700, 26578, 27685, 23740, 24285, 31691, 26733, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36397, 19552, 18991, 25887, 28117, 32618, 26776, 29483, 29939, 26802, 24035, 24035, 24036, 28664, 23114, 23114, 23114, 22420, 30297, 23511, 23511, 23511, 29116, 19803, 24035, 24035, 24035, 25559, 26576, 23114, 23114, 23114, 30525, 33811, 22468, 23511, 23511, 23511, 28725, 27443, 22493, 24035, 24035, 27249, 24035, 24035, 23113, 23114, 23114, 26827, 23114, 28618, 29700, 23511, 23511, 26845, 23511, 34564, 20402, 24035, 24035, 26979, 24036, 23114, 23114, 23114, 24974, 23029, 22839, 23511, 23511, 23511, 26865, 25645, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 32683, 22516, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 20499, 23511, 23261, 23628, 33305, 24035, 25598, 23114, 19874, 34253, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 26886, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 26931, 24569, 26439, 26947, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36019, 19288, 26995, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 27043, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 27061, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 29978, 24035, 24035, 23113, 23114, 33114, 23114, 23114, 30010, 29700, 23511, 35913, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 27155, 26576, 23114, 23114, 30447, 23036, 29695, 23511, 23511, 30935, 20099, 24152, 25529, 27100, 34461, 27121, 22625, 29156, 26009, 27137, 30422, 31903, 31655, 28870, 27171, 32439, 31731, 19830, 27232, 22612, 27265, 26786, 25494, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 20342, 27288, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 27322, 27339, 28020, 27361, 27382, 29939, 24035, 24035, 32581, 24036, 23114, 23114, 23114, 27425, 22420, 23511, 23511, 23511, 27442, 28306, 19803, 24035, 24035, 24035, 24035, 26710, 23114, 23114, 23114, 23114, 32261, 22468, 23511, 23511, 23511, 23511, 35719, 24694, 29510, 24035, 24035, 24035, 24035, 26717, 23114, 23114, 23114, 23114, 28618, 32217, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 27459, 23114, 23114, 23114, 36252, 23029, 20271, 23511, 23511, 23511, 28840, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 27480, 34483, 28401, 29761, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36382, 19288, 21605, 27497, 27517, 28504, 28898, 27569, 29939, 29401, 27600, 27323, 27633, 19025, 27662, 23114, 27705, 22420, 20483, 27721, 23511, 27765, 28306, 19803, 23540, 24035, 24610, 27781, 27805, 26650, 23114, 28573, 32990, 25920, 22468, 26870, 23511, 26684, 34262, 34737, 25057, 34622, 24035, 24035, 23971, 24206, 27825, 27847, 23114, 23114, 27865, 27885, 35766, 27914, 23511, 23511, 32766, 32844, 27934, 28795, 26909, 27955, 26092, 27988, 25445, 28005, 28036, 28052, 21965, 23511, 32196, 19897, 28072, 28102, 36534, 21541, 23801, 28153, 28180, 28197, 28221, 23036, 32695, 28251, 28268, 28292, 23667, 34825, 23930, 24580, 28322, 28344, 31627, 28366, 25996, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 35625, 33477, 33359, 27674, 28393, 33992, 24036, 23114, 30243, 19829, 28417, 28433, 28463, 23008, 19876, 20208, 23007, 20046, 20132, 28489, 28520, 20141, 24569, 31691, 19787, 28550, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 24035, 23112, 32618, 23511, 31507, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 24694, 28589, 24035, 24035, 24035, 24035, 28608, 23114, 23114, 23114, 23114, 28618, 20431, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36004, 19288, 28634, 31951, 28565, 28702, 28718, 28741, 32544, 20175, 28792, 32086, 20105, 28811, 29059, 29862, 28856, 22420, 28886, 30354, 23359, 28922, 28306, 28952, 23888, 26320, 36506, 24035, 29331, 28968, 36609, 23114, 29003, 31661, 27061, 30649, 27366, 23511, 29023, 27918, 24694, 24035, 24035, 23893, 33094, 30867, 23113, 23114, 23114, 29044, 34184, 30010, 29700, 23511, 23511, 29081, 29102, 34585, 20402, 27789, 24035, 24035, 24036, 23114, 29132, 23114, 23114, 23029, 20271, 23511, 29153, 23511, 23511, 30562, 30174, 24035, 24035, 27409, 25438, 23114, 23114, 29172, 36668, 31332, 23511, 23511, 29192, 30144, 24035, 23110, 30203, 23114, 23467, 31544, 23261, 23628, 24035, 22545, 23111, 23114, 29213, 27078, 27689, 29234, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 29257, 23008, 19876, 20208, 28768, 29290, 29320, 34776, 29353, 20141, 22435, 29378, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36367, 19288, 21605, 34616, 19006, 32618, 31497, 31507, 36216, 20184, 24035, 34393, 29424, 34668, 23114, 34900, 29447, 22420, 30360, 23511, 37089, 29473, 28306, 19803, 29499, 24398, 24035, 24035, 26576, 31799, 29532, 29550, 23114, 33811, 22468, 32298, 29571, 31184, 23511, 23512, 37127, 36628, 29589, 24035, 24135, 24035, 23113, 29608, 23114, 27831, 29634, 28618, 29652, 30037, 23511, 24172, 29671, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 29555, 29690, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 29719, 24035, 23110, 29738, 23114, 23467, 34035, 29756, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 29777, 34364, 28181, 30243, 29799, 31920, 27272, 27185, 23008, 31126, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29828, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35989, 19552, 19687, 35139, 28649, 29878, 29894, 29924, 29939, 23224, 23085, 31969, 24036, 35173, 24752, 24803, 23114, 22420, 31190, 30318, 24870, 23511, 28306, 29967, 23967, 24035, 24035, 24035, 26576, 30000, 23114, 23114, 23114, 33811, 22468, 30026, 23511, 23511, 23511, 23512, 26078, 24035, 24035, 24035, 30053, 37137, 30071, 23114, 23114, 33368, 25136, 28618, 30723, 23511, 23511, 37096, 31356, 34585, 20402, 30092, 30127, 30160, 24036, 35740, 30219, 24960, 30259, 23029, 20271, 34042, 30285, 30342, 30376, 23289, 30055, 30400, 30419, 30438, 32640, 33532, 33514, 30472, 18792, 26267, 24323, 23057, 30493, 23639, 20008, 30196, 33188, 30517, 20075, 23511, 30541, 23628, 30578, 33928, 28776, 30594, 19874, 30610, 30637, 19830, 30677, 27646, 19872, 25779, 23266, 23232, 35016, 30243, 30696, 29812, 30712, 30746, 27206, 30779, 30807, 23007, 33395, 20132, 26578, 27685, 31703, 22928, 31691, 19787, 31079, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36352, 19288, 23335, 30841, 26131, 30888, 30904, 30986, 29939, 24035, 24704, 31017, 20025, 23114, 26178, 31051, 31095, 22420, 23511, 22524, 31142, 31172, 28534, 31206, 35497, 25196, 24035, 28592, 24503, 23114, 31239, 31285, 23114, 31305, 31321, 31355, 31372, 31407, 23511, 30556, 24694, 24035, 27501, 19805, 24035, 24035, 23113, 23114, 31428, 24066, 23114, 28618, 29700, 23511, 31837, 18809, 23511, 34585, 31448, 24035, 24035, 24035, 23090, 23114, 23114, 23114, 23114, 31619, 35038, 23511, 23511, 23511, 23511, 33714, 24035, 33085, 24035, 29431, 23114, 31467, 23114, 23143, 31487, 23511, 31523, 23511, 35195, 36783, 24035, 30111, 23567, 23114, 23467, 31543, 31560, 23628, 24035, 24035, 23111, 23114, 19874, 30953, 31584, 34508, 24035, 31608, 26345, 37055, 23266, 31643, 31677, 31719, 31747, 31786, 31822, 26898, 23008, 19876, 31859, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 31878, 31936, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35974, 19288, 21605, 27972, 35663, 31985, 29655, 32001, 36715, 24785, 25893, 23545, 31912, 19853, 19916, 25938, 24540, 22420, 31843, 29674, 29573, 32735, 28936, 19803, 24035, 24035, 32047, 24035, 26576, 23114, 23114, 27544, 23114, 33811, 22468, 23511, 23511, 32161, 23511, 23512, 32066, 24035, 33313, 24035, 24035, 24035, 23113, 27426, 32102, 23114, 23114, 28618, 32125, 23511, 32144, 23511, 23511, 33569, 20402, 24035, 27045, 24035, 24036, 23114, 23114, 28328, 23114, 30076, 32177, 23511, 23511, 30384, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23595, 32212, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 22635, 25753, 32233, 32257, 32277, 19829, 26577, 26597, 20211, 23008, 19876, 32322, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 32352, 35285, 32380, 34196, 33016, 30661, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 32404, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 32422, 23511, 23511, 23511, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 30269, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 19949, 24035, 23111, 32455, 19874, 31269, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36337, 19552, 19209, 21617, 26509, 32475, 32491, 32529, 29939, 24035, 32578, 25241, 32597, 23114, 32634, 29007, 32656, 22420, 23511, 32729, 26365, 32751, 28306, 32788, 32882, 24035, 24035, 32813, 36727, 23114, 33182, 23114, 27553, 33235, 32829, 23511, 32706, 23511, 28906, 28377, 26962, 32881, 32904, 32898, 32920, 24035, 32953, 23114, 32977, 26408, 23114, 28164, 33006, 23511, 33039, 35774, 23511, 32306, 20402, 33076, 30872, 24035, 24036, 25408, 33110, 28979, 23114, 23029, 20271, 35835, 33130, 33054, 23511, 30562, 33148, 24035, 24035, 33167, 23114, 23114, 33775, 23036, 20459, 23511, 23511, 25464, 24646, 24035, 24035, 22446, 23114, 23114, 25627, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 31391, 33204, 33220, 33251, 33287, 26577, 26597, 20211, 33329, 19876, 33345, 23007, 20046, 20132, 26578, 27685, 28473, 22599, 31691, 33411, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35959, 19288, 21907, 27243, 29843, 32618, 33427, 31507, 29939, 33460, 34090, 24035, 24036, 33493, 24416, 33530, 23114, 22420, 33548, 24379, 33585, 23511, 28306, 19803, 33603, 24202, 24035, 24035, 25593, 33749, 28205, 23114, 23114, 32388, 22468, 33853, 33060, 23511, 23511, 31339, 33621, 24035, 24035, 34397, 24618, 30757, 33663, 23114, 23114, 33683, 35684, 28618, 26678, 23511, 23511, 32506, 33699, 34585, 20402, 24035, 32562, 26973, 24036, 23114, 23114, 33377, 33773, 23029, 20271, 23511, 23511, 30621, 23511, 23860, 24035, 33791, 21553, 26576, 36558, 23114, 33809, 23036, 32857, 26047, 23511, 33827, 23634, 24035, 24035, 23110, 23114, 23114, 31252, 23511, 33845, 23628, 24035, 24459, 23111, 23114, 33869, 27078, 30791, 29783, 24035, 24742, 19872, 33895, 23266, 26462, 19710, 33879, 33919, 26577, 26597, 24123, 24930, 21930, 20208, 30501, 33953, 25268, 20252, 33983, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36322, 19552, 23390, 33634, 35154, 34008, 34024, 34058, 35544, 34106, 34128, 26811, 33151, 34144, 34169, 34212, 23114, 34228, 34244, 34278, 34315, 23511, 34331, 34347, 34380, 34413, 24035, 24663, 26576, 34429, 34453, 34477, 29534, 33811, 22468, 34499, 34524, 34557, 25170, 34580, 35436, 23937, 34601, 24035, 24341, 26453, 23113, 34638, 34662, 23114, 24236, 28618, 34684, 34703, 34729, 23511, 35352, 34753, 34799, 24035, 34815, 32558, 34848, 34888, 35814, 34923, 23165, 29137, 23606, 30326, 30730, 34939, 33023, 30562, 36848, 34979, 24035, 24847, 34996, 23114, 23114, 35032, 29695, 35054, 23511, 23511, 35091, 33296, 35124, 24296, 28235, 24361, 36276, 32772, 35067, 35189, 27301, 30855, 24852, 22452, 35211, 35237, 35316, 25500, 35270, 23405, 24304, 35304, 29362, 24036, 23114, 35332, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 35368, 28823, 23920, 32336, 35405, 20141, 24569, 31691, 35421, 35479, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35944, 22795, 21605, 33647, 35877, 35513, 30962, 35529, 34073, 35557, 24035, 24035, 20405, 31107, 23114, 23114, 23114, 35590, 34713, 23511, 23511, 23511, 35641, 19803, 29408, 32937, 25298, 24035, 35657, 23115, 27849, 24760, 35679, 26205, 22468, 23511, 35700, 24907, 24901, 35075, 31893, 34980, 24035, 24035, 24035, 24035, 23113, 35009, 23114, 23114, 23114, 28618, 35716, 30970, 23511, 23511, 23511, 34585, 23215, 24035, 24035, 24035, 24036, 35735, 23114, 23114, 23114, 27105, 35756, 35790, 23511, 23511, 23511, 35254, 35446, 24035, 24035, 31223, 35809, 23114, 23114, 23036, 36825, 35830, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 31031, 20355, 19872, 33903, 23266, 24036, 23114, 28686, 19829, 26577, 26597, 20211, 23008, 23424, 20208, 24711, 31065, 24486, 26578, 27685, 20141, 19773, 35851, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36307, 19288, 21605, 35494, 19702, 32618, 33437, 31507, 29939, 25117, 24035, 27939, 24036, 27869, 23114, 26829, 23114, 22420, 23494, 23511, 33132, 23511, 28306, 19803, 24035, 34832, 24035, 24035, 26576, 23114, 25153, 23114, 23114, 33811, 22468, 23511, 23511, 35911, 23511, 23512, 24694, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 35929, 19288, 21605, 25860, 23112, 36185, 23511, 36201, 29939, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 22420, 23511, 23511, 23511, 23511, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 26748, 24035, 24035, 24035, 24035, 24035, 36249, 23114, 23114, 23114, 23114, 28618, 28835, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 27151, 24035, 26760, 23114, 27989, 23114, 23114, 36268, 20271, 23511, 24436, 23511, 29703, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36292, 19288, 21605, 36503, 21922, 32618, 34534, 31507, 36522, 24035, 33793, 24035, 35864, 23114, 23114, 36555, 23417, 22420, 23511, 23511, 36574, 26020, 28306, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 33811, 22468, 23511, 23511, 23511, 23511, 23512, 36592, 24035, 24035, 36625, 24035, 24035, 23113, 23114, 32961, 23114, 23114, 29618, 29700, 23511, 29086, 23511, 23511, 34585, 20402, 36644, 24035, 24035, 24036, 29740, 23114, 23114, 23114, 29065, 36663, 31527, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36079, 19288, 21605, 31451, 23112, 36684, 23511, 36700, 29939, 24035, 24035, 24035, 30185, 23114, 23114, 23114, 27526, 22420, 23511, 23511, 23511, 32865, 28306, 19803, 36743, 24035, 27017, 24035, 26576, 27535, 23114, 31432, 23114, 33811, 22468, 33271, 23511, 32128, 23511, 23512, 24694, 24035, 27196, 24035, 24035, 24035, 23113, 32459, 23114, 23114, 23114, 28618, 29700, 33829, 36762, 23511, 23511, 34585, 20402, 24035, 36746, 24035, 29722, 23114, 23114, 34437, 23114, 34907, 20271, 23511, 23511, 18801, 23511, 23206, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 36837, 24035, 24035, 33739, 23114, 23114, 25094, 23511, 23261, 23628, 24035, 36780, 23111, 24073, 19874, 27078, 35344, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22720, 19288, 36799, 36866, 17466, 36890, 36864, 21991, 22211, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 17631, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36883, 36906, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 22705, 19288, 19457, 36866, 17466, 36890, 36866, 19375, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18855, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36124, 19288, 36951, 36866, 17466, 36890, 36866, 21991, 22404, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18567, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36979, 36995, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 19457, 36866, 17466, 36890, 36866, 21991, 22971, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18027, 22984, 17553, 17572, 22285, 18462, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 17619, 22083, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 36139, 19288, 21529, 24035, 23112, 23033, 23511, 31507, 25377, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 37040, 23511, 23511, 23511, 23511, 28086, 19803, 24035, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23114, 24254, 37079, 23511, 23511, 23511, 23511, 23512, 34766, 24035, 24035, 24035, 24035, 24035, 23113, 23114, 23114, 23114, 23114, 28618, 29700, 23511, 23511, 23511, 23511, 34585, 20402, 24035, 24035, 24035, 24036, 23114, 23114, 23114, 23114, 23029, 20271, 23511, 23511, 23511, 23511, 30562, 24035, 24035, 24035, 26576, 23114, 23114, 23114, 23036, 29695, 23511, 23511, 23511, 23634, 24035, 24035, 23110, 23114, 23114, 23467, 23511, 23261, 23628, 24035, 24035, 23111, 23114, 19874, 27078, 27689, 19830, 24035, 23112, 19872, 27741, 23266, 24036, 23114, 30243, 19829, 26577, 26597, 20211, 23008, 19876, 20208, 23007, 20046, 20132, 26578, 27685, 20141, 24569, 31691, 19787, 29304, 20268, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 37112, 37160, 18469, 36866, 17466, 36890, 36866, 17656, 37174, 22987, 17556, 17575, 22288, 17486, 17509, 17525, 18373, 18537, 22984, 17553, 17572, 22285, 18780, 17990, 18622, 19411, 20306, 17996, 17689, 17470, 17591, 20896, 17468, 36883, 36906, 36867, 19404, 20299, 36866, 17647, 17862, 18921, 19514, 17705, 20311, 37017, 17728, 17756, 17784, 17800, 17825, 17854, 18403, 18928, 19521, 17712, 37008, 37024, 17878, 18884, 17900, 17922, 17944, 18178, 17960, 18012, 18381, 18064, 18218, 17884, 18890, 17906, 17928, 18102, 25022, 18130, 36931, 36963, 17493, 18150, 18166, 18214, 25010, 25026, 18134, 36935, 18262, 18278, 18294, 18320, 18336, 18361, 18397, 18274, 22096, 18304, 18448, 18485, 18523, 18553, 18583, 19149, 18638, 18497, 19656, 18664, 18680, 18507, 18696, 19164, 18712, 18737, 17681, 22026, 20906, 20915, 22054, 17838, 17450, 22022, 18765, 19225, 18841, 18871, 18906, 19241, 19257, 18976, 19041, 19056, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 19058, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 127011, 110630, 114730, 106539, 127011, 127011, 127011, 53264, 18, 18, 0, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 0, 0, 127011, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 3002368, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2576384, 2215936, 2215936, 2215936, 2416640, 2424832, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2543616, 2215936, 2215936, 2215936, 2215936, 2215936, 2629632, 2215936, 2617344, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2691072, 2215936, 2707456, 2215936, 2715648, 2215936, 2723840, 2764800, 2215936, 2215936, 2797568, 2215936, 2822144, 2215936, 2215936, 2854912, 2215936, 2215936, 2215936, 2912256, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 180224, 0, 0, 2174976, 0, 0, 2170880, 2617344, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2691072, 2170880, 2707456, 2170880, 2715648, 2170880, 2723840, 2764800, 2170880, 2170880, 2797568, 2170880, 2170880, 2797568, 2170880, 2822144, 2170880, 2170880, 2854912, 2170880, 2170880, 2170880, 2912256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2609152, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2654208, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 184599, 280, 0, 2174976, 0, 0, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 544, 0, 546, 0, 0, 2179072, 0, 0, 0, 552, 0, 0, 2170880, 2170880, 2170880, 3117056, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2158592, 2158592, 2232320, 2232320, 0, 2240512, 2240512, 0, 0, 0, 644, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3129344, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2400256, 2215936, 2215936, 2215936, 2215936, 2711552, 2170880, 2170880, 2170880, 2170880, 2170880, 2760704, 2768896, 2789376, 2813952, 2170880, 2170880, 2170880, 2875392, 2904064, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2453504, 2457600, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 167936, 0, 0, 0, 0, 2174976, 0, 0, 2215936, 2215936, 2514944, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2592768, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 32768, 0, 0, 0, 0, 0, 2174976, 32768, 0, 2633728, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2711552, 2215936, 2215936, 2215936, 2215936, 2215936, 2760704, 2768896, 2789376, 2813952, 2215936, 2215936, 2215936, 2875392, 2904064, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 0, 65819, 2215936, 2215936, 3031040, 2215936, 3055616, 2215936, 2215936, 2215936, 2215936, 3092480, 2215936, 2215936, 3125248, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3002368, 2215936, 2215936, 2170880, 2170880, 2494464, 2170880, 2170880, 0, 0, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2445312, 2170880, 2465792, 2473984, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2523136, 2170880, 2170880, 2641920, 2170880, 2170880, 2170880, 2699264, 2170880, 2727936, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2879488, 2170880, 2916352, 2170880, 2170880, 2170880, 2879488, 2170880, 2916352, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3026944, 2170880, 2170880, 3063808, 2170880, 2170880, 3112960, 2170880, 2170880, 3133440, 2170880, 2170880, 3112960, 2170880, 2170880, 3133440, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 2379776, 2215936, 2523136, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2596864, 2215936, 2621440, 2215936, 2215936, 2641920, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 548, 0, 0, 0, 0, 287, 2170880, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3117056, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2699264, 2215936, 2727936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2879488, 2215936, 2916352, 2215936, 2215936, 0, 0, 0, 0, 188416, 0, 2179072, 0, 0, 0, 0, 0, 287, 2170880, 0, 2171019, 2171019, 2171019, 2400395, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3031179, 2171019, 3055755, 2171019, 2171019, 2215936, 3133440, 2215936, 2215936, 2215936, 3162112, 2215936, 2215936, 3182592, 3186688, 2215936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2523275, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2597003, 2171019, 2621579, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 4337664, 28, 2170880, 2170880, 2170880, 2629632, 2170880, 2170880, 2170880, 2170880, 2719744, 2744320, 2170880, 2170880, 2170880, 2834432, 2838528, 2170880, 2908160, 2170880, 2170880, 2936832, 2215936, 2215936, 2215936, 2215936, 2719744, 2744320, 2215936, 2215936, 2215936, 2834432, 2838528, 2215936, 2908160, 2215936, 2215936, 2936832, 2215936, 2215936, 2985984, 2215936, 2994176, 2215936, 2215936, 3014656, 2215936, 3059712, 3076096, 3088384, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2445312, 2215936, 2465792, 2473984, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171019, 2171019, 2494603, 2171019, 2171019, 2215936, 2215936, 2215936, 3215360, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2985984, 2170880, 2994176, 2170880, 2170880, 3016168, 2170880, 3059712, 3076096, 3088384, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 124, 124, 0, 128, 128, 2170880, 2170880, 2170880, 3215360, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2486272, 2170880, 2170880, 2506752, 2170880, 2170880, 2170880, 2535424, 2539520, 2170880, 2170880, 2588672, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 2170880, 2170880, 3051520, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3170304, 0, 2387968, 2392064, 2170880, 2170880, 2433024, 2170880, 2170880, 2170880, 3170304, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2486272, 2215936, 2215936, 2506752, 2215936, 2215936, 2215936, 2535424, 2539520, 2215936, 2215936, 2588672, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 136, 0, 2215936, 2215936, 2920448, 2215936, 2215936, 2215936, 2990080, 2215936, 2215936, 2215936, 2215936, 3051520, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3108864, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3026944, 2215936, 2215936, 3063808, 2215936, 2215936, 3112960, 2215936, 2215936, 2215936, 3170304, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2453504, 2457600, 2170880, 2170880, 2170880, 2486272, 2170880, 2170880, 2506752, 2170880, 2170880, 2170880, 2537049, 2539520, 2170880, 2170880, 2588672, 2170880, 2170880, 2170880, 1508, 2170880, 2170880, 2170880, 1512, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 2170880, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2686976, 2748416, 2170880, 2170880, 2170880, 2924544, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3121152, 2170880, 2170880, 3145728, 3158016, 3166208, 2170880, 2420736, 2428928, 2170880, 2478080, 2170880, 2170880, 2170880, 2170880, 0, 0, 2170880, 2170880, 2170880, 2170880, 2646016, 2670592, 0, 0, 3145728, 3158016, 3166208, 2387968, 2392064, 2215936, 2215936, 2433024, 2215936, 2461696, 2215936, 2215936, 2215936, 2510848, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 0, 2170880, 2215936, 2215936, 2580480, 2215936, 2605056, 2637824, 2215936, 2215936, 2686976, 2748416, 2215936, 2215936, 2215936, 2924544, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 286, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 3121152, 2215936, 2215936, 3145728, 3158016, 3166208, 2387968, 2392064, 2170880, 2170880, 2433024, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 1625, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 647, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2576384, 2170880, 2170880, 2170880, 2170880, 2170880, 2609152, 2170880, 2170880, 2686976, 0, 0, 2748416, 2170880, 2170880, 0, 2170880, 2924544, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 0, 0, 28, 28, 2170880, 3141632, 2215936, 2420736, 2428928, 2215936, 2478080, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2215936, 2998272, 2215936, 3010560, 2215936, 2215936, 2215936, 3141632, 2170880, 2420736, 2428928, 2752512, 2756608, 0, 2846720, 2961408, 2170880, 2998272, 2170880, 3010560, 2170880, 2170880, 2170880, 3141632, 2170880, 2170880, 2490368, 2215936, 2490368, 2215936, 2215936, 2215936, 2547712, 2555904, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 245760, 0, 3129344, 2170880, 2170880, 2490368, 2170880, 2170880, 2170880, 0, 0, 2547712, 2555904, 2170880, 2170880, 2170880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 45056, 0, 2584576, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 1482, 97, 97, 97, 97, 97, 97, 97, 1354, 97, 97, 97, 97, 97, 97, 97, 97, 1148, 97, 97, 97, 97, 97, 97, 97, 2584576, 2170880, 2170880, 1512, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2441216, 2170880, 2527232, 2170880, 2600960, 2170880, 2850816, 2170880, 2170880, 2170880, 3022848, 2215936, 2441216, 2215936, 2527232, 2215936, 2600960, 2215936, 2850816, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 287, 2170880, 2215936, 3022848, 2170880, 2441216, 2170880, 2527232, 0, 0, 2170880, 2600960, 2170880, 0, 2850816, 2170880, 2170880, 2170880, 2170880, 2170880, 2523136, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2596864, 2170880, 2621440, 2170880, 2170880, 2641920, 2170880, 2170880, 2170880, 3022848, 2170880, 2519040, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2519040, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2453504, 2457600, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2514944, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2592768, 2170880, 2170880, 2519040, 0, 2024, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 2396160, 2170880, 2170880, 2170880, 2170880, 3018752, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396160, 0, 2024, 2170880, 2170880, 2170880, 2170880, 3018752, 2170880, 2650112, 2965504, 2170880, 2215936, 2650112, 2965504, 2215936, 0, 0, 2170880, 2650112, 2965504, 2170880, 2551808, 2170880, 2551808, 2215936, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 141, 45, 45, 67, 67, 67, 67, 67, 224, 67, 67, 238, 67, 67, 67, 67, 67, 67, 67, 1288, 67, 67, 67, 67, 67, 67, 67, 67, 67, 469, 67, 67, 67, 67, 67, 67, 0, 2551808, 2170880, 2170880, 2215936, 0, 2170880, 2170880, 2215936, 0, 2170880, 2170880, 2215936, 0, 2170880, 2977792, 2977792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 29, 102432, 127011, 110630, 114730, 106539, 127011, 127011, 127011, 53264, 18, 18, 49172, 0, 0, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 136, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 4256099, 4256099, 24, 24, 0, 28, 28, 2170880, 2461696, 2170880, 2170880, 2170880, 2510848, 2170880, 2170880, 0, 2170880, 2170880, 2580480, 2170880, 2605056, 2637824, 2170880, 2170880, 2170880, 2547712, 2555904, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3129344, 2215936, 2215936, 543, 543, 545, 545, 0, 0, 2179072, 0, 550, 551, 551, 0, 287, 2171166, 2171166, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 645, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 149, 2584576, 2170880, 2170880, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2441216, 2170880, 2527232, 2170880, 2600960, 2519040, 0, 0, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 2396160, 2170880, 2170880, 2170880, 2170880, 3018752, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396160, 0, 0, 2170880, 2170880, 2170880, 2170880, 3018752, 2170880, 2650112, 2965504, 53264, 18, 49172, 57366, 24, 155648, 28, 102432, 155648, 155687, 114730, 106539, 0, 0, 155648, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 0, 0, 0, 0, 2220032, 0, 94208, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 208896, 18, 278528, 24, 24, 0, 28, 28, 53264, 18, 159765, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 139394, 28, 28, 102432, 131, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 32768, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 546, 0, 0, 2183168, 0, 0, 552, 832, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2170880, 2609152, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2654208, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 1084, 0, 1088, 0, 1092, 0, 0, 0, 0, 0, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 937, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 644, 0, 0, 0, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 826, 0, 828, 0, 0, 2183168, 0, 0, 830, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2592768, 2170880, 2170880, 2170880, 2170880, 2633728, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2711552, 2170880, 2170880, 2170880, 2170880, 2170880, 2760704, 53264, 18, 49172, 57366, 24, 8192, 28, 172066, 172032, 110630, 172066, 106539, 0, 0, 172032, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 16384, 28, 28, 28, 28, 102432, 0, 98304, 0, 0, 2220032, 110630, 0, 0, 0, 0, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 45056, 0, 0, 0, 53264, 18, 49172, 57366, 25, 8192, 30, 102432, 0, 110630, 114730, 106539, 0, 0, 176219, 53264, 18, 18, 49172, 0, 57366, 0, 124, 124, 124, 0, 128, 128, 128, 128, 102432, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 0, 546, 0, 0, 2183168, 0, 65536, 552, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2170880, 2998272, 2170880, 3010560, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3198976, 2215936, 0, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 143, 45, 45, 67, 67, 67, 67, 67, 227, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1824, 67, 1826, 67, 67, 67, 67, 17, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 120, 121, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 2179072, 548, 0, 65820, 65820, 0, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 2033, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 978, 0, 546, 70179, 0, 2183168, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1013, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 473, 67, 67, 67, 67, 483, 67, 67, 1025, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1119, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1359, 97, 97, 97, 67, 67, 1584, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 497, 67, 67, 1659, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1667, 45, 45, 45, 45, 45, 169, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1668, 45, 45, 45, 45, 67, 67, 1694, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 774, 67, 67, 1713, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 1723, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 1538, 45, 45, 45, 45, 45, 1559, 45, 45, 1561, 45, 45, 45, 45, 45, 45, 45, 687, 45, 45, 45, 45, 45, 45, 45, 45, 448, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1771, 1772, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 67, 67, 67, 67, 67, 1821, 67, 67, 67, 67, 67, 67, 1827, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 1614, 97, 97, 97, 97, 97, 603, 97, 97, 605, 97, 97, 608, 97, 97, 97, 97, 0, 1532, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 450, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 1839, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 1883, 97, 1885, 97, 0, 1888, 0, 97, 97, 0, 97, 97, 1848, 97, 97, 97, 97, 1852, 45, 45, 45, 45, 45, 45, 45, 384, 391, 45, 45, 45, 45, 45, 45, 45, 385, 45, 45, 45, 45, 45, 45, 45, 45, 1237, 45, 45, 45, 45, 45, 45, 67, 0, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 1951, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1963, 97, 2023, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 1994, 67, 1995, 67, 67, 67, 67, 67, 67, 97, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 0, 0, 0, 0, 2220032, 110630, 0, 0, 0, 114730, 106539, 137, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2793472, 2805760, 2170880, 2830336, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3031040, 2170880, 3055616, 2170880, 2170880, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 281, 549, 0, 65820, 65820, 0, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 2031, 2032, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1769, 67, 0, 546, 70179, 549, 549, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1858, 45, 641, 0, 0, 0, 0, 41606, 926, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 456, 67, 0, 0, 0, 1313, 0, 0, 0, 1096, 1319, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1110, 97, 97, 97, 97, 67, 67, 67, 67, 1301, 1476, 0, 0, 0, 0, 1307, 1478, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1486, 97, 1487, 97, 1313, 1480, 0, 0, 0, 0, 1319, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 566, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1476, 0, 1478, 0, 1480, 0, 97, 97, 97, 97, 97, 97, 97, 45, 1853, 45, 1855, 45, 45, 45, 45, 53264, 18, 49172, 57366, 26, 8192, 31, 102432, 0, 110630, 114730, 106539, 0, 0, 225368, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 18, 49172, 163840, 57366, 0, 24, 24, 229376, 0, 28, 28, 28, 229376, 102432, 0, 0, 0, 0, 2220167, 110630, 0, 0, 0, 114730, 106539, 0, 2171019, 2171019, 2171019, 2171019, 2592907, 2171019, 2171019, 2171019, 2171019, 2633867, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2654347, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3117195, 2171019, 2171019, 2171019, 2171019, 2240641, 0, 0, 0, 0, 0, 0, 0, 0, 368, 0, 140, 2171019, 2171019, 2171019, 2416779, 2424971, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2617483, 2171019, 2171019, 2642059, 2171019, 2171019, 2171019, 2699403, 2171019, 2728075, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3215499, 2215936, 2215936, 2215936, 2215936, 2215936, 2437120, 2215936, 2215936, 2171019, 2822283, 2171019, 2171019, 2855051, 2171019, 2171019, 2171019, 2912395, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3002507, 2171019, 2171019, 2215936, 2215936, 2494464, 2215936, 2215936, 2215936, 2171166, 2171166, 2416926, 2425118, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2576670, 2171166, 2617630, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2691358, 2171166, 2707742, 2171166, 2715934, 2171166, 2724126, 2765086, 2171166, 2171166, 2797854, 2171166, 2822430, 2171166, 2171166, 2855198, 2171166, 2171166, 2171166, 2912542, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2793758, 2806046, 2171166, 2830622, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3109150, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2543902, 2171166, 2171166, 2171166, 2171166, 2171166, 2629918, 2793611, 2805899, 2171019, 2830475, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 0, 546, 0, 0, 2183168, 0, 0, 552, 0, 2171166, 2171166, 2171166, 2400542, 2171166, 2171166, 2171166, 0, 2171166, 2171166, 2171166, 0, 2171166, 2920734, 2171166, 2171166, 2171166, 2990366, 2171166, 2171166, 2171166, 2171166, 3117342, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 0, 53264, 0, 18, 18, 4329472, 2232445, 0, 2240641, 4337664, 2711691, 2171019, 2171019, 2171019, 2171019, 2171019, 2760843, 2769035, 2789515, 2814091, 2171019, 2171019, 2171019, 2875531, 2904203, 2171019, 2171019, 3092619, 2171019, 2171019, 3125387, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3199115, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2453504, 2457600, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2793472, 2805760, 2215936, 2830336, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2494464, 2170880, 2170880, 2171166, 2171166, 2634014, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2711838, 2171166, 2171166, 2171166, 2171166, 2171166, 2760990, 2769182, 2789662, 2814238, 2171166, 2171166, 2171166, 2875678, 2904350, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3199262, 2171166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2379915, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2445451, 2171019, 2465931, 2474123, 2171019, 2171019, 3113099, 2171019, 2171019, 3133579, 2171019, 2171019, 2171019, 3162251, 2171019, 2171019, 3182731, 3186827, 2171019, 2379776, 2879627, 2171019, 2916491, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3027083, 2171019, 2171019, 3063947, 2699550, 2171166, 2728222, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2879774, 2171166, 2916638, 2171166, 2171166, 2171166, 2171166, 2171166, 2609438, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2654494, 2171166, 2171166, 2171166, 2171166, 2171166, 2445598, 2171166, 2466078, 2474270, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2523422, 2171019, 2437259, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2543755, 2171019, 2171019, 2171019, 2584715, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2908299, 2171019, 2171019, 2936971, 2171019, 2171019, 2986123, 2171019, 2994315, 2171019, 2171019, 3014795, 2171019, 3059851, 3076235, 3088523, 2171166, 2171166, 2986270, 2171166, 2994462, 2171166, 2171166, 3014942, 2171166, 3059998, 3076382, 3088670, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3027230, 2171166, 2171166, 3064094, 2171166, 2171166, 3113246, 2171166, 2171166, 3133726, 2506891, 2171019, 2171019, 2171019, 2535563, 2539659, 2171019, 2171019, 2588811, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2691211, 2171019, 2707595, 2171019, 2715787, 2171019, 2723979, 2764939, 2171019, 2171019, 2797707, 2215936, 2215936, 3170304, 0, 0, 0, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2453790, 2457886, 2171166, 2171166, 2171166, 2486558, 2171166, 2171166, 2507038, 2171166, 2171166, 2171166, 2535710, 2539806, 2171166, 2171166, 2588958, 2171166, 2171166, 2171166, 2171166, 2515230, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2593054, 2171166, 2171166, 2171166, 2171166, 3051806, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3170590, 0, 2388107, 2392203, 2171019, 2171019, 2433163, 2171019, 2461835, 2171019, 2171019, 2171019, 2510987, 2171019, 2171019, 2171019, 2171019, 2580619, 2171019, 2605195, 2637963, 2171019, 2171019, 2171019, 2920587, 2171019, 2171019, 2171019, 2990219, 2171019, 2171019, 2171019, 2171019, 3051659, 2171019, 2171019, 2171019, 2453643, 2457739, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2515083, 2171019, 2171019, 2171019, 2171019, 2646155, 2670731, 2752651, 2756747, 2846859, 2961547, 2171019, 2998411, 2171019, 3010699, 2171019, 2171019, 2687115, 2748555, 2171019, 2171019, 2171019, 2924683, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3121291, 2171019, 2171019, 2171019, 3170443, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2486272, 2215936, 2215936, 2506752, 3145867, 3158155, 3166347, 2387968, 2392064, 2215936, 2215936, 2433024, 2215936, 2461696, 2215936, 2215936, 2215936, 2510848, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 0, 553, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 3121152, 2215936, 2215936, 3145728, 3158016, 3166208, 2388254, 2392350, 2171166, 2171166, 2433310, 2171166, 2461982, 2171166, 2171166, 2171166, 2511134, 2171166, 2171166, 0, 2171166, 2171166, 2580766, 2171166, 2605342, 2638110, 2171166, 2171166, 2171166, 2171166, 3031326, 2171166, 3055902, 2171166, 2171166, 2171166, 2171166, 3092766, 2171166, 2171166, 3125534, 2171166, 2171166, 2171166, 3162398, 2171166, 2171166, 3182878, 3186974, 2171166, 0, 0, 0, 2171019, 2171019, 2171019, 2171019, 3109003, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2215936, 2215936, 2400256, 2215936, 2215936, 2215936, 2215936, 2171166, 2687262, 0, 0, 2748702, 2171166, 2171166, 0, 2171166, 2924830, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 2597150, 2171166, 2621726, 2171166, 2171166, 2642206, 2171166, 2171166, 2171166, 2171166, 3121438, 2171166, 2171166, 3146014, 3158302, 3166494, 2171019, 2420875, 2429067, 2171019, 2478219, 2171019, 2171019, 2171019, 2171019, 2547851, 2556043, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 3129483, 2215936, 2171019, 3141771, 2215936, 2420736, 2428928, 2215936, 2478080, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2646016, 2670592, 2752512, 2756608, 2846720, 2961408, 2215936, 2998272, 2215936, 3010560, 2215936, 2215936, 2215936, 3141632, 2171166, 2421022, 2429214, 2171166, 2478366, 2171166, 2171166, 2171166, 2171166, 0, 0, 2171166, 2171166, 2171166, 2171166, 2646302, 2670878, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 0, 45, 45, 45, 45, 45, 1405, 1406, 45, 45, 45, 45, 1409, 45, 45, 45, 45, 45, 1415, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1238, 45, 45, 45, 45, 67, 2752798, 2756894, 0, 2847006, 2961694, 2171166, 2998558, 2171166, 3010846, 2171166, 2171166, 2171166, 3141918, 2171019, 2171019, 2490507, 3129344, 2171166, 2171166, 2490654, 2171166, 2171166, 2171166, 0, 0, 2547998, 2556190, 2171166, 2171166, 2171166, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 167, 45, 45, 45, 45, 185, 187, 45, 45, 198, 45, 45, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171166, 3129630, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2576523, 2171019, 2171019, 2171019, 2171019, 2171019, 2609291, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3002368, 2215936, 2215936, 2171166, 2171166, 2494750, 2171166, 2171166, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 147, 2584576, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 0, 0, 0, 2171166, 2171166, 2171166, 3002654, 2171166, 2171166, 2171019, 2171019, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2175257, 0, 0, 2584862, 2171166, 2171166, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2171019, 2441355, 2171019, 2527371, 2171019, 2601099, 2171019, 2850955, 2171019, 2171019, 2171019, 3022987, 2215936, 2441216, 2215936, 2527232, 2215936, 2600960, 2215936, 2850816, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2179072, 0, 0, 0, 0, 69632, 287, 2170880, 2215936, 3022848, 2171166, 2441502, 2171166, 2527518, 0, 0, 2171166, 2601246, 2171166, 0, 2851102, 2171166, 2171166, 2171166, 2171166, 2720030, 2744606, 2171166, 2171166, 2171166, 2834718, 2838814, 2171166, 2908446, 2171166, 2171166, 2937118, 3023134, 2171019, 2519179, 2171019, 2171019, 2171019, 2171019, 2171019, 2215936, 2519040, 2215936, 2215936, 2215936, 2215936, 2215936, 2171166, 2171166, 2171166, 3215646, 0, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2171019, 2486411, 2171019, 2171019, 2171019, 2629771, 2171019, 2171019, 2171019, 2171019, 2719883, 2744459, 2171019, 2171019, 2171019, 2834571, 2838667, 2171019, 2519326, 0, 0, 2171166, 2171166, 0, 2171166, 2171166, 2171166, 2396299, 2171019, 2171019, 2171019, 2171019, 3018891, 2396160, 2215936, 2215936, 2215936, 2215936, 3018752, 2396446, 0, 0, 2171166, 2171166, 2171166, 2171166, 3019038, 2171019, 2650251, 2965643, 2171019, 2215936, 2650112, 2965504, 2215936, 0, 0, 2171166, 2650398, 2965790, 2171166, 2551947, 2171019, 2551808, 2215936, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 144, 45, 45, 67, 67, 67, 67, 67, 228, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1929, 97, 97, 97, 97, 0, 0, 0, 2552094, 2171166, 2171019, 2215936, 0, 2171166, 2171019, 2215936, 0, 2171166, 2171019, 2215936, 0, 2171166, 2977931, 2977792, 2978078, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 1321, 97, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 140, 0, 2379776, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2445312, 2170880, 2465792, 2473984, 2170880, 2170880, 2170880, 2584576, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2170880, 2170880, 2170880, 3162112, 2170880, 2170880, 3182592, 3186688, 2170880, 0, 140, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3002368, 2170880, 2170880, 2215936, 2215936, 2494464, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 3215360, 544, 0, 0, 0, 544, 0, 546, 0, 0, 0, 546, 0, 0, 2183168, 0, 0, 552, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 0, 2170880, 2170880, 2170880, 0, 2170880, 2920448, 2170880, 2170880, 2170880, 2990080, 2170880, 2170880, 552, 0, 0, 0, 552, 0, 287, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2437120, 2170880, 2170880, 18, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 644, 0, 2215936, 2215936, 3170304, 544, 0, 546, 0, 552, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 0, 140, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 249856, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 151640, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2416640, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 253952, 110630, 114730, 106539, 0, 0, 32856, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 192512, 53264, 18, 18, 49172, 0, 57366, 0, 2232445, 184320, 2232445, 0, 2240641, 2240641, 184320, 2240641, 102432, 0, 0, 0, 221184, 2220032, 110630, 0, 0, 0, 114730, 106539, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3108864, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2215936, 0, 0, 0, 45056, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 0, 53264, 0, 18, 18, 24, 24, 0, 127, 127, 53264, 18, 49172, 258071, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 32768, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 204800, 53264, 18, 49172, 57366, 24, 27, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 33, 0, 33, 33, 33, 0, 0, 0, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 16384, 28, 28, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 2170880, 2170880, 2170880, 2416640, 67, 67, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 2030, 45, 45, 45, 45, 67, 1573, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1699, 67, 67, 67, 67, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1355, 97, 97, 97, 1358, 97, 97, 97, 641, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 1187, 45, 45, 45, 45, 45, 0, 1480, 0, 0, 0, 0, 1319, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 592, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1531, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1680, 45, 45, 45, 641, 0, 924, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1186, 45, 45, 45, 45, 45, 45, 67, 67, 37139, 37139, 24853, 24853, 0, 70179, 282, 0, 0, 65820, 65820, 369, 287, 97, 0, 0, 97, 97, 0, 97, 2028, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1767, 67, 67, 67, 0, 0, 0, 0, 0, 0, 1612, 97, 97, 97, 97, 97, 97, 0, 1785, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1790, 97, 0, 0, 2170880, 2170880, 3051520, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3170304, 241664, 2387968, 2392064, 2170880, 2170880, 2433024, 53264, 19, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 274432, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 270336, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 1134711, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 1126440, 1126440, 1126440, 0, 0, 1126400, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 36, 110630, 114730, 106539, 0, 0, 217088, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 94, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 96, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 24666, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 126, 28, 28, 28, 28, 102432, 53264, 122, 123, 49172, 0, 57366, 0, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 2170880, 2170880, 4256099, 0, 0, 0, 0, 0, 0, 0, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 1319, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1109, 97, 97, 97, 97, 1113, 132, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 146, 150, 45, 45, 45, 45, 45, 175, 45, 180, 45, 186, 45, 189, 45, 45, 203, 67, 256, 67, 67, 270, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 293, 297, 97, 97, 97, 97, 97, 322, 97, 327, 97, 333, 97, 0, 0, 97, 2026, 0, 2027, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1685, 67, 67, 67, 67, 67, 67, 67, 1690, 67, 336, 97, 97, 350, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 2424832, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2617344, 2170880, 45, 439, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 525, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 622, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1524, 97, 97, 1527, 369, 648, 45, 45, 45, 45, 45, 45, 45, 45, 45, 659, 45, 45, 45, 45, 408, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1239, 45, 45, 45, 67, 729, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 762, 67, 746, 67, 67, 67, 67, 67, 67, 67, 67, 67, 759, 67, 67, 67, 67, 0, 0, 0, 1477, 0, 1086, 0, 0, 0, 1479, 0, 1090, 67, 67, 796, 67, 67, 799, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1291, 67, 67, 67, 811, 67, 67, 67, 67, 67, 816, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 833, 97, 97, 97, 97, 97, 97, 97, 97, 1380, 0, 0, 0, 45, 45, 45, 45, 45, 1185, 45, 45, 45, 45, 45, 45, 45, 386, 45, 45, 45, 45, 45, 45, 45, 45, 1810, 45, 45, 45, 45, 45, 45, 67, 97, 97, 844, 97, 97, 97, 97, 97, 97, 97, 97, 97, 857, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 97, 97, 97, 894, 97, 97, 897, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1382, 45, 45, 45, 97, 909, 97, 97, 97, 97, 97, 914, 97, 97, 97, 97, 97, 97, 97, 923, 67, 67, 1079, 67, 67, 67, 67, 67, 37689, 1085, 25403, 1089, 66365, 1093, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 148, 1114, 97, 97, 97, 97, 97, 97, 1122, 97, 97, 97, 97, 97, 97, 97, 97, 97, 606, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1173, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 145, 45, 45, 67, 67, 67, 67, 67, 1762, 67, 67, 67, 1766, 67, 67, 67, 67, 67, 67, 528, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 1934, 67, 67, 1255, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1035, 67, 67, 67, 67, 67, 67, 1297, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1111, 97, 97, 97, 97, 97, 97, 1327, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 33344, 97, 97, 97, 1335, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 1377, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 670, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 430, 45, 45, 45, 45, 67, 67, 1438, 67, 67, 1442, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1592, 67, 67, 67, 1451, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1458, 67, 67, 67, 67, 0, 0, 1305, 0, 0, 0, 0, 0, 1311, 0, 0, 0, 1317, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1322, 97, 97, 1491, 97, 97, 1495, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1551, 45, 1553, 45, 1504, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1513, 97, 97, 97, 97, 0, 45, 45, 45, 45, 1536, 45, 45, 45, 45, 1540, 45, 67, 67, 67, 67, 67, 1585, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1700, 67, 67, 67, 97, 1648, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1541, 0, 97, 97, 97, 97, 0, 1940, 0, 97, 97, 97, 97, 97, 97, 45, 45, 2011, 45, 45, 45, 2015, 67, 67, 2017, 67, 67, 67, 2021, 97, 67, 67, 812, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 97, 97, 97, 910, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 923, 0, 0, 0, 45, 45, 45, 45, 1184, 45, 45, 45, 45, 1188, 45, 45, 45, 45, 1414, 45, 45, 45, 1417, 45, 1419, 45, 45, 45, 45, 45, 443, 45, 45, 45, 45, 45, 45, 453, 45, 45, 67, 67, 67, 67, 1244, 67, 67, 67, 67, 1248, 67, 67, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 282, 41098, 65820, 97, 1324, 97, 97, 97, 97, 1328, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 930, 45, 45, 45, 45, 97, 97, 97, 97, 1378, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 975, 45, 45, 45, 45, 67, 67, 1923, 67, 1925, 67, 67, 1927, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1985, 45, 45, 45, 45, 45, 45, 1560, 45, 45, 45, 45, 45, 45, 45, 45, 45, 946, 45, 45, 950, 45, 45, 45, 0, 97, 97, 97, 1939, 0, 0, 0, 97, 1943, 97, 97, 1945, 97, 45, 45, 45, 669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 990, 45, 45, 45, 67, 257, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 337, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 370, 2170880, 2170880, 2170880, 2416640, 401, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 459, 461, 67, 67, 67, 67, 67, 67, 67, 67, 475, 67, 480, 67, 67, 67, 67, 67, 67, 1054, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1698, 67, 67, 67, 67, 67, 484, 67, 67, 487, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1459, 67, 67, 97, 556, 558, 97, 97, 97, 97, 97, 97, 97, 97, 572, 97, 577, 97, 97, 0, 0, 1896, 97, 97, 97, 97, 97, 97, 1903, 45, 45, 45, 45, 983, 45, 45, 45, 45, 988, 45, 45, 45, 45, 45, 45, 1195, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1549, 45, 45, 45, 45, 45, 581, 97, 97, 584, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1153, 97, 97, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 662, 45, 45, 45, 684, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1004, 45, 45, 45, 67, 67, 67, 749, 67, 67, 67, 67, 67, 67, 67, 67, 67, 761, 67, 67, 67, 67, 67, 67, 1068, 67, 67, 67, 1071, 67, 67, 67, 67, 1076, 794, 795, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 544, 97, 97, 97, 97, 847, 97, 97, 97, 97, 97, 97, 97, 97, 97, 859, 97, 0, 0, 2025, 97, 20480, 97, 97, 2029, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1575, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1775, 67, 67, 67, 97, 97, 97, 97, 892, 893, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1515, 97, 993, 994, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 992, 67, 67, 67, 1284, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1607, 67, 67, 97, 1364, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 596, 97, 45, 1556, 1557, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 696, 45, 1596, 1597, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 499, 67, 97, 97, 97, 1621, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1346, 97, 97, 97, 97, 1740, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1678, 45, 45, 45, 45, 45, 67, 97, 97, 97, 97, 97, 97, 1836, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1984, 97, 45, 45, 45, 45, 45, 45, 1808, 45, 45, 45, 45, 45, 45, 45, 45, 67, 739, 67, 67, 67, 67, 67, 744, 45, 45, 1909, 45, 45, 45, 45, 45, 45, 45, 67, 1917, 67, 1918, 67, 67, 67, 67, 67, 67, 1247, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 532, 67, 67, 67, 67, 67, 67, 1922, 67, 67, 67, 67, 67, 67, 67, 97, 1930, 97, 1931, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1576, 67, 67, 67, 67, 1580, 67, 67, 0, 97, 97, 1938, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 699, 45, 45, 45, 704, 45, 45, 45, 45, 45, 45, 45, 45, 987, 45, 45, 45, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 97, 2006, 97, 97, 97, 97, 0, 45, 1533, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1416, 45, 45, 45, 45, 45, 45, 45, 45, 722, 723, 45, 45, 45, 45, 45, 45, 2045, 67, 67, 67, 2047, 0, 0, 97, 97, 97, 2051, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 409, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1957, 45, 67, 67, 67, 67, 67, 1836, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 67, 67, 1761, 67, 67, 67, 1764, 67, 67, 67, 67, 67, 67, 67, 494, 67, 67, 67, 67, 67, 67, 67, 67, 67, 787, 67, 67, 67, 67, 67, 67, 45, 45, 420, 45, 45, 422, 45, 45, 425, 45, 45, 45, 45, 45, 45, 45, 387, 45, 45, 45, 45, 397, 45, 45, 45, 67, 460, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 515, 67, 485, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 498, 67, 67, 67, 67, 67, 97, 0, 2039, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1426, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1689, 67, 67, 67, 97, 557, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 612, 97, 582, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 595, 97, 97, 97, 97, 97, 896, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 885, 97, 97, 97, 97, 97, 45, 939, 45, 45, 45, 45, 943, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1916, 67, 67, 67, 67, 67, 45, 67, 67, 67, 67, 67, 67, 67, 1015, 67, 67, 67, 67, 1019, 67, 67, 67, 67, 67, 67, 1271, 67, 67, 67, 67, 67, 67, 1277, 67, 67, 67, 67, 67, 67, 1287, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 804, 67, 67, 67, 67, 67, 1077, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2437120, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2543616, 2170880, 2170880, 2170880, 2170880, 2170880, 2629632, 1169, 97, 1171, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 936, 45, 45, 67, 67, 214, 67, 220, 67, 67, 233, 67, 243, 67, 248, 67, 67, 67, 67, 67, 67, 1298, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1617, 97, 0, 0, 0, 45, 45, 45, 1183, 45, 45, 45, 45, 45, 45, 45, 45, 45, 393, 45, 45, 45, 45, 45, 45, 67, 67, 1243, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1074, 67, 67, 1281, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 776, 1323, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 907, 45, 1412, 45, 45, 45, 45, 45, 45, 45, 1418, 45, 45, 45, 45, 45, 45, 686, 45, 45, 45, 690, 45, 45, 695, 45, 45, 67, 67, 67, 67, 67, 1465, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1712, 97, 97, 97, 97, 1741, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 426, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1924, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1983, 97, 97, 45, 45, 1987, 45, 1988, 45, 0, 97, 97, 97, 97, 0, 0, 0, 1942, 97, 97, 97, 97, 97, 45, 45, 45, 700, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 711, 45, 45, 153, 45, 45, 166, 45, 176, 45, 181, 45, 45, 188, 191, 196, 45, 204, 255, 258, 263, 67, 271, 67, 67, 0, 37139, 24853, 0, 0, 0, 282, 41098, 65820, 97, 97, 97, 294, 97, 300, 97, 97, 313, 97, 323, 97, 328, 97, 97, 335, 338, 343, 97, 351, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 0, 0, 0, 0, 0, 0, 0, 0, 41098, 0, 140, 45, 45, 45, 45, 1404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1411, 67, 67, 486, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1251, 67, 67, 501, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 513, 67, 67, 67, 67, 67, 67, 1443, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1263, 67, 67, 67, 67, 67, 97, 97, 583, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1526, 97, 598, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 610, 97, 97, 0, 97, 97, 1796, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1744, 45, 45, 45, 369, 0, 651, 45, 653, 45, 654, 45, 656, 45, 45, 45, 660, 45, 45, 45, 45, 1558, 45, 45, 45, 45, 45, 45, 45, 45, 1566, 45, 45, 681, 45, 683, 45, 45, 45, 45, 45, 45, 45, 45, 691, 692, 694, 45, 45, 45, 716, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 709, 45, 45, 712, 45, 714, 45, 45, 45, 718, 45, 45, 45, 45, 45, 45, 45, 726, 45, 45, 45, 733, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1691, 67, 67, 747, 67, 67, 67, 67, 67, 67, 67, 67, 67, 760, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 1613, 97, 97, 97, 97, 97, 97, 1509, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 67, 764, 67, 67, 67, 67, 768, 67, 770, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 1977, 67, 778, 779, 781, 67, 67, 67, 67, 67, 67, 788, 789, 67, 67, 792, 793, 67, 67, 67, 813, 67, 67, 67, 67, 67, 67, 67, 67, 67, 824, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 836, 97, 838, 97, 839, 97, 841, 97, 97, 97, 845, 97, 97, 97, 97, 97, 97, 97, 97, 97, 858, 97, 97, 0, 1728, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 1802, 45, 97, 97, 862, 97, 97, 97, 97, 866, 97, 868, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1788, 97, 97, 97, 0, 0, 97, 97, 876, 877, 879, 97, 97, 97, 97, 97, 97, 886, 887, 97, 97, 890, 891, 97, 97, 97, 97, 97, 97, 97, 899, 97, 97, 97, 903, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1646, 97, 97, 97, 97, 911, 97, 97, 97, 97, 97, 97, 97, 97, 97, 922, 923, 45, 955, 45, 957, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 195, 45, 45, 45, 45, 45, 981, 982, 45, 45, 45, 45, 45, 45, 989, 45, 45, 45, 45, 45, 170, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 411, 45, 45, 45, 45, 45, 67, 1023, 67, 67, 67, 67, 67, 67, 1031, 67, 1033, 67, 67, 67, 67, 67, 67, 67, 817, 819, 67, 67, 67, 67, 67, 37689, 544, 67, 1065, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 516, 67, 67, 1078, 67, 67, 1081, 1082, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 0, 2171166, 2171166, 2171166, 2171166, 2171166, 2437406, 2171166, 2171166, 97, 1115, 97, 1117, 97, 97, 97, 97, 97, 97, 1125, 97, 1127, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 1644, 97, 97, 97, 0, 97, 97, 97, 0, 97, 97, 1642, 97, 97, 97, 97, 97, 97, 625, 97, 97, 97, 97, 97, 97, 97, 97, 97, 316, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1159, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1502, 97, 97, 97, 97, 97, 1172, 97, 97, 1175, 1176, 97, 97, 12288, 0, 925, 0, 1179, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 45, 935, 45, 45, 45, 1233, 45, 45, 45, 1236, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1873, 67, 67, 45, 45, 1218, 45, 45, 45, 1223, 45, 45, 45, 45, 45, 45, 45, 1230, 45, 45, 67, 67, 215, 219, 222, 67, 230, 67, 67, 244, 246, 249, 67, 67, 67, 67, 67, 67, 1882, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 1904, 45, 1905, 45, 67, 67, 67, 67, 67, 1258, 67, 1260, 67, 67, 67, 67, 67, 67, 67, 67, 67, 495, 67, 67, 67, 67, 67, 67, 67, 67, 1283, 67, 67, 67, 67, 67, 67, 67, 1290, 67, 67, 67, 67, 67, 67, 67, 818, 67, 67, 67, 67, 67, 67, 37689, 544, 67, 67, 1295, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2174976, 0, 0, 97, 97, 97, 1326, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1514, 97, 97, 97, 97, 97, 1338, 97, 1340, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1500, 97, 97, 1503, 97, 1363, 97, 97, 97, 97, 97, 97, 97, 1370, 97, 97, 97, 97, 97, 97, 97, 563, 97, 97, 97, 97, 97, 97, 578, 97, 1375, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1179, 0, 45, 45, 45, 45, 685, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1003, 45, 45, 45, 45, 67, 67, 67, 1463, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1778, 97, 97, 97, 97, 97, 1518, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 609, 97, 97, 97, 45, 1542, 45, 45, 45, 45, 45, 45, 45, 1548, 45, 45, 45, 45, 45, 1554, 45, 1570, 1571, 45, 67, 67, 67, 67, 67, 67, 1578, 67, 67, 67, 67, 67, 67, 67, 1055, 67, 67, 67, 67, 67, 1061, 67, 67, 1582, 67, 67, 67, 67, 67, 67, 67, 1588, 67, 67, 67, 67, 67, 1594, 67, 67, 67, 67, 67, 97, 2038, 0, 97, 97, 97, 97, 97, 2044, 45, 45, 45, 995, 45, 45, 45, 45, 1000, 45, 45, 45, 45, 45, 45, 45, 1809, 45, 1811, 45, 45, 45, 45, 45, 67, 1610, 1611, 67, 1476, 0, 1478, 0, 1480, 0, 97, 97, 97, 97, 97, 97, 1618, 1647, 1649, 97, 97, 97, 1652, 97, 1654, 1655, 97, 0, 45, 45, 45, 1658, 45, 45, 67, 67, 216, 67, 67, 67, 67, 234, 67, 67, 67, 67, 252, 254, 1845, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 945, 45, 947, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1881, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 1902, 45, 45, 45, 45, 45, 45, 1908, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1921, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 0, 97, 1937, 97, 97, 1940, 0, 0, 97, 97, 97, 97, 97, 97, 1947, 1948, 1949, 45, 45, 45, 1952, 45, 1954, 45, 45, 45, 45, 1959, 1960, 1961, 67, 67, 67, 67, 67, 67, 1455, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 757, 67, 67, 67, 67, 67, 67, 1964, 67, 1966, 67, 67, 67, 67, 1971, 1972, 1973, 97, 0, 0, 0, 97, 97, 1104, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 884, 97, 97, 97, 889, 97, 97, 1978, 97, 0, 0, 1981, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 736, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1018, 67, 67, 67, 45, 67, 67, 67, 67, 0, 2049, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 933, 45, 45, 45, 45, 1234, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 97, 97, 288, 97, 97, 97, 97, 97, 97, 317, 97, 97, 97, 97, 97, 97, 0, 0, 97, 1787, 97, 97, 97, 97, 0, 0, 45, 45, 378, 45, 45, 45, 45, 45, 390, 45, 45, 45, 45, 45, 45, 45, 424, 45, 45, 45, 431, 433, 45, 45, 45, 67, 1050, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 518, 67, 97, 97, 97, 1144, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 632, 97, 97, 97, 97, 97, 97, 97, 1367, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 855, 97, 97, 97, 97, 67, 97, 97, 97, 97, 97, 97, 1837, 0, 97, 97, 97, 97, 97, 0, 0, 0, 1897, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1208, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 724, 45, 45, 45, 45, 45, 97, 2010, 45, 45, 45, 45, 45, 45, 2016, 67, 67, 67, 67, 67, 67, 2022, 45, 2046, 67, 67, 67, 0, 0, 2050, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 0, 932, 45, 45, 45, 45, 45, 1222, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1227, 45, 45, 45, 45, 45, 133, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 701, 702, 45, 45, 705, 706, 45, 45, 45, 45, 45, 45, 703, 45, 45, 45, 45, 45, 45, 45, 45, 45, 719, 45, 45, 45, 45, 45, 725, 45, 45, 45, 369, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1216, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 834, 97, 97, 97, 97, 97, 97, 97, 1342, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1799, 97, 97, 45, 45, 45, 1569, 45, 45, 45, 1572, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 1306, 0, 67, 67, 67, 1598, 67, 67, 67, 67, 67, 67, 67, 67, 1606, 67, 67, 1609, 97, 97, 97, 1650, 97, 97, 1653, 97, 97, 97, 0, 45, 45, 1657, 45, 45, 45, 1206, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1421, 45, 45, 45, 1703, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 1711, 97, 97, 0, 1895, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 958, 45, 960, 45, 45, 45, 45, 45, 45, 45, 45, 1913, 45, 45, 1915, 67, 67, 67, 67, 67, 67, 67, 466, 67, 67, 67, 67, 67, 67, 481, 67, 45, 1749, 45, 45, 45, 45, 45, 45, 45, 45, 1755, 45, 45, 45, 45, 45, 173, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 974, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1773, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1886, 0, 0, 0, 97, 97, 67, 2035, 2036, 67, 67, 97, 0, 0, 97, 2041, 2042, 97, 97, 45, 45, 45, 45, 1662, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1397, 45, 45, 45, 45, 151, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 437, 205, 45, 67, 67, 67, 218, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1047, 67, 67, 67, 67, 97, 97, 97, 97, 298, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 870, 97, 97, 97, 97, 97, 97, 97, 97, 352, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 0, 0, 0, 0, 0, 365, 0, 41098, 0, 140, 45, 45, 45, 45, 45, 1427, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1435, 520, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1037, 617, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 923, 45, 1232, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1919, 67, 1759, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1021, 45, 154, 45, 162, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 964, 45, 45, 45, 206, 45, 67, 67, 67, 67, 221, 67, 229, 67, 67, 67, 67, 67, 67, 67, 67, 530, 67, 67, 67, 67, 67, 67, 67, 67, 755, 67, 67, 67, 67, 67, 67, 67, 67, 785, 67, 67, 67, 67, 67, 67, 67, 67, 802, 67, 67, 67, 807, 67, 67, 67, 97, 97, 97, 97, 353, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 0, 0, 0, 0, 0, 366, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 402, 45, 45, 45, 45, 45, 45, 45, 410, 45, 45, 45, 45, 45, 45, 45, 674, 45, 45, 45, 45, 45, 45, 45, 45, 389, 45, 394, 45, 45, 398, 45, 45, 45, 45, 441, 45, 45, 45, 45, 45, 447, 45, 45, 45, 454, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1768, 67, 67, 67, 67, 67, 488, 67, 67, 67, 67, 67, 67, 67, 496, 67, 67, 67, 67, 67, 67, 67, 1774, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 67, 67, 523, 67, 67, 527, 67, 67, 67, 67, 67, 533, 67, 67, 67, 540, 97, 97, 97, 585, 97, 97, 97, 97, 97, 97, 97, 593, 97, 97, 97, 97, 97, 97, 1784, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 0, 18, 18, 24, 24, 0, 28, 28, 97, 97, 620, 97, 97, 624, 97, 97, 97, 97, 97, 630, 97, 97, 97, 637, 713, 45, 45, 45, 45, 45, 45, 721, 45, 45, 45, 45, 45, 45, 45, 45, 1197, 45, 45, 45, 45, 45, 45, 45, 45, 730, 732, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1581, 67, 45, 67, 67, 67, 67, 1012, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1059, 67, 67, 67, 67, 67, 1024, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 775, 67, 67, 67, 67, 1066, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 479, 67, 67, 67, 67, 67, 67, 1080, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 0, 0, 0, 0, 287, 0, 0, 0, 287, 0, 2379776, 2170880, 2170880, 97, 97, 97, 1118, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 920, 97, 97, 0, 0, 0, 0, 45, 1181, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 432, 45, 45, 45, 45, 45, 45, 1219, 45, 45, 45, 45, 45, 45, 1226, 45, 45, 45, 45, 45, 45, 959, 45, 45, 45, 45, 45, 45, 45, 45, 45, 184, 45, 45, 45, 45, 202, 45, 1241, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1266, 67, 1268, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1279, 67, 67, 67, 67, 67, 272, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 67, 67, 67, 1286, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1293, 67, 67, 67, 1296, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 281, 94, 0, 0, 97, 97, 97, 1366, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1373, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 0, 97, 1376, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 1384, 45, 45, 67, 208, 67, 67, 67, 67, 67, 67, 237, 67, 67, 67, 67, 67, 67, 67, 1069, 1070, 67, 67, 67, 67, 67, 67, 67, 0, 37140, 24854, 0, 0, 0, 0, 41098, 65821, 45, 1423, 45, 45, 45, 45, 45, 45, 67, 67, 1431, 67, 67, 67, 67, 67, 67, 67, 1083, 37689, 0, 25403, 0, 66365, 0, 0, 0, 1436, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1830, 67, 1452, 1453, 67, 67, 67, 67, 1456, 67, 67, 67, 67, 67, 67, 67, 67, 67, 771, 67, 67, 67, 67, 67, 67, 1461, 67, 67, 67, 1464, 67, 1466, 67, 67, 67, 67, 67, 67, 1470, 67, 67, 67, 67, 67, 67, 1587, 67, 67, 67, 67, 67, 67, 67, 67, 1595, 1489, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1129, 97, 1505, 1506, 97, 97, 97, 97, 1510, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1163, 1164, 97, 97, 97, 97, 97, 1516, 97, 97, 97, 1519, 97, 1521, 97, 97, 97, 97, 97, 97, 1525, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 67, 67, 67, 67, 67, 1586, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1276, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1600, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1301, 0, 0, 0, 1307, 97, 97, 1620, 97, 97, 97, 97, 97, 97, 97, 1627, 97, 97, 97, 97, 97, 97, 913, 97, 97, 97, 97, 919, 97, 97, 97, 0, 97, 97, 97, 1781, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 1792, 1860, 45, 1862, 1863, 45, 1865, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1875, 67, 1877, 1878, 67, 1880, 67, 97, 97, 97, 97, 97, 1887, 0, 1889, 97, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 237568, 0, 367, 0, 97, 1893, 0, 0, 0, 97, 1898, 1899, 97, 1901, 97, 45, 45, 45, 45, 45, 2014, 45, 67, 67, 67, 67, 67, 2020, 67, 97, 1989, 45, 1990, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1996, 67, 1997, 67, 67, 67, 67, 67, 273, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 97, 97, 97, 97, 0, 0, 97, 97, 2005, 0, 97, 2007, 97, 97, 18, 0, 139621, 0, 0, 0, 642, 0, 133, 364, 0, 0, 367, 41606, 0, 97, 97, 2056, 2057, 0, 2059, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 209, 67, 67, 67, 223, 67, 67, 67, 67, 67, 67, 67, 67, 67, 786, 67, 67, 67, 791, 67, 67, 45, 45, 940, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 727, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1016, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 0, 133, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 142, 45, 45, 67, 210, 67, 67, 67, 225, 67, 67, 239, 67, 67, 67, 250, 67, 67, 67, 67, 67, 464, 67, 67, 67, 67, 67, 476, 67, 67, 67, 67, 67, 67, 67, 1709, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 1843, 0, 67, 259, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 289, 97, 97, 97, 303, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 901, 97, 97, 97, 97, 97, 339, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 0, 358, 0, 0, 0, 0, 0, 0, 41098, 0, 140, 45, 45, 45, 45, 45, 1953, 45, 1955, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1687, 1688, 67, 67, 67, 67, 45, 45, 405, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1203, 45, 458, 67, 67, 67, 67, 67, 67, 67, 67, 67, 470, 477, 67, 67, 67, 67, 67, 67, 67, 1970, 97, 97, 97, 1974, 0, 0, 0, 97, 1103, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1372, 97, 97, 97, 97, 67, 522, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 536, 67, 67, 67, 67, 67, 67, 1696, 67, 67, 67, 67, 67, 67, 67, 1701, 67, 555, 97, 97, 97, 97, 97, 97, 97, 97, 97, 567, 574, 97, 97, 97, 97, 97, 301, 97, 309, 97, 97, 97, 97, 97, 97, 97, 97, 97, 900, 97, 97, 97, 905, 97, 97, 97, 619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 633, 97, 97, 18, 0, 139621, 0, 0, 362, 0, 0, 0, 364, 0, 0, 367, 41606, 369, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 663, 664, 67, 67, 67, 67, 750, 751, 67, 67, 67, 67, 758, 67, 67, 67, 67, 67, 67, 67, 1272, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1057, 1058, 67, 67, 67, 67, 67, 67, 67, 67, 797, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 512, 67, 67, 67, 97, 97, 97, 97, 895, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 902, 97, 97, 97, 97, 67, 67, 1051, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1062, 67, 67, 67, 67, 67, 491, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1302, 0, 0, 0, 1308, 97, 97, 97, 97, 1145, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1139, 97, 97, 97, 97, 1156, 97, 97, 97, 97, 97, 97, 1161, 97, 97, 97, 97, 97, 1166, 97, 97, 18, 640, 139621, 0, 641, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 67, 67, 67, 67, 1257, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 1305, 0, 0, 97, 97, 1337, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1630, 97, 67, 1474, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2380062, 2171166, 2171166, 97, 1529, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1228, 45, 45, 45, 45, 67, 67, 67, 67, 1707, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1891, 1739, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1198, 45, 1200, 45, 45, 45, 45, 97, 97, 1894, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 672, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1420, 45, 45, 45, 45, 67, 67, 1965, 67, 1967, 67, 67, 67, 97, 97, 97, 97, 0, 1976, 0, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 97, 97, 1979, 0, 0, 97, 1982, 97, 97, 97, 1986, 45, 45, 45, 45, 45, 735, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1770, 67, 67, 2000, 97, 97, 97, 2002, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1798, 97, 97, 97, 45, 45, 45, 2034, 67, 67, 67, 67, 97, 0, 0, 2040, 97, 97, 97, 97, 45, 45, 45, 45, 1752, 45, 45, 45, 1753, 1754, 45, 45, 45, 45, 45, 45, 383, 45, 45, 45, 45, 45, 45, 45, 45, 45, 675, 45, 45, 45, 45, 45, 45, 438, 45, 45, 45, 45, 45, 445, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1430, 67, 67, 67, 67, 67, 67, 67, 67, 67, 524, 67, 67, 67, 67, 67, 531, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 1096, 97, 97, 97, 621, 97, 97, 97, 97, 97, 628, 97, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 356, 28, 28, 665, 45, 45, 45, 45, 45, 45, 45, 45, 45, 676, 45, 45, 45, 45, 45, 942, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 707, 708, 45, 45, 45, 45, 763, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 809, 810, 67, 67, 67, 67, 783, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 1303, 0, 0, 0, 97, 861, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 613, 97, 45, 45, 956, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1215, 45, 67, 67, 67, 67, 1027, 67, 67, 67, 67, 1032, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 0, 25403, 0, 66365, 0, 0, 1097, 1064, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1075, 67, 1098, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 331, 97, 97, 97, 97, 1158, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 594, 97, 97, 1309, 0, 0, 0, 1315, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1374, 97, 45, 45, 1543, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1240, 67, 67, 1583, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1252, 67, 97, 97, 97, 1635, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1800, 97, 45, 45, 45, 97, 97, 1793, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1743, 45, 45, 45, 1746, 45, 0, 97, 97, 97, 97, 97, 1851, 97, 45, 45, 45, 45, 1856, 45, 45, 45, 45, 1864, 45, 45, 67, 67, 1869, 67, 67, 67, 67, 1874, 67, 0, 97, 97, 45, 67, 2058, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 45, 67, 211, 67, 67, 67, 67, 67, 67, 240, 67, 67, 67, 67, 67, 67, 67, 1444, 67, 67, 67, 67, 67, 67, 67, 67, 67, 509, 67, 67, 67, 67, 67, 67, 67, 67, 67, 268, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 290, 97, 97, 97, 305, 97, 97, 319, 97, 97, 97, 330, 97, 97, 18, 640, 139621, 0, 641, 0, 0, 0, 0, 364, 0, 643, 367, 41606, 97, 97, 348, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 380, 45, 45, 45, 45, 45, 45, 395, 45, 45, 45, 400, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 658, 45, 45, 45, 45, 45, 972, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 427, 45, 45, 45, 45, 45, 745, 67, 67, 67, 67, 67, 67, 67, 67, 756, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 1086, 25403, 1090, 66365, 1094, 0, 0, 97, 843, 97, 97, 97, 97, 97, 97, 97, 97, 854, 97, 97, 97, 97, 97, 97, 1121, 97, 97, 97, 97, 1126, 97, 97, 97, 97, 45, 980, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1400, 45, 67, 67, 67, 1011, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 1304, 0, 0, 0, 1190, 45, 45, 1193, 1194, 45, 45, 45, 45, 45, 1199, 45, 1201, 45, 45, 45, 45, 1911, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1579, 67, 67, 67, 67, 45, 1205, 45, 45, 45, 45, 45, 45, 45, 45, 1211, 45, 45, 45, 45, 45, 984, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1550, 45, 45, 45, 45, 45, 1217, 45, 45, 45, 45, 45, 45, 1225, 45, 45, 45, 45, 1229, 45, 45, 45, 1388, 45, 45, 45, 45, 45, 45, 1396, 45, 45, 45, 45, 45, 444, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1574, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1590, 67, 67, 67, 67, 67, 1254, 67, 67, 67, 67, 67, 1259, 67, 1261, 67, 67, 67, 67, 1265, 67, 67, 67, 67, 67, 67, 1708, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 67, 67, 67, 67, 1285, 67, 67, 67, 67, 1289, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 1087, 25403, 1091, 66365, 1095, 0, 0, 97, 97, 97, 97, 1339, 97, 1341, 97, 97, 97, 97, 1345, 97, 97, 97, 97, 97, 561, 97, 97, 97, 97, 97, 573, 97, 97, 97, 97, 97, 97, 1717, 97, 0, 97, 97, 97, 97, 97, 97, 97, 591, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1329, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1351, 97, 97, 97, 97, 97, 97, 1357, 97, 97, 97, 97, 97, 588, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 568, 97, 97, 97, 97, 97, 97, 97, 1365, 97, 97, 97, 97, 1369, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1356, 97, 97, 97, 97, 97, 97, 45, 45, 1403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1399, 45, 45, 45, 1413, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1669, 45, 1422, 45, 45, 1425, 45, 45, 1428, 45, 1429, 67, 67, 67, 67, 67, 67, 67, 67, 1468, 67, 67, 67, 67, 67, 67, 67, 67, 529, 67, 67, 67, 67, 67, 67, 539, 67, 67, 1475, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 140, 2170880, 2170880, 2170880, 2416640, 97, 97, 1530, 97, 0, 45, 45, 1534, 45, 45, 45, 45, 45, 45, 45, 45, 1956, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1599, 67, 67, 1601, 67, 67, 67, 67, 67, 67, 67, 67, 67, 803, 67, 67, 67, 67, 67, 67, 1632, 97, 1634, 0, 97, 97, 97, 1640, 97, 97, 97, 1643, 97, 97, 1645, 97, 97, 97, 97, 97, 912, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1660, 1661, 45, 45, 45, 45, 1665, 1666, 45, 45, 45, 45, 45, 1670, 1692, 1693, 67, 67, 67, 67, 67, 1697, 67, 67, 67, 67, 67, 67, 67, 1702, 97, 97, 1714, 1715, 97, 97, 97, 97, 0, 1721, 1722, 97, 97, 97, 97, 97, 97, 1353, 97, 97, 97, 97, 97, 97, 97, 97, 1362, 1726, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 1734, 97, 97, 97, 97, 97, 848, 849, 97, 97, 97, 97, 856, 97, 97, 97, 97, 97, 354, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 45, 45, 1750, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1681, 45, 0, 1846, 97, 97, 97, 97, 97, 97, 45, 45, 1854, 45, 45, 45, 45, 1859, 67, 67, 67, 1879, 67, 67, 97, 97, 1884, 97, 97, 0, 0, 0, 97, 97, 97, 1105, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1344, 97, 97, 97, 1347, 97, 1892, 97, 0, 0, 0, 97, 97, 97, 1900, 97, 97, 45, 45, 45, 45, 45, 997, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1002, 45, 45, 1005, 1006, 45, 67, 67, 67, 67, 67, 1926, 67, 67, 1928, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1737, 97, 0, 97, 97, 97, 97, 0, 0, 0, 97, 97, 1944, 97, 97, 1946, 45, 45, 45, 1544, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 190, 45, 45, 45, 152, 155, 45, 163, 45, 45, 177, 179, 182, 45, 45, 45, 193, 197, 45, 45, 45, 1672, 45, 45, 45, 45, 45, 1677, 45, 1679, 45, 45, 45, 45, 996, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1212, 45, 45, 45, 45, 67, 260, 264, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 295, 299, 302, 97, 310, 97, 97, 324, 326, 329, 97, 97, 97, 0, 97, 97, 1639, 0, 1641, 97, 97, 97, 97, 97, 97, 97, 97, 1511, 97, 97, 97, 97, 97, 97, 97, 97, 1523, 97, 97, 97, 97, 97, 97, 97, 97, 1719, 97, 97, 97, 97, 97, 97, 97, 97, 1720, 97, 97, 97, 97, 97, 97, 97, 312, 97, 97, 97, 97, 97, 97, 97, 97, 1123, 97, 97, 97, 97, 97, 97, 97, 340, 344, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 373, 375, 419, 45, 45, 45, 45, 45, 45, 45, 45, 45, 428, 45, 45, 435, 45, 45, 45, 1751, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1410, 45, 45, 45, 67, 67, 67, 505, 67, 67, 67, 67, 67, 67, 67, 67, 67, 514, 67, 67, 67, 67, 67, 67, 1969, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 45, 67, 0, 97, 45, 67, 0, 97, 2064, 2065, 0, 2066, 45, 521, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 534, 67, 67, 67, 67, 67, 67, 465, 67, 67, 67, 474, 67, 67, 67, 67, 67, 67, 67, 1467, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 1933, 0, 97, 97, 97, 602, 97, 97, 97, 97, 97, 97, 97, 97, 97, 611, 97, 97, 18, 640, 139621, 358, 641, 0, 0, 0, 0, 364, 0, 0, 367, 0, 618, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 631, 97, 97, 97, 97, 97, 881, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 569, 97, 97, 97, 97, 97, 369, 0, 45, 652, 45, 45, 45, 45, 45, 657, 45, 45, 45, 45, 45, 45, 1235, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1432, 67, 67, 67, 67, 67, 67, 67, 766, 67, 67, 67, 67, 67, 67, 67, 67, 773, 67, 67, 67, 0, 1305, 0, 1311, 0, 1317, 97, 97, 97, 97, 97, 97, 97, 1624, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 1724, 97, 97, 97, 777, 67, 67, 782, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 535, 67, 67, 67, 67, 67, 67, 67, 814, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 837, 97, 97, 97, 97, 97, 97, 1496, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 918, 97, 97, 97, 97, 0, 842, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1168, 97, 97, 97, 97, 864, 97, 97, 97, 97, 97, 97, 97, 97, 871, 97, 97, 97, 0, 1637, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1801, 45, 45, 97, 875, 97, 97, 880, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1151, 1152, 97, 97, 97, 67, 67, 67, 1040, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 790, 67, 67, 67, 1180, 0, 649, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 200, 45, 45, 67, 67, 67, 1454, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 806, 67, 67, 67, 0, 0, 0, 1481, 0, 1094, 0, 0, 97, 1483, 97, 97, 97, 97, 97, 97, 304, 97, 97, 318, 97, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 97, 97, 97, 1507, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1332, 97, 97, 97, 1619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1631, 97, 1633, 97, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1381, 0, 0, 45, 45, 45, 45, 97, 97, 1727, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 626, 97, 97, 97, 97, 97, 97, 636, 45, 45, 1760, 67, 67, 67, 67, 67, 67, 67, 1765, 67, 67, 67, 67, 67, 67, 67, 1299, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1616, 97, 97, 1803, 45, 45, 45, 45, 1807, 45, 45, 45, 45, 45, 1813, 45, 45, 45, 67, 67, 1684, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 822, 67, 67, 37689, 544, 67, 67, 1818, 67, 67, 67, 67, 1822, 67, 67, 67, 67, 67, 1828, 67, 67, 67, 67, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 2012, 2013, 45, 45, 67, 67, 67, 2018, 2019, 67, 67, 97, 67, 97, 97, 97, 1833, 97, 97, 0, 0, 97, 97, 1840, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 1733, 97, 1735, 97, 97, 97, 0, 97, 97, 97, 1849, 97, 97, 97, 45, 45, 45, 45, 45, 1857, 45, 45, 45, 1910, 45, 1912, 45, 45, 1914, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1017, 67, 67, 1020, 67, 45, 1861, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1872, 67, 67, 67, 67, 67, 67, 752, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1446, 67, 67, 67, 67, 67, 1876, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1890, 97, 97, 97, 97, 97, 1134, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 570, 97, 97, 97, 97, 580, 1935, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1906, 45, 67, 67, 67, 67, 2048, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 0, 0, 925, 41606, 0, 0, 0, 931, 45, 45, 45, 45, 45, 45, 1674, 45, 1676, 45, 45, 45, 45, 45, 45, 45, 446, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1871, 67, 67, 67, 67, 0, 97, 97, 45, 67, 0, 97, 2060, 2061, 0, 2063, 45, 67, 0, 97, 45, 45, 156, 45, 45, 45, 45, 45, 45, 45, 45, 45, 192, 45, 45, 45, 45, 1673, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 429, 45, 45, 45, 45, 67, 67, 67, 269, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 349, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 374, 45, 45, 67, 67, 213, 217, 67, 67, 67, 67, 67, 242, 67, 247, 67, 253, 45, 45, 698, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 399, 45, 45, 0, 0, 0, 0, 925, 41606, 0, 929, 0, 0, 45, 45, 45, 45, 45, 45, 1391, 45, 45, 1395, 45, 45, 45, 45, 45, 45, 423, 45, 45, 45, 45, 45, 45, 45, 436, 45, 67, 67, 67, 67, 1041, 67, 1043, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1776, 67, 67, 97, 97, 97, 1099, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 888, 97, 97, 97, 1131, 97, 97, 97, 97, 1135, 97, 1137, 97, 97, 97, 97, 97, 97, 97, 1497, 97, 97, 97, 97, 97, 97, 97, 97, 97, 883, 97, 97, 97, 97, 97, 97, 1310, 0, 0, 0, 1316, 0, 0, 0, 0, 1100, 0, 0, 0, 97, 97, 97, 97, 97, 1107, 97, 97, 97, 97, 97, 97, 97, 97, 1343, 97, 97, 97, 97, 97, 97, 1348, 0, 0, 1317, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1112, 97, 45, 1804, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1868, 67, 1870, 67, 67, 67, 67, 67, 1817, 67, 67, 1819, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 823, 67, 37689, 544, 67, 97, 1832, 97, 97, 1834, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 0, 1732, 97, 97, 97, 97, 97, 97, 97, 850, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1177, 0, 0, 925, 0, 0, 0, 0, 97, 97, 97, 97, 0, 0, 1941, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1991, 1992, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1998, 134, 0, 0, 0, 37, 110630, 0, 0, 0, 114730, 106539, 41098, 45, 45, 45, 45, 941, 45, 45, 944, 45, 45, 45, 45, 45, 45, 952, 45, 45, 207, 67, 67, 67, 67, 67, 226, 67, 67, 67, 67, 67, 67, 67, 67, 67, 820, 67, 67, 67, 67, 37689, 544, 369, 650, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1682, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 835, 97, 97, 97, 97, 97, 97, 97, 1522, 97, 97, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1725, 67, 67, 67, 1695, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1034, 67, 1036, 67, 67, 67, 265, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 97, 296, 97, 97, 97, 97, 314, 97, 97, 97, 97, 332, 334, 97, 97, 97, 97, 97, 1146, 1147, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1626, 97, 97, 97, 97, 97, 97, 345, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 372, 45, 45, 45, 1220, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1213, 45, 45, 45, 45, 404, 406, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 434, 45, 45, 45, 440, 45, 45, 45, 45, 45, 45, 45, 45, 451, 452, 45, 45, 45, 67, 1683, 67, 67, 67, 1686, 67, 67, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 67, 67, 490, 492, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1447, 67, 67, 1450, 67, 67, 67, 67, 67, 526, 67, 67, 67, 67, 67, 67, 67, 67, 537, 538, 67, 67, 67, 67, 67, 506, 67, 67, 508, 67, 67, 511, 67, 67, 67, 67, 0, 1476, 0, 0, 0, 0, 0, 1478, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1484, 97, 97, 97, 97, 97, 97, 865, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1499, 97, 97, 97, 97, 97, 97, 97, 97, 97, 587, 589, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 629, 97, 97, 97, 97, 97, 97, 97, 97, 97, 623, 97, 97, 97, 97, 97, 97, 97, 97, 634, 635, 97, 97, 97, 97, 97, 1160, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1628, 97, 97, 97, 97, 369, 0, 45, 45, 45, 45, 45, 655, 45, 45, 45, 45, 45, 45, 45, 45, 999, 45, 1001, 45, 45, 45, 45, 45, 45, 45, 45, 715, 45, 45, 45, 720, 45, 45, 45, 45, 45, 45, 45, 45, 728, 25403, 546, 70179, 0, 0, 66365, 66365, 552, 0, 97, 97, 97, 97, 97, 840, 97, 97, 97, 97, 97, 1174, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 0, 0, 0, 0, 1100, 97, 97, 97, 97, 97, 97, 97, 97, 627, 97, 97, 97, 97, 97, 97, 97, 938, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 680, 45, 968, 45, 970, 45, 973, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 962, 45, 45, 45, 45, 45, 979, 45, 45, 45, 45, 45, 985, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1224, 45, 45, 45, 45, 45, 45, 45, 45, 688, 45, 45, 45, 45, 45, 45, 45, 1007, 1008, 67, 67, 67, 67, 67, 1014, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1045, 67, 67, 67, 67, 67, 67, 67, 1038, 67, 67, 67, 67, 67, 67, 1044, 67, 1046, 67, 1049, 67, 67, 67, 67, 67, 67, 800, 67, 67, 67, 67, 67, 67, 808, 67, 67, 0, 0, 0, 1102, 97, 97, 97, 97, 97, 1108, 97, 97, 97, 97, 97, 97, 306, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1371, 97, 97, 97, 97, 97, 97, 97, 97, 1132, 97, 97, 97, 97, 97, 97, 1138, 97, 1140, 97, 1143, 97, 97, 97, 97, 97, 1352, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 869, 97, 97, 97, 97, 97, 45, 1191, 45, 45, 45, 45, 45, 1196, 45, 45, 45, 45, 45, 45, 45, 45, 1407, 45, 45, 45, 45, 45, 45, 45, 45, 986, 45, 45, 45, 45, 45, 45, 991, 45, 67, 67, 67, 1256, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1048, 67, 67, 67, 97, 1336, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 615, 97, 1386, 45, 1387, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 455, 45, 457, 45, 45, 1424, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1433, 67, 1434, 67, 67, 67, 67, 67, 767, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1591, 67, 1593, 67, 67, 45, 45, 1805, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1814, 45, 45, 1816, 67, 67, 67, 67, 1820, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1829, 67, 67, 67, 67, 67, 815, 67, 67, 67, 67, 821, 67, 67, 67, 37689, 544, 67, 1831, 97, 97, 97, 97, 1835, 0, 0, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1731, 97, 97, 97, 97, 97, 97, 97, 97, 97, 853, 97, 97, 97, 97, 97, 97, 0, 97, 97, 97, 97, 1850, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1547, 45, 45, 45, 45, 45, 45, 45, 45, 1664, 45, 45, 45, 45, 45, 45, 45, 45, 961, 45, 45, 45, 45, 965, 45, 967, 1907, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1920, 0, 1936, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 67, 67, 67, 67, 67, 67, 1763, 67, 67, 67, 67, 67, 67, 67, 67, 1056, 67, 67, 67, 67, 67, 67, 67, 67, 1273, 67, 67, 67, 67, 67, 67, 67, 67, 1457, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 28672, 97, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 2054, 97, 97, 291, 97, 97, 97, 97, 97, 97, 320, 97, 97, 97, 97, 97, 97, 307, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 926, 1179, 0, 45, 377, 45, 45, 45, 381, 45, 45, 392, 45, 45, 396, 45, 45, 45, 45, 971, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1756, 45, 45, 45, 67, 67, 67, 67, 463, 67, 67, 67, 467, 67, 67, 478, 67, 67, 482, 67, 67, 67, 67, 67, 1028, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1469, 67, 67, 1472, 67, 502, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1460, 67, 97, 97, 97, 97, 560, 97, 97, 97, 564, 97, 97, 575, 97, 97, 579, 97, 97, 97, 97, 97, 1368, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 930, 97, 599, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 872, 97, 45, 666, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1758, 0, 362, 0, 0, 925, 41606, 0, 0, 0, 0, 45, 45, 934, 45, 45, 45, 164, 168, 174, 178, 45, 45, 45, 45, 45, 194, 45, 45, 45, 165, 45, 45, 45, 45, 45, 45, 45, 45, 45, 199, 45, 45, 45, 67, 67, 1010, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1060, 67, 67, 67, 67, 67, 67, 1052, 1053, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1063, 97, 1157, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1167, 97, 97, 97, 97, 97, 1379, 97, 97, 97, 0, 0, 0, 45, 1383, 45, 45, 45, 1806, 45, 45, 45, 45, 45, 45, 1812, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1577, 67, 67, 67, 67, 67, 67, 67, 753, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1262, 67, 67, 67, 67, 67, 67, 67, 1282, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1471, 67, 45, 1402, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 417, 45, 67, 1462, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 37689, 544, 97, 1517, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1128, 97, 97, 97, 97, 1636, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 851, 97, 97, 97, 97, 97, 97, 97, 67, 67, 1705, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1842, 0, 0, 1779, 97, 97, 97, 1782, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1789, 97, 97, 0, 0, 0, 97, 1847, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1675, 45, 45, 45, 45, 45, 45, 45, 45, 737, 738, 67, 740, 67, 741, 67, 743, 67, 67, 67, 67, 67, 67, 1968, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 45, 67, 0, 97, 45, 67, 2062, 97, 45, 67, 0, 97, 45, 67, 67, 97, 97, 2001, 97, 0, 0, 2004, 97, 97, 0, 97, 97, 97, 97, 1797, 97, 97, 97, 97, 97, 45, 45, 45, 67, 261, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 97, 292, 97, 97, 97, 97, 311, 315, 321, 325, 97, 97, 97, 97, 97, 97, 1623, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1330, 97, 97, 1333, 1334, 97, 341, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 0, 363, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 1221, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 413, 45, 45, 416, 45, 376, 45, 45, 45, 45, 382, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1408, 45, 45, 45, 45, 45, 403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 414, 45, 45, 45, 418, 67, 67, 67, 462, 67, 67, 67, 67, 468, 67, 67, 67, 67, 67, 67, 67, 67, 1602, 67, 1604, 67, 67, 67, 67, 67, 67, 67, 67, 489, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 500, 67, 67, 67, 67, 67, 1067, 67, 67, 67, 67, 67, 1072, 67, 67, 67, 67, 67, 67, 274, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 67, 67, 504, 67, 67, 67, 67, 67, 67, 67, 510, 67, 67, 67, 517, 519, 541, 67, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 554, 97, 97, 97, 559, 97, 97, 97, 97, 565, 97, 97, 97, 97, 97, 97, 97, 1718, 0, 97, 97, 97, 97, 97, 97, 97, 898, 97, 97, 97, 97, 97, 97, 906, 97, 97, 97, 97, 586, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 597, 97, 97, 97, 97, 97, 1520, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 45, 1656, 45, 45, 45, 97, 97, 601, 97, 97, 97, 97, 97, 97, 97, 607, 97, 97, 97, 614, 616, 638, 97, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 369, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 661, 45, 45, 45, 407, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1815, 45, 67, 45, 667, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 678, 45, 45, 45, 421, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 976, 977, 45, 45, 45, 682, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 693, 45, 45, 697, 67, 67, 748, 67, 67, 67, 67, 754, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1274, 67, 67, 67, 67, 67, 67, 67, 67, 765, 67, 67, 67, 67, 769, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1589, 67, 67, 67, 67, 67, 67, 67, 67, 780, 67, 67, 784, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1777, 67, 97, 97, 97, 97, 97, 97, 846, 97, 97, 97, 97, 852, 97, 97, 97, 97, 97, 97, 97, 1742, 45, 45, 45, 45, 45, 45, 45, 1747, 97, 97, 97, 863, 97, 97, 97, 97, 867, 97, 97, 97, 97, 97, 97, 97, 308, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 1178, 925, 0, 1179, 0, 97, 97, 97, 878, 97, 97, 882, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 12288, 0, 925, 0, 1179, 0, 908, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 954, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 963, 45, 45, 966, 45, 45, 157, 45, 45, 171, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 948, 45, 45, 45, 45, 45, 1022, 67, 67, 1026, 67, 67, 67, 1030, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1603, 1605, 67, 67, 67, 1608, 67, 67, 67, 1039, 67, 67, 1042, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 471, 67, 67, 67, 67, 67, 0, 1100, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 904, 97, 97, 97, 97, 1116, 97, 97, 1120, 97, 97, 97, 1124, 97, 97, 97, 97, 97, 97, 562, 97, 97, 97, 571, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1133, 97, 97, 1136, 97, 97, 97, 97, 97, 97, 97, 97, 915, 917, 97, 97, 97, 97, 97, 0, 97, 1170, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 925, 0, 0, 0, 0, 0, 41606, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1993, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1275, 67, 67, 67, 1278, 67, 0, 0, 0, 45, 45, 1182, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1189, 1204, 45, 45, 45, 1207, 45, 45, 1209, 45, 1210, 45, 45, 45, 45, 45, 45, 1546, 45, 45, 45, 45, 45, 45, 45, 45, 45, 689, 45, 45, 45, 45, 45, 45, 1231, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 236, 67, 67, 67, 67, 67, 67, 67, 801, 67, 67, 67, 805, 67, 67, 67, 67, 67, 1242, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1249, 67, 67, 67, 67, 67, 67, 507, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1300, 0, 0, 0, 0, 0, 1267, 67, 67, 1269, 67, 1270, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1280, 97, 1349, 97, 1350, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1360, 97, 97, 97, 0, 1980, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 673, 45, 45, 45, 45, 677, 45, 45, 45, 45, 1401, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 953, 67, 1437, 67, 1440, 67, 67, 67, 67, 1445, 67, 67, 67, 1448, 67, 67, 67, 67, 67, 67, 1029, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1825, 67, 67, 67, 67, 67, 1473, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1320, 0, 834, 97, 97, 97, 97, 1490, 97, 1493, 97, 97, 97, 97, 1498, 97, 97, 97, 1501, 97, 97, 97, 0, 97, 1638, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 916, 97, 97, 97, 97, 97, 97, 0, 1528, 97, 97, 97, 0, 45, 45, 45, 1535, 45, 45, 45, 45, 45, 45, 45, 1867, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1932, 0, 0, 1555, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1567, 45, 45, 158, 45, 45, 172, 45, 45, 45, 183, 45, 45, 45, 45, 201, 45, 45, 67, 212, 67, 67, 67, 67, 231, 235, 241, 245, 67, 67, 67, 67, 67, 67, 493, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 472, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1651, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 1539, 45, 45, 45, 67, 1704, 67, 1706, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1841, 97, 0, 1844, 97, 97, 97, 97, 1716, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 590, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 1385, 1748, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1757, 45, 45, 159, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 415, 45, 45, 97, 97, 1780, 97, 97, 97, 0, 0, 1786, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1730, 0, 97, 97, 97, 97, 97, 1736, 97, 1738, 67, 97, 97, 97, 97, 97, 97, 0, 1838, 97, 97, 97, 97, 97, 0, 0, 97, 1729, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1162, 97, 97, 97, 1165, 97, 97, 97, 45, 1950, 45, 45, 45, 45, 45, 45, 45, 45, 1958, 67, 67, 67, 1962, 67, 67, 67, 67, 67, 1246, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 1710, 97, 97, 97, 1999, 67, 97, 97, 97, 97, 0, 2003, 97, 97, 97, 0, 97, 97, 2008, 2009, 45, 67, 67, 67, 67, 0, 0, 97, 97, 97, 97, 45, 2052, 67, 2053, 0, 0, 0, 0, 925, 41606, 0, 0, 930, 0, 45, 45, 45, 45, 45, 45, 1392, 45, 1394, 45, 45, 45, 45, 45, 45, 45, 1545, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1563, 1565, 45, 45, 45, 1568, 0, 97, 2055, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 28672, 97, 45, 45, 160, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 679, 45, 45, 67, 67, 266, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 346, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 0, 362, 0, 364, 0, 367, 41098, 369, 140, 371, 45, 45, 45, 379, 45, 45, 45, 388, 45, 45, 45, 45, 45, 45, 45, 45, 1663, 45, 45, 45, 45, 45, 45, 45, 45, 45, 449, 45, 45, 45, 45, 45, 67, 67, 542, 37139, 37139, 24853, 24853, 0, 70179, 0, 0, 0, 65820, 65820, 369, 287, 97, 97, 97, 97, 97, 1622, 97, 97, 97, 97, 97, 97, 97, 1629, 97, 97, 0, 1794, 1795, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1745, 45, 45, 97, 639, 18, 0, 139621, 0, 0, 0, 0, 0, 0, 364, 0, 0, 367, 41606, 45, 731, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 251, 67, 67, 67, 67, 67, 798, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1073, 67, 67, 67, 860, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 873, 0, 0, 1101, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 921, 97, 0, 67, 67, 67, 67, 1245, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1250, 67, 67, 1253, 0, 0, 1312, 0, 0, 0, 1318, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1106, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1149, 97, 97, 97, 97, 97, 1155, 97, 97, 1325, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1141, 97, 97, 67, 67, 1439, 67, 1441, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1264, 67, 67, 67, 97, 97, 1492, 97, 1494, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1331, 97, 97, 97, 97, 67, 67, 67, 2037, 67, 97, 0, 0, 97, 97, 97, 2043, 97, 45, 45, 45, 442, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 232, 67, 67, 67, 67, 67, 67, 67, 67, 1823, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1975, 0, 0, 97, 874, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1142, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 65, 86, 117, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 63, 84, 115, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 61, 82, 113, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 59, 80, 111, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 57, 78, 109, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 55, 76, 107, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 53, 74, 105, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 51, 72, 103, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 49, 70, 101, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 47, 68, 99, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 45, 67, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 213085, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 0, 0, 44, 0, 0, 32863, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 41, 41, 41, 0, 0, 1138688, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 0, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 89, 53264, 18, 18, 49172, 0, 57366, 0, 24, 24, 24, 0, 127, 127, 127, 127, 102432, 67, 262, 67, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 342, 97, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 360, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 717, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 412, 45, 45, 45, 45, 45, 67, 1009, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1292, 67, 67, 1294, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 97, 97, 97, 1615, 97, 97, 97, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 66, 87, 118, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 64, 85, 116, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 62, 83, 114, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 60, 81, 112, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 58, 79, 110, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 56, 77, 108, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 54, 75, 106, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 52, 73, 104, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 50, 71, 102, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 48, 69, 100, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 37, 110630, 114730, 106539, 46, 67, 98, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 233472, 53264, 18, 49172, 57366, 24, 8192, 28, 102432, 0, 110630, 114730, 106539, 0, 0, 69724, 53264, 18, 18, 49172, 0, 57366, 262144, 24, 24, 24, 0, 28, 28, 28, 28, 102432, 45, 45, 161, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 710, 45, 45, 28, 139621, 359, 0, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 1389, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 949, 45, 45, 45, 45, 67, 503, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1449, 67, 67, 97, 600, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1154, 97, 0, 0, 0, 0, 925, 41606, 927, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1866, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 772, 67, 67, 67, 67, 67, 45, 45, 969, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 951, 45, 45, 45, 45, 1192, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1202, 45, 45, 0, 0, 0, 1314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1488, 67, 67, 267, 67, 67, 67, 67, 0, 37139, 24853, 0, 0, 0, 0, 41098, 65820, 97, 347, 97, 97, 97, 97, 0, 53264, 0, 18, 18, 24, 24, 0, 28, 28, 139621, 0, 361, 0, 0, 364, 0, 367, 41098, 369, 140, 45, 45, 45, 45, 734, 45, 45, 45, 67, 67, 67, 67, 67, 742, 67, 67, 45, 45, 668, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1214, 45, 45, 1130, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1361, 97, 45, 45, 1671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1552, 45, 45, 0, 0, 0, 0, 2220032, 0, 0, 1130496, 0, 0, 0, 0, 2170880, 2171020, 2170880, 2170880, 18, 0, 0, 131072, 0, 0, 0, 90112, 0, 2220032, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 1485, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 1537, 45, 45, 45, 45, 45, 1390, 45, 1393, 45, 45, 45, 45, 1398, 45, 45, 45, 2170880, 2171167, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2576384, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 0, 0, 0, 0, 0, 2174976, 0, 0, 0, 0, 0, 0, 2183168, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 2721252, 2744320, 2170880, 2170880, 2170880, 2834432, 2840040, 2170880, 2908160, 2170880, 2170880, 2936832, 2170880, 2170880, 2985984, 2170880, 2994176, 2170880, 2170880, 3014656, 2170880, 3059712, 3076096, 3088384, 2170880, 2170880, 2170880, 2170880, 0, 0, 0, 0, 2220032, 0, 0, 0, 1142784, 0, 0, 0, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3215360, 2215936, 2215936, 2215936, 2215936, 2215936, 2437120, 2215936, 2215936, 2215936, 3117056, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 2215936, 0, 543, 0, 545, 0, 0, 2183168, 0, 0, 831, 0, 2170880, 2170880, 2170880, 2400256, 2170880, 2170880, 2170880, 2170880, 3031040, 2170880, 3055616, 2170880, 2170880, 2170880, 2170880, 3092480, 2170880, 2170880, 3125248, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 2170880, 3198976, 2170880, 0, 0, 0, 0, 0, 0, 67, 67, 37139, 37139, 24853, 24853, 0, 0, 0, 0, 0, 65820, 65820, 0, 287, 97, 97, 97, 97, 97, 1783, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 1791, 0, 0, 546, 70179, 0, 0, 0, 0, 552, 0, 97, 97, 97, 97, 97, 97, 97, 604, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1150, 97, 97, 97, 97, 97, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 147456, 0, 0, 147456, 0, 0, 0, 0, 925, 41606, 0, 928, 0, 0, 45, 45, 45, 45, 45, 45, 998, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1562, 45, 1564, 45, 45, 45, 45, 0, 2158592, 2158592, 0, 0, 0, 0, 2232320, 2232320, 2232320, 0, 2240512, 2240512, 2240512, 2240512, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2170880, 2170880, 2170880, 2416640
+];
+
+JSONiqTokenizer.EXPECTED =
+[ 291, 300, 304, 341, 315, 309, 305, 295, 319, 323, 327, 329, 296, 333, 337, 339, 342, 346, 350, 294, 356, 360, 312, 367, 352, 371, 363, 375, 379, 383, 387, 391, 395, 726, 399, 405, 518, 684, 405, 405, 405, 405, 808, 405, 405, 405, 512, 405, 405, 405, 431, 405, 405, 406, 405, 405, 404, 405, 405, 405, 405, 405, 405, 405, 908, 631, 410, 415, 405, 414, 419, 608, 405, 429, 602, 405, 435, 443, 405, 441, 641, 478, 405, 447, 451, 450, 456, 643, 461, 460, 762, 679, 465, 469, 741, 473, 477, 482, 486, 492, 932, 931, 523, 498, 504, 720, 405, 510, 596, 405, 516, 941, 580, 522, 929, 527, 590, 589, 897, 939, 534, 538, 547, 551, 555, 559, 563, 567, 571, 969, 575, 708, 690, 689, 579, 584, 634, 405, 594, 731, 405, 600, 882, 405, 606, 895, 786, 452, 612, 405, 615, 620, 876, 624, 628, 638, 647, 651, 655, 659, 663, 667, 676, 683, 688, 695, 694, 791, 405, 699, 437, 405, 706, 714, 405, 712, 825, 870, 405, 718, 724, 769, 768, 823, 730, 735, 745, 751, 422, 755, 759, 425, 766, 902, 810, 587, 775, 888, 887, 405, 773, 992, 405, 779, 962, 405, 785, 781, 986, 790, 795, 797, 506, 500, 499, 801, 805, 814, 820, 829, 833, 837, 841, 845, 849, 853, 857, 861, 616, 865, 869, 868, 488, 405, 874, 816, 405, 880, 738, 405, 886, 892, 543, 405, 901, 906, 913, 912, 918, 494, 541, 922, 926, 936, 945, 949, 953, 957, 530, 966, 973, 960, 702, 701, 405, 979, 981, 405, 985, 747, 405, 990, 998, 914, 405, 996, 1004, 672, 975, 974, 1014, 1002, 1008, 670, 1012, 405, 405, 405, 405, 405, 401, 1018, 1022, 1026, 1106, 1071, 1111, 1111, 1111, 1082, 1145, 1030, 1101, 1034, 1038, 1106, 1106, 1106, 1106, 1046, 1206, 1052, 1106, 1072, 1111, 1111, 1042, 1134, 1065, 1111, 1112, 1056, 1160, 1207, 1062, 1204, 1208, 1069, 1106, 1106, 1106, 1076, 1111, 1207, 1161, 1122, 1205, 1064, 1094, 1106, 1106, 1107, 1111, 1111, 1111, 1078, 1086, 1207, 1092, 1098, 1046, 1058, 1106, 1106, 1110, 1111, 1111, 1116, 1120, 1161, 1126, 1202, 1104, 1106, 1145, 1146, 1129, 1138, 1088, 1151, 1048, 1157, 1153, 1132, 1141, 1165, 1107, 1111, 1172, 1179, 1109, 1183, 1175, 1143, 1147, 1187, 1108, 1191, 1195, 1144, 1199, 1168, 1212, 1216, 1220, 1224, 1228, 1232, 1236, 1557, 1247, 1241, 1241, 1038, 1434, 1241, 1241, 1241, 1241, 1254, 1275, 1617, 1241, 1280, 1287, 1241, 1241, 1241, 1287, 1241, 2114, 1291, 1241, 1243, 1241, 2049, 1824, 2094, 2095, 1520, 1309, 1241, 1241, 1302, 1241, 1321, 1311, 1241, 1241, 1313, 1778, 1325, 1336, 1241, 1241, 1325, 1330, 1353, 1241, 1241, 1695, 1354, 1241, 1241, 1241, 1294, 1686, 1331, 1241, 1696, 1368, 1241, 1338, 1370, 1241, 1392, 1399, 1364, 2017, 1406, 2016, 1405, 1716, 1406, 1407, 1422, 1417, 1421, 1241, 1241, 1241, 1349, 1426, 1241, 1774, 1756, 1241, 1773, 1241, 1241, 1345, 1964, 1812, 1432, 1241, 1241, 1345, 1993, 1459, 1241, 1241, 1241, 1395, 1848, 1767, 1465, 1241, 1241, 1394, 1847, 1242, 1477, 1241, 1241, 1428, 1241, 1445, 1492, 1241, 1241, 1438, 1241, 1499, 1241, 1241, 1241, 1455, 1241, 1818, 1448, 1241, 1250, 1241, 2026, 1623, 1449, 1241, 1612, 1616, 1241, 1614, 1241, 1257, 1241, 1241, 1985, 1292, 1586, 1512, 1241, 1517, 2050, 1526, 1674, 1519, 1524, 1647, 2051, 1532, 1537, 1551, 1544, 1550, 1555, 1561, 1571, 1578, 1584, 1590, 1591, 1653, 1595, 1602, 1606, 1610, 1634, 1628, 1640, 1633, 1645, 1241, 1241, 1241, 1469, 1241, 1970, 1651, 1241, 1270, 1241, 1241, 1819, 1449, 1241, 1293, 1664, 1241, 1241, 1481, 1485, 1574, 1672, 1241, 1241, 1513, 1317, 1487, 1684, 1241, 1241, 1533, 1299, 1694, 1241, 1241, 1295, 1241, 1241, 1241, 1546, 1700, 1241, 1241, 1707, 1241, 1713, 1241, 1849, 1715, 1241, 1720, 1241, 1276, 1267, 1241, 1241, 2107, 1657, 1864, 1241, 1881, 1241, 1326, 1292, 1241, 1685, 1358, 1724, 1338, 1241, 1363, 1362, 1342, 1340, 1361, 1339, 1833, 1372, 1360, 1833, 1833, 1342, 1343, 1835, 1341, 1731, 1738, 1344, 1241, 1745, 1241, 1379, 1241, 1241, 2092, 1241, 1388, 1761, 1754, 1241, 1386, 1241, 1400, 1760, 1241, 1241, 1241, 1598, 1734, 1241, 1241, 1241, 1635, 1645, 1241, 1780, 1766, 1241, 1241, 1332, 1771, 1241, 1241, 1629, 2079, 1241, 1242, 1784, 1241, 1241, 1680, 1639, 2063, 1790, 1241, 1241, 1741, 1241, 1241, 1800, 1241, 1241, 1762, 1473, 1241, 1806, 1241, 1241, 1786, 1240, 1709, 1241, 1241, 1241, 1668, 1811, 1241, 1940, 1241, 1401, 1974, 1241, 1408, 1413, 1382, 1241, 1816, 1241, 1241, 1802, 2086, 1811, 1241, 1817, 1945, 1823, 2095, 2095, 2047, 2094, 2046, 2080, 1241, 1409, 1312, 1376, 2096, 2048, 1241, 1241, 1807, 1241, 1241, 1241, 2035, 1241, 1241, 1828, 1241, 2057, 2061, 1241, 1241, 1843, 1241, 2059, 1241, 1241, 1241, 1690, 1847, 1241, 1241, 1241, 1703, 2102, 1848, 1241, 1241, 1853, 1292, 1848, 1241, 2016, 1857, 1241, 2002, 1868, 1241, 1436, 1241, 1241, 1271, 1305, 1241, 1874, 1241, 1241, 1884, 2037, 1892, 1241, 1890, 1241, 1461, 1241, 1241, 1795, 1241, 1241, 1891, 1241, 1878, 1241, 1888, 1241, 1888, 1905, 1896, 2087, 1912, 1903, 1241, 1911, 1906, 1916, 1905, 2027, 1863, 1925, 2088, 1859, 1861, 1922, 1927, 1931, 1935, 1494, 1241, 1241, 1918, 1907, 1939, 1917, 1944, 1949, 1241, 1241, 1451, 1955, 1241, 1241, 1241, 1796, 1727, 2061, 1241, 1241, 1899, 1241, 1660, 1968, 1241, 1241, 1951, 1678, 1978, 1241, 1241, 1241, 1839, 1241, 1241, 1984, 1982, 1241, 1488, 1241, 1241, 1624, 1450, 1989, 1241, 1241, 1241, 1870, 1995, 1292, 1241, 1241, 1958, 1261, 1241, 1996, 1241, 1241, 1241, 2039, 2008, 1241, 1241, 1750, 2000, 1241, 1256, 2001, 1960, 1241, 1564, 1241, 1504, 1241, 1241, 1442, 1241, 1241, 1564, 1528, 1263, 1241, 1508, 1241, 1241, 1468, 1498, 2006, 1540, 2015, 1539, 2014, 1748, 2013, 1539, 1831, 2014, 2012, 1500, 1567, 2022, 2021, 1241, 1580, 1241, 1241, 2033, 2037, 1791, 2045, 2031, 1241, 1621, 1241, 1641, 2044, 1241, 1241, 1241, 2093, 1241, 1241, 2055, 1241, 1241, 2067, 1241, 1283, 1241, 1241, 1241, 2101, 2071, 1241, 1241, 1241, 2073, 1848, 2040, 1241, 1241, 1241, 2077, 1241, 1241, 2106, 1241, 1241, 2084, 1241, 2111, 1241, 1241, 1381, 1380, 1241, 1241, 1241, 2100, 1241, 2129, 2118, 2122, 2126, 2197, 2133, 3010, 2825, 2145, 2698, 2156, 2226, 2160, 2161, 2165, 2174, 2293, 2194, 2630, 2201, 2203, 2152, 3019, 2226, 2263, 2209, 2213, 2218, 2269, 2292, 2269, 2269, 2184, 2226, 2238, 2148, 2151, 3017, 2245, 2214, 2269, 2269, 2185, 2226, 2292, 2269, 2291, 2269, 2269, 2269, 2292, 2205, 3019, 2226, 2226, 2160, 2160, 2160, 2261, 2160, 2160, 2160, 2262, 2276, 2160, 2160, 2277, 2216, 2283, 2216, 2269, 2269, 2268, 2269, 2267, 2269, 2269, 2269, 2271, 2568, 2292, 2269, 2293, 2269, 2182, 2190, 2269, 2186, 2226, 2226, 2226, 2226, 2227, 2160, 2160, 2160, 2160, 2263, 2160, 2275, 2277, 2282, 2215, 2217, 2269, 2269, 2291, 2269, 2269, 2293, 2291, 2269, 2220, 2269, 2295, 2294, 2269, 2269, 2305, 2233, 2262, 2278, 2218, 2269, 2234, 2226, 2226, 2228, 2160, 2160, 2160, 2289, 2220, 2294, 2294, 2269, 2269, 2304, 2269, 2160, 2160, 2287, 2269, 2269, 2305, 2269, 2269, 2312, 2269, 2269, 2225, 2226, 2160, 2287, 2289, 2219, 2304, 2295, 2314, 2234, 2226, 2314, 2269, 2226, 2226, 2160, 2288, 2219, 2222, 2304, 2296, 2269, 2224, 2160, 2160, 2269, 2302, 2294, 2314, 2224, 2226, 2288, 2220, 2294, 2269, 2290, 2269, 2269, 2293, 2269, 2269, 2269, 2269, 2270, 2221, 2313, 2225, 2227, 2160, 2300, 2269, 2225, 2261, 2309, 2234, 2229, 2223, 2318, 2318, 2318, 2328, 2336, 2340, 2344, 2350, 2637, 2712, 2358, 2362, 2372, 2135, 2378, 2398, 2135, 2135, 2135, 2135, 2136, 2417, 2241, 2135, 2378, 2135, 2135, 2980, 2984, 2135, 3006, 2135, 2135, 2135, 2945, 2931, 2425, 2400, 2135, 2135, 2135, 2954, 2135, 2481, 2433, 2135, 2135, 2988, 2824, 2135, 2135, 2482, 2434, 2135, 2135, 2440, 2445, 2452, 2135, 2135, 2998, 3002, 2961, 2441, 2446, 2453, 2463, 2974, 2135, 2135, 2135, 2140, 2642, 2709, 2459, 2470, 2465, 2135, 2135, 3005, 2135, 2135, 2987, 2823, 2458, 2469, 2464, 2975, 2135, 2135, 2135, 2353, 2488, 2447, 2324, 2974, 2135, 2409, 2459, 2448, 2135, 2961, 2487, 2446, 2476, 2323, 2973, 2135, 2135, 2135, 2354, 2476, 2974, 2135, 2135, 2135, 2957, 2135, 2135, 2960, 2135, 2135, 2135, 2363, 2409, 2459, 2474, 2465, 2487, 2571, 2973, 2135, 2135, 2168, 2973, 2135, 2135, 2135, 2959, 2135, 2135, 2135, 2506, 2135, 2957, 2488, 2170, 2135, 2135, 2135, 2960, 2135, 2818, 2493, 2135, 2135, 3033, 2135, 2135, 2135, 2934, 2819, 2494, 2135, 2135, 2135, 2976, 2780, 2499, 2135, 2135, 2135, 3000, 2968, 2135, 2935, 2135, 2135, 2135, 2364, 2507, 2135, 2135, 2934, 2135, 2135, 2780, 2492, 2507, 2135, 2135, 2506, 2780, 2135, 2135, 2782, 2780, 2135, 2782, 2135, 2783, 2374, 2514, 2135, 2135, 2135, 3007, 2530, 2974, 2135, 2135, 2135, 3008, 2135, 2135, 2134, 2135, 2526, 2531, 2975, 2135, 2135, 3042, 2581, 2575, 2956, 2135, 2135, 2135, 2394, 2135, 2508, 2535, 2840, 2844, 2495, 2135, 2135, 2136, 2684, 2537, 2842, 2846, 2135, 2136, 2561, 2581, 2551, 2536, 2841, 2845, 2975, 3043, 2582, 2843, 2555, 2135, 3040, 3044, 2538, 2844, 2975, 2135, 2135, 2253, 2644, 2672, 2542, 2554, 2135, 2135, 2346, 2873, 2551, 2555, 2135, 2135, 2135, 2381, 2559, 2565, 2538, 2553, 2135, 2560, 2914, 2576, 2590, 2135, 2135, 2135, 2408, 2136, 2596, 2624, 2135, 2135, 2135, 2409, 2135, 2618, 2597, 3008, 2135, 2135, 2380, 2956, 2601, 2135, 2135, 2135, 2410, 2620, 2624, 2135, 2136, 2383, 2135, 2135, 2783, 2623, 2135, 2135, 2393, 2888, 2136, 2621, 3008, 2135, 2618, 2618, 2622, 2135, 2135, 2405, 2414, 2619, 2384, 2624, 2135, 2136, 2950, 2135, 2138, 2135, 2139, 2135, 2604, 2623, 2135, 2140, 2878, 2665, 2957, 2622, 2135, 2135, 2428, 2762, 2606, 2612, 2135, 2135, 2501, 2586, 2604, 3038, 2135, 2604, 3036, 2387, 2958, 2386, 2135, 2141, 2135, 2421, 2387, 2385, 2135, 2385, 2384, 2384, 2135, 2386, 2628, 2384, 2135, 2135, 2501, 2596, 2591, 2135, 2135, 2135, 2400, 2135, 2634, 2135, 2135, 2559, 2580, 2575, 2648, 2135, 2135, 2135, 2429, 2649, 2135, 2135, 2135, 2435, 2654, 2658, 2135, 2135, 2135, 2436, 2649, 2178, 2659, 2135, 2135, 2595, 2601, 2669, 2677, 2135, 2135, 2616, 2957, 2879, 2665, 2691, 2135, 2363, 2367, 2900, 2878, 2664, 2690, 2975, 2877, 2643, 2670, 2974, 2671, 2975, 2135, 2135, 2619, 2608, 2669, 2673, 2135, 2135, 2653, 2177, 2672, 2135, 2135, 2135, 2486, 2168, 2251, 2255, 2695, 2974, 2709, 2135, 2135, 2135, 2487, 2169, 2399, 2716, 2975, 2135, 2363, 2770, 2776, 2640, 2717, 2135, 2135, 2729, 2135, 2135, 2641, 2718, 2135, 2135, 2135, 2505, 2135, 2640, 2257, 2974, 2135, 2727, 2975, 2135, 2365, 2332, 2895, 2957, 2135, 2959, 2135, 2365, 2749, 2754, 2959, 2958, 2958, 2135, 2380, 2793, 2799, 2135, 2735, 2738, 2135, 2381, 2135, 2135, 2940, 2974, 2135, 2744, 2135, 2135, 2739, 2519, 2976, 2745, 2135, 2135, 2135, 2509, 2755, 2135, 2135, 2135, 2510, 2772, 2778, 2135, 2135, 2740, 2520, 2135, 2771, 2777, 2135, 2135, 2759, 2750, 2792, 2798, 2135, 2135, 2781, 2392, 2779, 2135, 2135, 2135, 2521, 2135, 2679, 2248, 2135, 2135, 2681, 2480, 2135, 2135, 2786, 3000, 2135, 2679, 2683, 2135, 2135, 2416, 2135, 2135, 2135, 2525, 2135, 2730, 2135, 2135, 2135, 2560, 2581, 2135, 2805, 2135, 2135, 2804, 2962, 2832, 2974, 2135, 2382, 2135, 2135, 2958, 2135, 2135, 2960, 2135, 2829, 2833, 2975, 2961, 2965, 2969, 2973, 2968, 2972, 2135, 2135, 2135, 2641, 2135, 2515, 2966, 2970, 2851, 2478, 2135, 2135, 2808, 2135, 2809, 2135, 2135, 2135, 2722, 2852, 2479, 2135, 2135, 2815, 2135, 2135, 2766, 2853, 2480, 2135, 2857, 2479, 2135, 2388, 2723, 2135, 2364, 2331, 2894, 2858, 2480, 2135, 2135, 2850, 2478, 2135, 2135, 2135, 2806, 2864, 2135, 2399, 2256, 2974, 2865, 2135, 2135, 2862, 2135, 2135, 2135, 2685, 2807, 2865, 2135, 2135, 2807, 2863, 2135, 2135, 2135, 2686, 2884, 2807, 2135, 2809, 2807, 2135, 2135, 2807, 2806, 2705, 2810, 2808, 2700, 2869, 2702, 2702, 2702, 2704, 2883, 2135, 2135, 2135, 2730, 2884, 2135, 2135, 2135, 2731, 2321, 2546, 2135, 2135, 2876, 2255, 2889, 2322, 2547, 2135, 2401, 2135, 2135, 2135, 2949, 2367, 2893, 2544, 2973, 2906, 2973, 2135, 2135, 2877, 2663, 2368, 2901, 2907, 2974, 2366, 2899, 2905, 2972, 2920, 2974, 2135, 2135, 2911, 2900, 2920, 2363, 2913, 2918, 2465, 2941, 2975, 2135, 2135, 2924, 2928, 2974, 2945, 2931, 2135, 2135, 2135, 2765, 2136, 2955, 2135, 2135, 2939, 2931, 2380, 2135, 2135, 2380, 2135, 2135, 2135, 2780, 2507, 2137, 2135, 2137, 2135, 2139, 2135, 2806, 2810, 2135, 2135, 2135, 2992, 2135, 2135, 2962, 2966, 2970, 2974, 2135, 2135, 2787, 3014, 2135, 2521, 2993, 2135, 2135, 2135, 2803, 2135, 2135, 2135, 2618, 2607, 2997, 3001, 2135, 2135, 2963, 2967, 2971, 2975, 2135, 2135, 2791, 2797, 2135, 3009, 2999, 3003, 2787, 3001, 2135, 2135, 2964, 2968, 2785, 2999, 3003, 2135, 2135, 2135, 2804, 2785, 2999, 3004, 2135, 2135, 2135, 2807, 2135, 2135, 3023, 2135, 2135, 2135, 2811, 2135, 2135, 3027, 2135, 2135, 2135, 2837, 2968, 3028, 2135, 2135, 2135, 2875, 2135, 2784, 3029, 2135, 2408, 2457, 2446, 0, 14, 0, -2120220672, 1610612736, -2074083328, -2002780160, -2111830528, 1073872896, 1342177280, 1075807216, 4096, 16384, 2048, 8192, 0, 8192, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, -2145386496, 8388608, 1073741824, 0, 0x80000000, 0x80000000, 2097152, 2097152, 2097152, 536870912, 0, 0, 134217728, 33554432, 1536, 268435456, 268435456, 268435456, 268435456, 128, 256, 32, 0, 65536, 131072, 524288, 16777216, 268435456, 0x80000000, 1572864, 1835008, 640, 32768, 65536, 262144, 1048576, 2097152, 196608, 196800, 196608, 196608, 0, 131072, 131072, 131072, 196608, 196624, 196608, 196624, 196608, 196608, 128, 4096, 16384, 16384, 2048, 0, 4, 0, 0, 0x80000000, 2097152, 0, 1024, 32, 32, 0, 65536, 1572864, 1048576, 32768, 32768, 32768, 32768, 196608, 196608, 196608, 64, 64, 196608, 196608, 131072, 131072, 131072, 131072, 268435456, 268435456, 64, 196736, 196608, 196608, 196608, 131072, 196608, 196608, 16384, 4, 4, 4, 2, 32, 32, 65536, 1048576, 12582912, 1073741824, 0, 0, 2, 8, 16, 96, 2048, 32768, 0, 0, 131072, 268435456, 268435456, 268435456, 256, 256, 196608, 196672, 196608, 196608, 196608, 196608, 4, 0, 256, 256, 256, 256, 32, 32, 32768, 32, 32, 32, 32, 32768, 268435456, 268435456, 268435456, 196608, 196608, 196608, 196624, 196608, 196608, 196608, 16, 16, 16, 268435456, 196608, 64, 64, 64, 196608, 196608, 196608, 196672, 268435456, 64, 64, 196608, 196608, 16, 196608, 196608, 196608, 268435456, 64, 196608, 131072, 262144, 4194304, 25165824, 33554432, 134217728, 268435456, 268435456, 196608, 262152, 8, 256, 512, 3072, 16384, 200, -1073741816, 8392713, 40, 8392718, 520, 807404072, 40, 520, 100663304, 0, 0, -540651761, -540651761, 257589048, 0, 262144, 0, 0, 3, 8, 256, 0, 4, 6, 4100, 8388612, 0, 0, 0, 3, 4, 8, 256, 512, 1024, 0, 2097152, 0, 0, -537854471, -537854471, 0, 100663296, 0, 0, 1, 2, 0, 0, 0, 16384, 0, 0, 0, 96, 14336, 0, 0, 0, 7, 8, 234881024, 0, 0, 0, 8, 0, 0, 0, 0, 262144, 0, 0, 16, 64, 384, 512, 0, 1, 1, 0, 12582912, 0, 0, 0, 0, 33554432, 67108864, -606084144, -606084144, -606084138, 0, 0, 28, 32, 768, 1966080, -608174080, 0, 0, 0, 14, 35056, 16, 64, 896, 24576, 98304, 98304, 131072, 262144, 524288, 1048576, 4194304, 25165824, 1048576, 62914560, 134217728, -805306368, 0, 384, 512, 16384, 65536, 131072, 262144, 29360128, 33554432, 134217728, 268435456, 1073741824, 0x80000000, 262144, 524288, 1048576, 29360128, 33554432, 524288, 1048576, 16777216, 33554432, 134217728, 268435456, 1073741824, 0, 0, 0, 123856, 1966080, 0, 64, 384, 16384, 65536, 131072, 16384, 65536, 524288, 268435456, 0x80000000, 0, 0, 524288, 0x80000000, 0, 0, 1, 16, 0, 256, 524288, 0, 0, 0, 25, 96, 128, -537854471, 0, 0, 0, 32, 7404800, -545259520, 0, 0, 0, 60, 0, 249, 64768, 1048576, 6291456, 6291456, 25165824, 100663296, 402653184, 1073741824, 96, 128, 1280, 2048, 4096, 57344, 6291456, 57344, 6291456, 8388608, 16777216, 33554432, 201326592, 1342177280, 0x80000000, 0, 57344, 6291456, 8388608, 100663296, 134217728, 0x80000000, 0, 0, 0, 1, 8, 16, 64, 128, 64, 128, 256, 1024, 131072, 131072, 131072, 262144, 524288, 16777216, 57344, 6291456, 8388608, 67108864, 134217728, 64, 256, 1024, 2048, 4096, 57344, 64, 256, 0, 24576, 32768, 6291456, 67108864, 134217728, 0, 1, 64, 256, 24576, 32768, 4194304, 32768, 4194304, 67108864, 0, 0, 64, 256, 0, 0, 24576, 32768, 0, 16384, 4194304, 67108864, 64, 16384, 0, 0, 1, 64, 256, 16384, 4194304, 67108864, 0, 0, 0, 16384, 0, 16384, 16384, 0, -470447874, -470447874, -470447874, 0, 0, 128, 0, 0, 8, 96, 2048, 32768, 262144, 8388608, 35056, 1376256, -471859200, 0, 0, 14, 16, 224, 2048, 32768, 2097152, 4194304, 8388608, -486539264, 0, 96, 128, 2048, 32768, 262144, 2097152, 262144, 2097152, 8388608, 33554432, 536870912, 1073741824, 0x80000000, 0, 1610612736, 0x80000000, 0, 0, 1, 524288, 1048576, 12582912, 0, 0, 0, 151311, 264503296, 2097152, 8388608, 33554432, 1610612736, 0x80000000, 262144, 8388608, 33554432, 536870912, 67108864, 4194304, 0, 4194304, 0, 4194304, 4194304, 0, 0, 524288, 8388608, 536870912, 1073741824, 0x80000000, 1, 4097, 8388609, 96, 2048, 32768, 1073741824, 0x80000000, 0, 96, 2048, 0x80000000, 0, 0, 96, 2048, 0, 0, 1, 12582912, 0, 0, 0, 0, 1641895695, 1641895695, 0, 0, 0, 249, 7404800, 15, 87808, 1835008, 1639972864, 0, 768, 5120, 16384, 65536, 1835008, 1835008, 12582912, 16777216, 1610612736, 0, 3, 4, 8, 768, 4096, 65536, 0, 0, 256, 512, 786432, 8, 256, 512, 4096, 16384, 1835008, 16384, 1835008, 12582912, 1610612736, 0, 0, 0, 256, 0, 0, 0, 4, 8, 16, 32, 1, 2, 8, 256, 16384, 524288, 16384, 524288, 1048576, 12582912, 1610612736, 0, 0, 0, 8388608, 0, 0, 0, 524288, 4194304, 0, 0, 0, 8388608, -548662288, -548662288, -548662288, 0, 0, 256, 16384, 65536, 520093696, -1073741824, 0, 0, 0, 16777216, 0, 16, 32, 960, 4096, 4980736, 520093696, 1073741824, 0, 32, 896, 4096, 57344, 1048576, 6291456, 8388608, 16777216, 100663296, 134217728, 268435456, 0x80000000, 0, 512, 786432, 4194304, 33554432, 134217728, 268435456, 0, 786432, 4194304, 134217728, 268435456, 0, 524288, 4194304, 268435456, 0, 0, 0, 0, 0, 4194304, 4194304, -540651761, 0, 0, 0, 2, 4, 8, 16, 96, 128, 264503296, -805306368, 0, 0, 0, 8, 256, 512, 19456, 131072, 3072, 16384, 131072, 262144, 8388608, 16777216, 512, 1024, 2048, 16384, 131072, 262144, 131072, 262144, 8388608, 33554432, 201326592, 268435456, 0, 3, 4, 256, 1024, 2048, 57344, 16384, 131072, 8388608, 33554432, 134217728, 268435456, 0, 3, 256, 1024, 16384, 131072, 33554432, 134217728, 1073741824, 0x80000000, 0, 0, 256, 524288, 0x80000000, 0, 3, 256, 33554432, 134217728, 1073741824, 0, 1, 2, 33554432, 1, 2, 134217728, 1073741824, 0, 1, 2, 134217728, 0, 0, 0, 64, 0, 0, 0, 16, 32, 896, 4096, 786432, 4194304, 16777216, 33554432, 201326592, 268435456, 1073741824, 0x80000000, 0, 0, 0, 15, 0, 4980736, 4980736, 4980736, 70460, 70460, 3478332, 0, 0, 1008, 4984832, 520093696, 60, 4864, 65536, 0, 0, 0, 12, 16, 32, 256, 512, 4096, 65536, 0, 0, 0, 67108864, 0, 0, 0, 12, 0, 256, 512, 65536, 0, 0, 1024, 512, 131072, 131072, 4, 16, 32, 65536, 0, 4, 16, 32, 0, 0, 0, 4, 16, 0, 0, 16384, 67108864, 0, 0, 1, 24, 96, 128, 256, 1024
+];
+
+JSONiqTokenizer.TOKEN =
+[
+ "(0)",
+ "JSONChar",
+ "JSONCharRef",
+ "JSONPredefinedCharRef",
+ "ModuleDecl",
+ "Annotation",
+ "OptionDecl",
+ "Operator",
+ "Variable",
+ "Tag",
+ "EndTag",
+ "PragmaContents",
+ "DirCommentContents",
+ "DirPIContents",
+ "CDataSectionContents",
+ "AttrTest",
+ "Wildcard",
+ "EQName",
+ "IntegerLiteral",
+ "DecimalLiteral",
+ "DoubleLiteral",
+ "PredefinedEntityRef",
+ "'\"\"'",
+ "EscapeApos",
+ "AposChar",
+ "ElementContentChar",
+ "QuotAttrContentChar",
+ "AposAttrContentChar",
+ "NCName",
+ "QName",
+ "S",
+ "CharRef",
+ "CommentContents",
+ "DocTag",
+ "DocCommentContents",
+ "EOF",
+ "'!'",
+ "'\"'",
+ "'#'",
+ "'#)'",
+ "'$$'",
+ "''''",
+ "'('",
+ "'(#'",
+ "'(:'",
+ "'(:~'",
+ "')'",
+ "'*'",
+ "'*'",
+ "','",
+ "'-->'",
+ "'.'",
+ "'/'",
+ "'/>'",
+ "':'",
+ "':)'",
+ "';'",
+ "'<!--'",
+ "'<![CDATA['",
+ "'<?'",
+ "'='",
+ "'>'",
+ "'?'",
+ "'?>'",
+ "'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'",
+ "'{'",
+ "'{{'",
+ "'|'",
+ "'}'",
+ "'}}'"
+];
+
+},{}],"/node_modules/xqlint/lib/lexers/XQueryTokenizer.js":[function(_dereq_,module,exports){
+ var XQueryTokenizer = exports.XQueryTokenizer = function XQueryTokenizer(string, parsingEventHandler)
+ {
+ init(string, parsingEventHandler);
+ var self = this;
+
+ this.ParseException = function(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;
+ end = e;
+ eventHandler.reset(input);
+ }
+
+ this.getOffendingToken = function(e)
+ {
+ var o = e.getOffending();
+ return o >= 0 ? XQueryTokenizer.TOKEN[o] : null;
+ };
+
+ this.getExpectedTokenSet = function(e)
+ {
+ var expected;
+ if (e.getExpected() < 0)
+ {
+ expected = XQueryTokenizer.getTokenSet(- e.getState());
+ }
+ else
+ {
+ expected = [XQueryTokenizer.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 = 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 || found != null ? "" : "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_start = function()
+ {
+ eventHandler.startNonterminal("start", e0);
+ lookahead1W(14); // ModuleDecl | Annotation | OptionDecl | Operator | Variable | Tag | AttrTest |
+ switch (l1)
+ {
+ case 55: // '<![CDATA['
+ shift(55); // '<![CDATA['
+ break;
+ case 54: // '<!--'
+ shift(54); // '<!--'
+ break;
+ case 56: // '<?'
+ shift(56); // '<?'
+ break;
+ case 40: // '(#'
+ shift(40); // '(#'
+ break;
+ case 42: // '(:~'
+ shift(42); // '(:~'
+ break;
+ case 41: // '(:'
+ shift(41); // '(:'
+ break;
+ case 35: // '"'
+ shift(35); // '"'
+ break;
+ case 38: // "'"
+ shift(38); // "'"
+ break;
+ case 274: // '}'
+ shift(274); // '}'
+ break;
+ case 271: // '{'
+ shift(271); // '{'
+ break;
+ case 39: // '('
+ shift(39); // '('
+ break;
+ case 43: // ')'
+ shift(43); // ')'
+ break;
+ case 49: // '/'
+ shift(49); // '/'
+ break;
+ case 62: // '['
+ shift(62); // '['
+ break;
+ case 63: // ']'
+ shift(63); // ']'
+ break;
+ case 46: // ','
+ shift(46); // ','
+ break;
+ case 48: // '.'
+ shift(48); // '.'
+ break;
+ case 53: // ';'
+ shift(53); // ';'
+ break;
+ case 51: // ':'
+ shift(51); // ':'
+ break;
+ case 34: // '!'
+ shift(34); // '!'
+ break;
+ case 273: // '|'
+ shift(273); // '|'
+ break;
+ case 2: // Annotation
+ shift(2); // Annotation
+ break;
+ case 1: // ModuleDecl
+ shift(1); // ModuleDecl
+ break;
+ case 3: // OptionDecl
+ shift(3); // OptionDecl
+ break;
+ case 12: // AttrTest
+ shift(12); // AttrTest
+ break;
+ case 13: // Wildcard
+ shift(13); // Wildcard
+ break;
+ case 15: // IntegerLiteral
+ shift(15); // IntegerLiteral
+ break;
+ case 16: // DecimalLiteral
+ shift(16); // DecimalLiteral
+ break;
+ case 17: // DoubleLiteral
+ shift(17); // DoubleLiteral
+ break;
+ case 5: // Variable
+ shift(5); // Variable
+ break;
+ case 6: // Tag
+ shift(6); // Tag
+ break;
+ case 4: // Operator
+ shift(4); // Operator
+ break;
+ case 33: // EOF
+ shift(33); // EOF
+ break;
+ default:
+ parse_EQName();
+ }
+ eventHandler.endNonterminal("start", e0);
+ };
+
+ this.parse_StartTag = function()
+ {
+ eventHandler.startNonterminal("StartTag", e0);
+ lookahead1W(8); // QName | S^WS | EOF | '"' | "'" | '/>' | '=' | '>'
+ switch (l1)
+ {
+ case 58: // '>'
+ shift(58); // '>'
+ break;
+ case 50: // '/>'
+ shift(50); // '/>'
+ break;
+ case 27: // QName
+ shift(27); // QName
+ break;
+ case 57: // '='
+ shift(57); // '='
+ break;
+ case 35: // '"'
+ shift(35); // '"'
+ break;
+ case 38: // "'"
+ shift(38); // "'"
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("StartTag", e0);
+ };
+
+ this.parse_TagContent = function()
+ {
+ eventHandler.startNonterminal("TagContent", e0);
+ lookahead1(11); // Tag | EndTag | PredefinedEntityRef | ElementContentChar | CharRef | EOF |
+ switch (l1)
+ {
+ case 23: // ElementContentChar
+ shift(23); // ElementContentChar
+ break;
+ case 6: // Tag
+ shift(6); // Tag
+ break;
+ case 7: // EndTag
+ shift(7); // EndTag
+ break;
+ case 55: // '<![CDATA['
+ shift(55); // '<![CDATA['
+ break;
+ case 54: // '<!--'
+ shift(54); // '<!--'
+ break;
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 272: // '{{'
+ shift(272); // '{{'
+ break;
+ case 275: // '}}'
+ shift(275); // '}}'
+ break;
+ case 271: // '{'
+ shift(271); // '{'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("TagContent", e0);
+ };
+
+ this.parse_AposAttr = function()
+ {
+ eventHandler.startNonterminal("AposAttr", e0);
+ lookahead1(10); // PredefinedEntityRef | EscapeApos | AposAttrContentChar | CharRef | EOF | "'" |
+ switch (l1)
+ {
+ case 20: // EscapeApos
+ shift(20); // EscapeApos
+ break;
+ case 25: // AposAttrContentChar
+ shift(25); // AposAttrContentChar
+ break;
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 272: // '{{'
+ shift(272); // '{{'
+ break;
+ case 275: // '}}'
+ shift(275); // '}}'
+ break;
+ case 271: // '{'
+ shift(271); // '{'
+ break;
+ case 38: // "'"
+ shift(38); // "'"
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("AposAttr", e0);
+ };
+
+ this.parse_QuotAttr = function()
+ {
+ eventHandler.startNonterminal("QuotAttr", e0);
+ lookahead1(9); // PredefinedEntityRef | EscapeQuot | QuotAttrContentChar | CharRef | EOF | '"' |
+ switch (l1)
+ {
+ case 19: // EscapeQuot
+ shift(19); // EscapeQuot
+ break;
+ case 24: // QuotAttrContentChar
+ shift(24); // QuotAttrContentChar
+ break;
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 272: // '{{'
+ shift(272); // '{{'
+ break;
+ case 275: // '}}'
+ shift(275); // '}}'
+ break;
+ case 271: // '{'
+ shift(271); // '{'
+ break;
+ case 35: // '"'
+ shift(35); // '"'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("QuotAttr", e0);
+ };
+
+ this.parse_CData = function()
+ {
+ eventHandler.startNonterminal("CData", e0);
+ lookahead1(1); // CDataSectionContents | EOF | ']]>'
+ switch (l1)
+ {
+ case 11: // CDataSectionContents
+ shift(11); // CDataSectionContents
+ break;
+ case 64: // ']]>'
+ shift(64); // ']]>'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("CData", e0);
+ };
+
+ this.parse_XMLComment = function()
+ {
+ eventHandler.startNonterminal("XMLComment", e0);
+ lookahead1(0); // DirCommentContents | EOF | '-->'
+ switch (l1)
+ {
+ case 9: // DirCommentContents
+ shift(9); // DirCommentContents
+ break;
+ case 47: // '-->'
+ shift(47); // '-->'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("XMLComment", e0);
+ };
+
+ this.parse_PI = function()
+ {
+ eventHandler.startNonterminal("PI", e0);
+ lookahead1(3); // DirPIContents | EOF | '?' | '?>'
+ switch (l1)
+ {
+ case 10: // DirPIContents
+ shift(10); // DirPIContents
+ break;
+ case 59: // '?'
+ shift(59); // '?'
+ break;
+ case 60: // '?>'
+ shift(60); // '?>'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("PI", e0);
+ };
+
+ this.parse_Pragma = function()
+ {
+ eventHandler.startNonterminal("Pragma", e0);
+ lookahead1(2); // PragmaContents | EOF | '#' | '#)'
+ switch (l1)
+ {
+ case 8: // PragmaContents
+ shift(8); // PragmaContents
+ break;
+ case 36: // '#'
+ shift(36); // '#'
+ break;
+ case 37: // '#)'
+ shift(37); // '#)'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("Pragma", e0);
+ };
+
+ this.parse_Comment = function()
+ {
+ eventHandler.startNonterminal("Comment", e0);
+ lookahead1(4); // CommentContents | EOF | '(:' | ':)'
+ switch (l1)
+ {
+ case 52: // ':)'
+ shift(52); // ':)'
+ break;
+ case 41: // '(:'
+ shift(41); // '(:'
+ break;
+ case 30: // CommentContents
+ shift(30); // CommentContents
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("Comment", e0);
+ };
+
+ this.parse_CommentDoc = function()
+ {
+ eventHandler.startNonterminal("CommentDoc", e0);
+ lookahead1(5); // DocTag | DocCommentContents | EOF | '(:' | ':)'
+ switch (l1)
+ {
+ case 31: // DocTag
+ shift(31); // DocTag
+ break;
+ case 32: // DocCommentContents
+ shift(32); // DocCommentContents
+ break;
+ case 52: // ':)'
+ shift(52); // ':)'
+ break;
+ case 41: // '(:'
+ shift(41); // '(:'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("CommentDoc", e0);
+ };
+
+ this.parse_QuotString = function()
+ {
+ eventHandler.startNonterminal("QuotString", e0);
+ lookahead1(6); // PredefinedEntityRef | EscapeQuot | QuotChar | CharRef | EOF | '"'
+ switch (l1)
+ {
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 19: // EscapeQuot
+ shift(19); // EscapeQuot
+ break;
+ case 21: // QuotChar
+ shift(21); // QuotChar
+ break;
+ case 35: // '"'
+ shift(35); // '"'
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("QuotString", e0);
+ };
+
+ this.parse_AposString = function()
+ {
+ eventHandler.startNonterminal("AposString", e0);
+ lookahead1(7); // PredefinedEntityRef | EscapeApos | AposChar | CharRef | EOF | "'"
+ switch (l1)
+ {
+ case 18: // PredefinedEntityRef
+ shift(18); // PredefinedEntityRef
+ break;
+ case 29: // CharRef
+ shift(29); // CharRef
+ break;
+ case 20: // EscapeApos
+ shift(20); // EscapeApos
+ break;
+ case 22: // AposChar
+ shift(22); // AposChar
+ break;
+ case 38: // "'"
+ shift(38); // "'"
+ break;
+ default:
+ shift(33); // EOF
+ }
+ eventHandler.endNonterminal("AposString", e0);
+ };
+
+ this.parse_Prefix = function()
+ {
+ eventHandler.startNonterminal("Prefix", e0);
+ lookahead1W(13); // NCName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ whitespace();
+ parse_NCName();
+ eventHandler.endNonterminal("Prefix", e0);
+ };
+
+ this.parse__EQName = function()
+ {
+ eventHandler.startNonterminal("_EQName", e0);
+ lookahead1W(12); // EQName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ whitespace();
+ parse_EQName();
+ eventHandler.endNonterminal("_EQName", e0);
+ };
+
+ function parse_EQName()
+ {
+ eventHandler.startNonterminal("EQName", e0);
+ switch (l1)
+ {
+ case 77: // 'attribute'
+ shift(77); // 'attribute'
+ break;
+ case 91: // 'comment'
+ shift(91); // 'comment'
+ break;
+ case 115: // 'document-node'
+ shift(115); // 'document-node'
+ break;
+ case 116: // 'element'
+ shift(116); // 'element'
+ break;
+ case 119: // 'empty-sequence'
+ shift(119); // 'empty-sequence'
+ break;
+ case 140: // 'function'
+ shift(140); // 'function'
+ break;
+ case 147: // 'if'
+ shift(147); // 'if'
+ break;
+ case 160: // 'item'
+ shift(160); // 'item'
+ break;
+ case 180: // 'namespace-node'
+ shift(180); // 'namespace-node'
+ break;
+ case 186: // 'node'
+ shift(186); // 'node'
+ break;
+ case 211: // 'processing-instruction'
+ shift(211); // 'processing-instruction'
+ break;
+ case 221: // 'schema-attribute'
+ shift(221); // 'schema-attribute'
+ break;
+ case 222: // 'schema-element'
+ shift(222); // 'schema-element'
+ break;
+ case 238: // 'switch'
+ shift(238); // 'switch'
+ break;
+ case 239: // 'text'
+ shift(239); // 'text'
+ break;
+ case 248: // 'typeswitch'
+ shift(248); // 'typeswitch'
+ break;
+ default:
+ parse_FunctionName();
+ }
+ eventHandler.endNonterminal("EQName", e0);
+ }
+
+ function parse_FunctionName()
+ {
+ eventHandler.startNonterminal("FunctionName", e0);
+ switch (l1)
+ {
+ case 14: // EQName^Token
+ shift(14); // EQName^Token
+ break;
+ case 65: // 'after'
+ shift(65); // 'after'
+ break;
+ case 68: // 'ancestor'
+ shift(68); // 'ancestor'
+ break;
+ case 69: // 'ancestor-or-self'
+ shift(69); // 'ancestor-or-self'
+ break;
+ case 70: // 'and'
+ shift(70); // 'and'
+ break;
+ case 74: // 'as'
+ shift(74); // 'as'
+ break;
+ case 75: // 'ascending'
+ shift(75); // 'ascending'
+ break;
+ case 79: // 'before'
+ shift(79); // 'before'
+ break;
+ case 83: // 'case'
+ shift(83); // 'case'
+ break;
+ case 84: // 'cast'
+ shift(84); // 'cast'
+ break;
+ case 85: // 'castable'
+ shift(85); // 'castable'
+ break;
+ case 88: // 'child'
+ shift(88); // 'child'
+ break;
+ case 89: // 'collation'
+ shift(89); // 'collation'
+ break;
+ case 98: // 'copy'
+ shift(98); // 'copy'
+ break;
+ case 100: // 'count'
+ shift(100); // 'count'
+ break;
+ case 103: // 'declare'
+ shift(103); // 'declare'
+ break;
+ case 104: // 'default'
+ shift(104); // 'default'
+ break;
+ case 105: // 'delete'
+ shift(105); // 'delete'
+ break;
+ case 106: // 'descendant'
+ shift(106); // 'descendant'
+ break;
+ case 107: // 'descendant-or-self'
+ shift(107); // 'descendant-or-self'
+ break;
+ case 108: // 'descending'
+ shift(108); // 'descending'
+ break;
+ case 113: // 'div'
+ shift(113); // 'div'
+ break;
+ case 114: // 'document'
+ shift(114); // 'document'
+ break;
+ case 117: // 'else'
+ shift(117); // 'else'
+ break;
+ case 118: // 'empty'
+ shift(118); // 'empty'
+ break;
+ case 121: // 'end'
+ shift(121); // 'end'
+ break;
+ case 123: // 'eq'
+ shift(123); // 'eq'
+ break;
+ case 124: // 'every'
+ shift(124); // 'every'
+ break;
+ case 126: // 'except'
+ shift(126); // 'except'
+ break;
+ case 129: // 'first'
+ shift(129); // 'first'
+ break;
+ case 130: // 'following'
+ shift(130); // 'following'
+ break;
+ case 131: // 'following-sibling'
+ shift(131); // 'following-sibling'
+ break;
+ case 132: // 'for'
+ shift(132); // 'for'
+ break;
+ case 141: // 'ge'
+ shift(141); // 'ge'
+ break;
+ case 143: // 'group'
+ shift(143); // 'group'
+ break;
+ case 145: // 'gt'
+ shift(145); // 'gt'
+ break;
+ case 146: // 'idiv'
+ shift(146); // 'idiv'
+ break;
+ case 148: // 'import'
+ shift(148); // 'import'
+ break;
+ case 154: // 'insert'
+ shift(154); // 'insert'
+ break;
+ case 155: // 'instance'
+ shift(155); // 'instance'
+ break;
+ case 157: // 'intersect'
+ shift(157); // 'intersect'
+ break;
+ case 158: // 'into'
+ shift(158); // 'into'
+ break;
+ case 159: // 'is'
+ shift(159); // 'is'
+ break;
+ case 165: // 'last'
+ shift(165); // 'last'
+ break;
+ case 167: // 'le'
+ shift(167); // 'le'
+ break;
+ case 169: // 'let'
+ shift(169); // 'let'
+ break;
+ case 173: // 'lt'
+ shift(173); // 'lt'
+ break;
+ case 175: // 'mod'
+ shift(175); // 'mod'
+ break;
+ case 176: // 'modify'
+ shift(176); // 'modify'
+ break;
+ case 177: // 'module'
+ shift(177); // 'module'
+ break;
+ case 179: // 'namespace'
+ shift(179); // 'namespace'
+ break;
+ case 181: // 'ne'
+ shift(181); // 'ne'
+ break;
+ case 193: // 'only'
+ shift(193); // 'only'
+ break;
+ case 195: // 'or'
+ shift(195); // 'or'
+ break;
+ case 196: // 'order'
+ shift(196); // 'order'
+ break;
+ case 197: // 'ordered'
+ shift(197); // 'ordered'
+ break;
+ case 201: // 'parent'
+ shift(201); // 'parent'
+ break;
+ case 207: // 'preceding'
+ shift(207); // 'preceding'
+ break;
+ case 208: // 'preceding-sibling'
+ shift(208); // 'preceding-sibling'
+ break;
+ case 213: // 'rename'
+ shift(213); // 'rename'
+ break;
+ case 214: // 'replace'
+ shift(214); // 'replace'
+ break;
+ case 215: // 'return'
+ shift(215); // 'return'
+ break;
+ case 219: // 'satisfies'
+ shift(219); // 'satisfies'
+ break;
+ case 224: // 'self'
+ shift(224); // 'self'
+ break;
+ case 230: // 'some'
+ shift(230); // 'some'
+ break;
+ case 231: // 'stable'
+ shift(231); // 'stable'
+ break;
+ case 232: // 'start'
+ shift(232); // 'start'
+ break;
+ case 243: // 'to'
+ shift(243); // 'to'
+ break;
+ case 244: // 'treat'
+ shift(244); // 'treat'
+ break;
+ case 245: // 'try'
+ shift(245); // 'try'
+ break;
+ case 249: // 'union'
+ shift(249); // 'union'
+ break;
+ case 251: // 'unordered'
+ shift(251); // 'unordered'
+ break;
+ case 255: // 'validate'
+ shift(255); // 'validate'
+ break;
+ case 261: // 'where'
+ shift(261); // 'where'
+ break;
+ case 265: // 'with'
+ shift(265); // 'with'
+ break;
+ case 269: // 'xquery'
+ shift(269); // 'xquery'
+ break;
+ case 67: // 'allowing'
+ shift(67); // 'allowing'
+ break;
+ case 76: // 'at'
+ shift(76); // 'at'
+ break;
+ case 78: // 'base-uri'
+ shift(78); // 'base-uri'
+ break;
+ case 80: // 'boundary-space'
+ shift(80); // 'boundary-space'
+ break;
+ case 81: // 'break'
+ shift(81); // 'break'
+ break;
+ case 86: // 'catch'
+ shift(86); // 'catch'
+ break;
+ case 93: // 'construction'
+ shift(93); // 'construction'
+ break;
+ case 96: // 'context'
+ shift(96); // 'context'
+ break;
+ case 97: // 'continue'
+ shift(97); // 'continue'
+ break;
+ case 99: // 'copy-namespaces'
+ shift(99); // 'copy-namespaces'
+ break;
+ case 101: // 'decimal-format'
+ shift(101); // 'decimal-format'
+ break;
+ case 120: // 'encoding'
+ shift(120); // 'encoding'
+ break;
+ case 127: // 'exit'
+ shift(127); // 'exit'
+ break;
+ case 128: // 'external'
+ shift(128); // 'external'
+ break;
+ case 136: // 'ft-option'
+ shift(136); // 'ft-option'
+ break;
+ case 149: // 'in'
+ shift(149); // 'in'
+ break;
+ case 150: // 'index'
+ shift(150); // 'index'
+ break;
+ case 156: // 'integrity'
+ shift(156); // 'integrity'
+ break;
+ case 166: // 'lax'
+ shift(166); // 'lax'
+ break;
+ case 187: // 'nodes'
+ shift(187); // 'nodes'
+ break;
+ case 194: // 'option'
+ shift(194); // 'option'
+ break;
+ case 198: // 'ordering'
+ shift(198); // 'ordering'
+ break;
+ case 217: // 'revalidation'
+ shift(217); // 'revalidation'
+ break;
+ case 220: // 'schema'
+ shift(220); // 'schema'
+ break;
+ case 223: // 'score'
+ shift(223); // 'score'
+ break;
+ case 229: // 'sliding'
+ shift(229); // 'sliding'
+ break;
+ case 235: // 'strict'
+ shift(235); // 'strict'
+ break;
+ case 246: // 'tumbling'
+ shift(246); // 'tumbling'
+ break;
+ case 247: // 'type'
+ shift(247); // 'type'
+ break;
+ case 252: // 'updating'
+ shift(252); // 'updating'
+ break;
+ case 256: // 'value'
+ shift(256); // 'value'
+ break;
+ case 257: // 'variable'
+ shift(257); // 'variable'
+ break;
+ case 258: // 'version'
+ shift(258); // 'version'
+ break;
+ case 262: // 'while'
+ shift(262); // 'while'
+ break;
+ case 92: // 'constraint'
+ shift(92); // 'constraint'
+ break;
+ case 171: // 'loop'
+ shift(171); // 'loop'
+ break;
+ default:
+ shift(216); // 'returning'
+ }
+ eventHandler.endNonterminal("FunctionName", e0);
+ }
+
+ function parse_NCName()
+ {
+ eventHandler.startNonterminal("NCName", e0);
+ switch (l1)
+ {
+ case 26: // NCName^Token
+ shift(26); // NCName^Token
+ break;
+ case 65: // 'after'
+ shift(65); // 'after'
+ break;
+ case 70: // 'and'
+ shift(70); // 'and'
+ break;
+ case 74: // 'as'
+ shift(74); // 'as'
+ break;
+ case 75: // 'ascending'
+ shift(75); // 'ascending'
+ break;
+ case 79: // 'before'
+ shift(79); // 'before'
+ break;
+ case 83: // 'case'
+ shift(83); // 'case'
+ break;
+ case 84: // 'cast'
+ shift(84); // 'cast'
+ break;
+ case 85: // 'castable'
+ shift(85); // 'castable'
+ break;
+ case 89: // 'collation'
+ shift(89); // 'collation'
+ break;
+ case 100: // 'count'
+ shift(100); // 'count'
+ break;
+ case 104: // 'default'
+ shift(104); // 'default'
+ break;
+ case 108: // 'descending'
+ shift(108); // 'descending'
+ break;
+ case 113: // 'div'
+ shift(113); // 'div'
+ break;
+ case 117: // 'else'
+ shift(117); // 'else'
+ break;
+ case 118: // 'empty'
+ shift(118); // 'empty'
+ break;
+ case 121: // 'end'
+ shift(121); // 'end'
+ break;
+ case 123: // 'eq'
+ shift(123); // 'eq'
+ break;
+ case 126: // 'except'
+ shift(126); // 'except'
+ break;
+ case 132: // 'for'
+ shift(132); // 'for'
+ break;
+ case 141: // 'ge'
+ shift(141); // 'ge'
+ break;
+ case 143: // 'group'
+ shift(143); // 'group'
+ break;
+ case 145: // 'gt'
+ shift(145); // 'gt'
+ break;
+ case 146: // 'idiv'
+ shift(146); // 'idiv'
+ break;
+ case 155: // 'instance'
+ shift(155); // 'instance'
+ break;
+ case 157: // 'intersect'
+ shift(157); // 'intersect'
+ break;
+ case 158: // 'into'
+ shift(158); // 'into'
+ break;
+ case 159: // 'is'
+ shift(159); // 'is'
+ break;
+ case 167: // 'le'
+ shift(167); // 'le'
+ break;
+ case 169: // 'let'
+ shift(169); // 'let'
+ break;
+ case 173: // 'lt'
+ shift(173); // 'lt'
+ break;
+ case 175: // 'mod'
+ shift(175); // 'mod'
+ break;
+ case 176: // 'modify'
+ shift(176); // 'modify'
+ break;
+ case 181: // 'ne'
+ shift(181); // 'ne'
+ break;
+ case 193: // 'only'
+ shift(193); // 'only'
+ break;
+ case 195: // 'or'
+ shift(195); // 'or'
+ break;
+ case 196: // 'order'
+ shift(196); // 'order'
+ break;
+ case 215: // 'return'
+ shift(215); // 'return'
+ break;
+ case 219: // 'satisfies'
+ shift(219); // 'satisfies'
+ break;
+ case 231: // 'stable'
+ shift(231); // 'stable'
+ break;
+ case 232: // 'start'
+ shift(232); // 'start'
+ break;
+ case 243: // 'to'
+ shift(243); // 'to'
+ break;
+ case 244: // 'treat'
+ shift(244); // 'treat'
+ break;
+ case 249: // 'union'
+ shift(249); // 'union'
+ break;
+ case 261: // 'where'
+ shift(261); // 'where'
+ break;
+ case 265: // 'with'
+ shift(265); // 'with'
+ break;
+ case 68: // 'ancestor'
+ shift(68); // 'ancestor'
+ break;
+ case 69: // 'ancestor-or-self'
+ shift(69); // 'ancestor-or-self'
+ break;
+ case 77: // 'attribute'
+ shift(77); // 'attribute'
+ break;
+ case 88: // 'child'
+ shift(88); // 'child'
+ break;
+ case 91: // 'comment'
+ shift(91); // 'comment'
+ break;
+ case 98: // 'copy'
+ shift(98); // 'copy'
+ break;
+ case 103: // 'declare'
+ shift(103); // 'declare'
+ break;
+ case 105: // 'delete'
+ shift(105); // 'delete'
+ break;
+ case 106: // 'descendant'
+ shift(106); // 'descendant'
+ break;
+ case 107: // 'descendant-or-self'
+ shift(107); // 'descendant-or-self'
+ break;
+ case 114: // 'document'
+ shift(114); // 'document'
+ break;
+ case 115: // 'document-node'
+ shift(115); // 'document-node'
+ break;
+ case 116: // 'element'
+ shift(116); // 'element'
+ break;
+ case 119: // 'empty-sequence'
+ shift(119); // 'empty-sequence'
+ break;
+ case 124: // 'every'
+ shift(124); // 'every'
+ break;
+ case 129: // 'first'
+ shift(129); // 'first'
+ break;
+ case 130: // 'following'
+ shift(130); // 'following'
+ break;
+ case 131: // 'following-sibling'
+ shift(131); // 'following-sibling'
+ break;
+ case 140: // 'function'
+ shift(140); // 'function'
+ break;
+ case 147: // 'if'
+ shift(147); // 'if'
+ break;
+ case 148: // 'import'
+ shift(148); // 'import'
+ break;
+ case 154: // 'insert'
+ shift(154); // 'insert'
+ break;
+ case 160: // 'item'
+ shift(160); // 'item'
+ break;
+ case 165: // 'last'
+ shift(165); // 'last'
+ break;
+ case 177: // 'module'
+ shift(177); // 'module'
+ break;
+ case 179: // 'namespace'
+ shift(179); // 'namespace'
+ break;
+ case 180: // 'namespace-node'
+ shift(180); // 'namespace-node'
+ break;
+ case 186: // 'node'
+ shift(186); // 'node'
+ break;
+ case 197: // 'ordered'
+ shift(197); // 'ordered'
+ break;
+ case 201: // 'parent'
+ shift(201); // 'parent'
+ break;
+ case 207: // 'preceding'
+ shift(207); // 'preceding'
+ break;
+ case 208: // 'preceding-sibling'
+ shift(208); // 'preceding-sibling'
+ break;
+ case 211: // 'processing-instruction'
+ shift(211); // 'processing-instruction'
+ break;
+ case 213: // 'rename'
+ shift(213); // 'rename'
+ break;
+ case 214: // 'replace'
+ shift(214); // 'replace'
+ break;
+ case 221: // 'schema-attribute'
+ shift(221); // 'schema-attribute'
+ break;
+ case 222: // 'schema-element'
+ shift(222); // 'schema-element'
+ break;
+ case 224: // 'self'
+ shift(224); // 'self'
+ break;
+ case 230: // 'some'
+ shift(230); // 'some'
+ break;
+ case 238: // 'switch'
+ shift(238); // 'switch'
+ break;
+ case 239: // 'text'
+ shift(239); // 'text'
+ break;
+ case 245: // 'try'
+ shift(245); // 'try'
+ break;
+ case 248: // 'typeswitch'
+ shift(248); // 'typeswitch'
+ break;
+ case 251: // 'unordered'
+ shift(251); // 'unordered'
+ break;
+ case 255: // 'validate'
+ shift(255); // 'validate'
+ break;
+ case 257: // 'variable'
+ shift(257); // 'variable'
+ break;
+ case 269: // 'xquery'
+ shift(269); // 'xquery'
+ break;
+ case 67: // 'allowing'
+ shift(67); // 'allowing'
+ break;
+ case 76: // 'at'
+ shift(76); // 'at'
+ break;
+ case 78: // 'base-uri'
+ shift(78); // 'base-uri'
+ break;
+ case 80: // 'boundary-space'
+ shift(80); // 'boundary-space'
+ break;
+ case 81: // 'break'
+ shift(81); // 'break'
+ break;
+ case 86: // 'catch'
+ shift(86); // 'catch'
+ break;
+ case 93: // 'construction'
+ shift(93); // 'construction'
+ break;
+ case 96: // 'context'
+ shift(96); // 'context'
+ break;
+ case 97: // 'continue'
+ shift(97); // 'continue'
+ break;
+ case 99: // 'copy-namespaces'
+ shift(99); // 'copy-namespaces'
+ break;
+ case 101: // 'decimal-format'
+ shift(101); // 'decimal-format'
+ break;
+ case 120: // 'encoding'
+ shift(120); // 'encoding'
+ break;
+ case 127: // 'exit'
+ shift(127); // 'exit'
+ break;
+ case 128: // 'external'
+ shift(128); // 'external'
+ break;
+ case 136: // 'ft-option'
+ shift(136); // 'ft-option'
+ break;
+ case 149: // 'in'
+ shift(149); // 'in'
+ break;
+ case 150: // 'index'
+ shift(150); // 'index'
+ break;
+ case 156: // 'integrity'
+ shift(156); // 'integrity'
+ break;
+ case 166: // 'lax'
+ shift(166); // 'lax'
+ break;
+ case 187: // 'nodes'
+ shift(187); // 'nodes'
+ break;
+ case 194: // 'option'
+ shift(194); // 'option'
+ break;
+ case 198: // 'ordering'
+ shift(198); // 'ordering'
+ break;
+ case 217: // 'revalidation'
+ shift(217); // 'revalidation'
+ break;
+ case 220: // 'schema'
+ shift(220); // 'schema'
+ break;
+ case 223: // 'score'
+ shift(223); // 'score'
+ break;
+ case 229: // 'sliding'
+ shift(229); // 'sliding'
+ break;
+ case 235: // 'strict'
+ shift(235); // 'strict'
+ break;
+ case 246: // 'tumbling'
+ shift(246); // 'tumbling'
+ break;
+ case 247: // 'type'
+ shift(247); // 'type'
+ break;
+ case 252: // 'updating'
+ shift(252); // 'updating'
+ break;
+ case 256: // 'value'
+ shift(256); // 'value'
+ break;
+ case 258: // 'version'
+ shift(258); // 'version'
+ break;
+ case 262: // 'while'
+ shift(262); // 'while'
+ break;
+ case 92: // 'constraint'
+ shift(92); // 'constraint'
+ break;
+ case 171: // 'loop'
+ shift(171); // 'loop'
+ break;
+ default:
+ shift(216); // 'returning'
+ }
+ eventHandler.endNonterminal("NCName", e0);
+ }
+
+ function shift(t)
+ {
+ if (l1 == t)
+ {
+ whitespace();
+ eventHandler.terminal(XQueryTokenizer.TOKEN[l1], b1, e1 > size ? size : e1);
+ b0 = b1; e0 = e1; l1 = 0;
+ }
+ else
+ {
+ error(b1, e1, 0, l1, t);
+ }
+ }
+
+ function whitespace()
+ {
+ if (e0 != b1)
+ {
+ b0 = e0;
+ e0 = b1;
+ eventHandler.whitespace(b0, e0);
+ }
+ }
+
+ function matchW(set)
+ {
+ var code;
+ for (;;)
+ {
+ code = match(set);
+ if (code != 28) // S^WS
+ {
+ break;
+ }
+ }
+ return code;
+ }
+
+ function lookahead1W(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = matchW(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function lookahead1(set)
+ {
+ if (l1 == 0)
+ {
+ l1 = match(set);
+ b1 = begin;
+ e1 = end;
+ }
+ }
+
+ function error(b, e, s, l, t)
+ {
+ throw new self.ParseException(b, e, s, l, t);
+ }
+
+ var lk, b0, e0;
+ var l1, b1, e1;
+ var eventHandler;
+
+ var input;
+ var size;
+ var begin;
+ var end;
+
+ function match(tokenSetId)
+ {
+ var nonbmp = false;
+ begin = end;
+ var current = end;
+ var result = XQueryTokenizer.INITIAL[tokenSetId];
+ var state = 0;
+
+ for (var code = result & 4095; code != 0; )
+ {
+ var charclass;
+ var c0 = current < size ? input.charCodeAt(current) : 0;
+ ++current;
+ if (c0 < 0x80)
+ {
+ charclass = XQueryTokenizer.MAP0[c0];
+ }
+ else if (c0 < 0xd800)
+ {
+ var c1 = c0 >> 4;
+ charclass = XQueryTokenizer.MAP1[(c0 & 15) + XQueryTokenizer.MAP1[(c1 & 31) + XQueryTokenizer.MAP1[c1 >> 5]]];
+ }
+ 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 (XQueryTokenizer.MAP2[m] > c0) hi = m - 1;
+ else if (XQueryTokenizer.MAP2[6 + m] < c0) lo = m + 1;
+ else {charclass = XQueryTokenizer.MAP2[12 + m]; break;}
+ if (lo > hi) {charclass = 0; break;}
+ }
+ }
+
+ state = code;
+ var i0 = (charclass << 12) + code - 1;
+ code = XQueryTokenizer.TRANSITION[(i0 & 15) + XQueryTokenizer.TRANSITION[i0 >> 4]];
+
+ 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;
+ return 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;
+ }
+}
+
+XQueryTokenizer.getTokenSet = function(tokenSetId)
+{
+ var set = [];
+ var s = tokenSetId < 0 ? - tokenSetId : INITIAL[tokenSetId] & 4095;
+ for (var i = 0; i < 276; i += 32)
+ {
+ var j = i;
+ var i0 = (i >> 5) * 2062 + s - 1;
+ var i1 = i0 >> 2;
+ var i2 = i1 >> 2;
+ var f = XQueryTokenizer.EXPECTED[(i0 & 3) + XQueryTokenizer.EXPECTED[(i1 & 3) + XQueryTokenizer.EXPECTED[(i2 & 3) + XQueryTokenizer.EXPECTED[i2 >> 2]]]];
+ for ( ; f != 0; f >>>= 1, ++j)
+ {
+ if ((f & 1) != 0)
+ {
+ set.push(XQueryTokenizer.TOKEN[j]);
+ }
+ }
+ }
+ return set;
+};
+
+XQueryTokenizer.MAP0 =
+[ 66, 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, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35
+];
+
+XQueryTokenizer.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, 347, 363, 379, 416, 416, 416, 408, 331, 323, 331, 323, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 433, 433, 433, 433, 433, 433, 433, 316, 331, 331, 331, 331, 331, 331, 331, 331, 394, 416, 416, 417, 415, 416, 416, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 330, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 66, 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, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 35, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 31, 31, 35, 35, 35, 35, 35, 35, 35, 65, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65
+];
+
+XQueryTokenizer.MAP2 =
+[ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 35, 31, 35, 31, 31, 35
+];
+
+XQueryTokenizer.INITIAL =
+[ 1, 2, 36867, 45060, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
+];
+
+XQueryTokenizer.TRANSITION =
+[ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22908, 18836, 17152, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17365, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 17470, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18157, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 17848, 17880, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18023, 36545, 18621, 18039, 18056, 18072, 18117, 18143, 18173, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17687, 18805, 18421, 18437, 18101, 17393, 18489, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18579, 21711, 17152, 19008, 19233, 20367, 19008, 28684, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17365, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 17470, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18157, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 17848, 17880, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18023, 36545, 18621, 18039, 18056, 18072, 18117, 18143, 18173, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17687, 18805, 18421, 18437, 18101, 17393, 18489, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 20116, 18836, 18637, 19008, 19233, 21267, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18763, 18778, 18794, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18821, 22923, 18906, 19008, 19233, 17431, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18937, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 19054, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 18953, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21843, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21696, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22429, 20131, 18720, 19008, 19233, 20367, 19008, 17173, 23559, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 18087, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 21242, 19111, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19024, 18836, 18609, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19081, 22444, 18987, 19008, 19233, 20367, 19008, 19065, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21992, 22007, 18987, 19008, 19233, 20367, 19008, 18690, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22414, 18836, 18987, 19008, 19233, 30651, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 19138, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 19280, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 19172, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21783, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 19218, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21651, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19249, 19265, 19307, 18888, 27857, 30536, 24401, 31444, 23357, 18888, 19351, 18888, 18890, 27211, 19370, 27211, 27211, 19392, 24401, 31911, 24401, 24401, 25467, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19440, 24401, 24401, 24401, 24401, 24036, 17994, 24060, 18888, 18888, 18888, 18890, 19468, 27211, 27211, 27211, 27211, 19484, 35367, 19520, 24401, 24401, 24401, 19628, 18888, 29855, 18888, 18888, 23086, 27211, 19538, 27211, 27211, 30756, 24012, 24401, 19560, 24401, 24401, 26750, 18888, 18888, 19327, 27855, 27211, 27211, 19580, 17590, 24017, 24401, 24401, 19600, 25665, 18888, 18888, 28518, 27211, 27212, 24016, 19620, 19868, 28435, 25722, 18889, 19644, 27211, 32888, 35852, 19868, 31018, 19694, 19376, 19717, 22215, 19735, 22098, 19751, 35203, 19776, 19797, 19817, 19840, 25783, 31738, 24135, 19701, 19856, 31015, 23516, 31008, 28311, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21768, 18836, 19307, 18888, 27857, 27904, 24401, 29183, 28015, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 19888, 24401, 24401, 24401, 24401, 22953, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19440, 24401, 24401, 24401, 24401, 24036, 18881, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22399, 18836, 19918, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21666, 18836, 19307, 18888, 27857, 27525, 24401, 29183, 21467, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 19946, 24401, 24401, 24401, 24401, 32382, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19998, 24401, 24401, 24401, 24401, 31500, 18467, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 20021, 24401, 24401, 24401, 24401, 24401, 34271, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 32926, 29908, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 20050, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 20101, 19039, 20191, 20412, 20903, 17569, 20309, 20872, 25633, 20623, 20505, 20218, 20242, 17189, 17208, 17281, 20355, 20265, 20306, 20328, 20383, 22490, 20796, 20619, 21354, 20654, 20410, 20956, 21232, 20765, 17421, 20535, 17192, 18127, 22459, 20312, 25531, 22470, 20309, 20428, 18964, 20466, 20491, 21342, 21070, 20521, 20682, 17714, 18326, 17543, 17559, 17585, 22497, 20559, 19504, 20279, 20575, 20290, 20475, 20604, 20639, 20226, 20670, 17661, 21190, 17703, 21176, 17730, 19494, 20698, 20711, 22480, 21046, 21116, 18971, 21130, 20727, 20755, 17675, 17753, 17832, 17590, 25518, 20394, 20781, 20831, 20202, 20847, 21401, 17292, 17934, 17979, 18549, 20863, 20588, 25542, 20888, 20919, 18072, 18117, 20935, 20972, 21032, 21062, 21086, 18239, 21102, 18563, 21146, 21162, 21206, 18351, 20949, 20902, 18340, 21222, 21258, 21283, 18360, 20249, 17405, 21295, 21311, 21327, 20739, 20343, 21370, 21386, 21417, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21977, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 21452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 21504, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 36501, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 28674, 21946, 17617, 36473, 18223, 17237, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 21575, 21534, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 21560, 30628, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21798, 18836, 21612, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21636, 18836, 18987, 19008, 19233, 17902, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21753, 19096, 21903, 19008, 19233, 20367, 19008, 19291, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17379, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 21931, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18280, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21962, 18594, 18987, 19008, 19233, 22043, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21681, 21858, 18987, 19008, 19233, 20367, 19008, 21544, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 32319, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 22231, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 31678, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 33588, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 35019, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22248, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22324, 18836, 22059, 18888, 27857, 30501, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 34365, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22354, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 27086, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 19930, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22309, 22513, 18987, 19008, 19233, 20367, 19008, 19122, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 22544, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22608, 18836, 22988, 23004, 27585, 23020, 23036, 23067, 22087, 18888, 18888, 18888, 23083, 27211, 27211, 27211, 23102, 22121, 24401, 24401, 24401, 23122, 31386, 26154, 19674, 18888, 28119, 28232, 19424, 23705, 27211, 27211, 23142, 23173, 23189, 23212, 24401, 24401, 23246, 34427, 31693, 23262, 18888, 23290, 23308, 27783, 27620, 23327, 35263, 35107, 33383, 23346, 18193, 23393, 32748, 23968, 24401, 23414, 35153, 23463, 18888, 33913, 23442, 23482, 27211, 27211, 23532, 23552, 21431, 23575, 24401, 24401, 23604, 26095, 23635, 23657, 18888, 33482, 23685, 33251, 27211, 22187, 18851, 23721, 35536, 24401, 18887, 23750, 32641, 27211, 23769, 23787, 20080, 33012, 24384, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 23803, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 28224, 31826, 23823, 26917, 34978, 23850, 26493, 25782, 23878, 23914, 23516, 31008, 22105, 19419, 27963, 19659, 29781, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22623, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 28909, 25783, 27211, 27211, 27211, 34048, 23933, 22164, 24401, 24401, 24401, 28409, 23949, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 26583, 18888, 18888, 18888, 35585, 23984, 27211, 27211, 27211, 24005, 22201, 24033, 24401, 24401, 24401, 24052, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 26496, 24076, 24126, 24151, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22638, 18836, 22059, 19678, 27857, 24185, 24401, 24201, 24217, 26592, 18888, 18888, 18890, 24252, 24268, 27211, 27211, 22121, 24287, 24303, 24401, 24401, 30613, 19781, 35432, 36007, 32649, 18888, 25783, 24322, 28966, 23771, 27211, 35072, 22164, 24358, 32106, 26829, 24400, 31500, 31693, 18888, 18888, 18888, 24801, 18890, 27211, 27211, 27211, 27211, 24418, 19484, 24401, 24401, 24401, 24401, 20167, 31181, 18888, 18888, 18888, 27833, 23086, 27211, 27211, 33540, 27211, 30756, 21431, 24401, 24401, 22972, 24401, 26095, 18888, 36131, 18888, 27855, 27211, 24440, 27211, 22187, 22968, 24401, 24459, 24401, 31699, 28454, 18888, 34528, 34570, 35779, 24478, 24402, 24494, 25659, 18888, 36228, 27211, 27211, 24515, 30981, 23734, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 24538, 31017, 27856, 31741, 30059, 23377, 24563, 19837, 25782, 19760, 31015, 23516, 25374, 22105, 19419, 29793, 24579, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22653, 18836, 22059, 25756, 19982, 34097, 23196, 29183, 24614, 24110, 23641, 24673, 26103, 24697, 24443, 24713, 28558, 22121, 24748, 24462, 24764, 23398, 30613, 18888, 18888, 18888, 18888, 24798, 25783, 27211, 27211, 27211, 34232, 35072, 22164, 24401, 24401, 24401, 33302, 31500, 22559, 24106, 24232, 18888, 18888, 34970, 24817, 30411, 27211, 27211, 32484, 19484, 29750, 35127, 24401, 24401, 19872, 31181, 24852, 18888, 18888, 24871, 29221, 27211, 27211, 32072, 27211, 30756, 34441, 24401, 24401, 31571, 24401, 26095, 33141, 27802, 27011, 27855, 25295, 25607, 24888, 22187, 22968, 19195, 34593, 24906, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 33663, 27211, 27211, 24924, 24947, 23588, 31018, 18890, 27211, 31833, 22135, 19447, 23086, 23330, 19828, 30904, 31042, 24972, 19840, 25000, 31738, 30898, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 25016, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22668, 18836, 25041, 25057, 31320, 25073, 25089, 25105, 22087, 34796, 24236, 36138, 34870, 34125, 25121, 23106, 35497, 22248, 36613, 25137, 30671, 27365, 30613, 25153, 26447, 25199, 25233, 22574, 23274, 25249, 25265, 25281, 25318, 25344, 25360, 25400, 25428, 25452, 26731, 25504, 31693, 23669, 25558, 27407, 25575, 28599, 25934, 25599, 27211, 28180, 27304, 25623, 25839, 25649, 24401, 34820, 25681, 25698, 22586, 27775, 30190, 25745, 25778, 25799, 25817, 28995, 33569, 30756, 21518, 33443, 25837, 25855, 25893, 26095, 31254, 26677, 30136, 27855, 25930, 25950, 27211, 22187, 22968, 25966, 25986, 24401, 23428, 27763, 36330, 26959, 26002, 26029, 26045, 26085, 26119, 26170, 26203, 26222, 26239, 30527, 26372, 26274, 28404, 31018, 33757, 27211, 34262, 26316, 36729, 26345, 26366, 35337, 31017, 26388, 26407, 30954, 26350, 33861, 26434, 26463, 26479, 26512, 23516, 33189, 26531, 26547, 27963, 31293, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22683, 18836, 26568, 26181, 26608, 34097, 26643, 29183, 22087, 26669, 18888, 18888, 18890, 26693, 27211, 27211, 27211, 22121, 26720, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 26774, 25783, 27211, 27211, 27211, 26619, 35072, 22164, 24401, 24401, 24401, 21596, 31500, 31693, 18888, 18888, 33978, 18888, 18890, 27211, 27211, 25801, 27211, 27211, 19484, 24401, 24401, 24401, 26792, 24401, 31181, 18888, 18888, 18888, 35464, 23086, 27211, 27211, 27211, 26809, 30756, 21431, 24401, 24401, 24401, 26828, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 31948, 18889, 35707, 27211, 19719, 26845, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 26905, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 24984, 31088, 19419, 26945, 27651, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22698, 18836, 26999, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 23051, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 27033, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 27056, 18888, 18890, 27211, 27211, 30320, 27211, 27211, 27075, 24401, 24401, 29032, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 33986, 27855, 27211, 27211, 27102, 17590, 24017, 24401, 24401, 27123, 27144, 36254, 27162, 27210, 27228, 28500, 18187, 34842, 33426, 27244, 35980, 27277, 27302, 27320, 36048, 34013, 20999, 31882, 21478, 27895, 27356, 30287, 27381, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 26329, 30087, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 27406, 27423, 27445, 35294, 27461, 22087, 18888, 18888, 30140, 18890, 27211, 27211, 27989, 27211, 22121, 24401, 24401, 25682, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 34042, 27211, 27211, 27211, 27211, 29700, 22164, 24401, 24401, 24401, 24401, 27128, 31693, 27477, 18888, 18888, 18888, 18890, 27194, 27211, 27211, 27211, 27211, 19484, 35299, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 27059, 23086, 27211, 27211, 27211, 33366, 30756, 24012, 24401, 24401, 24401, 35044, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 20815, 27211, 30818, 19960, 33969, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22713, 18836, 22059, 27496, 27516, 27541, 35231, 27557, 22087, 29662, 26292, 23292, 27573, 24836, 27601, 27211, 27636, 22121, 35544, 27686, 24401, 27721, 18866, 18888, 27799, 18888, 27818, 22071, 27853, 32260, 27211, 26013, 27873, 27920, 22164, 29419, 24401, 29946, 33413, 26742, 27751, 26881, 18888, 18888, 27261, 36776, 27936, 27211, 27211, 27211, 27988, 28005, 28031, 28052, 24401, 24401, 28069, 28088, 28135, 25488, 28152, 26069, 28167, 27211, 28340, 24657, 28196, 30756, 31523, 24401, 28212, 34176, 36174, 24956, 28248, 28266, 28290, 21488, 33077, 28327, 28356, 17590, 20986, 23126, 28391, 28425, 28102, 28451, 28470, 28490, 28516, 28534, 20034, 33728, 25868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 30241, 28274, 28553, 28574, 19406, 28590, 23086, 23330, 19828, 19452, 28615, 28660, 26147, 25783, 31738, 19837, 25782, 19760, 29613, 35958, 29276, 22105, 19419, 27963, 23157, 28700, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 22528, 18888, 18888, 18888, 18888, 18890, 27333, 27211, 27211, 27211, 27211, 19484, 30853, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22728, 18836, 28747, 28782, 28817, 28841, 28857, 28880, 28896, 24161, 28943, 32011, 36261, 27340, 28961, 29492, 28982, 29011, 24522, 29027, 25436, 29048, 23051, 27500, 29090, 29110, 30713, 18888, 23512, 29130, 25183, 27211, 29155, 28927, 27033, 29173, 23230, 24401, 29199, 35373, 31693, 18888, 18888, 25583, 32629, 29218, 27211, 27211, 31461, 30692, 29237, 27075, 24401, 24401, 24401, 29262, 29302, 19628, 18888, 34329, 18888, 18888, 23086, 27211, 29329, 27211, 27211, 30756, 24012, 35933, 24401, 24401, 24401, 27705, 31612, 18888, 18888, 29346, 29374, 27211, 35650, 17590, 21436, 29393, 24401, 25970, 18887, 33895, 18888, 27211, 32528, 27212, 24016, 32769, 19868, 25659, 18888, 26889, 27211, 27211, 29412, 23889, 24371, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31768, 19840, 25783, 31738, 19837, 29435, 29508, 31102, 29550, 29606, 22105, 30300, 29462, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22743, 18836, 22059, 29629, 29473, 34097, 33285, 29183, 29651, 27254, 18888, 29678, 33329, 32535, 27211, 29694, 29716, 22121, 19202, 24401, 32742, 29741, 18866, 26776, 33921, 28474, 18888, 18888, 25783, 29766, 27211, 29809, 27211, 35072, 22164, 35825, 24401, 29828, 24401, 24036, 36769, 25217, 18888, 18888, 29848, 18890, 27211, 29871, 27211, 26258, 27211, 29894, 24401, 29929, 24401, 36587, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 29725, 29962, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18473, 18888, 18888, 19584, 27211, 27212, 24016, 29982, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19902, 19447, 32052, 19544, 19828, 29998, 30097, 30031, 19840, 25783, 30047, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 30075, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22758, 18836, 30121, 30156, 30206, 30257, 30273, 30336, 22087, 35624, 32837, 25762, 18890, 29878, 34934, 26812, 27211, 22121, 24931, 23223, 29202, 24401, 18866, 34373, 30352, 18888, 18888, 18888, 23447, 24828, 27211, 27211, 27211, 35072, 30370, 35052, 24401, 24401, 24401, 24036, 29523, 18888, 18888, 27146, 18888, 31308, 30386, 27211, 27211, 30405, 30558, 19484, 30427, 24401, 24401, 29938, 35686, 19628, 28766, 30447, 34506, 35614, 23086, 28731, 30482, 30517, 30552, 30756, 24012, 20156, 30574, 30598, 30667, 26283, 33464, 28945, 27670, 30687, 32915, 33504, 25328, 17590, 23963, 20450, 33837, 21016, 32397, 26300, 30708, 30729, 27885, 30748, 21588, 36373, 30779, 26653, 24628, 33220, 32514, 30806, 31835, 25412, 25906, 26515, 18890, 28825, 31833, 26133, 19447, 28304, 31730, 23834, 26057, 30869, 30885, 32181, 30920, 30942, 32797, 25782, 30970, 31015, 23516, 31008, 30997, 31034, 27963, 19659, 29450, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22773, 18836, 31058, 31074, 32463, 31125, 31141, 31197, 22087, 18888, 29534, 35471, 36738, 27211, 24342, 31213, 24424, 22121, 24401, 20175, 31229, 31917, 27736, 31245, 34334, 27175, 18888, 29094, 27286, 27211, 31278, 31336, 27211, 31355, 31371, 24401, 31402, 31418, 24401, 31437, 31693, 18888, 31619, 32841, 18888, 18890, 27211, 27211, 31460, 31477, 27211, 19484, 24401, 24401, 31497, 36581, 24401, 33020, 18888, 18888, 18888, 18888, 30007, 27211, 27211, 27211, 27211, 31516, 32310, 24401, 24401, 24401, 24401, 31539, 18888, 28762, 18888, 24651, 35740, 27211, 27211, 28644, 31565, 35796, 24401, 24401, 19318, 32188, 18888, 24334, 28366, 27212, 29966, 29832, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 31587, 19868, 31635, 32435, 33693, 30105, 31663, 20005, 31715, 31757, 31784, 31812, 30015, 31851, 31878, 25783, 31898, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 31933, 30221, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22788, 18836, 22059, 25729, 30466, 31968, 24306, 31984, 32000, 32807, 35160, 27017, 29590, 34941, 19801, 29377, 33700, 22121, 27040, 30431, 29396, 28864, 29565, 18888, 18888, 18888, 32027, 18888, 25783, 27211, 27211, 23698, 27211, 35072, 22164, 24401, 24401, 30845, 24401, 24036, 32045, 18888, 26929, 18888, 18888, 18890, 27211, 31481, 32068, 27211, 27211, 32088, 24401, 33058, 32122, 24401, 24401, 33736, 18888, 18888, 33162, 18888, 23086, 27211, 27211, 29484, 27211, 28375, 32144, 24401, 24401, 33831, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 36704, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 33107, 22171, 33224, 24271, 32169, 31017, 27856, 31741, 19840, 25783, 31738, 30234, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 32204, 32232, 32252, 32677, 33295, 29074, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 23619, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 32276, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 32299, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 33886, 18889, 36065, 27211, 19719, 35326, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22803, 18836, 32335, 31647, 34666, 32351, 32367, 32417, 22087, 18888, 32433, 19335, 32451, 27211, 32479, 27107, 32500, 22121, 24401, 32551, 20085, 32572, 18866, 22287, 23753, 18888, 18888, 32602, 32665, 27211, 32693, 27211, 26972, 32713, 32729, 24401, 32764, 24401, 25877, 32785, 34768, 18888, 27390, 32823, 24594, 24855, 32857, 24890, 32878, 32904, 27211, 32942, 32977, 24401, 33000, 29313, 24401, 30790, 26206, 27666, 33904, 18888, 23086, 36353, 27211, 33036, 27211, 30756, 24012, 32153, 24401, 33056, 24401, 35861, 18888, 18888, 30354, 27972, 27211, 27211, 33800, 17590, 20145, 24401, 24401, 34638, 20811, 18888, 18888, 33074, 27211, 27212, 36167, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 34616, 24169, 33093, 33123, 33157, 27856, 31741, 23862, 26552, 34302, 19837, 25782, 19760, 31015, 23516, 31008, 33178, 19973, 27963, 23497, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22818, 18836, 33205, 28113, 33240, 34097, 33275, 29183, 22087, 33318, 35438, 18888, 18890, 33345, 26391, 33382, 27211, 22121, 33399, 28072, 33442, 24401, 18866, 22232, 18888, 33459, 18888, 18888, 33480, 33498, 25175, 27211, 27211, 26704, 22164, 24775, 35239, 24401, 24401, 25914, 29580, 18888, 18888, 31109, 25211, 33520, 33539, 27211, 27211, 33556, 36284, 19484, 33585, 24401, 24401, 33604, 32556, 19628, 18888, 18888, 31262, 33658, 23086, 27211, 27211, 33679, 27211, 30756, 24012, 24401, 24401, 33716, 24401, 26854, 27480, 18888, 33752, 27855, 33259, 34701, 27211, 17590, 32102, 24782, 23807, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 33773, 36105, 19868, 25659, 18888, 23368, 27211, 29157, 19719, 23889, 34454, 29286, 18890, 33794, 25302, 33816, 19447, 34079, 33853, 31862, 31017, 27856, 31741, 33877, 28920, 33937, 19837, 30461, 34002, 22276, 36041, 34029, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22833, 18836, 34064, 32616, 34113, 34141, 34157, 34192, 34208, 32216, 36013, 31549, 31952, 34224, 34248, 34287, 29330, 34350, 34389, 34413, 34481, 26793, 18866, 26187, 29635, 22293, 18888, 36654, 25783, 34522, 34544, 34566, 25821, 35072, 22164, 34586, 34609, 34632, 19604, 24036, 36644, 36674, 24681, 18888, 32401, 34654, 31339, 34682, 34698, 27211, 34717, 34753, 28053, 34812, 34836, 24401, 33619, 19628, 34858, 32236, 34906, 24598, 33523, 27612, 34890, 34922, 24732, 29246, 36717, 33634, 34465, 32984, 34168, 26750, 34957, 18888, 18888, 34994, 35010, 27211, 33040, 17590, 29913, 35035, 24401, 36304, 25482, 30171, 35883, 35068, 35088, 26627, 20441, 31173, 35123, 35143, 35176, 24640, 30492, 29358, 19719, 35192, 35219, 25384, 28801, 35255, 35279, 32586, 34496, 23086, 23330, 29061, 31017, 27856, 31741, 19840, 25783, 31738, 24547, 25164, 35315, 31796, 35353, 34316, 22105, 19419, 27963, 24091, 28630, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22848, 18836, 22059, 34782, 34088, 35389, 21008, 35405, 35421, 35454, 18888, 18888, 23466, 35487, 27211, 27211, 27211, 35513, 31154, 24401, 24401, 24401, 35560, 18888, 26863, 36664, 35601, 24872, 25783, 30389, 23536, 26250, 35647, 35666, 22164, 19522, 19564, 30582, 35682, 27697, 35575, 29114, 18888, 18888, 18888, 18890, 27211, 35702, 27211, 27211, 27211, 35723, 24401, 35527, 24401, 24401, 24401, 19628, 30184, 18888, 18888, 18888, 23086, 35739, 27211, 27211, 27211, 29139, 22938, 24401, 24401, 24401, 24401, 23898, 35756, 18888, 18888, 25025, 35778, 27211, 27211, 17590, 20064, 35795, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 23917, 18890, 34550, 31833, 22262, 19447, 23086, 23330, 26418, 31017, 27856, 31741, 19840, 25783, 35812, 19837, 27187, 35841, 33135, 23516, 31008, 22105, 22148, 28712, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22863, 18836, 22059, 35877, 28723, 34097, 31164, 29183, 22087, 26758, 18888, 22592, 18890, 23989, 27211, 29812, 27211, 22121, 33778, 24401, 31421, 24401, 18866, 18888, 18888, 26872, 18888, 18888, 25783, 27211, 30732, 27211, 27211, 35072, 22164, 24401, 24908, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22878, 18836, 22059, 27837, 27857, 35899, 24401, 35915, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31602, 18888, 18888, 18888, 18888, 26223, 27211, 27211, 27211, 27211, 27211, 19484, 35931, 24401, 24401, 24401, 24401, 19628, 18888, 28136, 18888, 18888, 35949, 27211, 32862, 27211, 32697, 30756, 24012, 24401, 32283, 24401, 32128, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22893, 18836, 22059, 35974, 34882, 34097, 33960, 29183, 35996, 18888, 23311, 18888, 36029, 27211, 27211, 36064, 36081, 22121, 24401, 24401, 36104, 33950, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 36121, 18888, 25559, 18888, 18888, 18890, 27211, 27211, 30313, 27211, 27211, 36154, 24401, 24401, 34397, 24401, 24401, 19628, 28250, 18888, 18888, 18888, 23086, 30926, 27211, 27211, 27211, 26983, 24012, 33642, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 19354, 27857, 36190, 24401, 36206, 22087, 18888, 18888, 18888, 18007, 27211, 27211, 27211, 24724, 22121, 24401, 24401, 24401, 30827, 18866, 18888, 36222, 18888, 28795, 18888, 25783, 35100, 27211, 27429, 27211, 35072, 22164, 30836, 24401, 24499, 24401, 24036, 31693, 18888, 36244, 18888, 18888, 18890, 27211, 36088, 27211, 27211, 27211, 19484, 24401, 28036, 24401, 24401, 24401, 19628, 18888, 18888, 35631, 18888, 35762, 27211, 27211, 36277, 27211, 34730, 24012, 24401, 24401, 36300, 24401, 36320, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 25712, 18888, 18888, 36346, 27211, 27212, 19184, 24402, 19868, 25659, 32029, 18889, 27211, 33359, 19719, 23889, 36369, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22384, 18836, 36389, 19008, 19233, 20367, 36434, 17173, 17595, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 36453, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20362, 21726, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22369, 18836, 18987, 19008, 19233, 20367, 19008, 21737, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21813, 18836, 36489, 19008, 19233, 20367, 19008, 17173, 17737, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17768, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20543, 22022, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 36517, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 19307, 18888, 27857, 30756, 24401, 29183, 28015, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 36567, 24401, 24401, 24401, 24401, 22953, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 36603, 24401, 24401, 24401, 24401, 24036, 18881, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 36629, 36690, 18720, 19008, 19233, 20367, 19008, 17454, 17595, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17223, 17308, 17327, 17346, 18918, 36754, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20362, 21726, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 0, 94242, 0, 118820, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2482176, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 2207744, 2404352, 2412544, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3104768, 2605056, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2678784, 2207744, 2695168, 2207744, 2703360, 2207744, 2711552, 2752512, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 139, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664, 2158592, 2158592, 2158592, 2863104, 2891776, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2785280, 2207744, 2809856, 2207744, 2207744, 2842624, 2207744, 2207744, 2207744, 2899968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2473984, 2207744, 2207744, 2494464, 2207744, 2207744, 2207744, 2523136, 2158592, 2404352, 2412544, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2564096, 2158592, 2158592, 2605056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2678784, 2158592, 2695168, 2158592, 2703360, 2158592, 2711552, 2752512, 2158592, 2158592, 2785280, 2158592, 2158592, 2785280, 2158592, 2809856, 2158592, 2158592, 2842624, 2158592, 2158592, 2158592, 2899968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 641, 0, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 32768, 0, 2158592, 0, 2158592, 2158592, 2158592, 2383872, 2158592, 2158592, 2158592, 2158592, 3006464, 2383872, 2207744, 2207744, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2572573, 2158877, 2158877, 0, 2207744, 2207744, 2596864, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2641920, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 167936, 0, 0, 2162688, 0, 0, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2146304, 2146304, 2224128, 2224128, 2232320, 2232320, 2232320, 641, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2531328, 2158592, 2158592, 2158592, 2158592, 2158592, 2617344, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2502656, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2699264, 2158592, 2158592, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664, 2207744, 2863104, 2891776, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3018752, 2207744, 3043328, 2207744, 2207744, 2207744, 2207744, 3080192, 2207744, 2207744, 3112960, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 172310, 279, 0, 2162688, 0, 0, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2404352, 2412544, 2158592, 2510848, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2584576, 2158592, 2609152, 2158592, 2158592, 2629632, 2158592, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2158592, 2158592, 3170304, 3174400, 2158592, 2367488, 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 0, 2207744, 2207744, 2207744, 2433024, 2207744, 2453504, 2461696, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2510848, 2207744, 2207744, 2207744, 2207744, 2207744, 2531328, 2207744, 2207744, 2207744, 2207744, 2207744, 2617344, 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 1508, 2715648, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2867200, 2207744, 2904064, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2580480, 2207744, 2207744, 2207744, 2207744, 2621440, 2207744, 2207744, 2207744, 3149824, 2207744, 2207744, 3170304, 3174400, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 2158592, 2158592, 2158592, 2404352, 2412544, 2707456, 2732032, 2207744, 2207744, 2207744, 2822144, 2826240, 2207744, 2895872, 2207744, 2207744, 2924544, 2207744, 2207744, 2973696, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 285, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 0, 0, 2535424, 2543616, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2572288, 2981888, 2207744, 2207744, 3002368, 2207744, 3047424, 3063808, 3076096, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3203072, 2708960, 2732032, 2158592, 2158592, 2158592, 2822144, 2827748, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2981888, 2158592, 2158592, 3002368, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2981888, 2158592, 2158592, 3003876, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 20480, 0, 0, 0, 0, 0, 2162688, 20480, 0, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2908160, 2527232, 2207744, 2207744, 2576384, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2908160, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592, 2158592, 0, 0, 2158592, 2158592, 2158592, 2158592, 2633728, 2658304, 0, 0, 2740224, 2744320, 0, 2834432, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 933, 45, 45, 45, 45, 442, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 2494464, 2158592, 2158592, 2158592, 2524757, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 1504, 2158592, 2498560, 2158592, 2158592, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 2736128, 2158592, 2158592, 0, 2158592, 2912256, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3108864, 2158592, 2158592, 3133440, 3145728, 3153920, 2375680, 2379776, 2207744, 2207744, 2420736, 2207744, 2449408, 2207744, 2207744, 2207744, 2498560, 2207744, 2207744, 2207744, 2207744, 2568192, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 551, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 2020, 2158592, 2592768, 2625536, 2207744, 2207744, 2674688, 2736128, 2207744, 2207744, 2207744, 2912256, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 542, 0, 544, 2207744, 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 641, 0, 0, 0, 0, 0, 0, 2367488, 2158592, 2498560, 2158592, 2158592, 1621, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 1608, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1107, 97, 97, 1110, 97, 97, 3133440, 3145728, 3153920, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3014656, 2158592, 2158592, 3051520, 2158592, 2158592, 3100672, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2416640, 2207744, 2465792, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2633728, 2658304, 2740224, 2744320, 2834432, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592, 2158592, 3129344, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744, 2207744, 3129344, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 32768, 0, 0, 0, 0, 0, 0, 2367488, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592, 2158592, 3129344, 2158592, 2158592, 2478080, 2158592, 2158592, 2158592, 2535424, 2543616, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3117056, 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 2699264, 2207744, 2207744, 2207744, 2207744, 2207744, 2748416, 2756608, 2777088, 2801664, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 0, 0, 2535709, 2543901, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2990365, 2158877, 2158877, 2158730, 2158730, 2158730, 2158730, 2158730, 2572426, 2207744, 2535424, 2543616, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158592, 2158592, 2478080, 2207744, 2207744, 2990080, 2207744, 2207744, 2158592, 2158592, 2482176, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 0, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 3010560, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158592, 2428928, 2158592, 2514944, 0, 0, 2158592, 2588672, 2158592, 0, 2838528, 2158592, 2158592, 2158592, 3010560, 2158592, 2506752, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 0, 29315, 922, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1539, 45, 3006464, 2383872, 0, 2020, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158592, 2637824, 2953216, 2158592, 2539520, 2158592, 2539520, 2207744, 0, 0, 2539520, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 0, 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2965504, 2965504, 2965504, 0, 0, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2474269, 2158877, 2158877, 0, 0, 2158877, 2158877, 2158877, 2158877, 2634013, 2658589, 0, 0, 2740509, 2744605, 0, 2834717, 40976, 18, 36884, 45078, 24, 28, 90143, 94242, 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18, 36884, 0, 0, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 86016, 0, 0, 2211840, 102439, 0, 0, 0, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 0, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 135, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2564096, 2158592, 2158592, 2158592, 2158592, 2158592, 2596864, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2641920, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472, 2494464, 2158592, 2158592, 2158592, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 0, 27, 27, 0, 2158592, 2498560, 2158592, 2158592, 0, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2494464, 2158592, 2158592, 2158592, 3006464, 2383872, 0, 0, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 40976, 18, 36884, 45078, 24, 27, 147488, 94242, 147456, 147488, 106538, 98347, 0, 0, 147456, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 81920, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2428928, 2158592, 2514944, 2158592, 2588672, 2158592, 2838528, 2158592, 2158592, 40976, 18, 151573, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1315, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1487, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 130, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3096576, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 644, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 1080, 0, 1084, 0, 1088, 0, 0, 0, 0, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2531466, 2158730, 2158730, 2158730, 2158730, 2158730, 2617482, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472, 2158592, 2818048, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143, 159779, 159744, 102439, 159779, 98347, 0, 0, 159744, 40976, 18, 18, 36884, 0, 45078, 0, 2224253, 172032, 2224253, 2232448, 2232448, 172032, 2232448, 90143, 0, 0, 2170880, 0, 0, 550, 829, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 124, 124, 127, 127, 127, 40976, 18, 36884, 45078, 25, 29, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 163931, 40976, 18, 18, 36884, 0, 45078, 249856, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 0, 827, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 4243810, 4243810, 24, 24, 27, 27, 27, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 57344, 286, 2158592, 2158592, 2158592, 2158592, 2707456, 2732032, 2158592, 2158592, 2158592, 2822144, 2826240, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 53248, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1613, 97, 97, 97, 97, 97, 97, 1495, 97, 97, 97, 97, 97, 97, 97, 97, 97, 566, 97, 97, 97, 97, 97, 97, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 546, 0, 0, 0, 0, 286, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 17, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 120, 121, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 53248, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 196608, 18, 266240, 24, 24, 27, 27, 27, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 0, 45, 45, 45, 45, 45, 45, 45, 1535, 45, 45, 45, 45, 45, 45, 45, 1416, 45, 45, 45, 45, 45, 45, 45, 45, 424, 45, 45, 45, 45, 45, 45, 45, 45, 45, 405, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 199, 45, 45, 67, 67, 67, 67, 67, 491, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1766, 67, 67, 67, 1767, 67, 24850, 24850, 12564, 12564, 0, 0, 2166784, 546, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 743, 57889, 0, 2170880, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1856, 45, 1858, 1859, 67, 67, 67, 1009, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1021, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367773, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2699549, 2158877, 2158877, 2158877, 2158877, 2158877, 2748701, 2756893, 2777373, 2801949, 97, 1115, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 857, 97, 67, 67, 67, 67, 67, 1258, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1826, 67, 97, 97, 97, 97, 97, 97, 1338, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 870, 97, 97, 67, 67, 67, 1463, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1579, 67, 67, 97, 97, 97, 1518, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 904, 905, 97, 97, 97, 97, 1620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0, 0, 0, 0, 45, 1679, 67, 67, 67, 1682, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1690, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 189, 45, 45, 45, 1748, 45, 45, 45, 1749, 1750, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1959, 67, 67, 67, 67, 1768, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1791, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1802, 67, 1817, 67, 67, 67, 67, 67, 67, 1823, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 1848, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 659, 45, 45, 45, 45, 45, 45, 45, 1863, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 495, 67, 67, 67, 67, 67, 1878, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 1973, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1165, 97, 1167, 67, 24850, 24850, 12564, 12564, 0, 0, 2166784, 0, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1789, 97, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 136, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 229376, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 67, 24850, 24850, 12564, 12564, 0, 0, 280, 547, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 1788, 97, 97, 0, 97, 2024, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 235, 67, 67, 67, 67, 67, 57889, 547, 547, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1799, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 1092, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1612, 97, 97, 97, 97, 1616, 97, 1297, 1472, 0, 0, 0, 0, 1303, 1474, 0, 0, 0, 0, 1309, 1476, 0, 0, 0, 0, 97, 97, 97, 1481, 97, 97, 97, 97, 97, 97, 1488, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 607, 97, 97, 97, 97, 40976, 18, 36884, 45078, 26, 30, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 213080, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 143448, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 0, 0, 0, 97, 97, 97, 97, 1482, 97, 1483, 97, 97, 97, 97, 97, 97, 1326, 97, 97, 1329, 1330, 97, 97, 97, 97, 97, 97, 1159, 1160, 97, 97, 97, 97, 97, 97, 97, 97, 590, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211974, 102439, 0, 0, 106538, 98347, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2474122, 2158730, 2158730, 2494602, 2158730, 2158730, 2158730, 2809994, 2158730, 2158730, 2842762, 2158730, 2158730, 2158730, 2900106, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3014794, 2158730, 2158730, 3051658, 2158730, 2158730, 3100810, 2158730, 2158730, 2158730, 2158730, 3096714, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 2207744, 541, 541, 543, 543, 0, 0, 2166784, 0, 548, 549, 549, 0, 286, 2158877, 2158877, 2158877, 2863389, 2892061, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3186973, 2158877, 0, 0, 0, 0, 0, 0, 0, 0, 2367626, 2158877, 2404637, 2412829, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2564381, 2158877, 2158877, 2605341, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2679069, 2158877, 2695453, 2158877, 2703645, 2158877, 2711837, 2752797, 2158877, 0, 2158877, 2158877, 2158877, 2384010, 2158730, 2158730, 2158730, 2158730, 3006602, 2383872, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3096576, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 2158877, 2785565, 2158877, 2810141, 2158877, 2158877, 2842909, 2158877, 2158877, 2158877, 2900253, 2158877, 2158877, 2158877, 2158877, 2158877, 2531613, 2158877, 2158877, 2158877, 2158877, 2158877, 2617629, 2158877, 2158877, 2158877, 2158877, 2158730, 2818186, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3105053, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 0, 0, 97, 97, 97, 1611, 97, 97, 97, 97, 97, 97, 97, 1496, 97, 97, 1499, 97, 97, 97, 97, 97, 2441354, 2445450, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2502794, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2433162, 2158730, 2453642, 2461834, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2580618, 2158730, 2158730, 2158730, 2158730, 2621578, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2699402, 2158730, 2158730, 2158730, 2158730, 2678922, 2158730, 2695306, 2158730, 2703498, 2158730, 2711690, 2752650, 2158730, 2158730, 2785418, 2158730, 2158730, 2158730, 3113098, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3186826, 2158730, 2207744, 2207744, 2207744, 2207744, 2781184, 2793472, 2207744, 2818048, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 541, 0, 543, 2158877, 2502941, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2580765, 2158877, 2158877, 2158877, 2158877, 2621725, 2158877, 3019037, 2158877, 3043613, 2158877, 2158877, 2158877, 2158877, 3080477, 2158877, 2158877, 3113245, 2158877, 2158877, 2158877, 2158877, 0, 2158877, 2908445, 2158877, 2158877, 2158877, 2978077, 2158877, 2158877, 2158877, 2158877, 3039517, 2158877, 2158730, 2510986, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2584714, 2158730, 2609290, 2158730, 2158730, 2629770, 2158730, 2158730, 2158730, 2388106, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2605194, 2158730, 2158730, 2158730, 2158730, 2687114, 2158730, 2715786, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2867338, 2158730, 2904202, 2158730, 2158730, 2158730, 2642058, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2781322, 2793610, 2158730, 3121290, 2158730, 2158730, 2158730, 3149962, 2158730, 2158730, 3170442, 3174538, 2158730, 2367488, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2441216, 2445312, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2502656, 2158877, 2433309, 2158877, 2453789, 2461981, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2511133, 2158877, 2158877, 2158877, 2158877, 2584861, 2158877, 2609437, 2158877, 2158877, 2629917, 2158877, 2158877, 2158877, 2687261, 2158877, 2715933, 2158877, 2158730, 2158730, 2973834, 2158730, 2982026, 2158730, 2158730, 3002506, 2158730, 3047562, 3063946, 3076234, 2158730, 2158730, 2158730, 2158730, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158877, 2507037, 0, 0, 2158877, 2158730, 2158730, 2158730, 3203210, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2564096, 2207744, 2207744, 2207744, 2707741, 2732317, 2158877, 2158877, 2158877, 2822429, 2826525, 2158877, 2896157, 2158877, 2158877, 2924829, 2158877, 2158877, 2973981, 2158877, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 642, 0, 2158592, 0, 45, 1529, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1755, 45, 67, 67, 2982173, 2158877, 2158877, 3002653, 2158877, 3047709, 3064093, 3076381, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3203357, 2523274, 2527370, 2158730, 2158730, 2576522, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2908298, 2494749, 2158877, 2158877, 2158877, 2523421, 2527517, 2158877, 2158877, 2576669, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 40976, 0, 18, 18, 4321280, 2224253, 2232448, 4329472, 2232448, 2158730, 2498698, 2158730, 2158730, 2158730, 2158730, 2568330, 2158730, 2592906, 2625674, 2158730, 2158730, 2674826, 2736266, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2158730, 2912394, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3109002, 2158730, 2158730, 3133578, 3145866, 3154058, 2375680, 2207744, 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375965, 2380061, 2158877, 2158877, 2421021, 2158877, 2449693, 2158877, 2158877, 2158877, 3117341, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3104906, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158877, 2498845, 2158877, 2158877, 0, 2158877, 2158877, 2568477, 2158877, 2593053, 2625821, 2158877, 2158877, 2674973, 0, 0, 0, 0, 97, 97, 1480, 97, 97, 97, 97, 97, 1485, 97, 97, 97, 0, 97, 97, 1729, 97, 1731, 97, 97, 97, 97, 97, 97, 97, 311, 97, 97, 97, 97, 97, 97, 97, 97, 1520, 97, 97, 1523, 97, 97, 1526, 97, 2736413, 2158877, 2158877, 0, 2158877, 2912541, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3109149, 2158877, 2158877, 3014941, 2158877, 2158877, 3051805, 2158877, 2158877, 3100957, 2158877, 2158877, 3121437, 2158877, 2158877, 2158877, 3150109, 3133725, 3146013, 3154205, 2158730, 2408586, 2416778, 2158730, 2465930, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3018890, 2158730, 3043466, 2158730, 2158730, 2158730, 2158730, 3080330, 2633866, 2658442, 2740362, 2744458, 2834570, 2949258, 2158730, 2986122, 2158730, 2998410, 2158730, 2158730, 2158730, 3129482, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744, 2207744, 3129344, 2158877, 2408733, 2416925, 2158877, 2466077, 2158877, 2158877, 3170589, 3174685, 2158877, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2424970, 2158730, 2158730, 2158730, 2158730, 2707594, 2732170, 2158730, 2158730, 2158730, 2822282, 2826378, 2158730, 2896010, 2158730, 2158730, 2924682, 2949405, 2158877, 2986269, 2158877, 2998557, 2158877, 2158877, 2158877, 3129629, 2158730, 2158730, 2478218, 2158730, 2158730, 2158730, 2535562, 2543754, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3117194, 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 3014656, 2207744, 2207744, 3051520, 2207744, 2207744, 3100672, 2207744, 2207744, 3121152, 2207744, 2207744, 2207744, 2207744, 2207744, 2584576, 2207744, 2609152, 2207744, 2207744, 2629632, 2207744, 2207744, 2207744, 2686976, 2207744, 2207744, 2535424, 2543616, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158877, 2158877, 2478365, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2158730, 2482314, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2387968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 823, 0, 825, 2158730, 2158730, 2158730, 2990218, 2158730, 2158730, 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 135, 0, 2207744, 2207744, 2990080, 2207744, 2207744, 2158877, 2158877, 2482461, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2429066, 2158730, 2515082, 2158730, 2588810, 2158730, 2838666, 2158730, 2158730, 2158730, 3010698, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158877, 2429213, 2158877, 2515229, 0, 0, 2158877, 2588957, 2158877, 0, 2838813, 2158877, 2158877, 2158877, 3010845, 2158730, 2506890, 2158730, 2158730, 2158730, 2748554, 2756746, 2777226, 2801802, 2158730, 2158730, 2158730, 2863242, 2891914, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2564234, 2158730, 2158730, 2158730, 2158730, 2158730, 2597002, 2158730, 2158730, 2158730, 3006464, 2384157, 0, 0, 2158877, 2158877, 2158877, 2158877, 3006749, 2158730, 2637962, 2953354, 2158730, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158877, 2638109, 2953501, 2158877, 2539658, 2158730, 2539520, 2207744, 0, 0, 2539805, 2158877, 2158730, 2158730, 2158730, 2977930, 2158730, 2158730, 2158730, 2158730, 3039370, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3158154, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2965642, 2965504, 2965789, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1484, 97, 97, 97, 97, 2158592, 18, 0, 122880, 0, 0, 0, 77824, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 356, 0, 0, 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 45, 1751, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1427, 67, 67, 67, 67, 67, 1432, 67, 67, 67, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 122880, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 1322, 550, 0, 286, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 4329472, 27, 27, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 542, 0, 0, 0, 542, 0, 544, 0, 0, 0, 544, 0, 550, 0, 0, 0, 0, 0, 97, 97, 1610, 97, 97, 97, 97, 97, 97, 97, 97, 898, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 237568, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 192512, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 94, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 96, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 12378, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 126, 126, 126, 126, 90143, 0, 0, 2170880, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 20480, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 241664, 102439, 106538, 98347, 0, 0, 20568, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 200797, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 0, 0, 44, 0, 0, 20575, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 41, 41, 41, 0, 0, 1126400, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 89, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 131201, 27, 27, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0, 208896, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 32768, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2433024, 2158592, 2453504, 2461696, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2510848, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 245783, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 221184, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 180224, 40976, 18, 18, 36884, 155648, 45078, 0, 24, 24, 217088, 27, 27, 27, 217088, 90143, 0, 0, 2170880, 0, 0, 828, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2387968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 233472, 0, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 718, 45, 45, 45, 45, 45, 45, 45, 45, 45, 727, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 45, 1808, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 0, 0, 97, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 1787, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 2029, 45, 67, 67, 67, 67, 2033, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 1798, 45, 45, 1800, 45, 45, 0, 1472, 0, 0, 0, 0, 0, 1474, 0, 0, 0, 0, 0, 1476, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 1320, 97, 97, 0, 0, 97, 97, 97, 97, 1786, 97, 0, 0, 97, 97, 0, 1790, 1527, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 663, 67, 24850, 24850, 12564, 12564, 0, 57889, 281, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 1785, 97, 97, 0, 0, 97, 97, 0, 97, 97, 1979, 97, 97, 45, 45, 1983, 45, 1984, 45, 45, 45, 45, 45, 652, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 690, 45, 45, 694, 45, 45, 40976, 19, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 262144, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 46, 67, 98, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 45, 67, 97, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 258048, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 1122423, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 1114152, 1114152, 1114152, 0, 0, 1114112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 37, 102439, 106538, 98347, 0, 0, 204800, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 57436, 40976, 18, 36884, 45078, 24, 27, 33, 33, 0, 33, 33, 33, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 124, 124, 124, 127, 127, 127, 127, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158877, 2158877, 2158877, 2388253, 2158877, 2158877, 2158877, 2158877, 2158877, 2781469, 2793757, 2158877, 2818333, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2867485, 2158877, 2904349, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3096861, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2441501, 2445597, 2158877, 2158877, 2158877, 2158877, 2158877, 40976, 122, 123, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 936, 2158592, 4243810, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 935, 45, 45, 45, 715, 45, 45, 45, 45, 45, 45, 45, 723, 45, 45, 45, 45, 45, 1182, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 430, 45, 45, 45, 45, 45, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 47, 68, 99, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 48, 69, 100, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 49, 70, 101, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 50, 71, 102, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 51, 72, 103, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 52, 73, 104, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 53, 74, 105, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 54, 75, 106, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 55, 76, 107, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 56, 77, 108, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 57, 78, 109, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 58, 79, 110, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 59, 80, 111, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 60, 81, 112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 61, 82, 113, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 62, 83, 114, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 63, 84, 115, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 64, 85, 116, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 65, 86, 117, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 66, 87, 118, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18, 0, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1314, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1321, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 0, 1315, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1360, 97, 97, 131, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 145, 149, 45, 45, 45, 45, 45, 174, 45, 179, 45, 185, 45, 188, 45, 45, 202, 67, 255, 67, 67, 269, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 292, 296, 97, 97, 97, 97, 97, 321, 97, 326, 97, 332, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 646, 335, 97, 97, 349, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 437, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 523, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 511, 67, 67, 67, 97, 97, 97, 620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1501, 1502, 97, 793, 67, 67, 796, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 808, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 2052, 67, 67, 67, 67, 813, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 830, 97, 97, 97, 97, 97, 97, 97, 97, 97, 315, 97, 97, 97, 97, 97, 97, 841, 97, 97, 97, 97, 97, 97, 97, 97, 97, 854, 97, 97, 97, 97, 97, 97, 589, 97, 97, 97, 97, 97, 97, 97, 97, 97, 867, 97, 97, 97, 97, 97, 97, 97, 891, 97, 97, 894, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 906, 45, 937, 45, 45, 940, 45, 45, 45, 45, 45, 45, 948, 45, 45, 45, 45, 45, 734, 735, 67, 737, 67, 738, 67, 740, 67, 67, 67, 45, 967, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 435, 45, 45, 45, 980, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 415, 45, 45, 67, 67, 1024, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1081, 13112, 1085, 54074, 1089, 0, 0, 0, 0, 0, 0, 363, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 45, 1674, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1913, 67, 1914, 67, 67, 67, 1918, 67, 67, 97, 97, 97, 97, 1118, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 630, 97, 97, 97, 97, 97, 1169, 97, 97, 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1534, 45, 45, 45, 45, 45, 1538, 45, 45, 45, 45, 1233, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 742, 67, 45, 45, 1191, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 454, 67, 67, 67, 67, 1243, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1251, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 2050, 0, 97, 97, 45, 45, 45, 732, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 67, 67, 67, 1284, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 772, 67, 67, 67, 1293, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 2158592, 2158592, 2158592, 2404352, 2412544, 1323, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1331, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1737, 97, 1364, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1373, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 647, 45, 45, 1387, 45, 45, 1391, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 410, 45, 45, 45, 45, 45, 1400, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1407, 45, 45, 45, 45, 45, 941, 45, 943, 45, 45, 45, 45, 45, 45, 951, 45, 67, 1438, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1447, 67, 67, 67, 67, 67, 67, 782, 67, 67, 67, 67, 67, 67, 67, 67, 67, 756, 67, 67, 67, 67, 67, 67, 97, 1491, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1500, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1736, 97, 45, 45, 1541, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 677, 45, 45, 67, 1581, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 791, 792, 67, 67, 67, 67, 1598, 67, 1600, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 97, 97, 97, 1727, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1513, 97, 97, 67, 67, 97, 1879, 97, 1881, 97, 0, 1884, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 1842, 97, 97, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1928, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1903, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 1971, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 1381, 45, 45, 45, 45, 1976, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1747, 809, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 907, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1478, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1150, 97, 97, 97, 97, 67, 67, 67, 67, 1244, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 477, 67, 67, 67, 67, 67, 67, 1294, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1324, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1374, 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 945, 45, 45, 45, 45, 45, 45, 45, 45, 1908, 45, 45, 1910, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1919, 67, 0, 0, 97, 97, 97, 97, 45, 2048, 67, 2049, 0, 0, 97, 2051, 45, 45, 45, 939, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 397, 45, 45, 45, 1921, 67, 67, 1923, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1947, 45, 1935, 0, 0, 0, 97, 1939, 97, 97, 1941, 97, 45, 45, 45, 45, 45, 45, 382, 389, 45, 45, 45, 45, 45, 45, 45, 45, 1810, 45, 45, 1812, 67, 67, 67, 67, 67, 256, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 336, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 371, 373, 45, 45, 45, 955, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 413, 45, 45, 45, 457, 459, 67, 67, 67, 67, 67, 67, 67, 67, 473, 67, 478, 67, 67, 482, 67, 67, 485, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 1828, 97, 554, 556, 97, 97, 97, 97, 97, 97, 97, 97, 570, 97, 575, 97, 97, 579, 97, 97, 582, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 330, 97, 97, 67, 746, 67, 67, 67, 67, 67, 67, 67, 67, 67, 758, 67, 67, 67, 67, 67, 67, 67, 1575, 67, 67, 67, 67, 67, 67, 67, 67, 493, 67, 67, 67, 67, 67, 67, 67, 97, 97, 844, 97, 97, 97, 97, 97, 97, 97, 97, 97, 856, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1735, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1642, 97, 1644, 97, 97, 890, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 67, 67, 67, 67, 1065, 1066, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 532, 67, 67, 67, 67, 67, 67, 67, 1451, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 496, 67, 67, 97, 97, 1505, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 593, 97, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1617, 97, 97, 1635, 0, 1637, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 885, 97, 97, 97, 97, 67, 67, 1704, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 565, 572, 97, 97, 97, 97, 97, 97, 97, 97, 1832, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1946, 45, 45, 67, 67, 67, 67, 67, 97, 1926, 97, 1927, 97, 0, 0, 0, 97, 97, 1934, 2043, 0, 0, 97, 97, 97, 2047, 45, 45, 67, 67, 0, 1832, 97, 97, 45, 45, 45, 981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1227, 45, 45, 45, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 372, 45, 45, 45, 45, 1661, 1662, 45, 45, 45, 45, 45, 1666, 45, 45, 45, 45, 45, 1673, 45, 1675, 45, 45, 45, 45, 45, 45, 45, 67, 1426, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1275, 67, 67, 67, 67, 67, 45, 418, 45, 45, 420, 45, 45, 423, 45, 45, 45, 45, 45, 45, 45, 45, 959, 45, 45, 962, 45, 45, 45, 45, 458, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 483, 67, 67, 67, 67, 504, 67, 67, 506, 67, 67, 509, 67, 67, 67, 67, 67, 67, 67, 528, 67, 67, 67, 67, 67, 67, 67, 67, 1287, 67, 67, 67, 67, 67, 67, 67, 555, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 580, 97, 97, 97, 97, 601, 97, 97, 603, 97, 97, 606, 97, 97, 97, 97, 97, 97, 848, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1498, 97, 97, 97, 97, 97, 97, 45, 45, 714, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 989, 990, 45, 67, 67, 67, 67, 67, 1011, 67, 67, 67, 67, 1015, 67, 67, 67, 67, 67, 67, 67, 753, 67, 67, 67, 67, 67, 67, 67, 67, 467, 67, 67, 67, 67, 67, 67, 67, 45, 45, 1179, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1003, 1004, 67, 1217, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 728, 67, 1461, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1034, 67, 97, 1516, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 871, 97, 67, 67, 67, 1705, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 567, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1715, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 1380, 45, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1887, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 2006, 45, 45, 1907, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1920, 67, 97, 0, 2035, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 1428, 67, 67, 67, 67, 67, 67, 1435, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 146, 45, 152, 45, 45, 165, 45, 175, 45, 180, 45, 45, 187, 190, 195, 45, 203, 254, 257, 262, 67, 270, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 97, 97, 97, 293, 97, 299, 97, 97, 312, 97, 322, 97, 327, 97, 97, 334, 337, 342, 97, 350, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 484, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 499, 97, 581, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 596, 648, 45, 650, 45, 651, 45, 653, 45, 45, 45, 657, 45, 45, 45, 45, 45, 45, 1954, 67, 67, 67, 1958, 67, 67, 67, 67, 67, 67, 67, 768, 67, 67, 67, 67, 67, 67, 67, 67, 769, 67, 67, 67, 67, 67, 67, 67, 680, 45, 45, 45, 45, 45, 45, 45, 45, 688, 689, 691, 45, 45, 45, 45, 45, 983, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 947, 45, 45, 45, 45, 952, 45, 45, 698, 699, 45, 45, 702, 703, 45, 45, 45, 45, 45, 45, 45, 711, 744, 67, 67, 67, 67, 67, 67, 67, 67, 67, 757, 67, 67, 67, 67, 761, 67, 67, 67, 67, 765, 67, 767, 67, 67, 67, 67, 67, 67, 67, 67, 775, 776, 778, 67, 67, 67, 67, 67, 67, 785, 786, 67, 67, 789, 790, 67, 67, 67, 67, 67, 67, 1442, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1775, 97, 97, 97, 67, 67, 67, 67, 67, 798, 67, 67, 67, 802, 67, 67, 67, 67, 67, 67, 67, 67, 1465, 67, 67, 1468, 67, 67, 1471, 67, 67, 810, 67, 67, 67, 67, 67, 67, 67, 67, 67, 821, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 833, 97, 835, 97, 836, 97, 838, 97, 97, 0, 0, 97, 97, 97, 2002, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1740, 45, 45, 45, 1744, 45, 45, 45, 97, 842, 97, 97, 97, 97, 97, 97, 97, 97, 97, 855, 97, 97, 97, 97, 0, 1717, 1718, 97, 97, 97, 97, 97, 1722, 97, 0, 0, 859, 97, 97, 97, 97, 863, 97, 865, 97, 97, 97, 97, 97, 97, 97, 97, 604, 97, 97, 97, 97, 97, 97, 97, 873, 874, 876, 97, 97, 97, 97, 97, 97, 883, 884, 97, 97, 887, 888, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 225280, 0, 365, 0, 367, 0, 45, 45, 45, 1531, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1199, 45, 45, 45, 45, 45, 97, 97, 908, 97, 97, 97, 97, 97, 97, 97, 97, 97, 919, 638, 0, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2425117, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2597149, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2642205, 2158877, 2158877, 2158877, 2158877, 2158877, 3158301, 0, 2375818, 2379914, 2158730, 2158730, 2420874, 2158730, 2449546, 2158730, 2158730, 953, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 965, 978, 45, 45, 45, 45, 45, 45, 985, 45, 45, 45, 45, 45, 45, 45, 45, 971, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1027, 67, 1029, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1455, 67, 67, 67, 67, 67, 67, 67, 1077, 1078, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 366, 0, 139, 2158730, 2158730, 2158730, 2404490, 2412682, 1113, 97, 97, 97, 97, 97, 97, 1121, 97, 1123, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1540, 1155, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 615, 1168, 97, 97, 1171, 1172, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 1533, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1663, 45, 45, 45, 45, 45, 45, 45, 45, 45, 183, 45, 45, 45, 45, 201, 45, 45, 45, 1219, 45, 45, 45, 45, 45, 45, 45, 1226, 45, 45, 45, 45, 45, 168, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 427, 45, 45, 45, 45, 45, 45, 45, 1231, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1242, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1046, 67, 67, 1254, 67, 1256, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 806, 807, 67, 67, 97, 1336, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1111, 97, 97, 97, 97, 97, 1351, 97, 97, 97, 1354, 97, 97, 97, 1359, 97, 97, 97, 0, 97, 97, 97, 97, 1640, 97, 97, 97, 97, 97, 97, 97, 897, 97, 97, 97, 902, 97, 97, 97, 97, 97, 97, 97, 97, 1366, 97, 97, 97, 97, 97, 97, 97, 1371, 97, 97, 97, 0, 97, 97, 97, 1730, 97, 97, 97, 97, 97, 97, 97, 97, 915, 97, 97, 97, 97, 0, 360, 0, 67, 67, 67, 1440, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1017, 67, 1019, 67, 67, 67, 67, 67, 1453, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1459, 97, 97, 97, 1493, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1525, 97, 97, 97, 97, 97, 97, 1507, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1514, 67, 67, 67, 67, 1584, 67, 67, 67, 67, 67, 1590, 67, 67, 67, 67, 67, 67, 67, 783, 67, 67, 67, 788, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1599, 1601, 67, 67, 67, 1604, 67, 1606, 1607, 67, 1472, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 1614, 97, 97, 97, 97, 45, 45, 1850, 45, 45, 45, 45, 1855, 45, 45, 45, 45, 45, 1222, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1229, 97, 1618, 97, 97, 97, 97, 97, 97, 97, 1625, 97, 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 447, 45, 45, 45, 45, 45, 67, 67, 1633, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1643, 1645, 97, 97, 0, 0, 97, 97, 1784, 97, 97, 97, 0, 0, 97, 97, 0, 97, 1894, 1895, 97, 1897, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 656, 45, 45, 45, 45, 45, 45, 97, 1648, 97, 1650, 1651, 97, 0, 45, 45, 45, 1654, 45, 45, 45, 45, 45, 169, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 658, 45, 45, 45, 45, 664, 45, 45, 1659, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1187, 45, 45, 1669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1005, 67, 67, 1681, 67, 67, 67, 67, 67, 67, 67, 1686, 67, 67, 67, 67, 67, 67, 67, 784, 67, 67, 67, 67, 67, 67, 67, 67, 1055, 67, 67, 67, 67, 1060, 67, 67, 97, 97, 1713, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1378, 45, 45, 45, 45, 45, 45, 45, 408, 45, 45, 45, 45, 45, 45, 45, 45, 1547, 45, 1549, 45, 45, 45, 45, 45, 97, 97, 1780, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 2027, 2028, 45, 45, 67, 67, 2031, 2032, 67, 45, 45, 1804, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1917, 67, 67, 67, 67, 67, 67, 67, 1819, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1708, 97, 97, 97, 97, 97, 45, 45, 1862, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 497, 67, 67, 67, 1877, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 1839, 0, 0, 97, 97, 97, 97, 1936, 0, 0, 97, 97, 97, 97, 97, 97, 1943, 1944, 1945, 45, 45, 45, 45, 670, 45, 45, 45, 45, 674, 45, 45, 45, 45, 678, 45, 1948, 45, 1950, 45, 45, 45, 45, 1955, 1956, 1957, 67, 67, 67, 1960, 67, 1962, 67, 67, 67, 67, 1967, 1968, 1969, 97, 0, 0, 0, 97, 97, 1974, 97, 0, 1936, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1906, 0, 1977, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1746, 45, 45, 45, 45, 2011, 67, 67, 2013, 67, 67, 67, 2017, 97, 97, 0, 0, 2021, 97, 8192, 97, 97, 2025, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1916, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 140, 45, 45, 45, 1180, 45, 45, 45, 45, 1184, 45, 45, 45, 45, 45, 45, 45, 387, 45, 392, 45, 45, 396, 45, 45, 399, 45, 45, 67, 207, 67, 67, 67, 67, 67, 67, 236, 67, 67, 67, 67, 67, 67, 67, 800, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1603, 67, 67, 67, 67, 67, 0, 97, 97, 287, 97, 97, 97, 97, 97, 97, 316, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 1656, 1657, 45, 376, 45, 45, 45, 45, 45, 388, 45, 45, 45, 45, 45, 45, 45, 45, 1406, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 462, 67, 67, 67, 67, 67, 474, 67, 67, 67, 67, 67, 67, 67, 817, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 97, 97, 559, 97, 97, 97, 97, 97, 571, 97, 97, 97, 97, 97, 97, 896, 97, 97, 97, 900, 97, 97, 97, 97, 97, 97, 912, 914, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 391, 45, 45, 45, 45, 45, 45, 45, 45, 713, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 662, 45, 1140, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 636, 67, 67, 1283, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 513, 67, 67, 1363, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 889, 97, 97, 97, 1714, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 926, 45, 45, 45, 45, 45, 45, 45, 45, 672, 45, 45, 45, 45, 45, 45, 45, 45, 686, 45, 45, 45, 45, 45, 45, 45, 45, 944, 45, 45, 45, 45, 45, 45, 45, 45, 1676, 45, 45, 45, 45, 45, 45, 67, 97, 97, 97, 1833, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1902, 45, 45, 45, 45, 45, 957, 45, 45, 45, 45, 961, 45, 963, 45, 45, 45, 67, 97, 2034, 0, 97, 97, 97, 97, 97, 2040, 45, 45, 45, 2042, 67, 67, 67, 67, 67, 67, 1574, 67, 67, 67, 67, 67, 1578, 67, 67, 67, 67, 67, 67, 799, 67, 67, 67, 804, 67, 67, 67, 67, 67, 67, 67, 1298, 0, 0, 0, 1304, 0, 0, 0, 1310, 132, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 1414, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 428, 45, 45, 45, 45, 45, 57889, 0, 0, 54074, 54074, 550, 831, 97, 97, 97, 97, 97, 97, 97, 97, 97, 568, 97, 97, 97, 97, 578, 97, 45, 45, 968, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1228, 45, 45, 67, 67, 67, 67, 67, 25398, 1082, 13112, 1086, 54074, 1090, 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352, 2412544, 67, 67, 67, 67, 1464, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 510, 67, 67, 67, 67, 97, 97, 97, 97, 1519, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 918, 97, 0, 0, 0, 0, 1528, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 976, 45, 1554, 45, 45, 45, 45, 45, 45, 45, 45, 1562, 45, 45, 1565, 45, 45, 45, 45, 683, 45, 45, 45, 687, 45, 45, 692, 45, 45, 45, 45, 45, 1953, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1014, 67, 67, 67, 67, 67, 67, 1568, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 67, 67, 67, 67, 67, 1585, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1594, 97, 97, 1649, 97, 97, 97, 0, 45, 45, 1653, 45, 45, 45, 45, 45, 45, 383, 45, 45, 45, 45, 45, 45, 45, 45, 45, 986, 45, 45, 45, 45, 45, 45, 45, 45, 1670, 45, 1672, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 736, 67, 67, 67, 67, 67, 741, 67, 67, 67, 1680, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1074, 67, 67, 67, 1692, 67, 67, 67, 67, 67, 67, 67, 1697, 67, 1699, 67, 67, 67, 67, 67, 67, 1012, 67, 67, 67, 67, 67, 67, 67, 67, 67, 468, 475, 67, 67, 67, 67, 67, 67, 1769, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 624, 97, 97, 97, 97, 97, 97, 634, 97, 97, 1792, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 958, 45, 45, 45, 45, 45, 45, 964, 45, 150, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 977, 204, 45, 67, 67, 67, 217, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 787, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 271, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 351, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 938, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1398, 45, 45, 45, 153, 45, 161, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 660, 661, 45, 45, 205, 45, 67, 67, 67, 67, 220, 67, 228, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 280, 94, 0, 0, 67, 67, 67, 67, 67, 272, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 352, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 439, 45, 45, 45, 45, 45, 445, 45, 45, 45, 452, 45, 45, 67, 67, 212, 216, 67, 67, 67, 67, 67, 241, 67, 246, 67, 252, 67, 67, 486, 67, 67, 67, 67, 67, 67, 67, 494, 67, 67, 67, 67, 67, 67, 67, 1245, 67, 67, 67, 67, 67, 67, 67, 67, 1013, 67, 67, 1016, 67, 67, 67, 67, 67, 521, 67, 67, 525, 67, 67, 67, 67, 67, 531, 67, 67, 67, 538, 67, 0, 0, 2046, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1192, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1418, 45, 45, 1421, 97, 97, 583, 97, 97, 97, 97, 97, 97, 97, 591, 97, 97, 97, 97, 97, 97, 913, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 1384, 97, 618, 97, 97, 622, 97, 97, 97, 97, 97, 628, 97, 97, 97, 635, 97, 18, 131427, 0, 0, 0, 639, 0, 132, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 932, 45, 45, 45, 45, 45, 1544, 45, 45, 45, 45, 45, 1550, 45, 45, 45, 45, 45, 1194, 45, 1196, 45, 45, 45, 45, 45, 45, 45, 45, 999, 45, 45, 45, 45, 45, 67, 67, 45, 45, 667, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1408, 45, 45, 45, 696, 45, 45, 45, 701, 45, 45, 45, 45, 45, 45, 45, 45, 710, 45, 45, 45, 1220, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 194, 45, 45, 45, 729, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 797, 67, 67, 67, 67, 67, 67, 805, 67, 67, 67, 67, 67, 67, 67, 1587, 67, 1589, 67, 67, 67, 67, 67, 67, 67, 67, 1763, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2162968, 0, 0, 67, 67, 67, 67, 67, 814, 816, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1008, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1020, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1429, 67, 1430, 67, 67, 67, 67, 67, 1062, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 518, 1076, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1102, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1124, 97, 1126, 97, 97, 1114, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1112, 97, 97, 1156, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 594, 97, 97, 97, 97, 1170, 97, 97, 97, 97, 0, 921, 0, 0, 0, 0, 0, 0, 45, 45, 45, 45, 1532, 45, 45, 45, 45, 1536, 45, 45, 45, 45, 45, 172, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 706, 45, 45, 709, 45, 45, 1177, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1202, 45, 1204, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1215, 45, 45, 45, 1232, 45, 45, 45, 45, 45, 45, 45, 67, 1237, 67, 67, 67, 67, 67, 67, 1053, 1054, 67, 67, 67, 67, 67, 67, 1061, 67, 67, 1282, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1289, 67, 67, 67, 1292, 97, 97, 97, 97, 1339, 97, 97, 97, 97, 97, 97, 1344, 97, 97, 97, 97, 45, 1849, 45, 1851, 45, 45, 45, 45, 45, 45, 45, 45, 721, 45, 45, 45, 45, 45, 726, 45, 1385, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1188, 45, 45, 1401, 1402, 45, 45, 45, 45, 1405, 45, 45, 45, 45, 45, 45, 45, 45, 1752, 45, 45, 45, 45, 45, 67, 67, 1410, 45, 45, 45, 1413, 45, 1415, 45, 45, 45, 45, 45, 45, 1419, 45, 45, 45, 45, 1806, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 2019, 0, 97, 67, 67, 67, 1452, 67, 67, 67, 67, 67, 67, 67, 67, 1457, 67, 67, 67, 67, 67, 67, 1259, 67, 67, 67, 67, 67, 67, 1264, 67, 67, 1460, 67, 1462, 67, 67, 67, 67, 67, 67, 1466, 67, 67, 67, 67, 67, 67, 67, 67, 1588, 67, 67, 67, 67, 67, 67, 67, 0, 1300, 0, 0, 0, 1306, 0, 0, 0, 97, 97, 97, 1506, 97, 97, 97, 97, 97, 97, 97, 97, 1512, 97, 97, 97, 0, 1728, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 901, 97, 97, 97, 97, 1515, 97, 1517, 97, 97, 97, 97, 97, 97, 1521, 97, 97, 97, 97, 97, 97, 0, 45, 1652, 45, 45, 45, 1655, 45, 45, 45, 45, 45, 1542, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1552, 1553, 45, 45, 45, 1556, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 693, 45, 45, 45, 67, 67, 67, 67, 1572, 67, 67, 67, 67, 1576, 67, 67, 67, 67, 67, 67, 67, 67, 1602, 67, 67, 1605, 67, 67, 67, 0, 67, 1582, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1580, 67, 67, 1596, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 542, 0, 544, 67, 67, 67, 67, 1759, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 533, 67, 67, 67, 67, 67, 67, 67, 1770, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 1777, 97, 97, 97, 1793, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 998, 45, 45, 1001, 1002, 45, 45, 67, 67, 45, 1861, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1871, 67, 1873, 1874, 67, 0, 97, 45, 67, 0, 97, 45, 67, 16384, 97, 45, 67, 97, 0, 0, 0, 1473, 0, 1082, 0, 0, 0, 1475, 0, 1086, 0, 0, 0, 1477, 1876, 67, 97, 97, 97, 97, 97, 1883, 0, 1885, 97, 97, 97, 1889, 0, 0, 0, 286, 0, 0, 0, 286, 0, 2367488, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 126, 126, 126, 2053, 0, 2055, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 2039, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 226, 67, 67, 67, 67, 67, 67, 67, 67, 1246, 67, 67, 1249, 1250, 67, 67, 67, 132, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 141, 45, 45, 45, 1403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1186, 45, 45, 1189, 45, 45, 155, 45, 45, 45, 45, 45, 45, 45, 45, 45, 191, 45, 45, 45, 45, 700, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1753, 45, 45, 45, 67, 67, 45, 45, 67, 208, 67, 67, 67, 222, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1764, 67, 67, 67, 67, 67, 67, 67, 258, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 288, 97, 97, 97, 302, 97, 97, 97, 97, 97, 97, 97, 97, 97, 627, 97, 97, 97, 97, 97, 97, 338, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 370, 45, 45, 45, 45, 716, 45, 45, 45, 45, 45, 722, 45, 45, 45, 45, 45, 45, 1912, 67, 67, 67, 67, 67, 67, 67, 67, 67, 819, 67, 67, 25398, 542, 13112, 544, 45, 403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1409, 45, 67, 67, 67, 67, 489, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 771, 67, 67, 67, 67, 520, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 534, 67, 67, 67, 67, 67, 67, 1271, 67, 67, 67, 1274, 67, 67, 67, 1279, 67, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 553, 97, 97, 97, 97, 586, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1138, 97, 97, 97, 97, 617, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 631, 97, 97, 97, 0, 1834, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 353, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 668, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 724, 45, 45, 45, 45, 45, 682, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 949, 45, 45, 45, 67, 67, 747, 748, 67, 67, 67, 67, 755, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 1302, 0, 0, 0, 1308, 0, 67, 794, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1701, 67, 97, 97, 97, 845, 846, 97, 97, 97, 97, 853, 97, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 97, 892, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 610, 97, 97, 45, 992, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1239, 67, 67, 67, 1063, 67, 67, 67, 67, 67, 1068, 67, 67, 67, 67, 67, 67, 67, 0, 0, 1301, 0, 0, 0, 1307, 0, 0, 97, 1141, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1152, 97, 97, 0, 0, 97, 97, 2001, 0, 97, 2003, 97, 97, 97, 45, 45, 45, 1739, 45, 45, 45, 1742, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1157, 97, 97, 97, 97, 97, 1162, 97, 97, 97, 97, 97, 97, 1145, 97, 97, 97, 97, 97, 1151, 97, 97, 97, 1253, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 539, 45, 1423, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1431, 67, 67, 67, 67, 67, 67, 67, 1695, 67, 67, 67, 67, 67, 1700, 67, 1702, 67, 67, 1439, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 514, 67, 67, 97, 97, 1492, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 611, 97, 97, 1703, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 852, 97, 97, 97, 97, 97, 97, 45, 1949, 45, 1951, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1961, 67, 0, 97, 45, 67, 0, 97, 2060, 2061, 0, 2062, 45, 67, 97, 0, 0, 2036, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 223, 67, 67, 237, 67, 67, 67, 67, 67, 67, 67, 1272, 67, 67, 67, 67, 67, 67, 67, 67, 507, 67, 67, 67, 67, 67, 67, 67, 1963, 67, 67, 67, 97, 97, 97, 97, 0, 1972, 0, 97, 97, 97, 1975, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 931, 45, 45, 45, 45, 45, 407, 45, 45, 45, 45, 45, 45, 45, 45, 45, 417, 45, 45, 1989, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1996, 97, 18, 131427, 0, 0, 360, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 930, 45, 45, 45, 45, 45, 45, 444, 45, 45, 45, 45, 45, 45, 45, 67, 67, 97, 97, 1998, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1985, 45, 1986, 45, 45, 45, 156, 45, 45, 170, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 675, 45, 45, 45, 45, 679, 131427, 0, 358, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 381, 45, 45, 45, 45, 45, 45, 45, 45, 45, 400, 45, 45, 419, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 436, 67, 67, 67, 67, 67, 505, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 820, 67, 25398, 542, 13112, 544, 67, 67, 522, 67, 67, 67, 67, 67, 529, 67, 67, 67, 67, 67, 67, 67, 0, 1299, 0, 0, 0, 1305, 0, 0, 0, 97, 97, 619, 97, 97, 97, 97, 97, 626, 97, 97, 97, 97, 97, 97, 97, 1105, 97, 97, 97, 97, 1109, 97, 97, 97, 67, 67, 67, 67, 749, 67, 67, 67, 67, 67, 67, 67, 67, 67, 760, 67, 0, 97, 45, 67, 2058, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 2041, 67, 67, 67, 67, 67, 780, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 516, 67, 67, 97, 97, 97, 878, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1629, 97, 0, 45, 979, 45, 45, 45, 45, 984, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1198, 45, 45, 45, 45, 45, 45, 67, 1023, 67, 67, 67, 67, 1028, 67, 67, 67, 67, 67, 67, 67, 67, 67, 470, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1094, 0, 0, 0, 1092, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1486, 97, 1489, 97, 97, 97, 1117, 97, 97, 97, 97, 1122, 97, 97, 97, 97, 97, 97, 97, 1146, 97, 97, 97, 97, 97, 97, 97, 97, 881, 97, 97, 97, 886, 97, 97, 97, 1311, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1615, 97, 97, 97, 97, 97, 1619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1631, 97, 97, 1847, 97, 45, 45, 45, 45, 1852, 45, 45, 45, 45, 45, 45, 45, 1235, 45, 45, 45, 67, 67, 67, 67, 67, 1868, 67, 67, 67, 1872, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1882, 0, 0, 0, 97, 97, 97, 97, 0, 1891, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 1929, 0, 0, 97, 97, 97, 97, 97, 97, 45, 1900, 45, 1901, 45, 45, 45, 1905, 45, 67, 2054, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 2037, 2038, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1867, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1774, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 142, 45, 45, 45, 1412, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 432, 45, 45, 45, 45, 45, 157, 45, 45, 171, 45, 45, 45, 182, 45, 45, 45, 45, 200, 45, 45, 45, 1543, 45, 45, 45, 45, 45, 45, 45, 45, 1551, 45, 45, 45, 45, 1181, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1211, 45, 45, 45, 1214, 45, 45, 45, 67, 209, 67, 67, 67, 224, 67, 67, 238, 67, 67, 67, 249, 67, 0, 97, 2056, 2057, 0, 2059, 45, 67, 0, 97, 45, 67, 97, 0, 0, 1937, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1741, 45, 45, 45, 45, 45, 45, 67, 67, 67, 267, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 289, 97, 97, 97, 304, 97, 97, 318, 97, 97, 97, 329, 97, 97, 0, 0, 97, 1783, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 2026, 45, 45, 45, 45, 67, 2030, 67, 67, 67, 67, 67, 67, 1041, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1044, 67, 67, 67, 67, 67, 67, 97, 97, 347, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 666, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1420, 45, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 840, 67, 1007, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 759, 67, 67, 67, 67, 67, 67, 67, 1052, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1031, 67, 67, 67, 67, 67, 97, 97, 97, 1101, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 592, 97, 97, 97, 1190, 45, 45, 45, 45, 45, 1195, 45, 1197, 45, 45, 45, 45, 1201, 45, 45, 45, 45, 1952, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 250, 67, 67, 67, 1255, 67, 1257, 67, 67, 67, 67, 1261, 67, 67, 67, 67, 67, 67, 67, 67, 1685, 67, 67, 67, 67, 67, 67, 67, 0, 24851, 12565, 0, 0, 0, 0, 28809, 53532, 67, 67, 1267, 67, 67, 67, 67, 67, 67, 1273, 67, 67, 67, 67, 67, 67, 67, 67, 1696, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 1281, 67, 67, 67, 67, 1285, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1070, 67, 67, 67, 67, 67, 1335, 97, 1337, 97, 97, 97, 97, 1341, 97, 97, 97, 97, 97, 97, 97, 97, 882, 97, 97, 97, 97, 97, 97, 97, 1347, 97, 97, 97, 97, 97, 97, 1353, 97, 97, 97, 97, 97, 97, 1361, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 544, 0, 550, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 53530, 97, 97, 97, 1365, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 608, 97, 97, 97, 45, 45, 1424, 45, 1425, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1058, 67, 67, 67, 67, 45, 1555, 45, 45, 1557, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 707, 45, 45, 45, 45, 67, 67, 1570, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 773, 67, 67, 1595, 67, 67, 1597, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352, 2412544, 97, 97, 97, 1636, 97, 97, 97, 1639, 97, 97, 1641, 97, 97, 97, 97, 97, 97, 1173, 0, 921, 0, 0, 0, 0, 0, 0, 45, 67, 67, 67, 1693, 67, 67, 67, 67, 67, 67, 67, 1698, 67, 67, 67, 67, 67, 67, 67, 1773, 67, 97, 97, 97, 97, 97, 97, 97, 625, 97, 97, 97, 97, 97, 97, 97, 97, 850, 97, 97, 97, 97, 97, 97, 97, 97, 880, 97, 97, 97, 97, 97, 97, 97, 97, 1106, 97, 97, 97, 97, 97, 97, 97, 1860, 45, 45, 67, 67, 1865, 67, 67, 67, 67, 1870, 67, 67, 67, 67, 1875, 67, 67, 97, 97, 1880, 97, 97, 0, 0, 0, 97, 97, 1888, 97, 0, 0, 0, 1938, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1854, 45, 45, 45, 45, 45, 45, 45, 1909, 45, 45, 1911, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1248, 67, 67, 67, 67, 67, 67, 1922, 67, 67, 1924, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 1898, 45, 45, 45, 45, 45, 45, 1904, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 16384, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1724, 2008, 2009, 45, 45, 67, 67, 67, 2014, 2015, 67, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 2022, 0, 2023, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1869, 67, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 147, 151, 154, 45, 162, 45, 45, 176, 178, 181, 45, 45, 45, 192, 196, 45, 45, 45, 45, 2012, 67, 67, 67, 67, 67, 67, 2018, 97, 0, 0, 97, 1978, 97, 97, 97, 1982, 45, 45, 45, 45, 45, 45, 45, 45, 45, 972, 973, 45, 45, 45, 45, 45, 67, 259, 263, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 294, 298, 301, 97, 309, 97, 97, 323, 325, 328, 97, 97, 97, 97, 97, 560, 97, 97, 97, 569, 97, 97, 97, 97, 97, 97, 306, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1624, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 339, 343, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 67, 503, 67, 67, 67, 67, 67, 67, 67, 67, 67, 512, 67, 67, 519, 97, 97, 600, 97, 97, 97, 97, 97, 97, 97, 97, 97, 609, 97, 97, 616, 45, 649, 45, 45, 45, 45, 45, 654, 45, 45, 45, 45, 45, 45, 45, 45, 1393, 45, 45, 45, 45, 45, 45, 45, 45, 1209, 45, 45, 45, 45, 45, 45, 45, 67, 763, 67, 67, 67, 67, 67, 67, 67, 67, 770, 67, 67, 67, 774, 67, 0, 2045, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 994, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 213, 67, 219, 67, 67, 232, 67, 242, 67, 247, 67, 67, 67, 779, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1018, 67, 67, 67, 67, 811, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 834, 97, 97, 97, 97, 97, 839, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 645, 97, 97, 861, 97, 97, 97, 97, 97, 97, 97, 97, 868, 97, 97, 97, 872, 97, 97, 877, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 613, 97, 97, 97, 97, 97, 909, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 18, 18, 24, 24, 27, 27, 27, 1036, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1047, 67, 67, 67, 1050, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1033, 67, 67, 67, 97, 97, 1130, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 67, 67, 67, 1295, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 1317, 97, 97, 97, 97, 97, 97, 1375, 97, 97, 97, 0, 0, 0, 45, 1379, 45, 45, 45, 45, 45, 45, 422, 45, 45, 45, 429, 431, 45, 45, 45, 45, 0, 1090, 0, 0, 97, 1479, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1357, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1716, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1723, 0, 921, 29315, 0, 0, 0, 0, 45, 929, 45, 45, 45, 45, 45, 45, 45, 1392, 45, 45, 45, 45, 45, 45, 45, 45, 45, 960, 45, 45, 45, 45, 45, 45, 97, 97, 97, 1738, 45, 45, 45, 45, 45, 45, 45, 1743, 45, 45, 45, 45, 166, 45, 45, 45, 45, 184, 186, 45, 45, 197, 45, 45, 97, 1779, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 640, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1537, 45, 45, 45, 45, 45, 1803, 45, 45, 45, 45, 45, 1809, 45, 45, 45, 67, 67, 67, 1814, 67, 67, 67, 67, 67, 67, 1821, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 67, 67, 67, 1818, 67, 67, 67, 67, 67, 1824, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 1890, 0, 1829, 97, 97, 0, 0, 97, 97, 1836, 97, 97, 0, 0, 0, 97, 97, 97, 97, 1981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1987, 1845, 97, 97, 97, 45, 45, 45, 45, 45, 1853, 45, 45, 45, 1857, 45, 45, 45, 67, 1864, 67, 1866, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 1710, 1711, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1886, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1838, 0, 0, 0, 97, 1843, 97, 0, 1893, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1745, 45, 45, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 1931, 97, 97, 97, 97, 97, 588, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 629, 97, 97, 97, 97, 97, 67, 2044, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1660, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 453, 45, 455, 67, 67, 67, 67, 268, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 348, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 359, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 421, 45, 45, 45, 45, 45, 45, 45, 434, 45, 45, 695, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1667, 45, 0, 921, 29315, 0, 925, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1811, 45, 67, 67, 67, 67, 67, 67, 1037, 67, 1039, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1277, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1095, 0, 0, 0, 1096, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 869, 97, 97, 97, 97, 97, 97, 1131, 97, 1133, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1370, 97, 97, 97, 97, 97, 1312, 0, 0, 0, 0, 1096, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1327, 97, 97, 97, 97, 97, 1332, 97, 97, 97, 1830, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1896, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1548, 45, 45, 45, 45, 45, 45, 133, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 380, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 401, 45, 45, 158, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1200, 45, 45, 45, 45, 206, 67, 67, 67, 67, 67, 225, 67, 67, 67, 67, 67, 67, 67, 67, 754, 67, 67, 67, 67, 67, 67, 67, 57889, 0, 0, 54074, 54074, 550, 832, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1342, 97, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1083, 13112, 1087, 54074, 1091, 0, 0, 0, 0, 0, 0, 1316, 0, 831, 97, 97, 97, 97, 97, 97, 97, 1174, 921, 0, 1175, 0, 0, 0, 0, 45, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 148, 67, 67, 264, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 295, 97, 97, 97, 97, 313, 97, 97, 97, 97, 331, 333, 97, 18, 131427, 356, 638, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 45, 45, 1530, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 988, 45, 45, 45, 97, 344, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 402, 404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1756, 67, 438, 45, 45, 45, 45, 45, 45, 45, 45, 449, 450, 45, 45, 45, 67, 67, 214, 218, 221, 67, 229, 67, 67, 243, 245, 248, 67, 67, 67, 67, 67, 488, 490, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1071, 67, 1073, 67, 67, 67, 67, 67, 524, 67, 67, 67, 67, 67, 67, 67, 67, 535, 536, 67, 67, 67, 67, 67, 67, 1683, 1684, 67, 67, 67, 67, 1688, 1689, 67, 67, 67, 67, 67, 67, 1586, 67, 67, 67, 67, 67, 67, 67, 67, 67, 469, 67, 67, 67, 67, 67, 67, 97, 97, 97, 585, 587, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1163, 97, 97, 97, 97, 97, 97, 97, 621, 97, 97, 97, 97, 97, 97, 97, 97, 632, 633, 97, 97, 0, 0, 1782, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 712, 45, 45, 45, 717, 45, 45, 45, 45, 45, 45, 45, 45, 725, 45, 45, 45, 163, 167, 173, 177, 45, 45, 45, 45, 45, 193, 45, 45, 45, 45, 982, 45, 45, 45, 45, 45, 45, 987, 45, 45, 45, 45, 45, 1558, 45, 1560, 45, 45, 45, 45, 45, 45, 45, 45, 704, 705, 45, 45, 45, 45, 45, 45, 45, 45, 731, 45, 45, 45, 67, 67, 67, 67, 67, 739, 67, 67, 67, 67, 67, 67, 273, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 67, 67, 67, 764, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1290, 67, 67, 67, 67, 67, 67, 812, 67, 67, 67, 67, 818, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 837, 97, 97, 97, 97, 97, 602, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1137, 97, 97, 97, 97, 97, 97, 97, 97, 97, 862, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1627, 97, 97, 97, 0, 97, 97, 97, 97, 910, 97, 97, 97, 97, 916, 97, 97, 97, 0, 0, 0, 97, 97, 1940, 97, 97, 1942, 45, 45, 45, 45, 45, 45, 385, 45, 45, 45, 45, 395, 45, 45, 45, 45, 966, 45, 969, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 975, 45, 45, 45, 406, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 974, 45, 45, 45, 67, 67, 67, 67, 1010, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1262, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1040, 67, 1042, 67, 1045, 67, 67, 67, 67, 67, 67, 67, 97, 1706, 97, 97, 97, 1709, 97, 97, 97, 67, 67, 67, 67, 1051, 67, 67, 67, 67, 67, 1057, 67, 67, 67, 67, 67, 67, 67, 1443, 67, 67, 1446, 67, 67, 67, 67, 67, 67, 67, 1297, 0, 0, 0, 1303, 0, 0, 0, 1309, 67, 67, 67, 67, 1079, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 1098, 97, 97, 97, 97, 97, 1104, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1356, 97, 97, 97, 97, 97, 97, 1128, 97, 97, 97, 97, 97, 97, 1134, 97, 1136, 97, 1139, 97, 97, 97, 97, 97, 97, 1622, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0, 1176, 0, 646, 45, 67, 67, 67, 1268, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1469, 67, 67, 67, 97, 1348, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1127, 97, 67, 1569, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1448, 1449, 67, 1816, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1825, 67, 67, 1827, 97, 97, 0, 1781, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 1831, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1980, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1395, 45, 45, 45, 45, 45, 97, 1846, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1212, 45, 45, 45, 45, 45, 45, 2010, 45, 67, 67, 67, 67, 67, 2016, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 2007, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 143, 45, 45, 45, 1671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1813, 67, 67, 1815, 45, 45, 67, 210, 67, 67, 67, 67, 67, 67, 239, 67, 67, 67, 67, 67, 67, 67, 1454, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1445, 67, 67, 67, 67, 67, 67, 97, 97, 290, 97, 97, 97, 97, 97, 97, 319, 97, 97, 97, 97, 97, 97, 303, 97, 97, 317, 97, 97, 97, 97, 97, 97, 305, 97, 97, 97, 97, 97, 97, 97, 97, 97, 899, 97, 97, 97, 97, 97, 97, 375, 45, 45, 45, 379, 45, 45, 390, 45, 45, 394, 45, 45, 45, 45, 45, 443, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 461, 67, 67, 67, 465, 67, 67, 476, 67, 67, 480, 67, 67, 67, 67, 67, 67, 1694, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1288, 67, 67, 67, 67, 67, 67, 500, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1075, 97, 97, 97, 558, 97, 97, 97, 562, 97, 97, 573, 97, 97, 577, 97, 97, 97, 97, 97, 895, 97, 97, 97, 97, 97, 97, 903, 97, 97, 97, 0, 97, 97, 1638, 97, 97, 97, 97, 97, 97, 97, 97, 1646, 597, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1334, 45, 681, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1396, 45, 45, 1399, 45, 45, 730, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1434, 67, 67, 67, 67, 67, 67, 750, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1456, 67, 67, 67, 67, 67, 45, 45, 993, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1238, 67, 67, 1006, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1280, 1048, 1049, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1059, 67, 67, 67, 67, 67, 67, 1286, 67, 67, 67, 67, 67, 67, 67, 1291, 67, 97, 97, 1100, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 920, 97, 97, 1142, 1143, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1153, 97, 97, 97, 97, 97, 1158, 97, 97, 97, 1161, 97, 97, 97, 97, 1166, 97, 97, 97, 97, 97, 1325, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1328, 97, 97, 97, 97, 97, 97, 97, 45, 1218, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1678, 45, 45, 45, 67, 67, 67, 67, 67, 1269, 67, 67, 67, 67, 67, 67, 67, 67, 1278, 67, 67, 67, 67, 67, 67, 1761, 67, 67, 67, 67, 67, 67, 67, 67, 67, 530, 67, 67, 67, 67, 67, 67, 97, 97, 1349, 97, 97, 97, 97, 97, 97, 97, 97, 1358, 97, 97, 97, 97, 97, 97, 1623, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 926, 0, 0, 0, 45, 45, 1411, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1754, 45, 45, 67, 67, 1301, 0, 1307, 0, 1313, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 21054, 97, 97, 97, 97, 67, 1757, 67, 67, 67, 1760, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1467, 67, 67, 67, 67, 67, 1778, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 97, 97, 1352, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1511, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 1820, 67, 1822, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1933, 97, 1892, 97, 97, 97, 97, 97, 97, 1899, 45, 45, 45, 45, 45, 45, 45, 45, 1664, 45, 45, 45, 45, 45, 45, 45, 45, 1546, 45, 45, 45, 45, 45, 45, 45, 45, 1208, 45, 45, 45, 45, 45, 45, 45, 45, 1224, 45, 45, 45, 45, 45, 45, 45, 45, 673, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1925, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 623, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 307, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1796, 97, 45, 45, 45, 45, 45, 45, 45, 970, 45, 45, 45, 45, 45, 45, 45, 45, 1417, 45, 45, 45, 45, 45, 45, 45, 67, 1964, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1721, 97, 97, 0, 0, 1997, 97, 0, 0, 2000, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 733, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 803, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 144, 45, 45, 45, 1805, 45, 1807, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 231, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 45, 45, 67, 211, 67, 67, 67, 67, 230, 234, 240, 244, 67, 67, 67, 67, 67, 67, 464, 67, 67, 67, 67, 67, 67, 479, 67, 67, 67, 260, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 291, 97, 97, 97, 97, 310, 314, 320, 324, 97, 97, 97, 97, 97, 97, 1367, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1355, 97, 97, 97, 97, 97, 97, 1362, 340, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 360, 0, 362, 0, 365, 28809, 367, 139, 369, 45, 45, 45, 374, 67, 67, 460, 67, 67, 67, 67, 466, 67, 67, 67, 67, 67, 67, 67, 67, 801, 67, 67, 67, 67, 67, 67, 67, 67, 67, 487, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 498, 67, 67, 67, 67, 67, 67, 1772, 67, 67, 97, 97, 97, 97, 97, 97, 97, 0, 921, 922, 1175, 0, 0, 0, 0, 45, 67, 502, 67, 67, 67, 67, 67, 67, 67, 508, 67, 67, 67, 515, 517, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1932, 97, 97, 0, 1999, 97, 97, 97, 0, 97, 97, 2004, 2005, 97, 45, 45, 45, 45, 1193, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 676, 45, 45, 45, 45, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 552, 97, 97, 97, 97, 97, 1377, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 655, 45, 45, 45, 45, 45, 45, 45, 97, 97, 557, 97, 97, 97, 97, 563, 97, 97, 97, 97, 97, 97, 97, 97, 1135, 97, 97, 97, 97, 97, 97, 97, 97, 97, 584, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 595, 97, 97, 97, 97, 97, 911, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 1319, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1733, 97, 97, 97, 97, 97, 97, 1340, 97, 97, 97, 1343, 97, 97, 1345, 97, 1346, 97, 599, 97, 97, 97, 97, 97, 97, 97, 605, 97, 97, 97, 612, 614, 97, 97, 97, 97, 97, 1794, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 1207, 45, 45, 45, 45, 45, 45, 1213, 45, 45, 745, 67, 67, 67, 67, 751, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1577, 67, 67, 67, 67, 67, 762, 67, 67, 67, 67, 766, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1765, 67, 67, 67, 67, 67, 777, 67, 67, 781, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1592, 1593, 67, 67, 97, 843, 97, 97, 97, 97, 849, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1510, 97, 97, 97, 97, 97, 97, 97, 860, 97, 97, 97, 97, 864, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1797, 45, 45, 45, 45, 1801, 45, 97, 875, 97, 97, 879, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1522, 97, 97, 97, 97, 97, 991, 45, 45, 45, 45, 996, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 215, 67, 67, 67, 67, 233, 67, 67, 67, 67, 251, 253, 1022, 67, 67, 67, 1026, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1035, 67, 67, 1038, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1458, 67, 67, 67, 67, 67, 1064, 67, 67, 67, 1067, 67, 67, 67, 67, 1072, 67, 67, 67, 67, 67, 67, 1296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 1096, 0, 921, 29315, 0, 0, 0, 0, 928, 45, 45, 45, 45, 45, 934, 45, 45, 45, 164, 45, 45, 45, 45, 45, 45, 45, 45, 45, 198, 45, 45, 45, 378, 45, 45, 45, 45, 45, 45, 393, 45, 45, 45, 398, 45, 97, 97, 1116, 97, 97, 97, 1120, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1147, 1148, 97, 97, 97, 97, 97, 97, 97, 1129, 97, 97, 1132, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1626, 97, 97, 97, 97, 0, 45, 1178, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1185, 45, 45, 45, 45, 441, 45, 45, 45, 45, 45, 45, 451, 45, 45, 67, 67, 67, 67, 67, 227, 67, 67, 67, 67, 67, 67, 67, 67, 1260, 67, 67, 67, 1263, 67, 67, 1265, 1203, 45, 45, 1205, 45, 1206, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1216, 67, 1266, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1276, 67, 67, 67, 67, 67, 67, 492, 67, 67, 67, 67, 67, 67, 67, 67, 67, 471, 67, 67, 67, 67, 481, 67, 45, 1386, 45, 1389, 45, 45, 45, 45, 1394, 45, 45, 45, 1397, 45, 45, 45, 45, 995, 45, 997, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1915, 67, 67, 67, 67, 67, 1422, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1433, 67, 1436, 67, 67, 67, 67, 1441, 67, 67, 67, 1444, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 97, 97, 97, 97, 1494, 97, 97, 97, 1497, 97, 97, 97, 97, 97, 97, 97, 1368, 97, 97, 97, 97, 97, 97, 97, 97, 851, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1571, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1583, 67, 67, 67, 67, 67, 67, 67, 67, 1591, 67, 67, 67, 67, 67, 67, 752, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1056, 67, 67, 67, 67, 67, 67, 97, 1634, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1125, 97, 97, 97, 1647, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1183, 45, 45, 45, 45, 45, 45, 45, 45, 45, 409, 45, 45, 45, 45, 45, 45, 1658, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1668, 1712, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 1835, 97, 97, 97, 97, 0, 0, 0, 97, 97, 1844, 97, 97, 1726, 0, 97, 97, 97, 97, 97, 1732, 97, 1734, 97, 97, 97, 97, 97, 300, 97, 308, 97, 97, 97, 97, 97, 97, 97, 97, 866, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1758, 67, 67, 67, 1762, 67, 67, 67, 67, 67, 67, 67, 67, 1043, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1771, 67, 67, 67, 97, 97, 97, 97, 97, 1776, 97, 97, 97, 97, 297, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1108, 97, 97, 97, 97, 67, 67, 67, 1966, 97, 97, 97, 1970, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 1720, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1837, 97, 0, 1840, 1841, 97, 97, 97, 1988, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1994, 1995, 67, 97, 97, 97, 97, 97, 1103, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 917, 97, 97, 0, 0, 0, 67, 67, 265, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 345, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 361, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 411, 45, 45, 414, 45, 45, 45, 45, 377, 45, 45, 45, 386, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1223, 45, 45, 45, 45, 45, 45, 45, 45, 45, 426, 45, 45, 433, 45, 45, 45, 67, 67, 67, 67, 67, 463, 67, 67, 67, 472, 67, 67, 67, 67, 67, 67, 67, 527, 67, 67, 67, 67, 67, 67, 537, 67, 540, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 97, 97, 97, 1119, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1509, 97, 97, 97, 97, 97, 97, 97, 97, 564, 97, 97, 97, 97, 97, 97, 97, 637, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 927, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1234, 45, 45, 45, 45, 67, 67, 67, 67, 1240, 45, 697, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 708, 45, 45, 45, 45, 1221, 45, 45, 45, 45, 1225, 45, 45, 45, 45, 45, 45, 384, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1210, 45, 45, 45, 45, 45, 45, 67, 67, 795, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1470, 67, 67, 67, 67, 67, 67, 67, 815, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 97, 893, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1164, 97, 97, 97, 67, 67, 67, 1025, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1687, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 1097, 1241, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1450, 45, 45, 1388, 45, 1390, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1236, 67, 67, 67, 67, 67, 1437, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 1490, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1503, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 1930, 0, 97, 97, 97, 97, 97, 847, 97, 97, 97, 97, 97, 97, 97, 97, 97, 858, 67, 67, 1965, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 1719, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 1382, 45, 1383, 45, 45, 45, 159, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1563, 45, 45, 45, 45, 45, 67, 261, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 341, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 1099, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1333, 97, 1230, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1992, 67, 1993, 67, 67, 67, 97, 97, 45, 45, 160, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1665, 45, 45, 45, 45, 45, 131427, 357, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 684, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 412, 45, 45, 45, 416, 45, 45, 45, 440, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1990, 67, 1991, 67, 67, 67, 67, 67, 67, 67, 97, 97, 1707, 97, 97, 97, 97, 97, 97, 501, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1691, 67, 67, 67, 67, 67, 526, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1030, 67, 1032, 67, 67, 67, 67, 598, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1632, 0, 921, 29315, 923, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 425, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 1093, 0, 0, 0, 0, 0, 97, 1609, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1369, 97, 97, 97, 1372, 97, 97, 67, 67, 266, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 346, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 665, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1677, 45, 45, 45, 45, 67, 45, 45, 954, 45, 956, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1545, 45, 45, 45, 45, 45, 45, 45, 45, 45, 448, 45, 45, 45, 45, 67, 456, 67, 67, 67, 67, 67, 1270, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1069, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1350, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1524, 97, 97, 97, 97, 97, 97, 97, 1376, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 1559, 1561, 45, 45, 45, 1564, 45, 1566, 1567, 45, 67, 67, 67, 67, 67, 1573, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1247, 67, 67, 67, 67, 67, 1252, 97, 1725, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1628, 97, 1630, 0, 0, 94242, 0, 0, 0, 2211840, 0, 1118208, 0, 0, 0, 0, 2158592, 2158731, 2158592, 2158592, 2158592, 3117056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3018752, 2158592, 3043328, 2158592, 2158592, 2158592, 2158592, 3080192, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158878, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2605056, 2158592, 2158592, 2207744, 0, 542, 0, 544, 0, 0, 2166784, 0, 0, 0, 550, 0, 0, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2867200, 2158592, 2904064, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0, 0, 2211840, 0, 0, 1130496, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 139, 0, 0, 0, 139, 0, 2367488, 2207744, 0, 0, 0, 0, 176128, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 1508, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 67, 24850, 24850, 12564, 12564, 0, 0, 0, 0, 0, 53531, 53531, 0, 286, 97, 97, 97, 97, 97, 1144, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1149, 97, 97, 97, 97, 1154, 57889, 0, 0, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 561, 97, 97, 97, 97, 97, 97, 576, 97, 97, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 0, 0, 139264, 0, 921, 29315, 0, 0, 926, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 719, 720, 45, 45, 45, 45, 45, 45, 45, 45, 685, 45, 45, 45, 45, 45, 45, 45, 45, 45, 942, 45, 45, 946, 45, 45, 45, 950, 45, 45, 0, 2146304, 2146304, 0, 0, 0, 0, 2224128, 2224128, 2224128, 2232320, 2232320, 2232320, 2232320, 0, 0, 1301, 0, 0, 0, 0, 0, 1307, 0, 0, 0, 0, 0, 1313, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1318, 97, 97, 97, 97, 97, 97, 1795, 97, 97, 45, 45, 45, 45, 45, 45, 45, 446, 45, 45, 45, 45, 45, 45, 67, 67, 2158592, 2146304, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 924, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1000, 45, 45, 45, 45, 67, 67
+];
+
+XQueryTokenizer.EXPECTED =
+[ 290, 300, 304, 353, 296, 309, 305, 319, 315, 324, 328, 352, 354, 334, 338, 330, 320, 345, 349, 293, 358, 362, 341, 366, 312, 370, 374, 378, 382, 386, 390, 394, 398, 737, 402, 634, 439, 604, 634, 634, 634, 634, 408, 634, 634, 634, 404, 634, 634, 634, 457, 634, 634, 963, 634, 634, 413, 634, 634, 634, 634, 634, 634, 634, 663, 418, 422, 903, 902, 426, 431, 548, 634, 437, 521, 919, 443, 615, 409, 449, 455, 624, 731, 751, 634, 461, 465, 672, 470, 469, 474, 481, 485, 477, 489, 493, 629, 542, 497, 505, 603, 602, 991, 648, 510, 804, 634, 515, 958, 526, 525, 530, 768, 634, 546, 552, 711, 710, 593, 558, 562, 618, 566, 570, 574, 578, 582, 586, 590, 608, 612, 660, 822, 821, 634, 622, 596, 444, 628, 533, 724, 633, 640, 653, 647, 652, 536, 1008, 451, 450, 445, 657, 670, 676, 685, 689, 693, 697, 701, 704, 707, 715, 719, 798, 815, 634, 723, 762, 996, 634, 728, 969, 730, 735, 908, 634, 741, 679, 889, 511, 747, 634, 750, 755, 499, 666, 499, 501, 759, 772, 776, 780, 634, 787, 784, 797, 802, 809, 808, 427, 814, 1006, 517, 634, 519, 853, 634, 813, 850, 793, 634, 819, 826, 833, 832, 837, 843, 847, 857, 861, 863, 867, 871, 875, 879, 883, 643, 887, 539, 980, 979, 634, 893, 944, 634, 900, 896, 634, 907, 933, 506, 912, 917, 828, 433, 636, 635, 554, 961, 923, 930, 927, 937, 941, 634, 634, 634, 974, 948, 952, 985, 913, 968, 967, 743, 634, 973, 839, 634, 978, 599, 634, 984, 989, 765, 444, 995, 1000, 634, 1003, 790, 955, 1012, 681, 634, 634, 634, 634, 634, 414, 1016, 1020, 1024, 1085, 1027, 1090, 1090, 1046, 1080, 1137, 1108, 1215, 1049, 1032, 1039, 1085, 1085, 1085, 1085, 1058, 1062, 1068, 1085, 1086, 1090, 1090, 1091, 1072, 1064, 1107, 1090, 1090, 1090, 1118, 1123, 1138, 1078, 1074, 1084, 1085, 1085, 1085, 1087, 1090, 1062, 1052, 1060, 1114, 1062, 1104, 1085, 1085, 1090, 1090, 1028, 1122, 1063, 1128, 1139, 1127, 1158, 1085, 1085, 1151, 1090, 1090, 1090, 1095, 1090, 1132, 1073, 1136, 1143, 1061, 1150, 1085, 1155, 1098, 1101, 1146, 1162, 1169, 1101, 1185, 1151, 1090, 1110, 1173, 1054, 1087, 1109, 1177, 1165, 1089, 1204, 1184, 1107, 1189, 1193, 1088, 1197, 1180, 1201, 1208, 1042, 1212, 1219, 1223, 1227, 1231, 1235, 1245, 1777, 1527, 1686, 1686, 1238, 1686, 1254, 1686, 1686, 1686, 1294, 1669, 1686, 1686, 1686, 1322, 1625, 1534, 1268, 1624, 1275, 1281, 1443, 1292, 1300, 1686, 1686, 1686, 1350, 1826, 1306, 1686, 1686, 1240, 2032, 1317, 1321, 1686, 1686, 1253, 1686, 1326, 1686, 1686, 1686, 1418, 1709, 1446, 1686, 1686, 1686, 1492, 1686, 1295, 1447, 1686, 1686, 1258, 1686, 1736, 1686, 1686, 1520, 1355, 1686, 1288, 1348, 1361, 1686, 1359, 1686, 1364, 1498, 1368, 1302, 1362, 1381, 1389, 1395, 1486, 1686, 1371, 1377, 1370, 1686, 1375, 1382, 1384, 1402, 1408, 1385, 1383, 1619, 1413, 1423, 1428, 1433, 1686, 1686, 1270, 1686, 1338, 1686, 1440, 1686, 1686, 1686, 1499, 1465, 1686, 1686, 1686, 1639, 1473, 1884, 1686, 1686, 1293, 1864, 1686, 1686, 1296, 1321, 1483, 1686, 1686, 1686, 1646, 1686, 1748, 1496, 1686, 1418, 1675, 1686, 1418, 1702, 1686, 1418, 1981, 1686, 1429, 1409, 1427, 1504, 1692, 1686, 1686, 1313, 1448, 1651, 1508, 1686, 1686, 1340, 1686, 1903, 1686, 1686, 1435, 1513, 1686, 1283, 1287, 1519, 1686, 1524, 1363, 1568, 1938, 1539, 1566, 1579, 1479, 1533, 1538, 1553, 1544, 1552, 1557, 1563, 1574, 1557, 1583, 1589, 1590, 1759, 1594, 1603, 1607, 1611, 1686, 1436, 1514, 1686, 1434, 1656, 1686, 1434, 1680, 1686, 1453, 1686, 1686, 1686, 1559, 1617, 1686, 1770, 1418, 1623, 1769, 1629, 1686, 1515, 1335, 1686, 1285, 1686, 1671, 1921, 1650, 1686, 1686, 1344, 1308, 1666, 1686, 1686, 1686, 1659, 1685, 1686, 1686, 1686, 1686, 1241, 1686, 1686, 1844, 1691, 1686, 1630, 1977, 1970, 1362, 1686, 1686, 1686, 1693, 1698, 1686, 1686, 1686, 1697, 1686, 1764, 1715, 1686, 1634, 1638, 1686, 1599, 1585, 1686, 1271, 1686, 1269, 1686, 1721, 1686, 1686, 1354, 1686, 1801, 1686, 1799, 1686, 1640, 1686, 1686, 1461, 1686, 1686, 1732, 1686, 1944, 1686, 1740, 1686, 1746, 1415, 1396, 1686, 1598, 1547, 1417, 1597, 1416, 1577, 1546, 1397, 1577, 1547, 1548, 1570, 1398, 1753, 1686, 1652, 1509, 1686, 1686, 1686, 1757, 1686, 1419, 1686, 1763, 1418, 1768, 1781, 1686, 1686, 1686, 1705, 1686, 2048, 1792, 1686, 1686, 1686, 1735, 1686, 1797, 1686, 1686, 1404, 1686, 1639, 1815, 1686, 1686, 1418, 2017, 1820, 1686, 1686, 1803, 1686, 1686, 1686, 1736, 1489, 1686, 1686, 1825, 1338, 1260, 1263, 1686, 1686, 1785, 1686, 1686, 1728, 1686, 1686, 1749, 1497, 1830, 1830, 1262, 1248, 1261, 1329, 1260, 1264, 1329, 1248, 1249, 1259, 1540, 1849, 1842, 1686, 1686, 1835, 1686, 1686, 1816, 1686, 1686, 1831, 1882, 1848, 1686, 1686, 1686, 1774, 2071, 1854, 1686, 1686, 1469, 1884, 1686, 1821, 1859, 1686, 1686, 1350, 1883, 1686, 1686, 1686, 1781, 1391, 1875, 1686, 1686, 1613, 1644, 1686, 1686, 1889, 1686, 1686, 1662, 1884, 1686, 1885, 1890, 1686, 1686, 1686, 1894, 1686, 1686, 1678, 1686, 1907, 1686, 1686, 1529, 1914, 1686, 1838, 1686, 1686, 1881, 1686, 1686, 1872, 1876, 1836, 1919, 1686, 1837, 1692, 1910, 1686, 1925, 1928, 1742, 1686, 1811, 1811, 1930, 1810, 1929, 1935, 1928, 1900, 1942, 1867, 1868, 1931, 1035, 1788, 1948, 1952, 1956, 1960, 1964, 1686, 1976, 1686, 1686, 1686, 2065, 1686, 1992, 2037, 1686, 1686, 1998, 2009, 1972, 2002, 1686, 1686, 1686, 2077, 1300, 2023, 1686, 1686, 1686, 1807, 2031, 1686, 1686, 1686, 1860, 1500, 2032, 1686, 1686, 1686, 2083, 1686, 2036, 1686, 1277, 1276, 2042, 1877, 1686, 1686, 2041, 1686, 1686, 2027, 2037, 2012, 1686, 2012, 1855, 1850, 1686, 2046, 1686, 1686, 2054, 1996, 1686, 1897, 1309, 2059, 2052, 1686, 2058, 1686, 1686, 2081, 1686, 1717, 1477, 1686, 1331, 1686, 1686, 1687, 1686, 1860, 1681, 1686, 1686, 1686, 1966, 1724, 1686, 1686, 1686, 1984, 2015, 1686, 1686, 1686, 1988, 1686, 2063, 1686, 1686, 1686, 2005, 1686, 1727, 1686, 1686, 1711, 1457, 2069, 1686, 1686, 1686, 2019, 2075, 1686, 1686, 1915, 1686, 1686, 1793, 1874, 1686, 1686, 1491, 1362, 1449, 1686, 1686, 1460, 2098, 2087, 2091, 2095, 2184, 2102, 2113, 2780, 2117, 2134, 2142, 2281, 2146, 2146, 2146, 2304, 2296, 2181, 2639, 2591, 2872, 2592, 2873, 2313, 2195, 2200, 2281, 2146, 2273, 2226, 2204, 2152, 2219, 2276, 2167, 2177, 2276, 2235, 2276, 2276, 2230, 2281, 2276, 2296, 2276, 2293, 2276, 2276, 2276, 2276, 2234, 2276, 2311, 2314, 2210, 2199, 2217, 2222, 2276, 2276, 2276, 2240, 2276, 2294, 2276, 2276, 2173, 2276, 2198, 2281, 2281, 2281, 2281, 2282, 2146, 2146, 2146, 2146, 2205, 2146, 2204, 2248, 2276, 2235, 2276, 2297, 2276, 2276, 2276, 2277, 2256, 2281, 2283, 2146, 2146, 2146, 2275, 2276, 2295, 2276, 2276, 2293, 2146, 2304, 2264, 2269, 2221, 2276, 2276, 2276, 2293, 2295, 2276, 2276, 2276, 2295, 2263, 2205, 2268, 2220, 2172, 2276, 2276, 2276, 2296, 2276, 2276, 2296, 2294, 2276, 2276, 2278, 2281, 2281, 2280, 2281, 2281, 2281, 2283, 2206, 2223, 2276, 2276, 2279, 2281, 2281, 2146, 2273, 2276, 2276, 2281, 2281, 2281, 2276, 2292, 2276, 2298, 2225, 2276, 2298, 2169, 2224, 2292, 2298, 2171, 2229, 2281, 2281, 2171, 2236, 2281, 2281, 2281, 2146, 2275, 2225, 2292, 2299, 2276, 2229, 2281, 2146, 2276, 2290, 2297, 2283, 2146, 2146, 2274, 2224, 2227, 2298, 2225, 2297, 2276, 2230, 2170, 2230, 2282, 2146, 2147, 2151, 2156, 2288, 2276, 2230, 2303, 2308, 2236, 2284, 2228, 2318, 2318, 2318, 2326, 2335, 2339, 2343, 2349, 2416, 2693, 2357, 2592, 2109, 2592, 2592, 2162, 2943, 2823, 2646, 2592, 2361, 2592, 2122, 2592, 2592, 2122, 2470, 2592, 2592, 2592, 2109, 2107, 2592, 2592, 2592, 2123, 2592, 2592, 2592, 2125, 2592, 2413, 2592, 2592, 2592, 2127, 2592, 2592, 2414, 2592, 2592, 2592, 2130, 2952, 2592, 2594, 2592, 2592, 2212, 2609, 2252, 2592, 2592, 2592, 2446, 2434, 2592, 2592, 2592, 2212, 2446, 2450, 2456, 2431, 2435, 2592, 2592, 2243, 2478, 2448, 2439, 2946, 2592, 2592, 2592, 2368, 2809, 2813, 2450, 2441, 2212, 2812, 2449, 2440, 2947, 2592, 2592, 2592, 2345, 2451, 2457, 2948, 2592, 2124, 2592, 2592, 2650, 2823, 2449, 2455, 2946, 2592, 2128, 2592, 2592, 2649, 2952, 2592, 2810, 2448, 2461, 2991, 2467, 2592, 2592, 2329, 2817, 2474, 2990, 2466, 2592, 2592, 2373, 2447, 2992, 2469, 2592, 2592, 2592, 2373, 2447, 2477, 2468, 2592, 2592, 2353, 2469, 2592, 2495, 2592, 2592, 2415, 2483, 2592, 2415, 2496, 2592, 2592, 2352, 2592, 2592, 2352, 2352, 2469, 2592, 2592, 2363, 2331, 2494, 2592, 2592, 2592, 2375, 2592, 2375, 2415, 2504, 2592, 2592, 2367, 2372, 2503, 2592, 2592, 2592, 2389, 2418, 2415, 2592, 2592, 2373, 2592, 2592, 2592, 2593, 2732, 2417, 2415, 2592, 2417, 2520, 2592, 2592, 2592, 2390, 2521, 2521, 2592, 2592, 2592, 2401, 2599, 2585, 2526, 2531, 2120, 2592, 2212, 2426, 2450, 2463, 2948, 2592, 2592, 2592, 2213, 2389, 2527, 2532, 2121, 2542, 2551, 2105, 2592, 2213, 2592, 2592, 2592, 2558, 2538, 2544, 2553, 2557, 2537, 2543, 2552, 2421, 2572, 2576, 2546, 2543, 2547, 2592, 2592, 2373, 2615, 2575, 2545, 2105, 2592, 2244, 2479, 2592, 2129, 2592, 2592, 2628, 2690, 2469, 2562, 2566, 2592, 2592, 2592, 2415, 2928, 2934, 2401, 2570, 2574, 2564, 2572, 2585, 2590, 2592, 2592, 2585, 2965, 2592, 2592, 2592, 2445, 2251, 2592, 2592, 2592, 2474, 2592, 2609, 2892, 2592, 2362, 2592, 2592, 2138, 2851, 2159, 2592, 2592, 2592, 2509, 2888, 2892, 2592, 2592, 2592, 2490, 2418, 2891, 2592, 2592, 2376, 2592, 2592, 2374, 2592, 2889, 2388, 2592, 2373, 2373, 2890, 2592, 2592, 2387, 2592, 2887, 2505, 2892, 2592, 2373, 2610, 2388, 2592, 2592, 2376, 2373, 2592, 2887, 2891, 2592, 2374, 2592, 2592, 2608, 2159, 2614, 2620, 2592, 2592, 2394, 2594, 2887, 2399, 2592, 2887, 2397, 2508, 2374, 2507, 2592, 2375, 2592, 2592, 2592, 2595, 2508, 2506, 2592, 2506, 2505, 2505, 2592, 2507, 2637, 2505, 2592, 2592, 2401, 2661, 2592, 2643, 2592, 2592, 2417, 2592, 2655, 2592, 2592, 2592, 2510, 2414, 2656, 2592, 2592, 2592, 2516, 2592, 2593, 2660, 2665, 2880, 2592, 2592, 2592, 2522, 2767, 2666, 2881, 2592, 2592, 2420, 2571, 2696, 2592, 2592, 2592, 2580, 2572, 2686, 2632, 2698, 2592, 2383, 2514, 2592, 2163, 2932, 2465, 2685, 2631, 2697, 2592, 2388, 2592, 2592, 2212, 2604, 2671, 2632, 2678, 2592, 2401, 2405, 2409, 2592, 2592, 2592, 2679, 2592, 2592, 2592, 2592, 2108, 2677, 2591, 2592, 2592, 2592, 2419, 2592, 2683, 2187, 2191, 2469, 2671, 2189, 2467, 2592, 2401, 2629, 2633, 2702, 2468, 2592, 2592, 2421, 2536, 2703, 2469, 2592, 2592, 2422, 2573, 2593, 2672, 2467, 2592, 2402, 2406, 2592, 2402, 2979, 2592, 2592, 2626, 2673, 2467, 2592, 2446, 2259, 2947, 2592, 2377, 2709, 2592, 2592, 2522, 2862, 2713, 2468, 2592, 2592, 2581, 2572, 2562, 2374, 2374, 2592, 2376, 2721, 2724, 2592, 2592, 2624, 2373, 2731, 2592, 2592, 2592, 2626, 2732, 2592, 2592, 2592, 2755, 2656, 2726, 2736, 2741, 2592, 2486, 2593, 2381, 2592, 2727, 2737, 2742, 2715, 2747, 2753, 2592, 2498, 2469, 2873, 2743, 2592, 2592, 2592, 2791, 2759, 2763, 2592, 2592, 2627, 2704, 2592, 2592, 2522, 2789, 2593, 2761, 2753, 2592, 2498, 2863, 2592, 2592, 2767, 2592, 2592, 2592, 2792, 2789, 2592, 2592, 2592, 2803, 2126, 2592, 2592, 2592, 2811, 2122, 2592, 2592, 2592, 2834, 2777, 2592, 2592, 2592, 2848, 2936, 2591, 2489, 2797, 2592, 2592, 2670, 2631, 2490, 2798, 2592, 2592, 2592, 2963, 2807, 2592, 2592, 2592, 2965, 2838, 2592, 2592, 2592, 2975, 2330, 2818, 2829, 2592, 2498, 2939, 2592, 2498, 2592, 2791, 2331, 2819, 2830, 2592, 2592, 2592, 2982, 2834, 2817, 2828, 2106, 2592, 2592, 2592, 2405, 2405, 2817, 2828, 2592, 2592, 2415, 2849, 2842, 2592, 2522, 2773, 2592, 2522, 2868, 2592, 2580, 2600, 2586, 2137, 2850, 2843, 2592, 2592, 2855, 2937, 2844, 2592, 2592, 2592, 2987, 2936, 2591, 2592, 2592, 2684, 2630, 2592, 2856, 2938, 2592, 2592, 2860, 2939, 2592, 2592, 2872, 2592, 2861, 2591, 2592, 2592, 2887, 2616, 2592, 2867, 2592, 2592, 2708, 2592, 2498, 2469, 2498, 2497, 2785, 2773, 2499, 2783, 2770, 2877, 2877, 2877, 2772, 2592, 2592, 2345, 2885, 2592, 2592, 2592, 2715, 2762, 2515, 2896, 2592, 2592, 2715, 2917, 2516, 2897, 2592, 2592, 2592, 2901, 2906, 2911, 2592, 2592, 2956, 2960, 2715, 2902, 2907, 2912, 2593, 2916, 2920, 2820, 2922, 2822, 2592, 2592, 2715, 2927, 2921, 2821, 2106, 2592, 2592, 2974, 2408, 2321, 2821, 2106, 2592, 2592, 2983, 2592, 2593, 2404, 2408, 2592, 2592, 2717, 2749, 2716, 2928, 2322, 2822, 2593, 2926, 2919, 2820, 2934, 2823, 2592, 2592, 2592, 2651, 2824, 2592, 2592, 2592, 2130, 2952, 2592, 2592, 2592, 2592, 2964, 2592, 2592, 2716, 2748, 2592, 2969, 2592, 2592, 2716, 2918, 2368, 2970, 2592, 2592, 2592, 2403, 2407, 2592, 2592, 2787, 2211, 2404, 2409, 2592, 2592, 2802, 2837, 2987, 2592, 2592, 2592, 2809, 2427, 2592, 2793, 2592, 2592, 2809, 2447, 1073741824, 0x80000000, 539754496, 542375936, 402653184, 554434560, 571736064, 545521856, 268451840, 335544320, 268693630, 512, 2048, 256, 1024, 0, 1024, 0, 1073741824, 0x80000000, 0, 0, 0, 8388608, 0, 0, 1073741824, 1073741824, 0, 0x80000000, 537133056, 4194304, 1048576, 268435456, -1073741824, 0, 0, 0, 1048576, 0, 0, 0, 1572864, 0, 0, 0, 4194304, 0, 134217728, 16777216, 0, 0, 32, 64, 98304, 0, 33554432, 8388608, 192, 67108864, 67108864, 67108864, 67108864, 16, 32, 4, 0, 8192, 196608, 196608, 229376, 80, 4096, 524288, 8388608, 0, 0, 32, 128, 256, 24576, 24600, 24576, 24576, 2, 24576, 24576, 24576, 24584, 24592, 24576, 24578, 24576, 24578, 24576, 24576, 16, 512, 2048, 2048, 256, 4096, 32768, 1048576, 4194304, 67108864, 134217728, 268435456, 262144, 134217728, 0, 128, 128, 64, 16384, 16384, 16384, 67108864, 32, 32, 4, 4, 4096, 262144, 134217728, 0, 0, 0, 2, 0, 8192, 131072, 131072, 4096, 4096, 4096, 4096, 24576, 24576, 24576, 8, 8, 24576, 24576, 16384, 16384, 16384, 24576, 24584, 24576, 24576, 24576, 16384, 24576, 536870912, 262144, 0, 0, 32, 2048, 8192, 4, 4096, 4096, 4096, 786432, 8388608, 16777216, 0, 128, 16384, 16384, 16384, 32768, 65536, 2097152, 32, 32, 32, 32, 4, 4, 4, 4, 4, 4096, 67108864, 67108864, 67108864, 24576, 24576, 24576, 24576, 0, 16384, 16384, 16384, 16384, 67108864, 67108864, 8, 67108864, 24576, 8, 8, 8, 24576, 24576, 24576, 24578, 24576, 24576, 24576, 2, 2, 2, 16384, 67108864, 67108864, 67108864, 32, 67108864, 8, 8, 24576, 2048, 0x80000000, 536870912, 262144, 262144, 262144, 67108864, 8, 24576, 16384, 32768, 1048576, 4194304, 25165824, 67108864, 24576, 32770, 2, 4, 112, 512, 98304, 524288, 50, 402653186, 1049090, 1049091, 10, 66, 100925514, 10, 66, 12582914, 0, 0, -1678194207, -1678194207, -1041543218, 0, 32768, 0, 0, 32, 65536, 268435456, 1, 1, 513, 1048577, 0, 12582912, 0, 0, 0, 4, 1792, 0, 0, 0, 7, 29360128, 0, 0, 0, 8, 0, 0, 0, 12, 1, 1, 0, 0, -604102721, -604102721, 4194304, 8388608, 0, 0, 0, 31, 925600, 997981306, 997981306, 997981306, 0, 0, 2048, 8388608, 0, 0, 1, 2, 4, 32, 64, 512, 8192, 0, 0, 0, 245760, 997720064, 0, 0, 0, 32, 0, 0, 0, 3, 12, 16, 32, 8, 112, 3072, 12288, 16384, 32768, 65536, 131072, 7864320, 16777216, 973078528, 0, 0, 65536, 131072, 3670016, 4194304, 16777216, 33554432, 2, 8, 48, 2048, 8192, 16384, 32768, 65536, 131072, 524288, 131072, 524288, 3145728, 4194304, 16777216, 33554432, 65536, 131072, 2097152, 4194304, 16777216, 33554432, 134217728, 268435456, 536870912, 0, 0, 0, 1024, 0, 8, 48, 2048, 8192, 65536, 33554432, 268435456, 536870912, 65536, 268435456, 536870912, 0, 0, 32768, 0, 0, 126, 623104, 65011712, 0, 32, 65536, 536870912, 0, 0, 65536, 524288, 0, 32, 65536, 0, 0, 0, 2048, 0, 0, 0, 15482, 245760, -604102721, 0, 0, 0, 18913, 33062912, 925600, -605028352, 0, 0, 0, 65536, 31, 8096, 131072, 786432, 3145728, 3145728, 12582912, 50331648, 134217728, 268435456, 160, 256, 512, 7168, 131072, 786432, 131072, 786432, 1048576, 2097152, 12582912, 16777216, 268435456, 1073741824, 0x80000000, 12582912, 16777216, 33554432, 268435456, 1073741824, 0x80000000, 3, 12, 16, 160, 256, 7168, 786432, 1048576, 12582912, 16777216, 268435456, 1073741824, 0, 8, 16, 32, 128, 256, 512, 7168, 786432, 1048576, 2097152, 0, 1, 2, 8, 16, 7168, 786432, 1048576, 8388608, 16777216, 16777216, 1073741824, 0, 0, 0, 0, 1, 0, 0, 8, 32, 128, 256, 7168, 8, 32, 0, 3072, 0, 8, 32, 3072, 4096, 524288, 8, 32, 0, 0, 3072, 4096, 0, 2048, 524288, 8388608, 8, 2048, 0, 0, 1, 12, 256, 4096, 32768, 262144, 1048576, 4194304, 67108864, 0, 2048, 0, 2048, 2048, 1073741824, -58805985, -58805985, -58805985, 0, 0, 262144, 0, 0, 32, 4194304, 16777216, 134217728, 4382, 172032, -58982400, 0, 0, 2, 28, 256, 4096, 8192, 8192, 32768, 131072, 262144, 524288, 1, 2, 12, 256, 4096, 0, 0, 4194304, 67108864, 134217728, 805306368, 1073741824, 0, 0, 1, 2, 12, 16, 256, 4096, 1048576, 67108864, 134217728, 268435456, 0, 512, 1048576, 4194304, 201326592, 1879048192, 0, 0, 12, 256, 4096, 134217728, 268435456, 536870912, 12, 256, 268435456, 536870912, 0, 12, 256, 0, 0, 1, 32, 64, 512, 0, 0, 205236961, 205236961, 0, 0, 0, 1, 96, 640, 1, 10976, 229376, 204996608, 0, 640, 2048, 8192, 229376, 1572864, 1572864, 2097152, 201326592, 0, 0, 0, 64, 512, 2048, 229376, 1572864, 201326592, 1572864, 201326592, 0, 0, 1, 4382, 0, 1, 32, 2048, 65536, 131072, 1572864, 201326592, 131072, 1572864, 134217728, 0, 0, 524288, 524288, 0, 0, 0, -68582786, -68582786, -68582786, 0, 0, 2097152, 524288, 0, 524288, 0, 0, 65536, 131072, 1572864, 0, 0, 2, 4, 0, 0, 65011712, -134217728, 0, 0, 0, 0, 2, 4, 120, 512, -268435456, 0, 0, 0, 2, 8, 48, 64, 2048, 8192, 98304, 524288, 2097152, 4194304, 25165824, 33554432, 134217728, 268435456, 0x80000000, 0, 0, 25165824, 33554432, 134217728, 1879048192, 0x80000000, 0, 0, 4, 112, 512, 622592, 65011712, 134217728, -268435456, 16777216, 33554432, 134217728, 1610612736, 0, 0, 0, 64, 98304, 524288, 4194304, 16777216, 33554432, 0, 98304, 524288, 16777216, 33554432, 0, 65536, 524288, 33554432, 536870912, 1073741824, 0, 65536, 524288, 536870912, 1073741824, 0, 0, 65536, 524288, 536870912, 0, 524288, 0, 524288, 524288, 1048576, 2086666240, 0x80000000, 0, -1678194207, 0, 0, 0, 8, 32, 2048, 524288, 8388608, 0, 0, 33062912, 436207616, 0x80000000, 0, 0, 32, 64, 2432, 16384, 32768, 32768, 524288, 3145728, 4194304, 25165824, 25165824, 167772160, 268435456, 0x80000000, 0, 32, 64, 384, 2048, 16384, 32768, 1048576, 2097152, 4194304, 25165824, 32, 64, 128, 256, 2048, 16384, 2048, 16384, 1048576, 4194304, 16777216, 33554432, 134217728, 536870912, 1073741824, 0, 0, 2048, 16384, 4194304, 16777216, 33554432, 134217728, 805306368, 0, 0, 16777216, 134217728, 268435456, 0x80000000, 0, 622592, 622592, 622592, 8807, 8807, 434791, 0, 0, 16777216, 0, 0, 0, 7, 608, 8192, 0, 0, 0, 3, 4, 96, 512, 32, 64, 8192, 0, 0, 16777216, 134217728, 0, 0, 2, 4, 8192, 16384, 65536, 2097152, 33554432, 268435456
+];
+
+XQueryTokenizer.TOKEN =
+[
+ "(0)",
+ "ModuleDecl",
+ "Annotation",
+ "OptionDecl",
+ "Operator",
+ "Variable",
+ "Tag",
+ "EndTag",
+ "PragmaContents",
+ "DirCommentContents",
+ "DirPIContents",
+ "CDataSectionContents",
+ "AttrTest",
+ "Wildcard",
+ "EQName",
+ "IntegerLiteral",
+ "DecimalLiteral",
+ "DoubleLiteral",
+ "PredefinedEntityRef",
+ "'\"\"'",
+ "EscapeApos",
+ "QuotChar",
+ "AposChar",
+ "ElementContentChar",
+ "QuotAttrContentChar",
+ "AposAttrContentChar",
+ "NCName",
+ "QName",
+ "S",
+ "CharRef",
+ "CommentContents",
+ "DocTag",
+ "DocCommentContents",
+ "EOF",
+ "'!'",
+ "'\"'",
+ "'#'",
+ "'#)'",
+ "''''",
+ "'('",
+ "'(#'",
+ "'(:'",
+ "'(:~'",
+ "')'",
+ "'*'",
+ "'*'",
+ "','",
+ "'-->'",
+ "'.'",
+ "'/'",
+ "'/>'",
+ "':'",
+ "':)'",
+ "';'",
+ "'<!--'",
+ "'<![CDATA['",
+ "'<?'",
+ "'='",
+ "'>'",
+ "'?'",
+ "'?>'",
+ "'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'",
+ "'{'",
+ "'{{'",
+ "'|'",
+ "'}'",
+ "'}}'"
+];
+
+},{}],"/node_modules/xqlint/lib/lexers/jsoniq_lexer.js":[function(_dereq_,module,exports){
+'use strict';
+
+var JSONiqTokenizer = _dereq_('./JSONiqTokenizer').JSONiqTokenizer;
+var Lexer = _dereq_('./lexer').Lexer;
+
+var keys = 'NaN|after|allowing|ancestor|ancestor-or-self|and|append|array|as|ascending|at|attribute|base-uri|before|boundary-space|break|by|case|cast|castable|catch|child|collation|comment|constraint|construction|contains|context|continue|copy|copy-namespaces|count|decimal-format|decimal-separator|declare|default|delete|descendant|descendant-or-self|descending|digit|div|document|document-node|element|else|empty|empty-sequence|encoding|end|eq|every|except|exit|external|false|first|following|following-sibling|for|from|ft-option|function|ge|greatest|group|grouping-separator|gt|idiv|if|import|in|index|infinity|insert|instance|integrity|intersect|into|is|item|json|json-item|jsoniq|last|lax|le|least|let|loop|lt|minus-sign|mod|modify|module|namespace|namespace-node|ne|next|node|nodes|not|null|object|of|only|option|or|order|ordered|ordering|paragraphs|parent|pattern-separator|per-mille|percent|preceding|preceding-sibling|previous|processing-instruction|rename|replace|return|returning|revalidation|satisfies|schema|schema-attribute|schema-element|score|select|self|sentences|sliding|some|stable|start|strict|switch|text|then|times|to|treat|true|try|tumbling|type|typeswitch|union|unordered|updating|validate|value|variable|version|when|where|while|window|with|words|xquery|zero-digit'.split('|');
+var keywords = keys.map(function(val) { return { name: '\'' + val + '\'', token: 'keyword' }; });
+var ncnames = keys.map(function(val) { return { name: '\'' + val + '\'', token: 'text', next: function(stack){ stack.pop(); } }; });
+
+var cdata = 'constant.language';
+var number = 'constant';
+var xmlcomment = 'comment';
+var pi = 'xml-pe';
+var pragma = 'constant.buildin';
+var n = function(name){
+ return '\'' + name + '\'';
+};
+var Rules = {
+ start: [
+ { name: n('(#'), token: pragma, next: function(stack){ stack.push('Pragma'); } },
+ { name: n('(:'), token: 'comment', next: function(stack){ stack.push('Comment'); } },
+ { name: n('(:~'), token: 'comment.doc', next: function(stack){ stack.push('CommentDoc'); } },
+ { name: n('<!--'), token: xmlcomment, next: function(stack){ stack.push('XMLComment'); } },
+ { name: n('<?'), token: pi, next: function(stack) { stack.push('PI'); } },
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.push('AposString'); } },
+ { name: n('"'), token: 'string', next: function(stack){ stack.push('QuotString'); } },
+ { name: 'Annotation', token: 'support.function' },
+ { name: 'ModuleDecl', token: 'keyword', next: function(stack){ stack.push('Prefix'); } },
+ { name: 'OptionDecl', token: 'keyword', next: function(stack){ stack.push('_EQName'); } },
+ { name: 'AttrTest', token: 'support.type' },
+ { name: 'Variable', token: 'variable' },
+ { name: n('<![CDATA['), token: cdata, next: function(stack){ stack.push('CData'); } },
+ { name: 'IntegerLiteral', token: number },
+ { name: 'DecimalLiteral', token: number },
+ { name: 'DoubleLiteral', token: number },
+ { name: 'Operator', token: 'keyword.operator' },
+ { name: 'EQName', token: function(val) { return keys.indexOf(val) !== -1 ? 'keyword' : 'support.function'; } },
+ { name: n('('), token: 'lparen' },
+ { name: n(')'), token: 'rparen' },
+ { name: 'Tag', token: 'meta.tag', next: function(stack){ stack.push('StartTag'); } },
+ { name: n('}'), token: 'text', next: function(stack){ if(stack.length > 1) { stack.pop(); } } },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } } //, next: function(stack){ if(stack.length > 1) { stack.pop(); } } }
+ ].concat(keywords),
+ _EQName: [
+ { name: 'EQName', token: 'text', next: function(stack) { stack.pop(); } }
+ ].concat(ncnames),
+ Prefix: [
+ { name: 'NCName', token: 'text', next: function(stack) { stack.pop(); } }
+ ].concat(ncnames),
+ StartTag: [
+ { name: n('>'), token: 'meta.tag', next: function(stack){ stack.push('TagContent'); } },
+ { name: 'QName', token: 'entity.other.attribute-name' },
+ { name: n('='), token: 'text' },
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.push('AposAttr'); } },
+ { name: n('"'), token: 'string', next: function(stack){ stack.push('QuotAttr'); } },
+ { name: n('/>'), token: 'meta.tag.r', next: function(stack){ stack.pop(); } }
+ ],
+ TagContent: [
+ { name: 'ElementContentChar', token: 'text' },
+ { name: n('<![CDATA['), token: cdata, next: function(stack){ stack.push('CData'); } },
+ { name: n('<!--'), token: xmlcomment, next: function(stack){ stack.push('XMLComment'); } },
+ { name: 'Tag', token: 'meta.tag', next: function(stack){ stack.push('StartTag'); } },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'text' },
+ { name: n('}}'), token: 'text' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } },
+ { name: 'EndTag', token: 'meta.tag', next: function(stack){ stack.pop(); stack.pop(); } }
+ ],
+ AposAttr: [
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'EscapeApos', token: 'constant.language.escape' },
+ { name: 'AposAttrContentChar', token: 'string' },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'string' },
+ { name: n('}}'), token: 'string' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } }
+ ],
+ QuotAttr: [
+ { name: n('\"'), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'EscapeQuot', token: 'constant.language.escape' },
+ { name: 'QuotAttrContentChar', token: 'string' },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'string' },
+ { name: n('}}'), token: 'string' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } }
+ ],
+ Pragma: [
+ { name: 'PragmaContents', token: pragma },
+ { name: n('#'), token: pragma },
+ { name: n('#)'), token: pragma, next: function(stack){ stack.pop(); } }
+ ],
+ Comment: [
+ { name: 'CommentContents', token: 'comment' },
+ { name: n('(:'), token: 'comment', next: function(stack){ stack.push('Comment'); } },
+ { name: n(':)'), token: 'comment', next: function(stack){ stack.pop(); } }
+ ],
+ CommentDoc: [
+ { name: 'DocCommentContents', token: 'comment.doc' },
+ { name: 'DocTag', token: 'comment.doc.tag' },
+ { name: n('(:'), token: 'comment.doc', next: function(stack){ stack.push('CommentDoc'); } },
+ { name: n(':)'), token: 'comment.doc', next: function(stack){ stack.pop(); } }
+ ],
+ XMLComment: [
+ { name: 'DirCommentContents', token: xmlcomment },
+ { name: n('-->'), token: xmlcomment, next: function(stack){ stack.pop(); } }
+ ],
+ CData: [
+ { name: 'CDataSectionContents', token: cdata },
+ { name: n(']]>'), token: cdata, next: function(stack){ stack.pop(); } }
+ ],
+ PI: [
+ { name: 'DirPIContents', token: pi },
+ { name: n('?'), token: pi },
+ { name: n('?>'), token: pi, next: function(stack){ stack.pop(); } }
+ ],
+ AposString: [
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: 'EscapeApos', token: 'constant.language.escape' },
+ { name: 'AposChar', token: 'string' }
+ ],
+ QuotString: [
+ { name: n('"'), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'JSONPredefinedCharRef', token: 'constant.language.escape' },
+ { name: 'JSONCharRef', token: 'constant.language.escape' },
+ { name: 'JSONChar', token: 'string' }
+ ]
+};
+
+exports.JSONiqLexer = function(){ return new Lexer(JSONiqTokenizer, Rules); };
+},{"./JSONiqTokenizer":"/node_modules/xqlint/lib/lexers/JSONiqTokenizer.js","./lexer":"/node_modules/xqlint/lib/lexers/lexer.js"}],"/node_modules/xqlint/lib/lexers/lexer.js":[function(_dereq_,module,exports){
+'use strict';
+
+var TokenHandler = function(code) {
+ var input = code;
+ this.tokens = [];
+
+ this.reset = function() {
+ input = input;
+ this.tokens = [];
+ };
+
+ this.startNonterminal = function() {};
+ this.endNonterminal = function() {};
+
+ this.terminal = function(name, begin, end) {
+ this.tokens.push({
+ name: name,
+ value: input.substring(begin, end)
+ });
+ };
+
+ this.whitespace = function(begin, end) {
+ this.tokens.push({
+ name: 'WS',
+ value: input.substring(begin, end)
+ });
+ };
+};
+
+exports.Lexer = function(Tokenizer, Rules) {
+
+ this.tokens = [];
+
+ this.getLineTokens = function(line, state) {
+ state = (state === 'start' || !state) ? '["start"]' : state;
+ var stack = JSON.parse(state);
+ var h = new TokenHandler(line);
+ var tokenizer = new Tokenizer(line, h);
+ var tokens = [];
+
+ while(true) {
+ var currentState = stack[stack.length - 1];
+ try {
+ h.tokens = [];
+ tokenizer['parse_' + currentState]();
+ var info = null;
+
+ if(h.tokens.length > 1 && h.tokens[0].name === 'WS') {
+ tokens.push({
+ type: 'text',
+ value: h.tokens[0].value
+ });
+ h.tokens.splice(0, 1);
+ }
+
+ var token = h.tokens[0];
+ var rules = Rules[currentState];
+ for(var k = 0; k < rules.length; k++) {
+ var rule = Rules[currentState][k];
+ if((typeof(rule.name) === 'function' && rule.name(token)) || rule.name === token.name) {
+ info = rule;
+ break;
+ }
+ }
+
+ if(token.name === 'EOF') { break; }
+ if(token.value === '') { throw 'Encountered empty string lexical rule.'; }
+
+ tokens.push({
+ type: info === null ? 'text' : (typeof(info.token) === 'function' ? info.token(token.value) : info.token),
+ value: token.value
+ });
+
+ if(info && info.next) {
+ info.next(stack);
+ }
+
+ } catch(e) {
+ if(e instanceof tokenizer.ParseException) {
+ var index = 0;
+ for(var i=0; i < tokens.length; i++) {
+ index += tokens[i].value.length;
+ }
+ tokens.push({ type: 'text', value: line.substring(index) });
+ return {
+ tokens: tokens,
+ state: JSON.stringify(['start'])
+ };
+ } else {
+ throw e;
+ }
+ }
+ }
+
+ return {
+ tokens: tokens,
+ state: JSON.stringify(stack)
+ };
+ };
+};
+},{}],"/node_modules/xqlint/lib/lexers/xquery_lexer.js":[function(_dereq_,module,exports){
+'use strict';
+
+var XQueryTokenizer = _dereq_('./XQueryTokenizer').XQueryTokenizer;
+var Lexer = _dereq_('./lexer').Lexer;
+
+var keys = '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|strict'.split('|');
+
+var keywords = keys.map(function(val) { return { name: '\'' + val + '\'', token: 'keyword' }; });
+var ncnames = keys.map(function(val) { return { name: '\'' + val + '\'', token: 'text', next: function(stack){ stack.pop(); } }; });
+
+var cdata = 'constant.language';
+var number = 'constant';
+var xmlcomment = 'comment';
+var pi = 'xml-pe';
+var pragma = 'constant.buildin';
+var n = function(name){
+ return '\'' + name + '\'';
+};
+var Rules = {
+ start: [
+ { name: n('(#'), token: pragma, next: function(stack){ stack.push('Pragma'); } },
+ { name: n('(:'), token: 'comment', next: function(stack){ stack.push('Comment'); } },
+ { name: n('(:~'), token: 'comment.doc', next: function(stack){ stack.push('CommentDoc'); } },
+ { name: n('<!--'), token: xmlcomment, next: function(stack){ stack.push('XMLComment'); } },
+ { name: n('<?'), token: pi, next: function(stack) { stack.push('PI'); } },
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.push('AposString'); } },
+ { name: n('"'), token: 'string', next: function(stack){ stack.push('QuotString'); } },
+ { name: 'Annotation', token: 'support.function' },
+ { name: 'ModuleDecl', token: 'keyword', next: function(stack){ stack.push('Prefix'); } },
+ { name: 'OptionDecl', token: 'keyword', next: function(stack){ stack.push('_EQName'); } },
+ { name: 'AttrTest', token: 'support.type' },
+ { name: 'Variable', token: 'variable' },
+ { name: n('<![CDATA['), token: cdata, next: function(stack){ stack.push('CData'); } },
+ { name: 'IntegerLiteral', token: number },
+ { name: 'DecimalLiteral', token: number },
+ { name: 'DoubleLiteral', token: number },
+ { name: 'Operator', token: 'keyword.operator' },
+ { name: 'EQName', token: function(val) { return keys.indexOf(val) !== -1 ? 'keyword' : 'support.function'; } },
+ { name: n('('), token: 'lparen' },
+ { name: n(')'), token: 'rparen' },
+ { name: 'Tag', token: 'meta.tag', next: function(stack){ stack.push('StartTag'); } },
+ { name: n('}'), token: 'text', next: function(stack){ if(stack.length > 1) { stack.pop(); } } },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } } //, next: function(stack){ if(stack.length > 1) { stack.pop(); } } }
+ ].concat(keywords),
+ _EQName: [
+ { name: 'EQName', token: 'text', next: function(stack) { stack.pop(); } }
+ ].concat(ncnames),
+ Prefix: [
+ { name: 'NCName', token: 'text', next: function(stack) { stack.pop(); } }
+ ].concat(ncnames),
+ StartTag: [
+ { name: n('>'), token: 'meta.tag', next: function(stack){ stack.push('TagContent'); } },
+ { name: 'QName', token: 'entity.other.attribute-name' },
+ { name: n('='), token: 'text' },
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.push('AposAttr'); } },
+ { name: n('"'), token: 'string', next: function(stack){ stack.push('QuotAttr'); } },
+ { name: n('/>'), token: 'meta.tag.r', next: function(stack){ stack.pop(); } }
+ ],
+ TagContent: [
+ { name: 'ElementContentChar', token: 'text' },
+ { name: n('<![CDATA['), token: cdata, next: function(stack){ stack.push('CData'); } },
+ { name: n('<!--'), token: xmlcomment, next: function(stack){ stack.push('XMLComment'); } },
+ { name: 'Tag', token: 'meta.tag', next: function(stack){ stack.push('StartTag'); } },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'text' },
+ { name: n('}}'), token: 'text' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } },
+ { name: 'EndTag', token: 'meta.tag', next: function(stack){ stack.pop(); stack.pop(); } }
+ ],
+ AposAttr: [
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'EscapeApos', token: 'constant.language.escape' },
+ { name: 'AposAttrContentChar', token: 'string' },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'string' },
+ { name: n('}}'), token: 'string' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } }
+ ],
+ QuotAttr: [
+ { name: n('\"'), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'EscapeQuot', token: 'constant.language.escape' },
+ { name: 'QuotAttrContentChar', token: 'string' },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: n('{{'), token: 'string' },
+ { name: n('}}'), token: 'string' },
+ { name: n('{'), token: 'text', next: function(stack){ stack.push('start'); } }
+ ],
+ Pragma: [
+ { name: 'PragmaContents', token: pragma },
+ { name: n('#'), token: pragma },
+ { name: n('#)'), token: pragma, next: function(stack){ stack.pop(); } }
+ ],
+ Comment: [
+ { name: 'CommentContents', token: 'comment' },
+ { name: n('(:'), token: 'comment', next: function(stack){ stack.push('Comment'); } },
+ { name: n(':)'), token: 'comment', next: function(stack){ stack.pop(); } }
+ ],
+ CommentDoc: [
+ { name: 'DocCommentContents', token: 'comment.doc' },
+ { name: 'DocTag', token: 'comment.doc.tag' },
+ { name: n('(:'), token: 'comment.doc', next: function(stack){ stack.push('CommentDoc'); } },
+ { name: n(':)'), token: 'comment.doc', next: function(stack){ stack.pop(); } }
+ ],
+ XMLComment: [
+ { name: 'DirCommentContents', token: xmlcomment },
+ { name: n('-->'), token: xmlcomment, next: function(stack){ stack.pop(); } }
+ ],
+ CData: [
+ { name: 'CDataSectionContents', token: cdata },
+ { name: n(']]>'), token: cdata, next: function(stack){ stack.pop(); } }
+ ],
+ PI: [
+ { name: 'DirPIContents', token: pi },
+ { name: n('?'), token: pi },
+ { name: n('?>'), token: pi, next: function(stack){ stack.pop(); } }
+ ],
+ AposString: [
+ { name: n('\'\''), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: 'EscapeApos', token: 'constant.language.escape' },
+ { name: 'AposChar', token: 'string' }
+ ],
+ QuotString: [
+ { name: n('"'), token: 'string', next: function(stack){ stack.pop(); } },
+ { name: 'PredefinedEntityRef', token: 'constant.language.escape' },
+ { name: 'CharRef', token: 'constant.language.escape' },
+ { name: 'EscapeQuot', token: 'constant.language.escape' },
+ { name: 'QuotChar', token: 'string' }
+ ]
+};
+
+exports.XQueryLexer = function(){ return new Lexer(XQueryTokenizer, Rules); };
+},{"./XQueryTokenizer":"/node_modules/xqlint/lib/lexers/XQueryTokenizer.js","./lexer":"/node_modules/xqlint/lib/lexers/lexer.js"}],"/node_modules/xqlint/lib/parsers/JSONParseTreeHandler.js":[function(_dereq_,module,exports){
+exports.JSONParseTreeHandler = function (code) {
+ 'use strict';
+ var toBeIndex = ['VarDecl', 'FunctionDecl'];
+ var list = [
+ 'OrExpr', 'AndExpr', 'ComparisonExpr', 'StringConcatExpr', 'RangeExpr',
+ 'AdditiveExpr', 'MultiplicativeExpr',
+ 'UnionExpr', 'IntersectExceptExpr', 'InstanceofExpr', 'TreatExpr', 'CastableExpr', 'CastExpr', 'UnaryExpr', 'ValueExpr',
+ 'FTContainsExpr', 'SimpleMapExpr', 'PathExpr', 'RelativePathExpr', 'PostfixExpr', 'StepExpr'
+ ];
+
+ var ast = null;
+ var ptr = null;
+ var remains = code;
+ var cursor = 0;
+ var lineCursor = 0;
+ var line = 0;
+
+ function createNode(name) {
+ return {
+ name: name,
+ children: [],
+ getParent: null,
+ pos: {
+ sl: 0,
+ sc: 0,
+ el: 0,
+ ec: 0
+ }
+ };
+ }
+
+ function pushNode(name) { //begin
+ var node = createNode(name);
+ if (ast === null) {
+ ast = node;
+ ast.index = [];
+ ptr = node;
+ } else {
+ node.getParent = ptr;
+ ptr.children.push(node);
+ ptr = ptr.children[ptr.children.length - 1];
+ }
+ }
+
+ function popNode() {
+
+ if (ptr.children.length > 0) {
+ var s = ptr.children[0];
+ var e = null;
+ for (var i = ptr.children.length - 1; i >= 0; i--) {
+ e = ptr.children[i];
+ if (e.pos.el !== 0 || e.pos.ec !== 0) {
+ break;
+ }
+ }
+ ptr.pos.sl = s.pos.sl;
+ ptr.pos.sc = s.pos.sc;
+ ptr.pos.el = e.pos.el;
+ ptr.pos.ec = e.pos.ec;
+ }
+ if (ptr.name === 'FunctionName') {
+ ptr.name = 'EQName';
+ }
+ if (ptr.name === 'EQName' && ptr.value === undefined) {
+ ptr.value = ptr.children[0].value;
+ ptr.children.pop();
+ }
+
+ if(toBeIndex.indexOf(ptr.name) !== -1) {
+ ast.index.push(ptr);
+ }
+
+ if (ptr.getParent !== null) {
+ ptr = ptr.getParent;
+ } else {
+ }
+ if (ptr.children.length > 0) {
+ var lastChild = ptr.children[ptr.children.length - 1];
+ if (lastChild.children.length === 1 && list.indexOf(lastChild.name) !== -1) {
+ ptr.children[ptr.children.length - 1] = lastChild.children[0];
+ }
+ }
+ }
+
+ this.closeParseTree = function () {
+ while (ptr.getParent !== null) {
+ popNode();
+ }
+ popNode();
+ };
+
+ this.peek = function () {
+ return ptr;
+ };
+
+ this.getParseTree = function () {
+ return ast;
+ };
+
+ this.reset = function () {}; //input
+
+ this.startNonterminal = function (name, begin) {
+ pushNode(name, begin);
+ };
+
+ this.endNonterminal = function () {//name, end
+ popNode();
+ };
+
+ this.terminal = function (name, begin, end) {
+ name = (name.substring(0, 1) === '\'' && name.substring(name.length - 1) === '\'') ? 'TOKEN' : name;
+ pushNode(name, begin);
+ setValue(ptr, begin, end);
+ popNode();
+ };
+
+ this.whitespace = function (begin, end) {
+ var name = 'WS';
+ pushNode(name, begin);
+ setValue(ptr, begin, end);
+ popNode();
+ };
+
+ function setValue(node, begin, end) {
+
+ var e = end - cursor;
+ ptr.value = remains.substring(0, e);
+ remains = remains.substring(e);
+ cursor = end;
+
+ var sl = line;
+ var sc = lineCursor;
+ var el = sl + ptr.value.split('\n').length - 1;
+ var lastIdx = ptr.value.lastIndexOf('\n');
+ var ec = lastIdx === -1 ? sc + ptr.value.length : ptr.value.substring(lastIdx + 1).length;
+
+ line = el;
+ lineCursor = ec;
+
+ ptr.pos.sl = sl;
+ ptr.pos.sc = sc;
+ ptr.pos.el = el;
+ ptr.pos.ec = ec;
+ }
+};
+
+},{}],"/node_modules/xqlint/lib/parsers/JSONiqParser.js":[function(_dereq_,module,exports){
+ var JSONiqParser = exports.JSONiqParser = function JSONiqParser(string, parsingEventHandler)
+ {
+ init(string, parsingEventHandler);
+ var self = this;
+
+ this.ParseException = function(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 = {};
+ eventHandler.reset(input);
+ }
+
+ this.getOffendingToken = function(e)
+ {
+ var o = e.getOffending();
+ return o >= 0 ? JSONiqParser.TOKEN[o] : null;
+ };
+
+ this.getExpectedTokenSet = function(e)
+ {
+ var expected;
+ if (e.getExpected() < 0)
+ {
+ expected = JSONiqParser.getTokenSet(- e.getState());
+ }
+ else
+ {
+ expected = [JSONiqParser.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 = 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 || found != null ? "" : "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(277); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Module();
+ shift(25); // EOF
+ eventHandler.endNonterminal("XQuery", e0);
+ };
+
+ function parse_Module()
+ {
+ eventHandler.startNonterminal("Module", e0);
+ switch (l1)
+ {
+ case 170: // 'jsoniq'
+ lookahead2W(168); // S^WS | '#' | '(' | '(:' | 'encoding' | 'version'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 64682 // 'jsoniq' 'encoding'
+ || lk == 137898) // 'jsoniq' 'version'
+ {
+ parse_VersionDecl();
+ }
+ lookahead1W(277); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 185: // 'module'
+ lookahead2W(146); // S^WS | '#' | '(' | '(:' | 'namespace'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 95929: // 'module' 'namespace'
+ whitespace();
+ parse_LibraryModule();
+ break;
+ default:
+ whitespace();
+ parse_MainModule();
+ }
+ eventHandler.endNonterminal("Module", e0);
+ }
+
+ function parse_VersionDecl()
+ {
+ eventHandler.startNonterminal("VersionDecl", e0);
+ shift(170); // 'jsoniq'
+ lookahead1W(120); // S^WS | '(:' | 'encoding' | 'version'
+ switch (l1)
+ {
+ case 126: // 'encoding'
+ shift(126); // 'encoding'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ break;
+ default:
+ shift(269); // 'version'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ lookahead1W(113); // S^WS | '(:' | ';' | 'encoding'
+ if (l1 == 126) // 'encoding'
+ {
+ shift(126); // 'encoding'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ }
+ }
+ lookahead1W(29); // S^WS | '(:' | ';'
+ whitespace();
+ parse_Separator();
+ eventHandler.endNonterminal("VersionDecl", e0);
+ }
+
+ function parse_LibraryModule()
+ {
+ eventHandler.startNonterminal("LibraryModule", e0);
+ parse_ModuleDecl();
+ lookahead1W(142); // S^WS | EOF | '(:' | 'declare' | 'import'
+ whitespace();
+ parse_Prolog();
+ eventHandler.endNonterminal("LibraryModule", e0);
+ }
+
+ function parse_ModuleDecl()
+ {
+ eventHandler.startNonterminal("ModuleDecl", e0);
+ shift(185); // 'module'
+ lookahead1W(64); // S^WS | '(:' | 'namespace'
+ shift(187); // 'namespace'
+ lookahead1W(239); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NCName();
+ lookahead1W(30); // S^WS | '(:' | '='
+ shift(61); // '='
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ lookahead1W(29); // S^WS | '(:' | ';'
+ whitespace();
+ parse_Separator();
+ eventHandler.endNonterminal("ModuleDecl", e0);
+ }
+
+ function parse_Prolog()
+ {
+ eventHandler.startNonterminal("Prolog", e0);
+ for (;;)
+ {
+ lookahead1W(277); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 109: // 'declare'
+ lookahead2W(206); // S^WS | '#' | '%' | '(' | '(:' | 'base-uri' | 'boundary-space' | 'collection' |
+ break;
+ case 155: // 'import'
+ lookahead2W(169); // S^WS | '#' | '(' | '(:' | 'module' | 'schema'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 43117 // 'declare' 'base-uri'
+ && lk != 44141 // 'declare' 'boundary-space'
+ && lk != 50797 // 'declare' 'construction'
+ && lk != 53869 // 'declare' 'copy-namespaces'
+ && lk != 54893 // 'declare' 'decimal-format'
+ && lk != 56429 // 'declare' 'default'
+ && lk != 73325 // 'declare' 'ft-option'
+ && lk != 94875 // 'import' 'module'
+ && lk != 95853 // 'declare' 'namespace'
+ && lk != 106093 // 'declare' 'ordering'
+ && lk != 115821 // 'declare' 'revalidation'
+ && lk != 117403) // 'import' 'schema'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 109: // 'declare'
+ lookahead2W(200); // S^WS | '(:' | 'base-uri' | 'boundary-space' | 'construction' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 56429) // '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 95853: // 'declare' 'namespace'
+ whitespace();
+ parse_NamespaceDecl();
+ break;
+ case 155: // 'import'
+ whitespace();
+ parse_Import();
+ break;
+ case 73325: // 'declare' 'ft-option'
+ whitespace();
+ parse_FTOptionDecl();
+ break;
+ default:
+ whitespace();
+ parse_Setter();
+ }
+ lookahead1W(29); // S^WS | '(:' | ';'
+ whitespace();
+ parse_Separator();
+ }
+ for (;;)
+ {
+ lookahead1W(277); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 109: // 'declare'
+ lookahead2W(201); // S^WS | '#' | '%' | '(' | '(:' | 'collection' | 'context' | 'function' | 'index' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 17005 // 'declare' '%'
+ && lk != 49261 // 'declare' 'collection'
+ && lk != 52333 // 'declare' 'context'
+ && lk != 75373 // 'declare' 'function'
+ && lk != 80493 // 'declare' 'index'
+ && lk != 83565 // 'declare' 'integrity'
+ && lk != 104045 // 'declare' 'option'
+ && lk != 134765 // 'declare' 'updating'
+ && lk != 137325) // 'declare' 'variable'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 109: // 'declare'
+ lookahead2W(197); // S^WS | '%' | '(:' | 'collection' | 'context' | 'function' | 'index' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 52333: // 'declare' 'context'
+ whitespace();
+ parse_ContextItemDecl();
+ break;
+ case 104045: // 'declare' 'option'
+ whitespace();
+ parse_OptionDecl();
+ break;
+ default:
+ whitespace();
+ parse_AnnotatedDecl();
+ }
+ lookahead1W(29); // S^WS | '(:' | ';'
+ whitespace();
+ parse_Separator();
+ }
+ eventHandler.endNonterminal("Prolog", e0);
+ }
+
+ function parse_Separator()
+ {
+ eventHandler.startNonterminal("Separator", e0);
+ shift(54); // ';'
+ eventHandler.endNonterminal("Separator", e0);
+ }
+
+ function parse_Setter()
+ {
+ eventHandler.startNonterminal("Setter", e0);
+ switch (l1)
+ {
+ case 109: // 'declare'
+ lookahead2W(194); // S^WS | '(:' | 'base-uri' | 'boundary-space' | 'construction' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 56429) // '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 44141: // 'declare' 'boundary-space'
+ parse_BoundarySpaceDecl();
+ break;
+ case -2:
+ parse_DefaultCollationDecl();
+ break;
+ case 43117: // 'declare' 'base-uri'
+ parse_BaseURIDecl();
+ break;
+ case 50797: // 'declare' 'construction'
+ parse_ConstructionDecl();
+ break;
+ case 106093: // 'declare' 'ordering'
+ parse_OrderingModeDecl();
+ break;
+ case -6:
+ parse_EmptyOrderDecl();
+ break;
+ case 115821: // 'declare' 'revalidation'
+ parse_RevalidationDecl();
+ break;
+ case 53869: // 'declare' 'copy-namespaces'
+ parse_CopyNamespacesDecl();
+ break;
+ default:
+ parse_DecimalFormatDecl();
+ }
+ eventHandler.endNonterminal("Setter", e0);
+ }
+
+ function parse_BoundarySpaceDecl()
+ {
+ eventHandler.startNonterminal("BoundarySpaceDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(36); // S^WS | '(:' | 'boundary-space'
+ shift(86); // 'boundary-space'
+ lookahead1W(137); // S^WS | '(:' | 'preserve' | 'strip'
+ switch (l1)
+ {
+ case 218: // 'preserve'
+ shift(218); // 'preserve'
+ break;
+ default:
+ shift(246); // 'strip'
+ }
+ eventHandler.endNonterminal("BoundarySpaceDecl", e0);
+ }
+
+ function parse_DefaultCollationDecl()
+ {
+ eventHandler.startNonterminal("DefaultCollationDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(49); // S^WS | '(:' | 'default'
+ shift(110); // 'default'
+ lookahead1W(41); // S^WS | '(:' | 'collation'
+ shift(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("DefaultCollationDecl", e0);
+ }
+
+ function try_DefaultCollationDecl()
+ {
+ shiftT(109); // 'declare'
+ lookahead1W(49); // S^WS | '(:' | 'default'
+ shiftT(110); // 'default'
+ lookahead1W(41); // S^WS | '(:' | 'collation'
+ shiftT(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+
+ function parse_BaseURIDecl()
+ {
+ eventHandler.startNonterminal("BaseURIDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(35); // S^WS | '(:' | 'base-uri'
+ shift(84); // 'base-uri'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("BaseURIDecl", e0);
+ }
+
+ function parse_ConstructionDecl()
+ {
+ eventHandler.startNonterminal("ConstructionDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(44); // S^WS | '(:' | 'construction'
+ shift(99); // 'construction'
+ lookahead1W(137); // S^WS | '(:' | 'preserve' | 'strip'
+ switch (l1)
+ {
+ case 246: // 'strip'
+ shift(246); // 'strip'
+ break;
+ default:
+ shift(218); // 'preserve'
+ }
+ eventHandler.endNonterminal("ConstructionDecl", e0);
+ }
+
+ function parse_OrderingModeDecl()
+ {
+ eventHandler.startNonterminal("OrderingModeDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(71); // S^WS | '(:' | 'ordering'
+ shift(207); // 'ordering'
+ lookahead1W(135); // S^WS | '(:' | 'ordered' | 'unordered'
+ switch (l1)
+ {
+ case 206: // 'ordered'
+ shift(206); // 'ordered'
+ break;
+ default:
+ shift(262); // 'unordered'
+ }
+ eventHandler.endNonterminal("OrderingModeDecl", e0);
+ }
+
+ function parse_EmptyOrderDecl()
+ {
+ eventHandler.startNonterminal("EmptyOrderDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(49); // S^WS | '(:' | 'default'
+ shift(110); // 'default'
+ lookahead1W(70); // S^WS | '(:' | 'order'
+ shift(205); // 'order'
+ lookahead1W(52); // S^WS | '(:' | 'empty'
+ shift(124); // 'empty'
+ lookahead1W(125); // S^WS | '(:' | 'greatest' | 'least'
+ switch (l1)
+ {
+ case 149: // 'greatest'
+ shift(149); // 'greatest'
+ break;
+ default:
+ shift(176); // 'least'
+ }
+ eventHandler.endNonterminal("EmptyOrderDecl", e0);
+ }
+
+ function try_EmptyOrderDecl()
+ {
+ shiftT(109); // 'declare'
+ lookahead1W(49); // S^WS | '(:' | 'default'
+ shiftT(110); // 'default'
+ lookahead1W(70); // S^WS | '(:' | 'order'
+ shiftT(205); // 'order'
+ lookahead1W(52); // S^WS | '(:' | 'empty'
+ shiftT(124); // 'empty'
+ lookahead1W(125); // S^WS | '(:' | 'greatest' | 'least'
+ switch (l1)
+ {
+ case 149: // 'greatest'
+ shiftT(149); // 'greatest'
+ break;
+ default:
+ shiftT(176); // 'least'
+ }
+ }
+
+ function parse_CopyNamespacesDecl()
+ {
+ eventHandler.startNonterminal("CopyNamespacesDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(47); // S^WS | '(:' | 'copy-namespaces'
+ shift(105); // 'copy-namespaces'
+ lookahead1W(132); // S^WS | '(:' | 'no-preserve' | 'preserve'
+ whitespace();
+ parse_PreserveMode();
+ lookahead1W(25); // S^WS | '(:' | ','
+ shift(42); // ','
+ lookahead1W(127); // S^WS | '(:' | 'inherit' | 'no-inherit'
+ whitespace();
+ parse_InheritMode();
+ eventHandler.endNonterminal("CopyNamespacesDecl", e0);
+ }
+
+ function parse_PreserveMode()
+ {
+ eventHandler.startNonterminal("PreserveMode", e0);
+ switch (l1)
+ {
+ case 218: // 'preserve'
+ shift(218); // 'preserve'
+ break;
+ default:
+ shift(193); // 'no-preserve'
+ }
+ eventHandler.endNonterminal("PreserveMode", e0);
+ }
+
+ function parse_InheritMode()
+ {
+ eventHandler.startNonterminal("InheritMode", e0);
+ switch (l1)
+ {
+ case 159: // 'inherit'
+ shift(159); // 'inherit'
+ break;
+ default:
+ shift(192); // 'no-inherit'
+ }
+ eventHandler.endNonterminal("InheritMode", e0);
+ }
+
+ function parse_DecimalFormatDecl()
+ {
+ eventHandler.startNonterminal("DecimalFormatDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(118); // S^WS | '(:' | 'decimal-format' | 'default'
+ switch (l1)
+ {
+ case 107: // 'decimal-format'
+ shift(107); // 'decimal-format'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ break;
+ default:
+ shift(110); // 'default'
+ lookahead1W(48); // S^WS | '(:' | 'decimal-format'
+ shift(107); // 'decimal-format'
+ }
+ for (;;)
+ {
+ lookahead1W(203); // S^WS | '(:' | ';' | 'NaN' | 'decimal-separator' | 'digit' |
+ if (l1 == 54) // ';'
+ {
+ break;
+ }
+ whitespace();
+ parse_DFPropertyName();
+ lookahead1W(30); // S^WS | '(:' | '='
+ shift(61); // '='
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ }
+ eventHandler.endNonterminal("DecimalFormatDecl", e0);
+ }
+
+ function parse_DFPropertyName()
+ {
+ eventHandler.startNonterminal("DFPropertyName", e0);
+ switch (l1)
+ {
+ case 108: // 'decimal-separator'
+ shift(108); // 'decimal-separator'
+ break;
+ case 151: // 'grouping-separator'
+ shift(151); // 'grouping-separator'
+ break;
+ case 158: // 'infinity'
+ shift(158); // 'infinity'
+ break;
+ case 182: // 'minus-sign'
+ shift(182); // 'minus-sign'
+ break;
+ case 68: // 'NaN'
+ shift(68); // 'NaN'
+ break;
+ case 213: // 'percent'
+ shift(213); // 'percent'
+ break;
+ case 212: // 'per-mille'
+ shift(212); // 'per-mille'
+ break;
+ case 280: // 'zero-digit'
+ shift(280); // 'zero-digit'
+ break;
+ case 117: // 'digit'
+ shift(117); // 'digit'
+ break;
+ default:
+ shift(211); // 'pattern-separator'
+ }
+ eventHandler.endNonterminal("DFPropertyName", e0);
+ }
+
+ function parse_Import()
+ {
+ eventHandler.startNonterminal("Import", e0);
+ switch (l1)
+ {
+ case 155: // 'import'
+ lookahead2W(130); // S^WS | '(:' | 'module' | 'schema'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 117403: // 'import' 'schema'
+ parse_SchemaImport();
+ break;
+ default:
+ parse_ModuleImport();
+ }
+ eventHandler.endNonterminal("Import", e0);
+ }
+
+ function parse_SchemaImport()
+ {
+ eventHandler.startNonterminal("SchemaImport", e0);
+ shift(155); // 'import'
+ lookahead1W(76); // S^WS | '(:' | 'schema'
+ shift(229); // 'schema'
+ lookahead1W(141); // URILiteral | S^WS | '(:' | 'default' | 'namespace'
+ if (l1 != 7) // URILiteral
+ {
+ whitespace();
+ parse_SchemaPrefix();
+ }
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ lookahead1W(112); // S^WS | '(:' | ';' | 'at'
+ if (l1 == 82) // 'at'
+ {
+ shift(82); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ for (;;)
+ {
+ lookahead1W(107); // S^WS | '(:' | ',' | ';'
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ }
+ }
+ eventHandler.endNonterminal("SchemaImport", e0);
+ }
+
+ function parse_SchemaPrefix()
+ {
+ eventHandler.startNonterminal("SchemaPrefix", e0);
+ switch (l1)
+ {
+ case 187: // 'namespace'
+ shift(187); // 'namespace'
+ lookahead1W(239); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NCName();
+ lookahead1W(30); // S^WS | '(:' | '='
+ shift(61); // '='
+ break;
+ default:
+ shift(110); // 'default'
+ lookahead1W(50); // S^WS | '(:' | 'element'
+ shift(122); // 'element'
+ lookahead1W(64); // S^WS | '(:' | 'namespace'
+ shift(187); // 'namespace'
+ }
+ eventHandler.endNonterminal("SchemaPrefix", e0);
+ }
+
+ function parse_ModuleImport()
+ {
+ eventHandler.startNonterminal("ModuleImport", e0);
+ shift(155); // 'import'
+ lookahead1W(63); // S^WS | '(:' | 'module'
+ shift(185); // 'module'
+ lookahead1W(93); // URILiteral | S^WS | '(:' | 'namespace'
+ if (l1 == 187) // 'namespace'
+ {
+ shift(187); // 'namespace'
+ lookahead1W(239); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NCName();
+ lookahead1W(30); // S^WS | '(:' | '='
+ shift(61); // '='
+ }
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ lookahead1W(112); // S^WS | '(:' | ';' | 'at'
+ if (l1 == 82) // 'at'
+ {
+ shift(82); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ for (;;)
+ {
+ lookahead1W(107); // S^WS | '(:' | ',' | ';'
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ }
+ }
+ eventHandler.endNonterminal("ModuleImport", e0);
+ }
+
+ function parse_NamespaceDecl()
+ {
+ eventHandler.startNonterminal("NamespaceDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(64); // S^WS | '(:' | 'namespace'
+ shift(187); // 'namespace'
+ lookahead1W(239); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NCName();
+ lookahead1W(30); // S^WS | '(:' | '='
+ shift(61); // '='
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("NamespaceDecl", e0);
+ }
+
+ function parse_DefaultNamespaceDecl()
+ {
+ eventHandler.startNonterminal("DefaultNamespaceDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(49); // S^WS | '(:' | 'default'
+ shift(110); // 'default'
+ lookahead1W(119); // S^WS | '(:' | 'element' | 'function'
+ switch (l1)
+ {
+ case 122: // 'element'
+ shift(122); // 'element'
+ break;
+ default:
+ shift(147); // 'function'
+ }
+ lookahead1W(64); // S^WS | '(:' | 'namespace'
+ shift(187); // 'namespace'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("DefaultNamespaceDecl", e0);
+ }
+
+ function try_DefaultNamespaceDecl()
+ {
+ shiftT(109); // 'declare'
+ lookahead1W(49); // S^WS | '(:' | 'default'
+ shiftT(110); // 'default'
+ lookahead1W(119); // S^WS | '(:' | 'element' | 'function'
+ switch (l1)
+ {
+ case 122: // 'element'
+ shiftT(122); // 'element'
+ break;
+ default:
+ shiftT(147); // 'function'
+ }
+ lookahead1W(64); // S^WS | '(:' | 'namespace'
+ shiftT(187); // 'namespace'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+
+ function parse_FTOptionDecl()
+ {
+ eventHandler.startNonterminal("FTOptionDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(55); // S^WS | '(:' | 'ft-option'
+ shift(143); // 'ft-option'
+ lookahead1W(84); // S^WS | '(:' | 'using'
+ whitespace();
+ parse_FTMatchOptions();
+ eventHandler.endNonterminal("FTOptionDecl", e0);
+ }
+
+ function parse_AnnotatedDecl()
+ {
+ eventHandler.startNonterminal("AnnotatedDecl", e0);
+ shift(109); // 'declare'
+ for (;;)
+ {
+ lookahead1W(192); // S^WS | '%' | '(:' | 'collection' | 'function' | 'index' | 'integrity' |
+ if (l1 != 33 // '%'
+ && l1 != 263) // 'updating'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 263: // 'updating'
+ whitespace();
+ parse_CompatibilityAnnotation();
+ break;
+ default:
+ whitespace();
+ parse_Annotation();
+ }
+ }
+ switch (l1)
+ {
+ case 268: // 'variable'
+ whitespace();
+ parse_VarDecl();
+ break;
+ case 147: // 'function'
+ whitespace();
+ parse_FunctionDecl();
+ break;
+ case 96: // 'collection'
+ whitespace();
+ parse_CollectionDecl();
+ break;
+ case 157: // 'index'
+ whitespace();
+ parse_IndexDecl();
+ break;
+ default:
+ whitespace();
+ parse_ICDecl();
+ }
+ eventHandler.endNonterminal("AnnotatedDecl", e0);
+ }
+
+ function parse_CompatibilityAnnotation()
+ {
+ eventHandler.startNonterminal("CompatibilityAnnotation", e0);
+ shift(263); // 'updating'
+ eventHandler.endNonterminal("CompatibilityAnnotation", e0);
+ }
+
+ function parse_Annotation()
+ {
+ eventHandler.startNonterminal("Annotation", e0);
+ shift(33); // '%'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(193); // S^WS | '%' | '(' | '(:' | 'collection' | 'function' | 'index' | 'integrity' |
+ if (l1 == 35) // '('
+ {
+ shift(35); // '('
+ lookahead1W(190); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:' |
+ whitespace();
+ parse_Literal();
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(190); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:' |
+ whitespace();
+ parse_Literal();
+ }
+ shift(38); // ')'
+ }
+ eventHandler.endNonterminal("Annotation", e0);
+ }
+
+ function try_Annotation()
+ {
+ shiftT(33); // '%'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_EQName();
+ lookahead1W(193); // S^WS | '%' | '(' | '(:' | 'collection' | 'function' | 'index' | 'integrity' |
+ if (l1 == 35) // '('
+ {
+ shiftT(35); // '('
+ lookahead1W(190); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:' |
+ try_Literal();
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(190); // IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral | S^WS | '(:' |
+ try_Literal();
+ }
+ shiftT(38); // ')'
+ }
+ }
+
+ function parse_VarDecl()
+ {
+ eventHandler.startNonterminal("VarDecl", e0);
+ shift(268); // 'variable'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(157); // S^WS | '(:' | ':=' | 'as' | 'external'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(110); // S^WS | '(:' | ':=' | 'external'
+ switch (l1)
+ {
+ case 53: // ':='
+ shift(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_VarValue();
+ break;
+ default:
+ shift(134); // 'external'
+ lookahead1W(108); // S^WS | '(:' | ':=' | ';'
+ if (l1 == 53) // ':='
+ {
+ shift(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ 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(109); // 'declare'
+ lookahead1W(46); // S^WS | '(:' | 'context'
+ shift(102); // 'context'
+ lookahead1W(58); // S^WS | '(:' | 'item'
+ shift(167); // 'item'
+ lookahead1W(157); // S^WS | '(:' | ':=' | 'as' | 'external'
+ if (l1 == 80) // 'as'
+ {
+ shift(80); // 'as'
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_ItemType();
+ }
+ lookahead1W(110); // S^WS | '(:' | ':=' | 'external'
+ switch (l1)
+ {
+ case 53: // ':='
+ shift(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_VarValue();
+ break;
+ default:
+ shift(134); // 'external'
+ lookahead1W(108); // S^WS | '(:' | ':=' | ';'
+ if (l1 == 53) // ':='
+ {
+ shift(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_VarDefaultValue();
+ }
+ }
+ eventHandler.endNonterminal("ContextItemDecl", e0);
+ }
+
+ function parse_ParamList()
+ {
+ eventHandler.startNonterminal("ParamList", e0);
+ parse_Param();
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_Param();
+ }
+ eventHandler.endNonterminal("ParamList", e0);
+ }
+
+ function try_ParamList()
+ {
+ try_Param();
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_Param();
+ }
+ }
+
+ function parse_Param()
+ {
+ eventHandler.startNonterminal("Param", e0);
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(153); // S^WS | '(:' | ')' | ',' | 'as'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ eventHandler.endNonterminal("Param", e0);
+ }
+
+ function try_Param()
+ {
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_EQName();
+ lookahead1W(153); // S^WS | '(:' | ')' | ',' | 'as'
+ if (l1 == 80) // '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(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("EnclosedExpr", e0);
+ }
+
+ function try_EnclosedExpr()
+ {
+ shiftT(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ }
+
+ function parse_OptionDecl()
+ {
+ eventHandler.startNonterminal("OptionDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(69); // S^WS | '(:' | 'option'
+ shift(203); // 'option'
+ lookahead1W(245); // 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 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ eventHandler.endNonterminal("Expr", e0);
+ }
+
+ function try_Expr()
+ {
+ try_ExprSingle();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ }
+
+ function parse_FLWORExpr()
+ {
+ eventHandler.startNonterminal("FLWORExpr", e0);
+ parse_InitialClause();
+ for (;;)
+ {
+ lookahead1W(195); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' |
+ if (l1 == 224) // 'return'
+ {
+ break;
+ }
+ whitespace();
+ parse_IntermediateClause();
+ }
+ whitespace();
+ parse_ReturnClause();
+ eventHandler.endNonterminal("FLWORExpr", e0);
+ }
+
+ function try_FLWORExpr()
+ {
+ try_InitialClause();
+ for (;;)
+ {
+ lookahead1W(195); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' |
+ if (l1 == 224) // 'return'
+ {
+ break;
+ }
+ try_IntermediateClause();
+ }
+ try_ReturnClause();
+ }
+
+ function parse_InitialClause()
+ {
+ eventHandler.startNonterminal("InitialClause", e0);
+ switch (l1)
+ {
+ case 139: // 'for'
+ lookahead2W(151); // S^WS | '$' | '(:' | 'sliding' | 'tumbling'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16011: // 'for' '$'
+ parse_ForClause();
+ break;
+ case 177: // 'let'
+ parse_LetClause();
+ break;
+ default:
+ parse_WindowClause();
+ }
+ eventHandler.endNonterminal("InitialClause", e0);
+ }
+
+ function try_InitialClause()
+ {
+ switch (l1)
+ {
+ case 139: // 'for'
+ lookahead2W(151); // S^WS | '$' | '(:' | 'sliding' | 'tumbling'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16011: // 'for' '$'
+ try_ForClause();
+ break;
+ case 177: // 'let'
+ try_LetClause();
+ break;
+ default:
+ try_WindowClause();
+ }
+ }
+
+ function parse_IntermediateClause()
+ {
+ eventHandler.startNonterminal("IntermediateClause", e0);
+ switch (l1)
+ {
+ case 139: // 'for'
+ case 177: // 'let'
+ parse_InitialClause();
+ break;
+ case 272: // 'where'
+ parse_WhereClause();
+ break;
+ case 150: // 'group'
+ parse_GroupByClause();
+ break;
+ case 106: // 'count'
+ parse_CountClause();
+ break;
+ default:
+ parse_OrderByClause();
+ }
+ eventHandler.endNonterminal("IntermediateClause", e0);
+ }
+
+ function try_IntermediateClause()
+ {
+ switch (l1)
+ {
+ case 139: // 'for'
+ case 177: // 'let'
+ try_InitialClause();
+ break;
+ case 272: // 'where'
+ try_WhereClause();
+ break;
+ case 150: // 'group'
+ try_GroupByClause();
+ break;
+ case 106: // 'count'
+ try_CountClause();
+ break;
+ default:
+ try_OrderByClause();
+ }
+ }
+
+ function parse_ForClause()
+ {
+ eventHandler.startNonterminal("ForClause", e0);
+ shift(139); // 'for'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_ForBinding();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_ForBinding();
+ }
+ eventHandler.endNonterminal("ForClause", e0);
+ }
+
+ function try_ForClause()
+ {
+ shiftT(139); // 'for'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_ForBinding();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_ForBinding();
+ }
+ }
+
+ function parse_ForBinding()
+ {
+ eventHandler.startNonterminal("ForBinding", e0);
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(182); // S^WS | '(:' | 'allowing' | 'as' | 'at' | 'in' | 'score'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(173); // S^WS | '(:' | 'allowing' | 'at' | 'in' | 'score'
+ if (l1 == 73) // 'allowing'
+ {
+ whitespace();
+ parse_AllowingEmpty();
+ }
+ lookahead1W(160); // S^WS | '(:' | 'at' | 'in' | 'score'
+ if (l1 == 82) // 'at'
+ {
+ whitespace();
+ parse_PositionalVar();
+ }
+ lookahead1W(126); // S^WS | '(:' | 'in' | 'score'
+ if (l1 == 232) // 'score'
+ {
+ whitespace();
+ parse_FTScoreVar();
+ }
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shift(156); // 'in'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ForBinding", e0);
+ }
+
+ function try_ForBinding()
+ {
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(182); // S^WS | '(:' | 'allowing' | 'as' | 'at' | 'in' | 'score'
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(173); // S^WS | '(:' | 'allowing' | 'at' | 'in' | 'score'
+ if (l1 == 73) // 'allowing'
+ {
+ try_AllowingEmpty();
+ }
+ lookahead1W(160); // S^WS | '(:' | 'at' | 'in' | 'score'
+ if (l1 == 82) // 'at'
+ {
+ try_PositionalVar();
+ }
+ lookahead1W(126); // S^WS | '(:' | 'in' | 'score'
+ if (l1 == 232) // 'score'
+ {
+ try_FTScoreVar();
+ }
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shiftT(156); // 'in'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_AllowingEmpty()
+ {
+ eventHandler.startNonterminal("AllowingEmpty", e0);
+ shift(73); // 'allowing'
+ lookahead1W(52); // S^WS | '(:' | 'empty'
+ shift(124); // 'empty'
+ eventHandler.endNonterminal("AllowingEmpty", e0);
+ }
+
+ function try_AllowingEmpty()
+ {
+ shiftT(73); // 'allowing'
+ lookahead1W(52); // S^WS | '(:' | 'empty'
+ shiftT(124); // 'empty'
+ }
+
+ function parse_PositionalVar()
+ {
+ eventHandler.startNonterminal("PositionalVar", e0);
+ shift(82); // 'at'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("PositionalVar", e0);
+ }
+
+ function try_PositionalVar()
+ {
+ shiftT(82); // 'at'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+
+ function parse_FTScoreVar()
+ {
+ eventHandler.startNonterminal("FTScoreVar", e0);
+ shift(232); // 'score'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("FTScoreVar", e0);
+ }
+
+ function try_FTScoreVar()
+ {
+ shiftT(232); // 'score'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+
+ function parse_LetClause()
+ {
+ eventHandler.startNonterminal("LetClause", e0);
+ shift(177); // 'let'
+ lookahead1W(100); // S^WS | '$' | '(:' | 'score'
+ whitespace();
+ parse_LetBinding();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(100); // S^WS | '$' | '(:' | 'score'
+ whitespace();
+ parse_LetBinding();
+ }
+ eventHandler.endNonterminal("LetClause", e0);
+ }
+
+ function try_LetClause()
+ {
+ shiftT(177); // 'let'
+ lookahead1W(100); // S^WS | '$' | '(:' | 'score'
+ try_LetBinding();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(100); // S^WS | '$' | '(:' | 'score'
+ try_LetBinding();
+ }
+ }
+
+ function parse_LetBinding()
+ {
+ eventHandler.startNonterminal("LetBinding", e0);
+ switch (l1)
+ {
+ case 31: // '$'
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(109); // S^WS | '(:' | ':=' | 'as'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ break;
+ default:
+ parse_FTScoreVar();
+ }
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shift(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("LetBinding", e0);
+ }
+
+ function try_LetBinding()
+ {
+ switch (l1)
+ {
+ case 31: // '$'
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(109); // S^WS | '(:' | ':=' | 'as'
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ break;
+ default:
+ try_FTScoreVar();
+ }
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shiftT(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_WindowClause()
+ {
+ eventHandler.startNonterminal("WindowClause", e0);
+ shift(139); // 'for'
+ lookahead1W(139); // S^WS | '(:' | 'sliding' | 'tumbling'
+ switch (l1)
+ {
+ case 257: // 'tumbling'
+ whitespace();
+ parse_TumblingWindowClause();
+ break;
+ default:
+ whitespace();
+ parse_SlidingWindowClause();
+ }
+ eventHandler.endNonterminal("WindowClause", e0);
+ }
+
+ function try_WindowClause()
+ {
+ shiftT(139); // 'for'
+ lookahead1W(139); // S^WS | '(:' | 'sliding' | 'tumbling'
+ switch (l1)
+ {
+ case 257: // 'tumbling'
+ try_TumblingWindowClause();
+ break;
+ default:
+ try_SlidingWindowClause();
+ }
+ }
+
+ function parse_TumblingWindowClause()
+ {
+ eventHandler.startNonterminal("TumblingWindowClause", e0);
+ shift(257); // 'tumbling'
+ lookahead1W(88); // S^WS | '(:' | 'window'
+ shift(275); // 'window'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(114); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shift(156); // 'in'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ whitespace();
+ parse_WindowStartCondition();
+ if (l1 == 127 // 'end'
+ || l1 == 202) // 'only'
+ {
+ whitespace();
+ parse_WindowEndCondition();
+ }
+ eventHandler.endNonterminal("TumblingWindowClause", e0);
+ }
+
+ function try_TumblingWindowClause()
+ {
+ shiftT(257); // 'tumbling'
+ lookahead1W(88); // S^WS | '(:' | 'window'
+ shiftT(275); // 'window'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(114); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shiftT(156); // 'in'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ try_WindowStartCondition();
+ if (l1 == 127 // 'end'
+ || l1 == 202) // 'only'
+ {
+ try_WindowEndCondition();
+ }
+ }
+
+ function parse_SlidingWindowClause()
+ {
+ eventHandler.startNonterminal("SlidingWindowClause", e0);
+ shift(239); // 'sliding'
+ lookahead1W(88); // S^WS | '(:' | 'window'
+ shift(275); // 'window'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(114); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shift(156); // 'in'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ whitespace();
+ parse_WindowStartCondition();
+ whitespace();
+ parse_WindowEndCondition();
+ eventHandler.endNonterminal("SlidingWindowClause", e0);
+ }
+
+ function try_SlidingWindowClause()
+ {
+ shiftT(239); // 'sliding'
+ lookahead1W(88); // S^WS | '(:' | 'window'
+ shiftT(275); // 'window'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(114); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shiftT(156); // 'in'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ try_WindowStartCondition();
+ try_WindowEndCondition();
+ }
+
+ function parse_WindowStartCondition()
+ {
+ eventHandler.startNonterminal("WindowStartCondition", e0);
+ shift(242); // 'start'
+ lookahead1W(181); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when'
+ whitespace();
+ parse_WindowVars();
+ lookahead1W(86); // S^WS | '(:' | 'when'
+ shift(271); // 'when'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("WindowStartCondition", e0);
+ }
+
+ function try_WindowStartCondition()
+ {
+ shiftT(242); // 'start'
+ lookahead1W(181); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when'
+ try_WindowVars();
+ lookahead1W(86); // S^WS | '(:' | 'when'
+ shiftT(271); // 'when'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_WindowEndCondition()
+ {
+ eventHandler.startNonterminal("WindowEndCondition", e0);
+ if (l1 == 202) // 'only'
+ {
+ shift(202); // 'only'
+ }
+ lookahead1W(53); // S^WS | '(:' | 'end'
+ shift(127); // 'end'
+ lookahead1W(181); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when'
+ whitespace();
+ parse_WindowVars();
+ lookahead1W(86); // S^WS | '(:' | 'when'
+ shift(271); // 'when'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("WindowEndCondition", e0);
+ }
+
+ function try_WindowEndCondition()
+ {
+ if (l1 == 202) // 'only'
+ {
+ shiftT(202); // 'only'
+ }
+ lookahead1W(53); // S^WS | '(:' | 'end'
+ shiftT(127); // 'end'
+ lookahead1W(181); // S^WS | '$' | '(:' | 'at' | 'next' | 'previous' | 'when'
+ try_WindowVars();
+ lookahead1W(86); // S^WS | '(:' | 'when'
+ shiftT(271); // 'when'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_WindowVars()
+ {
+ eventHandler.startNonterminal("WindowVars", e0);
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_CurrentItem();
+ }
+ lookahead1W(174); // S^WS | '(:' | 'at' | 'next' | 'previous' | 'when'
+ if (l1 == 82) // 'at'
+ {
+ whitespace();
+ parse_PositionalVar();
+ }
+ lookahead1W(163); // S^WS | '(:' | 'next' | 'previous' | 'when'
+ if (l1 == 219) // 'previous'
+ {
+ shift(219); // 'previous'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_PreviousItem();
+ }
+ lookahead1W(131); // S^WS | '(:' | 'next' | 'when'
+ if (l1 == 190) // 'next'
+ {
+ shift(190); // 'next'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NextItem();
+ }
+ eventHandler.endNonterminal("WindowVars", e0);
+ }
+
+ function try_WindowVars()
+ {
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_CurrentItem();
+ }
+ lookahead1W(174); // S^WS | '(:' | 'at' | 'next' | 'previous' | 'when'
+ if (l1 == 82) // 'at'
+ {
+ try_PositionalVar();
+ }
+ lookahead1W(163); // S^WS | '(:' | 'next' | 'previous' | 'when'
+ if (l1 == 219) // 'previous'
+ {
+ shiftT(219); // 'previous'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_PreviousItem();
+ }
+ lookahead1W(131); // S^WS | '(:' | 'next' | 'when'
+ if (l1 == 190) // 'next'
+ {
+ shiftT(190); // 'next'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(245); // 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(106); // 'count'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("CountClause", e0);
+ }
+
+ function try_CountClause()
+ {
+ shiftT(106); // 'count'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+
+ function parse_WhereClause()
+ {
+ eventHandler.startNonterminal("WhereClause", e0);
+ shift(272); // 'where'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("WhereClause", e0);
+ }
+
+ function try_WhereClause()
+ {
+ shiftT(272); // 'where'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_GroupByClause()
+ {
+ eventHandler.startNonterminal("GroupByClause", e0);
+ shift(150); // 'group'
+ lookahead1W(37); // S^WS | '(:' | 'by'
+ shift(88); // 'by'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_GroupingSpecList();
+ eventHandler.endNonterminal("GroupByClause", e0);
+ }
+
+ function try_GroupByClause()
+ {
+ shiftT(150); // 'group'
+ lookahead1W(37); // S^WS | '(:' | 'by'
+ shiftT(88); // 'by'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_GroupingSpecList();
+ }
+
+ function parse_GroupingSpecList()
+ {
+ eventHandler.startNonterminal("GroupingSpecList", e0);
+ parse_GroupingSpec();
+ for (;;)
+ {
+ lookahead1W(198); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' |
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_GroupingSpec();
+ }
+ eventHandler.endNonterminal("GroupingSpecList", e0);
+ }
+
+ function try_GroupingSpecList()
+ {
+ try_GroupingSpec();
+ for (;;)
+ {
+ lookahead1W(198); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' |
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_GroupingSpec();
+ }
+ }
+
+ function parse_GroupingSpec()
+ {
+ eventHandler.startNonterminal("GroupingSpec", e0);
+ switch (l1)
+ {
+ case 31: // '$'
+ lookahead2W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 3103 // '$' EQName^Token
+ || lk == 36383 // '$' 'after'
+ || lk == 37407 // '$' 'allowing'
+ || lk == 37919 // '$' 'ancestor'
+ || lk == 38431 // '$' 'ancestor-or-self'
+ || lk == 38943 // '$' 'and'
+ || lk == 39967 // '$' 'append'
+ || lk == 40479 // '$' 'array'
+ || lk == 40991 // '$' 'as'
+ || lk == 41503 // '$' 'ascending'
+ || lk == 42015 // '$' 'at'
+ || lk == 42527 // '$' 'attribute'
+ || lk == 43039 // '$' 'base-uri'
+ || lk == 43551 // '$' 'before'
+ || lk == 44063 // '$' 'boundary-space'
+ || lk == 44575 // '$' 'break'
+ || lk == 45599 // '$' 'case'
+ || lk == 46111 // '$' 'cast'
+ || lk == 46623 // '$' 'castable'
+ || lk == 47135 // '$' 'catch'
+ || lk == 48159 // '$' 'child'
+ || lk == 48671 // '$' 'collation'
+ || lk == 49695 // '$' 'comment'
+ || lk == 50207 // '$' 'constraint'
+ || lk == 50719 // '$' 'construction'
+ || lk == 52255 // '$' 'context'
+ || lk == 52767 // '$' 'continue'
+ || lk == 53279 // '$' 'copy'
+ || lk == 53791 // '$' 'copy-namespaces'
+ || lk == 54303 // '$' 'count'
+ || lk == 54815 // '$' 'decimal-format'
+ || lk == 55839 // '$' 'declare'
+ || lk == 56351 // '$' 'default'
+ || lk == 56863 // '$' 'delete'
+ || lk == 57375 // '$' 'descendant'
+ || lk == 57887 // '$' 'descendant-or-self'
+ || lk == 58399 // '$' 'descending'
+ || lk == 60959 // '$' 'div'
+ || lk == 61471 // '$' 'document'
+ || lk == 61983 // '$' 'document-node'
+ || lk == 62495 // '$' 'element'
+ || lk == 63007 // '$' 'else'
+ || lk == 63519 // '$' 'empty'
+ || lk == 64031 // '$' 'empty-sequence'
+ || lk == 64543 // '$' 'encoding'
+ || lk == 65055 // '$' 'end'
+ || lk == 66079 // '$' 'eq'
+ || lk == 66591 // '$' 'every'
+ || lk == 67615 // '$' 'except'
+ || lk == 68127 // '$' 'exit'
+ || lk == 68639 // '$' 'external'
+ || lk == 69151 // '$' 'false'
+ || lk == 69663 // '$' 'first'
+ || lk == 70175 // '$' 'following'
+ || lk == 70687 // '$' 'following-sibling'
+ || lk == 71199 // '$' 'for'
+ || lk == 72735 // '$' 'from'
+ || lk == 73247 // '$' 'ft-option'
+ || lk == 75295 // '$' 'function'
+ || lk == 75807 // '$' 'ge'
+ || lk == 76831 // '$' 'group'
+ || lk == 77855 // '$' 'gt'
+ || lk == 78367 // '$' 'idiv'
+ || lk == 78879 // '$' 'if'
+ || lk == 79391 // '$' 'import'
+ || lk == 79903 // '$' 'in'
+ || lk == 80415 // '$' 'index'
+ || lk == 82463 // '$' 'insert'
+ || lk == 82975 // '$' 'instance'
+ || lk == 83487 // '$' 'integrity'
+ || lk == 83999 // '$' 'intersect'
+ || lk == 84511 // '$' 'into'
+ || lk == 85023 // '$' 'is'
+ || lk == 85535 // '$' 'item'
+ || lk == 86047 // '$' 'json'
+ || lk == 86559 // '$' 'json-item'
+ || lk == 87071 // '$' 'jsoniq'
+ || lk == 88607 // '$' 'last'
+ || lk == 89119 // '$' 'lax'
+ || lk == 89631 // '$' 'le'
+ || lk == 90655 // '$' 'let'
+ || lk == 91679 // '$' 'loop'
+ || lk == 92703 // '$' 'lt'
+ || lk == 93727 // '$' 'mod'
+ || lk == 94239 // '$' 'modify'
+ || lk == 94751 // '$' 'module'
+ || lk == 95775 // '$' 'namespace'
+ || lk == 96287 // '$' 'namespace-node'
+ || lk == 96799 // '$' 'ne'
+ || lk == 99359 // '$' 'node'
+ || lk == 99871 // '$' 'nodes'
+ || lk == 100895 // '$' 'null'
+ || lk == 101407 // '$' 'object'
+ || lk == 103455 // '$' 'only'
+ || lk == 103967 // '$' 'option'
+ || lk == 104479 // '$' 'or'
+ || lk == 104991 // '$' 'order'
+ || lk == 105503 // '$' 'ordered'
+ || lk == 106015 // '$' 'ordering'
+ || lk == 107551 // '$' 'parent'
+ || lk == 110623 // '$' 'preceding'
+ || lk == 111135 // '$' 'preceding-sibling'
+ || lk == 112671 // '$' 'processing-instruction'
+ || lk == 113695 // '$' 'rename'
+ || lk == 114207 // '$' 'replace'
+ || lk == 114719 // '$' 'return'
+ || lk == 115231 // '$' 'returning'
+ || lk == 115743 // '$' 'revalidation'
+ || lk == 116767 // '$' 'satisfies'
+ || lk == 117279 // '$' 'schema'
+ || lk == 117791 // '$' 'schema-attribute'
+ || lk == 118303 // '$' 'schema-element'
+ || lk == 118815 // '$' 'score'
+ || lk == 119327 // '$' 'select'
+ || lk == 119839 // '$' 'self'
+ || lk == 122399 // '$' 'sliding'
+ || lk == 122911 // '$' 'some'
+ || lk == 123423 // '$' 'stable'
+ || lk == 123935 // '$' 'start'
+ || lk == 125471 // '$' 'strict'
+ || lk == 126495 // '$' 'structured-item'
+ || lk == 127007 // '$' 'switch'
+ || lk == 127519 // '$' 'text'
+ || lk == 129567 // '$' 'to'
+ || lk == 130079 // '$' 'treat'
+ || lk == 130591 // '$' 'true'
+ || lk == 131103 // '$' 'try'
+ || lk == 131615 // '$' 'tumbling'
+ || lk == 132127 // '$' 'type'
+ || lk == 132639 // '$' 'typeswitch'
+ || lk == 133151 // '$' 'union'
+ || lk == 134175 // '$' 'unordered'
+ || lk == 134687 // '$' 'updating'
+ || lk == 136223 // '$' 'validate'
+ || lk == 136735 // '$' 'value'
+ || lk == 137247 // '$' 'variable'
+ || lk == 137759 // '$' 'version'
+ || lk == 139295 // '$' 'where'
+ || lk == 139807 // '$' 'while'
+ || lk == 141343) // '$' 'with'
+ {
+ 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
+ {
+ try_GroupingVariable();
+ lookahead1W(205); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
+ if (l1 == 53 // ':='
+ || l1 == 80) // 'as'
+ {
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shiftT(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ if (l1 == 95) // 'collation'
+ {
+ shiftT(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+ 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);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ parse_GroupingVariable();
+ lookahead1W(205); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
+ if (l1 == 53 // ':='
+ || l1 == 80) // 'as'
+ {
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shift(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ if (l1 == 95) // 'collation'
+ {
+ shift(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ }
+ break;
+ default:
+ parse_ExprSingle();
+ }
+ eventHandler.endNonterminal("GroupingSpec", e0);
+ }
+
+ function try_GroupingSpec()
+ {
+ switch (l1)
+ {
+ case 31: // '$'
+ lookahead2W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 3103 // '$' EQName^Token
+ || lk == 36383 // '$' 'after'
+ || lk == 37407 // '$' 'allowing'
+ || lk == 37919 // '$' 'ancestor'
+ || lk == 38431 // '$' 'ancestor-or-self'
+ || lk == 38943 // '$' 'and'
+ || lk == 39967 // '$' 'append'
+ || lk == 40479 // '$' 'array'
+ || lk == 40991 // '$' 'as'
+ || lk == 41503 // '$' 'ascending'
+ || lk == 42015 // '$' 'at'
+ || lk == 42527 // '$' 'attribute'
+ || lk == 43039 // '$' 'base-uri'
+ || lk == 43551 // '$' 'before'
+ || lk == 44063 // '$' 'boundary-space'
+ || lk == 44575 // '$' 'break'
+ || lk == 45599 // '$' 'case'
+ || lk == 46111 // '$' 'cast'
+ || lk == 46623 // '$' 'castable'
+ || lk == 47135 // '$' 'catch'
+ || lk == 48159 // '$' 'child'
+ || lk == 48671 // '$' 'collation'
+ || lk == 49695 // '$' 'comment'
+ || lk == 50207 // '$' 'constraint'
+ || lk == 50719 // '$' 'construction'
+ || lk == 52255 // '$' 'context'
+ || lk == 52767 // '$' 'continue'
+ || lk == 53279 // '$' 'copy'
+ || lk == 53791 // '$' 'copy-namespaces'
+ || lk == 54303 // '$' 'count'
+ || lk == 54815 // '$' 'decimal-format'
+ || lk == 55839 // '$' 'declare'
+ || lk == 56351 // '$' 'default'
+ || lk == 56863 // '$' 'delete'
+ || lk == 57375 // '$' 'descendant'
+ || lk == 57887 // '$' 'descendant-or-self'
+ || lk == 58399 // '$' 'descending'
+ || lk == 60959 // '$' 'div'
+ || lk == 61471 // '$' 'document'
+ || lk == 61983 // '$' 'document-node'
+ || lk == 62495 // '$' 'element'
+ || lk == 63007 // '$' 'else'
+ || lk == 63519 // '$' 'empty'
+ || lk == 64031 // '$' 'empty-sequence'
+ || lk == 64543 // '$' 'encoding'
+ || lk == 65055 // '$' 'end'
+ || lk == 66079 // '$' 'eq'
+ || lk == 66591 // '$' 'every'
+ || lk == 67615 // '$' 'except'
+ || lk == 68127 // '$' 'exit'
+ || lk == 68639 // '$' 'external'
+ || lk == 69151 // '$' 'false'
+ || lk == 69663 // '$' 'first'
+ || lk == 70175 // '$' 'following'
+ || lk == 70687 // '$' 'following-sibling'
+ || lk == 71199 // '$' 'for'
+ || lk == 72735 // '$' 'from'
+ || lk == 73247 // '$' 'ft-option'
+ || lk == 75295 // '$' 'function'
+ || lk == 75807 // '$' 'ge'
+ || lk == 76831 // '$' 'group'
+ || lk == 77855 // '$' 'gt'
+ || lk == 78367 // '$' 'idiv'
+ || lk == 78879 // '$' 'if'
+ || lk == 79391 // '$' 'import'
+ || lk == 79903 // '$' 'in'
+ || lk == 80415 // '$' 'index'
+ || lk == 82463 // '$' 'insert'
+ || lk == 82975 // '$' 'instance'
+ || lk == 83487 // '$' 'integrity'
+ || lk == 83999 // '$' 'intersect'
+ || lk == 84511 // '$' 'into'
+ || lk == 85023 // '$' 'is'
+ || lk == 85535 // '$' 'item'
+ || lk == 86047 // '$' 'json'
+ || lk == 86559 // '$' 'json-item'
+ || lk == 87071 // '$' 'jsoniq'
+ || lk == 88607 // '$' 'last'
+ || lk == 89119 // '$' 'lax'
+ || lk == 89631 // '$' 'le'
+ || lk == 90655 // '$' 'let'
+ || lk == 91679 // '$' 'loop'
+ || lk == 92703 // '$' 'lt'
+ || lk == 93727 // '$' 'mod'
+ || lk == 94239 // '$' 'modify'
+ || lk == 94751 // '$' 'module'
+ || lk == 95775 // '$' 'namespace'
+ || lk == 96287 // '$' 'namespace-node'
+ || lk == 96799 // '$' 'ne'
+ || lk == 99359 // '$' 'node'
+ || lk == 99871 // '$' 'nodes'
+ || lk == 100895 // '$' 'null'
+ || lk == 101407 // '$' 'object'
+ || lk == 103455 // '$' 'only'
+ || lk == 103967 // '$' 'option'
+ || lk == 104479 // '$' 'or'
+ || lk == 104991 // '$' 'order'
+ || lk == 105503 // '$' 'ordered'
+ || lk == 106015 // '$' 'ordering'
+ || lk == 107551 // '$' 'parent'
+ || lk == 110623 // '$' 'preceding'
+ || lk == 111135 // '$' 'preceding-sibling'
+ || lk == 112671 // '$' 'processing-instruction'
+ || lk == 113695 // '$' 'rename'
+ || lk == 114207 // '$' 'replace'
+ || lk == 114719 // '$' 'return'
+ || lk == 115231 // '$' 'returning'
+ || lk == 115743 // '$' 'revalidation'
+ || lk == 116767 // '$' 'satisfies'
+ || lk == 117279 // '$' 'schema'
+ || lk == 117791 // '$' 'schema-attribute'
+ || lk == 118303 // '$' 'schema-element'
+ || lk == 118815 // '$' 'score'
+ || lk == 119327 // '$' 'select'
+ || lk == 119839 // '$' 'self'
+ || lk == 122399 // '$' 'sliding'
+ || lk == 122911 // '$' 'some'
+ || lk == 123423 // '$' 'stable'
+ || lk == 123935 // '$' 'start'
+ || lk == 125471 // '$' 'strict'
+ || lk == 126495 // '$' 'structured-item'
+ || lk == 127007 // '$' 'switch'
+ || lk == 127519 // '$' 'text'
+ || lk == 129567 // '$' 'to'
+ || lk == 130079 // '$' 'treat'
+ || lk == 130591 // '$' 'true'
+ || lk == 131103 // '$' 'try'
+ || lk == 131615 // '$' 'tumbling'
+ || lk == 132127 // '$' 'type'
+ || lk == 132639 // '$' 'typeswitch'
+ || lk == 133151 // '$' 'union'
+ || lk == 134175 // '$' 'unordered'
+ || lk == 134687 // '$' 'updating'
+ || lk == 136223 // '$' 'validate'
+ || lk == 136735 // '$' 'value'
+ || lk == 137247 // '$' 'variable'
+ || lk == 137759 // '$' 'version'
+ || lk == 139295 // '$' 'where'
+ || lk == 139807 // '$' 'while'
+ || lk == 141343) // '$' 'with'
+ {
+ 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
+ {
+ try_GroupingVariable();
+ lookahead1W(205); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
+ if (l1 == 53 // ':='
+ || l1 == 80) // 'as'
+ {
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shiftT(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ if (l1 == 95) // 'collation'
+ {
+ shiftT(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+ memoize(2, e0A, -1);
+ lk = -3;
+ }
+ 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, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ try_GroupingVariable();
+ lookahead1W(205); // S^WS | '(:' | ',' | ':=' | 'as' | 'collation' | 'count' | 'for' | 'group' |
+ if (l1 == 53 // ':='
+ || l1 == 80) // 'as'
+ {
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shiftT(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ if (l1 == 95) // 'collation'
+ {
+ shiftT(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+ break;
+ case -3:
+ break;
+ default:
+ try_ExprSingle();
+ }
+ }
+
+ function parse_GroupingVariable()
+ {
+ eventHandler.startNonterminal("GroupingVariable", e0);
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("GroupingVariable", e0);
+ }
+
+ function try_GroupingVariable()
+ {
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+
+ function parse_OrderByClause()
+ {
+ eventHandler.startNonterminal("OrderByClause", e0);
+ switch (l1)
+ {
+ case 205: // 'order'
+ shift(205); // 'order'
+ lookahead1W(37); // S^WS | '(:' | 'by'
+ shift(88); // 'by'
+ break;
+ default:
+ shift(241); // 'stable'
+ lookahead1W(70); // S^WS | '(:' | 'order'
+ shift(205); // 'order'
+ lookahead1W(37); // S^WS | '(:' | 'by'
+ shift(88); // 'by'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_OrderSpecList();
+ eventHandler.endNonterminal("OrderByClause", e0);
+ }
+
+ function try_OrderByClause()
+ {
+ switch (l1)
+ {
+ case 205: // 'order'
+ shiftT(205); // 'order'
+ lookahead1W(37); // S^WS | '(:' | 'by'
+ shiftT(88); // 'by'
+ break;
+ default:
+ shiftT(241); // 'stable'
+ lookahead1W(70); // S^WS | '(:' | 'order'
+ shiftT(205); // 'order'
+ lookahead1W(37); // S^WS | '(:' | 'by'
+ shiftT(88); // 'by'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_OrderSpecList();
+ }
+
+ function parse_OrderSpecList()
+ {
+ eventHandler.startNonterminal("OrderSpecList", e0);
+ parse_OrderSpec();
+ for (;;)
+ {
+ lookahead1W(198); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' |
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_OrderSpec();
+ }
+ eventHandler.endNonterminal("OrderSpecList", e0);
+ }
+
+ function try_OrderSpecList()
+ {
+ try_OrderSpec();
+ for (;;)
+ {
+ lookahead1W(198); // S^WS | '(:' | ',' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' |
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ 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 == 81 // 'ascending'
+ || l1 == 114) // 'descending'
+ {
+ switch (l1)
+ {
+ case 81: // 'ascending'
+ shift(81); // 'ascending'
+ break;
+ default:
+ shift(114); // 'descending'
+ }
+ }
+ lookahead1W(202); // S^WS | '(:' | ',' | 'collation' | 'count' | 'empty' | 'for' | 'group' | 'let' |
+ if (l1 == 124) // 'empty'
+ {
+ shift(124); // 'empty'
+ lookahead1W(125); // S^WS | '(:' | 'greatest' | 'least'
+ switch (l1)
+ {
+ case 149: // 'greatest'
+ shift(149); // 'greatest'
+ break;
+ default:
+ shift(176); // 'least'
+ }
+ }
+ lookahead1W(199); // S^WS | '(:' | ',' | 'collation' | 'count' | 'for' | 'group' | 'let' | 'order' |
+ if (l1 == 95) // 'collation'
+ {
+ shift(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ }
+ eventHandler.endNonterminal("OrderModifier", e0);
+ }
+
+ function try_OrderModifier()
+ {
+ if (l1 == 81 // 'ascending'
+ || l1 == 114) // 'descending'
+ {
+ switch (l1)
+ {
+ case 81: // 'ascending'
+ shiftT(81); // 'ascending'
+ break;
+ default:
+ shiftT(114); // 'descending'
+ }
+ }
+ lookahead1W(202); // S^WS | '(:' | ',' | 'collation' | 'count' | 'empty' | 'for' | 'group' | 'let' |
+ if (l1 == 124) // 'empty'
+ {
+ shiftT(124); // 'empty'
+ lookahead1W(125); // S^WS | '(:' | 'greatest' | 'least'
+ switch (l1)
+ {
+ case 149: // 'greatest'
+ shiftT(149); // 'greatest'
+ break;
+ default:
+ shiftT(176); // 'least'
+ }
+ }
+ lookahead1W(199); // S^WS | '(:' | ',' | 'collation' | 'count' | 'for' | 'group' | 'let' | 'order' |
+ if (l1 == 95) // 'collation'
+ {
+ shiftT(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ }
+ }
+
+ function parse_ReturnClause()
+ {
+ eventHandler.startNonterminal("ReturnClause", e0);
+ shift(224); // 'return'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ReturnClause", e0);
+ }
+
+ function try_ReturnClause()
+ {
+ shiftT(224); // 'return'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_QuantifiedExpr()
+ {
+ eventHandler.startNonterminal("QuantifiedExpr", e0);
+ switch (l1)
+ {
+ case 240: // 'some'
+ shift(240); // 'some'
+ break;
+ default:
+ shift(130); // 'every'
+ }
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_QuantifiedVarDecl();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_QuantifiedVarDecl();
+ }
+ shift(228); // 'satisfies'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("QuantifiedExpr", e0);
+ }
+
+ function try_QuantifiedExpr()
+ {
+ switch (l1)
+ {
+ case 240: // 'some'
+ shiftT(240); // 'some'
+ break;
+ default:
+ shiftT(130); // 'every'
+ }
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_QuantifiedVarDecl();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_QuantifiedVarDecl();
+ }
+ shiftT(228); // 'satisfies'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_QuantifiedVarDecl()
+ {
+ eventHandler.startNonterminal("QuantifiedVarDecl", e0);
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(114); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shift(156); // 'in'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("QuantifiedVarDecl", e0);
+ }
+
+ function try_QuantifiedVarDecl()
+ {
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(114); // S^WS | '(:' | 'as' | 'in'
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shiftT(156); // 'in'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_SwitchExpr()
+ {
+ eventHandler.startNonterminal("SwitchExpr", e0);
+ shift(248); // 'switch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(38); // ')'
+ for (;;)
+ {
+ lookahead1W(38); // S^WS | '(:' | 'case'
+ whitespace();
+ parse_SwitchCaseClause();
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shift(110); // 'default'
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shift(224); // 'return'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("SwitchExpr", e0);
+ }
+
+ function try_SwitchExpr()
+ {
+ shiftT(248); // 'switch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(38); // ')'
+ for (;;)
+ {
+ lookahead1W(38); // S^WS | '(:' | 'case'
+ try_SwitchCaseClause();
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(110); // 'default'
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shiftT(224); // 'return'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_SwitchCaseClause()
+ {
+ eventHandler.startNonterminal("SwitchCaseClause", e0);
+ for (;;)
+ {
+ shift(89); // 'case'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_SwitchCaseOperand();
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shift(224); // 'return'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("SwitchCaseClause", e0);
+ }
+
+ function try_SwitchCaseClause()
+ {
+ for (;;)
+ {
+ shiftT(89); // 'case'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_SwitchCaseOperand();
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(224); // 'return'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ 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(259); // 'typeswitch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(38); // ')'
+ for (;;)
+ {
+ lookahead1W(38); // S^WS | '(:' | 'case'
+ whitespace();
+ parse_CaseClause();
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shift(110); // 'default'
+ lookahead1W(99); // S^WS | '$' | '(:' | 'return'
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ }
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shift(224); // 'return'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("TypeswitchExpr", e0);
+ }
+
+ function try_TypeswitchExpr()
+ {
+ shiftT(259); // 'typeswitch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(38); // ')'
+ for (;;)
+ {
+ lookahead1W(38); // S^WS | '(:' | 'case'
+ try_CaseClause();
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(110); // 'default'
+ lookahead1W(99); // S^WS | '$' | '(:' | 'return'
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shiftT(224); // 'return'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_CaseClause()
+ {
+ eventHandler.startNonterminal("CaseClause", e0);
+ shift(89); // 'case'
+ lookahead1W(257); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shift(80); // 'as'
+ }
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceTypeUnion();
+ shift(224); // 'return'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("CaseClause", e0);
+ }
+
+ function try_CaseClause()
+ {
+ shiftT(89); // 'case'
+ lookahead1W(257); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shiftT(80); // 'as'
+ }
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceTypeUnion();
+ shiftT(224); // 'return'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_SequenceTypeUnion()
+ {
+ eventHandler.startNonterminal("SequenceTypeUnion", e0);
+ parse_SequenceType();
+ for (;;)
+ {
+ lookahead1W(138); // S^WS | '(:' | 'return' | '|'
+ if (l1 != 284) // '|'
+ {
+ break;
+ }
+ shift(284); // '|'
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ }
+ eventHandler.endNonterminal("SequenceTypeUnion", e0);
+ }
+
+ function try_SequenceTypeUnion()
+ {
+ try_SequenceType();
+ for (;;)
+ {
+ lookahead1W(138); // S^WS | '(:' | 'return' | '|'
+ if (l1 != 284) // '|'
+ {
+ break;
+ }
+ shiftT(284); // '|'
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+ }
+
+ function parse_IfExpr()
+ {
+ eventHandler.startNonterminal("IfExpr", e0);
+ shift(154); // 'if'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(38); // ')'
+ lookahead1W(80); // S^WS | '(:' | 'then'
+ shift(250); // 'then'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(123); // 'else'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("IfExpr", e0);
+ }
+
+ function try_IfExpr()
+ {
+ shiftT(154); // 'if'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(38); // ')'
+ lookahead1W(80); // S^WS | '(:' | 'then'
+ shiftT(250); // 'then'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ shiftT(123); // 'else'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_TryCatchExpr()
+ {
+ eventHandler.startNonterminal("TryCatchExpr", e0);
+ parse_TryClause();
+ for (;;)
+ {
+ lookahead1W(39); // S^WS | '(:' | 'catch'
+ whitespace();
+ parse_CatchClause();
+ lookahead1W(207); // S^WS | EOF | '(:' | ')' | ',' | ':' | ';' | ']' | 'after' | 'as' | 'ascending' |
+ if (l1 != 92) // 'catch'
+ {
+ break;
+ }
+ }
+ eventHandler.endNonterminal("TryCatchExpr", e0);
+ }
+
+ function try_TryCatchExpr()
+ {
+ try_TryClause();
+ for (;;)
+ {
+ lookahead1W(39); // S^WS | '(:' | 'catch'
+ try_CatchClause();
+ lookahead1W(207); // S^WS | EOF | '(:' | ')' | ',' | ':' | ';' | ']' | 'after' | 'as' | 'ascending' |
+ if (l1 != 92) // 'catch'
+ {
+ break;
+ }
+ }
+ }
+
+ function parse_TryClause()
+ {
+ eventHandler.startNonterminal("TryClause", e0);
+ shift(256); // 'try'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shift(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_TryTargetExpr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("TryClause", e0);
+ }
+
+ function try_TryClause()
+ {
+ shiftT(256); // 'try'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shiftT(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_TryTargetExpr();
+ shiftT(287); // '}'
+ }
+
+ 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(92); // 'catch'
+ lookahead1W(248); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_CatchErrorList();
+ shift(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("CatchClause", e0);
+ }
+
+ function try_CatchClause()
+ {
+ shiftT(92); // 'catch'
+ lookahead1W(248); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_CatchErrorList();
+ shiftT(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ }
+
+ function parse_CatchErrorList()
+ {
+ eventHandler.startNonterminal("CatchErrorList", e0);
+ parse_NameTest();
+ for (;;)
+ {
+ lookahead1W(140); // S^WS | '(:' | '{' | '|'
+ if (l1 != 284) // '|'
+ {
+ break;
+ }
+ shift(284); // '|'
+ lookahead1W(248); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NameTest();
+ }
+ eventHandler.endNonterminal("CatchErrorList", e0);
+ }
+
+ function try_CatchErrorList()
+ {
+ try_NameTest();
+ for (;;)
+ {
+ lookahead1W(140); // S^WS | '(:' | '{' | '|'
+ if (l1 != 284) // '|'
+ {
+ break;
+ }
+ shiftT(284); // '|'
+ lookahead1W(248); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_NameTest();
+ }
+ }
+
+ function parse_OrExpr()
+ {
+ eventHandler.startNonterminal("OrExpr", e0);
+ parse_AndExpr();
+ for (;;)
+ {
+ if (l1 != 204) // 'or'
+ {
+ break;
+ }
+ shift(204); // 'or'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_AndExpr();
+ }
+ eventHandler.endNonterminal("OrExpr", e0);
+ }
+
+ function try_OrExpr()
+ {
+ try_AndExpr();
+ for (;;)
+ {
+ if (l1 != 204) // 'or'
+ {
+ break;
+ }
+ shiftT(204); // 'or'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_AndExpr();
+ }
+ }
+
+ function parse_AndExpr()
+ {
+ eventHandler.startNonterminal("AndExpr", e0);
+ parse_NotExpr();
+ for (;;)
+ {
+ if (l1 != 76) // 'and'
+ {
+ break;
+ }
+ shift(76); // 'and'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_NotExpr();
+ }
+ eventHandler.endNonterminal("AndExpr", e0);
+ }
+
+ function try_AndExpr()
+ {
+ try_NotExpr();
+ for (;;)
+ {
+ if (l1 != 76) // 'and'
+ {
+ break;
+ }
+ shiftT(76); // 'and'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_NotExpr();
+ }
+ }
+
+ function parse_NotExpr()
+ {
+ eventHandler.startNonterminal("NotExpr", e0);
+ if (l1 == 196) // 'not'
+ {
+ shift(196); // 'not'
+ }
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ComparisonExpr();
+ eventHandler.endNonterminal("NotExpr", e0);
+ }
+
+ function try_NotExpr()
+ {
+ if (l1 == 196) // 'not'
+ {
+ shiftT(196); // 'not'
+ }
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ComparisonExpr();
+ }
+
+ function parse_ComparisonExpr()
+ {
+ eventHandler.startNonterminal("ComparisonExpr", e0);
+ parse_FTContainsExpr();
+ if (l1 == 27 // '!='
+ || l1 == 55 // '<'
+ || l1 == 58 // '<<'
+ || l1 == 59 // '<='
+ || l1 == 61 // '='
+ || l1 == 62 // '>'
+ || l1 == 63 // '>='
+ || l1 == 64 // '>>'
+ || l1 == 129 // 'eq'
+ || l1 == 148 // 'ge'
+ || l1 == 152 // 'gt'
+ || l1 == 166 // 'is'
+ || l1 == 175 // 'le'
+ || l1 == 181 // 'lt'
+ || l1 == 189) // 'ne'
+ {
+ switch (l1)
+ {
+ case 129: // 'eq'
+ case 148: // 'ge'
+ case 152: // 'gt'
+ case 175: // 'le'
+ case 181: // 'lt'
+ case 189: // 'ne'
+ whitespace();
+ parse_ValueComp();
+ break;
+ case 58: // '<<'
+ case 64: // '>>'
+ case 166: // 'is'
+ whitespace();
+ parse_NodeComp();
+ break;
+ default:
+ whitespace();
+ parse_GeneralComp();
+ }
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_FTContainsExpr();
+ }
+ eventHandler.endNonterminal("ComparisonExpr", e0);
+ }
+
+ function try_ComparisonExpr()
+ {
+ try_FTContainsExpr();
+ if (l1 == 27 // '!='
+ || l1 == 55 // '<'
+ || l1 == 58 // '<<'
+ || l1 == 59 // '<='
+ || l1 == 61 // '='
+ || l1 == 62 // '>'
+ || l1 == 63 // '>='
+ || l1 == 64 // '>>'
+ || l1 == 129 // 'eq'
+ || l1 == 148 // 'ge'
+ || l1 == 152 // 'gt'
+ || l1 == 166 // 'is'
+ || l1 == 175 // 'le'
+ || l1 == 181 // 'lt'
+ || l1 == 189) // 'ne'
+ {
+ switch (l1)
+ {
+ case 129: // 'eq'
+ case 148: // 'ge'
+ case 152: // 'gt'
+ case 175: // 'le'
+ case 181: // 'lt'
+ case 189: // 'ne'
+ try_ValueComp();
+ break;
+ case 58: // '<<'
+ case 64: // '>>'
+ case 166: // 'is'
+ try_NodeComp();
+ break;
+ default:
+ try_GeneralComp();
+ }
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_FTContainsExpr();
+ }
+ }
+
+ function parse_FTContainsExpr()
+ {
+ eventHandler.startNonterminal("FTContainsExpr", e0);
+ parse_StringConcatExpr();
+ if (l1 == 100) // 'contains'
+ {
+ shift(100); // 'contains'
+ lookahead1W(79); // S^WS | '(:' | 'text'
+ shift(249); // 'text'
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTSelection();
+ if (l1 == 277) // 'without'
+ {
+ whitespace();
+ parse_FTIgnoreOption();
+ }
+ }
+ eventHandler.endNonterminal("FTContainsExpr", e0);
+ }
+
+ function try_FTContainsExpr()
+ {
+ try_StringConcatExpr();
+ if (l1 == 100) // 'contains'
+ {
+ shiftT(100); // 'contains'
+ lookahead1W(79); // S^WS | '(:' | 'text'
+ shiftT(249); // 'text'
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTSelection();
+ if (l1 == 277) // 'without'
+ {
+ try_FTIgnoreOption();
+ }
+ }
+ }
+
+ function parse_StringConcatExpr()
+ {
+ eventHandler.startNonterminal("StringConcatExpr", e0);
+ parse_RangeExpr();
+ for (;;)
+ {
+ if (l1 != 285) // '||'
+ {
+ break;
+ }
+ shift(285); // '||'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_RangeExpr();
+ }
+ eventHandler.endNonterminal("StringConcatExpr", e0);
+ }
+
+ function try_StringConcatExpr()
+ {
+ try_RangeExpr();
+ for (;;)
+ {
+ if (l1 != 285) // '||'
+ {
+ break;
+ }
+ shiftT(285); // '||'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_RangeExpr();
+ }
+ }
+
+ function parse_RangeExpr()
+ {
+ eventHandler.startNonterminal("RangeExpr", e0);
+ parse_AdditiveExpr();
+ if (l1 == 253) // 'to'
+ {
+ shift(253); // 'to'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ }
+ eventHandler.endNonterminal("RangeExpr", e0);
+ }
+
+ function try_RangeExpr()
+ {
+ try_AdditiveExpr();
+ if (l1 == 253) // 'to'
+ {
+ shiftT(253); // 'to'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_AdditiveExpr();
+ }
+ }
+
+ function parse_AdditiveExpr()
+ {
+ eventHandler.startNonterminal("AdditiveExpr", e0);
+ parse_MultiplicativeExpr();
+ for (;;)
+ {
+ if (l1 != 41 // '+'
+ && l1 != 43) // '-'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 41: // '+'
+ shift(41); // '+'
+ break;
+ default:
+ shift(43); // '-'
+ }
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_MultiplicativeExpr();
+ }
+ eventHandler.endNonterminal("AdditiveExpr", e0);
+ }
+
+ function try_AdditiveExpr()
+ {
+ try_MultiplicativeExpr();
+ for (;;)
+ {
+ if (l1 != 41 // '+'
+ && l1 != 43) // '-'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 41: // '+'
+ shiftT(41); // '+'
+ break;
+ default:
+ shiftT(43); // '-'
+ }
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_MultiplicativeExpr();
+ }
+ }
+
+ function parse_MultiplicativeExpr()
+ {
+ eventHandler.startNonterminal("MultiplicativeExpr", e0);
+ parse_UnionExpr();
+ for (;;)
+ {
+ if (l1 != 39 // '*'
+ && l1 != 119 // 'div'
+ && l1 != 153 // 'idiv'
+ && l1 != 183) // 'mod'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 39: // '*'
+ shift(39); // '*'
+ break;
+ case 119: // 'div'
+ shift(119); // 'div'
+ break;
+ case 153: // 'idiv'
+ shift(153); // 'idiv'
+ break;
+ default:
+ shift(183); // 'mod'
+ }
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_UnionExpr();
+ }
+ eventHandler.endNonterminal("MultiplicativeExpr", e0);
+ }
+
+ function try_MultiplicativeExpr()
+ {
+ try_UnionExpr();
+ for (;;)
+ {
+ if (l1 != 39 // '*'
+ && l1 != 119 // 'div'
+ && l1 != 153 // 'idiv'
+ && l1 != 183) // 'mod'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 39: // '*'
+ shiftT(39); // '*'
+ break;
+ case 119: // 'div'
+ shiftT(119); // 'div'
+ break;
+ case 153: // 'idiv'
+ shiftT(153); // 'idiv'
+ break;
+ default:
+ shiftT(183); // 'mod'
+ }
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_UnionExpr();
+ }
+ }
+
+ function parse_UnionExpr()
+ {
+ eventHandler.startNonterminal("UnionExpr", e0);
+ parse_IntersectExceptExpr();
+ for (;;)
+ {
+ if (l1 != 260 // 'union'
+ && l1 != 284) // '|'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 260: // 'union'
+ shift(260); // 'union'
+ break;
+ default:
+ shift(284); // '|'
+ }
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_IntersectExceptExpr();
+ }
+ eventHandler.endNonterminal("UnionExpr", e0);
+ }
+
+ function try_UnionExpr()
+ {
+ try_IntersectExceptExpr();
+ for (;;)
+ {
+ if (l1 != 260 // 'union'
+ && l1 != 284) // '|'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 260: // 'union'
+ shiftT(260); // 'union'
+ break;
+ default:
+ shiftT(284); // '|'
+ }
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_IntersectExceptExpr();
+ }
+ }
+
+ function parse_IntersectExceptExpr()
+ {
+ eventHandler.startNonterminal("IntersectExceptExpr", e0);
+ parse_InstanceofExpr();
+ for (;;)
+ {
+ lookahead1W(221); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 != 132 // 'except'
+ && l1 != 164) // 'intersect'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 164: // 'intersect'
+ shift(164); // 'intersect'
+ break;
+ default:
+ shift(132); // 'except'
+ }
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_InstanceofExpr();
+ }
+ eventHandler.endNonterminal("IntersectExceptExpr", e0);
+ }
+
+ function try_IntersectExceptExpr()
+ {
+ try_InstanceofExpr();
+ for (;;)
+ {
+ lookahead1W(221); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 != 132 // 'except'
+ && l1 != 164) // 'intersect'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 164: // 'intersect'
+ shiftT(164); // 'intersect'
+ break;
+ default:
+ shiftT(132); // 'except'
+ }
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_InstanceofExpr();
+ }
+ }
+
+ function parse_InstanceofExpr()
+ {
+ eventHandler.startNonterminal("InstanceofExpr", e0);
+ parse_TreatExpr();
+ lookahead1W(222); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 162) // 'instance'
+ {
+ shift(162); // 'instance'
+ lookahead1W(67); // S^WS | '(:' | 'of'
+ shift(200); // 'of'
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ }
+ eventHandler.endNonterminal("InstanceofExpr", e0);
+ }
+
+ function try_InstanceofExpr()
+ {
+ try_TreatExpr();
+ lookahead1W(222); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 162) // 'instance'
+ {
+ shiftT(162); // 'instance'
+ lookahead1W(67); // S^WS | '(:' | 'of'
+ shiftT(200); // 'of'
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+ }
+
+ function parse_TreatExpr()
+ {
+ eventHandler.startNonterminal("TreatExpr", e0);
+ parse_CastableExpr();
+ lookahead1W(223); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 254) // 'treat'
+ {
+ shift(254); // 'treat'
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shift(80); // 'as'
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ }
+ eventHandler.endNonterminal("TreatExpr", e0);
+ }
+
+ function try_TreatExpr()
+ {
+ try_CastableExpr();
+ lookahead1W(223); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 254) // 'treat'
+ {
+ shiftT(254); // 'treat'
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shiftT(80); // 'as'
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+ }
+
+ function parse_CastableExpr()
+ {
+ eventHandler.startNonterminal("CastableExpr", e0);
+ parse_CastExpr();
+ lookahead1W(224); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 91) // 'castable'
+ {
+ shift(91); // 'castable'
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shift(80); // 'as'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SingleType();
+ }
+ eventHandler.endNonterminal("CastableExpr", e0);
+ }
+
+ function try_CastableExpr()
+ {
+ try_CastExpr();
+ lookahead1W(224); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 91) // 'castable'
+ {
+ shiftT(91); // 'castable'
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shiftT(80); // 'as'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SingleType();
+ }
+ }
+
+ function parse_CastExpr()
+ {
+ eventHandler.startNonterminal("CastExpr", e0);
+ parse_UnaryExpr();
+ lookahead1W(226); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 90) // 'cast'
+ {
+ shift(90); // 'cast'
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shift(80); // 'as'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SingleType();
+ }
+ eventHandler.endNonterminal("CastExpr", e0);
+ }
+
+ function try_CastExpr()
+ {
+ try_UnaryExpr();
+ lookahead1W(226); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 90) // 'cast'
+ {
+ shiftT(90); // 'cast'
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shiftT(80); // 'as'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SingleType();
+ }
+ }
+
+ function parse_UnaryExpr()
+ {
+ eventHandler.startNonterminal("UnaryExpr", e0);
+ for (;;)
+ {
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 41 // '+'
+ && l1 != 43) // '-'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 43: // '-'
+ shift(43); // '-'
+ break;
+ default:
+ shift(41); // '+'
+ }
+ }
+ whitespace();
+ parse_ValueExpr();
+ eventHandler.endNonterminal("UnaryExpr", e0);
+ }
+
+ function try_UnaryExpr()
+ {
+ for (;;)
+ {
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 41 // '+'
+ && l1 != 43) // '-'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 43: // '-'
+ shiftT(43); // '-'
+ break;
+ default:
+ shiftT(41); // '+'
+ }
+ }
+ try_ValueExpr();
+ }
+
+ function parse_ValueExpr()
+ {
+ eventHandler.startNonterminal("ValueExpr", e0);
+ switch (l1)
+ {
+ case 266: // 'validate'
+ lookahead2W(188); // S^WS | '#' | '(' | '(:' | 'lax' | 'strict' | 'type' | '{'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 89354: // 'validate' 'lax'
+ case 125706: // 'validate' 'strict'
+ case 132362: // 'validate' 'type'
+ case 144138: // 'validate' '{'
+ parse_ValidateExpr();
+ break;
+ case 36: // '(#'
+ parse_ExtensionExpr();
+ break;
+ default:
+ parse_SimpleMapExpr();
+ }
+ eventHandler.endNonterminal("ValueExpr", e0);
+ }
+
+ function try_ValueExpr()
+ {
+ switch (l1)
+ {
+ case 266: // 'validate'
+ lookahead2W(188); // S^WS | '#' | '(' | '(:' | 'lax' | 'strict' | 'type' | '{'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 89354: // 'validate' 'lax'
+ case 125706: // 'validate' 'strict'
+ case 132362: // 'validate' 'type'
+ case 144138: // 'validate' '{'
+ try_ValidateExpr();
+ break;
+ case 36: // '(#'
+ try_ExtensionExpr();
+ break;
+ default:
+ try_SimpleMapExpr();
+ }
+ }
+
+ function parse_SimpleMapExpr()
+ {
+ eventHandler.startNonterminal("SimpleMapExpr", e0);
+ parse_PathExpr();
+ for (;;)
+ {
+ if (l1 != 26) // '!'
+ {
+ break;
+ }
+ shift(26); // '!'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PathExpr();
+ }
+ eventHandler.endNonterminal("SimpleMapExpr", e0);
+ }
+
+ function try_SimpleMapExpr()
+ {
+ try_PathExpr();
+ for (;;)
+ {
+ if (l1 != 26) // '!'
+ {
+ break;
+ }
+ shiftT(26); // '!'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PathExpr();
+ }
+ }
+
+ function parse_GeneralComp()
+ {
+ eventHandler.startNonterminal("GeneralComp", e0);
+ switch (l1)
+ {
+ case 61: // '='
+ shift(61); // '='
+ break;
+ case 27: // '!='
+ shift(27); // '!='
+ break;
+ case 55: // '<'
+ shift(55); // '<'
+ break;
+ case 59: // '<='
+ shift(59); // '<='
+ break;
+ case 62: // '>'
+ shift(62); // '>'
+ break;
+ default:
+ shift(63); // '>='
+ }
+ eventHandler.endNonterminal("GeneralComp", e0);
+ }
+
+ function try_GeneralComp()
+ {
+ switch (l1)
+ {
+ case 61: // '='
+ shiftT(61); // '='
+ break;
+ case 27: // '!='
+ shiftT(27); // '!='
+ break;
+ case 55: // '<'
+ shiftT(55); // '<'
+ break;
+ case 59: // '<='
+ shiftT(59); // '<='
+ break;
+ case 62: // '>'
+ shiftT(62); // '>'
+ break;
+ default:
+ shiftT(63); // '>='
+ }
+ }
+
+ function parse_ValueComp()
+ {
+ eventHandler.startNonterminal("ValueComp", e0);
+ switch (l1)
+ {
+ case 129: // 'eq'
+ shift(129); // 'eq'
+ break;
+ case 189: // 'ne'
+ shift(189); // 'ne'
+ break;
+ case 181: // 'lt'
+ shift(181); // 'lt'
+ break;
+ case 175: // 'le'
+ shift(175); // 'le'
+ break;
+ case 152: // 'gt'
+ shift(152); // 'gt'
+ break;
+ default:
+ shift(148); // 'ge'
+ }
+ eventHandler.endNonterminal("ValueComp", e0);
+ }
+
+ function try_ValueComp()
+ {
+ switch (l1)
+ {
+ case 129: // 'eq'
+ shiftT(129); // 'eq'
+ break;
+ case 189: // 'ne'
+ shiftT(189); // 'ne'
+ break;
+ case 181: // 'lt'
+ shiftT(181); // 'lt'
+ break;
+ case 175: // 'le'
+ shiftT(175); // 'le'
+ break;
+ case 152: // 'gt'
+ shiftT(152); // 'gt'
+ break;
+ default:
+ shiftT(148); // 'ge'
+ }
+ }
+
+ function parse_NodeComp()
+ {
+ eventHandler.startNonterminal("NodeComp", e0);
+ switch (l1)
+ {
+ case 166: // 'is'
+ shift(166); // 'is'
+ break;
+ case 58: // '<<'
+ shift(58); // '<<'
+ break;
+ default:
+ shift(64); // '>>'
+ }
+ eventHandler.endNonterminal("NodeComp", e0);
+ }
+
+ function try_NodeComp()
+ {
+ switch (l1)
+ {
+ case 166: // 'is'
+ shiftT(166); // 'is'
+ break;
+ case 58: // '<<'
+ shiftT(58); // '<<'
+ break;
+ default:
+ shiftT(64); // '>>'
+ }
+ }
+
+ function parse_ValidateExpr()
+ {
+ eventHandler.startNonterminal("ValidateExpr", e0);
+ shift(266); // 'validate'
+ lookahead1W(175); // S^WS | '(:' | 'lax' | 'strict' | 'type' | '{'
+ if (l1 != 281) // '{'
+ {
+ switch (l1)
+ {
+ case 258: // 'type'
+ shift(258); // 'type'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_TypeName();
+ break;
+ default:
+ whitespace();
+ parse_ValidationMode();
+ }
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shift(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("ValidateExpr", e0);
+ }
+
+ function try_ValidateExpr()
+ {
+ shiftT(266); // 'validate'
+ lookahead1W(175); // S^WS | '(:' | 'lax' | 'strict' | 'type' | '{'
+ if (l1 != 281) // '{'
+ {
+ switch (l1)
+ {
+ case 258: // 'type'
+ shiftT(258); // 'type'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_TypeName();
+ break;
+ default:
+ try_ValidationMode();
+ }
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shiftT(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ }
+
+ function parse_ValidationMode()
+ {
+ eventHandler.startNonterminal("ValidationMode", e0);
+ switch (l1)
+ {
+ case 174: // 'lax'
+ shift(174); // 'lax'
+ break;
+ default:
+ shift(245); // 'strict'
+ }
+ eventHandler.endNonterminal("ValidationMode", e0);
+ }
+
+ function try_ValidationMode()
+ {
+ switch (l1)
+ {
+ case 174: // 'lax'
+ shiftT(174); // 'lax'
+ break;
+ default:
+ shiftT(245); // 'strict'
+ }
+ }
+
+ function parse_ExtensionExpr()
+ {
+ eventHandler.startNonterminal("ExtensionExpr", e0);
+ for (;;)
+ {
+ whitespace();
+ parse_Pragma();
+ lookahead1W(104); // S^WS | '(#' | '(:' | '{'
+ if (l1 != 36) // '(#'
+ {
+ break;
+ }
+ }
+ shift(281); // '{'
+ lookahead1W(274); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 287) // '}'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(287); // '}'
+ eventHandler.endNonterminal("ExtensionExpr", e0);
+ }
+
+ function try_ExtensionExpr()
+ {
+ for (;;)
+ {
+ try_Pragma();
+ lookahead1W(104); // S^WS | '(#' | '(:' | '{'
+ if (l1 != 36) // '(#'
+ {
+ break;
+ }
+ }
+ shiftT(281); // '{'
+ lookahead1W(274); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 287) // '}'
+ {
+ try_Expr();
+ }
+ shiftT(287); // '}'
+ }
+
+ function parse_Pragma()
+ {
+ eventHandler.startNonterminal("Pragma", e0);
+ shift(36); // '(#'
+ lookahead1(242); // 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(36); // '(#'
+ lookahead1(242); // 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 47: // '/'
+ shift(47); // '/'
+ lookahead1W(288); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 25: // EOF
+ case 26: // '!'
+ case 27: // '!='
+ case 38: // ')'
+ case 39: // '*'
+ case 41: // '+'
+ case 42: // ','
+ case 43: // '-'
+ case 50: // ':'
+ case 54: // ';'
+ case 58: // '<<'
+ case 59: // '<='
+ case 61: // '='
+ case 62: // '>'
+ case 63: // '>='
+ case 64: // '>>'
+ case 70: // ']'
+ case 88: // 'by'
+ case 100: // 'contains'
+ case 209: // 'paragraphs'
+ case 237: // 'sentences'
+ case 252: // 'times'
+ case 279: // 'words'
+ case 284: // '|'
+ case 285: // '||'
+ case 286: // '|}'
+ case 287: // '}'
+ break;
+ default:
+ whitespace();
+ parse_RelativePathExpr();
+ }
+ break;
+ case 48: // '//'
+ shift(48); // '//'
+ lookahead1W(259); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_RelativePathExpr();
+ break;
+ default:
+ parse_RelativePathExpr();
+ }
+ eventHandler.endNonterminal("PathExpr", e0);
+ }
+
+ function try_PathExpr()
+ {
+ switch (l1)
+ {
+ case 47: // '/'
+ shiftT(47); // '/'
+ lookahead1W(288); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 25: // EOF
+ case 26: // '!'
+ case 27: // '!='
+ case 38: // ')'
+ case 39: // '*'
+ case 41: // '+'
+ case 42: // ','
+ case 43: // '-'
+ case 50: // ':'
+ case 54: // ';'
+ case 58: // '<<'
+ case 59: // '<='
+ case 61: // '='
+ case 62: // '>'
+ case 63: // '>='
+ case 64: // '>>'
+ case 70: // ']'
+ case 88: // 'by'
+ case 100: // 'contains'
+ case 209: // 'paragraphs'
+ case 237: // 'sentences'
+ case 252: // 'times'
+ case 279: // 'words'
+ case 284: // '|'
+ case 285: // '||'
+ case 286: // '|}'
+ case 287: // '}'
+ break;
+ default:
+ try_RelativePathExpr();
+ }
+ break;
+ case 48: // '//'
+ shiftT(48); // '//'
+ lookahead1W(259); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_RelativePathExpr();
+ break;
+ default:
+ try_RelativePathExpr();
+ }
+ }
+
+ function parse_RelativePathExpr()
+ {
+ eventHandler.startNonterminal("RelativePathExpr", e0);
+ parse_PostfixExpr();
+ for (;;)
+ {
+ switch (l1)
+ {
+ case 26: // '!'
+ lookahead2W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 27 // '!='
+ && lk != 38 // ')'
+ && lk != 39 // '*'
+ && lk != 41 // '+'
+ && lk != 42 // ','
+ && lk != 43 // '-'
+ && lk != 47 // '/'
+ && lk != 48 // '//'
+ && lk != 50 // ':'
+ && lk != 54 // ';'
+ && lk != 55 // '<'
+ && lk != 58 // '<<'
+ && lk != 59 // '<='
+ && lk != 61 // '='
+ && lk != 62 // '>'
+ && lk != 63 // '>='
+ && lk != 64 // '>>'
+ && lk != 70 // ']'
+ && lk != 71 // 'after'
+ && lk != 76 // 'and'
+ && lk != 80 // 'as'
+ && lk != 81 // 'ascending'
+ && lk != 82 // 'at'
+ && lk != 85 // 'before'
+ && lk != 88 // 'by'
+ && lk != 89 // 'case'
+ && lk != 90 // 'cast'
+ && lk != 91 // 'castable'
+ && lk != 95 // 'collation'
+ && lk != 100 // 'contains'
+ && lk != 106 // 'count'
+ && lk != 110 // 'default'
+ && lk != 114 // 'descending'
+ && lk != 119 // 'div'
+ && lk != 123 // 'else'
+ && lk != 124 // 'empty'
+ && lk != 127 // 'end'
+ && lk != 129 // 'eq'
+ && lk != 132 // 'except'
+ && lk != 139 // 'for'
+ && lk != 148 // 'ge'
+ && lk != 150 // 'group'
+ && lk != 152 // 'gt'
+ && lk != 153 // 'idiv'
+ && lk != 162 // 'instance'
+ && lk != 164 // 'intersect'
+ && lk != 165 // 'into'
+ && lk != 166 // 'is'
+ && lk != 175 // 'le'
+ && lk != 177 // 'let'
+ && lk != 181 // 'lt'
+ && lk != 183 // 'mod'
+ && lk != 184 // 'modify'
+ && lk != 189 // 'ne'
+ && lk != 202 // 'only'
+ && lk != 204 // 'or'
+ && lk != 205 // 'order'
+ && lk != 209 // 'paragraphs'
+ && lk != 224 // 'return'
+ && lk != 228 // 'satisfies'
+ && lk != 237 // 'sentences'
+ && lk != 241 // 'stable'
+ && lk != 242 // 'start'
+ && lk != 252 // 'times'
+ && lk != 253 // 'to'
+ && lk != 254 // 'treat'
+ && lk != 260 // 'union'
+ && lk != 272 // 'where'
+ && lk != 276 // 'with'
+ && lk != 279 // 'words'
+ && lk != 284 // '|'
+ && lk != 285 // '||'
+ && lk != 286 // '|}'
+ && lk != 287 // '}'
+ && lk != 2586 // '!' Wildcard
+ && lk != 23578 // '!' '..'
+ && lk != 24090 // '!' '/'
+ && lk != 24602 // '!' '//'
+ && lk != 34330) // '!' '@'
+ {
+ 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
+ {
+ switch (l1)
+ {
+ case 47: // '/'
+ shiftT(47); // '/'
+ break;
+ case 48: // '//'
+ shiftT(48); // '//'
+ 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(3, e0, lk);
+ }
+ }
+ if (lk != -1
+ && lk != 47 // '/'
+ && lk != 48 // '//'
+ && lk != 2586 // '!' Wildcard
+ && lk != 23578 // '!' '..'
+ && lk != 34330) // '!' '@'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 47: // '/'
+ shift(47); // '/'
+ break;
+ case 48: // '//'
+ shift(48); // '//'
+ break;
+ default:
+ shift(26); // '!'
+ }
+ lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_StepExpr();
+ }
+ eventHandler.endNonterminal("RelativePathExpr", e0);
+ }
+
+ function try_RelativePathExpr()
+ {
+ try_PostfixExpr();
+ for (;;)
+ {
+ switch (l1)
+ {
+ case 26: // '!'
+ lookahead2W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 27 // '!='
+ && lk != 38 // ')'
+ && lk != 39 // '*'
+ && lk != 41 // '+'
+ && lk != 42 // ','
+ && lk != 43 // '-'
+ && lk != 47 // '/'
+ && lk != 48 // '//'
+ && lk != 50 // ':'
+ && lk != 54 // ';'
+ && lk != 55 // '<'
+ && lk != 58 // '<<'
+ && lk != 59 // '<='
+ && lk != 61 // '='
+ && lk != 62 // '>'
+ && lk != 63 // '>='
+ && lk != 64 // '>>'
+ && lk != 70 // ']'
+ && lk != 71 // 'after'
+ && lk != 76 // 'and'
+ && lk != 80 // 'as'
+ && lk != 81 // 'ascending'
+ && lk != 82 // 'at'
+ && lk != 85 // 'before'
+ && lk != 88 // 'by'
+ && lk != 89 // 'case'
+ && lk != 90 // 'cast'
+ && lk != 91 // 'castable'
+ && lk != 95 // 'collation'
+ && lk != 100 // 'contains'
+ && lk != 106 // 'count'
+ && lk != 110 // 'default'
+ && lk != 114 // 'descending'
+ && lk != 119 // 'div'
+ && lk != 123 // 'else'
+ && lk != 124 // 'empty'
+ && lk != 127 // 'end'
+ && lk != 129 // 'eq'
+ && lk != 132 // 'except'
+ && lk != 139 // 'for'
+ && lk != 148 // 'ge'
+ && lk != 150 // 'group'
+ && lk != 152 // 'gt'
+ && lk != 153 // 'idiv'
+ && lk != 162 // 'instance'
+ && lk != 164 // 'intersect'
+ && lk != 165 // 'into'
+ && lk != 166 // 'is'
+ && lk != 175 // 'le'
+ && lk != 177 // 'let'
+ && lk != 181 // 'lt'
+ && lk != 183 // 'mod'
+ && lk != 184 // 'modify'
+ && lk != 189 // 'ne'
+ && lk != 202 // 'only'
+ && lk != 204 // 'or'
+ && lk != 205 // 'order'
+ && lk != 209 // 'paragraphs'
+ && lk != 224 // 'return'
+ && lk != 228 // 'satisfies'
+ && lk != 237 // 'sentences'
+ && lk != 241 // 'stable'
+ && lk != 242 // 'start'
+ && lk != 252 // 'times'
+ && lk != 253 // 'to'
+ && lk != 254 // 'treat'
+ && lk != 260 // 'union'
+ && lk != 272 // 'where'
+ && lk != 276 // 'with'
+ && lk != 279 // 'words'
+ && lk != 284 // '|'
+ && lk != 285 // '||'
+ && lk != 286 // '|}'
+ && lk != 287 // '}'
+ && lk != 2586 // '!' Wildcard
+ && lk != 23578 // '!' '..'
+ && lk != 24090 // '!' '/'
+ && lk != 24602 // '!' '//'
+ && lk != 34330) // '!' '@'
+ {
+ 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
+ {
+ switch (l1)
+ {
+ case 47: // '/'
+ shiftT(47); // '/'
+ break;
+ case 48: // '//'
+ shiftT(48); // '//'
+ break;
+ default:
+ shiftT(26); // '!'
+ }
+ lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_StepExpr();
+ memoize(3, e0A, -1);
+ continue;
+ }
+ catch (p1A)
+ {
+ 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, e0A, -2);
+ break;
+ }
+ }
+ }
+ if (lk != -1
+ && lk != 47 // '/'
+ && lk != 48 // '//'
+ && lk != 2586 // '!' Wildcard
+ && lk != 23578 // '!' '..'
+ && lk != 34330) // '!' '@'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 47: // '/'
+ shiftT(47); // '/'
+ break;
+ case 48: // '//'
+ shiftT(48); // '//'
+ break;
+ default:
+ shiftT(26); // '!'
+ }
+ lookahead1W(263); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_StepExpr();
+ }
+ }
+
+ function parse_StepExpr()
+ {
+ eventHandler.startNonterminal("StepExpr", e0);
+ switch (l1)
+ {
+ case 83: // 'attribute'
+ lookahead2W(287); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 122: // 'element'
+ lookahead2W(286); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 187: // 'namespace'
+ case 220: // 'processing-instruction'
+ lookahead2W(284); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 135: // 'false'
+ case 197: // 'null'
+ case 255: // 'true'
+ lookahead2W(236); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '.' |
+ break;
+ case 97: // 'comment'
+ case 120: // 'document'
+ case 206: // 'ordered'
+ case 249: // 'text'
+ case 262: // 'unordered'
+ lookahead2W(238); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 79: // 'array'
+ case 125: // 'empty-sequence'
+ case 154: // 'if'
+ case 167: // 'item'
+ case 169: // 'json-item'
+ case 247: // 'structured-item'
+ case 248: // 'switch'
+ case 259: // 'typeswitch'
+ lookahead2W(229); // S^WS | EOF | '!' | '!=' | '#' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 94: // 'child'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ case 234: // 'self'
+ lookahead2W(237); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 6: // EQName^Token
+ case 71: // 'after'
+ case 73: // 'allowing'
+ case 76: // 'and'
+ case 78: // 'append'
+ case 80: // 'as'
+ case 81: // 'ascending'
+ case 82: // 'at'
+ case 84: // 'base-uri'
+ case 85: // 'before'
+ case 86: // 'boundary-space'
+ case 87: // 'break'
+ case 89: // 'case'
+ case 90: // 'cast'
+ case 91: // 'castable'
+ case 92: // 'catch'
+ case 95: // 'collation'
+ case 98: // 'constraint'
+ case 99: // 'construction'
+ case 102: // 'context'
+ case 103: // 'continue'
+ case 104: // 'copy'
+ case 105: // 'copy-namespaces'
+ case 106: // 'count'
+ case 107: // 'decimal-format'
+ case 109: // 'declare'
+ case 110: // 'default'
+ case 111: // 'delete'
+ case 114: // 'descending'
+ case 119: // 'div'
+ case 121: // 'document-node'
+ case 123: // 'else'
+ case 124: // 'empty'
+ case 126: // 'encoding'
+ case 127: // 'end'
+ case 129: // 'eq'
+ case 130: // 'every'
+ case 132: // 'except'
+ case 133: // 'exit'
+ case 134: // 'external'
+ case 136: // 'first'
+ case 139: // 'for'
+ case 142: // 'from'
+ case 143: // 'ft-option'
+ case 147: // 'function'
+ case 148: // 'ge'
+ case 150: // 'group'
+ case 152: // 'gt'
+ case 153: // 'idiv'
+ case 155: // 'import'
+ case 156: // 'in'
+ case 157: // 'index'
+ case 161: // 'insert'
+ case 162: // 'instance'
+ case 163: // 'integrity'
+ case 164: // 'intersect'
+ case 165: // 'into'
+ case 166: // 'is'
+ case 168: // 'json'
+ case 170: // 'jsoniq'
+ case 173: // 'last'
+ case 174: // 'lax'
+ case 175: // 'le'
+ case 177: // 'let'
+ case 179: // 'loop'
+ case 181: // 'lt'
+ case 183: // 'mod'
+ case 184: // 'modify'
+ case 185: // 'module'
+ case 188: // 'namespace-node'
+ case 189: // 'ne'
+ case 194: // 'node'
+ case 195: // 'nodes'
+ case 198: // 'object'
+ case 202: // 'only'
+ case 203: // 'option'
+ case 204: // 'or'
+ case 205: // 'order'
+ case 207: // 'ordering'
+ case 222: // 'rename'
+ case 223: // 'replace'
+ case 224: // 'return'
+ case 225: // 'returning'
+ case 226: // 'revalidation'
+ case 228: // 'satisfies'
+ case 229: // 'schema'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 232: // 'score'
+ case 233: // 'select'
+ case 239: // 'sliding'
+ case 240: // 'some'
+ case 241: // 'stable'
+ case 242: // 'start'
+ case 245: // 'strict'
+ case 253: // 'to'
+ case 254: // 'treat'
+ case 256: // 'try'
+ case 257: // 'tumbling'
+ case 258: // 'type'
+ case 260: // 'union'
+ case 263: // 'updating'
+ case 266: // 'validate'
+ case 267: // 'value'
+ case 268: // 'variable'
+ case 269: // 'version'
+ case 272: // 'where'
+ case 273: // 'while'
+ case 276: // 'with'
+ lookahead2W(233); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 12935 // 'false' EOF
+ || lk == 12997 // 'null' EOF
+ || lk == 13055 // 'true' EOF
+ || lk == 13447 // 'false' '!'
+ || lk == 13509 // 'null' '!'
+ || lk == 13567 // 'true' '!'
+ || lk == 13959 // 'false' '!='
+ || lk == 14021 // 'null' '!='
+ || lk == 14079 // 'true' '!='
+ || lk == 19591 // 'false' ')'
+ || lk == 19653 // 'null' ')'
+ || lk == 19711 // 'true' ')'
+ || lk == 20103 // 'false' '*'
+ || lk == 20165 // 'null' '*'
+ || lk == 20223 // 'true' '*'
+ || lk == 21127 // 'false' '+'
+ || lk == 21189 // 'null' '+'
+ || lk == 21247 // 'true' '+'
+ || lk == 21639 // 'false' ','
+ || lk == 21701 // 'null' ','
+ || lk == 21759 // 'true' ','
+ || lk == 22151 // 'false' '-'
+ || lk == 22213 // 'null' '-'
+ || lk == 22271 // 'true' '-'
+ || lk == 24199 // 'false' '/'
+ || lk == 24261 // 'null' '/'
+ || lk == 24319 // 'true' '/'
+ || lk == 24711 // 'false' '//'
+ || lk == 24773 // 'null' '//'
+ || lk == 24831 // 'true' '//'
+ || lk == 25735 // 'false' ':'
+ || lk == 25797 // 'null' ':'
+ || lk == 25855 // 'true' ':'
+ || lk == 27783 // 'false' ';'
+ || lk == 27845 // 'null' ';'
+ || lk == 27903 // 'true' ';'
+ || lk == 28295 // 'false' '<'
+ || lk == 28357 // 'null' '<'
+ || lk == 28415 // 'true' '<'
+ || lk == 29831 // 'false' '<<'
+ || lk == 29893 // 'null' '<<'
+ || lk == 29951 // 'true' '<<'
+ || lk == 30343 // 'false' '<='
+ || lk == 30405 // 'null' '<='
+ || lk == 30463 // 'true' '<='
+ || lk == 31367 // 'false' '='
+ || lk == 31429 // 'null' '='
+ || lk == 31487 // 'true' '='
+ || lk == 31879 // 'false' '>'
+ || lk == 31941 // 'null' '>'
+ || lk == 31999 // 'true' '>'
+ || lk == 32391 // 'false' '>='
+ || lk == 32453 // 'null' '>='
+ || lk == 32511 // 'true' '>='
+ || lk == 32903 // 'false' '>>'
+ || lk == 32965 // 'null' '>>'
+ || lk == 33023 // 'true' '>>'
+ || lk == 35463 // 'false' '['
+ || lk == 35525 // 'null' '['
+ || lk == 35583 // 'true' '['
+ || lk == 35975 // 'false' ']'
+ || lk == 36037 // 'null' ']'
+ || lk == 36095 // 'true' ']'
+ || lk == 36435 // 'attribute' 'after'
+ || lk == 36474 // 'element' 'after'
+ || lk == 36487 // 'false' 'after'
+ || lk == 36539 // 'namespace' 'after'
+ || lk == 36549 // 'null' 'after'
+ || lk == 36572 // 'processing-instruction' 'after'
+ || lk == 36607 // 'true' 'after'
+ || lk == 38995 // 'attribute' 'and'
+ || lk == 39034 // 'element' 'and'
+ || lk == 39047 // 'false' 'and'
+ || lk == 39099 // 'namespace' 'and'
+ || lk == 39109 // 'null' 'and'
+ || lk == 39132 // 'processing-instruction' 'and'
+ || lk == 39167 // 'true' 'and'
+ || lk == 41043 // 'attribute' 'as'
+ || lk == 41082 // 'element' 'as'
+ || lk == 41095 // 'false' 'as'
+ || lk == 41147 // 'namespace' 'as'
+ || lk == 41157 // 'null' 'as'
+ || lk == 41180 // 'processing-instruction' 'as'
+ || lk == 41215 // 'true' 'as'
+ || lk == 41555 // 'attribute' 'ascending'
+ || lk == 41594 // 'element' 'ascending'
+ || lk == 41607 // 'false' 'ascending'
+ || lk == 41659 // 'namespace' 'ascending'
+ || lk == 41669 // 'null' 'ascending'
+ || lk == 41692 // 'processing-instruction' 'ascending'
+ || lk == 41727 // 'true' 'ascending'
+ || lk == 42067 // 'attribute' 'at'
+ || lk == 42106 // 'element' 'at'
+ || lk == 42119 // 'false' 'at'
+ || lk == 42171 // 'namespace' 'at'
+ || lk == 42181 // 'null' 'at'
+ || lk == 42204 // 'processing-instruction' 'at'
+ || lk == 42239 // 'true' 'at'
+ || lk == 43603 // 'attribute' 'before'
+ || lk == 43642 // 'element' 'before'
+ || lk == 43655 // 'false' 'before'
+ || lk == 43707 // 'namespace' 'before'
+ || lk == 43717 // 'null' 'before'
+ || lk == 43740 // 'processing-instruction' 'before'
+ || lk == 43775 // 'true' 'before'
+ || lk == 45191 // 'false' 'by'
+ || lk == 45253 // 'null' 'by'
+ || lk == 45311 // 'true' 'by'
+ || lk == 45651 // 'attribute' 'case'
+ || lk == 45690 // 'element' 'case'
+ || lk == 45703 // 'false' 'case'
+ || lk == 45755 // 'namespace' 'case'
+ || lk == 45765 // 'null' 'case'
+ || lk == 45788 // 'processing-instruction' 'case'
+ || lk == 45823 // 'true' 'case'
+ || lk == 46163 // 'attribute' 'cast'
+ || lk == 46202 // 'element' 'cast'
+ || lk == 46215 // 'false' 'cast'
+ || lk == 46267 // 'namespace' 'cast'
+ || lk == 46277 // 'null' 'cast'
+ || lk == 46300 // 'processing-instruction' 'cast'
+ || lk == 46335 // 'true' 'cast'
+ || lk == 46675 // 'attribute' 'castable'
+ || lk == 46714 // 'element' 'castable'
+ || lk == 46727 // 'false' 'castable'
+ || lk == 46779 // 'namespace' 'castable'
+ || lk == 46789 // 'null' 'castable'
+ || lk == 46812 // 'processing-instruction' 'castable'
+ || lk == 46847 // 'true' 'castable'
+ || lk == 48723 // 'attribute' 'collation'
+ || lk == 48762 // 'element' 'collation'
+ || lk == 48775 // 'false' 'collation'
+ || lk == 48827 // 'namespace' 'collation'
+ || lk == 48837 // 'null' 'collation'
+ || lk == 48860 // 'processing-instruction' 'collation'
+ || lk == 48895 // 'true' 'collation'
+ || lk == 51335 // 'false' 'contains'
+ || lk == 51397 // 'null' 'contains'
+ || lk == 51455 // 'true' 'contains'
+ || lk == 54355 // 'attribute' 'count'
+ || lk == 54394 // 'element' 'count'
+ || lk == 54407 // 'false' 'count'
+ || lk == 54459 // 'namespace' 'count'
+ || lk == 54469 // 'null' 'count'
+ || lk == 54492 // 'processing-instruction' 'count'
+ || lk == 54527 // 'true' 'count'
+ || lk == 56403 // 'attribute' 'default'
+ || lk == 56442 // 'element' 'default'
+ || lk == 56455 // 'false' 'default'
+ || lk == 56507 // 'namespace' 'default'
+ || lk == 56517 // 'null' 'default'
+ || lk == 56540 // 'processing-instruction' 'default'
+ || lk == 56575 // 'true' 'default'
+ || lk == 58451 // 'attribute' 'descending'
+ || lk == 58490 // 'element' 'descending'
+ || lk == 58503 // 'false' 'descending'
+ || lk == 58555 // 'namespace' 'descending'
+ || lk == 58565 // 'null' 'descending'
+ || lk == 58588 // 'processing-instruction' 'descending'
+ || lk == 58623 // 'true' 'descending'
+ || lk == 61011 // 'attribute' 'div'
+ || lk == 61050 // 'element' 'div'
+ || lk == 61063 // 'false' 'div'
+ || lk == 61115 // 'namespace' 'div'
+ || lk == 61125 // 'null' 'div'
+ || lk == 61148 // 'processing-instruction' 'div'
+ || lk == 61183 // 'true' 'div'
+ || lk == 63059 // 'attribute' 'else'
+ || lk == 63098 // 'element' 'else'
+ || lk == 63111 // 'false' 'else'
+ || lk == 63163 // 'namespace' 'else'
+ || lk == 63173 // 'null' 'else'
+ || lk == 63196 // 'processing-instruction' 'else'
+ || lk == 63231 // 'true' 'else'
+ || lk == 63571 // 'attribute' 'empty'
+ || lk == 63610 // 'element' 'empty'
+ || lk == 63623 // 'false' 'empty'
+ || lk == 63675 // 'namespace' 'empty'
+ || lk == 63685 // 'null' 'empty'
+ || lk == 63708 // 'processing-instruction' 'empty'
+ || lk == 63743 // 'true' 'empty'
+ || lk == 65107 // 'attribute' 'end'
+ || lk == 65146 // 'element' 'end'
+ || lk == 65159 // 'false' 'end'
+ || lk == 65211 // 'namespace' 'end'
+ || lk == 65221 // 'null' 'end'
+ || lk == 65244 // 'processing-instruction' 'end'
+ || lk == 65279 // 'true' 'end'
+ || lk == 66131 // 'attribute' 'eq'
+ || lk == 66170 // 'element' 'eq'
+ || lk == 66183 // 'false' 'eq'
+ || lk == 66235 // 'namespace' 'eq'
+ || lk == 66245 // 'null' 'eq'
+ || lk == 66268 // 'processing-instruction' 'eq'
+ || lk == 66303 // 'true' 'eq'
+ || lk == 67667 // 'attribute' 'except'
+ || lk == 67706 // 'element' 'except'
+ || lk == 67719 // 'false' 'except'
+ || lk == 67771 // 'namespace' 'except'
+ || lk == 67781 // 'null' 'except'
+ || lk == 67804 // 'processing-instruction' 'except'
+ || lk == 67839 // 'true' 'except'
+ || lk == 71251 // 'attribute' 'for'
+ || lk == 71290 // 'element' 'for'
+ || lk == 71303 // 'false' 'for'
+ || lk == 71355 // 'namespace' 'for'
+ || lk == 71365 // 'null' 'for'
+ || lk == 71388 // 'processing-instruction' 'for'
+ || lk == 71423 // 'true' 'for'
+ || lk == 75859 // 'attribute' 'ge'
+ || lk == 75898 // 'element' 'ge'
+ || lk == 75911 // 'false' 'ge'
+ || lk == 75963 // 'namespace' 'ge'
+ || lk == 75973 // 'null' 'ge'
+ || lk == 75996 // 'processing-instruction' 'ge'
+ || lk == 76031 // 'true' 'ge'
+ || lk == 76883 // 'attribute' 'group'
+ || lk == 76922 // 'element' 'group'
+ || lk == 76935 // 'false' 'group'
+ || lk == 76987 // 'namespace' 'group'
+ || lk == 76997 // 'null' 'group'
+ || lk == 77020 // 'processing-instruction' 'group'
+ || lk == 77055 // 'true' 'group'
+ || lk == 77907 // 'attribute' 'gt'
+ || lk == 77946 // 'element' 'gt'
+ || lk == 77959 // 'false' 'gt'
+ || lk == 78011 // 'namespace' 'gt'
+ || lk == 78021 // 'null' 'gt'
+ || lk == 78044 // 'processing-instruction' 'gt'
+ || lk == 78079 // 'true' 'gt'
+ || lk == 78419 // 'attribute' 'idiv'
+ || lk == 78458 // 'element' 'idiv'
+ || lk == 78471 // 'false' 'idiv'
+ || lk == 78523 // 'namespace' 'idiv'
+ || lk == 78533 // 'null' 'idiv'
+ || lk == 78556 // 'processing-instruction' 'idiv'
+ || lk == 78591 // 'true' 'idiv'
+ || lk == 83027 // 'attribute' 'instance'
+ || lk == 83066 // 'element' 'instance'
+ || lk == 83079 // 'false' 'instance'
+ || lk == 83131 // 'namespace' 'instance'
+ || lk == 83141 // 'null' 'instance'
+ || lk == 83164 // 'processing-instruction' 'instance'
+ || lk == 83199 // 'true' 'instance'
+ || lk == 84051 // 'attribute' 'intersect'
+ || lk == 84090 // 'element' 'intersect'
+ || lk == 84103 // 'false' 'intersect'
+ || lk == 84155 // 'namespace' 'intersect'
+ || lk == 84165 // 'null' 'intersect'
+ || lk == 84188 // 'processing-instruction' 'intersect'
+ || lk == 84223 // 'true' 'intersect'
+ || lk == 84563 // 'attribute' 'into'
+ || lk == 84602 // 'element' 'into'
+ || lk == 84615 // 'false' 'into'
+ || lk == 84667 // 'namespace' 'into'
+ || lk == 84677 // 'null' 'into'
+ || lk == 84700 // 'processing-instruction' 'into'
+ || lk == 84735 // 'true' 'into'
+ || lk == 85075 // 'attribute' 'is'
+ || lk == 85114 // 'element' 'is'
+ || lk == 85127 // 'false' 'is'
+ || lk == 85179 // 'namespace' 'is'
+ || lk == 85189 // 'null' 'is'
+ || lk == 85212 // 'processing-instruction' 'is'
+ || lk == 85247 // 'true' 'is'
+ || lk == 89683 // 'attribute' 'le'
+ || lk == 89722 // 'element' 'le'
+ || lk == 89735 // 'false' 'le'
+ || lk == 89787 // 'namespace' 'le'
+ || lk == 89797 // 'null' 'le'
+ || lk == 89820 // 'processing-instruction' 'le'
+ || lk == 89855 // 'true' 'le'
+ || lk == 90707 // 'attribute' 'let'
+ || lk == 90746 // 'element' 'let'
+ || lk == 90759 // 'false' 'let'
+ || lk == 90811 // 'namespace' 'let'
+ || lk == 90821 // 'null' 'let'
+ || lk == 90844 // 'processing-instruction' 'let'
+ || lk == 90879 // 'true' 'let'
+ || lk == 92755 // 'attribute' 'lt'
+ || lk == 92794 // 'element' 'lt'
+ || lk == 92807 // 'false' 'lt'
+ || lk == 92859 // 'namespace' 'lt'
+ || lk == 92869 // 'null' 'lt'
+ || lk == 92892 // 'processing-instruction' 'lt'
+ || lk == 92927 // 'true' 'lt'
+ || lk == 93779 // 'attribute' 'mod'
+ || lk == 93818 // 'element' 'mod'
+ || lk == 93831 // 'false' 'mod'
+ || lk == 93883 // 'namespace' 'mod'
+ || lk == 93893 // 'null' 'mod'
+ || lk == 93916 // 'processing-instruction' 'mod'
+ || lk == 93951 // 'true' 'mod'
+ || lk == 94291 // 'attribute' 'modify'
+ || lk == 94330 // 'element' 'modify'
+ || lk == 94343 // 'false' 'modify'
+ || lk == 94395 // 'namespace' 'modify'
+ || lk == 94405 // 'null' 'modify'
+ || lk == 94428 // 'processing-instruction' 'modify'
+ || lk == 94463 // 'true' 'modify'
+ || lk == 96851 // 'attribute' 'ne'
+ || lk == 96890 // 'element' 'ne'
+ || lk == 96903 // 'false' 'ne'
+ || lk == 96955 // 'namespace' 'ne'
+ || lk == 96965 // 'null' 'ne'
+ || lk == 96988 // 'processing-instruction' 'ne'
+ || lk == 97023 // 'true' 'ne'
+ || lk == 103507 // 'attribute' 'only'
+ || lk == 103546 // 'element' 'only'
+ || lk == 103559 // 'false' 'only'
+ || lk == 103611 // 'namespace' 'only'
+ || lk == 103621 // 'null' 'only'
+ || lk == 103644 // 'processing-instruction' 'only'
+ || lk == 103679 // 'true' 'only'
+ || lk == 104531 // 'attribute' 'or'
+ || lk == 104570 // 'element' 'or'
+ || lk == 104583 // 'false' 'or'
+ || lk == 104635 // 'namespace' 'or'
+ || lk == 104645 // 'null' 'or'
+ || lk == 104668 // 'processing-instruction' 'or'
+ || lk == 104703 // 'true' 'or'
+ || lk == 105043 // 'attribute' 'order'
+ || lk == 105082 // 'element' 'order'
+ || lk == 105095 // 'false' 'order'
+ || lk == 105147 // 'namespace' 'order'
+ || lk == 105157 // 'null' 'order'
+ || lk == 105180 // 'processing-instruction' 'order'
+ || lk == 105215 // 'true' 'order'
+ || lk == 107143 // 'false' 'paragraphs'
+ || lk == 107205 // 'null' 'paragraphs'
+ || lk == 107263 // 'true' 'paragraphs'
+ || lk == 114771 // 'attribute' 'return'
+ || lk == 114810 // 'element' 'return'
+ || lk == 114823 // 'false' 'return'
+ || lk == 114875 // 'namespace' 'return'
+ || lk == 114885 // 'null' 'return'
+ || lk == 114908 // 'processing-instruction' 'return'
+ || lk == 114943 // 'true' 'return'
+ || lk == 116819 // 'attribute' 'satisfies'
+ || lk == 116858 // 'element' 'satisfies'
+ || lk == 116871 // 'false' 'satisfies'
+ || lk == 116923 // 'namespace' 'satisfies'
+ || lk == 116933 // 'null' 'satisfies'
+ || lk == 116956 // 'processing-instruction' 'satisfies'
+ || lk == 116991 // 'true' 'satisfies'
+ || lk == 121479 // 'false' 'sentences'
+ || lk == 121541 // 'null' 'sentences'
+ || lk == 121599 // 'true' 'sentences'
+ || lk == 123475 // 'attribute' 'stable'
+ || lk == 123514 // 'element' 'stable'
+ || lk == 123527 // 'false' 'stable'
+ || lk == 123579 // 'namespace' 'stable'
+ || lk == 123589 // 'null' 'stable'
+ || lk == 123612 // 'processing-instruction' 'stable'
+ || lk == 123647 // 'true' 'stable'
+ || lk == 123987 // 'attribute' 'start'
+ || lk == 124026 // 'element' 'start'
+ || lk == 124039 // 'false' 'start'
+ || lk == 124091 // 'namespace' 'start'
+ || lk == 124101 // 'null' 'start'
+ || lk == 124124 // 'processing-instruction' 'start'
+ || lk == 124159 // 'true' 'start'
+ || lk == 129159 // 'false' 'times'
+ || lk == 129221 // 'null' 'times'
+ || lk == 129279 // 'true' 'times'
+ || lk == 129619 // 'attribute' 'to'
+ || lk == 129658 // 'element' 'to'
+ || lk == 129671 // 'false' 'to'
+ || lk == 129723 // 'namespace' 'to'
+ || lk == 129733 // 'null' 'to'
+ || lk == 129756 // 'processing-instruction' 'to'
+ || lk == 129791 // 'true' 'to'
+ || lk == 130131 // 'attribute' 'treat'
+ || lk == 130170 // 'element' 'treat'
+ || lk == 130183 // 'false' 'treat'
+ || lk == 130235 // 'namespace' 'treat'
+ || lk == 130245 // 'null' 'treat'
+ || lk == 130268 // 'processing-instruction' 'treat'
+ || lk == 130303 // 'true' 'treat'
+ || lk == 133203 // 'attribute' 'union'
+ || lk == 133242 // 'element' 'union'
+ || lk == 133255 // 'false' 'union'
+ || lk == 133307 // 'namespace' 'union'
+ || lk == 133317 // 'null' 'union'
+ || lk == 133340 // 'processing-instruction' 'union'
+ || lk == 133375 // 'true' 'union'
+ || lk == 139347 // 'attribute' 'where'
+ || lk == 139386 // 'element' 'where'
+ || lk == 139399 // 'false' 'where'
+ || lk == 139451 // 'namespace' 'where'
+ || lk == 139461 // 'null' 'where'
+ || lk == 139484 // 'processing-instruction' 'where'
+ || lk == 139519 // 'true' 'where'
+ || lk == 141395 // 'attribute' 'with'
+ || lk == 141434 // 'element' 'with'
+ || lk == 141447 // 'false' 'with'
+ || lk == 141499 // 'namespace' 'with'
+ || lk == 141509 // 'null' 'with'
+ || lk == 141532 // 'processing-instruction' 'with'
+ || lk == 141567 // 'true' 'with'
+ || lk == 142983 // 'false' 'words'
+ || lk == 143045 // 'null' 'words'
+ || lk == 143103 // 'true' 'words'
+ || lk == 145543 // 'false' '|'
+ || lk == 145605 // 'null' '|'
+ || lk == 145663 // 'true' '|'
+ || lk == 146055 // 'false' '||'
+ || lk == 146117 // 'null' '||'
+ || lk == 146175 // 'true' '||'
+ || lk == 146567 // 'false' '|}'
+ || lk == 146629 // 'null' '|}'
+ || lk == 146687 // 'true' '|}'
+ || lk == 147079 // 'false' '}'
+ || lk == 147141 // 'null' '}'
+ || lk == 147199) // 'true' '}'
+ {
+ 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_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(4, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 31: // '$'
+ case 32: // '$$'
+ case 33: // '%'
+ case 35: // '('
+ case 55: // '<'
+ case 56: // '<!--'
+ case 60: // '<?'
+ case 69: // '['
+ case 281: // '{'
+ case 283: // '{|'
+ case 3155: // 'attribute' EQName^Token
+ case 3194: // 'element' EQName^Token
+ case 9915: // 'namespace' NCName^Token
+ case 9948: // 'processing-instruction' NCName^Token
+ case 14854: // EQName^Token '#'
+ case 14919: // 'after' '#'
+ case 14921: // 'allowing' '#'
+ case 14922: // 'ancestor' '#'
+ case 14923: // 'ancestor-or-self' '#'
+ case 14924: // 'and' '#'
+ case 14926: // 'append' '#'
+ case 14927: // 'array' '#'
+ case 14928: // 'as' '#'
+ case 14929: // 'ascending' '#'
+ case 14930: // 'at' '#'
+ case 14931: // 'attribute' '#'
+ case 14932: // 'base-uri' '#'
+ case 14933: // 'before' '#'
+ case 14934: // 'boundary-space' '#'
+ case 14935: // 'break' '#'
+ case 14937: // 'case' '#'
+ case 14938: // 'cast' '#'
+ case 14939: // 'castable' '#'
+ case 14940: // 'catch' '#'
+ case 14942: // 'child' '#'
+ case 14943: // 'collation' '#'
+ case 14945: // 'comment' '#'
+ case 14946: // 'constraint' '#'
+ case 14947: // 'construction' '#'
+ case 14950: // 'context' '#'
+ case 14951: // 'continue' '#'
+ case 14952: // 'copy' '#'
+ case 14953: // 'copy-namespaces' '#'
+ case 14954: // 'count' '#'
+ case 14955: // 'decimal-format' '#'
+ case 14957: // 'declare' '#'
+ case 14958: // 'default' '#'
+ case 14959: // 'delete' '#'
+ case 14960: // 'descendant' '#'
+ case 14961: // 'descendant-or-self' '#'
+ case 14962: // 'descending' '#'
+ case 14967: // 'div' '#'
+ case 14968: // 'document' '#'
+ case 14969: // 'document-node' '#'
+ case 14970: // 'element' '#'
+ case 14971: // 'else' '#'
+ case 14972: // 'empty' '#'
+ case 14973: // 'empty-sequence' '#'
+ case 14974: // 'encoding' '#'
+ case 14975: // 'end' '#'
+ case 14977: // 'eq' '#'
+ case 14978: // 'every' '#'
+ case 14980: // 'except' '#'
+ case 14981: // 'exit' '#'
+ case 14982: // 'external' '#'
+ case 14983: // 'false' '#'
+ case 14984: // 'first' '#'
+ case 14985: // 'following' '#'
+ case 14986: // 'following-sibling' '#'
+ case 14987: // 'for' '#'
+ case 14990: // 'from' '#'
+ case 14991: // 'ft-option' '#'
+ case 14995: // 'function' '#'
+ case 14996: // 'ge' '#'
+ case 14998: // 'group' '#'
+ case 15000: // 'gt' '#'
+ case 15001: // 'idiv' '#'
+ case 15002: // 'if' '#'
+ case 15003: // 'import' '#'
+ case 15004: // 'in' '#'
+ case 15005: // 'index' '#'
+ case 15009: // 'insert' '#'
+ case 15010: // 'instance' '#'
+ case 15011: // 'integrity' '#'
+ case 15012: // 'intersect' '#'
+ case 15013: // 'into' '#'
+ case 15014: // 'is' '#'
+ case 15015: // 'item' '#'
+ case 15016: // 'json' '#'
+ case 15017: // 'json-item' '#'
+ case 15018: // 'jsoniq' '#'
+ case 15021: // 'last' '#'
+ case 15022: // 'lax' '#'
+ case 15023: // 'le' '#'
+ case 15025: // 'let' '#'
+ case 15027: // 'loop' '#'
+ case 15029: // 'lt' '#'
+ case 15031: // 'mod' '#'
+ case 15032: // 'modify' '#'
+ case 15033: // 'module' '#'
+ case 15035: // 'namespace' '#'
+ case 15036: // 'namespace-node' '#'
+ case 15037: // 'ne' '#'
+ case 15042: // 'node' '#'
+ case 15043: // 'nodes' '#'
+ case 15045: // 'null' '#'
+ case 15046: // 'object' '#'
+ case 15050: // 'only' '#'
+ case 15051: // 'option' '#'
+ case 15052: // 'or' '#'
+ case 15053: // 'order' '#'
+ case 15054: // 'ordered' '#'
+ case 15055: // 'ordering' '#'
+ case 15058: // 'parent' '#'
+ case 15064: // 'preceding' '#'
+ case 15065: // 'preceding-sibling' '#'
+ case 15068: // 'processing-instruction' '#'
+ case 15070: // 'rename' '#'
+ case 15071: // 'replace' '#'
+ case 15072: // 'return' '#'
+ case 15073: // 'returning' '#'
+ case 15074: // 'revalidation' '#'
+ case 15076: // 'satisfies' '#'
+ case 15077: // 'schema' '#'
+ case 15078: // 'schema-attribute' '#'
+ case 15079: // 'schema-element' '#'
+ case 15080: // 'score' '#'
+ case 15081: // 'select' '#'
+ case 15082: // 'self' '#'
+ case 15087: // 'sliding' '#'
+ case 15088: // 'some' '#'
+ case 15089: // 'stable' '#'
+ case 15090: // 'start' '#'
+ case 15093: // 'strict' '#'
+ case 15095: // 'structured-item' '#'
+ case 15096: // 'switch' '#'
+ case 15097: // 'text' '#'
+ case 15101: // 'to' '#'
+ case 15102: // 'treat' '#'
+ case 15103: // 'true' '#'
+ case 15104: // 'try' '#'
+ case 15105: // 'tumbling' '#'
+ case 15106: // 'type' '#'
+ case 15107: // 'typeswitch' '#'
+ case 15108: // 'union' '#'
+ case 15110: // 'unordered' '#'
+ case 15111: // 'updating' '#'
+ case 15114: // 'validate' '#'
+ case 15115: // 'value' '#'
+ case 15116: // 'variable' '#'
+ case 15117: // 'version' '#'
+ case 15120: // 'where' '#'
+ case 15121: // 'while' '#'
+ case 15124: // 'with' '#'
+ case 17926: // EQName^Token '('
+ case 17991: // 'after' '('
+ case 17993: // 'allowing' '('
+ case 17994: // 'ancestor' '('
+ case 17995: // 'ancestor-or-self' '('
+ case 17996: // 'and' '('
+ case 17998: // 'append' '('
+ case 18000: // 'as' '('
+ case 18001: // 'ascending' '('
+ case 18002: // 'at' '('
+ case 18004: // 'base-uri' '('
+ case 18005: // 'before' '('
+ case 18006: // 'boundary-space' '('
+ case 18007: // 'break' '('
+ case 18009: // 'case' '('
+ case 18010: // 'cast' '('
+ case 18011: // 'castable' '('
+ case 18012: // 'catch' '('
+ case 18014: // 'child' '('
+ case 18015: // 'collation' '('
+ case 18018: // 'constraint' '('
+ case 18019: // 'construction' '('
+ case 18022: // 'context' '('
+ case 18023: // 'continue' '('
+ case 18024: // 'copy' '('
+ case 18025: // 'copy-namespaces' '('
+ case 18026: // 'count' '('
+ case 18027: // 'decimal-format' '('
+ case 18029: // 'declare' '('
+ case 18030: // 'default' '('
+ case 18031: // 'delete' '('
+ case 18032: // 'descendant' '('
+ case 18033: // 'descendant-or-self' '('
+ case 18034: // 'descending' '('
+ case 18039: // 'div' '('
+ case 18040: // 'document' '('
+ case 18043: // 'else' '('
+ case 18044: // 'empty' '('
+ case 18046: // 'encoding' '('
+ case 18047: // 'end' '('
+ case 18049: // 'eq' '('
+ case 18050: // 'every' '('
+ case 18052: // 'except' '('
+ case 18053: // 'exit' '('
+ case 18054: // 'external' '('
+ case 18055: // 'false' '('
+ case 18056: // 'first' '('
+ case 18057: // 'following' '('
+ case 18058: // 'following-sibling' '('
+ case 18059: // 'for' '('
+ case 18062: // 'from' '('
+ case 18063: // 'ft-option' '('
+ case 18067: // 'function' '('
+ case 18068: // 'ge' '('
+ case 18070: // 'group' '('
+ case 18072: // 'gt' '('
+ case 18073: // 'idiv' '('
+ case 18075: // 'import' '('
+ case 18076: // 'in' '('
+ case 18077: // 'index' '('
+ case 18081: // 'insert' '('
+ case 18082: // 'instance' '('
+ case 18083: // 'integrity' '('
+ case 18084: // 'intersect' '('
+ case 18085: // 'into' '('
+ case 18086: // 'is' '('
+ case 18088: // 'json' '('
+ case 18090: // 'jsoniq' '('
+ case 18093: // 'last' '('
+ case 18094: // 'lax' '('
+ case 18095: // 'le' '('
+ case 18097: // 'let' '('
+ case 18099: // 'loop' '('
+ case 18101: // 'lt' '('
+ case 18103: // 'mod' '('
+ case 18104: // 'modify' '('
+ case 18105: // 'module' '('
+ case 18107: // 'namespace' '('
+ case 18109: // 'ne' '('
+ case 18115: // 'nodes' '('
+ case 18117: // 'null' '('
+ case 18118: // 'object' '('
+ case 18122: // 'only' '('
+ case 18123: // 'option' '('
+ case 18124: // 'or' '('
+ case 18125: // 'order' '('
+ case 18126: // 'ordered' '('
+ case 18127: // 'ordering' '('
+ case 18130: // 'parent' '('
+ case 18136: // 'preceding' '('
+ case 18137: // 'preceding-sibling' '('
+ case 18142: // 'rename' '('
+ case 18143: // 'replace' '('
+ case 18144: // 'return' '('
+ case 18145: // 'returning' '('
+ case 18146: // 'revalidation' '('
+ case 18148: // 'satisfies' '('
+ case 18149: // 'schema' '('
+ case 18152: // 'score' '('
+ case 18153: // 'select' '('
+ case 18154: // 'self' '('
+ case 18159: // 'sliding' '('
+ case 18160: // 'some' '('
+ case 18161: // 'stable' '('
+ case 18162: // 'start' '('
+ case 18165: // 'strict' '('
+ case 18173: // 'to' '('
+ case 18174: // 'treat' '('
+ case 18175: // 'true' '('
+ case 18176: // 'try' '('
+ case 18177: // 'tumbling' '('
+ case 18178: // 'type' '('
+ case 18180: // 'union' '('
+ case 18182: // 'unordered' '('
+ case 18183: // 'updating' '('
+ case 18186: // 'validate' '('
+ case 18187: // 'value' '('
+ case 18188: // 'variable' '('
+ case 18189: // 'version' '('
+ case 18192: // 'where' '('
+ case 18193: // 'while' '('
+ case 18196: // 'with' '('
+ case 23175: // 'false' '.'
+ case 23237: // 'null' '.'
+ case 23295: // 'true' '.'
+ case 37459: // 'attribute' 'allowing'
+ case 37498: // 'element' 'allowing'
+ case 37563: // 'namespace' 'allowing'
+ case 37596: // 'processing-instruction' 'allowing'
+ case 37971: // 'attribute' 'ancestor'
+ case 38010: // 'element' 'ancestor'
+ case 38075: // 'namespace' 'ancestor'
+ case 38108: // 'processing-instruction' 'ancestor'
+ case 38483: // 'attribute' 'ancestor-or-self'
+ case 38522: // 'element' 'ancestor-or-self'
+ case 38587: // 'namespace' 'ancestor-or-self'
+ case 38620: // 'processing-instruction' 'ancestor-or-self'
+ case 40019: // 'attribute' 'append'
+ case 40058: // 'element' 'append'
+ case 40123: // 'namespace' 'append'
+ case 40156: // 'processing-instruction' 'append'
+ case 40531: // 'attribute' 'array'
+ case 40570: // 'element' 'array'
+ case 42579: // 'attribute' 'attribute'
+ case 42618: // 'element' 'attribute'
+ case 42683: // 'namespace' 'attribute'
+ case 42716: // 'processing-instruction' 'attribute'
+ case 43091: // 'attribute' 'base-uri'
+ case 43130: // 'element' 'base-uri'
+ case 43195: // 'namespace' 'base-uri'
+ case 43228: // 'processing-instruction' 'base-uri'
+ case 44115: // 'attribute' 'boundary-space'
+ case 44154: // 'element' 'boundary-space'
+ case 44219: // 'namespace' 'boundary-space'
+ case 44252: // 'processing-instruction' 'boundary-space'
+ case 44627: // 'attribute' 'break'
+ case 44666: // 'element' 'break'
+ case 44731: // 'namespace' 'break'
+ case 44764: // 'processing-instruction' 'break'
+ case 47187: // 'attribute' 'catch'
+ case 47226: // 'element' 'catch'
+ case 47291: // 'namespace' 'catch'
+ case 47324: // 'processing-instruction' 'catch'
+ case 48211: // 'attribute' 'child'
+ case 48250: // 'element' 'child'
+ case 48315: // 'namespace' 'child'
+ case 48348: // 'processing-instruction' 'child'
+ case 49747: // 'attribute' 'comment'
+ case 49786: // 'element' 'comment'
+ case 49851: // 'namespace' 'comment'
+ case 49884: // 'processing-instruction' 'comment'
+ case 50259: // 'attribute' 'constraint'
+ case 50298: // 'element' 'constraint'
+ case 50363: // 'namespace' 'constraint'
+ case 50396: // 'processing-instruction' 'constraint'
+ case 50771: // 'attribute' 'construction'
+ case 50810: // 'element' 'construction'
+ case 50875: // 'namespace' 'construction'
+ case 50908: // 'processing-instruction' 'construction'
+ case 52307: // 'attribute' 'context'
+ case 52346: // 'element' 'context'
+ case 52411: // 'namespace' 'context'
+ case 52444: // 'processing-instruction' 'context'
+ case 52819: // 'attribute' 'continue'
+ case 52858: // 'element' 'continue'
+ case 52923: // 'namespace' 'continue'
+ case 52956: // 'processing-instruction' 'continue'
+ case 53331: // 'attribute' 'copy'
+ case 53370: // 'element' 'copy'
+ case 53435: // 'namespace' 'copy'
+ case 53468: // 'processing-instruction' 'copy'
+ case 53843: // 'attribute' 'copy-namespaces'
+ case 53882: // 'element' 'copy-namespaces'
+ case 53947: // 'namespace' 'copy-namespaces'
+ case 53980: // 'processing-instruction' 'copy-namespaces'
+ case 54867: // 'attribute' 'decimal-format'
+ case 54906: // 'element' 'decimal-format'
+ case 54971: // 'namespace' 'decimal-format'
+ case 55004: // 'processing-instruction' 'decimal-format'
+ case 55891: // 'attribute' 'declare'
+ case 55930: // 'element' 'declare'
+ case 55995: // 'namespace' 'declare'
+ case 56028: // 'processing-instruction' 'declare'
+ case 56915: // 'attribute' 'delete'
+ case 56954: // 'element' 'delete'
+ case 57019: // 'namespace' 'delete'
+ case 57052: // 'processing-instruction' 'delete'
+ case 57427: // 'attribute' 'descendant'
+ case 57466: // 'element' 'descendant'
+ case 57531: // 'namespace' 'descendant'
+ case 57564: // 'processing-instruction' 'descendant'
+ case 57939: // 'attribute' 'descendant-or-self'
+ case 57978: // 'element' 'descendant-or-self'
+ case 58043: // 'namespace' 'descendant-or-self'
+ case 58076: // 'processing-instruction' 'descendant-or-self'
+ case 61523: // 'attribute' 'document'
+ case 61562: // 'element' 'document'
+ case 61627: // 'namespace' 'document'
+ case 61660: // 'processing-instruction' 'document'
+ case 62035: // 'attribute' 'document-node'
+ case 62074: // 'element' 'document-node'
+ case 62139: // 'namespace' 'document-node'
+ case 62172: // 'processing-instruction' 'document-node'
+ case 62547: // 'attribute' 'element'
+ case 62586: // 'element' 'element'
+ case 62651: // 'namespace' 'element'
+ case 62684: // 'processing-instruction' 'element'
+ case 64083: // 'attribute' 'empty-sequence'
+ case 64122: // 'element' 'empty-sequence'
+ case 64187: // 'namespace' 'empty-sequence'
+ case 64220: // 'processing-instruction' 'empty-sequence'
+ case 64595: // 'attribute' 'encoding'
+ case 64634: // 'element' 'encoding'
+ case 64699: // 'namespace' 'encoding'
+ case 64732: // 'processing-instruction' 'encoding'
+ case 66643: // 'attribute' 'every'
+ case 66682: // 'element' 'every'
+ case 66747: // 'namespace' 'every'
+ case 66780: // 'processing-instruction' 'every'
+ case 68179: // 'attribute' 'exit'
+ case 68218: // 'element' 'exit'
+ case 68283: // 'namespace' 'exit'
+ case 68316: // 'processing-instruction' 'exit'
+ case 68691: // 'attribute' 'external'
+ case 68730: // 'element' 'external'
+ case 68795: // 'namespace' 'external'
+ case 68828: // 'processing-instruction' 'external'
+ case 69203: // 'attribute' 'false'
+ case 69242: // 'element' 'false'
+ case 69307: // 'namespace' 'false'
+ case 69340: // 'processing-instruction' 'false'
+ case 69715: // 'attribute' 'first'
+ case 69754: // 'element' 'first'
+ case 69819: // 'namespace' 'first'
+ case 69852: // 'processing-instruction' 'first'
+ case 70227: // 'attribute' 'following'
+ case 70266: // 'element' 'following'
+ case 70331: // 'namespace' 'following'
+ case 70364: // 'processing-instruction' 'following'
+ case 70739: // 'attribute' 'following-sibling'
+ case 70778: // 'element' 'following-sibling'
+ case 70843: // 'namespace' 'following-sibling'
+ case 70876: // 'processing-instruction' 'following-sibling'
+ case 72787: // 'attribute' 'from'
+ case 72826: // 'element' 'from'
+ case 72891: // 'namespace' 'from'
+ case 72924: // 'processing-instruction' 'from'
+ case 73299: // 'attribute' 'ft-option'
+ case 73338: // 'element' 'ft-option'
+ case 73403: // 'namespace' 'ft-option'
+ case 73436: // 'processing-instruction' 'ft-option'
+ case 75347: // 'attribute' 'function'
+ case 75386: // 'element' 'function'
+ case 75451: // 'namespace' 'function'
+ case 75484: // 'processing-instruction' 'function'
+ case 78931: // 'attribute' 'if'
+ case 78970: // 'element' 'if'
+ case 79035: // 'namespace' 'if'
+ case 79068: // 'processing-instruction' 'if'
+ case 79443: // 'attribute' 'import'
+ case 79482: // 'element' 'import'
+ case 79547: // 'namespace' 'import'
+ case 79580: // 'processing-instruction' 'import'
+ case 79955: // 'attribute' 'in'
+ case 79994: // 'element' 'in'
+ case 80059: // 'namespace' 'in'
+ case 80092: // 'processing-instruction' 'in'
+ case 80467: // 'attribute' 'index'
+ case 80506: // 'element' 'index'
+ case 80571: // 'namespace' 'index'
+ case 80604: // 'processing-instruction' 'index'
+ case 82515: // 'attribute' 'insert'
+ case 82554: // 'element' 'insert'
+ case 82619: // 'namespace' 'insert'
+ case 82652: // 'processing-instruction' 'insert'
+ case 83539: // 'attribute' 'integrity'
+ case 83578: // 'element' 'integrity'
+ case 83643: // 'namespace' 'integrity'
+ case 83676: // 'processing-instruction' 'integrity'
+ case 85587: // 'attribute' 'item'
+ case 85626: // 'element' 'item'
+ case 85691: // 'namespace' 'item'
+ case 85724: // 'processing-instruction' 'item'
+ case 86099: // 'attribute' 'json'
+ case 86138: // 'element' 'json'
+ case 86203: // 'namespace' 'json'
+ case 86236: // 'processing-instruction' 'json'
+ case 86611: // 'attribute' 'json-item'
+ case 86650: // 'element' 'json-item'
+ case 87123: // 'attribute' 'jsoniq'
+ case 87162: // 'element' 'jsoniq'
+ case 87227: // 'namespace' 'jsoniq'
+ case 87260: // 'processing-instruction' 'jsoniq'
+ case 88659: // 'attribute' 'last'
+ case 88698: // 'element' 'last'
+ case 88763: // 'namespace' 'last'
+ case 88796: // 'processing-instruction' 'last'
+ case 89171: // 'attribute' 'lax'
+ case 89210: // 'element' 'lax'
+ case 89275: // 'namespace' 'lax'
+ case 89308: // 'processing-instruction' 'lax'
+ case 91731: // 'attribute' 'loop'
+ case 91770: // 'element' 'loop'
+ case 91835: // 'namespace' 'loop'
+ case 91868: // 'processing-instruction' 'loop'
+ case 94803: // 'attribute' 'module'
+ case 94842: // 'element' 'module'
+ case 94907: // 'namespace' 'module'
+ case 94940: // 'processing-instruction' 'module'
+ case 95827: // 'attribute' 'namespace'
+ case 95866: // 'element' 'namespace'
+ case 95931: // 'namespace' 'namespace'
+ case 95964: // 'processing-instruction' 'namespace'
+ case 96339: // 'attribute' 'namespace-node'
+ case 96378: // 'element' 'namespace-node'
+ case 96443: // 'namespace' 'namespace-node'
+ case 96476: // 'processing-instruction' 'namespace-node'
+ case 99411: // 'attribute' 'node'
+ case 99450: // 'element' 'node'
+ case 99515: // 'namespace' 'node'
+ case 99548: // 'processing-instruction' 'node'
+ case 99923: // 'attribute' 'nodes'
+ case 99962: // 'element' 'nodes'
+ case 100027: // 'namespace' 'nodes'
+ case 100060: // 'processing-instruction' 'nodes'
+ case 100947: // 'attribute' 'null'
+ case 100986: // 'element' 'null'
+ case 101051: // 'namespace' 'null'
+ case 101084: // 'processing-instruction' 'null'
+ case 101459: // 'attribute' 'object'
+ case 101498: // 'element' 'object'
+ case 101563: // 'namespace' 'object'
+ case 101596: // 'processing-instruction' 'object'
+ case 104019: // 'attribute' 'option'
+ case 104058: // 'element' 'option'
+ case 104123: // 'namespace' 'option'
+ case 104156: // 'processing-instruction' 'option'
+ case 105555: // 'attribute' 'ordered'
+ case 105594: // 'element' 'ordered'
+ case 105659: // 'namespace' 'ordered'
+ case 105692: // 'processing-instruction' 'ordered'
+ case 106067: // 'attribute' 'ordering'
+ case 106106: // 'element' 'ordering'
+ case 106171: // 'namespace' 'ordering'
+ case 106204: // 'processing-instruction' 'ordering'
+ case 107603: // 'attribute' 'parent'
+ case 107642: // 'element' 'parent'
+ case 107707: // 'namespace' 'parent'
+ case 107740: // 'processing-instruction' 'parent'
+ case 110675: // 'attribute' 'preceding'
+ case 110714: // 'element' 'preceding'
+ case 110779: // 'namespace' 'preceding'
+ case 110812: // 'processing-instruction' 'preceding'
+ case 111187: // 'attribute' 'preceding-sibling'
+ case 111226: // 'element' 'preceding-sibling'
+ case 111291: // 'namespace' 'preceding-sibling'
+ case 111324: // 'processing-instruction' 'preceding-sibling'
+ case 112723: // 'attribute' 'processing-instruction'
+ case 112762: // 'element' 'processing-instruction'
+ case 112827: // 'namespace' 'processing-instruction'
+ case 112860: // 'processing-instruction' 'processing-instruction'
+ case 113747: // 'attribute' 'rename'
+ case 113786: // 'element' 'rename'
+ case 113851: // 'namespace' 'rename'
+ case 113884: // 'processing-instruction' 'rename'
+ case 114259: // 'attribute' 'replace'
+ case 114298: // 'element' 'replace'
+ case 114363: // 'namespace' 'replace'
+ case 114396: // 'processing-instruction' 'replace'
+ case 115283: // 'attribute' 'returning'
+ case 115322: // 'element' 'returning'
+ case 115387: // 'namespace' 'returning'
+ case 115420: // 'processing-instruction' 'returning'
+ case 115795: // 'attribute' 'revalidation'
+ case 115834: // 'element' 'revalidation'
+ case 115899: // 'namespace' 'revalidation'
+ case 115932: // 'processing-instruction' 'revalidation'
+ case 117331: // 'attribute' 'schema'
+ case 117370: // 'element' 'schema'
+ case 117435: // 'namespace' 'schema'
+ case 117468: // 'processing-instruction' 'schema'
+ case 117843: // 'attribute' 'schema-attribute'
+ case 117882: // 'element' 'schema-attribute'
+ case 117947: // 'namespace' 'schema-attribute'
+ case 117980: // 'processing-instruction' 'schema-attribute'
+ case 118355: // 'attribute' 'schema-element'
+ case 118394: // 'element' 'schema-element'
+ case 118459: // 'namespace' 'schema-element'
+ case 118492: // 'processing-instruction' 'schema-element'
+ case 118867: // 'attribute' 'score'
+ case 118906: // 'element' 'score'
+ case 118971: // 'namespace' 'score'
+ case 119004: // 'processing-instruction' 'score'
+ case 119379: // 'attribute' 'select'
+ case 119418: // 'element' 'select'
+ case 119483: // 'namespace' 'select'
+ case 119516: // 'processing-instruction' 'select'
+ case 119891: // 'attribute' 'self'
+ case 119930: // 'element' 'self'
+ case 119995: // 'namespace' 'self'
+ case 120028: // 'processing-instruction' 'self'
+ case 122451: // 'attribute' 'sliding'
+ case 122490: // 'element' 'sliding'
+ case 122555: // 'namespace' 'sliding'
+ case 122588: // 'processing-instruction' 'sliding'
+ case 122963: // 'attribute' 'some'
+ case 123002: // 'element' 'some'
+ case 123067: // 'namespace' 'some'
+ case 123100: // 'processing-instruction' 'some'
+ case 125523: // 'attribute' 'strict'
+ case 125562: // 'element' 'strict'
+ case 125627: // 'namespace' 'strict'
+ case 125660: // 'processing-instruction' 'strict'
+ case 126547: // 'attribute' 'structured-item'
+ case 126586: // 'element' 'structured-item'
+ case 127059: // 'attribute' 'switch'
+ case 127098: // 'element' 'switch'
+ case 127163: // 'namespace' 'switch'
+ case 127196: // 'processing-instruction' 'switch'
+ case 127571: // 'attribute' 'text'
+ case 127610: // 'element' 'text'
+ case 127675: // 'namespace' 'text'
+ case 127708: // 'processing-instruction' 'text'
+ case 130643: // 'attribute' 'true'
+ case 130682: // 'element' 'true'
+ case 130747: // 'namespace' 'true'
+ case 130780: // 'processing-instruction' 'true'
+ case 131155: // 'attribute' 'try'
+ case 131194: // 'element' 'try'
+ case 131259: // 'namespace' 'try'
+ case 131292: // 'processing-instruction' 'try'
+ case 131667: // 'attribute' 'tumbling'
+ case 131706: // 'element' 'tumbling'
+ case 131771: // 'namespace' 'tumbling'
+ case 131804: // 'processing-instruction' 'tumbling'
+ case 132179: // 'attribute' 'type'
+ case 132218: // 'element' 'type'
+ case 132283: // 'namespace' 'type'
+ case 132316: // 'processing-instruction' 'type'
+ case 132691: // 'attribute' 'typeswitch'
+ case 132730: // 'element' 'typeswitch'
+ case 132795: // 'namespace' 'typeswitch'
+ case 132828: // 'processing-instruction' 'typeswitch'
+ case 134227: // 'attribute' 'unordered'
+ case 134266: // 'element' 'unordered'
+ case 134331: // 'namespace' 'unordered'
+ case 134364: // 'processing-instruction' 'unordered'
+ case 134739: // 'attribute' 'updating'
+ case 134778: // 'element' 'updating'
+ case 134843: // 'namespace' 'updating'
+ case 134876: // 'processing-instruction' 'updating'
+ case 136275: // 'attribute' 'validate'
+ case 136314: // 'element' 'validate'
+ case 136379: // 'namespace' 'validate'
+ case 136412: // 'processing-instruction' 'validate'
+ case 136787: // 'attribute' 'value'
+ case 136826: // 'element' 'value'
+ case 136891: // 'namespace' 'value'
+ case 136924: // 'processing-instruction' 'value'
+ case 137299: // 'attribute' 'variable'
+ case 137338: // 'element' 'variable'
+ case 137403: // 'namespace' 'variable'
+ case 137436: // 'processing-instruction' 'variable'
+ case 137811: // 'attribute' 'version'
+ case 137850: // 'element' 'version'
+ case 137915: // 'namespace' 'version'
+ case 137948: // 'processing-instruction' 'version'
+ case 139859: // 'attribute' 'while'
+ case 139898: // 'element' 'while'
+ case 139963: // 'namespace' 'while'
+ case 139996: // 'processing-instruction' 'while'
+ case 143955: // 'attribute' '{'
+ case 143969: // 'comment' '{'
+ case 143992: // 'document' '{'
+ case 143994: // 'element' '{'
+ case 144059: // 'namespace' '{'
+ case 144078: // 'ordered' '{'
+ case 144092: // 'processing-instruction' '{'
+ case 144121: // 'text' '{'
+ case 144134: // 'unordered' '{'
+ parse_PostfixExpr();
+ break;
+ default:
+ parse_AxisStep();
+ }
+ eventHandler.endNonterminal("StepExpr", e0);
+ }
+
+ function try_StepExpr()
+ {
+ switch (l1)
+ {
+ case 83: // 'attribute'
+ lookahead2W(287); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 122: // 'element'
+ lookahead2W(286); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 187: // 'namespace'
+ case 220: // 'processing-instruction'
+ lookahead2W(284); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 135: // 'false'
+ case 197: // 'null'
+ case 255: // 'true'
+ lookahead2W(236); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '.' |
+ break;
+ case 97: // 'comment'
+ case 120: // 'document'
+ case 206: // 'ordered'
+ case 249: // 'text'
+ case 262: // 'unordered'
+ lookahead2W(238); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 79: // 'array'
+ case 125: // 'empty-sequence'
+ case 154: // 'if'
+ case 167: // 'item'
+ case 169: // 'json-item'
+ case 247: // 'structured-item'
+ case 248: // 'switch'
+ case 259: // 'typeswitch'
+ lookahead2W(229); // S^WS | EOF | '!' | '!=' | '#' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 94: // 'child'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ case 234: // 'self'
+ lookahead2W(237); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 6: // EQName^Token
+ case 71: // 'after'
+ case 73: // 'allowing'
+ case 76: // 'and'
+ case 78: // 'append'
+ case 80: // 'as'
+ case 81: // 'ascending'
+ case 82: // 'at'
+ case 84: // 'base-uri'
+ case 85: // 'before'
+ case 86: // 'boundary-space'
+ case 87: // 'break'
+ case 89: // 'case'
+ case 90: // 'cast'
+ case 91: // 'castable'
+ case 92: // 'catch'
+ case 95: // 'collation'
+ case 98: // 'constraint'
+ case 99: // 'construction'
+ case 102: // 'context'
+ case 103: // 'continue'
+ case 104: // 'copy'
+ case 105: // 'copy-namespaces'
+ case 106: // 'count'
+ case 107: // 'decimal-format'
+ case 109: // 'declare'
+ case 110: // 'default'
+ case 111: // 'delete'
+ case 114: // 'descending'
+ case 119: // 'div'
+ case 121: // 'document-node'
+ case 123: // 'else'
+ case 124: // 'empty'
+ case 126: // 'encoding'
+ case 127: // 'end'
+ case 129: // 'eq'
+ case 130: // 'every'
+ case 132: // 'except'
+ case 133: // 'exit'
+ case 134: // 'external'
+ case 136: // 'first'
+ case 139: // 'for'
+ case 142: // 'from'
+ case 143: // 'ft-option'
+ case 147: // 'function'
+ case 148: // 'ge'
+ case 150: // 'group'
+ case 152: // 'gt'
+ case 153: // 'idiv'
+ case 155: // 'import'
+ case 156: // 'in'
+ case 157: // 'index'
+ case 161: // 'insert'
+ case 162: // 'instance'
+ case 163: // 'integrity'
+ case 164: // 'intersect'
+ case 165: // 'into'
+ case 166: // 'is'
+ case 168: // 'json'
+ case 170: // 'jsoniq'
+ case 173: // 'last'
+ case 174: // 'lax'
+ case 175: // 'le'
+ case 177: // 'let'
+ case 179: // 'loop'
+ case 181: // 'lt'
+ case 183: // 'mod'
+ case 184: // 'modify'
+ case 185: // 'module'
+ case 188: // 'namespace-node'
+ case 189: // 'ne'
+ case 194: // 'node'
+ case 195: // 'nodes'
+ case 198: // 'object'
+ case 202: // 'only'
+ case 203: // 'option'
+ case 204: // 'or'
+ case 205: // 'order'
+ case 207: // 'ordering'
+ case 222: // 'rename'
+ case 223: // 'replace'
+ case 224: // 'return'
+ case 225: // 'returning'
+ case 226: // 'revalidation'
+ case 228: // 'satisfies'
+ case 229: // 'schema'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 232: // 'score'
+ case 233: // 'select'
+ case 239: // 'sliding'
+ case 240: // 'some'
+ case 241: // 'stable'
+ case 242: // 'start'
+ case 245: // 'strict'
+ case 253: // 'to'
+ case 254: // 'treat'
+ case 256: // 'try'
+ case 257: // 'tumbling'
+ case 258: // 'type'
+ case 260: // 'union'
+ case 263: // 'updating'
+ case 266: // 'validate'
+ case 267: // 'value'
+ case 268: // 'variable'
+ case 269: // 'version'
+ case 272: // 'where'
+ case 273: // 'while'
+ case 276: // 'with'
+ lookahead2W(233); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 12935 // 'false' EOF
+ || lk == 12997 // 'null' EOF
+ || lk == 13055 // 'true' EOF
+ || lk == 13447 // 'false' '!'
+ || lk == 13509 // 'null' '!'
+ || lk == 13567 // 'true' '!'
+ || lk == 13959 // 'false' '!='
+ || lk == 14021 // 'null' '!='
+ || lk == 14079 // 'true' '!='
+ || lk == 19591 // 'false' ')'
+ || lk == 19653 // 'null' ')'
+ || lk == 19711 // 'true' ')'
+ || lk == 20103 // 'false' '*'
+ || lk == 20165 // 'null' '*'
+ || lk == 20223 // 'true' '*'
+ || lk == 21127 // 'false' '+'
+ || lk == 21189 // 'null' '+'
+ || lk == 21247 // 'true' '+'
+ || lk == 21639 // 'false' ','
+ || lk == 21701 // 'null' ','
+ || lk == 21759 // 'true' ','
+ || lk == 22151 // 'false' '-'
+ || lk == 22213 // 'null' '-'
+ || lk == 22271 // 'true' '-'
+ || lk == 24199 // 'false' '/'
+ || lk == 24261 // 'null' '/'
+ || lk == 24319 // 'true' '/'
+ || lk == 24711 // 'false' '//'
+ || lk == 24773 // 'null' '//'
+ || lk == 24831 // 'true' '//'
+ || lk == 25735 // 'false' ':'
+ || lk == 25797 // 'null' ':'
+ || lk == 25855 // 'true' ':'
+ || lk == 27783 // 'false' ';'
+ || lk == 27845 // 'null' ';'
+ || lk == 27903 // 'true' ';'
+ || lk == 28295 // 'false' '<'
+ || lk == 28357 // 'null' '<'
+ || lk == 28415 // 'true' '<'
+ || lk == 29831 // 'false' '<<'
+ || lk == 29893 // 'null' '<<'
+ || lk == 29951 // 'true' '<<'
+ || lk == 30343 // 'false' '<='
+ || lk == 30405 // 'null' '<='
+ || lk == 30463 // 'true' '<='
+ || lk == 31367 // 'false' '='
+ || lk == 31429 // 'null' '='
+ || lk == 31487 // 'true' '='
+ || lk == 31879 // 'false' '>'
+ || lk == 31941 // 'null' '>'
+ || lk == 31999 // 'true' '>'
+ || lk == 32391 // 'false' '>='
+ || lk == 32453 // 'null' '>='
+ || lk == 32511 // 'true' '>='
+ || lk == 32903 // 'false' '>>'
+ || lk == 32965 // 'null' '>>'
+ || lk == 33023 // 'true' '>>'
+ || lk == 35463 // 'false' '['
+ || lk == 35525 // 'null' '['
+ || lk == 35583 // 'true' '['
+ || lk == 35975 // 'false' ']'
+ || lk == 36037 // 'null' ']'
+ || lk == 36095 // 'true' ']'
+ || lk == 36435 // 'attribute' 'after'
+ || lk == 36474 // 'element' 'after'
+ || lk == 36487 // 'false' 'after'
+ || lk == 36539 // 'namespace' 'after'
+ || lk == 36549 // 'null' 'after'
+ || lk == 36572 // 'processing-instruction' 'after'
+ || lk == 36607 // 'true' 'after'
+ || lk == 38995 // 'attribute' 'and'
+ || lk == 39034 // 'element' 'and'
+ || lk == 39047 // 'false' 'and'
+ || lk == 39099 // 'namespace' 'and'
+ || lk == 39109 // 'null' 'and'
+ || lk == 39132 // 'processing-instruction' 'and'
+ || lk == 39167 // 'true' 'and'
+ || lk == 41043 // 'attribute' 'as'
+ || lk == 41082 // 'element' 'as'
+ || lk == 41095 // 'false' 'as'
+ || lk == 41147 // 'namespace' 'as'
+ || lk == 41157 // 'null' 'as'
+ || lk == 41180 // 'processing-instruction' 'as'
+ || lk == 41215 // 'true' 'as'
+ || lk == 41555 // 'attribute' 'ascending'
+ || lk == 41594 // 'element' 'ascending'
+ || lk == 41607 // 'false' 'ascending'
+ || lk == 41659 // 'namespace' 'ascending'
+ || lk == 41669 // 'null' 'ascending'
+ || lk == 41692 // 'processing-instruction' 'ascending'
+ || lk == 41727 // 'true' 'ascending'
+ || lk == 42067 // 'attribute' 'at'
+ || lk == 42106 // 'element' 'at'
+ || lk == 42119 // 'false' 'at'
+ || lk == 42171 // 'namespace' 'at'
+ || lk == 42181 // 'null' 'at'
+ || lk == 42204 // 'processing-instruction' 'at'
+ || lk == 42239 // 'true' 'at'
+ || lk == 43603 // 'attribute' 'before'
+ || lk == 43642 // 'element' 'before'
+ || lk == 43655 // 'false' 'before'
+ || lk == 43707 // 'namespace' 'before'
+ || lk == 43717 // 'null' 'before'
+ || lk == 43740 // 'processing-instruction' 'before'
+ || lk == 43775 // 'true' 'before'
+ || lk == 45191 // 'false' 'by'
+ || lk == 45253 // 'null' 'by'
+ || lk == 45311 // 'true' 'by'
+ || lk == 45651 // 'attribute' 'case'
+ || lk == 45690 // 'element' 'case'
+ || lk == 45703 // 'false' 'case'
+ || lk == 45755 // 'namespace' 'case'
+ || lk == 45765 // 'null' 'case'
+ || lk == 45788 // 'processing-instruction' 'case'
+ || lk == 45823 // 'true' 'case'
+ || lk == 46163 // 'attribute' 'cast'
+ || lk == 46202 // 'element' 'cast'
+ || lk == 46215 // 'false' 'cast'
+ || lk == 46267 // 'namespace' 'cast'
+ || lk == 46277 // 'null' 'cast'
+ || lk == 46300 // 'processing-instruction' 'cast'
+ || lk == 46335 // 'true' 'cast'
+ || lk == 46675 // 'attribute' 'castable'
+ || lk == 46714 // 'element' 'castable'
+ || lk == 46727 // 'false' 'castable'
+ || lk == 46779 // 'namespace' 'castable'
+ || lk == 46789 // 'null' 'castable'
+ || lk == 46812 // 'processing-instruction' 'castable'
+ || lk == 46847 // 'true' 'castable'
+ || lk == 48723 // 'attribute' 'collation'
+ || lk == 48762 // 'element' 'collation'
+ || lk == 48775 // 'false' 'collation'
+ || lk == 48827 // 'namespace' 'collation'
+ || lk == 48837 // 'null' 'collation'
+ || lk == 48860 // 'processing-instruction' 'collation'
+ || lk == 48895 // 'true' 'collation'
+ || lk == 51335 // 'false' 'contains'
+ || lk == 51397 // 'null' 'contains'
+ || lk == 51455 // 'true' 'contains'
+ || lk == 54355 // 'attribute' 'count'
+ || lk == 54394 // 'element' 'count'
+ || lk == 54407 // 'false' 'count'
+ || lk == 54459 // 'namespace' 'count'
+ || lk == 54469 // 'null' 'count'
+ || lk == 54492 // 'processing-instruction' 'count'
+ || lk == 54527 // 'true' 'count'
+ || lk == 56403 // 'attribute' 'default'
+ || lk == 56442 // 'element' 'default'
+ || lk == 56455 // 'false' 'default'
+ || lk == 56507 // 'namespace' 'default'
+ || lk == 56517 // 'null' 'default'
+ || lk == 56540 // 'processing-instruction' 'default'
+ || lk == 56575 // 'true' 'default'
+ || lk == 58451 // 'attribute' 'descending'
+ || lk == 58490 // 'element' 'descending'
+ || lk == 58503 // 'false' 'descending'
+ || lk == 58555 // 'namespace' 'descending'
+ || lk == 58565 // 'null' 'descending'
+ || lk == 58588 // 'processing-instruction' 'descending'
+ || lk == 58623 // 'true' 'descending'
+ || lk == 61011 // 'attribute' 'div'
+ || lk == 61050 // 'element' 'div'
+ || lk == 61063 // 'false' 'div'
+ || lk == 61115 // 'namespace' 'div'
+ || lk == 61125 // 'null' 'div'
+ || lk == 61148 // 'processing-instruction' 'div'
+ || lk == 61183 // 'true' 'div'
+ || lk == 63059 // 'attribute' 'else'
+ || lk == 63098 // 'element' 'else'
+ || lk == 63111 // 'false' 'else'
+ || lk == 63163 // 'namespace' 'else'
+ || lk == 63173 // 'null' 'else'
+ || lk == 63196 // 'processing-instruction' 'else'
+ || lk == 63231 // 'true' 'else'
+ || lk == 63571 // 'attribute' 'empty'
+ || lk == 63610 // 'element' 'empty'
+ || lk == 63623 // 'false' 'empty'
+ || lk == 63675 // 'namespace' 'empty'
+ || lk == 63685 // 'null' 'empty'
+ || lk == 63708 // 'processing-instruction' 'empty'
+ || lk == 63743 // 'true' 'empty'
+ || lk == 65107 // 'attribute' 'end'
+ || lk == 65146 // 'element' 'end'
+ || lk == 65159 // 'false' 'end'
+ || lk == 65211 // 'namespace' 'end'
+ || lk == 65221 // 'null' 'end'
+ || lk == 65244 // 'processing-instruction' 'end'
+ || lk == 65279 // 'true' 'end'
+ || lk == 66131 // 'attribute' 'eq'
+ || lk == 66170 // 'element' 'eq'
+ || lk == 66183 // 'false' 'eq'
+ || lk == 66235 // 'namespace' 'eq'
+ || lk == 66245 // 'null' 'eq'
+ || lk == 66268 // 'processing-instruction' 'eq'
+ || lk == 66303 // 'true' 'eq'
+ || lk == 67667 // 'attribute' 'except'
+ || lk == 67706 // 'element' 'except'
+ || lk == 67719 // 'false' 'except'
+ || lk == 67771 // 'namespace' 'except'
+ || lk == 67781 // 'null' 'except'
+ || lk == 67804 // 'processing-instruction' 'except'
+ || lk == 67839 // 'true' 'except'
+ || lk == 71251 // 'attribute' 'for'
+ || lk == 71290 // 'element' 'for'
+ || lk == 71303 // 'false' 'for'
+ || lk == 71355 // 'namespace' 'for'
+ || lk == 71365 // 'null' 'for'
+ || lk == 71388 // 'processing-instruction' 'for'
+ || lk == 71423 // 'true' 'for'
+ || lk == 75859 // 'attribute' 'ge'
+ || lk == 75898 // 'element' 'ge'
+ || lk == 75911 // 'false' 'ge'
+ || lk == 75963 // 'namespace' 'ge'
+ || lk == 75973 // 'null' 'ge'
+ || lk == 75996 // 'processing-instruction' 'ge'
+ || lk == 76031 // 'true' 'ge'
+ || lk == 76883 // 'attribute' 'group'
+ || lk == 76922 // 'element' 'group'
+ || lk == 76935 // 'false' 'group'
+ || lk == 76987 // 'namespace' 'group'
+ || lk == 76997 // 'null' 'group'
+ || lk == 77020 // 'processing-instruction' 'group'
+ || lk == 77055 // 'true' 'group'
+ || lk == 77907 // 'attribute' 'gt'
+ || lk == 77946 // 'element' 'gt'
+ || lk == 77959 // 'false' 'gt'
+ || lk == 78011 // 'namespace' 'gt'
+ || lk == 78021 // 'null' 'gt'
+ || lk == 78044 // 'processing-instruction' 'gt'
+ || lk == 78079 // 'true' 'gt'
+ || lk == 78419 // 'attribute' 'idiv'
+ || lk == 78458 // 'element' 'idiv'
+ || lk == 78471 // 'false' 'idiv'
+ || lk == 78523 // 'namespace' 'idiv'
+ || lk == 78533 // 'null' 'idiv'
+ || lk == 78556 // 'processing-instruction' 'idiv'
+ || lk == 78591 // 'true' 'idiv'
+ || lk == 83027 // 'attribute' 'instance'
+ || lk == 83066 // 'element' 'instance'
+ || lk == 83079 // 'false' 'instance'
+ || lk == 83131 // 'namespace' 'instance'
+ || lk == 83141 // 'null' 'instance'
+ || lk == 83164 // 'processing-instruction' 'instance'
+ || lk == 83199 // 'true' 'instance'
+ || lk == 84051 // 'attribute' 'intersect'
+ || lk == 84090 // 'element' 'intersect'
+ || lk == 84103 // 'false' 'intersect'
+ || lk == 84155 // 'namespace' 'intersect'
+ || lk == 84165 // 'null' 'intersect'
+ || lk == 84188 // 'processing-instruction' 'intersect'
+ || lk == 84223 // 'true' 'intersect'
+ || lk == 84563 // 'attribute' 'into'
+ || lk == 84602 // 'element' 'into'
+ || lk == 84615 // 'false' 'into'
+ || lk == 84667 // 'namespace' 'into'
+ || lk == 84677 // 'null' 'into'
+ || lk == 84700 // 'processing-instruction' 'into'
+ || lk == 84735 // 'true' 'into'
+ || lk == 85075 // 'attribute' 'is'
+ || lk == 85114 // 'element' 'is'
+ || lk == 85127 // 'false' 'is'
+ || lk == 85179 // 'namespace' 'is'
+ || lk == 85189 // 'null' 'is'
+ || lk == 85212 // 'processing-instruction' 'is'
+ || lk == 85247 // 'true' 'is'
+ || lk == 89683 // 'attribute' 'le'
+ || lk == 89722 // 'element' 'le'
+ || lk == 89735 // 'false' 'le'
+ || lk == 89787 // 'namespace' 'le'
+ || lk == 89797 // 'null' 'le'
+ || lk == 89820 // 'processing-instruction' 'le'
+ || lk == 89855 // 'true' 'le'
+ || lk == 90707 // 'attribute' 'let'
+ || lk == 90746 // 'element' 'let'
+ || lk == 90759 // 'false' 'let'
+ || lk == 90811 // 'namespace' 'let'
+ || lk == 90821 // 'null' 'let'
+ || lk == 90844 // 'processing-instruction' 'let'
+ || lk == 90879 // 'true' 'let'
+ || lk == 92755 // 'attribute' 'lt'
+ || lk == 92794 // 'element' 'lt'
+ || lk == 92807 // 'false' 'lt'
+ || lk == 92859 // 'namespace' 'lt'
+ || lk == 92869 // 'null' 'lt'
+ || lk == 92892 // 'processing-instruction' 'lt'
+ || lk == 92927 // 'true' 'lt'
+ || lk == 93779 // 'attribute' 'mod'
+ || lk == 93818 // 'element' 'mod'
+ || lk == 93831 // 'false' 'mod'
+ || lk == 93883 // 'namespace' 'mod'
+ || lk == 93893 // 'null' 'mod'
+ || lk == 93916 // 'processing-instruction' 'mod'
+ || lk == 93951 // 'true' 'mod'
+ || lk == 94291 // 'attribute' 'modify'
+ || lk == 94330 // 'element' 'modify'
+ || lk == 94343 // 'false' 'modify'
+ || lk == 94395 // 'namespace' 'modify'
+ || lk == 94405 // 'null' 'modify'
+ || lk == 94428 // 'processing-instruction' 'modify'
+ || lk == 94463 // 'true' 'modify'
+ || lk == 96851 // 'attribute' 'ne'
+ || lk == 96890 // 'element' 'ne'
+ || lk == 96903 // 'false' 'ne'
+ || lk == 96955 // 'namespace' 'ne'
+ || lk == 96965 // 'null' 'ne'
+ || lk == 96988 // 'processing-instruction' 'ne'
+ || lk == 97023 // 'true' 'ne'
+ || lk == 103507 // 'attribute' 'only'
+ || lk == 103546 // 'element' 'only'
+ || lk == 103559 // 'false' 'only'
+ || lk == 103611 // 'namespace' 'only'
+ || lk == 103621 // 'null' 'only'
+ || lk == 103644 // 'processing-instruction' 'only'
+ || lk == 103679 // 'true' 'only'
+ || lk == 104531 // 'attribute' 'or'
+ || lk == 104570 // 'element' 'or'
+ || lk == 104583 // 'false' 'or'
+ || lk == 104635 // 'namespace' 'or'
+ || lk == 104645 // 'null' 'or'
+ || lk == 104668 // 'processing-instruction' 'or'
+ || lk == 104703 // 'true' 'or'
+ || lk == 105043 // 'attribute' 'order'
+ || lk == 105082 // 'element' 'order'
+ || lk == 105095 // 'false' 'order'
+ || lk == 105147 // 'namespace' 'order'
+ || lk == 105157 // 'null' 'order'
+ || lk == 105180 // 'processing-instruction' 'order'
+ || lk == 105215 // 'true' 'order'
+ || lk == 107143 // 'false' 'paragraphs'
+ || lk == 107205 // 'null' 'paragraphs'
+ || lk == 107263 // 'true' 'paragraphs'
+ || lk == 114771 // 'attribute' 'return'
+ || lk == 114810 // 'element' 'return'
+ || lk == 114823 // 'false' 'return'
+ || lk == 114875 // 'namespace' 'return'
+ || lk == 114885 // 'null' 'return'
+ || lk == 114908 // 'processing-instruction' 'return'
+ || lk == 114943 // 'true' 'return'
+ || lk == 116819 // 'attribute' 'satisfies'
+ || lk == 116858 // 'element' 'satisfies'
+ || lk == 116871 // 'false' 'satisfies'
+ || lk == 116923 // 'namespace' 'satisfies'
+ || lk == 116933 // 'null' 'satisfies'
+ || lk == 116956 // 'processing-instruction' 'satisfies'
+ || lk == 116991 // 'true' 'satisfies'
+ || lk == 121479 // 'false' 'sentences'
+ || lk == 121541 // 'null' 'sentences'
+ || lk == 121599 // 'true' 'sentences'
+ || lk == 123475 // 'attribute' 'stable'
+ || lk == 123514 // 'element' 'stable'
+ || lk == 123527 // 'false' 'stable'
+ || lk == 123579 // 'namespace' 'stable'
+ || lk == 123589 // 'null' 'stable'
+ || lk == 123612 // 'processing-instruction' 'stable'
+ || lk == 123647 // 'true' 'stable'
+ || lk == 123987 // 'attribute' 'start'
+ || lk == 124026 // 'element' 'start'
+ || lk == 124039 // 'false' 'start'
+ || lk == 124091 // 'namespace' 'start'
+ || lk == 124101 // 'null' 'start'
+ || lk == 124124 // 'processing-instruction' 'start'
+ || lk == 124159 // 'true' 'start'
+ || lk == 129159 // 'false' 'times'
+ || lk == 129221 // 'null' 'times'
+ || lk == 129279 // 'true' 'times'
+ || lk == 129619 // 'attribute' 'to'
+ || lk == 129658 // 'element' 'to'
+ || lk == 129671 // 'false' 'to'
+ || lk == 129723 // 'namespace' 'to'
+ || lk == 129733 // 'null' 'to'
+ || lk == 129756 // 'processing-instruction' 'to'
+ || lk == 129791 // 'true' 'to'
+ || lk == 130131 // 'attribute' 'treat'
+ || lk == 130170 // 'element' 'treat'
+ || lk == 130183 // 'false' 'treat'
+ || lk == 130235 // 'namespace' 'treat'
+ || lk == 130245 // 'null' 'treat'
+ || lk == 130268 // 'processing-instruction' 'treat'
+ || lk == 130303 // 'true' 'treat'
+ || lk == 133203 // 'attribute' 'union'
+ || lk == 133242 // 'element' 'union'
+ || lk == 133255 // 'false' 'union'
+ || lk == 133307 // 'namespace' 'union'
+ || lk == 133317 // 'null' 'union'
+ || lk == 133340 // 'processing-instruction' 'union'
+ || lk == 133375 // 'true' 'union'
+ || lk == 139347 // 'attribute' 'where'
+ || lk == 139386 // 'element' 'where'
+ || lk == 139399 // 'false' 'where'
+ || lk == 139451 // 'namespace' 'where'
+ || lk == 139461 // 'null' 'where'
+ || lk == 139484 // 'processing-instruction' 'where'
+ || lk == 139519 // 'true' 'where'
+ || lk == 141395 // 'attribute' 'with'
+ || lk == 141434 // 'element' 'with'
+ || lk == 141447 // 'false' 'with'
+ || lk == 141499 // 'namespace' 'with'
+ || lk == 141509 // 'null' 'with'
+ || lk == 141532 // 'processing-instruction' 'with'
+ || lk == 141567 // 'true' 'with'
+ || lk == 142983 // 'false' 'words'
+ || lk == 143045 // 'null' 'words'
+ || lk == 143103 // 'true' 'words'
+ || lk == 145543 // 'false' '|'
+ || lk == 145605 // 'null' '|'
+ || lk == 145663 // 'true' '|'
+ || lk == 146055 // 'false' '||'
+ || lk == 146117 // 'null' '||'
+ || lk == 146175 // 'true' '||'
+ || lk == 146567 // 'false' '|}'
+ || lk == 146629 // 'null' '|}'
+ || lk == 146687 // 'true' '|}'
+ || lk == 147079 // 'false' '}'
+ || lk == 147141 // 'null' '}'
+ || lk == 147199) // 'true' '}'
+ {
+ 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_PostfixExpr();
+ memoize(4, e0A, -1);
+ lk = -3;
+ }
+ 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, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 31: // '$'
+ case 32: // '$$'
+ case 33: // '%'
+ case 35: // '('
+ case 55: // '<'
+ case 56: // '<!--'
+ case 60: // '<?'
+ case 69: // '['
+ case 281: // '{'
+ case 283: // '{|'
+ case 3155: // 'attribute' EQName^Token
+ case 3194: // 'element' EQName^Token
+ case 9915: // 'namespace' NCName^Token
+ case 9948: // 'processing-instruction' NCName^Token
+ case 14854: // EQName^Token '#'
+ case 14919: // 'after' '#'
+ case 14921: // 'allowing' '#'
+ case 14922: // 'ancestor' '#'
+ case 14923: // 'ancestor-or-self' '#'
+ case 14924: // 'and' '#'
+ case 14926: // 'append' '#'
+ case 14927: // 'array' '#'
+ case 14928: // 'as' '#'
+ case 14929: // 'ascending' '#'
+ case 14930: // 'at' '#'
+ case 14931: // 'attribute' '#'
+ case 14932: // 'base-uri' '#'
+ case 14933: // 'before' '#'
+ case 14934: // 'boundary-space' '#'
+ case 14935: // 'break' '#'
+ case 14937: // 'case' '#'
+ case 14938: // 'cast' '#'
+ case 14939: // 'castable' '#'
+ case 14940: // 'catch' '#'
+ case 14942: // 'child' '#'
+ case 14943: // 'collation' '#'
+ case 14945: // 'comment' '#'
+ case 14946: // 'constraint' '#'
+ case 14947: // 'construction' '#'
+ case 14950: // 'context' '#'
+ case 14951: // 'continue' '#'
+ case 14952: // 'copy' '#'
+ case 14953: // 'copy-namespaces' '#'
+ case 14954: // 'count' '#'
+ case 14955: // 'decimal-format' '#'
+ case 14957: // 'declare' '#'
+ case 14958: // 'default' '#'
+ case 14959: // 'delete' '#'
+ case 14960: // 'descendant' '#'
+ case 14961: // 'descendant-or-self' '#'
+ case 14962: // 'descending' '#'
+ case 14967: // 'div' '#'
+ case 14968: // 'document' '#'
+ case 14969: // 'document-node' '#'
+ case 14970: // 'element' '#'
+ case 14971: // 'else' '#'
+ case 14972: // 'empty' '#'
+ case 14973: // 'empty-sequence' '#'
+ case 14974: // 'encoding' '#'
+ case 14975: // 'end' '#'
+ case 14977: // 'eq' '#'
+ case 14978: // 'every' '#'
+ case 14980: // 'except' '#'
+ case 14981: // 'exit' '#'
+ case 14982: // 'external' '#'
+ case 14983: // 'false' '#'
+ case 14984: // 'first' '#'
+ case 14985: // 'following' '#'
+ case 14986: // 'following-sibling' '#'
+ case 14987: // 'for' '#'
+ case 14990: // 'from' '#'
+ case 14991: // 'ft-option' '#'
+ case 14995: // 'function' '#'
+ case 14996: // 'ge' '#'
+ case 14998: // 'group' '#'
+ case 15000: // 'gt' '#'
+ case 15001: // 'idiv' '#'
+ case 15002: // 'if' '#'
+ case 15003: // 'import' '#'
+ case 15004: // 'in' '#'
+ case 15005: // 'index' '#'
+ case 15009: // 'insert' '#'
+ case 15010: // 'instance' '#'
+ case 15011: // 'integrity' '#'
+ case 15012: // 'intersect' '#'
+ case 15013: // 'into' '#'
+ case 15014: // 'is' '#'
+ case 15015: // 'item' '#'
+ case 15016: // 'json' '#'
+ case 15017: // 'json-item' '#'
+ case 15018: // 'jsoniq' '#'
+ case 15021: // 'last' '#'
+ case 15022: // 'lax' '#'
+ case 15023: // 'le' '#'
+ case 15025: // 'let' '#'
+ case 15027: // 'loop' '#'
+ case 15029: // 'lt' '#'
+ case 15031: // 'mod' '#'
+ case 15032: // 'modify' '#'
+ case 15033: // 'module' '#'
+ case 15035: // 'namespace' '#'
+ case 15036: // 'namespace-node' '#'
+ case 15037: // 'ne' '#'
+ case 15042: // 'node' '#'
+ case 15043: // 'nodes' '#'
+ case 15045: // 'null' '#'
+ case 15046: // 'object' '#'
+ case 15050: // 'only' '#'
+ case 15051: // 'option' '#'
+ case 15052: // 'or' '#'
+ case 15053: // 'order' '#'
+ case 15054: // 'ordered' '#'
+ case 15055: // 'ordering' '#'
+ case 15058: // 'parent' '#'
+ case 15064: // 'preceding' '#'
+ case 15065: // 'preceding-sibling' '#'
+ case 15068: // 'processing-instruction' '#'
+ case 15070: // 'rename' '#'
+ case 15071: // 'replace' '#'
+ case 15072: // 'return' '#'
+ case 15073: // 'returning' '#'
+ case 15074: // 'revalidation' '#'
+ case 15076: // 'satisfies' '#'
+ case 15077: // 'schema' '#'
+ case 15078: // 'schema-attribute' '#'
+ case 15079: // 'schema-element' '#'
+ case 15080: // 'score' '#'
+ case 15081: // 'select' '#'
+ case 15082: // 'self' '#'
+ case 15087: // 'sliding' '#'
+ case 15088: // 'some' '#'
+ case 15089: // 'stable' '#'
+ case 15090: // 'start' '#'
+ case 15093: // 'strict' '#'
+ case 15095: // 'structured-item' '#'
+ case 15096: // 'switch' '#'
+ case 15097: // 'text' '#'
+ case 15101: // 'to' '#'
+ case 15102: // 'treat' '#'
+ case 15103: // 'true' '#'
+ case 15104: // 'try' '#'
+ case 15105: // 'tumbling' '#'
+ case 15106: // 'type' '#'
+ case 15107: // 'typeswitch' '#'
+ case 15108: // 'union' '#'
+ case 15110: // 'unordered' '#'
+ case 15111: // 'updating' '#'
+ case 15114: // 'validate' '#'
+ case 15115: // 'value' '#'
+ case 15116: // 'variable' '#'
+ case 15117: // 'version' '#'
+ case 15120: // 'where' '#'
+ case 15121: // 'while' '#'
+ case 15124: // 'with' '#'
+ case 17926: // EQName^Token '('
+ case 17991: // 'after' '('
+ case 17993: // 'allowing' '('
+ case 17994: // 'ancestor' '('
+ case 17995: // 'ancestor-or-self' '('
+ case 17996: // 'and' '('
+ case 17998: // 'append' '('
+ case 18000: // 'as' '('
+ case 18001: // 'ascending' '('
+ case 18002: // 'at' '('
+ case 18004: // 'base-uri' '('
+ case 18005: // 'before' '('
+ case 18006: // 'boundary-space' '('
+ case 18007: // 'break' '('
+ case 18009: // 'case' '('
+ case 18010: // 'cast' '('
+ case 18011: // 'castable' '('
+ case 18012: // 'catch' '('
+ case 18014: // 'child' '('
+ case 18015: // 'collation' '('
+ case 18018: // 'constraint' '('
+ case 18019: // 'construction' '('
+ case 18022: // 'context' '('
+ case 18023: // 'continue' '('
+ case 18024: // 'copy' '('
+ case 18025: // 'copy-namespaces' '('
+ case 18026: // 'count' '('
+ case 18027: // 'decimal-format' '('
+ case 18029: // 'declare' '('
+ case 18030: // 'default' '('
+ case 18031: // 'delete' '('
+ case 18032: // 'descendant' '('
+ case 18033: // 'descendant-or-self' '('
+ case 18034: // 'descending' '('
+ case 18039: // 'div' '('
+ case 18040: // 'document' '('
+ case 18043: // 'else' '('
+ case 18044: // 'empty' '('
+ case 18046: // 'encoding' '('
+ case 18047: // 'end' '('
+ case 18049: // 'eq' '('
+ case 18050: // 'every' '('
+ case 18052: // 'except' '('
+ case 18053: // 'exit' '('
+ case 18054: // 'external' '('
+ case 18055: // 'false' '('
+ case 18056: // 'first' '('
+ case 18057: // 'following' '('
+ case 18058: // 'following-sibling' '('
+ case 18059: // 'for' '('
+ case 18062: // 'from' '('
+ case 18063: // 'ft-option' '('
+ case 18067: // 'function' '('
+ case 18068: // 'ge' '('
+ case 18070: // 'group' '('
+ case 18072: // 'gt' '('
+ case 18073: // 'idiv' '('
+ case 18075: // 'import' '('
+ case 18076: // 'in' '('
+ case 18077: // 'index' '('
+ case 18081: // 'insert' '('
+ case 18082: // 'instance' '('
+ case 18083: // 'integrity' '('
+ case 18084: // 'intersect' '('
+ case 18085: // 'into' '('
+ case 18086: // 'is' '('
+ case 18088: // 'json' '('
+ case 18090: // 'jsoniq' '('
+ case 18093: // 'last' '('
+ case 18094: // 'lax' '('
+ case 18095: // 'le' '('
+ case 18097: // 'let' '('
+ case 18099: // 'loop' '('
+ case 18101: // 'lt' '('
+ case 18103: // 'mod' '('
+ case 18104: // 'modify' '('
+ case 18105: // 'module' '('
+ case 18107: // 'namespace' '('
+ case 18109: // 'ne' '('
+ case 18115: // 'nodes' '('
+ case 18117: // 'null' '('
+ case 18118: // 'object' '('
+ case 18122: // 'only' '('
+ case 18123: // 'option' '('
+ case 18124: // 'or' '('
+ case 18125: // 'order' '('
+ case 18126: // 'ordered' '('
+ case 18127: // 'ordering' '('
+ case 18130: // 'parent' '('
+ case 18136: // 'preceding' '('
+ case 18137: // 'preceding-sibling' '('
+ case 18142: // 'rename' '('
+ case 18143: // 'replace' '('
+ case 18144: // 'return' '('
+ case 18145: // 'returning' '('
+ case 18146: // 'revalidation' '('
+ case 18148: // 'satisfies' '('
+ case 18149: // 'schema' '('
+ case 18152: // 'score' '('
+ case 18153: // 'select' '('
+ case 18154: // 'self' '('
+ case 18159: // 'sliding' '('
+ case 18160: // 'some' '('
+ case 18161: // 'stable' '('
+ case 18162: // 'start' '('
+ case 18165: // 'strict' '('
+ case 18173: // 'to' '('
+ case 18174: // 'treat' '('
+ case 18175: // 'true' '('
+ case 18176: // 'try' '('
+ case 18177: // 'tumbling' '('
+ case 18178: // 'type' '('
+ case 18180: // 'union' '('
+ case 18182: // 'unordered' '('
+ case 18183: // 'updating' '('
+ case 18186: // 'validate' '('
+ case 18187: // 'value' '('
+ case 18188: // 'variable' '('
+ case 18189: // 'version' '('
+ case 18192: // 'where' '('
+ case 18193: // 'while' '('
+ case 18196: // 'with' '('
+ case 23175: // 'false' '.'
+ case 23237: // 'null' '.'
+ case 23295: // 'true' '.'
+ case 37459: // 'attribute' 'allowing'
+ case 37498: // 'element' 'allowing'
+ case 37563: // 'namespace' 'allowing'
+ case 37596: // 'processing-instruction' 'allowing'
+ case 37971: // 'attribute' 'ancestor'
+ case 38010: // 'element' 'ancestor'
+ case 38075: // 'namespace' 'ancestor'
+ case 38108: // 'processing-instruction' 'ancestor'
+ case 38483: // 'attribute' 'ancestor-or-self'
+ case 38522: // 'element' 'ancestor-or-self'
+ case 38587: // 'namespace' 'ancestor-or-self'
+ case 38620: // 'processing-instruction' 'ancestor-or-self'
+ case 40019: // 'attribute' 'append'
+ case 40058: // 'element' 'append'
+ case 40123: // 'namespace' 'append'
+ case 40156: // 'processing-instruction' 'append'
+ case 40531: // 'attribute' 'array'
+ case 40570: // 'element' 'array'
+ case 42579: // 'attribute' 'attribute'
+ case 42618: // 'element' 'attribute'
+ case 42683: // 'namespace' 'attribute'
+ case 42716: // 'processing-instruction' 'attribute'
+ case 43091: // 'attribute' 'base-uri'
+ case 43130: // 'element' 'base-uri'
+ case 43195: // 'namespace' 'base-uri'
+ case 43228: // 'processing-instruction' 'base-uri'
+ case 44115: // 'attribute' 'boundary-space'
+ case 44154: // 'element' 'boundary-space'
+ case 44219: // 'namespace' 'boundary-space'
+ case 44252: // 'processing-instruction' 'boundary-space'
+ case 44627: // 'attribute' 'break'
+ case 44666: // 'element' 'break'
+ case 44731: // 'namespace' 'break'
+ case 44764: // 'processing-instruction' 'break'
+ case 47187: // 'attribute' 'catch'
+ case 47226: // 'element' 'catch'
+ case 47291: // 'namespace' 'catch'
+ case 47324: // 'processing-instruction' 'catch'
+ case 48211: // 'attribute' 'child'
+ case 48250: // 'element' 'child'
+ case 48315: // 'namespace' 'child'
+ case 48348: // 'processing-instruction' 'child'
+ case 49747: // 'attribute' 'comment'
+ case 49786: // 'element' 'comment'
+ case 49851: // 'namespace' 'comment'
+ case 49884: // 'processing-instruction' 'comment'
+ case 50259: // 'attribute' 'constraint'
+ case 50298: // 'element' 'constraint'
+ case 50363: // 'namespace' 'constraint'
+ case 50396: // 'processing-instruction' 'constraint'
+ case 50771: // 'attribute' 'construction'
+ case 50810: // 'element' 'construction'
+ case 50875: // 'namespace' 'construction'
+ case 50908: // 'processing-instruction' 'construction'
+ case 52307: // 'attribute' 'context'
+ case 52346: // 'element' 'context'
+ case 52411: // 'namespace' 'context'
+ case 52444: // 'processing-instruction' 'context'
+ case 52819: // 'attribute' 'continue'
+ case 52858: // 'element' 'continue'
+ case 52923: // 'namespace' 'continue'
+ case 52956: // 'processing-instruction' 'continue'
+ case 53331: // 'attribute' 'copy'
+ case 53370: // 'element' 'copy'
+ case 53435: // 'namespace' 'copy'
+ case 53468: // 'processing-instruction' 'copy'
+ case 53843: // 'attribute' 'copy-namespaces'
+ case 53882: // 'element' 'copy-namespaces'
+ case 53947: // 'namespace' 'copy-namespaces'
+ case 53980: // 'processing-instruction' 'copy-namespaces'
+ case 54867: // 'attribute' 'decimal-format'
+ case 54906: // 'element' 'decimal-format'
+ case 54971: // 'namespace' 'decimal-format'
+ case 55004: // 'processing-instruction' 'decimal-format'
+ case 55891: // 'attribute' 'declare'
+ case 55930: // 'element' 'declare'
+ case 55995: // 'namespace' 'declare'
+ case 56028: // 'processing-instruction' 'declare'
+ case 56915: // 'attribute' 'delete'
+ case 56954: // 'element' 'delete'
+ case 57019: // 'namespace' 'delete'
+ case 57052: // 'processing-instruction' 'delete'
+ case 57427: // 'attribute' 'descendant'
+ case 57466: // 'element' 'descendant'
+ case 57531: // 'namespace' 'descendant'
+ case 57564: // 'processing-instruction' 'descendant'
+ case 57939: // 'attribute' 'descendant-or-self'
+ case 57978: // 'element' 'descendant-or-self'
+ case 58043: // 'namespace' 'descendant-or-self'
+ case 58076: // 'processing-instruction' 'descendant-or-self'
+ case 61523: // 'attribute' 'document'
+ case 61562: // 'element' 'document'
+ case 61627: // 'namespace' 'document'
+ case 61660: // 'processing-instruction' 'document'
+ case 62035: // 'attribute' 'document-node'
+ case 62074: // 'element' 'document-node'
+ case 62139: // 'namespace' 'document-node'
+ case 62172: // 'processing-instruction' 'document-node'
+ case 62547: // 'attribute' 'element'
+ case 62586: // 'element' 'element'
+ case 62651: // 'namespace' 'element'
+ case 62684: // 'processing-instruction' 'element'
+ case 64083: // 'attribute' 'empty-sequence'
+ case 64122: // 'element' 'empty-sequence'
+ case 64187: // 'namespace' 'empty-sequence'
+ case 64220: // 'processing-instruction' 'empty-sequence'
+ case 64595: // 'attribute' 'encoding'
+ case 64634: // 'element' 'encoding'
+ case 64699: // 'namespace' 'encoding'
+ case 64732: // 'processing-instruction' 'encoding'
+ case 66643: // 'attribute' 'every'
+ case 66682: // 'element' 'every'
+ case 66747: // 'namespace' 'every'
+ case 66780: // 'processing-instruction' 'every'
+ case 68179: // 'attribute' 'exit'
+ case 68218: // 'element' 'exit'
+ case 68283: // 'namespace' 'exit'
+ case 68316: // 'processing-instruction' 'exit'
+ case 68691: // 'attribute' 'external'
+ case 68730: // 'element' 'external'
+ case 68795: // 'namespace' 'external'
+ case 68828: // 'processing-instruction' 'external'
+ case 69203: // 'attribute' 'false'
+ case 69242: // 'element' 'false'
+ case 69307: // 'namespace' 'false'
+ case 69340: // 'processing-instruction' 'false'
+ case 69715: // 'attribute' 'first'
+ case 69754: // 'element' 'first'
+ case 69819: // 'namespace' 'first'
+ case 69852: // 'processing-instruction' 'first'
+ case 70227: // 'attribute' 'following'
+ case 70266: // 'element' 'following'
+ case 70331: // 'namespace' 'following'
+ case 70364: // 'processing-instruction' 'following'
+ case 70739: // 'attribute' 'following-sibling'
+ case 70778: // 'element' 'following-sibling'
+ case 70843: // 'namespace' 'following-sibling'
+ case 70876: // 'processing-instruction' 'following-sibling'
+ case 72787: // 'attribute' 'from'
+ case 72826: // 'element' 'from'
+ case 72891: // 'namespace' 'from'
+ case 72924: // 'processing-instruction' 'from'
+ case 73299: // 'attribute' 'ft-option'
+ case 73338: // 'element' 'ft-option'
+ case 73403: // 'namespace' 'ft-option'
+ case 73436: // 'processing-instruction' 'ft-option'
+ case 75347: // 'attribute' 'function'
+ case 75386: // 'element' 'function'
+ case 75451: // 'namespace' 'function'
+ case 75484: // 'processing-instruction' 'function'
+ case 78931: // 'attribute' 'if'
+ case 78970: // 'element' 'if'
+ case 79035: // 'namespace' 'if'
+ case 79068: // 'processing-instruction' 'if'
+ case 79443: // 'attribute' 'import'
+ case 79482: // 'element' 'import'
+ case 79547: // 'namespace' 'import'
+ case 79580: // 'processing-instruction' 'import'
+ case 79955: // 'attribute' 'in'
+ case 79994: // 'element' 'in'
+ case 80059: // 'namespace' 'in'
+ case 80092: // 'processing-instruction' 'in'
+ case 80467: // 'attribute' 'index'
+ case 80506: // 'element' 'index'
+ case 80571: // 'namespace' 'index'
+ case 80604: // 'processing-instruction' 'index'
+ case 82515: // 'attribute' 'insert'
+ case 82554: // 'element' 'insert'
+ case 82619: // 'namespace' 'insert'
+ case 82652: // 'processing-instruction' 'insert'
+ case 83539: // 'attribute' 'integrity'
+ case 83578: // 'element' 'integrity'
+ case 83643: // 'namespace' 'integrity'
+ case 83676: // 'processing-instruction' 'integrity'
+ case 85587: // 'attribute' 'item'
+ case 85626: // 'element' 'item'
+ case 85691: // 'namespace' 'item'
+ case 85724: // 'processing-instruction' 'item'
+ case 86099: // 'attribute' 'json'
+ case 86138: // 'element' 'json'
+ case 86203: // 'namespace' 'json'
+ case 86236: // 'processing-instruction' 'json'
+ case 86611: // 'attribute' 'json-item'
+ case 86650: // 'element' 'json-item'
+ case 87123: // 'attribute' 'jsoniq'
+ case 87162: // 'element' 'jsoniq'
+ case 87227: // 'namespace' 'jsoniq'
+ case 87260: // 'processing-instruction' 'jsoniq'
+ case 88659: // 'attribute' 'last'
+ case 88698: // 'element' 'last'
+ case 88763: // 'namespace' 'last'
+ case 88796: // 'processing-instruction' 'last'
+ case 89171: // 'attribute' 'lax'
+ case 89210: // 'element' 'lax'
+ case 89275: // 'namespace' 'lax'
+ case 89308: // 'processing-instruction' 'lax'
+ case 91731: // 'attribute' 'loop'
+ case 91770: // 'element' 'loop'
+ case 91835: // 'namespace' 'loop'
+ case 91868: // 'processing-instruction' 'loop'
+ case 94803: // 'attribute' 'module'
+ case 94842: // 'element' 'module'
+ case 94907: // 'namespace' 'module'
+ case 94940: // 'processing-instruction' 'module'
+ case 95827: // 'attribute' 'namespace'
+ case 95866: // 'element' 'namespace'
+ case 95931: // 'namespace' 'namespace'
+ case 95964: // 'processing-instruction' 'namespace'
+ case 96339: // 'attribute' 'namespace-node'
+ case 96378: // 'element' 'namespace-node'
+ case 96443: // 'namespace' 'namespace-node'
+ case 96476: // 'processing-instruction' 'namespace-node'
+ case 99411: // 'attribute' 'node'
+ case 99450: // 'element' 'node'
+ case 99515: // 'namespace' 'node'
+ case 99548: // 'processing-instruction' 'node'
+ case 99923: // 'attribute' 'nodes'
+ case 99962: // 'element' 'nodes'
+ case 100027: // 'namespace' 'nodes'
+ case 100060: // 'processing-instruction' 'nodes'
+ case 100947: // 'attribute' 'null'
+ case 100986: // 'element' 'null'
+ case 101051: // 'namespace' 'null'
+ case 101084: // 'processing-instruction' 'null'
+ case 101459: // 'attribute' 'object'
+ case 101498: // 'element' 'object'
+ case 101563: // 'namespace' 'object'
+ case 101596: // 'processing-instruction' 'object'
+ case 104019: // 'attribute' 'option'
+ case 104058: // 'element' 'option'
+ case 104123: // 'namespace' 'option'
+ case 104156: // 'processing-instruction' 'option'
+ case 105555: // 'attribute' 'ordered'
+ case 105594: // 'element' 'ordered'
+ case 105659: // 'namespace' 'ordered'
+ case 105692: // 'processing-instruction' 'ordered'
+ case 106067: // 'attribute' 'ordering'
+ case 106106: // 'element' 'ordering'
+ case 106171: // 'namespace' 'ordering'
+ case 106204: // 'processing-instruction' 'ordering'
+ case 107603: // 'attribute' 'parent'
+ case 107642: // 'element' 'parent'
+ case 107707: // 'namespace' 'parent'
+ case 107740: // 'processing-instruction' 'parent'
+ case 110675: // 'attribute' 'preceding'
+ case 110714: // 'element' 'preceding'
+ case 110779: // 'namespace' 'preceding'
+ case 110812: // 'processing-instruction' 'preceding'
+ case 111187: // 'attribute' 'preceding-sibling'
+ case 111226: // 'element' 'preceding-sibling'
+ case 111291: // 'namespace' 'preceding-sibling'
+ case 111324: // 'processing-instruction' 'preceding-sibling'
+ case 112723: // 'attribute' 'processing-instruction'
+ case 112762: // 'element' 'processing-instruction'
+ case 112827: // 'namespace' 'processing-instruction'
+ case 112860: // 'processing-instruction' 'processing-instruction'
+ case 113747: // 'attribute' 'rename'
+ case 113786: // 'element' 'rename'
+ case 113851: // 'namespace' 'rename'
+ case 113884: // 'processing-instruction' 'rename'
+ case 114259: // 'attribute' 'replace'
+ case 114298: // 'element' 'replace'
+ case 114363: // 'namespace' 'replace'
+ case 114396: // 'processing-instruction' 'replace'
+ case 115283: // 'attribute' 'returning'
+ case 115322: // 'element' 'returning'
+ case 115387: // 'namespace' 'returning'
+ case 115420: // 'processing-instruction' 'returning'
+ case 115795: // 'attribute' 'revalidation'
+ case 115834: // 'element' 'revalidation'
+ case 115899: // 'namespace' 'revalidation'
+ case 115932: // 'processing-instruction' 'revalidation'
+ case 117331: // 'attribute' 'schema'
+ case 117370: // 'element' 'schema'
+ case 117435: // 'namespace' 'schema'
+ case 117468: // 'processing-instruction' 'schema'
+ case 117843: // 'attribute' 'schema-attribute'
+ case 117882: // 'element' 'schema-attribute'
+ case 117947: // 'namespace' 'schema-attribute'
+ case 117980: // 'processing-instruction' 'schema-attribute'
+ case 118355: // 'attribute' 'schema-element'
+ case 118394: // 'element' 'schema-element'
+ case 118459: // 'namespace' 'schema-element'
+ case 118492: // 'processing-instruction' 'schema-element'
+ case 118867: // 'attribute' 'score'
+ case 118906: // 'element' 'score'
+ case 118971: // 'namespace' 'score'
+ case 119004: // 'processing-instruction' 'score'
+ case 119379: // 'attribute' 'select'
+ case 119418: // 'element' 'select'
+ case 119483: // 'namespace' 'select'
+ case 119516: // 'processing-instruction' 'select'
+ case 119891: // 'attribute' 'self'
+ case 119930: // 'element' 'self'
+ case 119995: // 'namespace' 'self'
+ case 120028: // 'processing-instruction' 'self'
+ case 122451: // 'attribute' 'sliding'
+ case 122490: // 'element' 'sliding'
+ case 122555: // 'namespace' 'sliding'
+ case 122588: // 'processing-instruction' 'sliding'
+ case 122963: // 'attribute' 'some'
+ case 123002: // 'element' 'some'
+ case 123067: // 'namespace' 'some'
+ case 123100: // 'processing-instruction' 'some'
+ case 125523: // 'attribute' 'strict'
+ case 125562: // 'element' 'strict'
+ case 125627: // 'namespace' 'strict'
+ case 125660: // 'processing-instruction' 'strict'
+ case 126547: // 'attribute' 'structured-item'
+ case 126586: // 'element' 'structured-item'
+ case 127059: // 'attribute' 'switch'
+ case 127098: // 'element' 'switch'
+ case 127163: // 'namespace' 'switch'
+ case 127196: // 'processing-instruction' 'switch'
+ case 127571: // 'attribute' 'text'
+ case 127610: // 'element' 'text'
+ case 127675: // 'namespace' 'text'
+ case 127708: // 'processing-instruction' 'text'
+ case 130643: // 'attribute' 'true'
+ case 130682: // 'element' 'true'
+ case 130747: // 'namespace' 'true'
+ case 130780: // 'processing-instruction' 'true'
+ case 131155: // 'attribute' 'try'
+ case 131194: // 'element' 'try'
+ case 131259: // 'namespace' 'try'
+ case 131292: // 'processing-instruction' 'try'
+ case 131667: // 'attribute' 'tumbling'
+ case 131706: // 'element' 'tumbling'
+ case 131771: // 'namespace' 'tumbling'
+ case 131804: // 'processing-instruction' 'tumbling'
+ case 132179: // 'attribute' 'type'
+ case 132218: // 'element' 'type'
+ case 132283: // 'namespace' 'type'
+ case 132316: // 'processing-instruction' 'type'
+ case 132691: // 'attribute' 'typeswitch'
+ case 132730: // 'element' 'typeswitch'
+ case 132795: // 'namespace' 'typeswitch'
+ case 132828: // 'processing-instruction' 'typeswitch'
+ case 134227: // 'attribute' 'unordered'
+ case 134266: // 'element' 'unordered'
+ case 134331: // 'namespace' 'unordered'
+ case 134364: // 'processing-instruction' 'unordered'
+ case 134739: // 'attribute' 'updating'
+ case 134778: // 'element' 'updating'
+ case 134843: // 'namespace' 'updating'
+ case 134876: // 'processing-instruction' 'updating'
+ case 136275: // 'attribute' 'validate'
+ case 136314: // 'element' 'validate'
+ case 136379: // 'namespace' 'validate'
+ case 136412: // 'processing-instruction' 'validate'
+ case 136787: // 'attribute' 'value'
+ case 136826: // 'element' 'value'
+ case 136891: // 'namespace' 'value'
+ case 136924: // 'processing-instruction' 'value'
+ case 137299: // 'attribute' 'variable'
+ case 137338: // 'element' 'variable'
+ case 137403: // 'namespace' 'variable'
+ case 137436: // 'processing-instruction' 'variable'
+ case 137811: // 'attribute' 'version'
+ case 137850: // 'element' 'version'
+ case 137915: // 'namespace' 'version'
+ case 137948: // 'processing-instruction' 'version'
+ case 139859: // 'attribute' 'while'
+ case 139898: // 'element' 'while'
+ case 139963: // 'namespace' 'while'
+ case 139996: // 'processing-instruction' 'while'
+ case 143955: // 'attribute' '{'
+ case 143969: // 'comment' '{'
+ case 143992: // 'document' '{'
+ case 143994: // 'element' '{'
+ case 144059: // 'namespace' '{'
+ case 144078: // 'ordered' '{'
+ case 144092: // 'processing-instruction' '{'
+ case 144121: // 'text' '{'
+ case 144134: // 'unordered' '{'
+ try_PostfixExpr();
+ break;
+ case -3:
+ break;
+ default:
+ try_AxisStep();
+ }
+ }
+
+ function parse_AxisStep()
+ {
+ eventHandler.startNonterminal("AxisStep", e0);
+ switch (l1)
+ {
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ lookahead2W(231); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 46: // '..'
+ case 26698: // 'ancestor' '::'
+ case 26699: // 'ancestor-or-self' '::'
+ case 26834: // 'parent' '::'
+ case 26840: // 'preceding' '::'
+ case 26841: // 'preceding-sibling' '::'
+ parse_ReverseStep();
+ break;
+ default:
+ parse_ForwardStep();
+ }
+ lookahead1W(227); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ whitespace();
+ parse_PredicateList();
+ eventHandler.endNonterminal("AxisStep", e0);
+ }
+
+ function try_AxisStep()
+ {
+ switch (l1)
+ {
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ lookahead2W(231); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 46: // '..'
+ case 26698: // 'ancestor' '::'
+ case 26699: // 'ancestor-or-self' '::'
+ case 26834: // 'parent' '::'
+ case 26840: // 'preceding' '::'
+ case 26841: // 'preceding-sibling' '::'
+ try_ReverseStep();
+ break;
+ default:
+ try_ForwardStep();
+ }
+ lookahead1W(227); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ try_PredicateList();
+ }
+
+ function parse_ForwardStep()
+ {
+ eventHandler.startNonterminal("ForwardStep", e0);
+ switch (l1)
+ {
+ case 83: // 'attribute'
+ lookahead2W(235); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 94: // 'child'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 234: // 'self'
+ lookahead2W(231); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 26707: // 'attribute' '::'
+ case 26718: // 'child' '::'
+ case 26736: // 'descendant' '::'
+ case 26737: // 'descendant-or-self' '::'
+ case 26761: // 'following' '::'
+ case 26762: // 'following-sibling' '::'
+ case 26858: // 'self' '::'
+ parse_ForwardAxis();
+ lookahead1W(248); // 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 83: // 'attribute'
+ lookahead2W(235); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 94: // 'child'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 234: // 'self'
+ lookahead2W(231); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 26707: // 'attribute' '::'
+ case 26718: // 'child' '::'
+ case 26736: // 'descendant' '::'
+ case 26737: // 'descendant-or-self' '::'
+ case 26761: // 'following' '::'
+ case 26762: // 'following-sibling' '::'
+ case 26858: // 'self' '::'
+ try_ForwardAxis();
+ lookahead1W(248); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_NodeTest();
+ break;
+ default:
+ try_AbbrevForwardStep();
+ }
+ }
+
+ function parse_ForwardAxis()
+ {
+ eventHandler.startNonterminal("ForwardAxis", e0);
+ switch (l1)
+ {
+ case 94: // 'child'
+ shift(94); // 'child'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ case 112: // 'descendant'
+ shift(112); // 'descendant'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ case 83: // 'attribute'
+ shift(83); // 'attribute'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ case 234: // 'self'
+ shift(234); // 'self'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ case 113: // 'descendant-or-self'
+ shift(113); // 'descendant-or-self'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ case 138: // 'following-sibling'
+ shift(138); // 'following-sibling'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ default:
+ shift(137); // 'following'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ }
+ eventHandler.endNonterminal("ForwardAxis", e0);
+ }
+
+ function try_ForwardAxis()
+ {
+ switch (l1)
+ {
+ case 94: // 'child'
+ shiftT(94); // 'child'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ case 112: // 'descendant'
+ shiftT(112); // 'descendant'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ case 83: // 'attribute'
+ shiftT(83); // 'attribute'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ case 234: // 'self'
+ shiftT(234); // 'self'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ case 113: // 'descendant-or-self'
+ shiftT(113); // 'descendant-or-self'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ case 138: // 'following-sibling'
+ shiftT(138); // 'following-sibling'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ default:
+ shiftT(137); // 'following'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ }
+ }
+
+ function parse_AbbrevForwardStep()
+ {
+ eventHandler.startNonterminal("AbbrevForwardStep", e0);
+ if (l1 == 67) // '@'
+ {
+ shift(67); // '@'
+ }
+ lookahead1W(248); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NodeTest();
+ eventHandler.endNonterminal("AbbrevForwardStep", e0);
+ }
+
+ function try_AbbrevForwardStep()
+ {
+ if (l1 == 67) // '@'
+ {
+ shiftT(67); // '@'
+ }
+ lookahead1W(248); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_NodeTest();
+ }
+
+ function parse_ReverseStep()
+ {
+ eventHandler.startNonterminal("ReverseStep", e0);
+ switch (l1)
+ {
+ case 46: // '..'
+ parse_AbbrevReverseStep();
+ break;
+ default:
+ parse_ReverseAxis();
+ lookahead1W(248); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NodeTest();
+ }
+ eventHandler.endNonterminal("ReverseStep", e0);
+ }
+
+ function try_ReverseStep()
+ {
+ switch (l1)
+ {
+ case 46: // '..'
+ try_AbbrevReverseStep();
+ break;
+ default:
+ try_ReverseAxis();
+ lookahead1W(248); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_NodeTest();
+ }
+ }
+
+ function parse_ReverseAxis()
+ {
+ eventHandler.startNonterminal("ReverseAxis", e0);
+ switch (l1)
+ {
+ case 210: // 'parent'
+ shift(210); // 'parent'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ case 74: // 'ancestor'
+ shift(74); // 'ancestor'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ case 217: // 'preceding-sibling'
+ shift(217); // 'preceding-sibling'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ case 216: // 'preceding'
+ shift(216); // 'preceding'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ break;
+ default:
+ shift(75); // 'ancestor-or-self'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shift(52); // '::'
+ }
+ eventHandler.endNonterminal("ReverseAxis", e0);
+ }
+
+ function try_ReverseAxis()
+ {
+ switch (l1)
+ {
+ case 210: // 'parent'
+ shiftT(210); // 'parent'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ case 74: // 'ancestor'
+ shiftT(74); // 'ancestor'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ case 217: // 'preceding-sibling'
+ shiftT(217); // 'preceding-sibling'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ case 216: // 'preceding'
+ shiftT(216); // 'preceding'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ break;
+ default:
+ shiftT(75); // 'ancestor-or-self'
+ lookahead1W(27); // S^WS | '(:' | '::'
+ shiftT(52); // '::'
+ }
+ }
+
+ function parse_AbbrevReverseStep()
+ {
+ eventHandler.startNonterminal("AbbrevReverseStep", e0);
+ shift(46); // '..'
+ eventHandler.endNonterminal("AbbrevReverseStep", e0);
+ }
+
+ function try_AbbrevReverseStep()
+ {
+ shiftT(46); // '..'
+ }
+
+ function parse_NodeTest()
+ {
+ eventHandler.startNonterminal("NodeTest", e0);
+ switch (l1)
+ {
+ case 83: // 'attribute'
+ case 97: // 'comment'
+ case 121: // 'document-node'
+ case 122: // 'element'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 220: // 'processing-instruction'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 249: // 'text'
+ lookahead2W(230); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 18003: // 'attribute' '('
+ case 18017: // 'comment' '('
+ case 18041: // 'document-node' '('
+ case 18042: // 'element' '('
+ case 18108: // 'namespace-node' '('
+ case 18114: // 'node' '('
+ case 18140: // 'processing-instruction' '('
+ case 18150: // 'schema-attribute' '('
+ case 18151: // 'schema-element' '('
+ case 18169: // 'text' '('
+ parse_KindTest();
+ break;
+ default:
+ parse_NameTest();
+ }
+ eventHandler.endNonterminal("NodeTest", e0);
+ }
+
+ function try_NodeTest()
+ {
+ switch (l1)
+ {
+ case 83: // 'attribute'
+ case 97: // 'comment'
+ case 121: // 'document-node'
+ case 122: // 'element'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 220: // 'processing-instruction'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 249: // 'text'
+ lookahead2W(230); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 18003: // 'attribute' '('
+ case 18017: // 'comment' '('
+ case 18041: // 'document-node' '('
+ case 18042: // 'element' '('
+ case 18108: // 'namespace-node' '('
+ case 18114: // 'node' '('
+ case 18140: // 'processing-instruction' '('
+ case 18150: // 'schema-attribute' '('
+ case 18151: // 'schema-element' '('
+ case 18169: // '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(234); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '.' | '/' |
+ if (l1 != 35 // '('
+ && l1 != 45 // '.'
+ && l1 != 69) // '['
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 69: // '['
+ lookahead2W(272); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 35397) // '[' '['
+ {
+ 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_Predicate();
+ lk = -1;
+ }
+ catch (p1A)
+ {
+ lk = -4;
+ }
+ 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);
+ }
+ }
+ switch (lk)
+ {
+ case 35: // '('
+ whitespace();
+ parse_ArgumentList();
+ break;
+ case 45: // '.'
+ whitespace();
+ parse_ObjectLookup();
+ break;
+ case -4:
+ whitespace();
+ parse_ArrayLookup();
+ break;
+ case 35909: // '[' ']'
+ whitespace();
+ parse_ArrayUnboxing();
+ break;
+ default:
+ whitespace();
+ parse_Predicate();
+ }
+ }
+ eventHandler.endNonterminal("PostfixExpr", e0);
+ }
+
+ function try_PostfixExpr()
+ {
+ try_PrimaryExpr();
+ for (;;)
+ {
+ lookahead1W(234); // S^WS | EOF | '!' | '!=' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '.' | '/' |
+ if (l1 != 35 // '('
+ && l1 != 45 // '.'
+ && l1 != 69) // '['
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 69: // '['
+ lookahead2W(272); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 35397) // '[' '['
+ {
+ 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_Predicate();
+ memoize(5, e0A, -1);
+ lk = -6;
+ }
+ catch (p1A)
+ {
+ lk = -4;
+ 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, e0A, -4);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case 35: // '('
+ try_ArgumentList();
+ break;
+ case 45: // '.'
+ try_ObjectLookup();
+ break;
+ case -4:
+ try_ArrayLookup();
+ break;
+ case 35909: // '[' ']'
+ try_ArrayUnboxing();
+ break;
+ case -6:
+ break;
+ default:
+ try_Predicate();
+ }
+ }
+ }
+
+ function parse_ObjectLookup()
+ {
+ eventHandler.startNonterminal("ObjectLookup", e0);
+ shift(45); // '.'
+ lookahead1W(250); // StringLiteral | NCName^Token | S^WS | '$' | '$$' | '(' | '(:' | 'after' |
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shift(11); // StringLiteral
+ break;
+ case 35: // '('
+ whitespace();
+ parse_ParenthesizedExpr();
+ break;
+ case 31: // '$'
+ whitespace();
+ parse_VarRef();
+ break;
+ case 32: // '$$'
+ whitespace();
+ parse_ContextItemExpr();
+ break;
+ default:
+ whitespace();
+ parse_NCName();
+ }
+ eventHandler.endNonterminal("ObjectLookup", e0);
+ }
+
+ function try_ObjectLookup()
+ {
+ shiftT(45); // '.'
+ lookahead1W(250); // StringLiteral | NCName^Token | S^WS | '$' | '$$' | '(' | '(:' | 'after' |
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shiftT(11); // StringLiteral
+ break;
+ case 35: // '('
+ try_ParenthesizedExpr();
+ break;
+ case 31: // '$'
+ try_VarRef();
+ break;
+ case 32: // '$$'
+ try_ContextItemExpr();
+ break;
+ default:
+ try_NCName();
+ }
+ }
+
+ function parse_ArrayLookup()
+ {
+ eventHandler.startNonterminal("ArrayLookup", e0);
+ shift(69); // '['
+ lookahead1W(31); // S^WS | '(:' | '['
+ shift(69); // '['
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(70); // ']'
+ lookahead1W(32); // S^WS | '(:' | ']'
+ shift(70); // ']'
+ eventHandler.endNonterminal("ArrayLookup", e0);
+ }
+
+ function try_ArrayLookup()
+ {
+ shiftT(69); // '['
+ lookahead1W(31); // S^WS | '(:' | '['
+ shiftT(69); // '['
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(70); // ']'
+ lookahead1W(32); // S^WS | '(:' | ']'
+ shiftT(70); // ']'
+ }
+
+ function parse_ArrayUnboxing()
+ {
+ eventHandler.startNonterminal("ArrayUnboxing", e0);
+ shift(69); // '['
+ lookahead1W(32); // S^WS | '(:' | ']'
+ shift(70); // ']'
+ eventHandler.endNonterminal("ArrayUnboxing", e0);
+ }
+
+ function try_ArrayUnboxing()
+ {
+ shiftT(69); // '['
+ lookahead1W(32); // S^WS | '(:' | ']'
+ shiftT(70); // ']'
+ }
+
+ function parse_ArgumentList()
+ {
+ eventHandler.startNonterminal("ArgumentList", e0);
+ shift(35); // '('
+ lookahead1W(279); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 38) // ')'
+ {
+ whitespace();
+ parse_Argument();
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Argument();
+ }
+ }
+ shift(38); // ')'
+ eventHandler.endNonterminal("ArgumentList", e0);
+ }
+
+ function try_ArgumentList()
+ {
+ shiftT(35); // '('
+ lookahead1W(279); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 38) // ')'
+ {
+ try_Argument();
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(271); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Argument();
+ }
+ }
+ shiftT(38); // ')'
+ }
+
+ function parse_PredicateList()
+ {
+ eventHandler.startNonterminal("PredicateList", e0);
+ for (;;)
+ {
+ lookahead1W(227); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ if (l1 != 69) // '['
+ {
+ break;
+ }
+ whitespace();
+ parse_Predicate();
+ }
+ eventHandler.endNonterminal("PredicateList", e0);
+ }
+
+ function try_PredicateList()
+ {
+ for (;;)
+ {
+ lookahead1W(227); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ if (l1 != 69) // '['
+ {
+ break;
+ }
+ try_Predicate();
+ }
+ }
+
+ function parse_Predicate()
+ {
+ eventHandler.startNonterminal("Predicate", e0);
+ shift(69); // '['
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(70); // ']'
+ eventHandler.endNonterminal("Predicate", e0);
+ }
+
+ function try_Predicate()
+ {
+ shiftT(69); // '['
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(70); // ']'
+ }
+
+ function parse_Literal()
+ {
+ eventHandler.startNonterminal("Literal", e0);
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shift(11); // StringLiteral
+ break;
+ case 135: // 'false'
+ case 255: // 'true'
+ parse_BooleanLiteral();
+ break;
+ case 197: // 'null'
+ parse_NullLiteral();
+ break;
+ default:
+ parse_NumericLiteral();
+ }
+ eventHandler.endNonterminal("Literal", e0);
+ }
+
+ function try_Literal()
+ {
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shiftT(11); // StringLiteral
+ break;
+ case 135: // 'false'
+ case 255: // 'true'
+ try_BooleanLiteral();
+ break;
+ case 197: // 'null'
+ try_NullLiteral();
+ break;
+ default:
+ try_NumericLiteral();
+ }
+ }
+
+ function parse_BooleanLiteral()
+ {
+ eventHandler.startNonterminal("BooleanLiteral", e0);
+ switch (l1)
+ {
+ case 255: // 'true'
+ shift(255); // 'true'
+ break;
+ default:
+ shift(135); // 'false'
+ }
+ eventHandler.endNonterminal("BooleanLiteral", e0);
+ }
+
+ function try_BooleanLiteral()
+ {
+ switch (l1)
+ {
+ case 255: // 'true'
+ shiftT(255); // 'true'
+ break;
+ default:
+ shiftT(135); // 'false'
+ }
+ }
+
+ function parse_NullLiteral()
+ {
+ eventHandler.startNonterminal("NullLiteral", e0);
+ shift(197); // 'null'
+ eventHandler.endNonterminal("NullLiteral", e0);
+ }
+
+ function try_NullLiteral()
+ {
+ shiftT(197); // 'null'
+ }
+
+ 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(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("VarRef", e0);
+ }
+
+ function try_VarRef()
+ {
+ shiftT(31); // '$'
+ lookahead1W(245); // 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(35); // '('
+ lookahead1W(269); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 38) // ')'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(38); // ')'
+ eventHandler.endNonterminal("ParenthesizedExpr", e0);
+ }
+
+ function try_ParenthesizedExpr()
+ {
+ shiftT(35); // '('
+ lookahead1W(269); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 38) // ')'
+ {
+ try_Expr();
+ }
+ shiftT(38); // ')'
+ }
+
+ function parse_ContextItemExpr()
+ {
+ eventHandler.startNonterminal("ContextItemExpr", e0);
+ shift(32); // '$$'
+ eventHandler.endNonterminal("ContextItemExpr", e0);
+ }
+
+ function try_ContextItemExpr()
+ {
+ shiftT(32); // '$$'
+ }
+
+ function parse_OrderedExpr()
+ {
+ eventHandler.startNonterminal("OrderedExpr", e0);
+ shift(206); // 'ordered'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shift(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("OrderedExpr", e0);
+ }
+
+ function try_OrderedExpr()
+ {
+ shiftT(206); // 'ordered'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shiftT(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ }
+
+ function parse_UnorderedExpr()
+ {
+ eventHandler.startNonterminal("UnorderedExpr", e0);
+ shift(262); // 'unordered'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shift(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("UnorderedExpr", e0);
+ }
+
+ function try_UnorderedExpr()
+ {
+ shiftT(262); // 'unordered'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shiftT(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ }
+
+ 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 65: // '?'
+ parse_ArgumentPlaceholder();
+ break;
+ default:
+ parse_ExprSingle();
+ }
+ eventHandler.endNonterminal("Argument", e0);
+ }
+
+ function try_Argument()
+ {
+ switch (l1)
+ {
+ case 65: // '?'
+ try_ArgumentPlaceholder();
+ break;
+ default:
+ try_ExprSingle();
+ }
+ }
+
+ function parse_ArgumentPlaceholder()
+ {
+ eventHandler.startNonterminal("ArgumentPlaceholder", e0);
+ shift(65); // '?'
+ eventHandler.endNonterminal("ArgumentPlaceholder", e0);
+ }
+
+ function try_ArgumentPlaceholder()
+ {
+ shiftT(65); // '?'
+ }
+
+ function parse_Constructor()
+ {
+ eventHandler.startNonterminal("Constructor", e0);
+ switch (l1)
+ {
+ case 55: // '<'
+ case 56: // '<!--'
+ case 60: // '<?'
+ parse_DirectConstructor();
+ break;
+ default:
+ parse_ComputedConstructor();
+ }
+ eventHandler.endNonterminal("Constructor", e0);
+ }
+
+ function try_Constructor()
+ {
+ switch (l1)
+ {
+ case 55: // '<'
+ case 56: // '<!--'
+ case 60: // '<?'
+ try_DirectConstructor();
+ break;
+ default:
+ try_ComputedConstructor();
+ }
+ }
+
+ function parse_DirectConstructor()
+ {
+ eventHandler.startNonterminal("DirectConstructor", e0);
+ switch (l1)
+ {
+ case 55: // '<'
+ parse_DirElemConstructor();
+ break;
+ case 56: // '<!--'
+ parse_DirCommentConstructor();
+ break;
+ default:
+ parse_DirPIConstructor();
+ }
+ eventHandler.endNonterminal("DirectConstructor", e0);
+ }
+
+ function try_DirectConstructor()
+ {
+ switch (l1)
+ {
+ case 55: // '<'
+ try_DirElemConstructor();
+ break;
+ case 56: // '<!--'
+ try_DirCommentConstructor();
+ break;
+ default:
+ try_DirPIConstructor();
+ }
+ }
+
+ function parse_DirElemConstructor()
+ {
+ eventHandler.startNonterminal("DirElemConstructor", e0);
+ shift(55); // '<'
+ lookahead1(4); // QName
+ shift(20); // QName
+ parse_DirAttributeList();
+ switch (l1)
+ {
+ case 49: // '/>'
+ shift(49); // '/>'
+ break;
+ default:
+ shift(62); // '>'
+ for (;;)
+ {
+ lookahead1(196); // CDataSection | PredefinedEntityRef | ElementContentChar | CharRef | '<' |
+ if (l1 == 57) // '</'
+ {
+ break;
+ }
+ parse_DirElemContent();
+ }
+ shift(57); // '</'
+ lookahead1(4); // QName
+ shift(20); // QName
+ lookahead1(12); // S | '>'
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ }
+ lookahead1(8); // '>'
+ shift(62); // '>'
+ }
+ eventHandler.endNonterminal("DirElemConstructor", e0);
+ }
+
+ function try_DirElemConstructor()
+ {
+ shiftT(55); // '<'
+ lookahead1(4); // QName
+ shiftT(20); // QName
+ try_DirAttributeList();
+ switch (l1)
+ {
+ case 49: // '/>'
+ shiftT(49); // '/>'
+ break;
+ default:
+ shiftT(62); // '>'
+ for (;;)
+ {
+ lookahead1(196); // CDataSection | PredefinedEntityRef | ElementContentChar | CharRef | '<' |
+ if (l1 == 57) // '</'
+ {
+ break;
+ }
+ try_DirElemContent();
+ }
+ shiftT(57); // '</'
+ lookahead1(4); // QName
+ shiftT(20); // QName
+ lookahead1(12); // S | '>'
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ }
+ lookahead1(8); // '>'
+ shiftT(62); // '>'
+ }
+ }
+
+ function parse_DirAttributeList()
+ {
+ eventHandler.startNonterminal("DirAttributeList", e0);
+ for (;;)
+ {
+ lookahead1(19); // S | '/>' | '>'
+ if (l1 != 21) // S
+ {
+ break;
+ }
+ shift(21); // S
+ lookahead1(94); // QName | S | '/>' | '>'
+ if (l1 == 20) // QName
+ {
+ shift(20); // QName
+ lookahead1(11); // S | '='
+ if (l1 == 21) // S
+ {
+ shift(21); // S
+ }
+ lookahead1(7); // '='
+ shift(61); // '='
+ 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(94); // QName | S | '/>' | '>'
+ if (l1 == 20) // QName
+ {
+ shiftT(20); // QName
+ lookahead1(11); // S | '='
+ if (l1 == 21) // S
+ {
+ shiftT(21); // S
+ }
+ lookahead1(7); // '='
+ shiftT(61); // '='
+ 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(185); // 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(34); // "'"
+ for (;;)
+ {
+ lookahead1(186); // PredefinedEntityRef | EscapeApos | AposAttrContentChar | CharRef | "'" | '{' |
+ if (l1 == 34) // "'"
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 14: // EscapeApos
+ shift(14); // EscapeApos
+ break;
+ default:
+ parse_AposAttrValueContent();
+ }
+ }
+ shift(34); // "'"
+ }
+ eventHandler.endNonterminal("DirAttributeValue", e0);
+ }
+
+ function try_DirAttributeValue()
+ {
+ lookahead1(14); // '"' | "'"
+ switch (l1)
+ {
+ case 28: // '"'
+ shiftT(28); // '"'
+ for (;;)
+ {
+ lookahead1(185); // 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(34); // "'"
+ for (;;)
+ {
+ lookahead1(186); // PredefinedEntityRef | EscapeApos | AposAttrContentChar | CharRef | "'" | '{' |
+ if (l1 == 34) // "'"
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 14: // EscapeApos
+ shiftT(14); // EscapeApos
+ break;
+ default:
+ try_AposAttrValueContent();
+ }
+ }
+ shiftT(34); // "'"
+ }
+ }
+
+ 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 55: // '<'
+ case 56: // '<!--'
+ case 60: // '<?'
+ 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 55: // '<'
+ case 56: // '<!--'
+ case 60: // '<?'
+ 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(56); // '<!--'
+ lookahead1(1); // DirCommentContents
+ shift(2); // DirCommentContents
+ lookahead1(6); // '-->'
+ shift(44); // '-->'
+ eventHandler.endNonterminal("DirCommentConstructor", e0);
+ }
+
+ function try_DirCommentConstructor()
+ {
+ shiftT(56); // '<!--'
+ lookahead1(1); // DirCommentContents
+ shiftT(2); // DirCommentContents
+ lookahead1(6); // '-->'
+ shiftT(44); // '-->'
+ }
+
+ function parse_DirPIConstructor()
+ {
+ eventHandler.startNonterminal("DirPIConstructor", e0);
+ shift(60); // '<?'
+ 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(66); // '?>'
+ eventHandler.endNonterminal("DirPIConstructor", e0);
+ }
+
+ function try_DirPIConstructor()
+ {
+ shiftT(60); // '<?'
+ 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(66); // '?>'
+ }
+
+ function parse_ComputedConstructor()
+ {
+ eventHandler.startNonterminal("ComputedConstructor", e0);
+ switch (l1)
+ {
+ case 120: // 'document'
+ parse_CompDocConstructor();
+ break;
+ case 122: // 'element'
+ parse_CompElemConstructor();
+ break;
+ case 83: // 'attribute'
+ parse_CompAttrConstructor();
+ break;
+ case 187: // 'namespace'
+ parse_CompNamespaceConstructor();
+ break;
+ case 249: // 'text'
+ parse_CompTextConstructor();
+ break;
+ case 97: // 'comment'
+ parse_CompCommentConstructor();
+ break;
+ default:
+ parse_CompPIConstructor();
+ }
+ eventHandler.endNonterminal("ComputedConstructor", e0);
+ }
+
+ function try_ComputedConstructor()
+ {
+ switch (l1)
+ {
+ case 120: // 'document'
+ try_CompDocConstructor();
+ break;
+ case 122: // 'element'
+ try_CompElemConstructor();
+ break;
+ case 83: // 'attribute'
+ try_CompAttrConstructor();
+ break;
+ case 187: // 'namespace'
+ try_CompNamespaceConstructor();
+ break;
+ case 249: // 'text'
+ try_CompTextConstructor();
+ break;
+ case 97: // 'comment'
+ try_CompCommentConstructor();
+ break;
+ default:
+ try_CompPIConstructor();
+ }
+ }
+
+ function parse_CompElemConstructor()
+ {
+ eventHandler.startNonterminal("CompElemConstructor", e0);
+ shift(122); // 'element'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 281: // '{'
+ shift(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ break;
+ default:
+ whitespace();
+ parse_EQName();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shift(281); // '{'
+ lookahead1W(280); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 287) // '}'
+ {
+ whitespace();
+ parse_ContentExpr();
+ }
+ shift(287); // '}'
+ eventHandler.endNonterminal("CompElemConstructor", e0);
+ }
+
+ function try_CompElemConstructor()
+ {
+ shiftT(122); // 'element'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 281: // '{'
+ shiftT(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ break;
+ default:
+ try_EQName();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shiftT(281); // '{'
+ lookahead1W(280); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 287) // '}'
+ {
+ try_ContentExpr();
+ }
+ shiftT(287); // '}'
+ }
+
+ function parse_CompNamespaceConstructor()
+ {
+ eventHandler.startNonterminal("CompNamespaceConstructor", e0);
+ shift(187); // 'namespace'
+ lookahead1W(241); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 281: // '{'
+ shift(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PrefixExpr();
+ shift(287); // '}'
+ break;
+ default:
+ whitespace();
+ parse_Prefix();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shift(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_URIExpr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("CompNamespaceConstructor", e0);
+ }
+
+ function try_CompNamespaceConstructor()
+ {
+ shiftT(187); // 'namespace'
+ lookahead1W(241); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 281: // '{'
+ shiftT(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PrefixExpr();
+ shiftT(287); // '}'
+ break;
+ default:
+ try_Prefix();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shiftT(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_URIExpr();
+ shiftT(287); // '}'
+ }
+
+ 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 147: // 'function'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 33: // '%'
+ case 18067: // 'function' '('
+ parse_InlineFunctionExpr();
+ break;
+ default:
+ parse_NamedFunctionRef();
+ }
+ eventHandler.endNonterminal("FunctionItemExpr", e0);
+ }
+
+ function try_FunctionItemExpr()
+ {
+ switch (l1)
+ {
+ case 147: // 'function'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 33: // '%'
+ case 18067: // '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(101); // S^WS | '%' | '(:' | 'function'
+ if (l1 != 33) // '%'
+ {
+ break;
+ }
+ whitespace();
+ parse_Annotation();
+ }
+ shift(147); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(98); // S^WS | '$' | '(:' | ')'
+ if (l1 == 31) // '$'
+ {
+ whitespace();
+ parse_ParamList();
+ }
+ shift(38); // ')'
+ lookahead1W(115); // S^WS | '(:' | 'as' | '{'
+ if (l1 == 80) // 'as'
+ {
+ shift(80); // 'as'
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ whitespace();
+ parse_FunctionBody();
+ eventHandler.endNonterminal("InlineFunctionExpr", e0);
+ }
+
+ function try_InlineFunctionExpr()
+ {
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '%' | '(:' | 'function'
+ if (l1 != 33) // '%'
+ {
+ break;
+ }
+ try_Annotation();
+ }
+ shiftT(147); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(98); // S^WS | '$' | '(:' | ')'
+ if (l1 == 31) // '$'
+ {
+ try_ParamList();
+ }
+ shiftT(38); // ')'
+ lookahead1W(115); // S^WS | '(:' | 'as' | '{'
+ if (l1 == 80) // 'as'
+ {
+ shiftT(80); // 'as'
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ try_FunctionBody();
+ }
+
+ function parse_SingleType()
+ {
+ eventHandler.startNonterminal("SingleType", e0);
+ parse_SimpleTypeName();
+ lookahead1W(225); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 65) // '?'
+ {
+ shift(65); // '?'
+ }
+ eventHandler.endNonterminal("SingleType", e0);
+ }
+
+ function try_SingleType()
+ {
+ try_SimpleTypeName();
+ lookahead1W(225); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | ':' | ';' | '<' | '<<' |
+ if (l1 == 65) // '?'
+ {
+ shiftT(65); // '?'
+ }
+ }
+
+ function parse_TypeDeclaration()
+ {
+ eventHandler.startNonterminal("TypeDeclaration", e0);
+ shift(80); // 'as'
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ eventHandler.endNonterminal("TypeDeclaration", e0);
+ }
+
+ function try_TypeDeclaration()
+ {
+ shiftT(80); // 'as'
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+
+ function parse_SequenceType()
+ {
+ eventHandler.startNonterminal("SequenceType", e0);
+ switch (l1)
+ {
+ case 35: // '('
+ lookahead2W(258); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' |
+ break;
+ case 125: // 'empty-sequence'
+ lookahead2W(232); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 18045: // 'empty-sequence' '('
+ case 19491: // '(' ')'
+ if (l1 == 125) // 'empty-sequence'
+ {
+ shift(125); // 'empty-sequence'
+ }
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ break;
+ default:
+ parse_ItemType();
+ lookahead1W(228); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | ';' |
+ switch (l1)
+ {
+ case 40: // '*'
+ case 41: // '+'
+ case 65: // '?'
+ whitespace();
+ parse_OccurrenceIndicator();
+ break;
+ default:
+ break;
+ }
+ }
+ eventHandler.endNonterminal("SequenceType", e0);
+ }
+
+ function try_SequenceType()
+ {
+ switch (l1)
+ {
+ case 35: // '('
+ lookahead2W(258); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' |
+ break;
+ case 125: // 'empty-sequence'
+ lookahead2W(232); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 18045: // 'empty-sequence' '('
+ case 19491: // '(' ')'
+ if (l1 == 125) // 'empty-sequence'
+ {
+ shiftT(125); // 'empty-sequence'
+ }
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ break;
+ default:
+ try_ItemType();
+ lookahead1W(228); // S^WS | EOF | '!=' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' | ';' |
+ switch (l1)
+ {
+ case 40: // '*'
+ case 41: // '+'
+ case 65: // '?'
+ try_OccurrenceIndicator();
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ function parse_OccurrenceIndicator()
+ {
+ eventHandler.startNonterminal("OccurrenceIndicator", e0);
+ switch (l1)
+ {
+ case 65: // '?'
+ shift(65); // '?'
+ break;
+ case 40: // '*'
+ shift(40); // '*'
+ break;
+ default:
+ shift(41); // '+'
+ }
+ eventHandler.endNonterminal("OccurrenceIndicator", e0);
+ }
+
+ function try_OccurrenceIndicator()
+ {
+ switch (l1)
+ {
+ case 65: // '?'
+ shiftT(65); // '?'
+ break;
+ case 40: // '*'
+ shiftT(40); // '*'
+ break;
+ default:
+ shiftT(41); // '+'
+ }
+ }
+
+ function parse_ItemType()
+ {
+ eventHandler.startNonterminal("ItemType", e0);
+ switch (l1)
+ {
+ case 79: // 'array'
+ case 83: // 'attribute'
+ case 97: // 'comment'
+ case 121: // 'document-node'
+ case 122: // 'element'
+ case 147: // 'function'
+ case 167: // 'item'
+ case 169: // 'json-item'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 198: // 'object'
+ case 220: // 'processing-instruction'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 247: // 'structured-item'
+ case 249: // 'text'
+ lookahead2W(232); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 12879 // 'array' EOF
+ || lk == 12969 // 'json-item' EOF
+ || lk == 12998 // 'object' EOF
+ || lk == 13047 // 'structured-item' EOF
+ || lk == 13903 // 'array' '!='
+ || lk == 13993 // 'json-item' '!='
+ || lk == 14022 // 'object' '!='
+ || lk == 14071 // 'structured-item' '!='
+ || lk == 19535 // 'array' ')'
+ || lk == 19625 // 'json-item' ')'
+ || lk == 19654 // 'object' ')'
+ || lk == 19703 // 'structured-item' ')'
+ || lk == 20047 // 'array' '*'
+ || lk == 20137 // 'json-item' '*'
+ || lk == 20166 // 'object' '*'
+ || lk == 20215 // 'structured-item' '*'
+ || lk == 20559 // 'array' '*'
+ || lk == 20649 // 'json-item' '*'
+ || lk == 20678 // 'object' '*'
+ || lk == 20727 // 'structured-item' '*'
+ || lk == 21071 // 'array' '+'
+ || lk == 21161 // 'json-item' '+'
+ || lk == 21190 // 'object' '+'
+ || lk == 21239 // 'structured-item' '+'
+ || lk == 21583 // 'array' ','
+ || lk == 21673 // 'json-item' ','
+ || lk == 21702 // 'object' ','
+ || lk == 21751 // 'structured-item' ','
+ || lk == 22095 // 'array' '-'
+ || lk == 22185 // 'json-item' '-'
+ || lk == 22214 // 'object' '-'
+ || lk == 22263 // 'structured-item' '-'
+ || lk == 25679 // 'array' ':'
+ || lk == 25769 // 'json-item' ':'
+ || lk == 25798 // 'object' ':'
+ || lk == 25847 // 'structured-item' ':'
+ || lk == 27215 // 'array' ':='
+ || lk == 27305 // 'json-item' ':='
+ || lk == 27334 // 'object' ':='
+ || lk == 27383 // 'structured-item' ':='
+ || lk == 27727 // 'array' ';'
+ || lk == 27817 // 'json-item' ';'
+ || lk == 27846 // 'object' ';'
+ || lk == 27895 // 'structured-item' ';'
+ || lk == 28239 // 'array' '<'
+ || lk == 28329 // 'json-item' '<'
+ || lk == 28358 // 'object' '<'
+ || lk == 28407 // 'structured-item' '<'
+ || lk == 29775 // 'array' '<<'
+ || lk == 29865 // 'json-item' '<<'
+ || lk == 29894 // 'object' '<<'
+ || lk == 29943 // 'structured-item' '<<'
+ || lk == 30287 // 'array' '<='
+ || lk == 30377 // 'json-item' '<='
+ || lk == 30406 // 'object' '<='
+ || lk == 30455 // 'structured-item' '<='
+ || lk == 31311 // 'array' '='
+ || lk == 31401 // 'json-item' '='
+ || lk == 31430 // 'object' '='
+ || lk == 31479 // 'structured-item' '='
+ || lk == 31823 // 'array' '>'
+ || lk == 31913 // 'json-item' '>'
+ || lk == 31942 // 'object' '>'
+ || lk == 31991 // 'structured-item' '>'
+ || lk == 32335 // 'array' '>='
+ || lk == 32425 // 'json-item' '>='
+ || lk == 32454 // 'object' '>='
+ || lk == 32503 // 'structured-item' '>='
+ || lk == 32847 // 'array' '>>'
+ || lk == 32937 // 'json-item' '>>'
+ || lk == 32966 // 'object' '>>'
+ || lk == 33015 // 'structured-item' '>>'
+ || lk == 33359 // 'array' '?'
+ || lk == 33449 // 'json-item' '?'
+ || lk == 33478 // 'object' '?'
+ || lk == 33527 // 'structured-item' '?'
+ || lk == 35919 // 'array' ']'
+ || lk == 36009 // 'json-item' ']'
+ || lk == 36038 // 'object' ']'
+ || lk == 36087 // 'structured-item' ']'
+ || lk == 36431 // 'array' 'after'
+ || lk == 36521 // 'json-item' 'after'
+ || lk == 36550 // 'object' 'after'
+ || lk == 36599 // 'structured-item' 'after'
+ || lk == 37455 // 'array' 'allowing'
+ || lk == 37545 // 'json-item' 'allowing'
+ || lk == 37574 // 'object' 'allowing'
+ || lk == 37623 // 'structured-item' 'allowing'
+ || lk == 38991 // 'array' 'and'
+ || lk == 39081 // 'json-item' 'and'
+ || lk == 39110 // 'object' 'and'
+ || lk == 39159 // 'structured-item' 'and'
+ || lk == 41039 // 'array' 'as'
+ || lk == 41129 // 'json-item' 'as'
+ || lk == 41158 // 'object' 'as'
+ || lk == 41207 // 'structured-item' 'as'
+ || lk == 41551 // 'array' 'ascending'
+ || lk == 41641 // 'json-item' 'ascending'
+ || lk == 41670 // 'object' 'ascending'
+ || lk == 41719 // 'structured-item' 'ascending'
+ || lk == 42063 // 'array' 'at'
+ || lk == 42153 // 'json-item' 'at'
+ || lk == 42182 // 'object' 'at'
+ || lk == 42231 // 'structured-item' 'at'
+ || lk == 43599 // 'array' 'before'
+ || lk == 43689 // 'json-item' 'before'
+ || lk == 43718 // 'object' 'before'
+ || lk == 43767 // 'structured-item' 'before'
+ || lk == 45647 // 'array' 'case'
+ || lk == 45737 // 'json-item' 'case'
+ || lk == 45766 // 'object' 'case'
+ || lk == 45815 // 'structured-item' 'case'
+ || lk == 48719 // 'array' 'collation'
+ || lk == 48809 // 'json-item' 'collation'
+ || lk == 48838 // 'object' 'collation'
+ || lk == 48887 // 'structured-item' 'collation'
+ || lk == 51279 // 'array' 'contains'
+ || lk == 51369 // 'json-item' 'contains'
+ || lk == 51398 // 'object' 'contains'
+ || lk == 51447 // 'structured-item' 'contains'
+ || lk == 54351 // 'array' 'count'
+ || lk == 54441 // 'json-item' 'count'
+ || lk == 54470 // 'object' 'count'
+ || lk == 54519 // 'structured-item' 'count'
+ || lk == 56399 // 'array' 'default'
+ || lk == 56489 // 'json-item' 'default'
+ || lk == 56518 // 'object' 'default'
+ || lk == 56567 // 'structured-item' 'default'
+ || lk == 58447 // 'array' 'descending'
+ || lk == 58537 // 'json-item' 'descending'
+ || lk == 58566 // 'object' 'descending'
+ || lk == 58615 // 'structured-item' 'descending'
+ || lk == 61007 // 'array' 'div'
+ || lk == 61097 // 'json-item' 'div'
+ || lk == 61126 // 'object' 'div'
+ || lk == 61175 // 'structured-item' 'div'
+ || lk == 63055 // 'array' 'else'
+ || lk == 63145 // 'json-item' 'else'
+ || lk == 63174 // 'object' 'else'
+ || lk == 63223 // 'structured-item' 'else'
+ || lk == 63567 // 'array' 'empty'
+ || lk == 63657 // 'json-item' 'empty'
+ || lk == 63686 // 'object' 'empty'
+ || lk == 63735 // 'structured-item' 'empty'
+ || lk == 65103 // 'array' 'end'
+ || lk == 65193 // 'json-item' 'end'
+ || lk == 65222 // 'object' 'end'
+ || lk == 65271 // 'structured-item' 'end'
+ || lk == 66127 // 'array' 'eq'
+ || lk == 66217 // 'json-item' 'eq'
+ || lk == 66246 // 'object' 'eq'
+ || lk == 66295 // 'structured-item' 'eq'
+ || lk == 67663 // 'array' 'except'
+ || lk == 67753 // 'json-item' 'except'
+ || lk == 67782 // 'object' 'except'
+ || lk == 67831 // 'structured-item' 'except'
+ || lk == 68687 // 'array' 'external'
+ || lk == 68777 // 'json-item' 'external'
+ || lk == 68806 // 'object' 'external'
+ || lk == 68855 // 'structured-item' 'external'
+ || lk == 71247 // 'array' 'for'
+ || lk == 71337 // 'json-item' 'for'
+ || lk == 71366 // 'object' 'for'
+ || lk == 71415 // 'structured-item' 'for'
+ || lk == 75855 // 'array' 'ge'
+ || lk == 75945 // 'json-item' 'ge'
+ || lk == 75974 // 'object' 'ge'
+ || lk == 76023 // 'structured-item' 'ge'
+ || lk == 76879 // 'array' 'group'
+ || lk == 76969 // 'json-item' 'group'
+ || lk == 76998 // 'object' 'group'
+ || lk == 77047 // 'structured-item' 'group'
+ || lk == 77903 // 'array' 'gt'
+ || lk == 77993 // 'json-item' 'gt'
+ || lk == 78022 // 'object' 'gt'
+ || lk == 78071 // 'structured-item' 'gt'
+ || lk == 78415 // 'array' 'idiv'
+ || lk == 78505 // 'json-item' 'idiv'
+ || lk == 78534 // 'object' 'idiv'
+ || lk == 78583 // 'structured-item' 'idiv'
+ || lk == 79951 // 'array' 'in'
+ || lk == 80041 // 'json-item' 'in'
+ || lk == 80070 // 'object' 'in'
+ || lk == 80119 // 'structured-item' 'in'
+ || lk == 83023 // 'array' 'instance'
+ || lk == 83113 // 'json-item' 'instance'
+ || lk == 83142 // 'object' 'instance'
+ || lk == 83191 // 'structured-item' 'instance'
+ || lk == 84047 // 'array' 'intersect'
+ || lk == 84137 // 'json-item' 'intersect'
+ || lk == 84166 // 'object' 'intersect'
+ || lk == 84215 // 'structured-item' 'intersect'
+ || lk == 84559 // 'array' 'into'
+ || lk == 84649 // 'json-item' 'into'
+ || lk == 84678 // 'object' 'into'
+ || lk == 84727 // 'structured-item' 'into'
+ || lk == 85071 // 'array' 'is'
+ || lk == 85161 // 'json-item' 'is'
+ || lk == 85190 // 'object' 'is'
+ || lk == 85239 // 'structured-item' 'is'
+ || lk == 89679 // 'array' 'le'
+ || lk == 89769 // 'json-item' 'le'
+ || lk == 89798 // 'object' 'le'
+ || lk == 89847 // 'structured-item' 'le'
+ || lk == 90703 // 'array' 'let'
+ || lk == 90793 // 'json-item' 'let'
+ || lk == 90822 // 'object' 'let'
+ || lk == 90871 // 'structured-item' 'let'
+ || lk == 92751 // 'array' 'lt'
+ || lk == 92841 // 'json-item' 'lt'
+ || lk == 92870 // 'object' 'lt'
+ || lk == 92919 // 'structured-item' 'lt'
+ || lk == 93775 // 'array' 'mod'
+ || lk == 93865 // 'json-item' 'mod'
+ || lk == 93894 // 'object' 'mod'
+ || lk == 93943 // 'structured-item' 'mod'
+ || lk == 94287 // 'array' 'modify'
+ || lk == 94377 // 'json-item' 'modify'
+ || lk == 94406 // 'object' 'modify'
+ || lk == 94455 // 'structured-item' 'modify'
+ || lk == 96847 // 'array' 'ne'
+ || lk == 96937 // 'json-item' 'ne'
+ || lk == 96966 // 'object' 'ne'
+ || lk == 97015 // 'structured-item' 'ne'
+ || lk == 103503 // 'array' 'only'
+ || lk == 103593 // 'json-item' 'only'
+ || lk == 103622 // 'object' 'only'
+ || lk == 103671 // 'structured-item' 'only'
+ || lk == 104527 // 'array' 'or'
+ || lk == 104617 // 'json-item' 'or'
+ || lk == 104646 // 'object' 'or'
+ || lk == 104695 // 'structured-item' 'or'
+ || lk == 105039 // 'array' 'order'
+ || lk == 105129 // 'json-item' 'order'
+ || lk == 105158 // 'object' 'order'
+ || lk == 105207 // 'structured-item' 'order'
+ || lk == 107087 // 'array' 'paragraphs'
+ || lk == 107177 // 'json-item' 'paragraphs'
+ || lk == 107206 // 'object' 'paragraphs'
+ || lk == 107255 // 'structured-item' 'paragraphs'
+ || lk == 114767 // 'array' 'return'
+ || lk == 114857 // 'json-item' 'return'
+ || lk == 114886 // 'object' 'return'
+ || lk == 114935 // 'structured-item' 'return'
+ || lk == 116815 // 'array' 'satisfies'
+ || lk == 116905 // 'json-item' 'satisfies'
+ || lk == 116934 // 'object' 'satisfies'
+ || lk == 116983 // 'structured-item' 'satisfies'
+ || lk == 118863 // 'array' 'score'
+ || lk == 118953 // 'json-item' 'score'
+ || lk == 118982 // 'object' 'score'
+ || lk == 119031 // 'structured-item' 'score'
+ || lk == 121423 // 'array' 'sentences'
+ || lk == 121513 // 'json-item' 'sentences'
+ || lk == 121542 // 'object' 'sentences'
+ || lk == 121591 // 'structured-item' 'sentences'
+ || lk == 123471 // 'array' 'stable'
+ || lk == 123561 // 'json-item' 'stable'
+ || lk == 123590 // 'object' 'stable'
+ || lk == 123639 // 'structured-item' 'stable'
+ || lk == 123983 // 'array' 'start'
+ || lk == 124073 // 'json-item' 'start'
+ || lk == 124102 // 'object' 'start'
+ || lk == 124151 // 'structured-item' 'start'
+ || lk == 129103 // 'array' 'times'
+ || lk == 129193 // 'json-item' 'times'
+ || lk == 129222 // 'object' 'times'
+ || lk == 129271 // 'structured-item' 'times'
+ || lk == 129615 // 'array' 'to'
+ || lk == 129705 // 'json-item' 'to'
+ || lk == 129734 // 'object' 'to'
+ || lk == 129783 // 'structured-item' 'to'
+ || lk == 133199 // 'array' 'union'
+ || lk == 133289 // 'json-item' 'union'
+ || lk == 133318 // 'object' 'union'
+ || lk == 133367 // 'structured-item' 'union'
+ || lk == 139343 // 'array' 'where'
+ || lk == 139433 // 'json-item' 'where'
+ || lk == 139462 // 'object' 'where'
+ || lk == 139511 // 'structured-item' 'where'
+ || lk == 141391 // 'array' 'with'
+ || lk == 141481 // 'json-item' 'with'
+ || lk == 141510 // 'object' 'with'
+ || lk == 141559 // 'structured-item' 'with'
+ || lk == 142927 // 'array' 'words'
+ || lk == 143017 // 'json-item' 'words'
+ || lk == 143046 // 'object' 'words'
+ || lk == 143095 // 'structured-item' 'words'
+ || lk == 143951 // 'array' '{'
+ || lk == 144041 // 'json-item' '{'
+ || lk == 144070 // 'object' '{'
+ || lk == 144119 // 'structured-item' '{'
+ || lk == 145487 // 'array' '|'
+ || lk == 145577 // 'json-item' '|'
+ || lk == 145606 // 'object' '|'
+ || lk == 145655 // 'structured-item' '|'
+ || lk == 145999 // 'array' '||'
+ || lk == 146089 // 'json-item' '||'
+ || lk == 146118 // 'object' '||'
+ || lk == 146167 // 'structured-item' '||'
+ || lk == 146511 // 'array' '|}'
+ || lk == 146601 // 'json-item' '|}'
+ || lk == 146630 // 'object' '|}'
+ || lk == 146679 // 'structured-item' '|}'
+ || lk == 147023 // 'array' '}'
+ || lk == 147113 // 'json-item' '}'
+ || lk == 147142 // 'object' '}'
+ || lk == 147191) // 'structured-item' '}'
+ {
+ 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_AtomicOrUnionType();
+ lk = -4;
+ }
+ catch (p4A)
+ {
+ 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_JSONTest();
+ lk = -6;
+ }
+ catch (p6A)
+ {
+ lk = -7;
+ }
+ }
+ 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 18003: // 'attribute' '('
+ case 18017: // 'comment' '('
+ case 18041: // 'document-node' '('
+ case 18042: // 'element' '('
+ case 18108: // 'namespace-node' '('
+ case 18114: // 'node' '('
+ case 18140: // 'processing-instruction' '('
+ case 18150: // 'schema-attribute' '('
+ case 18151: // 'schema-element' '('
+ case 18169: // 'text' '('
+ parse_KindTest();
+ break;
+ case 18087: // 'item' '('
+ shift(167); // 'item'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ break;
+ case 33: // '%'
+ case 18067: // 'function' '('
+ parse_FunctionTest();
+ break;
+ case 35: // '('
+ parse_ParenthesizedItemType();
+ break;
+ case -6:
+ case 17999: // 'array' '('
+ case 18089: // 'json-item' '('
+ case 18118: // 'object' '('
+ parse_JSONTest();
+ break;
+ case -7:
+ case 18167: // 'structured-item' '('
+ parse_StructuredItemTest();
+ break;
+ default:
+ parse_AtomicOrUnionType();
+ }
+ eventHandler.endNonterminal("ItemType", e0);
+ }
+
+ function try_ItemType()
+ {
+ switch (l1)
+ {
+ case 79: // 'array'
+ case 83: // 'attribute'
+ case 97: // 'comment'
+ case 121: // 'document-node'
+ case 122: // 'element'
+ case 147: // 'function'
+ case 167: // 'item'
+ case 169: // 'json-item'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 198: // 'object'
+ case 220: // 'processing-instruction'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 247: // 'structured-item'
+ case 249: // 'text'
+ lookahead2W(232); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 12879 // 'array' EOF
+ || lk == 12969 // 'json-item' EOF
+ || lk == 12998 // 'object' EOF
+ || lk == 13047 // 'structured-item' EOF
+ || lk == 13903 // 'array' '!='
+ || lk == 13993 // 'json-item' '!='
+ || lk == 14022 // 'object' '!='
+ || lk == 14071 // 'structured-item' '!='
+ || lk == 19535 // 'array' ')'
+ || lk == 19625 // 'json-item' ')'
+ || lk == 19654 // 'object' ')'
+ || lk == 19703 // 'structured-item' ')'
+ || lk == 20047 // 'array' '*'
+ || lk == 20137 // 'json-item' '*'
+ || lk == 20166 // 'object' '*'
+ || lk == 20215 // 'structured-item' '*'
+ || lk == 20559 // 'array' '*'
+ || lk == 20649 // 'json-item' '*'
+ || lk == 20678 // 'object' '*'
+ || lk == 20727 // 'structured-item' '*'
+ || lk == 21071 // 'array' '+'
+ || lk == 21161 // 'json-item' '+'
+ || lk == 21190 // 'object' '+'
+ || lk == 21239 // 'structured-item' '+'
+ || lk == 21583 // 'array' ','
+ || lk == 21673 // 'json-item' ','
+ || lk == 21702 // 'object' ','
+ || lk == 21751 // 'structured-item' ','
+ || lk == 22095 // 'array' '-'
+ || lk == 22185 // 'json-item' '-'
+ || lk == 22214 // 'object' '-'
+ || lk == 22263 // 'structured-item' '-'
+ || lk == 25679 // 'array' ':'
+ || lk == 25769 // 'json-item' ':'
+ || lk == 25798 // 'object' ':'
+ || lk == 25847 // 'structured-item' ':'
+ || lk == 27215 // 'array' ':='
+ || lk == 27305 // 'json-item' ':='
+ || lk == 27334 // 'object' ':='
+ || lk == 27383 // 'structured-item' ':='
+ || lk == 27727 // 'array' ';'
+ || lk == 27817 // 'json-item' ';'
+ || lk == 27846 // 'object' ';'
+ || lk == 27895 // 'structured-item' ';'
+ || lk == 28239 // 'array' '<'
+ || lk == 28329 // 'json-item' '<'
+ || lk == 28358 // 'object' '<'
+ || lk == 28407 // 'structured-item' '<'
+ || lk == 29775 // 'array' '<<'
+ || lk == 29865 // 'json-item' '<<'
+ || lk == 29894 // 'object' '<<'
+ || lk == 29943 // 'structured-item' '<<'
+ || lk == 30287 // 'array' '<='
+ || lk == 30377 // 'json-item' '<='
+ || lk == 30406 // 'object' '<='
+ || lk == 30455 // 'structured-item' '<='
+ || lk == 31311 // 'array' '='
+ || lk == 31401 // 'json-item' '='
+ || lk == 31430 // 'object' '='
+ || lk == 31479 // 'structured-item' '='
+ || lk == 31823 // 'array' '>'
+ || lk == 31913 // 'json-item' '>'
+ || lk == 31942 // 'object' '>'
+ || lk == 31991 // 'structured-item' '>'
+ || lk == 32335 // 'array' '>='
+ || lk == 32425 // 'json-item' '>='
+ || lk == 32454 // 'object' '>='
+ || lk == 32503 // 'structured-item' '>='
+ || lk == 32847 // 'array' '>>'
+ || lk == 32937 // 'json-item' '>>'
+ || lk == 32966 // 'object' '>>'
+ || lk == 33015 // 'structured-item' '>>'
+ || lk == 33359 // 'array' '?'
+ || lk == 33449 // 'json-item' '?'
+ || lk == 33478 // 'object' '?'
+ || lk == 33527 // 'structured-item' '?'
+ || lk == 35919 // 'array' ']'
+ || lk == 36009 // 'json-item' ']'
+ || lk == 36038 // 'object' ']'
+ || lk == 36087 // 'structured-item' ']'
+ || lk == 36431 // 'array' 'after'
+ || lk == 36521 // 'json-item' 'after'
+ || lk == 36550 // 'object' 'after'
+ || lk == 36599 // 'structured-item' 'after'
+ || lk == 37455 // 'array' 'allowing'
+ || lk == 37545 // 'json-item' 'allowing'
+ || lk == 37574 // 'object' 'allowing'
+ || lk == 37623 // 'structured-item' 'allowing'
+ || lk == 38991 // 'array' 'and'
+ || lk == 39081 // 'json-item' 'and'
+ || lk == 39110 // 'object' 'and'
+ || lk == 39159 // 'structured-item' 'and'
+ || lk == 41039 // 'array' 'as'
+ || lk == 41129 // 'json-item' 'as'
+ || lk == 41158 // 'object' 'as'
+ || lk == 41207 // 'structured-item' 'as'
+ || lk == 41551 // 'array' 'ascending'
+ || lk == 41641 // 'json-item' 'ascending'
+ || lk == 41670 // 'object' 'ascending'
+ || lk == 41719 // 'structured-item' 'ascending'
+ || lk == 42063 // 'array' 'at'
+ || lk == 42153 // 'json-item' 'at'
+ || lk == 42182 // 'object' 'at'
+ || lk == 42231 // 'structured-item' 'at'
+ || lk == 43599 // 'array' 'before'
+ || lk == 43689 // 'json-item' 'before'
+ || lk == 43718 // 'object' 'before'
+ || lk == 43767 // 'structured-item' 'before'
+ || lk == 45647 // 'array' 'case'
+ || lk == 45737 // 'json-item' 'case'
+ || lk == 45766 // 'object' 'case'
+ || lk == 45815 // 'structured-item' 'case'
+ || lk == 48719 // 'array' 'collation'
+ || lk == 48809 // 'json-item' 'collation'
+ || lk == 48838 // 'object' 'collation'
+ || lk == 48887 // 'structured-item' 'collation'
+ || lk == 51279 // 'array' 'contains'
+ || lk == 51369 // 'json-item' 'contains'
+ || lk == 51398 // 'object' 'contains'
+ || lk == 51447 // 'structured-item' 'contains'
+ || lk == 54351 // 'array' 'count'
+ || lk == 54441 // 'json-item' 'count'
+ || lk == 54470 // 'object' 'count'
+ || lk == 54519 // 'structured-item' 'count'
+ || lk == 56399 // 'array' 'default'
+ || lk == 56489 // 'json-item' 'default'
+ || lk == 56518 // 'object' 'default'
+ || lk == 56567 // 'structured-item' 'default'
+ || lk == 58447 // 'array' 'descending'
+ || lk == 58537 // 'json-item' 'descending'
+ || lk == 58566 // 'object' 'descending'
+ || lk == 58615 // 'structured-item' 'descending'
+ || lk == 61007 // 'array' 'div'
+ || lk == 61097 // 'json-item' 'div'
+ || lk == 61126 // 'object' 'div'
+ || lk == 61175 // 'structured-item' 'div'
+ || lk == 63055 // 'array' 'else'
+ || lk == 63145 // 'json-item' 'else'
+ || lk == 63174 // 'object' 'else'
+ || lk == 63223 // 'structured-item' 'else'
+ || lk == 63567 // 'array' 'empty'
+ || lk == 63657 // 'json-item' 'empty'
+ || lk == 63686 // 'object' 'empty'
+ || lk == 63735 // 'structured-item' 'empty'
+ || lk == 65103 // 'array' 'end'
+ || lk == 65193 // 'json-item' 'end'
+ || lk == 65222 // 'object' 'end'
+ || lk == 65271 // 'structured-item' 'end'
+ || lk == 66127 // 'array' 'eq'
+ || lk == 66217 // 'json-item' 'eq'
+ || lk == 66246 // 'object' 'eq'
+ || lk == 66295 // 'structured-item' 'eq'
+ || lk == 67663 // 'array' 'except'
+ || lk == 67753 // 'json-item' 'except'
+ || lk == 67782 // 'object' 'except'
+ || lk == 67831 // 'structured-item' 'except'
+ || lk == 68687 // 'array' 'external'
+ || lk == 68777 // 'json-item' 'external'
+ || lk == 68806 // 'object' 'external'
+ || lk == 68855 // 'structured-item' 'external'
+ || lk == 71247 // 'array' 'for'
+ || lk == 71337 // 'json-item' 'for'
+ || lk == 71366 // 'object' 'for'
+ || lk == 71415 // 'structured-item' 'for'
+ || lk == 75855 // 'array' 'ge'
+ || lk == 75945 // 'json-item' 'ge'
+ || lk == 75974 // 'object' 'ge'
+ || lk == 76023 // 'structured-item' 'ge'
+ || lk == 76879 // 'array' 'group'
+ || lk == 76969 // 'json-item' 'group'
+ || lk == 76998 // 'object' 'group'
+ || lk == 77047 // 'structured-item' 'group'
+ || lk == 77903 // 'array' 'gt'
+ || lk == 77993 // 'json-item' 'gt'
+ || lk == 78022 // 'object' 'gt'
+ || lk == 78071 // 'structured-item' 'gt'
+ || lk == 78415 // 'array' 'idiv'
+ || lk == 78505 // 'json-item' 'idiv'
+ || lk == 78534 // 'object' 'idiv'
+ || lk == 78583 // 'structured-item' 'idiv'
+ || lk == 79951 // 'array' 'in'
+ || lk == 80041 // 'json-item' 'in'
+ || lk == 80070 // 'object' 'in'
+ || lk == 80119 // 'structured-item' 'in'
+ || lk == 83023 // 'array' 'instance'
+ || lk == 83113 // 'json-item' 'instance'
+ || lk == 83142 // 'object' 'instance'
+ || lk == 83191 // 'structured-item' 'instance'
+ || lk == 84047 // 'array' 'intersect'
+ || lk == 84137 // 'json-item' 'intersect'
+ || lk == 84166 // 'object' 'intersect'
+ || lk == 84215 // 'structured-item' 'intersect'
+ || lk == 84559 // 'array' 'into'
+ || lk == 84649 // 'json-item' 'into'
+ || lk == 84678 // 'object' 'into'
+ || lk == 84727 // 'structured-item' 'into'
+ || lk == 85071 // 'array' 'is'
+ || lk == 85161 // 'json-item' 'is'
+ || lk == 85190 // 'object' 'is'
+ || lk == 85239 // 'structured-item' 'is'
+ || lk == 89679 // 'array' 'le'
+ || lk == 89769 // 'json-item' 'le'
+ || lk == 89798 // 'object' 'le'
+ || lk == 89847 // 'structured-item' 'le'
+ || lk == 90703 // 'array' 'let'
+ || lk == 90793 // 'json-item' 'let'
+ || lk == 90822 // 'object' 'let'
+ || lk == 90871 // 'structured-item' 'let'
+ || lk == 92751 // 'array' 'lt'
+ || lk == 92841 // 'json-item' 'lt'
+ || lk == 92870 // 'object' 'lt'
+ || lk == 92919 // 'structured-item' 'lt'
+ || lk == 93775 // 'array' 'mod'
+ || lk == 93865 // 'json-item' 'mod'
+ || lk == 93894 // 'object' 'mod'
+ || lk == 93943 // 'structured-item' 'mod'
+ || lk == 94287 // 'array' 'modify'
+ || lk == 94377 // 'json-item' 'modify'
+ || lk == 94406 // 'object' 'modify'
+ || lk == 94455 // 'structured-item' 'modify'
+ || lk == 96847 // 'array' 'ne'
+ || lk == 96937 // 'json-item' 'ne'
+ || lk == 96966 // 'object' 'ne'
+ || lk == 97015 // 'structured-item' 'ne'
+ || lk == 103503 // 'array' 'only'
+ || lk == 103593 // 'json-item' 'only'
+ || lk == 103622 // 'object' 'only'
+ || lk == 103671 // 'structured-item' 'only'
+ || lk == 104527 // 'array' 'or'
+ || lk == 104617 // 'json-item' 'or'
+ || lk == 104646 // 'object' 'or'
+ || lk == 104695 // 'structured-item' 'or'
+ || lk == 105039 // 'array' 'order'
+ || lk == 105129 // 'json-item' 'order'
+ || lk == 105158 // 'object' 'order'
+ || lk == 105207 // 'structured-item' 'order'
+ || lk == 107087 // 'array' 'paragraphs'
+ || lk == 107177 // 'json-item' 'paragraphs'
+ || lk == 107206 // 'object' 'paragraphs'
+ || lk == 107255 // 'structured-item' 'paragraphs'
+ || lk == 114767 // 'array' 'return'
+ || lk == 114857 // 'json-item' 'return'
+ || lk == 114886 // 'object' 'return'
+ || lk == 114935 // 'structured-item' 'return'
+ || lk == 116815 // 'array' 'satisfies'
+ || lk == 116905 // 'json-item' 'satisfies'
+ || lk == 116934 // 'object' 'satisfies'
+ || lk == 116983 // 'structured-item' 'satisfies'
+ || lk == 118863 // 'array' 'score'
+ || lk == 118953 // 'json-item' 'score'
+ || lk == 118982 // 'object' 'score'
+ || lk == 119031 // 'structured-item' 'score'
+ || lk == 121423 // 'array' 'sentences'
+ || lk == 121513 // 'json-item' 'sentences'
+ || lk == 121542 // 'object' 'sentences'
+ || lk == 121591 // 'structured-item' 'sentences'
+ || lk == 123471 // 'array' 'stable'
+ || lk == 123561 // 'json-item' 'stable'
+ || lk == 123590 // 'object' 'stable'
+ || lk == 123639 // 'structured-item' 'stable'
+ || lk == 123983 // 'array' 'start'
+ || lk == 124073 // 'json-item' 'start'
+ || lk == 124102 // 'object' 'start'
+ || lk == 124151 // 'structured-item' 'start'
+ || lk == 129103 // 'array' 'times'
+ || lk == 129193 // 'json-item' 'times'
+ || lk == 129222 // 'object' 'times'
+ || lk == 129271 // 'structured-item' 'times'
+ || lk == 129615 // 'array' 'to'
+ || lk == 129705 // 'json-item' 'to'
+ || lk == 129734 // 'object' 'to'
+ || lk == 129783 // 'structured-item' 'to'
+ || lk == 133199 // 'array' 'union'
+ || lk == 133289 // 'json-item' 'union'
+ || lk == 133318 // 'object' 'union'
+ || lk == 133367 // 'structured-item' 'union'
+ || lk == 139343 // 'array' 'where'
+ || lk == 139433 // 'json-item' 'where'
+ || lk == 139462 // 'object' 'where'
+ || lk == 139511 // 'structured-item' 'where'
+ || lk == 141391 // 'array' 'with'
+ || lk == 141481 // 'json-item' 'with'
+ || lk == 141510 // 'object' 'with'
+ || lk == 141559 // 'structured-item' 'with'
+ || lk == 142927 // 'array' 'words'
+ || lk == 143017 // 'json-item' 'words'
+ || lk == 143046 // 'object' 'words'
+ || lk == 143095 // 'structured-item' 'words'
+ || lk == 143951 // 'array' '{'
+ || lk == 144041 // 'json-item' '{'
+ || lk == 144070 // 'object' '{'
+ || lk == 144119 // 'structured-item' '{'
+ || lk == 145487 // 'array' '|'
+ || lk == 145577 // 'json-item' '|'
+ || lk == 145606 // 'object' '|'
+ || lk == 145655 // 'structured-item' '|'
+ || lk == 145999 // 'array' '||'
+ || lk == 146089 // 'json-item' '||'
+ || lk == 146118 // 'object' '||'
+ || lk == 146167 // 'structured-item' '||'
+ || lk == 146511 // 'array' '|}'
+ || lk == 146601 // 'json-item' '|}'
+ || lk == 146630 // 'object' '|}'
+ || lk == 146679 // 'structured-item' '|}'
+ || lk == 147023 // 'array' '}'
+ || lk == 147113 // 'json-item' '}'
+ || lk == 147142 // 'object' '}'
+ || lk == 147191) // 'structured-item' '}'
+ {
+ 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_AtomicOrUnionType();
+ memoize(6, e0A, -4);
+ lk = -8;
+ }
+ catch (p4A)
+ {
+ 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_JSONTest();
+ memoize(6, e0A, -6);
+ lk = -8;
+ }
+ catch (p6A)
+ {
+ lk = -7;
+ 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, e0A, -7);
+ }
+ }
+ }
+ }
+ switch (lk)
+ {
+ case 18003: // 'attribute' '('
+ case 18017: // 'comment' '('
+ case 18041: // 'document-node' '('
+ case 18042: // 'element' '('
+ case 18108: // 'namespace-node' '('
+ case 18114: // 'node' '('
+ case 18140: // 'processing-instruction' '('
+ case 18150: // 'schema-attribute' '('
+ case 18151: // 'schema-element' '('
+ case 18169: // 'text' '('
+ try_KindTest();
+ break;
+ case 18087: // 'item' '('
+ shiftT(167); // 'item'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ break;
+ case 33: // '%'
+ case 18067: // 'function' '('
+ try_FunctionTest();
+ break;
+ case 35: // '('
+ try_ParenthesizedItemType();
+ break;
+ case -6:
+ case 17999: // 'array' '('
+ case 18089: // 'json-item' '('
+ case 18118: // 'object' '('
+ try_JSONTest();
+ break;
+ case -7:
+ case 18167: // 'structured-item' '('
+ try_StructuredItemTest();
+ break;
+ case -8:
+ break;
+ default:
+ try_AtomicOrUnionType();
+ }
+ }
+
+ function parse_JSONTest()
+ {
+ eventHandler.startNonterminal("JSONTest", e0);
+ switch (l1)
+ {
+ case 169: // 'json-item'
+ parse_JSONItemTest();
+ break;
+ case 198: // 'object'
+ parse_JSONObjectTest();
+ break;
+ default:
+ parse_JSONArrayTest();
+ }
+ eventHandler.endNonterminal("JSONTest", e0);
+ }
+
+ function try_JSONTest()
+ {
+ switch (l1)
+ {
+ case 169: // 'json-item'
+ try_JSONItemTest();
+ break;
+ case 198: // 'object'
+ try_JSONObjectTest();
+ break;
+ default:
+ try_JSONArrayTest();
+ }
+ }
+
+ function parse_StructuredItemTest()
+ {
+ eventHandler.startNonterminal("StructuredItemTest", e0);
+ shift(247); // 'structured-item'
+ lookahead1W(232); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ if (l1 == 35) // '('
+ {
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ }
+ eventHandler.endNonterminal("StructuredItemTest", e0);
+ }
+
+ function try_StructuredItemTest()
+ {
+ shiftT(247); // 'structured-item'
+ lookahead1W(232); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ if (l1 == 35) // '('
+ {
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+ }
+
+ function parse_JSONItemTest()
+ {
+ eventHandler.startNonterminal("JSONItemTest", e0);
+ shift(169); // 'json-item'
+ lookahead1W(232); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ if (l1 == 35) // '('
+ {
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ }
+ eventHandler.endNonterminal("JSONItemTest", e0);
+ }
+
+ function try_JSONItemTest()
+ {
+ shiftT(169); // 'json-item'
+ lookahead1W(232); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ if (l1 == 35) // '('
+ {
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+ }
+
+ function parse_JSONObjectTest()
+ {
+ eventHandler.startNonterminal("JSONObjectTest", e0);
+ shift(198); // 'object'
+ lookahead1W(232); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ if (l1 == 35) // '('
+ {
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ }
+ eventHandler.endNonterminal("JSONObjectTest", e0);
+ }
+
+ function try_JSONObjectTest()
+ {
+ shiftT(198); // 'object'
+ lookahead1W(232); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ if (l1 == 35) // '('
+ {
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+ }
+
+ function parse_JSONArrayTest()
+ {
+ eventHandler.startNonterminal("JSONArrayTest", e0);
+ shift(79); // 'array'
+ lookahead1W(232); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ if (l1 == 35) // '('
+ {
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ }
+ eventHandler.endNonterminal("JSONArrayTest", e0);
+ }
+
+ function try_JSONArrayTest()
+ {
+ shiftT(79); // 'array'
+ lookahead1W(232); // S^WS | EOF | '!=' | '(' | '(:' | ')' | '*' | '*' | '+' | ',' | '-' | ':' | ':=' |
+ if (l1 == 35) // '('
+ {
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+ }
+
+ 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 121: // 'document-node'
+ parse_DocumentTest();
+ break;
+ case 122: // 'element'
+ parse_ElementTest();
+ break;
+ case 83: // 'attribute'
+ parse_AttributeTest();
+ break;
+ case 231: // 'schema-element'
+ parse_SchemaElementTest();
+ break;
+ case 230: // 'schema-attribute'
+ parse_SchemaAttributeTest();
+ break;
+ case 220: // 'processing-instruction'
+ parse_PITest();
+ break;
+ case 97: // 'comment'
+ parse_CommentTest();
+ break;
+ case 249: // 'text'
+ parse_TextTest();
+ break;
+ case 188: // 'namespace-node'
+ parse_NamespaceNodeTest();
+ break;
+ default:
+ parse_AnyKindTest();
+ }
+ eventHandler.endNonterminal("KindTest", e0);
+ }
+
+ function try_KindTest()
+ {
+ switch (l1)
+ {
+ case 121: // 'document-node'
+ try_DocumentTest();
+ break;
+ case 122: // 'element'
+ try_ElementTest();
+ break;
+ case 83: // 'attribute'
+ try_AttributeTest();
+ break;
+ case 231: // 'schema-element'
+ try_SchemaElementTest();
+ break;
+ case 230: // 'schema-attribute'
+ try_SchemaAttributeTest();
+ break;
+ case 220: // 'processing-instruction'
+ try_PITest();
+ break;
+ case 97: // 'comment'
+ try_CommentTest();
+ break;
+ case 249: // 'text'
+ try_TextTest();
+ break;
+ case 188: // 'namespace-node'
+ try_NamespaceNodeTest();
+ break;
+ default:
+ try_AnyKindTest();
+ }
+ }
+
+ function parse_AnyKindTest()
+ {
+ eventHandler.startNonterminal("AnyKindTest", e0);
+ shift(194); // 'node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("AnyKindTest", e0);
+ }
+
+ function try_AnyKindTest()
+ {
+ shiftT(194); // 'node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_DocumentTest()
+ {
+ eventHandler.startNonterminal("DocumentTest", e0);
+ shift(121); // 'document-node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(154); // S^WS | '(:' | ')' | 'element' | 'schema-element'
+ if (l1 != 38) // ')'
+ {
+ switch (l1)
+ {
+ case 122: // 'element'
+ whitespace();
+ parse_ElementTest();
+ break;
+ default:
+ whitespace();
+ parse_SchemaElementTest();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("DocumentTest", e0);
+ }
+
+ function try_DocumentTest()
+ {
+ shiftT(121); // 'document-node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(154); // S^WS | '(:' | ')' | 'element' | 'schema-element'
+ if (l1 != 38) // ')'
+ {
+ switch (l1)
+ {
+ case 122: // 'element'
+ try_ElementTest();
+ break;
+ default:
+ try_SchemaElementTest();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_TextTest()
+ {
+ eventHandler.startNonterminal("TextTest", e0);
+ shift(249); // 'text'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("TextTest", e0);
+ }
+
+ function try_TextTest()
+ {
+ shiftT(249); // 'text'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_CommentTest()
+ {
+ eventHandler.startNonterminal("CommentTest", e0);
+ shift(97); // 'comment'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("CommentTest", e0);
+ }
+
+ function try_CommentTest()
+ {
+ shiftT(97); // 'comment'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_NamespaceNodeTest()
+ {
+ eventHandler.startNonterminal("NamespaceNodeTest", e0);
+ shift(188); // 'namespace-node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("NamespaceNodeTest", e0);
+ }
+
+ function try_NamespaceNodeTest()
+ {
+ shiftT(188); // 'namespace-node'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_PITest()
+ {
+ eventHandler.startNonterminal("PITest", e0);
+ shift(220); // 'processing-instruction'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(243); // StringLiteral | NCName^Token | S^WS | '(:' | ')' | 'after' | 'allowing' |
+ if (l1 != 38) // ')'
+ {
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shift(11); // StringLiteral
+ break;
+ default:
+ whitespace();
+ parse_NCName();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("PITest", e0);
+ }
+
+ function try_PITest()
+ {
+ shiftT(220); // 'processing-instruction'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(243); // StringLiteral | NCName^Token | S^WS | '(:' | ')' | 'after' | 'allowing' |
+ if (l1 != 38) // ')'
+ {
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shiftT(11); // StringLiteral
+ break;
+ default:
+ try_NCName();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_AttributeTest()
+ {
+ eventHandler.startNonterminal("AttributeTest", e0);
+ shift(83); // 'attribute'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(254); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ if (l1 != 38) // ')'
+ {
+ whitespace();
+ parse_AttribNameOrWildcard();
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 == 42) // ','
+ {
+ shift(42); // ','
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_TypeName();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("AttributeTest", e0);
+ }
+
+ function try_AttributeTest()
+ {
+ shiftT(83); // 'attribute'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(254); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ if (l1 != 38) // ')'
+ {
+ try_AttribNameOrWildcard();
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 == 42) // ','
+ {
+ shiftT(42); // ','
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_TypeName();
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_AttribNameOrWildcard()
+ {
+ eventHandler.startNonterminal("AttribNameOrWildcard", e0);
+ switch (l1)
+ {
+ case 39: // '*'
+ shift(39); // '*'
+ break;
+ default:
+ parse_AttributeName();
+ }
+ eventHandler.endNonterminal("AttribNameOrWildcard", e0);
+ }
+
+ function try_AttribNameOrWildcard()
+ {
+ switch (l1)
+ {
+ case 39: // '*'
+ shiftT(39); // '*'
+ break;
+ default:
+ try_AttributeName();
+ }
+ }
+
+ function parse_SchemaAttributeTest()
+ {
+ eventHandler.startNonterminal("SchemaAttributeTest", e0);
+ shift(230); // 'schema-attribute'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_AttributeDeclaration();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("SchemaAttributeTest", e0);
+ }
+
+ function try_SchemaAttributeTest()
+ {
+ shiftT(230); // 'schema-attribute'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_AttributeDeclaration();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ 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(122); // 'element'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(254); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ if (l1 != 38) // ')'
+ {
+ whitespace();
+ parse_ElementNameOrWildcard();
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 == 42) // ','
+ {
+ shift(42); // ','
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_TypeName();
+ lookahead1W(106); // S^WS | '(:' | ')' | '?'
+ if (l1 == 65) // '?'
+ {
+ shift(65); // '?'
+ }
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("ElementTest", e0);
+ }
+
+ function try_ElementTest()
+ {
+ shiftT(122); // 'element'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(254); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ if (l1 != 38) // ')'
+ {
+ try_ElementNameOrWildcard();
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 == 42) // ','
+ {
+ shiftT(42); // ','
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_TypeName();
+ lookahead1W(106); // S^WS | '(:' | ')' | '?'
+ if (l1 == 65) // '?'
+ {
+ shiftT(65); // '?'
+ }
+ }
+ }
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_ElementNameOrWildcard()
+ {
+ eventHandler.startNonterminal("ElementNameOrWildcard", e0);
+ switch (l1)
+ {
+ case 39: // '*'
+ shift(39); // '*'
+ break;
+ default:
+ parse_ElementName();
+ }
+ eventHandler.endNonterminal("ElementNameOrWildcard", e0);
+ }
+
+ function try_ElementNameOrWildcard()
+ {
+ switch (l1)
+ {
+ case 39: // '*'
+ shiftT(39); // '*'
+ break;
+ default:
+ try_ElementName();
+ }
+ }
+
+ function parse_SchemaElementTest()
+ {
+ eventHandler.startNonterminal("SchemaElementTest", e0);
+ shift(231); // 'schema-element'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_ElementDeclaration();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("SchemaElementTest", e0);
+ }
+
+ function try_SchemaElementTest()
+ {
+ shiftT(231); // 'schema-element'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_ElementDeclaration();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ 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(101); // S^WS | '%' | '(:' | 'function'
+ if (l1 != 33) // '%'
+ {
+ break;
+ }
+ whitespace();
+ parse_Annotation();
+ }
+ switch (l1)
+ {
+ case 147: // 'function'
+ lookahead2W(22); // S^WS | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ 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
+ {
+ 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(7, e0, lk);
+ }
+ switch (lk)
+ {
+ case -1:
+ whitespace();
+ parse_AnyFunctionTest();
+ break;
+ default:
+ whitespace();
+ parse_TypedFunctionTest();
+ }
+ eventHandler.endNonterminal("FunctionTest", e0);
+ }
+
+ function try_FunctionTest()
+ {
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '%' | '(:' | 'function'
+ if (l1 != 33) // '%'
+ {
+ break;
+ }
+ try_Annotation();
+ }
+ switch (l1)
+ {
+ case 147: // 'function'
+ lookahead2W(22); // S^WS | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ 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
+ {
+ try_AnyFunctionTest();
+ memoize(7, e0A, -1);
+ lk = -3;
+ }
+ 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, e0A, -2);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ try_AnyFunctionTest();
+ break;
+ case -3:
+ break;
+ default:
+ try_TypedFunctionTest();
+ }
+ }
+
+ function parse_AnyFunctionTest()
+ {
+ eventHandler.startNonterminal("AnyFunctionTest", e0);
+ shift(147); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(24); // S^WS | '(:' | '*'
+ shift(39); // '*'
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("AnyFunctionTest", e0);
+ }
+
+ function try_AnyFunctionTest()
+ {
+ shiftT(147); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(24); // S^WS | '(:' | '*'
+ shiftT(39); // '*'
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_TypedFunctionTest()
+ {
+ eventHandler.startNonterminal("TypedFunctionTest", e0);
+ shift(147); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(258); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' |
+ if (l1 != 38) // ')'
+ {
+ whitespace();
+ parse_SequenceType();
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ }
+ }
+ shift(38); // ')'
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shift(80); // 'as'
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ eventHandler.endNonterminal("TypedFunctionTest", e0);
+ }
+
+ function try_TypedFunctionTest()
+ {
+ shiftT(147); // 'function'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(258); // EQName^Token | S^WS | '%' | '(' | '(:' | ')' | 'after' | 'allowing' |
+ if (l1 != 38) // ')'
+ {
+ try_SequenceType();
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+ }
+ shiftT(38); // ')'
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shiftT(80); // 'as'
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ }
+
+ function parse_ParenthesizedItemType()
+ {
+ eventHandler.startNonterminal("ParenthesizedItemType", e0);
+ shift(35); // '('
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_ItemType();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shift(38); // ')'
+ eventHandler.endNonterminal("ParenthesizedItemType", e0);
+ }
+
+ function try_ParenthesizedItemType()
+ {
+ shiftT(35); // '('
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_ItemType();
+ lookahead1W(23); // S^WS | '(:' | ')'
+ shiftT(38); // ')'
+ }
+
+ function parse_RevalidationDecl()
+ {
+ eventHandler.startNonterminal("RevalidationDecl", e0);
+ shift(109); // 'declare'
+ lookahead1W(75); // S^WS | '(:' | 'revalidation'
+ shift(226); // 'revalidation'
+ lookahead1W(162); // S^WS | '(:' | 'lax' | 'skip' | 'strict'
+ switch (l1)
+ {
+ case 245: // 'strict'
+ shift(245); // 'strict'
+ break;
+ case 174: // 'lax'
+ shift(174); // 'lax'
+ break;
+ default:
+ shift(238); // 'skip'
+ }
+ eventHandler.endNonterminal("RevalidationDecl", e0);
+ }
+
+ function parse_InsertExprTargetChoice()
+ {
+ eventHandler.startNonterminal("InsertExprTargetChoice", e0);
+ switch (l1)
+ {
+ case 71: // 'after'
+ shift(71); // 'after'
+ break;
+ case 85: // 'before'
+ shift(85); // 'before'
+ break;
+ default:
+ if (l1 == 80) // 'as'
+ {
+ shift(80); // 'as'
+ lookahead1W(123); // S^WS | '(:' | 'first' | 'last'
+ switch (l1)
+ {
+ case 136: // 'first'
+ shift(136); // 'first'
+ break;
+ default:
+ shift(173); // 'last'
+ }
+ }
+ lookahead1W(57); // S^WS | '(:' | 'into'
+ shift(165); // 'into'
+ }
+ eventHandler.endNonterminal("InsertExprTargetChoice", e0);
+ }
+
+ function try_InsertExprTargetChoice()
+ {
+ switch (l1)
+ {
+ case 71: // 'after'
+ shiftT(71); // 'after'
+ break;
+ case 85: // 'before'
+ shiftT(85); // 'before'
+ break;
+ default:
+ if (l1 == 80) // 'as'
+ {
+ shiftT(80); // 'as'
+ lookahead1W(123); // S^WS | '(:' | 'first' | 'last'
+ switch (l1)
+ {
+ case 136: // 'first'
+ shiftT(136); // 'first'
+ break;
+ default:
+ shiftT(173); // 'last'
+ }
+ }
+ lookahead1W(57); // S^WS | '(:' | 'into'
+ shiftT(165); // 'into'
+ }
+ }
+
+ function parse_InsertExpr()
+ {
+ eventHandler.startNonterminal("InsertExpr", e0);
+ shift(161); // 'insert'
+ lookahead1W(133); // S^WS | '(:' | 'node' | 'nodes'
+ switch (l1)
+ {
+ case 194: // 'node'
+ shift(194); // 'node'
+ break;
+ default:
+ shift(195); // 'nodes'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_SourceExpr();
+ whitespace();
+ parse_InsertExprTargetChoice();
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_TargetExpr();
+ eventHandler.endNonterminal("InsertExpr", e0);
+ }
+
+ function try_InsertExpr()
+ {
+ shiftT(161); // 'insert'
+ lookahead1W(133); // S^WS | '(:' | 'node' | 'nodes'
+ switch (l1)
+ {
+ case 194: // 'node'
+ shiftT(194); // 'node'
+ break;
+ default:
+ shiftT(195); // 'nodes'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_SourceExpr();
+ try_InsertExprTargetChoice();
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_TargetExpr();
+ }
+
+ function parse_DeleteExpr()
+ {
+ eventHandler.startNonterminal("DeleteExpr", e0);
+ shift(111); // 'delete'
+ lookahead1W(133); // S^WS | '(:' | 'node' | 'nodes'
+ switch (l1)
+ {
+ case 194: // 'node'
+ shift(194); // 'node'
+ break;
+ default:
+ shift(195); // 'nodes'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_TargetExpr();
+ eventHandler.endNonterminal("DeleteExpr", e0);
+ }
+
+ function try_DeleteExpr()
+ {
+ shiftT(111); // 'delete'
+ lookahead1W(133); // S^WS | '(:' | 'node' | 'nodes'
+ switch (l1)
+ {
+ case 194: // 'node'
+ shiftT(194); // 'node'
+ break;
+ default:
+ shiftT(195); // 'nodes'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_TargetExpr();
+ }
+
+ function parse_ReplaceExpr()
+ {
+ eventHandler.startNonterminal("ReplaceExpr", e0);
+ shift(223); // 'replace'
+ lookahead1W(134); // S^WS | '(:' | 'node' | 'value'
+ if (l1 == 267) // 'value'
+ {
+ shift(267); // 'value'
+ lookahead1W(67); // S^WS | '(:' | 'of'
+ shift(200); // 'of'
+ }
+ lookahead1W(65); // S^WS | '(:' | 'node'
+ shift(194); // 'node'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_TargetExpr();
+ shift(276); // 'with'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ReplaceExpr", e0);
+ }
+
+ function try_ReplaceExpr()
+ {
+ shiftT(223); // 'replace'
+ lookahead1W(134); // S^WS | '(:' | 'node' | 'value'
+ if (l1 == 267) // 'value'
+ {
+ shiftT(267); // 'value'
+ lookahead1W(67); // S^WS | '(:' | 'of'
+ shiftT(200); // 'of'
+ }
+ lookahead1W(65); // S^WS | '(:' | 'node'
+ shiftT(194); // 'node'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_TargetExpr();
+ shiftT(276); // 'with'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_RenameExpr()
+ {
+ eventHandler.startNonterminal("RenameExpr", e0);
+ shift(222); // 'rename'
+ lookahead1W(65); // S^WS | '(:' | 'node'
+ shift(194); // 'node'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_TargetExpr();
+ shift(80); // 'as'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_NewNameExpr();
+ eventHandler.endNonterminal("RenameExpr", e0);
+ }
+
+ function try_RenameExpr()
+ {
+ shiftT(222); // 'rename'
+ lookahead1W(65); // S^WS | '(:' | 'node'
+ shiftT(194); // 'node'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_TargetExpr();
+ shiftT(80); // 'as'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ 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(104); // 'copy'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_TransformSpec();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_TransformSpec();
+ }
+ shift(184); // 'modify'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(224); // 'return'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("TransformExpr", e0);
+ }
+
+ function try_TransformExpr()
+ {
+ shiftT(104); // 'copy'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_TransformSpec();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_TransformSpec();
+ }
+ shiftT(184); // 'modify'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ shiftT(224); // 'return'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_TransformSpec()
+ {
+ eventHandler.startNonterminal("TransformSpec", e0);
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shift(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("TransformSpec", e0);
+ }
+
+ function try_TransformSpec()
+ {
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shiftT(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_FTSelection()
+ {
+ eventHandler.startNonterminal("FTSelection", e0);
+ parse_FTOr();
+ for (;;)
+ {
+ lookahead1W(211); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ switch (l1)
+ {
+ case 82: // 'at'
+ lookahead2W(161); // S^WS | '(:' | 'end' | 'position' | 'start'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 116 // 'different'
+ && lk != 118 // 'distance'
+ && lk != 128 // 'entire'
+ && lk != 206 // 'ordered'
+ && lk != 227 // 'same'
+ && lk != 275 // 'window'
+ && lk != 65106 // 'at' 'end'
+ && lk != 123986) // 'at' 'start'
+ {
+ break;
+ }
+ whitespace();
+ parse_FTPosFilter();
+ }
+ eventHandler.endNonterminal("FTSelection", e0);
+ }
+
+ function try_FTSelection()
+ {
+ try_FTOr();
+ for (;;)
+ {
+ lookahead1W(211); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ switch (l1)
+ {
+ case 82: // 'at'
+ lookahead2W(161); // S^WS | '(:' | 'end' | 'position' | 'start'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 116 // 'different'
+ && lk != 118 // 'distance'
+ && lk != 128 // 'entire'
+ && lk != 206 // 'ordered'
+ && lk != 227 // 'same'
+ && lk != 275 // 'window'
+ && lk != 65106 // 'at' 'end'
+ && lk != 123986) // 'at' 'start'
+ {
+ break;
+ }
+ try_FTPosFilter();
+ }
+ }
+
+ function parse_FTWeight()
+ {
+ eventHandler.startNonterminal("FTWeight", e0);
+ shift(270); // 'weight'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shift(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("FTWeight", e0);
+ }
+
+ function try_FTWeight()
+ {
+ shiftT(270); // 'weight'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ shiftT(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ }
+
+ function parse_FTOr()
+ {
+ eventHandler.startNonterminal("FTOr", e0);
+ parse_FTAnd();
+ for (;;)
+ {
+ if (l1 != 146) // 'ftor'
+ {
+ break;
+ }
+ shift(146); // 'ftor'
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTAnd();
+ }
+ eventHandler.endNonterminal("FTOr", e0);
+ }
+
+ function try_FTOr()
+ {
+ try_FTAnd();
+ for (;;)
+ {
+ if (l1 != 146) // 'ftor'
+ {
+ break;
+ }
+ shiftT(146); // 'ftor'
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTAnd();
+ }
+ }
+
+ function parse_FTAnd()
+ {
+ eventHandler.startNonterminal("FTAnd", e0);
+ parse_FTMildNot();
+ for (;;)
+ {
+ if (l1 != 144) // 'ftand'
+ {
+ break;
+ }
+ shift(144); // 'ftand'
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTMildNot();
+ }
+ eventHandler.endNonterminal("FTAnd", e0);
+ }
+
+ function try_FTAnd()
+ {
+ try_FTMildNot();
+ for (;;)
+ {
+ if (l1 != 144) // 'ftand'
+ {
+ break;
+ }
+ shiftT(144); // 'ftand'
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTMildNot();
+ }
+ }
+
+ function parse_FTMildNot()
+ {
+ eventHandler.startNonterminal("FTMildNot", e0);
+ parse_FTUnaryNot();
+ for (;;)
+ {
+ lookahead1W(212); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 196) // 'not'
+ {
+ break;
+ }
+ shift(196); // 'not'
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shift(156); // 'in'
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTUnaryNot();
+ }
+ eventHandler.endNonterminal("FTMildNot", e0);
+ }
+
+ function try_FTMildNot()
+ {
+ try_FTUnaryNot();
+ for (;;)
+ {
+ lookahead1W(212); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 196) // 'not'
+ {
+ break;
+ }
+ shiftT(196); // 'not'
+ lookahead1W(56); // S^WS | '(:' | 'in'
+ shiftT(156); // 'in'
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTUnaryNot();
+ }
+ }
+
+ function parse_FTUnaryNot()
+ {
+ eventHandler.startNonterminal("FTUnaryNot", e0);
+ if (l1 == 145) // 'ftnot'
+ {
+ shift(145); // 'ftnot'
+ }
+ lookahead1W(164); // StringLiteral | S^WS | '(' | '(#' | '(:' | '{'
+ whitespace();
+ parse_FTPrimaryWithOptions();
+ eventHandler.endNonterminal("FTUnaryNot", e0);
+ }
+
+ function try_FTUnaryNot()
+ {
+ if (l1 == 145) // 'ftnot'
+ {
+ shiftT(145); // 'ftnot'
+ }
+ lookahead1W(164); // StringLiteral | S^WS | '(' | '(#' | '(:' | '{'
+ try_FTPrimaryWithOptions();
+ }
+
+ function parse_FTPrimaryWithOptions()
+ {
+ eventHandler.startNonterminal("FTPrimaryWithOptions", e0);
+ parse_FTPrimary();
+ lookahead1W(213); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 265) // 'using'
+ {
+ whitespace();
+ parse_FTMatchOptions();
+ }
+ if (l1 == 270) // 'weight'
+ {
+ whitespace();
+ parse_FTWeight();
+ }
+ eventHandler.endNonterminal("FTPrimaryWithOptions", e0);
+ }
+
+ function try_FTPrimaryWithOptions()
+ {
+ try_FTPrimary();
+ lookahead1W(213); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 265) // 'using'
+ {
+ try_FTMatchOptions();
+ }
+ if (l1 == 270) // 'weight'
+ {
+ try_FTWeight();
+ }
+ }
+
+ function parse_FTPrimary()
+ {
+ eventHandler.startNonterminal("FTPrimary", e0);
+ switch (l1)
+ {
+ case 35: // '('
+ shift(35); // '('
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ whitespace();
+ parse_FTSelection();
+ shift(38); // ')'
+ break;
+ case 36: // '(#'
+ parse_FTExtensionSelection();
+ break;
+ default:
+ parse_FTWords();
+ lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 199) // 'occurs'
+ {
+ whitespace();
+ parse_FTTimes();
+ }
+ }
+ eventHandler.endNonterminal("FTPrimary", e0);
+ }
+
+ function try_FTPrimary()
+ {
+ switch (l1)
+ {
+ case 35: // '('
+ shiftT(35); // '('
+ lookahead1W(177); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{'
+ try_FTSelection();
+ shiftT(38); // ')'
+ break;
+ case 36: // '(#'
+ try_FTExtensionSelection();
+ break;
+ default:
+ try_FTWords();
+ lookahead1W(214); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 199) // 'occurs'
+ {
+ try_FTTimes();
+ }
+ }
+ }
+
+ function parse_FTWords()
+ {
+ eventHandler.startNonterminal("FTWords", e0);
+ parse_FTWordsValue();
+ lookahead1W(220); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 72 // 'all'
+ || l1 == 77 // 'any'
+ || l1 == 214) // 'phrase'
+ {
+ whitespace();
+ parse_FTAnyallOption();
+ }
+ eventHandler.endNonterminal("FTWords", e0);
+ }
+
+ function try_FTWords()
+ {
+ try_FTWordsValue();
+ lookahead1W(220); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 72 // 'all'
+ || l1 == 77 // 'any'
+ || l1 == 214) // 'phrase'
+ {
+ try_FTAnyallOption();
+ }
+ }
+
+ function parse_FTWordsValue()
+ {
+ eventHandler.startNonterminal("FTWordsValue", e0);
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shift(11); // StringLiteral
+ break;
+ default:
+ shift(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ }
+ eventHandler.endNonterminal("FTWordsValue", e0);
+ }
+
+ function try_FTWordsValue()
+ {
+ switch (l1)
+ {
+ case 11: // StringLiteral
+ shiftT(11); // StringLiteral
+ break;
+ default:
+ shiftT(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ }
+ }
+
+ function parse_FTExtensionSelection()
+ {
+ eventHandler.startNonterminal("FTExtensionSelection", e0);
+ for (;;)
+ {
+ whitespace();
+ parse_Pragma();
+ lookahead1W(104); // S^WS | '(#' | '(:' | '{'
+ if (l1 != 36) // '(#'
+ {
+ break;
+ }
+ }
+ shift(281); // '{'
+ lookahead1W(184); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' | '}'
+ if (l1 != 287) // '}'
+ {
+ whitespace();
+ parse_FTSelection();
+ }
+ shift(287); // '}'
+ eventHandler.endNonterminal("FTExtensionSelection", e0);
+ }
+
+ function try_FTExtensionSelection()
+ {
+ for (;;)
+ {
+ try_Pragma();
+ lookahead1W(104); // S^WS | '(#' | '(:' | '{'
+ if (l1 != 36) // '(#'
+ {
+ break;
+ }
+ }
+ shiftT(281); // '{'
+ lookahead1W(184); // StringLiteral | S^WS | '(' | '(#' | '(:' | 'ftnot' | '{' | '}'
+ if (l1 != 287) // '}'
+ {
+ try_FTSelection();
+ }
+ shiftT(287); // '}'
+ }
+
+ function parse_FTAnyallOption()
+ {
+ eventHandler.startNonterminal("FTAnyallOption", e0);
+ switch (l1)
+ {
+ case 77: // 'any'
+ shift(77); // 'any'
+ lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 278) // 'word'
+ {
+ shift(278); // 'word'
+ }
+ break;
+ case 72: // 'all'
+ shift(72); // 'all'
+ lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 279) // 'words'
+ {
+ shift(279); // 'words'
+ }
+ break;
+ default:
+ shift(214); // 'phrase'
+ }
+ eventHandler.endNonterminal("FTAnyallOption", e0);
+ }
+
+ function try_FTAnyallOption()
+ {
+ switch (l1)
+ {
+ case 77: // 'any'
+ shiftT(77); // 'any'
+ lookahead1W(217); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 278) // 'word'
+ {
+ shiftT(278); // 'word'
+ }
+ break;
+ case 72: // 'all'
+ shiftT(72); // 'all'
+ lookahead1W(218); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 279) // 'words'
+ {
+ shiftT(279); // 'words'
+ }
+ break;
+ default:
+ shiftT(214); // 'phrase'
+ }
+ }
+
+ function parse_FTTimes()
+ {
+ eventHandler.startNonterminal("FTTimes", e0);
+ shift(199); // 'occurs'
+ lookahead1W(159); // S^WS | '(:' | 'at' | 'exactly' | 'from'
+ whitespace();
+ parse_FTRange();
+ shift(252); // 'times'
+ eventHandler.endNonterminal("FTTimes", e0);
+ }
+
+ function try_FTTimes()
+ {
+ shiftT(199); // 'occurs'
+ lookahead1W(159); // S^WS | '(:' | 'at' | 'exactly' | 'from'
+ try_FTRange();
+ shiftT(252); // 'times'
+ }
+
+ function parse_FTRange()
+ {
+ eventHandler.startNonterminal("FTRange", e0);
+ switch (l1)
+ {
+ case 131: // 'exactly'
+ shift(131); // 'exactly'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ break;
+ case 82: // 'at'
+ shift(82); // 'at'
+ lookahead1W(129); // S^WS | '(:' | 'least' | 'most'
+ switch (l1)
+ {
+ case 176: // 'least'
+ shift(176); // 'least'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ break;
+ default:
+ shift(186); // 'most'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ }
+ break;
+ default:
+ shift(142); // 'from'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ shift(253); // 'to'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ }
+ eventHandler.endNonterminal("FTRange", e0);
+ }
+
+ function try_FTRange()
+ {
+ switch (l1)
+ {
+ case 131: // 'exactly'
+ shiftT(131); // 'exactly'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_AdditiveExpr();
+ break;
+ case 82: // 'at'
+ shiftT(82); // 'at'
+ lookahead1W(129); // S^WS | '(:' | 'least' | 'most'
+ switch (l1)
+ {
+ case 176: // 'least'
+ shiftT(176); // 'least'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_AdditiveExpr();
+ break;
+ default:
+ shiftT(186); // 'most'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_AdditiveExpr();
+ }
+ break;
+ default:
+ shiftT(142); // 'from'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_AdditiveExpr();
+ shiftT(253); // 'to'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_AdditiveExpr();
+ }
+ }
+
+ function parse_FTPosFilter()
+ {
+ eventHandler.startNonterminal("FTPosFilter", e0);
+ switch (l1)
+ {
+ case 206: // 'ordered'
+ parse_FTOrder();
+ break;
+ case 275: // 'window'
+ parse_FTWindow();
+ break;
+ case 118: // 'distance'
+ parse_FTDistance();
+ break;
+ case 116: // 'different'
+ case 227: // 'same'
+ parse_FTScope();
+ break;
+ default:
+ parse_FTContent();
+ }
+ eventHandler.endNonterminal("FTPosFilter", e0);
+ }
+
+ function try_FTPosFilter()
+ {
+ switch (l1)
+ {
+ case 206: // 'ordered'
+ try_FTOrder();
+ break;
+ case 275: // 'window'
+ try_FTWindow();
+ break;
+ case 118: // 'distance'
+ try_FTDistance();
+ break;
+ case 116: // 'different'
+ case 227: // 'same'
+ try_FTScope();
+ break;
+ default:
+ try_FTContent();
+ }
+ }
+
+ function parse_FTOrder()
+ {
+ eventHandler.startNonterminal("FTOrder", e0);
+ shift(206); // 'ordered'
+ eventHandler.endNonterminal("FTOrder", e0);
+ }
+
+ function try_FTOrder()
+ {
+ shiftT(206); // 'ordered'
+ }
+
+ function parse_FTWindow()
+ {
+ eventHandler.startNonterminal("FTWindow", e0);
+ shift(275); // 'window'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ whitespace();
+ parse_FTUnit();
+ eventHandler.endNonterminal("FTWindow", e0);
+ }
+
+ function try_FTWindow()
+ {
+ shiftT(275); // 'window'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_AdditiveExpr();
+ try_FTUnit();
+ }
+
+ function parse_FTDistance()
+ {
+ eventHandler.startNonterminal("FTDistance", e0);
+ shift(118); // 'distance'
+ lookahead1W(159); // S^WS | '(:' | 'at' | 'exactly' | 'from'
+ whitespace();
+ parse_FTRange();
+ whitespace();
+ parse_FTUnit();
+ eventHandler.endNonterminal("FTDistance", e0);
+ }
+
+ function try_FTDistance()
+ {
+ shiftT(118); // 'distance'
+ lookahead1W(159); // S^WS | '(:' | 'at' | 'exactly' | 'from'
+ try_FTRange();
+ try_FTUnit();
+ }
+
+ function parse_FTUnit()
+ {
+ eventHandler.startNonterminal("FTUnit", e0);
+ switch (l1)
+ {
+ case 279: // 'words'
+ shift(279); // 'words'
+ break;
+ case 237: // 'sentences'
+ shift(237); // 'sentences'
+ break;
+ default:
+ shift(209); // 'paragraphs'
+ }
+ eventHandler.endNonterminal("FTUnit", e0);
+ }
+
+ function try_FTUnit()
+ {
+ switch (l1)
+ {
+ case 279: // 'words'
+ shiftT(279); // 'words'
+ break;
+ case 237: // 'sentences'
+ shiftT(237); // 'sentences'
+ break;
+ default:
+ shiftT(209); // 'paragraphs'
+ }
+ }
+
+ function parse_FTScope()
+ {
+ eventHandler.startNonterminal("FTScope", e0);
+ switch (l1)
+ {
+ case 227: // 'same'
+ shift(227); // 'same'
+ break;
+ default:
+ shift(116); // 'different'
+ }
+ lookahead1W(136); // S^WS | '(:' | 'paragraph' | 'sentence'
+ whitespace();
+ parse_FTBigUnit();
+ eventHandler.endNonterminal("FTScope", e0);
+ }
+
+ function try_FTScope()
+ {
+ switch (l1)
+ {
+ case 227: // 'same'
+ shiftT(227); // 'same'
+ break;
+ default:
+ shiftT(116); // 'different'
+ }
+ lookahead1W(136); // S^WS | '(:' | 'paragraph' | 'sentence'
+ try_FTBigUnit();
+ }
+
+ function parse_FTBigUnit()
+ {
+ eventHandler.startNonterminal("FTBigUnit", e0);
+ switch (l1)
+ {
+ case 236: // 'sentence'
+ shift(236); // 'sentence'
+ break;
+ default:
+ shift(208); // 'paragraph'
+ }
+ eventHandler.endNonterminal("FTBigUnit", e0);
+ }
+
+ function try_FTBigUnit()
+ {
+ switch (l1)
+ {
+ case 236: // 'sentence'
+ shiftT(236); // 'sentence'
+ break;
+ default:
+ shiftT(208); // 'paragraph'
+ }
+ }
+
+ function parse_FTContent()
+ {
+ eventHandler.startNonterminal("FTContent", e0);
+ switch (l1)
+ {
+ case 82: // 'at'
+ shift(82); // 'at'
+ lookahead1W(121); // S^WS | '(:' | 'end' | 'start'
+ switch (l1)
+ {
+ case 242: // 'start'
+ shift(242); // 'start'
+ break;
+ default:
+ shift(127); // 'end'
+ }
+ break;
+ default:
+ shift(128); // 'entire'
+ lookahead1W(45); // S^WS | '(:' | 'content'
+ shift(101); // 'content'
+ }
+ eventHandler.endNonterminal("FTContent", e0);
+ }
+
+ function try_FTContent()
+ {
+ switch (l1)
+ {
+ case 82: // 'at'
+ shiftT(82); // 'at'
+ lookahead1W(121); // S^WS | '(:' | 'end' | 'start'
+ switch (l1)
+ {
+ case 242: // 'start'
+ shiftT(242); // 'start'
+ break;
+ default:
+ shiftT(127); // 'end'
+ }
+ break;
+ default:
+ shiftT(128); // 'entire'
+ lookahead1W(45); // S^WS | '(:' | 'content'
+ shiftT(101); // 'content'
+ }
+ }
+
+ function parse_FTMatchOptions()
+ {
+ eventHandler.startNonterminal("FTMatchOptions", e0);
+ for (;;)
+ {
+ shift(265); // 'using'
+ lookahead1W(204); // S^WS | '(:' | 'case' | 'diacritics' | 'language' | 'lowercase' | 'no' |
+ whitespace();
+ parse_FTMatchOption();
+ lookahead1W(213); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 265) // 'using'
+ {
+ break;
+ }
+ }
+ eventHandler.endNonterminal("FTMatchOptions", e0);
+ }
+
+ function try_FTMatchOptions()
+ {
+ for (;;)
+ {
+ shiftT(265); // 'using'
+ lookahead1W(204); // S^WS | '(:' | 'case' | 'diacritics' | 'language' | 'lowercase' | 'no' |
+ try_FTMatchOption();
+ lookahead1W(213); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 265) // 'using'
+ {
+ break;
+ }
+ }
+ }
+
+ function parse_FTMatchOption()
+ {
+ eventHandler.startNonterminal("FTMatchOption", e0);
+ switch (l1)
+ {
+ case 191: // 'no'
+ lookahead2W(176); // S^WS | '(:' | 'stemming' | 'stop' | 'thesaurus' | 'wildcards'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 172: // 'language'
+ parse_FTLanguageOption();
+ break;
+ case 274: // 'wildcards'
+ case 140479: // 'no' 'wildcards'
+ parse_FTWildCardOption();
+ break;
+ case 251: // 'thesaurus'
+ case 128703: // 'no' 'thesaurus'
+ parse_FTThesaurusOption();
+ break;
+ case 243: // 'stemming'
+ case 124607: // 'no' 'stemming'
+ parse_FTStemOption();
+ break;
+ case 115: // 'diacritics'
+ parse_FTDiacriticsOption();
+ break;
+ case 244: // 'stop'
+ case 125119: // 'no' 'stop'
+ parse_FTStopWordOption();
+ break;
+ case 203: // 'option'
+ parse_FTExtensionOption();
+ break;
+ default:
+ parse_FTCaseOption();
+ }
+ eventHandler.endNonterminal("FTMatchOption", e0);
+ }
+
+ function try_FTMatchOption()
+ {
+ switch (l1)
+ {
+ case 191: // 'no'
+ lookahead2W(176); // S^WS | '(:' | 'stemming' | 'stop' | 'thesaurus' | 'wildcards'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 172: // 'language'
+ try_FTLanguageOption();
+ break;
+ case 274: // 'wildcards'
+ case 140479: // 'no' 'wildcards'
+ try_FTWildCardOption();
+ break;
+ case 251: // 'thesaurus'
+ case 128703: // 'no' 'thesaurus'
+ try_FTThesaurusOption();
+ break;
+ case 243: // 'stemming'
+ case 124607: // 'no' 'stemming'
+ try_FTStemOption();
+ break;
+ case 115: // 'diacritics'
+ try_FTDiacriticsOption();
+ break;
+ case 244: // 'stop'
+ case 125119: // 'no' 'stop'
+ try_FTStopWordOption();
+ break;
+ case 203: // 'option'
+ try_FTExtensionOption();
+ break;
+ default:
+ try_FTCaseOption();
+ }
+ }
+
+ function parse_FTCaseOption()
+ {
+ eventHandler.startNonterminal("FTCaseOption", e0);
+ switch (l1)
+ {
+ case 89: // 'case'
+ shift(89); // 'case'
+ lookahead1W(128); // S^WS | '(:' | 'insensitive' | 'sensitive'
+ switch (l1)
+ {
+ case 160: // 'insensitive'
+ shift(160); // 'insensitive'
+ break;
+ default:
+ shift(235); // 'sensitive'
+ }
+ break;
+ case 180: // 'lowercase'
+ shift(180); // 'lowercase'
+ break;
+ default:
+ shift(264); // 'uppercase'
+ }
+ eventHandler.endNonterminal("FTCaseOption", e0);
+ }
+
+ function try_FTCaseOption()
+ {
+ switch (l1)
+ {
+ case 89: // 'case'
+ shiftT(89); // 'case'
+ lookahead1W(128); // S^WS | '(:' | 'insensitive' | 'sensitive'
+ switch (l1)
+ {
+ case 160: // 'insensitive'
+ shiftT(160); // 'insensitive'
+ break;
+ default:
+ shiftT(235); // 'sensitive'
+ }
+ break;
+ case 180: // 'lowercase'
+ shiftT(180); // 'lowercase'
+ break;
+ default:
+ shiftT(264); // 'uppercase'
+ }
+ }
+
+ function parse_FTDiacriticsOption()
+ {
+ eventHandler.startNonterminal("FTDiacriticsOption", e0);
+ shift(115); // 'diacritics'
+ lookahead1W(128); // S^WS | '(:' | 'insensitive' | 'sensitive'
+ switch (l1)
+ {
+ case 160: // 'insensitive'
+ shift(160); // 'insensitive'
+ break;
+ default:
+ shift(235); // 'sensitive'
+ }
+ eventHandler.endNonterminal("FTDiacriticsOption", e0);
+ }
+
+ function try_FTDiacriticsOption()
+ {
+ shiftT(115); // 'diacritics'
+ lookahead1W(128); // S^WS | '(:' | 'insensitive' | 'sensitive'
+ switch (l1)
+ {
+ case 160: // 'insensitive'
+ shiftT(160); // 'insensitive'
+ break;
+ default:
+ shiftT(235); // 'sensitive'
+ }
+ }
+
+ function parse_FTStemOption()
+ {
+ eventHandler.startNonterminal("FTStemOption", e0);
+ switch (l1)
+ {
+ case 243: // 'stemming'
+ shift(243); // 'stemming'
+ break;
+ default:
+ shift(191); // 'no'
+ lookahead1W(77); // S^WS | '(:' | 'stemming'
+ shift(243); // 'stemming'
+ }
+ eventHandler.endNonterminal("FTStemOption", e0);
+ }
+
+ function try_FTStemOption()
+ {
+ switch (l1)
+ {
+ case 243: // 'stemming'
+ shiftT(243); // 'stemming'
+ break;
+ default:
+ shiftT(191); // 'no'
+ lookahead1W(77); // S^WS | '(:' | 'stemming'
+ shiftT(243); // 'stemming'
+ }
+ }
+
+ function parse_FTThesaurusOption()
+ {
+ eventHandler.startNonterminal("FTThesaurusOption", e0);
+ switch (l1)
+ {
+ case 251: // 'thesaurus'
+ shift(251); // 'thesaurus'
+ lookahead1W(152); // S^WS | '(' | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 82: // 'at'
+ whitespace();
+ parse_FTThesaurusID();
+ break;
+ case 110: // 'default'
+ shift(110); // 'default'
+ break;
+ default:
+ shift(35); // '('
+ lookahead1W(116); // S^WS | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 82: // 'at'
+ whitespace();
+ parse_FTThesaurusID();
+ break;
+ default:
+ shift(110); // 'default'
+ }
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(34); // S^WS | '(:' | 'at'
+ whitespace();
+ parse_FTThesaurusID();
+ }
+ shift(38); // ')'
+ }
+ break;
+ default:
+ shift(191); // 'no'
+ lookahead1W(81); // S^WS | '(:' | 'thesaurus'
+ shift(251); // 'thesaurus'
+ }
+ eventHandler.endNonterminal("FTThesaurusOption", e0);
+ }
+
+ function try_FTThesaurusOption()
+ {
+ switch (l1)
+ {
+ case 251: // 'thesaurus'
+ shiftT(251); // 'thesaurus'
+ lookahead1W(152); // S^WS | '(' | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 82: // 'at'
+ try_FTThesaurusID();
+ break;
+ case 110: // 'default'
+ shiftT(110); // 'default'
+ break;
+ default:
+ shiftT(35); // '('
+ lookahead1W(116); // S^WS | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 82: // 'at'
+ try_FTThesaurusID();
+ break;
+ default:
+ shiftT(110); // 'default'
+ }
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(34); // S^WS | '(:' | 'at'
+ try_FTThesaurusID();
+ }
+ shiftT(38); // ')'
+ }
+ break;
+ default:
+ shiftT(191); // 'no'
+ lookahead1W(81); // S^WS | '(:' | 'thesaurus'
+ shiftT(251); // 'thesaurus'
+ }
+ }
+
+ function parse_FTThesaurusID()
+ {
+ eventHandler.startNonterminal("FTThesaurusID", e0);
+ shift(82); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ lookahead1W(219); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 221) // 'relationship'
+ {
+ shift(221); // 'relationship'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ }
+ lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ switch (l1)
+ {
+ case 82: // 'at'
+ lookahead2W(183); // S^WS | '(:' | 'end' | 'least' | 'most' | 'position' | 'start'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 131 // 'exactly'
+ || lk == 142 // 'from'
+ || lk == 90194 // 'at' 'least'
+ || lk == 95314) // 'at' 'most'
+ {
+ whitespace();
+ parse_FTLiteralRange();
+ lookahead1W(61); // S^WS | '(:' | 'levels'
+ shift(178); // 'levels'
+ }
+ eventHandler.endNonterminal("FTThesaurusID", e0);
+ }
+
+ function try_FTThesaurusID()
+ {
+ shiftT(82); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ lookahead1W(219); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 == 221) // 'relationship'
+ {
+ shiftT(221); // 'relationship'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ }
+ lookahead1W(215); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ switch (l1)
+ {
+ case 82: // 'at'
+ lookahead2W(183); // S^WS | '(:' | 'end' | 'least' | 'most' | 'position' | 'start'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 131 // 'exactly'
+ || lk == 142 // 'from'
+ || lk == 90194 // 'at' 'least'
+ || lk == 95314) // 'at' 'most'
+ {
+ try_FTLiteralRange();
+ lookahead1W(61); // S^WS | '(:' | 'levels'
+ shiftT(178); // 'levels'
+ }
+ }
+
+ function parse_FTLiteralRange()
+ {
+ eventHandler.startNonterminal("FTLiteralRange", e0);
+ switch (l1)
+ {
+ case 131: // 'exactly'
+ shift(131); // 'exactly'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ break;
+ case 82: // 'at'
+ shift(82); // 'at'
+ lookahead1W(129); // S^WS | '(:' | 'least' | 'most'
+ switch (l1)
+ {
+ case 176: // 'least'
+ shift(176); // 'least'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ break;
+ default:
+ shift(186); // 'most'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ }
+ break;
+ default:
+ shift(142); // 'from'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ lookahead1W(82); // S^WS | '(:' | 'to'
+ shift(253); // 'to'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shift(8); // IntegerLiteral
+ }
+ eventHandler.endNonterminal("FTLiteralRange", e0);
+ }
+
+ function try_FTLiteralRange()
+ {
+ switch (l1)
+ {
+ case 131: // 'exactly'
+ shiftT(131); // 'exactly'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ break;
+ case 82: // 'at'
+ shiftT(82); // 'at'
+ lookahead1W(129); // S^WS | '(:' | 'least' | 'most'
+ switch (l1)
+ {
+ case 176: // 'least'
+ shiftT(176); // 'least'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ break;
+ default:
+ shiftT(186); // 'most'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ }
+ break;
+ default:
+ shiftT(142); // 'from'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ lookahead1W(82); // S^WS | '(:' | 'to'
+ shiftT(253); // 'to'
+ lookahead1W(16); // IntegerLiteral | S^WS | '(:'
+ shiftT(8); // IntegerLiteral
+ }
+ }
+
+ function parse_FTStopWordOption()
+ {
+ eventHandler.startNonterminal("FTStopWordOption", e0);
+ switch (l1)
+ {
+ case 244: // 'stop'
+ shift(244); // 'stop'
+ lookahead1W(89); // S^WS | '(:' | 'words'
+ shift(279); // 'words'
+ lookahead1W(152); // S^WS | '(' | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 110: // 'default'
+ shift(110); // 'default'
+ for (;;)
+ {
+ lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 132 // 'except'
+ && l1 != 260) // 'union'
+ {
+ break;
+ }
+ whitespace();
+ parse_FTStopWordsInclExcl();
+ }
+ break;
+ default:
+ whitespace();
+ parse_FTStopWords();
+ for (;;)
+ {
+ lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 132 // 'except'
+ && l1 != 260) // 'union'
+ {
+ break;
+ }
+ whitespace();
+ parse_FTStopWordsInclExcl();
+ }
+ }
+ break;
+ default:
+ shift(191); // 'no'
+ lookahead1W(78); // S^WS | '(:' | 'stop'
+ shift(244); // 'stop'
+ lookahead1W(89); // S^WS | '(:' | 'words'
+ shift(279); // 'words'
+ }
+ eventHandler.endNonterminal("FTStopWordOption", e0);
+ }
+
+ function try_FTStopWordOption()
+ {
+ switch (l1)
+ {
+ case 244: // 'stop'
+ shiftT(244); // 'stop'
+ lookahead1W(89); // S^WS | '(:' | 'words'
+ shiftT(279); // 'words'
+ lookahead1W(152); // S^WS | '(' | '(:' | 'at' | 'default'
+ switch (l1)
+ {
+ case 110: // 'default'
+ shiftT(110); // 'default'
+ for (;;)
+ {
+ lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 132 // 'except'
+ && l1 != 260) // 'union'
+ {
+ break;
+ }
+ try_FTStopWordsInclExcl();
+ }
+ break;
+ default:
+ try_FTStopWords();
+ for (;;)
+ {
+ lookahead1W(216); // S^WS | EOF | '!=' | '(:' | ')' | ',' | ':' | ';' | '<' | '<<' | '<=' | '=' |
+ if (l1 != 132 // 'except'
+ && l1 != 260) // 'union'
+ {
+ break;
+ }
+ try_FTStopWordsInclExcl();
+ }
+ }
+ break;
+ default:
+ shiftT(191); // 'no'
+ lookahead1W(78); // S^WS | '(:' | 'stop'
+ shiftT(244); // 'stop'
+ lookahead1W(89); // S^WS | '(:' | 'words'
+ shiftT(279); // 'words'
+ }
+ }
+
+ function parse_FTStopWords()
+ {
+ eventHandler.startNonterminal("FTStopWords", e0);
+ switch (l1)
+ {
+ case 82: // 'at'
+ shift(82); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ break;
+ default:
+ shift(35); // '('
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ }
+ shift(38); // ')'
+ }
+ eventHandler.endNonterminal("FTStopWords", e0);
+ }
+
+ function try_FTStopWords()
+ {
+ switch (l1)
+ {
+ case 82: // 'at'
+ shiftT(82); // 'at'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shiftT(7); // URILiteral
+ break;
+ default:
+ shiftT(35); // '('
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ for (;;)
+ {
+ lookahead1W(105); // S^WS | '(:' | ')' | ','
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ }
+ shiftT(38); // ')'
+ }
+ }
+
+ function parse_FTStopWordsInclExcl()
+ {
+ eventHandler.startNonterminal("FTStopWordsInclExcl", e0);
+ switch (l1)
+ {
+ case 260: // 'union'
+ shift(260); // 'union'
+ break;
+ default:
+ shift(132); // 'except'
+ }
+ lookahead1W(103); // S^WS | '(' | '(:' | 'at'
+ whitespace();
+ parse_FTStopWords();
+ eventHandler.endNonterminal("FTStopWordsInclExcl", e0);
+ }
+
+ function try_FTStopWordsInclExcl()
+ {
+ switch (l1)
+ {
+ case 260: // 'union'
+ shiftT(260); // 'union'
+ break;
+ default:
+ shiftT(132); // 'except'
+ }
+ lookahead1W(103); // S^WS | '(' | '(:' | 'at'
+ try_FTStopWords();
+ }
+
+ function parse_FTLanguageOption()
+ {
+ eventHandler.startNonterminal("FTLanguageOption", e0);
+ shift(172); // 'language'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shift(11); // StringLiteral
+ eventHandler.endNonterminal("FTLanguageOption", e0);
+ }
+
+ function try_FTLanguageOption()
+ {
+ shiftT(172); // 'language'
+ lookahead1W(17); // StringLiteral | S^WS | '(:'
+ shiftT(11); // StringLiteral
+ }
+
+ function parse_FTWildCardOption()
+ {
+ eventHandler.startNonterminal("FTWildCardOption", e0);
+ switch (l1)
+ {
+ case 274: // 'wildcards'
+ shift(274); // 'wildcards'
+ break;
+ default:
+ shift(191); // 'no'
+ lookahead1W(87); // S^WS | '(:' | 'wildcards'
+ shift(274); // 'wildcards'
+ }
+ eventHandler.endNonterminal("FTWildCardOption", e0);
+ }
+
+ function try_FTWildCardOption()
+ {
+ switch (l1)
+ {
+ case 274: // 'wildcards'
+ shiftT(274); // 'wildcards'
+ break;
+ default:
+ shiftT(191); // 'no'
+ lookahead1W(87); // S^WS | '(:' | 'wildcards'
+ shiftT(274); // 'wildcards'
+ }
+ }
+
+ function parse_FTExtensionOption()
+ {
+ eventHandler.startNonterminal("FTExtensionOption", e0);
+ shift(203); // 'option'
+ lookahead1W(245); // 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(203); // 'option'
+ lookahead1W(245); // 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(277); // 'without'
+ lookahead1W(45); // S^WS | '(:' | 'content'
+ shift(101); // 'content'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_UnionExpr();
+ eventHandler.endNonterminal("FTIgnoreOption", e0);
+ }
+
+ function try_FTIgnoreOption()
+ {
+ shiftT(277); // 'without'
+ lookahead1W(45); // S^WS | '(:' | 'content'
+ shiftT(101); // 'content'
+ lookahead1W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_UnionExpr();
+ }
+
+ function parse_CollectionDecl()
+ {
+ eventHandler.startNonterminal("CollectionDecl", e0);
+ shift(96); // 'collection'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(111); // S^WS | '(:' | ';' | 'as'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_CollectionTypeDecl();
+ }
+ eventHandler.endNonterminal("CollectionDecl", e0);
+ }
+
+ function parse_CollectionTypeDecl()
+ {
+ eventHandler.startNonterminal("CollectionTypeDecl", e0);
+ shift(80); // 'as'
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_ItemType();
+ lookahead1W(171); // S^WS | '(:' | '*' | '+' | ';' | '?'
+ if (l1 != 54) // ';'
+ {
+ 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 == 80) // 'as'
+ {
+ whitespace();
+ parse_IndexKeyTypeDecl();
+ }
+ lookahead1W(156); // S^WS | '(:' | ',' | ';' | 'collation'
+ if (l1 == 95) // '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(80); // 'as'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_AtomicType();
+ lookahead1W(189); // S^WS | '(:' | '*' | '+' | ',' | ';' | '?' | 'collation'
+ if (l1 == 40 // '*'
+ || l1 == 41 // '+'
+ || l1 == 65) // '?'
+ {
+ 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(95); // 'collation'
+ lookahead1W(15); // URILiteral | S^WS | '(:'
+ shift(7); // URILiteral
+ eventHandler.endNonterminal("IndexKeyCollation", e0);
+ }
+
+ function parse_IndexDecl()
+ {
+ eventHandler.startNonterminal("IndexDecl", e0);
+ shift(157); // 'index'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_IndexName();
+ lookahead1W(68); // S^WS | '(:' | 'on'
+ shift(201); // 'on'
+ lookahead1W(66); // S^WS | '(:' | 'nodes'
+ shift(195); // 'nodes'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_IndexDomainExpr();
+ shift(88); // 'by'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_IndexKeySpec();
+ for (;;)
+ {
+ lookahead1W(107); // S^WS | '(:' | ',' | ';'
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_IndexKeySpec();
+ }
+ eventHandler.endNonterminal("IndexDecl", e0);
+ }
+
+ function parse_ICDecl()
+ {
+ eventHandler.startNonterminal("ICDecl", e0);
+ shift(163); // 'integrity'
+ lookahead1W(43); // S^WS | '(:' | 'constraint'
+ shift(98); // 'constraint'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(124); // S^WS | '(:' | 'foreign' | 'on'
+ switch (l1)
+ {
+ case 201: // 'on'
+ whitespace();
+ parse_ICCollection();
+ break;
+ default:
+ whitespace();
+ parse_ICForeignKey();
+ }
+ eventHandler.endNonterminal("ICDecl", e0);
+ }
+
+ function parse_ICCollection()
+ {
+ eventHandler.startNonterminal("ICCollection", e0);
+ shift(201); // 'on'
+ lookahead1W(42); // S^WS | '(:' | 'collection'
+ shift(96); // 'collection'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(150); // S^WS | '$' | '(:' | 'foreach' | 'node'
+ switch (l1)
+ {
+ case 31: // '$'
+ whitespace();
+ parse_ICCollSequence();
+ break;
+ case 194: // 'node'
+ whitespace();
+ parse_ICCollSequenceUnique();
+ break;
+ default:
+ whitespace();
+ parse_ICCollNode();
+ }
+ eventHandler.endNonterminal("ICCollection", e0);
+ }
+
+ function parse_ICCollSequence()
+ {
+ eventHandler.startNonterminal("ICCollSequence", e0);
+ parse_VarRef();
+ lookahead1W(40); // S^WS | '(:' | 'check'
+ shift(93); // 'check'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ICCollSequence", e0);
+ }
+
+ function parse_ICCollSequenceUnique()
+ {
+ eventHandler.startNonterminal("ICCollSequenceUnique", e0);
+ shift(194); // 'node'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_VarRef();
+ lookahead1W(40); // S^WS | '(:' | 'check'
+ shift(93); // 'check'
+ lookahead1W(83); // S^WS | '(:' | 'unique'
+ shift(261); // 'unique'
+ lookahead1W(60); // S^WS | '(:' | 'key'
+ shift(171); // 'key'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PathExpr();
+ eventHandler.endNonterminal("ICCollSequenceUnique", e0);
+ }
+
+ function parse_ICCollNode()
+ {
+ eventHandler.startNonterminal("ICCollNode", e0);
+ shift(140); // 'foreach'
+ lookahead1W(65); // S^WS | '(:' | 'node'
+ shift(194); // 'node'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_VarRef();
+ lookahead1W(40); // S^WS | '(:' | 'check'
+ shift(93); // 'check'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("ICCollNode", e0);
+ }
+
+ function parse_ICForeignKey()
+ {
+ eventHandler.startNonterminal("ICForeignKey", e0);
+ shift(141); // 'foreign'
+ lookahead1W(60); // S^WS | '(:' | 'key'
+ shift(171); // 'key'
+ lookahead1W(54); // S^WS | '(:' | 'from'
+ whitespace();
+ parse_ICForeignKeySource();
+ whitespace();
+ parse_ICForeignKeyTarget();
+ eventHandler.endNonterminal("ICForeignKey", e0);
+ }
+
+ function parse_ICForeignKeySource()
+ {
+ eventHandler.startNonterminal("ICForeignKeySource", e0);
+ shift(142); // 'from'
+ lookahead1W(42); // S^WS | '(:' | 'collection'
+ whitespace();
+ parse_ICForeignKeyValues();
+ eventHandler.endNonterminal("ICForeignKeySource", e0);
+ }
+
+ function parse_ICForeignKeyTarget()
+ {
+ eventHandler.startNonterminal("ICForeignKeyTarget", e0);
+ shift(253); // 'to'
+ lookahead1W(42); // S^WS | '(:' | 'collection'
+ whitespace();
+ parse_ICForeignKeyValues();
+ eventHandler.endNonterminal("ICForeignKeyTarget", e0);
+ }
+
+ function parse_ICForeignKeyValues()
+ {
+ eventHandler.startNonterminal("ICForeignKeyValues", e0);
+ shift(96); // 'collection'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(65); // S^WS | '(:' | 'node'
+ shift(194); // 'node'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_VarRef();
+ lookahead1W(60); // S^WS | '(:' | 'key'
+ shift(171); // 'key'
+ lookahead1W(262); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PathExpr();
+ eventHandler.endNonterminal("ICForeignKeyValues", e0);
+ }
+
+ function try_Comment()
+ {
+ shiftT(37); // '(:'
+ for (;;)
+ {
+ lookahead1(92); // CommentContents | '(:' | ':)'
+ if (l1 == 51) // ':)'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 24: // CommentContents
+ shiftT(24); // CommentContents
+ break;
+ default:
+ try_Comment();
+ }
+ }
+ shiftT(51); // ':)'
+ }
+
+ 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(240); // EQName^Token | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' |
+ switch (l1)
+ {
+ case 83: // 'attribute'
+ shift(83); // 'attribute'
+ break;
+ case 97: // 'comment'
+ shift(97); // 'comment'
+ break;
+ case 121: // 'document-node'
+ shift(121); // 'document-node'
+ break;
+ case 122: // 'element'
+ shift(122); // 'element'
+ break;
+ case 125: // 'empty-sequence'
+ shift(125); // 'empty-sequence'
+ break;
+ case 147: // 'function'
+ shift(147); // 'function'
+ break;
+ case 154: // 'if'
+ shift(154); // 'if'
+ break;
+ case 167: // 'item'
+ shift(167); // 'item'
+ break;
+ case 188: // 'namespace-node'
+ shift(188); // 'namespace-node'
+ break;
+ case 194: // 'node'
+ shift(194); // 'node'
+ break;
+ case 220: // 'processing-instruction'
+ shift(220); // 'processing-instruction'
+ break;
+ case 230: // 'schema-attribute'
+ shift(230); // 'schema-attribute'
+ break;
+ case 231: // 'schema-element'
+ shift(231); // 'schema-element'
+ break;
+ case 248: // 'switch'
+ shift(248); // 'switch'
+ break;
+ case 249: // 'text'
+ shift(249); // 'text'
+ break;
+ case 259: // 'typeswitch'
+ shift(259); // 'typeswitch'
+ break;
+ case 79: // 'array'
+ shift(79); // 'array'
+ break;
+ case 169: // 'json-item'
+ shift(169); // 'json-item'
+ break;
+ case 247: // 'structured-item'
+ shift(247); // 'structured-item'
+ break;
+ default:
+ parse_FunctionName();
+ }
+ eventHandler.endNonterminal("EQName", e0);
+ }
+
+ function try_EQName()
+ {
+ lookahead1(240); // EQName^Token | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | 'and' |
+ switch (l1)
+ {
+ case 83: // 'attribute'
+ shiftT(83); // 'attribute'
+ break;
+ case 97: // 'comment'
+ shiftT(97); // 'comment'
+ break;
+ case 121: // 'document-node'
+ shiftT(121); // 'document-node'
+ break;
+ case 122: // 'element'
+ shiftT(122); // 'element'
+ break;
+ case 125: // 'empty-sequence'
+ shiftT(125); // 'empty-sequence'
+ break;
+ case 147: // 'function'
+ shiftT(147); // 'function'
+ break;
+ case 154: // 'if'
+ shiftT(154); // 'if'
+ break;
+ case 167: // 'item'
+ shiftT(167); // 'item'
+ break;
+ case 188: // 'namespace-node'
+ shiftT(188); // 'namespace-node'
+ break;
+ case 194: // 'node'
+ shiftT(194); // 'node'
+ break;
+ case 220: // 'processing-instruction'
+ shiftT(220); // 'processing-instruction'
+ break;
+ case 230: // 'schema-attribute'
+ shiftT(230); // 'schema-attribute'
+ break;
+ case 231: // 'schema-element'
+ shiftT(231); // 'schema-element'
+ break;
+ case 248: // 'switch'
+ shiftT(248); // 'switch'
+ break;
+ case 249: // 'text'
+ shiftT(249); // 'text'
+ break;
+ case 259: // 'typeswitch'
+ shiftT(259); // 'typeswitch'
+ break;
+ case 79: // 'array'
+ shiftT(79); // 'array'
+ break;
+ case 169: // 'json-item'
+ shiftT(169); // 'json-item'
+ break;
+ case 247: // 'structured-item'
+ shiftT(247); // 'structured-item'
+ break;
+ default:
+ try_FunctionName();
+ }
+ }
+
+ function parse_FunctionName()
+ {
+ eventHandler.startNonterminal("FunctionName", e0);
+ switch (l1)
+ {
+ case 6: // EQName^Token
+ shift(6); // EQName^Token
+ break;
+ case 71: // 'after'
+ shift(71); // 'after'
+ break;
+ case 74: // 'ancestor'
+ shift(74); // 'ancestor'
+ break;
+ case 75: // 'ancestor-or-self'
+ shift(75); // 'ancestor-or-self'
+ break;
+ case 76: // 'and'
+ shift(76); // 'and'
+ break;
+ case 80: // 'as'
+ shift(80); // 'as'
+ break;
+ case 81: // 'ascending'
+ shift(81); // 'ascending'
+ break;
+ case 85: // 'before'
+ shift(85); // 'before'
+ break;
+ case 89: // 'case'
+ shift(89); // 'case'
+ break;
+ case 90: // 'cast'
+ shift(90); // 'cast'
+ break;
+ case 91: // 'castable'
+ shift(91); // 'castable'
+ break;
+ case 94: // 'child'
+ shift(94); // 'child'
+ break;
+ case 95: // 'collation'
+ shift(95); // 'collation'
+ break;
+ case 104: // 'copy'
+ shift(104); // 'copy'
+ break;
+ case 106: // 'count'
+ shift(106); // 'count'
+ break;
+ case 109: // 'declare'
+ shift(109); // 'declare'
+ break;
+ case 110: // 'default'
+ shift(110); // 'default'
+ break;
+ case 111: // 'delete'
+ shift(111); // 'delete'
+ break;
+ case 112: // 'descendant'
+ shift(112); // 'descendant'
+ break;
+ case 113: // 'descendant-or-self'
+ shift(113); // 'descendant-or-self'
+ break;
+ case 114: // 'descending'
+ shift(114); // 'descending'
+ break;
+ case 119: // 'div'
+ shift(119); // 'div'
+ break;
+ case 120: // 'document'
+ shift(120); // 'document'
+ break;
+ case 123: // 'else'
+ shift(123); // 'else'
+ break;
+ case 124: // 'empty'
+ shift(124); // 'empty'
+ break;
+ case 127: // 'end'
+ shift(127); // 'end'
+ break;
+ case 129: // 'eq'
+ shift(129); // 'eq'
+ break;
+ case 130: // 'every'
+ shift(130); // 'every'
+ break;
+ case 132: // 'except'
+ shift(132); // 'except'
+ break;
+ case 136: // 'first'
+ shift(136); // 'first'
+ break;
+ case 137: // 'following'
+ shift(137); // 'following'
+ break;
+ case 138: // 'following-sibling'
+ shift(138); // 'following-sibling'
+ break;
+ case 139: // 'for'
+ shift(139); // 'for'
+ break;
+ case 148: // 'ge'
+ shift(148); // 'ge'
+ break;
+ case 150: // 'group'
+ shift(150); // 'group'
+ break;
+ case 152: // 'gt'
+ shift(152); // 'gt'
+ break;
+ case 153: // 'idiv'
+ shift(153); // 'idiv'
+ break;
+ case 155: // 'import'
+ shift(155); // 'import'
+ break;
+ case 161: // 'insert'
+ shift(161); // 'insert'
+ break;
+ case 162: // 'instance'
+ shift(162); // 'instance'
+ break;
+ case 164: // 'intersect'
+ shift(164); // 'intersect'
+ break;
+ case 165: // 'into'
+ shift(165); // 'into'
+ break;
+ case 166: // 'is'
+ shift(166); // 'is'
+ break;
+ case 173: // 'last'
+ shift(173); // 'last'
+ break;
+ case 175: // 'le'
+ shift(175); // 'le'
+ break;
+ case 177: // 'let'
+ shift(177); // 'let'
+ break;
+ case 181: // 'lt'
+ shift(181); // 'lt'
+ break;
+ case 183: // 'mod'
+ shift(183); // 'mod'
+ break;
+ case 184: // 'modify'
+ shift(184); // 'modify'
+ break;
+ case 185: // 'module'
+ shift(185); // 'module'
+ break;
+ case 187: // 'namespace'
+ shift(187); // 'namespace'
+ break;
+ case 189: // 'ne'
+ shift(189); // 'ne'
+ break;
+ case 202: // 'only'
+ shift(202); // 'only'
+ break;
+ case 204: // 'or'
+ shift(204); // 'or'
+ break;
+ case 205: // 'order'
+ shift(205); // 'order'
+ break;
+ case 206: // 'ordered'
+ shift(206); // 'ordered'
+ break;
+ case 210: // 'parent'
+ shift(210); // 'parent'
+ break;
+ case 216: // 'preceding'
+ shift(216); // 'preceding'
+ break;
+ case 217: // 'preceding-sibling'
+ shift(217); // 'preceding-sibling'
+ break;
+ case 222: // 'rename'
+ shift(222); // 'rename'
+ break;
+ case 223: // 'replace'
+ shift(223); // 'replace'
+ break;
+ case 224: // 'return'
+ shift(224); // 'return'
+ break;
+ case 228: // 'satisfies'
+ shift(228); // 'satisfies'
+ break;
+ case 234: // 'self'
+ shift(234); // 'self'
+ break;
+ case 240: // 'some'
+ shift(240); // 'some'
+ break;
+ case 241: // 'stable'
+ shift(241); // 'stable'
+ break;
+ case 242: // 'start'
+ shift(242); // 'start'
+ break;
+ case 253: // 'to'
+ shift(253); // 'to'
+ break;
+ case 254: // 'treat'
+ shift(254); // 'treat'
+ break;
+ case 256: // 'try'
+ shift(256); // 'try'
+ break;
+ case 260: // 'union'
+ shift(260); // 'union'
+ break;
+ case 262: // 'unordered'
+ shift(262); // 'unordered'
+ break;
+ case 266: // 'validate'
+ shift(266); // 'validate'
+ break;
+ case 272: // 'where'
+ shift(272); // 'where'
+ break;
+ case 276: // 'with'
+ shift(276); // 'with'
+ break;
+ case 170: // 'jsoniq'
+ shift(170); // 'jsoniq'
+ break;
+ case 73: // 'allowing'
+ shift(73); // 'allowing'
+ break;
+ case 82: // 'at'
+ shift(82); // 'at'
+ break;
+ case 84: // 'base-uri'
+ shift(84); // 'base-uri'
+ break;
+ case 86: // 'boundary-space'
+ shift(86); // 'boundary-space'
+ break;
+ case 87: // 'break'
+ shift(87); // 'break'
+ break;
+ case 92: // 'catch'
+ shift(92); // 'catch'
+ break;
+ case 99: // 'construction'
+ shift(99); // 'construction'
+ break;
+ case 102: // 'context'
+ shift(102); // 'context'
+ break;
+ case 103: // 'continue'
+ shift(103); // 'continue'
+ break;
+ case 105: // 'copy-namespaces'
+ shift(105); // 'copy-namespaces'
+ break;
+ case 107: // 'decimal-format'
+ shift(107); // 'decimal-format'
+ break;
+ case 126: // 'encoding'
+ shift(126); // 'encoding'
+ break;
+ case 133: // 'exit'
+ shift(133); // 'exit'
+ break;
+ case 134: // 'external'
+ shift(134); // 'external'
+ break;
+ case 143: // 'ft-option'
+ shift(143); // 'ft-option'
+ break;
+ case 156: // 'in'
+ shift(156); // 'in'
+ break;
+ case 157: // 'index'
+ shift(157); // 'index'
+ break;
+ case 163: // 'integrity'
+ shift(163); // 'integrity'
+ break;
+ case 174: // 'lax'
+ shift(174); // 'lax'
+ break;
+ case 195: // 'nodes'
+ shift(195); // 'nodes'
+ break;
+ case 203: // 'option'
+ shift(203); // 'option'
+ break;
+ case 207: // 'ordering'
+ shift(207); // 'ordering'
+ break;
+ case 226: // 'revalidation'
+ shift(226); // 'revalidation'
+ break;
+ case 229: // 'schema'
+ shift(229); // 'schema'
+ break;
+ case 232: // 'score'
+ shift(232); // 'score'
+ break;
+ case 239: // 'sliding'
+ shift(239); // 'sliding'
+ break;
+ case 245: // 'strict'
+ shift(245); // 'strict'
+ break;
+ case 257: // 'tumbling'
+ shift(257); // 'tumbling'
+ break;
+ case 258: // 'type'
+ shift(258); // 'type'
+ break;
+ case 263: // 'updating'
+ shift(263); // 'updating'
+ break;
+ case 267: // 'value'
+ shift(267); // 'value'
+ break;
+ case 268: // 'variable'
+ shift(268); // 'variable'
+ break;
+ case 269: // 'version'
+ shift(269); // 'version'
+ break;
+ case 273: // 'while'
+ shift(273); // 'while'
+ break;
+ case 98: // 'constraint'
+ shift(98); // 'constraint'
+ break;
+ case 179: // 'loop'
+ shift(179); // 'loop'
+ break;
+ case 225: // 'returning'
+ shift(225); // 'returning'
+ break;
+ case 78: // 'append'
+ shift(78); // 'append'
+ break;
+ case 135: // 'false'
+ shift(135); // 'false'
+ break;
+ case 142: // 'from'
+ shift(142); // 'from'
+ break;
+ case 197: // 'null'
+ shift(197); // 'null'
+ break;
+ case 168: // 'json'
+ shift(168); // 'json'
+ break;
+ case 198: // 'object'
+ shift(198); // 'object'
+ break;
+ case 233: // 'select'
+ shift(233); // 'select'
+ break;
+ default:
+ shift(255); // 'true'
+ }
+ eventHandler.endNonterminal("FunctionName", e0);
+ }
+
+ function try_FunctionName()
+ {
+ switch (l1)
+ {
+ case 6: // EQName^Token
+ shiftT(6); // EQName^Token
+ break;
+ case 71: // 'after'
+ shiftT(71); // 'after'
+ break;
+ case 74: // 'ancestor'
+ shiftT(74); // 'ancestor'
+ break;
+ case 75: // 'ancestor-or-self'
+ shiftT(75); // 'ancestor-or-self'
+ break;
+ case 76: // 'and'
+ shiftT(76); // 'and'
+ break;
+ case 80: // 'as'
+ shiftT(80); // 'as'
+ break;
+ case 81: // 'ascending'
+ shiftT(81); // 'ascending'
+ break;
+ case 85: // 'before'
+ shiftT(85); // 'before'
+ break;
+ case 89: // 'case'
+ shiftT(89); // 'case'
+ break;
+ case 90: // 'cast'
+ shiftT(90); // 'cast'
+ break;
+ case 91: // 'castable'
+ shiftT(91); // 'castable'
+ break;
+ case 94: // 'child'
+ shiftT(94); // 'child'
+ break;
+ case 95: // 'collation'
+ shiftT(95); // 'collation'
+ break;
+ case 104: // 'copy'
+ shiftT(104); // 'copy'
+ break;
+ case 106: // 'count'
+ shiftT(106); // 'count'
+ break;
+ case 109: // 'declare'
+ shiftT(109); // 'declare'
+ break;
+ case 110: // 'default'
+ shiftT(110); // 'default'
+ break;
+ case 111: // 'delete'
+ shiftT(111); // 'delete'
+ break;
+ case 112: // 'descendant'
+ shiftT(112); // 'descendant'
+ break;
+ case 113: // 'descendant-or-self'
+ shiftT(113); // 'descendant-or-self'
+ break;
+ case 114: // 'descending'
+ shiftT(114); // 'descending'
+ break;
+ case 119: // 'div'
+ shiftT(119); // 'div'
+ break;
+ case 120: // 'document'
+ shiftT(120); // 'document'
+ break;
+ case 123: // 'else'
+ shiftT(123); // 'else'
+ break;
+ case 124: // 'empty'
+ shiftT(124); // 'empty'
+ break;
+ case 127: // 'end'
+ shiftT(127); // 'end'
+ break;
+ case 129: // 'eq'
+ shiftT(129); // 'eq'
+ break;
+ case 130: // 'every'
+ shiftT(130); // 'every'
+ break;
+ case 132: // 'except'
+ shiftT(132); // 'except'
+ break;
+ case 136: // 'first'
+ shiftT(136); // 'first'
+ break;
+ case 137: // 'following'
+ shiftT(137); // 'following'
+ break;
+ case 138: // 'following-sibling'
+ shiftT(138); // 'following-sibling'
+ break;
+ case 139: // 'for'
+ shiftT(139); // 'for'
+ break;
+ case 148: // 'ge'
+ shiftT(148); // 'ge'
+ break;
+ case 150: // 'group'
+ shiftT(150); // 'group'
+ break;
+ case 152: // 'gt'
+ shiftT(152); // 'gt'
+ break;
+ case 153: // 'idiv'
+ shiftT(153); // 'idiv'
+ break;
+ case 155: // 'import'
+ shiftT(155); // 'import'
+ break;
+ case 161: // 'insert'
+ shiftT(161); // 'insert'
+ break;
+ case 162: // 'instance'
+ shiftT(162); // 'instance'
+ break;
+ case 164: // 'intersect'
+ shiftT(164); // 'intersect'
+ break;
+ case 165: // 'into'
+ shiftT(165); // 'into'
+ break;
+ case 166: // 'is'
+ shiftT(166); // 'is'
+ break;
+ case 173: // 'last'
+ shiftT(173); // 'last'
+ break;
+ case 175: // 'le'
+ shiftT(175); // 'le'
+ break;
+ case 177: // 'let'
+ shiftT(177); // 'let'
+ break;
+ case 181: // 'lt'
+ shiftT(181); // 'lt'
+ break;
+ case 183: // 'mod'
+ shiftT(183); // 'mod'
+ break;
+ case 184: // 'modify'
+ shiftT(184); // 'modify'
+ break;
+ case 185: // 'module'
+ shiftT(185); // 'module'
+ break;
+ case 187: // 'namespace'
+ shiftT(187); // 'namespace'
+ break;
+ case 189: // 'ne'
+ shiftT(189); // 'ne'
+ break;
+ case 202: // 'only'
+ shiftT(202); // 'only'
+ break;
+ case 204: // 'or'
+ shiftT(204); // 'or'
+ break;
+ case 205: // 'order'
+ shiftT(205); // 'order'
+ break;
+ case 206: // 'ordered'
+ shiftT(206); // 'ordered'
+ break;
+ case 210: // 'parent'
+ shiftT(210); // 'parent'
+ break;
+ case 216: // 'preceding'
+ shiftT(216); // 'preceding'
+ break;
+ case 217: // 'preceding-sibling'
+ shiftT(217); // 'preceding-sibling'
+ break;
+ case 222: // 'rename'
+ shiftT(222); // 'rename'
+ break;
+ case 223: // 'replace'
+ shiftT(223); // 'replace'
+ break;
+ case 224: // 'return'
+ shiftT(224); // 'return'
+ break;
+ case 228: // 'satisfies'
+ shiftT(228); // 'satisfies'
+ break;
+ case 234: // 'self'
+ shiftT(234); // 'self'
+ break;
+ case 240: // 'some'
+ shiftT(240); // 'some'
+ break;
+ case 241: // 'stable'
+ shiftT(241); // 'stable'
+ break;
+ case 242: // 'start'
+ shiftT(242); // 'start'
+ break;
+ case 253: // 'to'
+ shiftT(253); // 'to'
+ break;
+ case 254: // 'treat'
+ shiftT(254); // 'treat'
+ break;
+ case 256: // 'try'
+ shiftT(256); // 'try'
+ break;
+ case 260: // 'union'
+ shiftT(260); // 'union'
+ break;
+ case 262: // 'unordered'
+ shiftT(262); // 'unordered'
+ break;
+ case 266: // 'validate'
+ shiftT(266); // 'validate'
+ break;
+ case 272: // 'where'
+ shiftT(272); // 'where'
+ break;
+ case 276: // 'with'
+ shiftT(276); // 'with'
+ break;
+ case 170: // 'jsoniq'
+ shiftT(170); // 'jsoniq'
+ break;
+ case 73: // 'allowing'
+ shiftT(73); // 'allowing'
+ break;
+ case 82: // 'at'
+ shiftT(82); // 'at'
+ break;
+ case 84: // 'base-uri'
+ shiftT(84); // 'base-uri'
+ break;
+ case 86: // 'boundary-space'
+ shiftT(86); // 'boundary-space'
+ break;
+ case 87: // 'break'
+ shiftT(87); // 'break'
+ break;
+ case 92: // 'catch'
+ shiftT(92); // 'catch'
+ break;
+ case 99: // 'construction'
+ shiftT(99); // 'construction'
+ break;
+ case 102: // 'context'
+ shiftT(102); // 'context'
+ break;
+ case 103: // 'continue'
+ shiftT(103); // 'continue'
+ break;
+ case 105: // 'copy-namespaces'
+ shiftT(105); // 'copy-namespaces'
+ break;
+ case 107: // 'decimal-format'
+ shiftT(107); // 'decimal-format'
+ break;
+ case 126: // 'encoding'
+ shiftT(126); // 'encoding'
+ break;
+ case 133: // 'exit'
+ shiftT(133); // 'exit'
+ break;
+ case 134: // 'external'
+ shiftT(134); // 'external'
+ break;
+ case 143: // 'ft-option'
+ shiftT(143); // 'ft-option'
+ break;
+ case 156: // 'in'
+ shiftT(156); // 'in'
+ break;
+ case 157: // 'index'
+ shiftT(157); // 'index'
+ break;
+ case 163: // 'integrity'
+ shiftT(163); // 'integrity'
+ break;
+ case 174: // 'lax'
+ shiftT(174); // 'lax'
+ break;
+ case 195: // 'nodes'
+ shiftT(195); // 'nodes'
+ break;
+ case 203: // 'option'
+ shiftT(203); // 'option'
+ break;
+ case 207: // 'ordering'
+ shiftT(207); // 'ordering'
+ break;
+ case 226: // 'revalidation'
+ shiftT(226); // 'revalidation'
+ break;
+ case 229: // 'schema'
+ shiftT(229); // 'schema'
+ break;
+ case 232: // 'score'
+ shiftT(232); // 'score'
+ break;
+ case 239: // 'sliding'
+ shiftT(239); // 'sliding'
+ break;
+ case 245: // 'strict'
+ shiftT(245); // 'strict'
+ break;
+ case 257: // 'tumbling'
+ shiftT(257); // 'tumbling'
+ break;
+ case 258: // 'type'
+ shiftT(258); // 'type'
+ break;
+ case 263: // 'updating'
+ shiftT(263); // 'updating'
+ break;
+ case 267: // 'value'
+ shiftT(267); // 'value'
+ break;
+ case 268: // 'variable'
+ shiftT(268); // 'variable'
+ break;
+ case 269: // 'version'
+ shiftT(269); // 'version'
+ break;
+ case 273: // 'while'
+ shiftT(273); // 'while'
+ break;
+ case 98: // 'constraint'
+ shiftT(98); // 'constraint'
+ break;
+ case 179: // 'loop'
+ shiftT(179); // 'loop'
+ break;
+ case 225: // 'returning'
+ shiftT(225); // 'returning'
+ break;
+ case 78: // 'append'
+ shiftT(78); // 'append'
+ break;
+ case 135: // 'false'
+ shiftT(135); // 'false'
+ break;
+ case 142: // 'from'
+ shiftT(142); // 'from'
+ break;
+ case 197: // 'null'
+ shiftT(197); // 'null'
+ break;
+ case 168: // 'json'
+ shiftT(168); // 'json'
+ break;
+ case 198: // 'object'
+ shiftT(198); // 'object'
+ break;
+ case 233: // 'select'
+ shiftT(233); // 'select'
+ break;
+ default:
+ shiftT(255); // 'true'
+ }
+ }
+
+ function parse_NCName()
+ {
+ eventHandler.startNonterminal("NCName", e0);
+ switch (l1)
+ {
+ case 19: // NCName^Token
+ shift(19); // NCName^Token
+ break;
+ case 71: // 'after'
+ shift(71); // 'after'
+ break;
+ case 76: // 'and'
+ shift(76); // 'and'
+ break;
+ case 80: // 'as'
+ shift(80); // 'as'
+ break;
+ case 81: // 'ascending'
+ shift(81); // 'ascending'
+ break;
+ case 85: // 'before'
+ shift(85); // 'before'
+ break;
+ case 89: // 'case'
+ shift(89); // 'case'
+ break;
+ case 90: // 'cast'
+ shift(90); // 'cast'
+ break;
+ case 91: // 'castable'
+ shift(91); // 'castable'
+ break;
+ case 95: // 'collation'
+ shift(95); // 'collation'
+ break;
+ case 106: // 'count'
+ shift(106); // 'count'
+ break;
+ case 110: // 'default'
+ shift(110); // 'default'
+ break;
+ case 114: // 'descending'
+ shift(114); // 'descending'
+ break;
+ case 119: // 'div'
+ shift(119); // 'div'
+ break;
+ case 123: // 'else'
+ shift(123); // 'else'
+ break;
+ case 124: // 'empty'
+ shift(124); // 'empty'
+ break;
+ case 127: // 'end'
+ shift(127); // 'end'
+ break;
+ case 129: // 'eq'
+ shift(129); // 'eq'
+ break;
+ case 132: // 'except'
+ shift(132); // 'except'
+ break;
+ case 139: // 'for'
+ shift(139); // 'for'
+ break;
+ case 148: // 'ge'
+ shift(148); // 'ge'
+ break;
+ case 150: // 'group'
+ shift(150); // 'group'
+ break;
+ case 152: // 'gt'
+ shift(152); // 'gt'
+ break;
+ case 153: // 'idiv'
+ shift(153); // 'idiv'
+ break;
+ case 162: // 'instance'
+ shift(162); // 'instance'
+ break;
+ case 164: // 'intersect'
+ shift(164); // 'intersect'
+ break;
+ case 165: // 'into'
+ shift(165); // 'into'
+ break;
+ case 166: // 'is'
+ shift(166); // 'is'
+ break;
+ case 175: // 'le'
+ shift(175); // 'le'
+ break;
+ case 177: // 'let'
+ shift(177); // 'let'
+ break;
+ case 181: // 'lt'
+ shift(181); // 'lt'
+ break;
+ case 183: // 'mod'
+ shift(183); // 'mod'
+ break;
+ case 184: // 'modify'
+ shift(184); // 'modify'
+ break;
+ case 189: // 'ne'
+ shift(189); // 'ne'
+ break;
+ case 202: // 'only'
+ shift(202); // 'only'
+ break;
+ case 204: // 'or'
+ shift(204); // 'or'
+ break;
+ case 205: // 'order'
+ shift(205); // 'order'
+ break;
+ case 224: // 'return'
+ shift(224); // 'return'
+ break;
+ case 228: // 'satisfies'
+ shift(228); // 'satisfies'
+ break;
+ case 241: // 'stable'
+ shift(241); // 'stable'
+ break;
+ case 242: // 'start'
+ shift(242); // 'start'
+ break;
+ case 253: // 'to'
+ shift(253); // 'to'
+ break;
+ case 254: // 'treat'
+ shift(254); // 'treat'
+ break;
+ case 260: // 'union'
+ shift(260); // 'union'
+ break;
+ case 272: // 'where'
+ shift(272); // 'where'
+ break;
+ case 276: // 'with'
+ shift(276); // 'with'
+ break;
+ case 74: // 'ancestor'
+ shift(74); // 'ancestor'
+ break;
+ case 75: // 'ancestor-or-self'
+ shift(75); // 'ancestor-or-self'
+ break;
+ case 83: // 'attribute'
+ shift(83); // 'attribute'
+ break;
+ case 94: // 'child'
+ shift(94); // 'child'
+ break;
+ case 97: // 'comment'
+ shift(97); // 'comment'
+ break;
+ case 104: // 'copy'
+ shift(104); // 'copy'
+ break;
+ case 109: // 'declare'
+ shift(109); // 'declare'
+ break;
+ case 111: // 'delete'
+ shift(111); // 'delete'
+ break;
+ case 112: // 'descendant'
+ shift(112); // 'descendant'
+ break;
+ case 113: // 'descendant-or-self'
+ shift(113); // 'descendant-or-self'
+ break;
+ case 120: // 'document'
+ shift(120); // 'document'
+ break;
+ case 121: // 'document-node'
+ shift(121); // 'document-node'
+ break;
+ case 122: // 'element'
+ shift(122); // 'element'
+ break;
+ case 125: // 'empty-sequence'
+ shift(125); // 'empty-sequence'
+ break;
+ case 130: // 'every'
+ shift(130); // 'every'
+ break;
+ case 136: // 'first'
+ shift(136); // 'first'
+ break;
+ case 137: // 'following'
+ shift(137); // 'following'
+ break;
+ case 138: // 'following-sibling'
+ shift(138); // 'following-sibling'
+ break;
+ case 147: // 'function'
+ shift(147); // 'function'
+ break;
+ case 154: // 'if'
+ shift(154); // 'if'
+ break;
+ case 155: // 'import'
+ shift(155); // 'import'
+ break;
+ case 161: // 'insert'
+ shift(161); // 'insert'
+ break;
+ case 167: // 'item'
+ shift(167); // 'item'
+ break;
+ case 173: // 'last'
+ shift(173); // 'last'
+ break;
+ case 185: // 'module'
+ shift(185); // 'module'
+ break;
+ case 187: // 'namespace'
+ shift(187); // 'namespace'
+ break;
+ case 188: // 'namespace-node'
+ shift(188); // 'namespace-node'
+ break;
+ case 194: // 'node'
+ shift(194); // 'node'
+ break;
+ case 206: // 'ordered'
+ shift(206); // 'ordered'
+ break;
+ case 210: // 'parent'
+ shift(210); // 'parent'
+ break;
+ case 216: // 'preceding'
+ shift(216); // 'preceding'
+ break;
+ case 217: // 'preceding-sibling'
+ shift(217); // 'preceding-sibling'
+ break;
+ case 220: // 'processing-instruction'
+ shift(220); // 'processing-instruction'
+ break;
+ case 222: // 'rename'
+ shift(222); // 'rename'
+ break;
+ case 223: // 'replace'
+ shift(223); // 'replace'
+ break;
+ case 230: // 'schema-attribute'
+ shift(230); // 'schema-attribute'
+ break;
+ case 231: // 'schema-element'
+ shift(231); // 'schema-element'
+ break;
+ case 234: // 'self'
+ shift(234); // 'self'
+ break;
+ case 240: // 'some'
+ shift(240); // 'some'
+ break;
+ case 248: // 'switch'
+ shift(248); // 'switch'
+ break;
+ case 249: // 'text'
+ shift(249); // 'text'
+ break;
+ case 256: // 'try'
+ shift(256); // 'try'
+ break;
+ case 259: // 'typeswitch'
+ shift(259); // 'typeswitch'
+ break;
+ case 262: // 'unordered'
+ shift(262); // 'unordered'
+ break;
+ case 266: // 'validate'
+ shift(266); // 'validate'
+ break;
+ case 268: // 'variable'
+ shift(268); // 'variable'
+ break;
+ case 170: // 'jsoniq'
+ shift(170); // 'jsoniq'
+ break;
+ case 73: // 'allowing'
+ shift(73); // 'allowing'
+ break;
+ case 82: // 'at'
+ shift(82); // 'at'
+ break;
+ case 84: // 'base-uri'
+ shift(84); // 'base-uri'
+ break;
+ case 86: // 'boundary-space'
+ shift(86); // 'boundary-space'
+ break;
+ case 87: // 'break'
+ shift(87); // 'break'
+ break;
+ case 92: // 'catch'
+ shift(92); // 'catch'
+ break;
+ case 99: // 'construction'
+ shift(99); // 'construction'
+ break;
+ case 102: // 'context'
+ shift(102); // 'context'
+ break;
+ case 103: // 'continue'
+ shift(103); // 'continue'
+ break;
+ case 105: // 'copy-namespaces'
+ shift(105); // 'copy-namespaces'
+ break;
+ case 107: // 'decimal-format'
+ shift(107); // 'decimal-format'
+ break;
+ case 126: // 'encoding'
+ shift(126); // 'encoding'
+ break;
+ case 133: // 'exit'
+ shift(133); // 'exit'
+ break;
+ case 134: // 'external'
+ shift(134); // 'external'
+ break;
+ case 143: // 'ft-option'
+ shift(143); // 'ft-option'
+ break;
+ case 156: // 'in'
+ shift(156); // 'in'
+ break;
+ case 157: // 'index'
+ shift(157); // 'index'
+ break;
+ case 163: // 'integrity'
+ shift(163); // 'integrity'
+ break;
+ case 174: // 'lax'
+ shift(174); // 'lax'
+ break;
+ case 195: // 'nodes'
+ shift(195); // 'nodes'
+ break;
+ case 203: // 'option'
+ shift(203); // 'option'
+ break;
+ case 207: // 'ordering'
+ shift(207); // 'ordering'
+ break;
+ case 226: // 'revalidation'
+ shift(226); // 'revalidation'
+ break;
+ case 229: // 'schema'
+ shift(229); // 'schema'
+ break;
+ case 232: // 'score'
+ shift(232); // 'score'
+ break;
+ case 239: // 'sliding'
+ shift(239); // 'sliding'
+ break;
+ case 245: // 'strict'
+ shift(245); // 'strict'
+ break;
+ case 257: // 'tumbling'
+ shift(257); // 'tumbling'
+ break;
+ case 258: // 'type'
+ shift(258); // 'type'
+ break;
+ case 263: // 'updating'
+ shift(263); // 'updating'
+ break;
+ case 267: // 'value'
+ shift(267); // 'value'
+ break;
+ case 269: // 'version'
+ shift(269); // 'version'
+ break;
+ case 273: // 'while'
+ shift(273); // 'while'
+ break;
+ case 98: // 'constraint'
+ shift(98); // 'constraint'
+ break;
+ case 179: // 'loop'
+ shift(179); // 'loop'
+ break;
+ case 225: // 'returning'
+ shift(225); // 'returning'
+ break;
+ case 78: // 'append'
+ shift(78); // 'append'
+ break;
+ case 135: // 'false'
+ shift(135); // 'false'
+ break;
+ case 142: // 'from'
+ shift(142); // 'from'
+ break;
+ case 197: // 'null'
+ shift(197); // 'null'
+ break;
+ case 168: // 'json'
+ shift(168); // 'json'
+ break;
+ case 198: // 'object'
+ shift(198); // 'object'
+ break;
+ case 233: // 'select'
+ shift(233); // 'select'
+ break;
+ default:
+ shift(255); // 'true'
+ }
+ eventHandler.endNonterminal("NCName", e0);
+ }
+
+ function try_NCName()
+ {
+ switch (l1)
+ {
+ case 19: // NCName^Token
+ shiftT(19); // NCName^Token
+ break;
+ case 71: // 'after'
+ shiftT(71); // 'after'
+ break;
+ case 76: // 'and'
+ shiftT(76); // 'and'
+ break;
+ case 80: // 'as'
+ shiftT(80); // 'as'
+ break;
+ case 81: // 'ascending'
+ shiftT(81); // 'ascending'
+ break;
+ case 85: // 'before'
+ shiftT(85); // 'before'
+ break;
+ case 89: // 'case'
+ shiftT(89); // 'case'
+ break;
+ case 90: // 'cast'
+ shiftT(90); // 'cast'
+ break;
+ case 91: // 'castable'
+ shiftT(91); // 'castable'
+ break;
+ case 95: // 'collation'
+ shiftT(95); // 'collation'
+ break;
+ case 106: // 'count'
+ shiftT(106); // 'count'
+ break;
+ case 110: // 'default'
+ shiftT(110); // 'default'
+ break;
+ case 114: // 'descending'
+ shiftT(114); // 'descending'
+ break;
+ case 119: // 'div'
+ shiftT(119); // 'div'
+ break;
+ case 123: // 'else'
+ shiftT(123); // 'else'
+ break;
+ case 124: // 'empty'
+ shiftT(124); // 'empty'
+ break;
+ case 127: // 'end'
+ shiftT(127); // 'end'
+ break;
+ case 129: // 'eq'
+ shiftT(129); // 'eq'
+ break;
+ case 132: // 'except'
+ shiftT(132); // 'except'
+ break;
+ case 139: // 'for'
+ shiftT(139); // 'for'
+ break;
+ case 148: // 'ge'
+ shiftT(148); // 'ge'
+ break;
+ case 150: // 'group'
+ shiftT(150); // 'group'
+ break;
+ case 152: // 'gt'
+ shiftT(152); // 'gt'
+ break;
+ case 153: // 'idiv'
+ shiftT(153); // 'idiv'
+ break;
+ case 162: // 'instance'
+ shiftT(162); // 'instance'
+ break;
+ case 164: // 'intersect'
+ shiftT(164); // 'intersect'
+ break;
+ case 165: // 'into'
+ shiftT(165); // 'into'
+ break;
+ case 166: // 'is'
+ shiftT(166); // 'is'
+ break;
+ case 175: // 'le'
+ shiftT(175); // 'le'
+ break;
+ case 177: // 'let'
+ shiftT(177); // 'let'
+ break;
+ case 181: // 'lt'
+ shiftT(181); // 'lt'
+ break;
+ case 183: // 'mod'
+ shiftT(183); // 'mod'
+ break;
+ case 184: // 'modify'
+ shiftT(184); // 'modify'
+ break;
+ case 189: // 'ne'
+ shiftT(189); // 'ne'
+ break;
+ case 202: // 'only'
+ shiftT(202); // 'only'
+ break;
+ case 204: // 'or'
+ shiftT(204); // 'or'
+ break;
+ case 205: // 'order'
+ shiftT(205); // 'order'
+ break;
+ case 224: // 'return'
+ shiftT(224); // 'return'
+ break;
+ case 228: // 'satisfies'
+ shiftT(228); // 'satisfies'
+ break;
+ case 241: // 'stable'
+ shiftT(241); // 'stable'
+ break;
+ case 242: // 'start'
+ shiftT(242); // 'start'
+ break;
+ case 253: // 'to'
+ shiftT(253); // 'to'
+ break;
+ case 254: // 'treat'
+ shiftT(254); // 'treat'
+ break;
+ case 260: // 'union'
+ shiftT(260); // 'union'
+ break;
+ case 272: // 'where'
+ shiftT(272); // 'where'
+ break;
+ case 276: // 'with'
+ shiftT(276); // 'with'
+ break;
+ case 74: // 'ancestor'
+ shiftT(74); // 'ancestor'
+ break;
+ case 75: // 'ancestor-or-self'
+ shiftT(75); // 'ancestor-or-self'
+ break;
+ case 83: // 'attribute'
+ shiftT(83); // 'attribute'
+ break;
+ case 94: // 'child'
+ shiftT(94); // 'child'
+ break;
+ case 97: // 'comment'
+ shiftT(97); // 'comment'
+ break;
+ case 104: // 'copy'
+ shiftT(104); // 'copy'
+ break;
+ case 109: // 'declare'
+ shiftT(109); // 'declare'
+ break;
+ case 111: // 'delete'
+ shiftT(111); // 'delete'
+ break;
+ case 112: // 'descendant'
+ shiftT(112); // 'descendant'
+ break;
+ case 113: // 'descendant-or-self'
+ shiftT(113); // 'descendant-or-self'
+ break;
+ case 120: // 'document'
+ shiftT(120); // 'document'
+ break;
+ case 121: // 'document-node'
+ shiftT(121); // 'document-node'
+ break;
+ case 122: // 'element'
+ shiftT(122); // 'element'
+ break;
+ case 125: // 'empty-sequence'
+ shiftT(125); // 'empty-sequence'
+ break;
+ case 130: // 'every'
+ shiftT(130); // 'every'
+ break;
+ case 136: // 'first'
+ shiftT(136); // 'first'
+ break;
+ case 137: // 'following'
+ shiftT(137); // 'following'
+ break;
+ case 138: // 'following-sibling'
+ shiftT(138); // 'following-sibling'
+ break;
+ case 147: // 'function'
+ shiftT(147); // 'function'
+ break;
+ case 154: // 'if'
+ shiftT(154); // 'if'
+ break;
+ case 155: // 'import'
+ shiftT(155); // 'import'
+ break;
+ case 161: // 'insert'
+ shiftT(161); // 'insert'
+ break;
+ case 167: // 'item'
+ shiftT(167); // 'item'
+ break;
+ case 173: // 'last'
+ shiftT(173); // 'last'
+ break;
+ case 185: // 'module'
+ shiftT(185); // 'module'
+ break;
+ case 187: // 'namespace'
+ shiftT(187); // 'namespace'
+ break;
+ case 188: // 'namespace-node'
+ shiftT(188); // 'namespace-node'
+ break;
+ case 194: // 'node'
+ shiftT(194); // 'node'
+ break;
+ case 206: // 'ordered'
+ shiftT(206); // 'ordered'
+ break;
+ case 210: // 'parent'
+ shiftT(210); // 'parent'
+ break;
+ case 216: // 'preceding'
+ shiftT(216); // 'preceding'
+ break;
+ case 217: // 'preceding-sibling'
+ shiftT(217); // 'preceding-sibling'
+ break;
+ case 220: // 'processing-instruction'
+ shiftT(220); // 'processing-instruction'
+ break;
+ case 222: // 'rename'
+ shiftT(222); // 'rename'
+ break;
+ case 223: // 'replace'
+ shiftT(223); // 'replace'
+ break;
+ case 230: // 'schema-attribute'
+ shiftT(230); // 'schema-attribute'
+ break;
+ case 231: // 'schema-element'
+ shiftT(231); // 'schema-element'
+ break;
+ case 234: // 'self'
+ shiftT(234); // 'self'
+ break;
+ case 240: // 'some'
+ shiftT(240); // 'some'
+ break;
+ case 248: // 'switch'
+ shiftT(248); // 'switch'
+ break;
+ case 249: // 'text'
+ shiftT(249); // 'text'
+ break;
+ case 256: // 'try'
+ shiftT(256); // 'try'
+ break;
+ case 259: // 'typeswitch'
+ shiftT(259); // 'typeswitch'
+ break;
+ case 262: // 'unordered'
+ shiftT(262); // 'unordered'
+ break;
+ case 266: // 'validate'
+ shiftT(266); // 'validate'
+ break;
+ case 268: // 'variable'
+ shiftT(268); // 'variable'
+ break;
+ case 170: // 'jsoniq'
+ shiftT(170); // 'jsoniq'
+ break;
+ case 73: // 'allowing'
+ shiftT(73); // 'allowing'
+ break;
+ case 82: // 'at'
+ shiftT(82); // 'at'
+ break;
+ case 84: // 'base-uri'
+ shiftT(84); // 'base-uri'
+ break;
+ case 86: // 'boundary-space'
+ shiftT(86); // 'boundary-space'
+ break;
+ case 87: // 'break'
+ shiftT(87); // 'break'
+ break;
+ case 92: // 'catch'
+ shiftT(92); // 'catch'
+ break;
+ case 99: // 'construction'
+ shiftT(99); // 'construction'
+ break;
+ case 102: // 'context'
+ shiftT(102); // 'context'
+ break;
+ case 103: // 'continue'
+ shiftT(103); // 'continue'
+ break;
+ case 105: // 'copy-namespaces'
+ shiftT(105); // 'copy-namespaces'
+ break;
+ case 107: // 'decimal-format'
+ shiftT(107); // 'decimal-format'
+ break;
+ case 126: // 'encoding'
+ shiftT(126); // 'encoding'
+ break;
+ case 133: // 'exit'
+ shiftT(133); // 'exit'
+ break;
+ case 134: // 'external'
+ shiftT(134); // 'external'
+ break;
+ case 143: // 'ft-option'
+ shiftT(143); // 'ft-option'
+ break;
+ case 156: // 'in'
+ shiftT(156); // 'in'
+ break;
+ case 157: // 'index'
+ shiftT(157); // 'index'
+ break;
+ case 163: // 'integrity'
+ shiftT(163); // 'integrity'
+ break;
+ case 174: // 'lax'
+ shiftT(174); // 'lax'
+ break;
+ case 195: // 'nodes'
+ shiftT(195); // 'nodes'
+ break;
+ case 203: // 'option'
+ shiftT(203); // 'option'
+ break;
+ case 207: // 'ordering'
+ shiftT(207); // 'ordering'
+ break;
+ case 226: // 'revalidation'
+ shiftT(226); // 'revalidation'
+ break;
+ case 229: // 'schema'
+ shiftT(229); // 'schema'
+ break;
+ case 232: // 'score'
+ shiftT(232); // 'score'
+ break;
+ case 239: // 'sliding'
+ shiftT(239); // 'sliding'
+ break;
+ case 245: // 'strict'
+ shiftT(245); // 'strict'
+ break;
+ case 257: // 'tumbling'
+ shiftT(257); // 'tumbling'
+ break;
+ case 258: // 'type'
+ shiftT(258); // 'type'
+ break;
+ case 263: // 'updating'
+ shiftT(263); // 'updating'
+ break;
+ case 267: // 'value'
+ shiftT(267); // 'value'
+ break;
+ case 269: // 'version'
+ shiftT(269); // 'version'
+ break;
+ case 273: // 'while'
+ shiftT(273); // 'while'
+ break;
+ case 98: // 'constraint'
+ shiftT(98); // 'constraint'
+ break;
+ case 179: // 'loop'
+ shiftT(179); // 'loop'
+ break;
+ case 225: // 'returning'
+ shiftT(225); // 'returning'
+ break;
+ case 78: // 'append'
+ shiftT(78); // 'append'
+ break;
+ case 135: // 'false'
+ shiftT(135); // 'false'
+ break;
+ case 142: // 'from'
+ shiftT(142); // 'from'
+ break;
+ case 197: // 'null'
+ shiftT(197); // 'null'
+ break;
+ case 168: // 'json'
+ shiftT(168); // 'json'
+ break;
+ case 198: // 'object'
+ shiftT(198); // 'object'
+ break;
+ case 233: // 'select'
+ shiftT(233); // 'select'
+ break;
+ default:
+ shiftT(255); // 'true'
+ }
+ }
+
+ 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(283); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 35: // '('
+ lookahead2W(269); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 36: // '(#'
+ lookahead2(242); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ break;
+ case 47: // '/'
+ lookahead2W(285); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 48: // '//'
+ lookahead2W(259); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 55: // '<'
+ lookahead2(4); // QName
+ break;
+ case 56: // '<!--'
+ lookahead2(1); // DirCommentContents
+ break;
+ case 60: // '<?'
+ lookahead2(3); // PITarget
+ break;
+ case 69: // '['
+ lookahead2W(272); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 78: // 'append'
+ lookahead2W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 133: // 'exit'
+ lookahead2W(147); // S^WS | '#' | '(' | '(:' | 'returning'
+ break;
+ case 139: // 'for'
+ lookahead2W(179); // S^WS | '#' | '$' | '(' | '(:' | 'sliding' | 'tumbling'
+ break;
+ case 161: // 'insert'
+ lookahead2W(275); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 177: // 'let'
+ lookahead2W(166); // S^WS | '#' | '$' | '(' | '(:' | 'score'
+ break;
+ case 187: // 'namespace'
+ lookahead2W(246); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 220: // 'processing-instruction'
+ lookahead2W(244); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 223: // 'replace'
+ lookahead2W(170); // S^WS | '#' | '(' | '(:' | 'node' | 'value'
+ break;
+ case 266: // 'validate'
+ lookahead2W(188); // S^WS | '#' | '(' | '(:' | 'lax' | 'strict' | 'type' | '{'
+ break;
+ case 281: // '{'
+ lookahead2W(282); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 283: // '{|'
+ lookahead2W(273); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 31: // '$'
+ case 33: // '%'
+ lookahead2W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 83: // 'attribute'
+ case 122: // 'element'
+ lookahead2W(252); // EQName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 87: // 'break'
+ case 103: // 'continue'
+ lookahead2W(145); // S^WS | '#' | '(' | '(:' | 'loop'
+ break;
+ case 97: // 'comment'
+ case 249: // 'text'
+ lookahead2W(97); // S^WS | '#' | '(:' | '{'
+ break;
+ case 111: // 'delete'
+ case 222: // 'rename'
+ lookahead2W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 41: // '+'
+ case 43: // '-'
+ case 196: // 'not'
+ lookahead2W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 135: // 'false'
+ case 197: // 'null'
+ case 255: // 'true'
+ lookahead2W(210); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '.' | '/' |
+ break;
+ case 104: // 'copy'
+ case 130: // 'every'
+ case 240: // 'some'
+ case 268: // 'variable'
+ lookahead2W(143); // S^WS | '#' | '$' | '(' | '(:'
+ break;
+ case 120: // 'document'
+ case 206: // 'ordered'
+ case 256: // 'try'
+ case 262: // 'unordered'
+ lookahead2W(148); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 32: // '$$'
+ lookahead2W(209); // S^WS | EOF | '!' | '!=' | '(' | '(:' | '*' | '+' | ',' | '-' | '.' | '/' | '//' |
+ break;
+ case 79: // 'array'
+ case 121: // 'document-node'
+ case 125: // 'empty-sequence'
+ case 167: // 'item'
+ case 169: // 'json-item'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 247: // 'structured-item'
+ lookahead2W(20); // S^WS | '#' | '(:'
+ break;
+ case 6: // EQName^Token
+ case 71: // 'after'
+ case 73: // 'allowing'
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 76: // 'and'
+ case 80: // 'as'
+ case 81: // 'ascending'
+ case 82: // 'at'
+ case 84: // 'base-uri'
+ case 85: // 'before'
+ case 86: // 'boundary-space'
+ case 89: // 'case'
+ case 90: // 'cast'
+ case 91: // 'castable'
+ case 92: // 'catch'
+ case 94: // 'child'
+ case 95: // 'collation'
+ case 98: // 'constraint'
+ case 99: // 'construction'
+ case 102: // 'context'
+ case 105: // 'copy-namespaces'
+ case 106: // 'count'
+ case 107: // 'decimal-format'
+ case 109: // 'declare'
+ case 110: // 'default'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 114: // 'descending'
+ case 119: // 'div'
+ case 123: // 'else'
+ case 124: // 'empty'
+ case 126: // 'encoding'
+ case 127: // 'end'
+ case 129: // 'eq'
+ case 132: // 'except'
+ case 134: // 'external'
+ case 136: // 'first'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 142: // 'from'
+ case 143: // 'ft-option'
+ case 147: // 'function'
+ case 148: // 'ge'
+ case 150: // 'group'
+ case 152: // 'gt'
+ case 153: // 'idiv'
+ case 154: // 'if'
+ case 155: // 'import'
+ case 156: // 'in'
+ case 157: // 'index'
+ case 162: // 'instance'
+ case 163: // 'integrity'
+ case 164: // 'intersect'
+ case 165: // 'into'
+ case 166: // 'is'
+ case 168: // 'json'
+ case 170: // 'jsoniq'
+ case 173: // 'last'
+ case 174: // 'lax'
+ case 175: // 'le'
+ case 179: // 'loop'
+ case 181: // 'lt'
+ case 183: // 'mod'
+ case 184: // 'modify'
+ case 185: // 'module'
+ case 189: // 'ne'
+ case 195: // 'nodes'
+ case 198: // 'object'
+ case 202: // 'only'
+ case 203: // 'option'
+ case 204: // 'or'
+ case 205: // 'order'
+ case 207: // 'ordering'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ case 224: // 'return'
+ case 225: // 'returning'
+ case 226: // 'revalidation'
+ case 228: // 'satisfies'
+ case 229: // 'schema'
+ case 232: // 'score'
+ case 233: // 'select'
+ case 234: // 'self'
+ case 239: // 'sliding'
+ case 241: // 'stable'
+ case 242: // 'start'
+ case 245: // 'strict'
+ case 248: // 'switch'
+ case 253: // 'to'
+ case 254: // 'treat'
+ case 257: // 'tumbling'
+ case 258: // 'type'
+ case 259: // 'typeswitch'
+ case 260: // 'union'
+ case 263: // 'updating'
+ case 267: // 'value'
+ case 269: // 'version'
+ case 272: // 'where'
+ case 273: // 'while'
+ case 276: // 'with'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 54 // ';'
+ && lk != 287 // '}'
+ && lk != 12808 // IntegerLiteral EOF
+ && lk != 12809 // DecimalLiteral EOF
+ && lk != 12810 // DoubleLiteral EOF
+ && lk != 12811 // StringLiteral EOF
+ && lk != 12832 // '$$' EOF
+ && lk != 12847 // '/' EOF
+ && lk != 12935 // 'false' EOF
+ && lk != 12997 // 'null' EOF
+ && lk != 13055 // 'true' EOF
+ && lk != 16140 // 'variable' '$'
+ && lk != 21512 // IntegerLiteral ','
+ && lk != 21513 // DecimalLiteral ','
+ && lk != 21514 // DoubleLiteral ','
+ && lk != 21515 // StringLiteral ','
+ && lk != 21536 // '$$' ','
+ && lk != 21551 // '/' ','
+ && lk != 21639 // 'false' ','
+ && lk != 21701 // 'null' ','
+ && lk != 21759 // 'true' ','
+ && lk != 27656 // IntegerLiteral ';'
+ && lk != 27657 // DecimalLiteral ';'
+ && lk != 27658 // DoubleLiteral ';'
+ && lk != 27659 // StringLiteral ';'
+ && lk != 27680 // '$$' ';'
+ && lk != 27695 // '/' ';'
+ && lk != 27783 // 'false' ';'
+ && lk != 27845 // 'null' ';'
+ && lk != 27903 // 'true' ';'
+ && lk != 91735 // 'break' 'loop'
+ && lk != 91751 // 'continue' 'loop'
+ && lk != 115333 // 'exit' 'returning'
+ && lk != 146952 // IntegerLiteral '}'
+ && lk != 146953 // DecimalLiteral '}'
+ && lk != 146954 // DoubleLiteral '}'
+ && lk != 146955 // StringLiteral '}'
+ && lk != 146976 // '$$' '}'
+ && lk != 146991 // '/' '}'
+ && lk != 147079 // 'false' '}'
+ && lk != 147141 // 'null' '}'
+ && lk != 147199) // 'true' '}'
+ {
+ 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
+ {
+ 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(8, e0, lk);
+ }
+ }
+ if (lk != -1
+ && lk != 54 // ';'
+ && lk != 16140 // 'variable' '$'
+ && lk != 27656 // IntegerLiteral ';'
+ && lk != 27657 // DecimalLiteral ';'
+ && lk != 27658 // DoubleLiteral ';'
+ && lk != 27659 // StringLiteral ';'
+ && lk != 27680 // '$$' ';'
+ && lk != 27695 // '/' ';'
+ && lk != 27783 // 'false' ';'
+ && lk != 27845 // 'null' ';'
+ && lk != 27903 // 'true' ';'
+ && lk != 91735 // 'break' 'loop'
+ && lk != 91751 // 'continue' 'loop'
+ && lk != 115333) // 'exit' 'returning'
+ {
+ break;
+ }
+ whitespace();
+ parse_Statement();
+ }
+ eventHandler.endNonterminal("Statements", e0);
+ }
+
+ function try_Statements()
+ {
+ for (;;)
+ {
+ lookahead1W(283); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 35: // '('
+ lookahead2W(269); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 36: // '(#'
+ lookahead2(242); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ break;
+ case 47: // '/'
+ lookahead2W(285); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 48: // '//'
+ lookahead2W(259); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 55: // '<'
+ lookahead2(4); // QName
+ break;
+ case 56: // '<!--'
+ lookahead2(1); // DirCommentContents
+ break;
+ case 60: // '<?'
+ lookahead2(3); // PITarget
+ break;
+ case 69: // '['
+ lookahead2W(272); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 78: // 'append'
+ lookahead2W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 133: // 'exit'
+ lookahead2W(147); // S^WS | '#' | '(' | '(:' | 'returning'
+ break;
+ case 139: // 'for'
+ lookahead2W(179); // S^WS | '#' | '$' | '(' | '(:' | 'sliding' | 'tumbling'
+ break;
+ case 161: // 'insert'
+ lookahead2W(275); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 177: // 'let'
+ lookahead2W(166); // S^WS | '#' | '$' | '(' | '(:' | 'score'
+ break;
+ case 187: // 'namespace'
+ lookahead2W(246); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 220: // 'processing-instruction'
+ lookahead2W(244); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 223: // 'replace'
+ lookahead2W(170); // S^WS | '#' | '(' | '(:' | 'node' | 'value'
+ break;
+ case 266: // 'validate'
+ lookahead2W(188); // S^WS | '#' | '(' | '(:' | 'lax' | 'strict' | 'type' | '{'
+ break;
+ case 281: // '{'
+ lookahead2W(282); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 283: // '{|'
+ lookahead2W(273); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 31: // '$'
+ case 33: // '%'
+ lookahead2W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 83: // 'attribute'
+ case 122: // 'element'
+ lookahead2W(252); // EQName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 87: // 'break'
+ case 103: // 'continue'
+ lookahead2W(145); // S^WS | '#' | '(' | '(:' | 'loop'
+ break;
+ case 97: // 'comment'
+ case 249: // 'text'
+ lookahead2W(97); // S^WS | '#' | '(:' | '{'
+ break;
+ case 111: // 'delete'
+ case 222: // 'rename'
+ lookahead2W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 41: // '+'
+ case 43: // '-'
+ case 196: // 'not'
+ lookahead2W(265); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 135: // 'false'
+ case 197: // 'null'
+ case 255: // 'true'
+ lookahead2W(210); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '.' | '/' |
+ break;
+ case 104: // 'copy'
+ case 130: // 'every'
+ case 240: // 'some'
+ case 268: // 'variable'
+ lookahead2W(143); // S^WS | '#' | '$' | '(' | '(:'
+ break;
+ case 120: // 'document'
+ case 206: // 'ordered'
+ case 256: // 'try'
+ case 262: // 'unordered'
+ lookahead2W(148); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 32: // '$$'
+ lookahead2W(209); // S^WS | EOF | '!' | '!=' | '(' | '(:' | '*' | '+' | ',' | '-' | '.' | '/' | '//' |
+ break;
+ case 79: // 'array'
+ case 121: // 'document-node'
+ case 125: // 'empty-sequence'
+ case 167: // 'item'
+ case 169: // 'json-item'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 247: // 'structured-item'
+ lookahead2W(20); // S^WS | '#' | '(:'
+ break;
+ case 6: // EQName^Token
+ case 71: // 'after'
+ case 73: // 'allowing'
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 76: // 'and'
+ case 80: // 'as'
+ case 81: // 'ascending'
+ case 82: // 'at'
+ case 84: // 'base-uri'
+ case 85: // 'before'
+ case 86: // 'boundary-space'
+ case 89: // 'case'
+ case 90: // 'cast'
+ case 91: // 'castable'
+ case 92: // 'catch'
+ case 94: // 'child'
+ case 95: // 'collation'
+ case 98: // 'constraint'
+ case 99: // 'construction'
+ case 102: // 'context'
+ case 105: // 'copy-namespaces'
+ case 106: // 'count'
+ case 107: // 'decimal-format'
+ case 109: // 'declare'
+ case 110: // 'default'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 114: // 'descending'
+ case 119: // 'div'
+ case 123: // 'else'
+ case 124: // 'empty'
+ case 126: // 'encoding'
+ case 127: // 'end'
+ case 129: // 'eq'
+ case 132: // 'except'
+ case 134: // 'external'
+ case 136: // 'first'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 142: // 'from'
+ case 143: // 'ft-option'
+ case 147: // 'function'
+ case 148: // 'ge'
+ case 150: // 'group'
+ case 152: // 'gt'
+ case 153: // 'idiv'
+ case 154: // 'if'
+ case 155: // 'import'
+ case 156: // 'in'
+ case 157: // 'index'
+ case 162: // 'instance'
+ case 163: // 'integrity'
+ case 164: // 'intersect'
+ case 165: // 'into'
+ case 166: // 'is'
+ case 168: // 'json'
+ case 170: // 'jsoniq'
+ case 173: // 'last'
+ case 174: // 'lax'
+ case 175: // 'le'
+ case 179: // 'loop'
+ case 181: // 'lt'
+ case 183: // 'mod'
+ case 184: // 'modify'
+ case 185: // 'module'
+ case 189: // 'ne'
+ case 195: // 'nodes'
+ case 198: // 'object'
+ case 202: // 'only'
+ case 203: // 'option'
+ case 204: // 'or'
+ case 205: // 'order'
+ case 207: // 'ordering'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ case 224: // 'return'
+ case 225: // 'returning'
+ case 226: // 'revalidation'
+ case 228: // 'satisfies'
+ case 229: // 'schema'
+ case 232: // 'score'
+ case 233: // 'select'
+ case 234: // 'self'
+ case 239: // 'sliding'
+ case 241: // 'stable'
+ case 242: // 'start'
+ case 245: // 'strict'
+ case 248: // 'switch'
+ case 253: // 'to'
+ case 254: // 'treat'
+ case 257: // 'tumbling'
+ case 258: // 'type'
+ case 259: // 'typeswitch'
+ case 260: // 'union'
+ case 263: // 'updating'
+ case 267: // 'value'
+ case 269: // 'version'
+ case 272: // 'where'
+ case 273: // 'while'
+ case 276: // 'with'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 54 // ';'
+ && lk != 287 // '}'
+ && lk != 12808 // IntegerLiteral EOF
+ && lk != 12809 // DecimalLiteral EOF
+ && lk != 12810 // DoubleLiteral EOF
+ && lk != 12811 // StringLiteral EOF
+ && lk != 12832 // '$$' EOF
+ && lk != 12847 // '/' EOF
+ && lk != 12935 // 'false' EOF
+ && lk != 12997 // 'null' EOF
+ && lk != 13055 // 'true' EOF
+ && lk != 16140 // 'variable' '$'
+ && lk != 21512 // IntegerLiteral ','
+ && lk != 21513 // DecimalLiteral ','
+ && lk != 21514 // DoubleLiteral ','
+ && lk != 21515 // StringLiteral ','
+ && lk != 21536 // '$$' ','
+ && lk != 21551 // '/' ','
+ && lk != 21639 // 'false' ','
+ && lk != 21701 // 'null' ','
+ && lk != 21759 // 'true' ','
+ && lk != 27656 // IntegerLiteral ';'
+ && lk != 27657 // DecimalLiteral ';'
+ && lk != 27658 // DoubleLiteral ';'
+ && lk != 27659 // StringLiteral ';'
+ && lk != 27680 // '$$' ';'
+ && lk != 27695 // '/' ';'
+ && lk != 27783 // 'false' ';'
+ && lk != 27845 // 'null' ';'
+ && lk != 27903 // 'true' ';'
+ && lk != 91735 // 'break' 'loop'
+ && lk != 91751 // 'continue' 'loop'
+ && lk != 115333 // 'exit' 'returning'
+ && lk != 146952 // IntegerLiteral '}'
+ && lk != 146953 // DecimalLiteral '}'
+ && lk != 146954 // DoubleLiteral '}'
+ && lk != 146955 // StringLiteral '}'
+ && lk != 146976 // '$$' '}'
+ && lk != 146991 // '/' '}'
+ && lk != 147079 // 'false' '}'
+ && lk != 147141 // 'null' '}'
+ && lk != 147199) // 'true' '}'
+ {
+ 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
+ {
+ try_Statement();
+ memoize(8, e0A, -1);
+ continue;
+ }
+ catch (p1A)
+ {
+ 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, e0A, -2);
+ break;
+ }
+ }
+ }
+ if (lk != -1
+ && lk != 54 // ';'
+ && lk != 16140 // 'variable' '$'
+ && lk != 27656 // IntegerLiteral ';'
+ && lk != 27657 // DecimalLiteral ';'
+ && lk != 27658 // DoubleLiteral ';'
+ && lk != 27659 // StringLiteral ';'
+ && lk != 27680 // '$$' ';'
+ && lk != 27695 // '/' ';'
+ && lk != 27783 // 'false' ';'
+ && lk != 27845 // 'null' ';'
+ && lk != 27903 // 'true' ';'
+ && lk != 91735 // 'break' 'loop'
+ && lk != 91751 // 'continue' 'loop'
+ && lk != 115333) // '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 != 287) // '}'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ eventHandler.endNonterminal("StatementsAndOptionalExpr", e0);
+ }
+
+ function try_StatementsAndOptionalExpr()
+ {
+ try_Statements();
+ if (l1 != 25 // EOF
+ && l1 != 287) // '}'
+ {
+ try_Expr();
+ }
+ }
+
+ function parse_Statement()
+ {
+ eventHandler.startNonterminal("Statement", e0);
+ switch (l1)
+ {
+ case 133: // 'exit'
+ lookahead2W(147); // S^WS | '#' | '(' | '(:' | 'returning'
+ break;
+ case 139: // 'for'
+ lookahead2W(179); // S^WS | '#' | '$' | '(' | '(:' | 'sliding' | 'tumbling'
+ break;
+ case 177: // 'let'
+ lookahead2W(166); // S^WS | '#' | '$' | '(' | '(:' | 'score'
+ break;
+ case 256: // 'try'
+ lookahead2W(148); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 268: // 'variable'
+ lookahead2W(143); // S^WS | '#' | '$' | '(' | '(:'
+ break;
+ case 281: // '{'
+ lookahead2W(282); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 31: // '$'
+ case 33: // '%'
+ lookahead2W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 87: // 'break'
+ case 103: // 'continue'
+ lookahead2W(145); // S^WS | '#' | '(' | '(:' | 'loop'
+ break;
+ case 154: // 'if'
+ case 248: // 'switch'
+ case 259: // 'typeswitch'
+ case 273: // 'while'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 6 // EQName^Token
+ && lk != 8 // IntegerLiteral
+ && lk != 9 // DecimalLiteral
+ && lk != 10 // DoubleLiteral
+ && lk != 11 // StringLiteral
+ && lk != 32 // '$$'
+ && lk != 35 // '('
+ && lk != 36 // '(#'
+ && lk != 41 // '+'
+ && lk != 43 // '-'
+ && lk != 47 // '/'
+ && lk != 48 // '//'
+ && lk != 54 // ';'
+ && lk != 55 // '<'
+ && lk != 56 // '<!--'
+ && lk != 60 // '<?'
+ && lk != 69 // '['
+ && lk != 71 // 'after'
+ && lk != 73 // 'allowing'
+ && lk != 74 // 'ancestor'
+ && lk != 75 // 'ancestor-or-self'
+ && lk != 76 // 'and'
+ && lk != 78 // 'append'
+ && lk != 79 // 'array'
+ && lk != 80 // 'as'
+ && lk != 81 // 'ascending'
+ && lk != 82 // 'at'
+ && lk != 83 // 'attribute'
+ && lk != 84 // 'base-uri'
+ && lk != 85 // 'before'
+ && lk != 86 // 'boundary-space'
+ && lk != 89 // 'case'
+ && lk != 90 // 'cast'
+ && lk != 91 // 'castable'
+ && lk != 92 // 'catch'
+ && lk != 94 // 'child'
+ && lk != 95 // 'collation'
+ && lk != 97 // 'comment'
+ && lk != 98 // 'constraint'
+ && lk != 99 // 'construction'
+ && lk != 102 // 'context'
+ && lk != 104 // 'copy'
+ && lk != 105 // 'copy-namespaces'
+ && lk != 106 // 'count'
+ && lk != 107 // 'decimal-format'
+ && lk != 109 // 'declare'
+ && lk != 110 // 'default'
+ && lk != 111 // 'delete'
+ && lk != 112 // 'descendant'
+ && lk != 113 // 'descendant-or-self'
+ && lk != 114 // 'descending'
+ && lk != 119 // 'div'
+ && lk != 120 // 'document'
+ && lk != 121 // 'document-node'
+ && lk != 122 // 'element'
+ && lk != 123 // 'else'
+ && lk != 124 // 'empty'
+ && lk != 125 // 'empty-sequence'
+ && lk != 126 // 'encoding'
+ && lk != 127 // 'end'
+ && lk != 129 // 'eq'
+ && lk != 130 // 'every'
+ && lk != 132 // 'except'
+ && lk != 134 // 'external'
+ && lk != 135 // 'false'
+ && lk != 136 // 'first'
+ && lk != 137 // 'following'
+ && lk != 138 // 'following-sibling'
+ && lk != 142 // 'from'
+ && lk != 143 // 'ft-option'
+ && lk != 147 // 'function'
+ && lk != 148 // 'ge'
+ && lk != 150 // 'group'
+ && lk != 152 // 'gt'
+ && lk != 153 // 'idiv'
+ && lk != 155 // 'import'
+ && lk != 156 // 'in'
+ && lk != 157 // 'index'
+ && lk != 161 // 'insert'
+ && lk != 162 // 'instance'
+ && lk != 163 // 'integrity'
+ && lk != 164 // 'intersect'
+ && lk != 165 // 'into'
+ && lk != 166 // 'is'
+ && lk != 167 // 'item'
+ && lk != 168 // 'json'
+ && lk != 169 // 'json-item'
+ && lk != 170 // 'jsoniq'
+ && lk != 173 // 'last'
+ && lk != 174 // 'lax'
+ && lk != 175 // 'le'
+ && lk != 179 // 'loop'
+ && lk != 181 // 'lt'
+ && lk != 183 // 'mod'
+ && lk != 184 // 'modify'
+ && lk != 185 // 'module'
+ && lk != 187 // 'namespace'
+ && lk != 188 // 'namespace-node'
+ && lk != 189 // 'ne'
+ && lk != 194 // 'node'
+ && lk != 195 // 'nodes'
+ && lk != 196 // 'not'
+ && lk != 197 // 'null'
+ && lk != 198 // 'object'
+ && lk != 202 // 'only'
+ && lk != 203 // 'option'
+ && lk != 204 // 'or'
+ && lk != 205 // 'order'
+ && lk != 206 // 'ordered'
+ && lk != 207 // 'ordering'
+ && lk != 210 // 'parent'
+ && lk != 216 // 'preceding'
+ && lk != 217 // 'preceding-sibling'
+ && lk != 220 // 'processing-instruction'
+ && lk != 222 // 'rename'
+ && lk != 223 // 'replace'
+ && lk != 224 // 'return'
+ && lk != 225 // 'returning'
+ && lk != 226 // 'revalidation'
+ && lk != 228 // 'satisfies'
+ && lk != 229 // 'schema'
+ && lk != 230 // 'schema-attribute'
+ && lk != 231 // 'schema-element'
+ && lk != 232 // 'score'
+ && lk != 233 // 'select'
+ && lk != 234 // 'self'
+ && lk != 239 // 'sliding'
+ && lk != 240 // 'some'
+ && lk != 241 // 'stable'
+ && lk != 242 // 'start'
+ && lk != 245 // 'strict'
+ && lk != 247 // 'structured-item'
+ && lk != 249 // 'text'
+ && lk != 253 // 'to'
+ && lk != 254 // 'treat'
+ && lk != 255 // 'true'
+ && lk != 257 // 'tumbling'
+ && lk != 258 // 'type'
+ && lk != 260 // 'union'
+ && lk != 262 // 'unordered'
+ && lk != 263 // 'updating'
+ && lk != 266 // 'validate'
+ && lk != 267 // 'value'
+ && lk != 269 // 'version'
+ && lk != 272 // 'where'
+ && lk != 276 // 'with'
+ && lk != 283 // '{|'
+ && lk != 10009 // '{' NCName^Token
+ && lk != 14935 // 'break' '#'
+ && lk != 14951 // 'continue' '#'
+ && lk != 14981 // 'exit' '#'
+ && lk != 14987 // 'for' '#'
+ && lk != 15002 // 'if' '#'
+ && lk != 15025 // 'let' '#'
+ && lk != 15096 // 'switch' '#'
+ && lk != 15104 // 'try' '#'
+ && lk != 15107 // 'typeswitch' '#'
+ && lk != 15116 // 'variable' '#'
+ && lk != 15121 // 'while' '#'
+ && lk != 16011 // 'for' '$'
+ && lk != 16049 // 'let' '$'
+ && lk != 16140 // 'variable' '$'
+ && lk != 18007 // 'break' '('
+ && lk != 18023 // 'continue' '('
+ && lk != 18053 // 'exit' '('
+ && lk != 18059 // 'for' '('
+ && lk != 18074 // 'if' '('
+ && lk != 18097 // 'let' '('
+ && lk != 18168 // 'switch' '('
+ && lk != 18176 // 'try' '('
+ && lk != 18179 // 'typeswitch' '('
+ && lk != 18188 // 'variable' '('
+ && lk != 91735 // 'break' 'loop'
+ && lk != 91751 // 'continue' 'loop'
+ && lk != 115333 // 'exit' 'returning'
+ && lk != 118961 // 'let' 'score'
+ && lk != 122507 // 'for' 'sliding'
+ && lk != 131723 // 'for' 'tumbling'
+ && lk != 144128 // 'try' '{'
+ && lk != 147225) // '{' '}'
+ {
+ 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
+ {
+ 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(9, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -2:
+ parse_AssignStatement();
+ break;
+ case -3:
+ parse_BlockStatement();
+ break;
+ case 91735: // 'break' 'loop'
+ parse_BreakStatement();
+ break;
+ case 91751: // 'continue' 'loop'
+ parse_ContinueStatement();
+ break;
+ case 115333: // 'exit' 'returning'
+ parse_ExitStatement();
+ break;
+ case 16011: // 'for' '$'
+ case 16049: // 'let' '$'
+ case 118961: // 'let' 'score'
+ case 122507: // 'for' 'sliding'
+ case 131723: // 'for' 'tumbling'
+ parse_FLWORStatement();
+ break;
+ case 18074: // 'if' '('
+ parse_IfStatement();
+ break;
+ case 18168: // 'switch' '('
+ parse_SwitchStatement();
+ break;
+ case 144128: // 'try' '{'
+ parse_TryCatchStatement();
+ break;
+ case 18179: // 'typeswitch' '('
+ parse_TypeswitchStatement();
+ break;
+ case -12:
+ case 16140: // 'variable' '$'
+ parse_VarDeclStatement();
+ break;
+ case -13:
+ parse_WhileStatement();
+ break;
+ case 54: // ';'
+ parse_VoidStatement();
+ break;
+ default:
+ parse_ApplyStatement();
+ }
+ eventHandler.endNonterminal("Statement", e0);
+ }
+
+ function try_Statement()
+ {
+ switch (l1)
+ {
+ case 133: // 'exit'
+ lookahead2W(147); // S^WS | '#' | '(' | '(:' | 'returning'
+ break;
+ case 139: // 'for'
+ lookahead2W(179); // S^WS | '#' | '$' | '(' | '(:' | 'sliding' | 'tumbling'
+ break;
+ case 177: // 'let'
+ lookahead2W(166); // S^WS | '#' | '$' | '(' | '(:' | 'score'
+ break;
+ case 256: // 'try'
+ lookahead2W(148); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 268: // 'variable'
+ lookahead2W(143); // S^WS | '#' | '$' | '(' | '(:'
+ break;
+ case 281: // '{'
+ lookahead2W(282); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 31: // '$'
+ case 33: // '%'
+ lookahead2W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 87: // 'break'
+ case 103: // 'continue'
+ lookahead2W(145); // S^WS | '#' | '(' | '(:' | 'loop'
+ break;
+ case 154: // 'if'
+ case 248: // 'switch'
+ case 259: // 'typeswitch'
+ case 273: // 'while'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 6 // EQName^Token
+ && lk != 8 // IntegerLiteral
+ && lk != 9 // DecimalLiteral
+ && lk != 10 // DoubleLiteral
+ && lk != 11 // StringLiteral
+ && lk != 32 // '$$'
+ && lk != 35 // '('
+ && lk != 36 // '(#'
+ && lk != 41 // '+'
+ && lk != 43 // '-'
+ && lk != 47 // '/'
+ && lk != 48 // '//'
+ && lk != 54 // ';'
+ && lk != 55 // '<'
+ && lk != 56 // '<!--'
+ && lk != 60 // '<?'
+ && lk != 69 // '['
+ && lk != 71 // 'after'
+ && lk != 73 // 'allowing'
+ && lk != 74 // 'ancestor'
+ && lk != 75 // 'ancestor-or-self'
+ && lk != 76 // 'and'
+ && lk != 78 // 'append'
+ && lk != 79 // 'array'
+ && lk != 80 // 'as'
+ && lk != 81 // 'ascending'
+ && lk != 82 // 'at'
+ && lk != 83 // 'attribute'
+ && lk != 84 // 'base-uri'
+ && lk != 85 // 'before'
+ && lk != 86 // 'boundary-space'
+ && lk != 89 // 'case'
+ && lk != 90 // 'cast'
+ && lk != 91 // 'castable'
+ && lk != 92 // 'catch'
+ && lk != 94 // 'child'
+ && lk != 95 // 'collation'
+ && lk != 97 // 'comment'
+ && lk != 98 // 'constraint'
+ && lk != 99 // 'construction'
+ && lk != 102 // 'context'
+ && lk != 104 // 'copy'
+ && lk != 105 // 'copy-namespaces'
+ && lk != 106 // 'count'
+ && lk != 107 // 'decimal-format'
+ && lk != 109 // 'declare'
+ && lk != 110 // 'default'
+ && lk != 111 // 'delete'
+ && lk != 112 // 'descendant'
+ && lk != 113 // 'descendant-or-self'
+ && lk != 114 // 'descending'
+ && lk != 119 // 'div'
+ && lk != 120 // 'document'
+ && lk != 121 // 'document-node'
+ && lk != 122 // 'element'
+ && lk != 123 // 'else'
+ && lk != 124 // 'empty'
+ && lk != 125 // 'empty-sequence'
+ && lk != 126 // 'encoding'
+ && lk != 127 // 'end'
+ && lk != 129 // 'eq'
+ && lk != 130 // 'every'
+ && lk != 132 // 'except'
+ && lk != 134 // 'external'
+ && lk != 135 // 'false'
+ && lk != 136 // 'first'
+ && lk != 137 // 'following'
+ && lk != 138 // 'following-sibling'
+ && lk != 142 // 'from'
+ && lk != 143 // 'ft-option'
+ && lk != 147 // 'function'
+ && lk != 148 // 'ge'
+ && lk != 150 // 'group'
+ && lk != 152 // 'gt'
+ && lk != 153 // 'idiv'
+ && lk != 155 // 'import'
+ && lk != 156 // 'in'
+ && lk != 157 // 'index'
+ && lk != 161 // 'insert'
+ && lk != 162 // 'instance'
+ && lk != 163 // 'integrity'
+ && lk != 164 // 'intersect'
+ && lk != 165 // 'into'
+ && lk != 166 // 'is'
+ && lk != 167 // 'item'
+ && lk != 168 // 'json'
+ && lk != 169 // 'json-item'
+ && lk != 170 // 'jsoniq'
+ && lk != 173 // 'last'
+ && lk != 174 // 'lax'
+ && lk != 175 // 'le'
+ && lk != 179 // 'loop'
+ && lk != 181 // 'lt'
+ && lk != 183 // 'mod'
+ && lk != 184 // 'modify'
+ && lk != 185 // 'module'
+ && lk != 187 // 'namespace'
+ && lk != 188 // 'namespace-node'
+ && lk != 189 // 'ne'
+ && lk != 194 // 'node'
+ && lk != 195 // 'nodes'
+ && lk != 196 // 'not'
+ && lk != 197 // 'null'
+ && lk != 198 // 'object'
+ && lk != 202 // 'only'
+ && lk != 203 // 'option'
+ && lk != 204 // 'or'
+ && lk != 205 // 'order'
+ && lk != 206 // 'ordered'
+ && lk != 207 // 'ordering'
+ && lk != 210 // 'parent'
+ && lk != 216 // 'preceding'
+ && lk != 217 // 'preceding-sibling'
+ && lk != 220 // 'processing-instruction'
+ && lk != 222 // 'rename'
+ && lk != 223 // 'replace'
+ && lk != 224 // 'return'
+ && lk != 225 // 'returning'
+ && lk != 226 // 'revalidation'
+ && lk != 228 // 'satisfies'
+ && lk != 229 // 'schema'
+ && lk != 230 // 'schema-attribute'
+ && lk != 231 // 'schema-element'
+ && lk != 232 // 'score'
+ && lk != 233 // 'select'
+ && lk != 234 // 'self'
+ && lk != 239 // 'sliding'
+ && lk != 240 // 'some'
+ && lk != 241 // 'stable'
+ && lk != 242 // 'start'
+ && lk != 245 // 'strict'
+ && lk != 247 // 'structured-item'
+ && lk != 249 // 'text'
+ && lk != 253 // 'to'
+ && lk != 254 // 'treat'
+ && lk != 255 // 'true'
+ && lk != 257 // 'tumbling'
+ && lk != 258 // 'type'
+ && lk != 260 // 'union'
+ && lk != 262 // 'unordered'
+ && lk != 263 // 'updating'
+ && lk != 266 // 'validate'
+ && lk != 267 // 'value'
+ && lk != 269 // 'version'
+ && lk != 272 // 'where'
+ && lk != 276 // 'with'
+ && lk != 283 // '{|'
+ && lk != 10009 // '{' NCName^Token
+ && lk != 14935 // 'break' '#'
+ && lk != 14951 // 'continue' '#'
+ && lk != 14981 // 'exit' '#'
+ && lk != 14987 // 'for' '#'
+ && lk != 15002 // 'if' '#'
+ && lk != 15025 // 'let' '#'
+ && lk != 15096 // 'switch' '#'
+ && lk != 15104 // 'try' '#'
+ && lk != 15107 // 'typeswitch' '#'
+ && lk != 15116 // 'variable' '#'
+ && lk != 15121 // 'while' '#'
+ && lk != 16011 // 'for' '$'
+ && lk != 16049 // 'let' '$'
+ && lk != 16140 // 'variable' '$'
+ && lk != 18007 // 'break' '('
+ && lk != 18023 // 'continue' '('
+ && lk != 18053 // 'exit' '('
+ && lk != 18059 // 'for' '('
+ && lk != 18074 // 'if' '('
+ && lk != 18097 // 'let' '('
+ && lk != 18168 // 'switch' '('
+ && lk != 18176 // 'try' '('
+ && lk != 18179 // 'typeswitch' '('
+ && lk != 18188 // 'variable' '('
+ && lk != 91735 // 'break' 'loop'
+ && lk != 91751 // 'continue' 'loop'
+ && lk != 115333 // 'exit' 'returning'
+ && lk != 118961 // 'let' 'score'
+ && lk != 122507 // 'for' 'sliding'
+ && lk != 131723 // 'for' 'tumbling'
+ && lk != 144128 // 'try' '{'
+ && lk != 147225) // '{' '}'
+ {
+ 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
+ {
+ try_ApplyStatement();
+ memoize(9, e0A, -1);
+ lk = -15;
+ }
+ 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();
+ memoize(9, e0A, -2);
+ lk = -15;
+ }
+ 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();
+ memoize(9, e0A, -3);
+ lk = -15;
+ }
+ 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();
+ memoize(9, e0A, -12);
+ lk = -15;
+ }
+ 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(9, e0A, -13);
+ }
+ }
+ }
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -2:
+ try_AssignStatement();
+ break;
+ case -3:
+ try_BlockStatement();
+ break;
+ case 91735: // 'break' 'loop'
+ try_BreakStatement();
+ break;
+ case 91751: // 'continue' 'loop'
+ try_ContinueStatement();
+ break;
+ case 115333: // 'exit' 'returning'
+ try_ExitStatement();
+ break;
+ case 16011: // 'for' '$'
+ case 16049: // 'let' '$'
+ case 118961: // 'let' 'score'
+ case 122507: // 'for' 'sliding'
+ case 131723: // 'for' 'tumbling'
+ try_FLWORStatement();
+ break;
+ case 18074: // 'if' '('
+ try_IfStatement();
+ break;
+ case 18168: // 'switch' '('
+ try_SwitchStatement();
+ break;
+ case 144128: // 'try' '{'
+ try_TryCatchStatement();
+ break;
+ case 18179: // 'typeswitch' '('
+ try_TypeswitchStatement();
+ break;
+ case -12:
+ case 16140: // 'variable' '$'
+ try_VarDeclStatement();
+ break;
+ case -13:
+ try_WhileStatement();
+ break;
+ case 54: // ';'
+ try_VoidStatement();
+ break;
+ case -15:
+ break;
+ default:
+ try_ApplyStatement();
+ }
+ }
+
+ function parse_ApplyStatement()
+ {
+ eventHandler.startNonterminal("ApplyStatement", e0);
+ parse_ExprSimple();
+ shift(54); // ';'
+ eventHandler.endNonterminal("ApplyStatement", e0);
+ }
+
+ function try_ApplyStatement()
+ {
+ try_ExprSimple();
+ shiftT(54); // ';'
+ }
+
+ function parse_AssignStatement()
+ {
+ eventHandler.startNonterminal("AssignStatement", e0);
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shift(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(54); // ';'
+ eventHandler.endNonterminal("AssignStatement", e0);
+ }
+
+ function try_AssignStatement()
+ {
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(28); // S^WS | '(:' | ':='
+ shiftT(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ shiftT(54); // ';'
+ }
+
+ function parse_BlockStatement()
+ {
+ eventHandler.startNonterminal("BlockStatement", e0);
+ shift(281); // '{'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ lookahead1W(280); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statements();
+ shift(287); // '}'
+ eventHandler.endNonterminal("BlockStatement", e0);
+ }
+
+ function try_BlockStatement()
+ {
+ shiftT(281); // '{'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ lookahead1W(280); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statements();
+ shiftT(287); // '}'
+ }
+
+ function parse_BreakStatement()
+ {
+ eventHandler.startNonterminal("BreakStatement", e0);
+ shift(87); // 'break'
+ lookahead1W(62); // S^WS | '(:' | 'loop'
+ shift(179); // 'loop'
+ lookahead1W(29); // S^WS | '(:' | ';'
+ shift(54); // ';'
+ eventHandler.endNonterminal("BreakStatement", e0);
+ }
+
+ function try_BreakStatement()
+ {
+ shiftT(87); // 'break'
+ lookahead1W(62); // S^WS | '(:' | 'loop'
+ shiftT(179); // 'loop'
+ lookahead1W(29); // S^WS | '(:' | ';'
+ shiftT(54); // ';'
+ }
+
+ function parse_ContinueStatement()
+ {
+ eventHandler.startNonterminal("ContinueStatement", e0);
+ shift(103); // 'continue'
+ lookahead1W(62); // S^WS | '(:' | 'loop'
+ shift(179); // 'loop'
+ lookahead1W(29); // S^WS | '(:' | ';'
+ shift(54); // ';'
+ eventHandler.endNonterminal("ContinueStatement", e0);
+ }
+
+ function try_ContinueStatement()
+ {
+ shiftT(103); // 'continue'
+ lookahead1W(62); // S^WS | '(:' | 'loop'
+ shiftT(179); // 'loop'
+ lookahead1W(29); // S^WS | '(:' | ';'
+ shiftT(54); // ';'
+ }
+
+ function parse_ExitStatement()
+ {
+ eventHandler.startNonterminal("ExitStatement", e0);
+ shift(133); // 'exit'
+ lookahead1W(74); // S^WS | '(:' | 'returning'
+ shift(225); // 'returning'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(54); // ';'
+ eventHandler.endNonterminal("ExitStatement", e0);
+ }
+
+ function try_ExitStatement()
+ {
+ shiftT(133); // 'exit'
+ lookahead1W(74); // S^WS | '(:' | 'returning'
+ shiftT(225); // 'returning'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ shiftT(54); // ';'
+ }
+
+ function parse_FLWORStatement()
+ {
+ eventHandler.startNonterminal("FLWORStatement", e0);
+ parse_InitialClause();
+ for (;;)
+ {
+ lookahead1W(195); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' |
+ if (l1 == 224) // 'return'
+ {
+ break;
+ }
+ whitespace();
+ parse_IntermediateClause();
+ }
+ whitespace();
+ parse_ReturnStatement();
+ eventHandler.endNonterminal("FLWORStatement", e0);
+ }
+
+ function try_FLWORStatement()
+ {
+ try_InitialClause();
+ for (;;)
+ {
+ lookahead1W(195); // S^WS | '(:' | 'count' | 'for' | 'group' | 'let' | 'order' | 'return' | 'stable' |
+ if (l1 == 224) // 'return'
+ {
+ break;
+ }
+ try_IntermediateClause();
+ }
+ try_ReturnStatement();
+ }
+
+ function parse_ReturnStatement()
+ {
+ eventHandler.startNonterminal("ReturnStatement", e0);
+ shift(224); // 'return'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("ReturnStatement", e0);
+ }
+
+ function try_ReturnStatement()
+ {
+ shiftT(224); // 'return'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ }
+
+ function parse_IfStatement()
+ {
+ eventHandler.startNonterminal("IfStatement", e0);
+ shift(154); // 'if'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(38); // ')'
+ lookahead1W(80); // S^WS | '(:' | 'then'
+ shift(250); // 'then'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ lookahead1W(51); // S^WS | '(:' | 'else'
+ shift(123); // 'else'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("IfStatement", e0);
+ }
+
+ function try_IfStatement()
+ {
+ shiftT(154); // 'if'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(38); // ')'
+ lookahead1W(80); // S^WS | '(:' | 'then'
+ shiftT(250); // 'then'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ lookahead1W(51); // S^WS | '(:' | 'else'
+ shiftT(123); // 'else'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ }
+
+ function parse_SwitchStatement()
+ {
+ eventHandler.startNonterminal("SwitchStatement", e0);
+ shift(248); // 'switch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(38); // ')'
+ for (;;)
+ {
+ lookahead1W(38); // S^WS | '(:' | 'case'
+ whitespace();
+ parse_SwitchCaseStatement();
+ lookahead1W(117); // S^WS | '(:' | 'case' | 'default'
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shift(110); // 'default'
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shift(224); // 'return'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("SwitchStatement", e0);
+ }
+
+ function try_SwitchStatement()
+ {
+ shiftT(248); // 'switch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(38); // ')'
+ for (;;)
+ {
+ lookahead1W(38); // S^WS | '(:' | 'case'
+ try_SwitchCaseStatement();
+ lookahead1W(117); // S^WS | '(:' | 'case' | 'default'
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(110); // 'default'
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shiftT(224); // 'return'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ }
+
+ function parse_SwitchCaseStatement()
+ {
+ eventHandler.startNonterminal("SwitchCaseStatement", e0);
+ for (;;)
+ {
+ shift(89); // 'case'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_SwitchCaseOperand();
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shift(224); // 'return'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("SwitchCaseStatement", e0);
+ }
+
+ function try_SwitchCaseStatement()
+ {
+ for (;;)
+ {
+ shiftT(89); // 'case'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_SwitchCaseOperand();
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(224); // 'return'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ }
+
+ function parse_TryCatchStatement()
+ {
+ eventHandler.startNonterminal("TryCatchStatement", e0);
+ shift(256); // 'try'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ whitespace();
+ parse_BlockStatement();
+ for (;;)
+ {
+ lookahead1W(39); // S^WS | '(:' | 'catch'
+ shift(92); // 'catch'
+ lookahead1W(248); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_CatchErrorList();
+ whitespace();
+ parse_BlockStatement();
+ lookahead1W(283); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 92: // 'catch'
+ lookahead2W(255); // Wildcard | EQName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 2652 // 'catch' Wildcard
+ && lk != 3164 // 'catch' EQName^Token
+ && lk != 36444 // 'catch' 'after'
+ && lk != 37468 // 'catch' 'allowing'
+ && lk != 37980 // 'catch' 'ancestor'
+ && lk != 38492 // 'catch' 'ancestor-or-self'
+ && lk != 39004 // 'catch' 'and'
+ && lk != 40028 // 'catch' 'append'
+ && lk != 40540 // 'catch' 'array'
+ && lk != 41052 // 'catch' 'as'
+ && lk != 41564 // 'catch' 'ascending'
+ && lk != 42076 // 'catch' 'at'
+ && lk != 42588 // 'catch' 'attribute'
+ && lk != 43100 // 'catch' 'base-uri'
+ && lk != 43612 // 'catch' 'before'
+ && lk != 44124 // 'catch' 'boundary-space'
+ && lk != 44636 // 'catch' 'break'
+ && lk != 45660 // 'catch' 'case'
+ && lk != 46172 // 'catch' 'cast'
+ && lk != 46684 // 'catch' 'castable'
+ && lk != 47196 // 'catch' 'catch'
+ && lk != 48220 // 'catch' 'child'
+ && lk != 48732 // 'catch' 'collation'
+ && lk != 49756 // 'catch' 'comment'
+ && lk != 50268 // 'catch' 'constraint'
+ && lk != 50780 // 'catch' 'construction'
+ && lk != 52316 // 'catch' 'context'
+ && lk != 52828 // 'catch' 'continue'
+ && lk != 53340 // 'catch' 'copy'
+ && lk != 53852 // 'catch' 'copy-namespaces'
+ && lk != 54364 // 'catch' 'count'
+ && lk != 54876 // 'catch' 'decimal-format'
+ && lk != 55900 // 'catch' 'declare'
+ && lk != 56412 // 'catch' 'default'
+ && lk != 56924 // 'catch' 'delete'
+ && lk != 57436 // 'catch' 'descendant'
+ && lk != 57948 // 'catch' 'descendant-or-self'
+ && lk != 58460 // 'catch' 'descending'
+ && lk != 61020 // 'catch' 'div'
+ && lk != 61532 // 'catch' 'document'
+ && lk != 62044 // 'catch' 'document-node'
+ && lk != 62556 // 'catch' 'element'
+ && lk != 63068 // 'catch' 'else'
+ && lk != 63580 // 'catch' 'empty'
+ && lk != 64092 // 'catch' 'empty-sequence'
+ && lk != 64604 // 'catch' 'encoding'
+ && lk != 65116 // 'catch' 'end'
+ && lk != 66140 // 'catch' 'eq'
+ && lk != 66652 // 'catch' 'every'
+ && lk != 67676 // 'catch' 'except'
+ && lk != 68188 // 'catch' 'exit'
+ && lk != 68700 // 'catch' 'external'
+ && lk != 69212 // 'catch' 'false'
+ && lk != 69724 // 'catch' 'first'
+ && lk != 70236 // 'catch' 'following'
+ && lk != 70748 // 'catch' 'following-sibling'
+ && lk != 71260 // 'catch' 'for'
+ && lk != 72796 // 'catch' 'from'
+ && lk != 73308 // 'catch' 'ft-option'
+ && lk != 75356 // 'catch' 'function'
+ && lk != 75868 // 'catch' 'ge'
+ && lk != 76892 // 'catch' 'group'
+ && lk != 77916 // 'catch' 'gt'
+ && lk != 78428 // 'catch' 'idiv'
+ && lk != 78940 // 'catch' 'if'
+ && lk != 79452 // 'catch' 'import'
+ && lk != 79964 // 'catch' 'in'
+ && lk != 80476 // 'catch' 'index'
+ && lk != 82524 // 'catch' 'insert'
+ && lk != 83036 // 'catch' 'instance'
+ && lk != 83548 // 'catch' 'integrity'
+ && lk != 84060 // 'catch' 'intersect'
+ && lk != 84572 // 'catch' 'into'
+ && lk != 85084 // 'catch' 'is'
+ && lk != 85596 // 'catch' 'item'
+ && lk != 86108 // 'catch' 'json'
+ && lk != 86620 // 'catch' 'json-item'
+ && lk != 87132 // 'catch' 'jsoniq'
+ && lk != 88668 // 'catch' 'last'
+ && lk != 89180 // 'catch' 'lax'
+ && lk != 89692 // 'catch' 'le'
+ && lk != 90716 // 'catch' 'let'
+ && lk != 91740 // 'catch' 'loop'
+ && lk != 92764 // 'catch' 'lt'
+ && lk != 93788 // 'catch' 'mod'
+ && lk != 94300 // 'catch' 'modify'
+ && lk != 94812 // 'catch' 'module'
+ && lk != 95836 // 'catch' 'namespace'
+ && lk != 96348 // 'catch' 'namespace-node'
+ && lk != 96860 // 'catch' 'ne'
+ && lk != 99420 // 'catch' 'node'
+ && lk != 99932 // 'catch' 'nodes'
+ && lk != 100956 // 'catch' 'null'
+ && lk != 101468 // 'catch' 'object'
+ && lk != 103516 // 'catch' 'only'
+ && lk != 104028 // 'catch' 'option'
+ && lk != 104540 // 'catch' 'or'
+ && lk != 105052 // 'catch' 'order'
+ && lk != 105564 // 'catch' 'ordered'
+ && lk != 106076 // 'catch' 'ordering'
+ && lk != 107612 // 'catch' 'parent'
+ && lk != 110684 // 'catch' 'preceding'
+ && lk != 111196 // 'catch' 'preceding-sibling'
+ && lk != 112732 // 'catch' 'processing-instruction'
+ && lk != 113756 // 'catch' 'rename'
+ && lk != 114268 // 'catch' 'replace'
+ && lk != 114780 // 'catch' 'return'
+ && lk != 115292 // 'catch' 'returning'
+ && lk != 115804 // 'catch' 'revalidation'
+ && lk != 116828 // 'catch' 'satisfies'
+ && lk != 117340 // 'catch' 'schema'
+ && lk != 117852 // 'catch' 'schema-attribute'
+ && lk != 118364 // 'catch' 'schema-element'
+ && lk != 118876 // 'catch' 'score'
+ && lk != 119388 // 'catch' 'select'
+ && lk != 119900 // 'catch' 'self'
+ && lk != 122460 // 'catch' 'sliding'
+ && lk != 122972 // 'catch' 'some'
+ && lk != 123484 // 'catch' 'stable'
+ && lk != 123996 // 'catch' 'start'
+ && lk != 125532 // 'catch' 'strict'
+ && lk != 126556 // 'catch' 'structured-item'
+ && lk != 127068 // 'catch' 'switch'
+ && lk != 127580 // 'catch' 'text'
+ && lk != 129628 // 'catch' 'to'
+ && lk != 130140 // 'catch' 'treat'
+ && lk != 130652 // 'catch' 'true'
+ && lk != 131164 // 'catch' 'try'
+ && lk != 131676 // 'catch' 'tumbling'
+ && lk != 132188 // 'catch' 'type'
+ && lk != 132700 // 'catch' 'typeswitch'
+ && lk != 133212 // 'catch' 'union'
+ && lk != 134236 // 'catch' 'unordered'
+ && lk != 134748 // 'catch' 'updating'
+ && lk != 136284 // 'catch' 'validate'
+ && lk != 136796 // 'catch' 'value'
+ && lk != 137308 // 'catch' 'variable'
+ && lk != 137820 // 'catch' 'version'
+ && lk != 139356 // 'catch' 'where'
+ && lk != 139868 // 'catch' 'while'
+ && lk != 141404) // 'catch' 'with'
+ {
+ break;
+ }
+ }
+ eventHandler.endNonterminal("TryCatchStatement", e0);
+ }
+
+ function try_TryCatchStatement()
+ {
+ shiftT(256); // 'try'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ try_BlockStatement();
+ for (;;)
+ {
+ lookahead1W(39); // S^WS | '(:' | 'catch'
+ shiftT(92); // 'catch'
+ lookahead1W(248); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_CatchErrorList();
+ try_BlockStatement();
+ lookahead1W(283); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 92: // 'catch'
+ lookahead2W(255); // Wildcard | EQName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 2652 // 'catch' Wildcard
+ && lk != 3164 // 'catch' EQName^Token
+ && lk != 36444 // 'catch' 'after'
+ && lk != 37468 // 'catch' 'allowing'
+ && lk != 37980 // 'catch' 'ancestor'
+ && lk != 38492 // 'catch' 'ancestor-or-self'
+ && lk != 39004 // 'catch' 'and'
+ && lk != 40028 // 'catch' 'append'
+ && lk != 40540 // 'catch' 'array'
+ && lk != 41052 // 'catch' 'as'
+ && lk != 41564 // 'catch' 'ascending'
+ && lk != 42076 // 'catch' 'at'
+ && lk != 42588 // 'catch' 'attribute'
+ && lk != 43100 // 'catch' 'base-uri'
+ && lk != 43612 // 'catch' 'before'
+ && lk != 44124 // 'catch' 'boundary-space'
+ && lk != 44636 // 'catch' 'break'
+ && lk != 45660 // 'catch' 'case'
+ && lk != 46172 // 'catch' 'cast'
+ && lk != 46684 // 'catch' 'castable'
+ && lk != 47196 // 'catch' 'catch'
+ && lk != 48220 // 'catch' 'child'
+ && lk != 48732 // 'catch' 'collation'
+ && lk != 49756 // 'catch' 'comment'
+ && lk != 50268 // 'catch' 'constraint'
+ && lk != 50780 // 'catch' 'construction'
+ && lk != 52316 // 'catch' 'context'
+ && lk != 52828 // 'catch' 'continue'
+ && lk != 53340 // 'catch' 'copy'
+ && lk != 53852 // 'catch' 'copy-namespaces'
+ && lk != 54364 // 'catch' 'count'
+ && lk != 54876 // 'catch' 'decimal-format'
+ && lk != 55900 // 'catch' 'declare'
+ && lk != 56412 // 'catch' 'default'
+ && lk != 56924 // 'catch' 'delete'
+ && lk != 57436 // 'catch' 'descendant'
+ && lk != 57948 // 'catch' 'descendant-or-self'
+ && lk != 58460 // 'catch' 'descending'
+ && lk != 61020 // 'catch' 'div'
+ && lk != 61532 // 'catch' 'document'
+ && lk != 62044 // 'catch' 'document-node'
+ && lk != 62556 // 'catch' 'element'
+ && lk != 63068 // 'catch' 'else'
+ && lk != 63580 // 'catch' 'empty'
+ && lk != 64092 // 'catch' 'empty-sequence'
+ && lk != 64604 // 'catch' 'encoding'
+ && lk != 65116 // 'catch' 'end'
+ && lk != 66140 // 'catch' 'eq'
+ && lk != 66652 // 'catch' 'every'
+ && lk != 67676 // 'catch' 'except'
+ && lk != 68188 // 'catch' 'exit'
+ && lk != 68700 // 'catch' 'external'
+ && lk != 69212 // 'catch' 'false'
+ && lk != 69724 // 'catch' 'first'
+ && lk != 70236 // 'catch' 'following'
+ && lk != 70748 // 'catch' 'following-sibling'
+ && lk != 71260 // 'catch' 'for'
+ && lk != 72796 // 'catch' 'from'
+ && lk != 73308 // 'catch' 'ft-option'
+ && lk != 75356 // 'catch' 'function'
+ && lk != 75868 // 'catch' 'ge'
+ && lk != 76892 // 'catch' 'group'
+ && lk != 77916 // 'catch' 'gt'
+ && lk != 78428 // 'catch' 'idiv'
+ && lk != 78940 // 'catch' 'if'
+ && lk != 79452 // 'catch' 'import'
+ && lk != 79964 // 'catch' 'in'
+ && lk != 80476 // 'catch' 'index'
+ && lk != 82524 // 'catch' 'insert'
+ && lk != 83036 // 'catch' 'instance'
+ && lk != 83548 // 'catch' 'integrity'
+ && lk != 84060 // 'catch' 'intersect'
+ && lk != 84572 // 'catch' 'into'
+ && lk != 85084 // 'catch' 'is'
+ && lk != 85596 // 'catch' 'item'
+ && lk != 86108 // 'catch' 'json'
+ && lk != 86620 // 'catch' 'json-item'
+ && lk != 87132 // 'catch' 'jsoniq'
+ && lk != 88668 // 'catch' 'last'
+ && lk != 89180 // 'catch' 'lax'
+ && lk != 89692 // 'catch' 'le'
+ && lk != 90716 // 'catch' 'let'
+ && lk != 91740 // 'catch' 'loop'
+ && lk != 92764 // 'catch' 'lt'
+ && lk != 93788 // 'catch' 'mod'
+ && lk != 94300 // 'catch' 'modify'
+ && lk != 94812 // 'catch' 'module'
+ && lk != 95836 // 'catch' 'namespace'
+ && lk != 96348 // 'catch' 'namespace-node'
+ && lk != 96860 // 'catch' 'ne'
+ && lk != 99420 // 'catch' 'node'
+ && lk != 99932 // 'catch' 'nodes'
+ && lk != 100956 // 'catch' 'null'
+ && lk != 101468 // 'catch' 'object'
+ && lk != 103516 // 'catch' 'only'
+ && lk != 104028 // 'catch' 'option'
+ && lk != 104540 // 'catch' 'or'
+ && lk != 105052 // 'catch' 'order'
+ && lk != 105564 // 'catch' 'ordered'
+ && lk != 106076 // 'catch' 'ordering'
+ && lk != 107612 // 'catch' 'parent'
+ && lk != 110684 // 'catch' 'preceding'
+ && lk != 111196 // 'catch' 'preceding-sibling'
+ && lk != 112732 // 'catch' 'processing-instruction'
+ && lk != 113756 // 'catch' 'rename'
+ && lk != 114268 // 'catch' 'replace'
+ && lk != 114780 // 'catch' 'return'
+ && lk != 115292 // 'catch' 'returning'
+ && lk != 115804 // 'catch' 'revalidation'
+ && lk != 116828 // 'catch' 'satisfies'
+ && lk != 117340 // 'catch' 'schema'
+ && lk != 117852 // 'catch' 'schema-attribute'
+ && lk != 118364 // 'catch' 'schema-element'
+ && lk != 118876 // 'catch' 'score'
+ && lk != 119388 // 'catch' 'select'
+ && lk != 119900 // 'catch' 'self'
+ && lk != 122460 // 'catch' 'sliding'
+ && lk != 122972 // 'catch' 'some'
+ && lk != 123484 // 'catch' 'stable'
+ && lk != 123996 // 'catch' 'start'
+ && lk != 125532 // 'catch' 'strict'
+ && lk != 126556 // 'catch' 'structured-item'
+ && lk != 127068 // 'catch' 'switch'
+ && lk != 127580 // 'catch' 'text'
+ && lk != 129628 // 'catch' 'to'
+ && lk != 130140 // 'catch' 'treat'
+ && lk != 130652 // 'catch' 'true'
+ && lk != 131164 // 'catch' 'try'
+ && lk != 131676 // 'catch' 'tumbling'
+ && lk != 132188 // 'catch' 'type'
+ && lk != 132700 // 'catch' 'typeswitch'
+ && lk != 133212 // 'catch' 'union'
+ && lk != 134236 // 'catch' 'unordered'
+ && lk != 134748 // 'catch' 'updating'
+ && lk != 136284 // 'catch' 'validate'
+ && lk != 136796 // 'catch' 'value'
+ && lk != 137308 // 'catch' 'variable'
+ && lk != 137820 // 'catch' 'version'
+ && lk != 139356 // 'catch' 'where'
+ && lk != 139868 // 'catch' 'while'
+ && lk != 141404) // 'catch' 'with'
+ {
+ break;
+ }
+ }
+ }
+
+ function parse_TypeswitchStatement()
+ {
+ eventHandler.startNonterminal("TypeswitchStatement", e0);
+ shift(259); // 'typeswitch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(38); // ')'
+ for (;;)
+ {
+ lookahead1W(38); // S^WS | '(:' | 'case'
+ whitespace();
+ parse_CaseStatement();
+ lookahead1W(117); // S^WS | '(:' | 'case' | 'default'
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shift(110); // 'default'
+ lookahead1W(99); // S^WS | '$' | '(:' | 'return'
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ }
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shift(224); // 'return'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("TypeswitchStatement", e0);
+ }
+
+ function try_TypeswitchStatement()
+ {
+ shiftT(259); // 'typeswitch'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(38); // ')'
+ for (;;)
+ {
+ lookahead1W(38); // S^WS | '(:' | 'case'
+ try_CaseStatement();
+ lookahead1W(117); // S^WS | '(:' | 'case' | 'default'
+ if (l1 != 89) // 'case'
+ {
+ break;
+ }
+ }
+ shiftT(110); // 'default'
+ lookahead1W(99); // S^WS | '$' | '(:' | 'return'
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shiftT(224); // 'return'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ }
+
+ function parse_CaseStatement()
+ {
+ eventHandler.startNonterminal("CaseStatement", e0);
+ shift(89); // 'case'
+ lookahead1W(257); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shift(80); // 'as'
+ }
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shift(224); // 'return'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("CaseStatement", e0);
+ }
+
+ function try_CaseStatement()
+ {
+ shiftT(89); // 'case'
+ lookahead1W(257); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(33); // S^WS | '(:' | 'as'
+ shiftT(80); // 'as'
+ }
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SequenceType();
+ lookahead1W(73); // S^WS | '(:' | 'return'
+ shiftT(224); // 'return'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ }
+
+ function parse_VarDeclStatement()
+ {
+ eventHandler.startNonterminal("VarDeclStatement", e0);
+ for (;;)
+ {
+ lookahead1W(102); // S^WS | '%' | '(:' | 'variable'
+ if (l1 != 33) // '%'
+ {
+ break;
+ }
+ whitespace();
+ parse_Annotation();
+ }
+ shift(268); // 'variable'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(172); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(155); // S^WS | '(:' | ',' | ':=' | ';'
+ if (l1 == 53) // ':='
+ {
+ shift(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shift(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ lookahead1W(172); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_TypeDeclaration();
+ }
+ lookahead1W(155); // S^WS | '(:' | ',' | ':=' | ';'
+ if (l1 == 53) // ':='
+ {
+ shift(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ }
+ shift(54); // ';'
+ eventHandler.endNonterminal("VarDeclStatement", e0);
+ }
+
+ function try_VarDeclStatement()
+ {
+ for (;;)
+ {
+ lookahead1W(102); // S^WS | '%' | '(:' | 'variable'
+ if (l1 != 33) // '%'
+ {
+ break;
+ }
+ try_Annotation();
+ }
+ shiftT(268); // 'variable'
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(172); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(155); // S^WS | '(:' | ',' | ':=' | ';'
+ if (l1 == 53) // ':='
+ {
+ shiftT(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ shiftT(31); // '$'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ lookahead1W(172); // S^WS | '(:' | ',' | ':=' | ';' | 'as'
+ if (l1 == 80) // 'as'
+ {
+ try_TypeDeclaration();
+ }
+ lookahead1W(155); // S^WS | '(:' | ',' | ':=' | ';'
+ if (l1 == 53) // ':='
+ {
+ shiftT(53); // ':='
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ }
+ shiftT(54); // ';'
+ }
+
+ function parse_WhileStatement()
+ {
+ eventHandler.startNonterminal("WhileStatement", e0);
+ shift(273); // 'while'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(38); // ')'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("WhileStatement", e0);
+ }
+
+ function try_WhileStatement()
+ {
+ shiftT(273); // 'while'
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shiftT(35); // '('
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(38); // ')'
+ lookahead1W(270); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Statement();
+ }
+
+ function parse_VoidStatement()
+ {
+ eventHandler.startNonterminal("VoidStatement", e0);
+ shift(54); // ';'
+ eventHandler.endNonterminal("VoidStatement", e0);
+ }
+
+ function try_VoidStatement()
+ {
+ shiftT(54); // ';'
+ }
+
+ function parse_ExprSingle()
+ {
+ eventHandler.startNonterminal("ExprSingle", e0);
+ switch (l1)
+ {
+ case 139: // 'for'
+ lookahead2W(179); // S^WS | '#' | '$' | '(' | '(:' | 'sliding' | 'tumbling'
+ break;
+ case 177: // 'let'
+ lookahead2W(166); // S^WS | '#' | '$' | '(' | '(:' | 'score'
+ break;
+ case 256: // 'try'
+ lookahead2W(148); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 154: // 'if'
+ case 248: // 'switch'
+ case 259: // 'typeswitch'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16011: // 'for' '$'
+ case 16049: // 'let' '$'
+ case 118961: // 'let' 'score'
+ case 122507: // 'for' 'sliding'
+ case 131723: // 'for' 'tumbling'
+ parse_FLWORExpr();
+ break;
+ case 18074: // 'if' '('
+ parse_IfExpr();
+ break;
+ case 18168: // 'switch' '('
+ parse_SwitchExpr();
+ break;
+ case 144128: // 'try' '{'
+ parse_TryCatchExpr();
+ break;
+ case 18179: // 'typeswitch' '('
+ parse_TypeswitchExpr();
+ break;
+ default:
+ parse_ExprSimple();
+ }
+ eventHandler.endNonterminal("ExprSingle", e0);
+ }
+
+ function try_ExprSingle()
+ {
+ switch (l1)
+ {
+ case 139: // 'for'
+ lookahead2W(179); // S^WS | '#' | '$' | '(' | '(:' | 'sliding' | 'tumbling'
+ break;
+ case 177: // 'let'
+ lookahead2W(166); // S^WS | '#' | '$' | '(' | '(:' | 'score'
+ break;
+ case 256: // 'try'
+ lookahead2W(148); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 154: // 'if'
+ case 248: // 'switch'
+ case 259: // 'typeswitch'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ switch (lk)
+ {
+ case 16011: // 'for' '$'
+ case 16049: // 'let' '$'
+ case 118961: // 'let' 'score'
+ case 122507: // 'for' 'sliding'
+ case 131723: // 'for' 'tumbling'
+ try_FLWORExpr();
+ break;
+ case 18074: // 'if' '('
+ try_IfExpr();
+ break;
+ case 18168: // 'switch' '('
+ try_SwitchExpr();
+ break;
+ case 144128: // 'try' '{'
+ try_TryCatchExpr();
+ break;
+ case 18179: // 'typeswitch' '('
+ try_TypeswitchExpr();
+ break;
+ default:
+ try_ExprSimple();
+ }
+ }
+
+ function parse_ExprSimple()
+ {
+ eventHandler.startNonterminal("ExprSimple", e0);
+ switch (l1)
+ {
+ case 78: // 'append'
+ lookahead2W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 161: // 'insert'
+ lookahead2W(275); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 223: // 'replace'
+ lookahead2W(170); // S^WS | '#' | '(' | '(:' | 'node' | 'value'
+ break;
+ case 111: // 'delete'
+ case 222: // 'rename'
+ lookahead2W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 104: // 'copy'
+ case 130: // 'every'
+ case 240: // 'some'
+ lookahead2W(143); // S^WS | '#' | '$' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 17998 // 'append' '('
+ || lk == 18031 // 'delete' '('
+ || lk == 18081 // 'insert' '('
+ || lk == 18142 // 'rename' '('
+ || lk == 99439 // 'delete' 'node'
+ || lk == 99489 // 'insert' 'node'
+ || lk == 99550 // 'rename' 'node'
+ || lk == 99951 // 'delete' 'nodes'
+ || lk == 100001 // 'insert' 'nodes'
+ || lk == 136927) // 'replace' 'value'
+ {
+ 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
+ {
+ try_OrExpr();
+ 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_InsertExpr();
+ 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_DeleteExpr();
+ lk = -4;
+ }
+ catch (p4A)
+ {
+ 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_RenameExpr();
+ lk = -5;
+ }
+ catch (p5A)
+ {
+ 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_ReplaceExpr();
+ lk = -6;
+ }
+ catch (p6A)
+ {
+ 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_JSONDeleteExpr();
+ lk = -8;
+ }
+ catch (p8A)
+ {
+ 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_JSONInsertExpr();
+ lk = -9;
+ }
+ catch (p9A)
+ {
+ 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_JSONRenameExpr();
+ lk = -10;
+ }
+ catch (p10A)
+ {
+ 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_JSONReplaceExpr();
+ lk = -11;
+ }
+ catch (p11A)
+ {
+ lk = -12;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ 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 16002: // 'every' '$'
+ case 16112: // 'some' '$'
+ parse_QuantifiedExpr();
+ break;
+ case -3:
+ parse_InsertExpr();
+ break;
+ case -4:
+ parse_DeleteExpr();
+ break;
+ case -5:
+ parse_RenameExpr();
+ break;
+ case -6:
+ case 99551: // 'replace' 'node'
+ parse_ReplaceExpr();
+ break;
+ case 15976: // 'copy' '$'
+ parse_TransformExpr();
+ break;
+ case -8:
+ case 3183: // 'delete' EQName^Token
+ case 4207: // 'delete' IntegerLiteral
+ case 4719: // 'delete' DecimalLiteral
+ case 5231: // 'delete' DoubleLiteral
+ case 5743: // 'delete' StringLiteral
+ case 15983: // 'delete' '$'
+ case 16495: // 'delete' '$$'
+ case 17007: // 'delete' '%'
+ case 28271: // 'delete' '<'
+ case 28783: // 'delete' '<!--'
+ case 30831: // 'delete' '<?'
+ case 35439: // 'delete' '['
+ case 36463: // 'delete' 'after'
+ case 37487: // 'delete' 'allowing'
+ case 37999: // 'delete' 'ancestor'
+ case 38511: // 'delete' 'ancestor-or-self'
+ case 39023: // 'delete' 'and'
+ case 40047: // 'delete' 'append'
+ case 40559: // 'delete' 'array'
+ case 41071: // 'delete' 'as'
+ case 41583: // 'delete' 'ascending'
+ case 42095: // 'delete' 'at'
+ case 42607: // 'delete' 'attribute'
+ case 43119: // 'delete' 'base-uri'
+ case 43631: // 'delete' 'before'
+ case 44143: // 'delete' 'boundary-space'
+ case 44655: // 'delete' 'break'
+ case 45679: // 'delete' 'case'
+ case 46191: // 'delete' 'cast'
+ case 46703: // 'delete' 'castable'
+ case 47215: // 'delete' 'catch'
+ case 48239: // 'delete' 'child'
+ case 48751: // 'delete' 'collation'
+ case 49775: // 'delete' 'comment'
+ case 50287: // 'delete' 'constraint'
+ case 50799: // 'delete' 'construction'
+ case 52335: // 'delete' 'context'
+ case 52847: // 'delete' 'continue'
+ case 53359: // 'delete' 'copy'
+ case 53871: // 'delete' 'copy-namespaces'
+ case 54383: // 'delete' 'count'
+ case 54895: // 'delete' 'decimal-format'
+ case 55919: // 'delete' 'declare'
+ case 56431: // 'delete' 'default'
+ case 56943: // 'delete' 'delete'
+ case 57455: // 'delete' 'descendant'
+ case 57967: // 'delete' 'descendant-or-self'
+ case 58479: // 'delete' 'descending'
+ case 61039: // 'delete' 'div'
+ case 61551: // 'delete' 'document'
+ case 62063: // 'delete' 'document-node'
+ case 62575: // 'delete' 'element'
+ case 63087: // 'delete' 'else'
+ case 63599: // 'delete' 'empty'
+ case 64111: // 'delete' 'empty-sequence'
+ case 64623: // 'delete' 'encoding'
+ case 65135: // 'delete' 'end'
+ case 66159: // 'delete' 'eq'
+ case 66671: // 'delete' 'every'
+ case 67695: // 'delete' 'except'
+ case 68207: // 'delete' 'exit'
+ case 68719: // 'delete' 'external'
+ case 69231: // 'delete' 'false'
+ case 69743: // 'delete' 'first'
+ case 70255: // 'delete' 'following'
+ case 70767: // 'delete' 'following-sibling'
+ case 71279: // 'delete' 'for'
+ case 72815: // 'delete' 'from'
+ case 73327: // 'delete' 'ft-option'
+ case 75375: // 'delete' 'function'
+ case 75887: // 'delete' 'ge'
+ case 76911: // 'delete' 'group'
+ case 77935: // 'delete' 'gt'
+ case 78447: // 'delete' 'idiv'
+ case 78959: // 'delete' 'if'
+ case 79471: // 'delete' 'import'
+ case 79983: // 'delete' 'in'
+ case 80495: // 'delete' 'index'
+ case 82543: // 'delete' 'insert'
+ case 83055: // 'delete' 'instance'
+ case 83567: // 'delete' 'integrity'
+ case 84079: // 'delete' 'intersect'
+ case 84591: // 'delete' 'into'
+ case 85103: // 'delete' 'is'
+ case 85615: // 'delete' 'item'
+ case 86127: // 'delete' 'json'
+ case 86639: // 'delete' 'json-item'
+ case 87151: // 'delete' 'jsoniq'
+ case 88687: // 'delete' 'last'
+ case 89199: // 'delete' 'lax'
+ case 89711: // 'delete' 'le'
+ case 90735: // 'delete' 'let'
+ case 91759: // 'delete' 'loop'
+ case 92783: // 'delete' 'lt'
+ case 93807: // 'delete' 'mod'
+ case 94319: // 'delete' 'modify'
+ case 94831: // 'delete' 'module'
+ case 95855: // 'delete' 'namespace'
+ case 96367: // 'delete' 'namespace-node'
+ case 96879: // 'delete' 'ne'
+ case 100975: // 'delete' 'null'
+ case 101487: // 'delete' 'object'
+ case 103535: // 'delete' 'only'
+ case 104047: // 'delete' 'option'
+ case 104559: // 'delete' 'or'
+ case 105071: // 'delete' 'order'
+ case 105583: // 'delete' 'ordered'
+ case 106095: // 'delete' 'ordering'
+ case 107631: // 'delete' 'parent'
+ case 110703: // 'delete' 'preceding'
+ case 111215: // 'delete' 'preceding-sibling'
+ case 112751: // 'delete' 'processing-instruction'
+ case 113775: // 'delete' 'rename'
+ case 114287: // 'delete' 'replace'
+ case 114799: // 'delete' 'return'
+ case 115311: // 'delete' 'returning'
+ case 115823: // 'delete' 'revalidation'
+ case 116847: // 'delete' 'satisfies'
+ case 117359: // 'delete' 'schema'
+ case 117871: // 'delete' 'schema-attribute'
+ case 118383: // 'delete' 'schema-element'
+ case 118895: // 'delete' 'score'
+ case 119407: // 'delete' 'select'
+ case 119919: // 'delete' 'self'
+ case 122479: // 'delete' 'sliding'
+ case 122991: // 'delete' 'some'
+ case 123503: // 'delete' 'stable'
+ case 124015: // 'delete' 'start'
+ case 125551: // 'delete' 'strict'
+ case 126575: // 'delete' 'structured-item'
+ case 127087: // 'delete' 'switch'
+ case 127599: // 'delete' 'text'
+ case 129647: // 'delete' 'to'
+ case 130159: // 'delete' 'treat'
+ case 130671: // 'delete' 'true'
+ case 131183: // 'delete' 'try'
+ case 131695: // 'delete' 'tumbling'
+ case 132207: // 'delete' 'type'
+ case 132719: // 'delete' 'typeswitch'
+ case 133231: // 'delete' 'union'
+ case 134255: // 'delete' 'unordered'
+ case 134767: // 'delete' 'updating'
+ case 136303: // 'delete' 'validate'
+ case 136815: // 'delete' 'value'
+ case 137327: // 'delete' 'variable'
+ case 137839: // 'delete' 'version'
+ case 139375: // 'delete' 'where'
+ case 139887: // 'delete' 'while'
+ case 141423: // 'delete' 'with'
+ case 143983: // 'delete' '{'
+ case 145007: // 'delete' '{|'
+ parse_JSONDeleteExpr();
+ break;
+ case -9:
+ case 3233: // 'insert' EQName^Token
+ case 4257: // 'insert' IntegerLiteral
+ case 4769: // 'insert' DecimalLiteral
+ case 5281: // 'insert' DoubleLiteral
+ case 5793: // 'insert' StringLiteral
+ case 9889: // 'insert' NCName^Token
+ case 16033: // 'insert' '$'
+ case 16545: // 'insert' '$$'
+ case 17057: // 'insert' '%'
+ case 18593: // 'insert' '(#'
+ case 21153: // 'insert' '+'
+ case 22177: // 'insert' '-'
+ case 24225: // 'insert' '/'
+ case 24737: // 'insert' '//'
+ case 28321: // 'insert' '<'
+ case 28833: // 'insert' '<!--'
+ case 30881: // 'insert' '<?'
+ case 35489: // 'insert' '['
+ case 36513: // 'insert' 'after'
+ case 37537: // 'insert' 'allowing'
+ case 38049: // 'insert' 'ancestor'
+ case 38561: // 'insert' 'ancestor-or-self'
+ case 39073: // 'insert' 'and'
+ case 40097: // 'insert' 'append'
+ case 40609: // 'insert' 'array'
+ case 41121: // 'insert' 'as'
+ case 41633: // 'insert' 'ascending'
+ case 42145: // 'insert' 'at'
+ case 42657: // 'insert' 'attribute'
+ case 43169: // 'insert' 'base-uri'
+ case 43681: // 'insert' 'before'
+ case 44193: // 'insert' 'boundary-space'
+ case 44705: // 'insert' 'break'
+ case 45729: // 'insert' 'case'
+ case 46241: // 'insert' 'cast'
+ case 46753: // 'insert' 'castable'
+ case 47265: // 'insert' 'catch'
+ case 48289: // 'insert' 'child'
+ case 48801: // 'insert' 'collation'
+ case 49825: // 'insert' 'comment'
+ case 50337: // 'insert' 'constraint'
+ case 50849: // 'insert' 'construction'
+ case 52385: // 'insert' 'context'
+ case 52897: // 'insert' 'continue'
+ case 53409: // 'insert' 'copy'
+ case 53921: // 'insert' 'copy-namespaces'
+ case 54433: // 'insert' 'count'
+ case 54945: // 'insert' 'decimal-format'
+ case 55969: // 'insert' 'declare'
+ case 56481: // 'insert' 'default'
+ case 56993: // 'insert' 'delete'
+ case 57505: // 'insert' 'descendant'
+ case 58017: // 'insert' 'descendant-or-self'
+ case 58529: // 'insert' 'descending'
+ case 61089: // 'insert' 'div'
+ case 61601: // 'insert' 'document'
+ case 62113: // 'insert' 'document-node'
+ case 62625: // 'insert' 'element'
+ case 63137: // 'insert' 'else'
+ case 63649: // 'insert' 'empty'
+ case 64161: // 'insert' 'empty-sequence'
+ case 64673: // 'insert' 'encoding'
+ case 65185: // 'insert' 'end'
+ case 66209: // 'insert' 'eq'
+ case 66721: // 'insert' 'every'
+ case 67745: // 'insert' 'except'
+ case 68257: // 'insert' 'exit'
+ case 68769: // 'insert' 'external'
+ case 69281: // 'insert' 'false'
+ case 69793: // 'insert' 'first'
+ case 70305: // 'insert' 'following'
+ case 70817: // 'insert' 'following-sibling'
+ case 71329: // 'insert' 'for'
+ case 72865: // 'insert' 'from'
+ case 73377: // 'insert' 'ft-option'
+ case 75425: // 'insert' 'function'
+ case 75937: // 'insert' 'ge'
+ case 76961: // 'insert' 'group'
+ case 77985: // 'insert' 'gt'
+ case 78497: // 'insert' 'idiv'
+ case 79009: // 'insert' 'if'
+ case 79521: // 'insert' 'import'
+ case 80033: // 'insert' 'in'
+ case 80545: // 'insert' 'index'
+ case 82593: // 'insert' 'insert'
+ case 83105: // 'insert' 'instance'
+ case 83617: // 'insert' 'integrity'
+ case 84129: // 'insert' 'intersect'
+ case 84641: // 'insert' 'into'
+ case 85153: // 'insert' 'is'
+ case 85665: // 'insert' 'item'
+ case 86177: // 'insert' 'json'
+ case 86689: // 'insert' 'json-item'
+ case 87201: // 'insert' 'jsoniq'
+ case 88737: // 'insert' 'last'
+ case 89249: // 'insert' 'lax'
+ case 89761: // 'insert' 'le'
+ case 90785: // 'insert' 'let'
+ case 91809: // 'insert' 'loop'
+ case 92833: // 'insert' 'lt'
+ case 93857: // 'insert' 'mod'
+ case 94369: // 'insert' 'modify'
+ case 94881: // 'insert' 'module'
+ case 95905: // 'insert' 'namespace'
+ case 96417: // 'insert' 'namespace-node'
+ case 96929: // 'insert' 'ne'
+ case 100513: // 'insert' 'not'
+ case 101025: // 'insert' 'null'
+ case 101537: // 'insert' 'object'
+ case 103585: // 'insert' 'only'
+ case 104097: // 'insert' 'option'
+ case 104609: // 'insert' 'or'
+ case 105121: // 'insert' 'order'
+ case 105633: // 'insert' 'ordered'
+ case 106145: // 'insert' 'ordering'
+ case 107681: // 'insert' 'parent'
+ case 110753: // 'insert' 'preceding'
+ case 111265: // 'insert' 'preceding-sibling'
+ case 112801: // 'insert' 'processing-instruction'
+ case 113825: // 'insert' 'rename'
+ case 114337: // 'insert' 'replace'
+ case 114849: // 'insert' 'return'
+ case 115361: // 'insert' 'returning'
+ case 115873: // 'insert' 'revalidation'
+ case 116897: // 'insert' 'satisfies'
+ case 117409: // 'insert' 'schema'
+ case 117921: // 'insert' 'schema-attribute'
+ case 118433: // 'insert' 'schema-element'
+ case 118945: // 'insert' 'score'
+ case 119457: // 'insert' 'select'
+ case 119969: // 'insert' 'self'
+ case 122529: // 'insert' 'sliding'
+ case 123041: // 'insert' 'some'
+ case 123553: // 'insert' 'stable'
+ case 124065: // 'insert' 'start'
+ case 125601: // 'insert' 'strict'
+ case 126625: // 'insert' 'structured-item'
+ case 127137: // 'insert' 'switch'
+ case 127649: // 'insert' 'text'
+ case 129697: // 'insert' 'to'
+ case 130209: // 'insert' 'treat'
+ case 130721: // 'insert' 'true'
+ case 131233: // 'insert' 'try'
+ case 131745: // 'insert' 'tumbling'
+ case 132257: // 'insert' 'type'
+ case 132769: // 'insert' 'typeswitch'
+ case 133281: // 'insert' 'union'
+ case 134305: // 'insert' 'unordered'
+ case 134817: // 'insert' 'updating'
+ case 136353: // 'insert' 'validate'
+ case 136865: // 'insert' 'value'
+ case 137377: // 'insert' 'variable'
+ case 137889: // 'insert' 'version'
+ case 139425: // 'insert' 'where'
+ case 139937: // 'insert' 'while'
+ case 141473: // 'insert' 'with'
+ case 144033: // 'insert' '{'
+ case 145057: // 'insert' '{|'
+ parse_JSONInsertExpr();
+ break;
+ case -10:
+ case 3294: // 'rename' EQName^Token
+ case 4318: // 'rename' IntegerLiteral
+ case 4830: // 'rename' DecimalLiteral
+ case 5342: // 'rename' DoubleLiteral
+ case 5854: // 'rename' StringLiteral
+ case 16094: // 'rename' '$'
+ case 16606: // 'rename' '$$'
+ case 17118: // 'rename' '%'
+ case 28382: // 'rename' '<'
+ case 28894: // 'rename' '<!--'
+ case 30942: // 'rename' '<?'
+ case 35550: // 'rename' '['
+ case 36574: // 'rename' 'after'
+ case 37598: // 'rename' 'allowing'
+ case 38110: // 'rename' 'ancestor'
+ case 38622: // 'rename' 'ancestor-or-self'
+ case 39134: // 'rename' 'and'
+ case 40158: // 'rename' 'append'
+ case 40670: // 'rename' 'array'
+ case 41182: // 'rename' 'as'
+ case 41694: // 'rename' 'ascending'
+ case 42206: // 'rename' 'at'
+ case 42718: // 'rename' 'attribute'
+ case 43230: // 'rename' 'base-uri'
+ case 43742: // 'rename' 'before'
+ case 44254: // 'rename' 'boundary-space'
+ case 44766: // 'rename' 'break'
+ case 45790: // 'rename' 'case'
+ case 46302: // 'rename' 'cast'
+ case 46814: // 'rename' 'castable'
+ case 47326: // 'rename' 'catch'
+ case 48350: // 'rename' 'child'
+ case 48862: // 'rename' 'collation'
+ case 49886: // 'rename' 'comment'
+ case 50398: // 'rename' 'constraint'
+ case 50910: // 'rename' 'construction'
+ case 52446: // 'rename' 'context'
+ case 52958: // 'rename' 'continue'
+ case 53470: // 'rename' 'copy'
+ case 53982: // 'rename' 'copy-namespaces'
+ case 54494: // 'rename' 'count'
+ case 55006: // 'rename' 'decimal-format'
+ case 56030: // 'rename' 'declare'
+ case 56542: // 'rename' 'default'
+ case 57054: // 'rename' 'delete'
+ case 57566: // 'rename' 'descendant'
+ case 58078: // 'rename' 'descendant-or-self'
+ case 58590: // 'rename' 'descending'
+ case 61150: // 'rename' 'div'
+ case 61662: // 'rename' 'document'
+ case 62174: // 'rename' 'document-node'
+ case 62686: // 'rename' 'element'
+ case 63198: // 'rename' 'else'
+ case 63710: // 'rename' 'empty'
+ case 64222: // 'rename' 'empty-sequence'
+ case 64734: // 'rename' 'encoding'
+ case 65246: // 'rename' 'end'
+ case 66270: // 'rename' 'eq'
+ case 66782: // 'rename' 'every'
+ case 67806: // 'rename' 'except'
+ case 68318: // 'rename' 'exit'
+ case 68830: // 'rename' 'external'
+ case 69342: // 'rename' 'false'
+ case 69854: // 'rename' 'first'
+ case 70366: // 'rename' 'following'
+ case 70878: // 'rename' 'following-sibling'
+ case 71390: // 'rename' 'for'
+ case 72926: // 'rename' 'from'
+ case 73438: // 'rename' 'ft-option'
+ case 75486: // 'rename' 'function'
+ case 75998: // 'rename' 'ge'
+ case 77022: // 'rename' 'group'
+ case 78046: // 'rename' 'gt'
+ case 78558: // 'rename' 'idiv'
+ case 79070: // 'rename' 'if'
+ case 79582: // 'rename' 'import'
+ case 80094: // 'rename' 'in'
+ case 80606: // 'rename' 'index'
+ case 82654: // 'rename' 'insert'
+ case 83166: // 'rename' 'instance'
+ case 83678: // 'rename' 'integrity'
+ case 84190: // 'rename' 'intersect'
+ case 84702: // 'rename' 'into'
+ case 85214: // 'rename' 'is'
+ case 85726: // 'rename' 'item'
+ case 86238: // 'rename' 'json'
+ case 86750: // 'rename' 'json-item'
+ case 87262: // 'rename' 'jsoniq'
+ case 88798: // 'rename' 'last'
+ case 89310: // 'rename' 'lax'
+ case 89822: // 'rename' 'le'
+ case 90846: // 'rename' 'let'
+ case 91870: // 'rename' 'loop'
+ case 92894: // 'rename' 'lt'
+ case 93918: // 'rename' 'mod'
+ case 94430: // 'rename' 'modify'
+ case 94942: // 'rename' 'module'
+ case 95966: // 'rename' 'namespace'
+ case 96478: // 'rename' 'namespace-node'
+ case 96990: // 'rename' 'ne'
+ case 100062: // 'rename' 'nodes'
+ case 101086: // 'rename' 'null'
+ case 101598: // 'rename' 'object'
+ case 103646: // 'rename' 'only'
+ case 104158: // 'rename' 'option'
+ case 104670: // 'rename' 'or'
+ case 105182: // 'rename' 'order'
+ case 105694: // 'rename' 'ordered'
+ case 106206: // 'rename' 'ordering'
+ case 107742: // 'rename' 'parent'
+ case 110814: // 'rename' 'preceding'
+ case 111326: // 'rename' 'preceding-sibling'
+ case 112862: // 'rename' 'processing-instruction'
+ case 113886: // 'rename' 'rename'
+ case 114398: // 'rename' 'replace'
+ case 114910: // 'rename' 'return'
+ case 115422: // 'rename' 'returning'
+ case 115934: // 'rename' 'revalidation'
+ case 116958: // 'rename' 'satisfies'
+ case 117470: // 'rename' 'schema'
+ case 117982: // 'rename' 'schema-attribute'
+ case 118494: // 'rename' 'schema-element'
+ case 119006: // 'rename' 'score'
+ case 119518: // 'rename' 'select'
+ case 120030: // 'rename' 'self'
+ case 122590: // 'rename' 'sliding'
+ case 123102: // 'rename' 'some'
+ case 123614: // 'rename' 'stable'
+ case 124126: // 'rename' 'start'
+ case 125662: // 'rename' 'strict'
+ case 126686: // 'rename' 'structured-item'
+ case 127198: // 'rename' 'switch'
+ case 127710: // 'rename' 'text'
+ case 129758: // 'rename' 'to'
+ case 130270: // 'rename' 'treat'
+ case 130782: // 'rename' 'true'
+ case 131294: // 'rename' 'try'
+ case 131806: // 'rename' 'tumbling'
+ case 132318: // 'rename' 'type'
+ case 132830: // 'rename' 'typeswitch'
+ case 133342: // 'rename' 'union'
+ case 134366: // 'rename' 'unordered'
+ case 134878: // 'rename' 'updating'
+ case 136414: // 'rename' 'validate'
+ case 136926: // 'rename' 'value'
+ case 137438: // 'rename' 'variable'
+ case 137950: // 'rename' 'version'
+ case 139486: // 'rename' 'where'
+ case 139998: // 'rename' 'while'
+ case 141534: // 'rename' 'with'
+ case 144094: // 'rename' '{'
+ case 145118: // 'rename' '{|'
+ parse_JSONRenameExpr();
+ break;
+ case -11:
+ parse_JSONReplaceExpr();
+ break;
+ case -12:
+ case 3150: // 'append' EQName^Token
+ case 4174: // 'append' IntegerLiteral
+ case 4686: // 'append' DecimalLiteral
+ case 5198: // 'append' DoubleLiteral
+ case 5710: // 'append' StringLiteral
+ case 15950: // 'append' '$'
+ case 16462: // 'append' '$$'
+ case 16974: // 'append' '%'
+ case 18510: // 'append' '(#'
+ case 21070: // 'append' '+'
+ case 22094: // 'append' '-'
+ case 24142: // 'append' '/'
+ case 24654: // 'append' '//'
+ case 28238: // 'append' '<'
+ case 28750: // 'append' '<!--'
+ case 30798: // 'append' '<?'
+ case 35406: // 'append' '['
+ case 36430: // 'append' 'after'
+ case 37454: // 'append' 'allowing'
+ case 37966: // 'append' 'ancestor'
+ case 38478: // 'append' 'ancestor-or-self'
+ case 38990: // 'append' 'and'
+ case 40014: // 'append' 'append'
+ case 40526: // 'append' 'array'
+ case 41038: // 'append' 'as'
+ case 41550: // 'append' 'ascending'
+ case 42062: // 'append' 'at'
+ case 42574: // 'append' 'attribute'
+ case 43086: // 'append' 'base-uri'
+ case 43598: // 'append' 'before'
+ case 44110: // 'append' 'boundary-space'
+ case 44622: // 'append' 'break'
+ case 45646: // 'append' 'case'
+ case 46158: // 'append' 'cast'
+ case 46670: // 'append' 'castable'
+ case 47182: // 'append' 'catch'
+ case 48206: // 'append' 'child'
+ case 48718: // 'append' 'collation'
+ case 49742: // 'append' 'comment'
+ case 50254: // 'append' 'constraint'
+ case 50766: // 'append' 'construction'
+ case 52302: // 'append' 'context'
+ case 52814: // 'append' 'continue'
+ case 53326: // 'append' 'copy'
+ case 53838: // 'append' 'copy-namespaces'
+ case 54350: // 'append' 'count'
+ case 54862: // 'append' 'decimal-format'
+ case 55886: // 'append' 'declare'
+ case 56398: // 'append' 'default'
+ case 56910: // 'append' 'delete'
+ case 57422: // 'append' 'descendant'
+ case 57934: // 'append' 'descendant-or-self'
+ case 58446: // 'append' 'descending'
+ case 61006: // 'append' 'div'
+ case 61518: // 'append' 'document'
+ case 62030: // 'append' 'document-node'
+ case 62542: // 'append' 'element'
+ case 63054: // 'append' 'else'
+ case 63566: // 'append' 'empty'
+ case 64078: // 'append' 'empty-sequence'
+ case 64590: // 'append' 'encoding'
+ case 65102: // 'append' 'end'
+ case 66126: // 'append' 'eq'
+ case 66638: // 'append' 'every'
+ case 67662: // 'append' 'except'
+ case 68174: // 'append' 'exit'
+ case 68686: // 'append' 'external'
+ case 69198: // 'append' 'false'
+ case 69710: // 'append' 'first'
+ case 70222: // 'append' 'following'
+ case 70734: // 'append' 'following-sibling'
+ case 71246: // 'append' 'for'
+ case 72782: // 'append' 'from'
+ case 73294: // 'append' 'ft-option'
+ case 75342: // 'append' 'function'
+ case 75854: // 'append' 'ge'
+ case 76878: // 'append' 'group'
+ case 77902: // 'append' 'gt'
+ case 78414: // 'append' 'idiv'
+ case 78926: // 'append' 'if'
+ case 79438: // 'append' 'import'
+ case 79950: // 'append' 'in'
+ case 80462: // 'append' 'index'
+ case 82510: // 'append' 'insert'
+ case 83022: // 'append' 'instance'
+ case 83534: // 'append' 'integrity'
+ case 84046: // 'append' 'intersect'
+ case 84558: // 'append' 'into'
+ case 85070: // 'append' 'is'
+ case 85582: // 'append' 'item'
+ case 86094: // 'append' 'json'
+ case 86606: // 'append' 'json-item'
+ case 87118: // 'append' 'jsoniq'
+ case 88654: // 'append' 'last'
+ case 89166: // 'append' 'lax'
+ case 89678: // 'append' 'le'
+ case 90702: // 'append' 'let'
+ case 91726: // 'append' 'loop'
+ case 92750: // 'append' 'lt'
+ case 93774: // 'append' 'mod'
+ case 94286: // 'append' 'modify'
+ case 94798: // 'append' 'module'
+ case 95822: // 'append' 'namespace'
+ case 96334: // 'append' 'namespace-node'
+ case 96846: // 'append' 'ne'
+ case 99406: // 'append' 'node'
+ case 99918: // 'append' 'nodes'
+ case 100430: // 'append' 'not'
+ case 100942: // 'append' 'null'
+ case 101454: // 'append' 'object'
+ case 103502: // 'append' 'only'
+ case 104014: // 'append' 'option'
+ case 104526: // 'append' 'or'
+ case 105038: // 'append' 'order'
+ case 105550: // 'append' 'ordered'
+ case 106062: // 'append' 'ordering'
+ case 107598: // 'append' 'parent'
+ case 110670: // 'append' 'preceding'
+ case 111182: // 'append' 'preceding-sibling'
+ case 112718: // 'append' 'processing-instruction'
+ case 113742: // 'append' 'rename'
+ case 114254: // 'append' 'replace'
+ case 114766: // 'append' 'return'
+ case 115278: // 'append' 'returning'
+ case 115790: // 'append' 'revalidation'
+ case 116814: // 'append' 'satisfies'
+ case 117326: // 'append' 'schema'
+ case 117838: // 'append' 'schema-attribute'
+ case 118350: // 'append' 'schema-element'
+ case 118862: // 'append' 'score'
+ case 119374: // 'append' 'select'
+ case 119886: // 'append' 'self'
+ case 122446: // 'append' 'sliding'
+ case 122958: // 'append' 'some'
+ case 123470: // 'append' 'stable'
+ case 123982: // 'append' 'start'
+ case 125518: // 'append' 'strict'
+ case 126542: // 'append' 'structured-item'
+ case 127054: // 'append' 'switch'
+ case 127566: // 'append' 'text'
+ case 129614: // 'append' 'to'
+ case 130126: // 'append' 'treat'
+ case 130638: // 'append' 'true'
+ case 131150: // 'append' 'try'
+ case 131662: // 'append' 'tumbling'
+ case 132174: // 'append' 'type'
+ case 132686: // 'append' 'typeswitch'
+ case 133198: // 'append' 'union'
+ case 134222: // 'append' 'unordered'
+ case 134734: // 'append' 'updating'
+ case 136270: // 'append' 'validate'
+ case 136782: // 'append' 'value'
+ case 137294: // 'append' 'variable'
+ case 137806: // 'append' 'version'
+ case 139342: // 'append' 'where'
+ case 139854: // 'append' 'while'
+ case 141390: // 'append' 'with'
+ case 143950: // 'append' '{'
+ case 144974: // 'append' '{|'
+ parse_JSONAppendExpr();
+ break;
+ default:
+ parse_OrExpr();
+ }
+ eventHandler.endNonterminal("ExprSimple", e0);
+ }
+
+ function try_ExprSimple()
+ {
+ switch (l1)
+ {
+ case 78: // 'append'
+ lookahead2W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 161: // 'insert'
+ lookahead2W(275); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 223: // 'replace'
+ lookahead2W(170); // S^WS | '#' | '(' | '(:' | 'node' | 'value'
+ break;
+ case 111: // 'delete'
+ case 222: // 'rename'
+ lookahead2W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 104: // 'copy'
+ case 130: // 'every'
+ case 240: // 'some'
+ lookahead2W(143); // S^WS | '#' | '$' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 17998 // 'append' '('
+ || lk == 18031 // 'delete' '('
+ || lk == 18081 // 'insert' '('
+ || lk == 18142 // 'rename' '('
+ || lk == 99439 // 'delete' 'node'
+ || lk == 99489 // 'insert' 'node'
+ || lk == 99550 // 'rename' 'node'
+ || lk == 99951 // 'delete' 'nodes'
+ || lk == 100001 // 'insert' 'nodes'
+ || lk == 136927) // 'replace' 'value'
+ {
+ 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
+ {
+ try_OrExpr();
+ memoize(10, e0A, -2);
+ lk = -13;
+ }
+ 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_InsertExpr();
+ memoize(10, e0A, -3);
+ lk = -13;
+ }
+ 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_DeleteExpr();
+ memoize(10, e0A, -4);
+ lk = -13;
+ }
+ catch (p4A)
+ {
+ 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_RenameExpr();
+ memoize(10, e0A, -5);
+ lk = -13;
+ }
+ catch (p5A)
+ {
+ 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_ReplaceExpr();
+ memoize(10, e0A, -6);
+ lk = -13;
+ }
+ catch (p6A)
+ {
+ 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_JSONDeleteExpr();
+ memoize(10, e0A, -8);
+ lk = -13;
+ }
+ catch (p8A)
+ {
+ 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_JSONInsertExpr();
+ memoize(10, e0A, -9);
+ lk = -13;
+ }
+ catch (p9A)
+ {
+ 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_JSONRenameExpr();
+ memoize(10, e0A, -10);
+ lk = -13;
+ }
+ catch (p10A)
+ {
+ 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_JSONReplaceExpr();
+ memoize(10, e0A, -11);
+ lk = -13;
+ }
+ catch (p11A)
+ {
+ lk = -12;
+ 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, e0A, -12);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ switch (lk)
+ {
+ case 16002: // 'every' '$'
+ case 16112: // 'some' '$'
+ try_QuantifiedExpr();
+ break;
+ case -3:
+ try_InsertExpr();
+ break;
+ case -4:
+ try_DeleteExpr();
+ break;
+ case -5:
+ try_RenameExpr();
+ break;
+ case -6:
+ case 99551: // 'replace' 'node'
+ try_ReplaceExpr();
+ break;
+ case 15976: // 'copy' '$'
+ try_TransformExpr();
+ break;
+ case -8:
+ case 3183: // 'delete' EQName^Token
+ case 4207: // 'delete' IntegerLiteral
+ case 4719: // 'delete' DecimalLiteral
+ case 5231: // 'delete' DoubleLiteral
+ case 5743: // 'delete' StringLiteral
+ case 15983: // 'delete' '$'
+ case 16495: // 'delete' '$$'
+ case 17007: // 'delete' '%'
+ case 28271: // 'delete' '<'
+ case 28783: // 'delete' '<!--'
+ case 30831: // 'delete' '<?'
+ case 35439: // 'delete' '['
+ case 36463: // 'delete' 'after'
+ case 37487: // 'delete' 'allowing'
+ case 37999: // 'delete' 'ancestor'
+ case 38511: // 'delete' 'ancestor-or-self'
+ case 39023: // 'delete' 'and'
+ case 40047: // 'delete' 'append'
+ case 40559: // 'delete' 'array'
+ case 41071: // 'delete' 'as'
+ case 41583: // 'delete' 'ascending'
+ case 42095: // 'delete' 'at'
+ case 42607: // 'delete' 'attribute'
+ case 43119: // 'delete' 'base-uri'
+ case 43631: // 'delete' 'before'
+ case 44143: // 'delete' 'boundary-space'
+ case 44655: // 'delete' 'break'
+ case 45679: // 'delete' 'case'
+ case 46191: // 'delete' 'cast'
+ case 46703: // 'delete' 'castable'
+ case 47215: // 'delete' 'catch'
+ case 48239: // 'delete' 'child'
+ case 48751: // 'delete' 'collation'
+ case 49775: // 'delete' 'comment'
+ case 50287: // 'delete' 'constraint'
+ case 50799: // 'delete' 'construction'
+ case 52335: // 'delete' 'context'
+ case 52847: // 'delete' 'continue'
+ case 53359: // 'delete' 'copy'
+ case 53871: // 'delete' 'copy-namespaces'
+ case 54383: // 'delete' 'count'
+ case 54895: // 'delete' 'decimal-format'
+ case 55919: // 'delete' 'declare'
+ case 56431: // 'delete' 'default'
+ case 56943: // 'delete' 'delete'
+ case 57455: // 'delete' 'descendant'
+ case 57967: // 'delete' 'descendant-or-self'
+ case 58479: // 'delete' 'descending'
+ case 61039: // 'delete' 'div'
+ case 61551: // 'delete' 'document'
+ case 62063: // 'delete' 'document-node'
+ case 62575: // 'delete' 'element'
+ case 63087: // 'delete' 'else'
+ case 63599: // 'delete' 'empty'
+ case 64111: // 'delete' 'empty-sequence'
+ case 64623: // 'delete' 'encoding'
+ case 65135: // 'delete' 'end'
+ case 66159: // 'delete' 'eq'
+ case 66671: // 'delete' 'every'
+ case 67695: // 'delete' 'except'
+ case 68207: // 'delete' 'exit'
+ case 68719: // 'delete' 'external'
+ case 69231: // 'delete' 'false'
+ case 69743: // 'delete' 'first'
+ case 70255: // 'delete' 'following'
+ case 70767: // 'delete' 'following-sibling'
+ case 71279: // 'delete' 'for'
+ case 72815: // 'delete' 'from'
+ case 73327: // 'delete' 'ft-option'
+ case 75375: // 'delete' 'function'
+ case 75887: // 'delete' 'ge'
+ case 76911: // 'delete' 'group'
+ case 77935: // 'delete' 'gt'
+ case 78447: // 'delete' 'idiv'
+ case 78959: // 'delete' 'if'
+ case 79471: // 'delete' 'import'
+ case 79983: // 'delete' 'in'
+ case 80495: // 'delete' 'index'
+ case 82543: // 'delete' 'insert'
+ case 83055: // 'delete' 'instance'
+ case 83567: // 'delete' 'integrity'
+ case 84079: // 'delete' 'intersect'
+ case 84591: // 'delete' 'into'
+ case 85103: // 'delete' 'is'
+ case 85615: // 'delete' 'item'
+ case 86127: // 'delete' 'json'
+ case 86639: // 'delete' 'json-item'
+ case 87151: // 'delete' 'jsoniq'
+ case 88687: // 'delete' 'last'
+ case 89199: // 'delete' 'lax'
+ case 89711: // 'delete' 'le'
+ case 90735: // 'delete' 'let'
+ case 91759: // 'delete' 'loop'
+ case 92783: // 'delete' 'lt'
+ case 93807: // 'delete' 'mod'
+ case 94319: // 'delete' 'modify'
+ case 94831: // 'delete' 'module'
+ case 95855: // 'delete' 'namespace'
+ case 96367: // 'delete' 'namespace-node'
+ case 96879: // 'delete' 'ne'
+ case 100975: // 'delete' 'null'
+ case 101487: // 'delete' 'object'
+ case 103535: // 'delete' 'only'
+ case 104047: // 'delete' 'option'
+ case 104559: // 'delete' 'or'
+ case 105071: // 'delete' 'order'
+ case 105583: // 'delete' 'ordered'
+ case 106095: // 'delete' 'ordering'
+ case 107631: // 'delete' 'parent'
+ case 110703: // 'delete' 'preceding'
+ case 111215: // 'delete' 'preceding-sibling'
+ case 112751: // 'delete' 'processing-instruction'
+ case 113775: // 'delete' 'rename'
+ case 114287: // 'delete' 'replace'
+ case 114799: // 'delete' 'return'
+ case 115311: // 'delete' 'returning'
+ case 115823: // 'delete' 'revalidation'
+ case 116847: // 'delete' 'satisfies'
+ case 117359: // 'delete' 'schema'
+ case 117871: // 'delete' 'schema-attribute'
+ case 118383: // 'delete' 'schema-element'
+ case 118895: // 'delete' 'score'
+ case 119407: // 'delete' 'select'
+ case 119919: // 'delete' 'self'
+ case 122479: // 'delete' 'sliding'
+ case 122991: // 'delete' 'some'
+ case 123503: // 'delete' 'stable'
+ case 124015: // 'delete' 'start'
+ case 125551: // 'delete' 'strict'
+ case 126575: // 'delete' 'structured-item'
+ case 127087: // 'delete' 'switch'
+ case 127599: // 'delete' 'text'
+ case 129647: // 'delete' 'to'
+ case 130159: // 'delete' 'treat'
+ case 130671: // 'delete' 'true'
+ case 131183: // 'delete' 'try'
+ case 131695: // 'delete' 'tumbling'
+ case 132207: // 'delete' 'type'
+ case 132719: // 'delete' 'typeswitch'
+ case 133231: // 'delete' 'union'
+ case 134255: // 'delete' 'unordered'
+ case 134767: // 'delete' 'updating'
+ case 136303: // 'delete' 'validate'
+ case 136815: // 'delete' 'value'
+ case 137327: // 'delete' 'variable'
+ case 137839: // 'delete' 'version'
+ case 139375: // 'delete' 'where'
+ case 139887: // 'delete' 'while'
+ case 141423: // 'delete' 'with'
+ case 143983: // 'delete' '{'
+ case 145007: // 'delete' '{|'
+ try_JSONDeleteExpr();
+ break;
+ case -9:
+ case 3233: // 'insert' EQName^Token
+ case 4257: // 'insert' IntegerLiteral
+ case 4769: // 'insert' DecimalLiteral
+ case 5281: // 'insert' DoubleLiteral
+ case 5793: // 'insert' StringLiteral
+ case 9889: // 'insert' NCName^Token
+ case 16033: // 'insert' '$'
+ case 16545: // 'insert' '$$'
+ case 17057: // 'insert' '%'
+ case 18593: // 'insert' '(#'
+ case 21153: // 'insert' '+'
+ case 22177: // 'insert' '-'
+ case 24225: // 'insert' '/'
+ case 24737: // 'insert' '//'
+ case 28321: // 'insert' '<'
+ case 28833: // 'insert' '<!--'
+ case 30881: // 'insert' '<?'
+ case 35489: // 'insert' '['
+ case 36513: // 'insert' 'after'
+ case 37537: // 'insert' 'allowing'
+ case 38049: // 'insert' 'ancestor'
+ case 38561: // 'insert' 'ancestor-or-self'
+ case 39073: // 'insert' 'and'
+ case 40097: // 'insert' 'append'
+ case 40609: // 'insert' 'array'
+ case 41121: // 'insert' 'as'
+ case 41633: // 'insert' 'ascending'
+ case 42145: // 'insert' 'at'
+ case 42657: // 'insert' 'attribute'
+ case 43169: // 'insert' 'base-uri'
+ case 43681: // 'insert' 'before'
+ case 44193: // 'insert' 'boundary-space'
+ case 44705: // 'insert' 'break'
+ case 45729: // 'insert' 'case'
+ case 46241: // 'insert' 'cast'
+ case 46753: // 'insert' 'castable'
+ case 47265: // 'insert' 'catch'
+ case 48289: // 'insert' 'child'
+ case 48801: // 'insert' 'collation'
+ case 49825: // 'insert' 'comment'
+ case 50337: // 'insert' 'constraint'
+ case 50849: // 'insert' 'construction'
+ case 52385: // 'insert' 'context'
+ case 52897: // 'insert' 'continue'
+ case 53409: // 'insert' 'copy'
+ case 53921: // 'insert' 'copy-namespaces'
+ case 54433: // 'insert' 'count'
+ case 54945: // 'insert' 'decimal-format'
+ case 55969: // 'insert' 'declare'
+ case 56481: // 'insert' 'default'
+ case 56993: // 'insert' 'delete'
+ case 57505: // 'insert' 'descendant'
+ case 58017: // 'insert' 'descendant-or-self'
+ case 58529: // 'insert' 'descending'
+ case 61089: // 'insert' 'div'
+ case 61601: // 'insert' 'document'
+ case 62113: // 'insert' 'document-node'
+ case 62625: // 'insert' 'element'
+ case 63137: // 'insert' 'else'
+ case 63649: // 'insert' 'empty'
+ case 64161: // 'insert' 'empty-sequence'
+ case 64673: // 'insert' 'encoding'
+ case 65185: // 'insert' 'end'
+ case 66209: // 'insert' 'eq'
+ case 66721: // 'insert' 'every'
+ case 67745: // 'insert' 'except'
+ case 68257: // 'insert' 'exit'
+ case 68769: // 'insert' 'external'
+ case 69281: // 'insert' 'false'
+ case 69793: // 'insert' 'first'
+ case 70305: // 'insert' 'following'
+ case 70817: // 'insert' 'following-sibling'
+ case 71329: // 'insert' 'for'
+ case 72865: // 'insert' 'from'
+ case 73377: // 'insert' 'ft-option'
+ case 75425: // 'insert' 'function'
+ case 75937: // 'insert' 'ge'
+ case 76961: // 'insert' 'group'
+ case 77985: // 'insert' 'gt'
+ case 78497: // 'insert' 'idiv'
+ case 79009: // 'insert' 'if'
+ case 79521: // 'insert' 'import'
+ case 80033: // 'insert' 'in'
+ case 80545: // 'insert' 'index'
+ case 82593: // 'insert' 'insert'
+ case 83105: // 'insert' 'instance'
+ case 83617: // 'insert' 'integrity'
+ case 84129: // 'insert' 'intersect'
+ case 84641: // 'insert' 'into'
+ case 85153: // 'insert' 'is'
+ case 85665: // 'insert' 'item'
+ case 86177: // 'insert' 'json'
+ case 86689: // 'insert' 'json-item'
+ case 87201: // 'insert' 'jsoniq'
+ case 88737: // 'insert' 'last'
+ case 89249: // 'insert' 'lax'
+ case 89761: // 'insert' 'le'
+ case 90785: // 'insert' 'let'
+ case 91809: // 'insert' 'loop'
+ case 92833: // 'insert' 'lt'
+ case 93857: // 'insert' 'mod'
+ case 94369: // 'insert' 'modify'
+ case 94881: // 'insert' 'module'
+ case 95905: // 'insert' 'namespace'
+ case 96417: // 'insert' 'namespace-node'
+ case 96929: // 'insert' 'ne'
+ case 100513: // 'insert' 'not'
+ case 101025: // 'insert' 'null'
+ case 101537: // 'insert' 'object'
+ case 103585: // 'insert' 'only'
+ case 104097: // 'insert' 'option'
+ case 104609: // 'insert' 'or'
+ case 105121: // 'insert' 'order'
+ case 105633: // 'insert' 'ordered'
+ case 106145: // 'insert' 'ordering'
+ case 107681: // 'insert' 'parent'
+ case 110753: // 'insert' 'preceding'
+ case 111265: // 'insert' 'preceding-sibling'
+ case 112801: // 'insert' 'processing-instruction'
+ case 113825: // 'insert' 'rename'
+ case 114337: // 'insert' 'replace'
+ case 114849: // 'insert' 'return'
+ case 115361: // 'insert' 'returning'
+ case 115873: // 'insert' 'revalidation'
+ case 116897: // 'insert' 'satisfies'
+ case 117409: // 'insert' 'schema'
+ case 117921: // 'insert' 'schema-attribute'
+ case 118433: // 'insert' 'schema-element'
+ case 118945: // 'insert' 'score'
+ case 119457: // 'insert' 'select'
+ case 119969: // 'insert' 'self'
+ case 122529: // 'insert' 'sliding'
+ case 123041: // 'insert' 'some'
+ case 123553: // 'insert' 'stable'
+ case 124065: // 'insert' 'start'
+ case 125601: // 'insert' 'strict'
+ case 126625: // 'insert' 'structured-item'
+ case 127137: // 'insert' 'switch'
+ case 127649: // 'insert' 'text'
+ case 129697: // 'insert' 'to'
+ case 130209: // 'insert' 'treat'
+ case 130721: // 'insert' 'true'
+ case 131233: // 'insert' 'try'
+ case 131745: // 'insert' 'tumbling'
+ case 132257: // 'insert' 'type'
+ case 132769: // 'insert' 'typeswitch'
+ case 133281: // 'insert' 'union'
+ case 134305: // 'insert' 'unordered'
+ case 134817: // 'insert' 'updating'
+ case 136353: // 'insert' 'validate'
+ case 136865: // 'insert' 'value'
+ case 137377: // 'insert' 'variable'
+ case 137889: // 'insert' 'version'
+ case 139425: // 'insert' 'where'
+ case 139937: // 'insert' 'while'
+ case 141473: // 'insert' 'with'
+ case 144033: // 'insert' '{'
+ case 145057: // 'insert' '{|'
+ try_JSONInsertExpr();
+ break;
+ case -10:
+ case 3294: // 'rename' EQName^Token
+ case 4318: // 'rename' IntegerLiteral
+ case 4830: // 'rename' DecimalLiteral
+ case 5342: // 'rename' DoubleLiteral
+ case 5854: // 'rename' StringLiteral
+ case 16094: // 'rename' '$'
+ case 16606: // 'rename' '$$'
+ case 17118: // 'rename' '%'
+ case 28382: // 'rename' '<'
+ case 28894: // 'rename' '<!--'
+ case 30942: // 'rename' '<?'
+ case 35550: // 'rename' '['
+ case 36574: // 'rename' 'after'
+ case 37598: // 'rename' 'allowing'
+ case 38110: // 'rename' 'ancestor'
+ case 38622: // 'rename' 'ancestor-or-self'
+ case 39134: // 'rename' 'and'
+ case 40158: // 'rename' 'append'
+ case 40670: // 'rename' 'array'
+ case 41182: // 'rename' 'as'
+ case 41694: // 'rename' 'ascending'
+ case 42206: // 'rename' 'at'
+ case 42718: // 'rename' 'attribute'
+ case 43230: // 'rename' 'base-uri'
+ case 43742: // 'rename' 'before'
+ case 44254: // 'rename' 'boundary-space'
+ case 44766: // 'rename' 'break'
+ case 45790: // 'rename' 'case'
+ case 46302: // 'rename' 'cast'
+ case 46814: // 'rename' 'castable'
+ case 47326: // 'rename' 'catch'
+ case 48350: // 'rename' 'child'
+ case 48862: // 'rename' 'collation'
+ case 49886: // 'rename' 'comment'
+ case 50398: // 'rename' 'constraint'
+ case 50910: // 'rename' 'construction'
+ case 52446: // 'rename' 'context'
+ case 52958: // 'rename' 'continue'
+ case 53470: // 'rename' 'copy'
+ case 53982: // 'rename' 'copy-namespaces'
+ case 54494: // 'rename' 'count'
+ case 55006: // 'rename' 'decimal-format'
+ case 56030: // 'rename' 'declare'
+ case 56542: // 'rename' 'default'
+ case 57054: // 'rename' 'delete'
+ case 57566: // 'rename' 'descendant'
+ case 58078: // 'rename' 'descendant-or-self'
+ case 58590: // 'rename' 'descending'
+ case 61150: // 'rename' 'div'
+ case 61662: // 'rename' 'document'
+ case 62174: // 'rename' 'document-node'
+ case 62686: // 'rename' 'element'
+ case 63198: // 'rename' 'else'
+ case 63710: // 'rename' 'empty'
+ case 64222: // 'rename' 'empty-sequence'
+ case 64734: // 'rename' 'encoding'
+ case 65246: // 'rename' 'end'
+ case 66270: // 'rename' 'eq'
+ case 66782: // 'rename' 'every'
+ case 67806: // 'rename' 'except'
+ case 68318: // 'rename' 'exit'
+ case 68830: // 'rename' 'external'
+ case 69342: // 'rename' 'false'
+ case 69854: // 'rename' 'first'
+ case 70366: // 'rename' 'following'
+ case 70878: // 'rename' 'following-sibling'
+ case 71390: // 'rename' 'for'
+ case 72926: // 'rename' 'from'
+ case 73438: // 'rename' 'ft-option'
+ case 75486: // 'rename' 'function'
+ case 75998: // 'rename' 'ge'
+ case 77022: // 'rename' 'group'
+ case 78046: // 'rename' 'gt'
+ case 78558: // 'rename' 'idiv'
+ case 79070: // 'rename' 'if'
+ case 79582: // 'rename' 'import'
+ case 80094: // 'rename' 'in'
+ case 80606: // 'rename' 'index'
+ case 82654: // 'rename' 'insert'
+ case 83166: // 'rename' 'instance'
+ case 83678: // 'rename' 'integrity'
+ case 84190: // 'rename' 'intersect'
+ case 84702: // 'rename' 'into'
+ case 85214: // 'rename' 'is'
+ case 85726: // 'rename' 'item'
+ case 86238: // 'rename' 'json'
+ case 86750: // 'rename' 'json-item'
+ case 87262: // 'rename' 'jsoniq'
+ case 88798: // 'rename' 'last'
+ case 89310: // 'rename' 'lax'
+ case 89822: // 'rename' 'le'
+ case 90846: // 'rename' 'let'
+ case 91870: // 'rename' 'loop'
+ case 92894: // 'rename' 'lt'
+ case 93918: // 'rename' 'mod'
+ case 94430: // 'rename' 'modify'
+ case 94942: // 'rename' 'module'
+ case 95966: // 'rename' 'namespace'
+ case 96478: // 'rename' 'namespace-node'
+ case 96990: // 'rename' 'ne'
+ case 100062: // 'rename' 'nodes'
+ case 101086: // 'rename' 'null'
+ case 101598: // 'rename' 'object'
+ case 103646: // 'rename' 'only'
+ case 104158: // 'rename' 'option'
+ case 104670: // 'rename' 'or'
+ case 105182: // 'rename' 'order'
+ case 105694: // 'rename' 'ordered'
+ case 106206: // 'rename' 'ordering'
+ case 107742: // 'rename' 'parent'
+ case 110814: // 'rename' 'preceding'
+ case 111326: // 'rename' 'preceding-sibling'
+ case 112862: // 'rename' 'processing-instruction'
+ case 113886: // 'rename' 'rename'
+ case 114398: // 'rename' 'replace'
+ case 114910: // 'rename' 'return'
+ case 115422: // 'rename' 'returning'
+ case 115934: // 'rename' 'revalidation'
+ case 116958: // 'rename' 'satisfies'
+ case 117470: // 'rename' 'schema'
+ case 117982: // 'rename' 'schema-attribute'
+ case 118494: // 'rename' 'schema-element'
+ case 119006: // 'rename' 'score'
+ case 119518: // 'rename' 'select'
+ case 120030: // 'rename' 'self'
+ case 122590: // 'rename' 'sliding'
+ case 123102: // 'rename' 'some'
+ case 123614: // 'rename' 'stable'
+ case 124126: // 'rename' 'start'
+ case 125662: // 'rename' 'strict'
+ case 126686: // 'rename' 'structured-item'
+ case 127198: // 'rename' 'switch'
+ case 127710: // 'rename' 'text'
+ case 129758: // 'rename' 'to'
+ case 130270: // 'rename' 'treat'
+ case 130782: // 'rename' 'true'
+ case 131294: // 'rename' 'try'
+ case 131806: // 'rename' 'tumbling'
+ case 132318: // 'rename' 'type'
+ case 132830: // 'rename' 'typeswitch'
+ case 133342: // 'rename' 'union'
+ case 134366: // 'rename' 'unordered'
+ case 134878: // 'rename' 'updating'
+ case 136414: // 'rename' 'validate'
+ case 136926: // 'rename' 'value'
+ case 137438: // 'rename' 'variable'
+ case 137950: // 'rename' 'version'
+ case 139486: // 'rename' 'where'
+ case 139998: // 'rename' 'while'
+ case 141534: // 'rename' 'with'
+ case 144094: // 'rename' '{'
+ case 145118: // 'rename' '{|'
+ try_JSONRenameExpr();
+ break;
+ case -11:
+ try_JSONReplaceExpr();
+ break;
+ case -12:
+ case 3150: // 'append' EQName^Token
+ case 4174: // 'append' IntegerLiteral
+ case 4686: // 'append' DecimalLiteral
+ case 5198: // 'append' DoubleLiteral
+ case 5710: // 'append' StringLiteral
+ case 15950: // 'append' '$'
+ case 16462: // 'append' '$$'
+ case 16974: // 'append' '%'
+ case 18510: // 'append' '(#'
+ case 21070: // 'append' '+'
+ case 22094: // 'append' '-'
+ case 24142: // 'append' '/'
+ case 24654: // 'append' '//'
+ case 28238: // 'append' '<'
+ case 28750: // 'append' '<!--'
+ case 30798: // 'append' '<?'
+ case 35406: // 'append' '['
+ case 36430: // 'append' 'after'
+ case 37454: // 'append' 'allowing'
+ case 37966: // 'append' 'ancestor'
+ case 38478: // 'append' 'ancestor-or-self'
+ case 38990: // 'append' 'and'
+ case 40014: // 'append' 'append'
+ case 40526: // 'append' 'array'
+ case 41038: // 'append' 'as'
+ case 41550: // 'append' 'ascending'
+ case 42062: // 'append' 'at'
+ case 42574: // 'append' 'attribute'
+ case 43086: // 'append' 'base-uri'
+ case 43598: // 'append' 'before'
+ case 44110: // 'append' 'boundary-space'
+ case 44622: // 'append' 'break'
+ case 45646: // 'append' 'case'
+ case 46158: // 'append' 'cast'
+ case 46670: // 'append' 'castable'
+ case 47182: // 'append' 'catch'
+ case 48206: // 'append' 'child'
+ case 48718: // 'append' 'collation'
+ case 49742: // 'append' 'comment'
+ case 50254: // 'append' 'constraint'
+ case 50766: // 'append' 'construction'
+ case 52302: // 'append' 'context'
+ case 52814: // 'append' 'continue'
+ case 53326: // 'append' 'copy'
+ case 53838: // 'append' 'copy-namespaces'
+ case 54350: // 'append' 'count'
+ case 54862: // 'append' 'decimal-format'
+ case 55886: // 'append' 'declare'
+ case 56398: // 'append' 'default'
+ case 56910: // 'append' 'delete'
+ case 57422: // 'append' 'descendant'
+ case 57934: // 'append' 'descendant-or-self'
+ case 58446: // 'append' 'descending'
+ case 61006: // 'append' 'div'
+ case 61518: // 'append' 'document'
+ case 62030: // 'append' 'document-node'
+ case 62542: // 'append' 'element'
+ case 63054: // 'append' 'else'
+ case 63566: // 'append' 'empty'
+ case 64078: // 'append' 'empty-sequence'
+ case 64590: // 'append' 'encoding'
+ case 65102: // 'append' 'end'
+ case 66126: // 'append' 'eq'
+ case 66638: // 'append' 'every'
+ case 67662: // 'append' 'except'
+ case 68174: // 'append' 'exit'
+ case 68686: // 'append' 'external'
+ case 69198: // 'append' 'false'
+ case 69710: // 'append' 'first'
+ case 70222: // 'append' 'following'
+ case 70734: // 'append' 'following-sibling'
+ case 71246: // 'append' 'for'
+ case 72782: // 'append' 'from'
+ case 73294: // 'append' 'ft-option'
+ case 75342: // 'append' 'function'
+ case 75854: // 'append' 'ge'
+ case 76878: // 'append' 'group'
+ case 77902: // 'append' 'gt'
+ case 78414: // 'append' 'idiv'
+ case 78926: // 'append' 'if'
+ case 79438: // 'append' 'import'
+ case 79950: // 'append' 'in'
+ case 80462: // 'append' 'index'
+ case 82510: // 'append' 'insert'
+ case 83022: // 'append' 'instance'
+ case 83534: // 'append' 'integrity'
+ case 84046: // 'append' 'intersect'
+ case 84558: // 'append' 'into'
+ case 85070: // 'append' 'is'
+ case 85582: // 'append' 'item'
+ case 86094: // 'append' 'json'
+ case 86606: // 'append' 'json-item'
+ case 87118: // 'append' 'jsoniq'
+ case 88654: // 'append' 'last'
+ case 89166: // 'append' 'lax'
+ case 89678: // 'append' 'le'
+ case 90702: // 'append' 'let'
+ case 91726: // 'append' 'loop'
+ case 92750: // 'append' 'lt'
+ case 93774: // 'append' 'mod'
+ case 94286: // 'append' 'modify'
+ case 94798: // 'append' 'module'
+ case 95822: // 'append' 'namespace'
+ case 96334: // 'append' 'namespace-node'
+ case 96846: // 'append' 'ne'
+ case 99406: // 'append' 'node'
+ case 99918: // 'append' 'nodes'
+ case 100430: // 'append' 'not'
+ case 100942: // 'append' 'null'
+ case 101454: // 'append' 'object'
+ case 103502: // 'append' 'only'
+ case 104014: // 'append' 'option'
+ case 104526: // 'append' 'or'
+ case 105038: // 'append' 'order'
+ case 105550: // 'append' 'ordered'
+ case 106062: // 'append' 'ordering'
+ case 107598: // 'append' 'parent'
+ case 110670: // 'append' 'preceding'
+ case 111182: // 'append' 'preceding-sibling'
+ case 112718: // 'append' 'processing-instruction'
+ case 113742: // 'append' 'rename'
+ case 114254: // 'append' 'replace'
+ case 114766: // 'append' 'return'
+ case 115278: // 'append' 'returning'
+ case 115790: // 'append' 'revalidation'
+ case 116814: // 'append' 'satisfies'
+ case 117326: // 'append' 'schema'
+ case 117838: // 'append' 'schema-attribute'
+ case 118350: // 'append' 'schema-element'
+ case 118862: // 'append' 'score'
+ case 119374: // 'append' 'select'
+ case 119886: // 'append' 'self'
+ case 122446: // 'append' 'sliding'
+ case 122958: // 'append' 'some'
+ case 123470: // 'append' 'stable'
+ case 123982: // 'append' 'start'
+ case 125518: // 'append' 'strict'
+ case 126542: // 'append' 'structured-item'
+ case 127054: // 'append' 'switch'
+ case 127566: // 'append' 'text'
+ case 129614: // 'append' 'to'
+ case 130126: // 'append' 'treat'
+ case 130638: // 'append' 'true'
+ case 131150: // 'append' 'try'
+ case 131662: // 'append' 'tumbling'
+ case 132174: // 'append' 'type'
+ case 132686: // 'append' 'typeswitch'
+ case 133198: // 'append' 'union'
+ case 134222: // 'append' 'unordered'
+ case 134734: // 'append' 'updating'
+ case 136270: // 'append' 'validate'
+ case 136782: // 'append' 'value'
+ case 137294: // 'append' 'variable'
+ case 137806: // 'append' 'version'
+ case 139342: // 'append' 'where'
+ case 139854: // 'append' 'while'
+ case 141390: // 'append' 'with'
+ case 143950: // 'append' '{'
+ case 144974: // 'append' '{|'
+ try_JSONAppendExpr();
+ break;
+ case -13:
+ break;
+ default:
+ try_OrExpr();
+ }
+ }
+
+ function parse_JSONDeleteExpr()
+ {
+ eventHandler.startNonterminal("JSONDeleteExpr", e0);
+ shift(111); // 'delete'
+ lookahead1W(259); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ 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
+ {
+ shiftT(168); // 'json'
+ 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(11, e0, lk);
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shift(168); // 'json'
+ }
+ lookahead1W(259); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PostfixExpr();
+ eventHandler.endNonterminal("JSONDeleteExpr", e0);
+ }
+
+ function try_JSONDeleteExpr()
+ {
+ shiftT(111); // 'delete'
+ lookahead1W(259); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ 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
+ {
+ shiftT(168); // 'json'
+ memoize(11, e0A, -1);
+ }
+ catch (p1A)
+ {
+ 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, e0A, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shiftT(168); // 'json'
+ }
+ lookahead1W(259); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PostfixExpr();
+ }
+
+ function parse_JSONInsertExpr()
+ {
+ eventHandler.startNonterminal("JSONInsertExpr", e0);
+ switch (l1)
+ {
+ case 161: // 'insert'
+ lookahead2W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 9889) // 'insert' NCName^Token
+ {
+ lk = memoized(12, 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(161); // 'insert'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(13, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ memoize(13, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(13, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 18600 // 'json' '(#'
+ || lk == 21160 // 'json' '+'
+ || lk == 22184 // 'json' '-'
+ || lk == 24232 // 'json' '/'
+ || lk == 24744 // 'json' '//'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 100520 // 'json' 'not'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shiftT(168); // 'json'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ shiftT(165); // 'into'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ switch (l1)
+ {
+ case 82: // 'at'
+ lookahead2W(72); // S^WS | '(:' | 'position'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 110162) // 'at' 'position'
+ {
+ lk = memoized(14, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(82); // 'at'
+ lookahead1W(72); // S^WS | '(:' | 'position'
+ shiftT(215); // 'position'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ memoize(14, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(14, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1)
+ {
+ shiftT(82); // 'at'
+ lookahead1W(72); // S^WS | '(:' | 'position'
+ shiftT(215); // 'position'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ 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(12, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shift(161); // 'insert'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(13, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ lk = -1;
+ }
+ catch (p1B)
+ {
+ lk = -2;
+ }
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(13, e0, lk);
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 18600 // 'json' '(#'
+ || lk == 21160 // 'json' '+'
+ || lk == 22184 // 'json' '-'
+ || lk == 24232 // 'json' '/'
+ || lk == 24744 // 'json' '//'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 100520 // 'json' 'not'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shift(168); // 'json'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(165); // 'into'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ switch (l1)
+ {
+ case 82: // 'at'
+ lookahead2W(72); // S^WS | '(:' | 'position'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 110162) // 'at' 'position'
+ {
+ lk = memoized(14, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(82); // 'at'
+ lookahead1W(72); // S^WS | '(:' | 'position'
+ shiftT(215); // 'position'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ lk = -1;
+ }
+ catch (p1B)
+ {
+ lk = -2;
+ }
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(14, e0, lk);
+ }
+ }
+ if (lk == -1)
+ {
+ shift(82); // 'at'
+ lookahead1W(72); // S^WS | '(:' | 'position'
+ shift(215); // 'position'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ break;
+ default:
+ shift(161); // 'insert'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(281); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(15, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ lk = -1;
+ }
+ catch (p1B)
+ {
+ lk = -2;
+ }
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(15, e0, lk);
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 9896 // 'json' NCName^Token
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 18600 // 'json' '(#'
+ || lk == 21160 // 'json' '+'
+ || lk == 22184 // 'json' '-'
+ || lk == 24232 // 'json' '/'
+ || lk == 24744 // 'json' '//'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 100520 // 'json' 'not'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shift(168); // 'json'
+ }
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PairConstructorList();
+ shift(165); // 'into'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ eventHandler.endNonterminal("JSONInsertExpr", e0);
+ }
+
+ function try_JSONInsertExpr()
+ {
+ switch (l1)
+ {
+ case 161: // 'insert'
+ lookahead2W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 9889) // 'insert' NCName^Token
+ {
+ lk = memoized(12, 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(161); // 'insert'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(13, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ memoize(13, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(13, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 18600 // 'json' '(#'
+ || lk == 21160 // 'json' '+'
+ || lk == 22184 // 'json' '-'
+ || lk == 24232 // 'json' '/'
+ || lk == 24744 // 'json' '//'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 100520 // 'json' 'not'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shiftT(168); // 'json'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ shiftT(165); // 'into'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ switch (l1)
+ {
+ case 82: // 'at'
+ lookahead2W(72); // S^WS | '(:' | 'position'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 110162) // 'at' 'position'
+ {
+ lk = memoized(14, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(82); // 'at'
+ lookahead1W(72); // S^WS | '(:' | 'position'
+ shiftT(215); // 'position'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ memoize(14, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(14, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1)
+ {
+ shiftT(82); // 'at'
+ lookahead1W(72); // S^WS | '(:' | 'position'
+ shiftT(215); // 'position'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ memoize(12, e0A, -1);
+ lk = -3;
+ }
+ 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(12, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shiftT(161); // 'insert'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(13, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ memoize(13, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(13, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 18600 // 'json' '(#'
+ || lk == 21160 // 'json' '+'
+ || lk == 22184 // 'json' '-'
+ || lk == 24232 // 'json' '/'
+ || lk == 24744 // 'json' '//'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 100520 // 'json' 'not'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shiftT(168); // 'json'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ shiftT(165); // 'into'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ switch (l1)
+ {
+ case 82: // 'at'
+ lookahead2W(72); // S^WS | '(:' | 'position'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 110162) // 'at' 'position'
+ {
+ lk = memoized(14, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(82); // 'at'
+ lookahead1W(72); // S^WS | '(:' | 'position'
+ shiftT(215); // 'position'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ memoize(14, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(14, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1)
+ {
+ shiftT(82); // 'at'
+ lookahead1W(72); // S^WS | '(:' | 'position'
+ shiftT(215); // 'position'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ break;
+ case -3:
+ break;
+ default:
+ shiftT(161); // 'insert'
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(281); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(15, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(168); // 'json'
+ memoize(15, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(15, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 9896 // 'json' NCName^Token
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 18600 // 'json' '(#'
+ || lk == 21160 // 'json' '+'
+ || lk == 22184 // 'json' '-'
+ || lk == 24232 // 'json' '/'
+ || lk == 24744 // 'json' '//'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 100520 // 'json' 'not'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shiftT(168); // 'json'
+ }
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PairConstructorList();
+ shiftT(165); // 'into'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+ }
+
+ function parse_JSONRenameExpr()
+ {
+ eventHandler.startNonterminal("JSONRenameExpr", e0);
+ shift(222); // 'rename'
+ lookahead1W(259); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(16, 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(168); // 'json'
+ 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(16, e0, lk);
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shift(168); // 'json'
+ }
+ lookahead1W(259); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PostfixExpr();
+ shift(80); // 'as'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("JSONRenameExpr", e0);
+ }
+
+ function try_JSONRenameExpr()
+ {
+ shiftT(222); // 'rename'
+ lookahead1W(259); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(260); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(16, 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(168); // 'json'
+ memoize(16, e0A, -1);
+ }
+ catch (p1A)
+ {
+ 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(16, e0A, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shiftT(168); // 'json'
+ }
+ lookahead1W(259); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PostfixExpr();
+ shiftT(80); // 'as'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_JSONReplaceExpr()
+ {
+ eventHandler.startNonterminal("JSONReplaceExpr", e0);
+ shift(223); // 'replace'
+ lookahead1W(85); // S^WS | '(:' | 'value'
+ shift(267); // 'value'
+ lookahead1W(67); // S^WS | '(:' | 'of'
+ shift(200); // 'of'
+ lookahead1W(59); // S^WS | '(:' | 'json'
+ shift(168); // 'json'
+ lookahead1W(259); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PostfixExpr();
+ shift(276); // 'with'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("JSONReplaceExpr", e0);
+ }
+
+ function try_JSONReplaceExpr()
+ {
+ shiftT(223); // 'replace'
+ lookahead1W(85); // S^WS | '(:' | 'value'
+ shiftT(267); // 'value'
+ lookahead1W(67); // S^WS | '(:' | 'of'
+ shiftT(200); // 'of'
+ lookahead1W(59); // S^WS | '(:' | 'json'
+ shiftT(168); // 'json'
+ lookahead1W(259); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PostfixExpr();
+ shiftT(276); // 'with'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_JSONAppendExpr()
+ {
+ eventHandler.startNonterminal("JSONAppendExpr", e0);
+ shift(78); // 'append'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(17, 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(168); // 'json'
+ 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(17, e0, lk);
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 18600 // 'json' '(#'
+ || lk == 21160 // 'json' '+'
+ || lk == 22184 // 'json' '-'
+ || lk == 24232 // 'json' '/'
+ || lk == 24744 // 'json' '//'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 100520 // 'json' 'not'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shift(168); // 'json'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ shift(165); // 'into'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("JSONAppendExpr", e0);
+ }
+
+ function try_JSONAppendExpr()
+ {
+ shiftT(78); // 'append'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ switch (l1)
+ {
+ case 168: // 'json'
+ lookahead2W(268); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 18088) // 'json' '('
+ {
+ lk = memoized(17, 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(168); // 'json'
+ memoize(17, e0A, -1);
+ }
+ catch (p1A)
+ {
+ 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(17, e0A, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1
+ || lk == 3240 // 'json' EQName^Token
+ || lk == 4264 // 'json' IntegerLiteral
+ || lk == 4776 // 'json' DecimalLiteral
+ || lk == 5288 // 'json' DoubleLiteral
+ || lk == 5800 // 'json' StringLiteral
+ || lk == 16040 // 'json' '$'
+ || lk == 16552 // 'json' '$$'
+ || lk == 17064 // 'json' '%'
+ || lk == 18600 // 'json' '(#'
+ || lk == 21160 // 'json' '+'
+ || lk == 22184 // 'json' '-'
+ || lk == 24232 // 'json' '/'
+ || lk == 24744 // 'json' '//'
+ || lk == 28328 // 'json' '<'
+ || lk == 28840 // 'json' '<!--'
+ || lk == 30888 // 'json' '<?'
+ || lk == 35496 // 'json' '['
+ || lk == 36520 // 'json' 'after'
+ || lk == 37544 // 'json' 'allowing'
+ || lk == 38056 // 'json' 'ancestor'
+ || lk == 38568 // 'json' 'ancestor-or-self'
+ || lk == 39080 // 'json' 'and'
+ || lk == 40104 // 'json' 'append'
+ || lk == 40616 // 'json' 'array'
+ || lk == 41128 // 'json' 'as'
+ || lk == 41640 // 'json' 'ascending'
+ || lk == 42152 // 'json' 'at'
+ || lk == 42664 // 'json' 'attribute'
+ || lk == 43176 // 'json' 'base-uri'
+ || lk == 43688 // 'json' 'before'
+ || lk == 44200 // 'json' 'boundary-space'
+ || lk == 44712 // 'json' 'break'
+ || lk == 45736 // 'json' 'case'
+ || lk == 46248 // 'json' 'cast'
+ || lk == 46760 // 'json' 'castable'
+ || lk == 47272 // 'json' 'catch'
+ || lk == 48296 // 'json' 'child'
+ || lk == 48808 // 'json' 'collation'
+ || lk == 49832 // 'json' 'comment'
+ || lk == 50344 // 'json' 'constraint'
+ || lk == 50856 // 'json' 'construction'
+ || lk == 52392 // 'json' 'context'
+ || lk == 52904 // 'json' 'continue'
+ || lk == 53416 // 'json' 'copy'
+ || lk == 53928 // 'json' 'copy-namespaces'
+ || lk == 54440 // 'json' 'count'
+ || lk == 54952 // 'json' 'decimal-format'
+ || lk == 55976 // 'json' 'declare'
+ || lk == 56488 // 'json' 'default'
+ || lk == 57000 // 'json' 'delete'
+ || lk == 57512 // 'json' 'descendant'
+ || lk == 58024 // 'json' 'descendant-or-self'
+ || lk == 58536 // 'json' 'descending'
+ || lk == 61096 // 'json' 'div'
+ || lk == 61608 // 'json' 'document'
+ || lk == 62120 // 'json' 'document-node'
+ || lk == 62632 // 'json' 'element'
+ || lk == 63144 // 'json' 'else'
+ || lk == 63656 // 'json' 'empty'
+ || lk == 64168 // 'json' 'empty-sequence'
+ || lk == 64680 // 'json' 'encoding'
+ || lk == 65192 // 'json' 'end'
+ || lk == 66216 // 'json' 'eq'
+ || lk == 66728 // 'json' 'every'
+ || lk == 67752 // 'json' 'except'
+ || lk == 68264 // 'json' 'exit'
+ || lk == 68776 // 'json' 'external'
+ || lk == 69288 // 'json' 'false'
+ || lk == 69800 // 'json' 'first'
+ || lk == 70312 // 'json' 'following'
+ || lk == 70824 // 'json' 'following-sibling'
+ || lk == 71336 // 'json' 'for'
+ || lk == 72872 // 'json' 'from'
+ || lk == 73384 // 'json' 'ft-option'
+ || lk == 75432 // 'json' 'function'
+ || lk == 75944 // 'json' 'ge'
+ || lk == 76968 // 'json' 'group'
+ || lk == 77992 // 'json' 'gt'
+ || lk == 78504 // 'json' 'idiv'
+ || lk == 79016 // 'json' 'if'
+ || lk == 79528 // 'json' 'import'
+ || lk == 80040 // 'json' 'in'
+ || lk == 80552 // 'json' 'index'
+ || lk == 82600 // 'json' 'insert'
+ || lk == 83112 // 'json' 'instance'
+ || lk == 83624 // 'json' 'integrity'
+ || lk == 84136 // 'json' 'intersect'
+ || lk == 84648 // 'json' 'into'
+ || lk == 85160 // 'json' 'is'
+ || lk == 85672 // 'json' 'item'
+ || lk == 86184 // 'json' 'json'
+ || lk == 86696 // 'json' 'json-item'
+ || lk == 87208 // 'json' 'jsoniq'
+ || lk == 88744 // 'json' 'last'
+ || lk == 89256 // 'json' 'lax'
+ || lk == 89768 // 'json' 'le'
+ || lk == 90792 // 'json' 'let'
+ || lk == 91816 // 'json' 'loop'
+ || lk == 92840 // 'json' 'lt'
+ || lk == 93864 // 'json' 'mod'
+ || lk == 94376 // 'json' 'modify'
+ || lk == 94888 // 'json' 'module'
+ || lk == 95912 // 'json' 'namespace'
+ || lk == 96424 // 'json' 'namespace-node'
+ || lk == 96936 // 'json' 'ne'
+ || lk == 99496 // 'json' 'node'
+ || lk == 100008 // 'json' 'nodes'
+ || lk == 100520 // 'json' 'not'
+ || lk == 101032 // 'json' 'null'
+ || lk == 101544 // 'json' 'object'
+ || lk == 103592 // 'json' 'only'
+ || lk == 104104 // 'json' 'option'
+ || lk == 104616 // 'json' 'or'
+ || lk == 105128 // 'json' 'order'
+ || lk == 105640 // 'json' 'ordered'
+ || lk == 106152 // 'json' 'ordering'
+ || lk == 107688 // 'json' 'parent'
+ || lk == 110760 // 'json' 'preceding'
+ || lk == 111272 // 'json' 'preceding-sibling'
+ || lk == 112808 // 'json' 'processing-instruction'
+ || lk == 113832 // 'json' 'rename'
+ || lk == 114344 // 'json' 'replace'
+ || lk == 114856 // 'json' 'return'
+ || lk == 115368 // 'json' 'returning'
+ || lk == 115880 // 'json' 'revalidation'
+ || lk == 116904 // 'json' 'satisfies'
+ || lk == 117416 // 'json' 'schema'
+ || lk == 117928 // 'json' 'schema-attribute'
+ || lk == 118440 // 'json' 'schema-element'
+ || lk == 118952 // 'json' 'score'
+ || lk == 119464 // 'json' 'select'
+ || lk == 119976 // 'json' 'self'
+ || lk == 122536 // 'json' 'sliding'
+ || lk == 123048 // 'json' 'some'
+ || lk == 123560 // 'json' 'stable'
+ || lk == 124072 // 'json' 'start'
+ || lk == 125608 // 'json' 'strict'
+ || lk == 126632 // 'json' 'structured-item'
+ || lk == 127144 // 'json' 'switch'
+ || lk == 127656 // 'json' 'text'
+ || lk == 129704 // 'json' 'to'
+ || lk == 130216 // 'json' 'treat'
+ || lk == 130728 // 'json' 'true'
+ || lk == 131240 // 'json' 'try'
+ || lk == 131752 // 'json' 'tumbling'
+ || lk == 132264 // 'json' 'type'
+ || lk == 132776 // 'json' 'typeswitch'
+ || lk == 133288 // 'json' 'union'
+ || lk == 134312 // 'json' 'unordered'
+ || lk == 134824 // 'json' 'updating'
+ || lk == 136360 // 'json' 'validate'
+ || lk == 136872 // 'json' 'value'
+ || lk == 137384 // 'json' 'variable'
+ || lk == 137896 // 'json' 'version'
+ || lk == 139432 // 'json' 'where'
+ || lk == 139944 // 'json' 'while'
+ || lk == 141480 // 'json' 'with'
+ || lk == 144040 // 'json' '{'
+ || lk == 145064) // 'json' '{|'
+ {
+ shiftT(168); // 'json'
+ }
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ shiftT(165); // 'into'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ 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 282: // '{{'
+ shift(282); // '{{'
+ break;
+ case 288: // '}}'
+ shift(288); // '}}'
+ 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 282: // '{{'
+ shiftT(282); // '{{'
+ break;
+ case 288: // '}}'
+ shiftT(288); // '}}'
+ 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(120); // 'document'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ whitespace();
+ parse_BlockExpr();
+ eventHandler.endNonterminal("CompDocConstructor", e0);
+ }
+
+ function try_CompDocConstructor()
+ {
+ shiftT(120); // 'document'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ try_BlockExpr();
+ }
+
+ function parse_CompAttrConstructor()
+ {
+ eventHandler.startNonterminal("CompAttrConstructor", e0);
+ shift(83); // 'attribute'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 281: // '{'
+ shift(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ break;
+ default:
+ whitespace();
+ parse_EQName();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ switch (l1)
+ {
+ case 281: // '{'
+ lookahead2W(280); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 147225) // '{' '}'
+ {
+ lk = memoized(18, 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(281); // '{'
+ lookahead1W(91); // S^WS | '(:' | '}'
+ shiftT(287); // '}'
+ 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(18, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shift(281); // '{'
+ lookahead1W(91); // S^WS | '(:' | '}'
+ shift(287); // '}'
+ break;
+ default:
+ whitespace();
+ parse_BlockExpr();
+ }
+ eventHandler.endNonterminal("CompAttrConstructor", e0);
+ }
+
+ function try_CompAttrConstructor()
+ {
+ shiftT(83); // 'attribute'
+ lookahead1W(249); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 281: // '{'
+ shiftT(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ break;
+ default:
+ try_EQName();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ switch (l1)
+ {
+ case 281: // '{'
+ lookahead2W(280); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 147225) // '{' '}'
+ {
+ lk = memoized(18, 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(281); // '{'
+ lookahead1W(91); // S^WS | '(:' | '}'
+ shiftT(287); // '}'
+ memoize(18, e0A, -1);
+ lk = -3;
+ }
+ 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(18, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shiftT(281); // '{'
+ lookahead1W(91); // S^WS | '(:' | '}'
+ shiftT(287); // '}'
+ break;
+ case -3:
+ break;
+ default:
+ try_BlockExpr();
+ }
+ }
+
+ function parse_CompPIConstructor()
+ {
+ eventHandler.startNonterminal("CompPIConstructor", e0);
+ shift(220); // 'processing-instruction'
+ lookahead1W(241); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 281: // '{'
+ shift(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_Expr();
+ shift(287); // '}'
+ break;
+ default:
+ whitespace();
+ parse_NCName();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ switch (l1)
+ {
+ case 281: // '{'
+ lookahead2W(280); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 147225) // '{' '}'
+ {
+ lk = memoized(19, 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(281); // '{'
+ lookahead1W(91); // S^WS | '(:' | '}'
+ shiftT(287); // '}'
+ 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(19, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shift(281); // '{'
+ lookahead1W(91); // S^WS | '(:' | '}'
+ shift(287); // '}'
+ break;
+ default:
+ whitespace();
+ parse_BlockExpr();
+ }
+ eventHandler.endNonterminal("CompPIConstructor", e0);
+ }
+
+ function try_CompPIConstructor()
+ {
+ shiftT(220); // 'processing-instruction'
+ lookahead1W(241); // NCName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ switch (l1)
+ {
+ case 281: // '{'
+ shiftT(281); // '{'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_Expr();
+ shiftT(287); // '}'
+ break;
+ default:
+ try_NCName();
+ }
+ lookahead1W(90); // S^WS | '(:' | '{'
+ switch (l1)
+ {
+ case 281: // '{'
+ lookahead2W(280); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 147225) // '{' '}'
+ {
+ lk = memoized(19, 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(281); // '{'
+ lookahead1W(91); // S^WS | '(:' | '}'
+ shiftT(287); // '}'
+ memoize(19, e0A, -1);
+ lk = -3;
+ }
+ 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(19, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shiftT(281); // '{'
+ lookahead1W(91); // S^WS | '(:' | '}'
+ shiftT(287); // '}'
+ break;
+ case -3:
+ break;
+ default:
+ try_BlockExpr();
+ }
+ }
+
+ function parse_CompCommentConstructor()
+ {
+ eventHandler.startNonterminal("CompCommentConstructor", e0);
+ shift(97); // 'comment'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ whitespace();
+ parse_BlockExpr();
+ eventHandler.endNonterminal("CompCommentConstructor", e0);
+ }
+
+ function try_CompCommentConstructor()
+ {
+ shiftT(97); // 'comment'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ try_BlockExpr();
+ }
+
+ function parse_CompTextConstructor()
+ {
+ eventHandler.startNonterminal("CompTextConstructor", e0);
+ shift(249); // 'text'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ whitespace();
+ parse_BlockExpr();
+ eventHandler.endNonterminal("CompTextConstructor", e0);
+ }
+
+ function try_CompTextConstructor()
+ {
+ shiftT(249); // 'text'
+ lookahead1W(90); // S^WS | '(:' | '{'
+ try_BlockExpr();
+ }
+
+ function parse_PrimaryExpr()
+ {
+ eventHandler.startNonterminal("PrimaryExpr", e0);
+ switch (l1)
+ {
+ case 187: // 'namespace'
+ lookahead2W(246); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 220: // 'processing-instruction'
+ lookahead2W(244); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 281: // '{'
+ lookahead2W(282); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 83: // 'attribute'
+ case 122: // 'element'
+ lookahead2W(252); // EQName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 97: // 'comment'
+ case 249: // 'text'
+ lookahead2W(97); // S^WS | '#' | '(:' | '{'
+ break;
+ case 120: // 'document'
+ case 206: // 'ordered'
+ case 262: // 'unordered'
+ lookahead2W(148); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 135: // 'false'
+ case 197: // 'null'
+ case 255: // 'true'
+ lookahead2W(236); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '.' |
+ break;
+ case 6: // EQName^Token
+ case 71: // 'after'
+ case 73: // 'allowing'
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 76: // 'and'
+ case 78: // 'append'
+ case 80: // 'as'
+ case 81: // 'ascending'
+ case 82: // 'at'
+ case 84: // 'base-uri'
+ case 85: // 'before'
+ case 86: // 'boundary-space'
+ case 87: // 'break'
+ case 89: // 'case'
+ case 90: // 'cast'
+ case 91: // 'castable'
+ case 92: // 'catch'
+ case 94: // 'child'
+ case 95: // 'collation'
+ case 98: // 'constraint'
+ case 99: // 'construction'
+ case 102: // 'context'
+ case 103: // 'continue'
+ case 104: // 'copy'
+ case 105: // 'copy-namespaces'
+ case 106: // 'count'
+ case 107: // 'decimal-format'
+ case 109: // 'declare'
+ case 110: // 'default'
+ case 111: // 'delete'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 114: // 'descending'
+ case 119: // 'div'
+ case 123: // 'else'
+ case 124: // 'empty'
+ case 126: // 'encoding'
+ case 127: // 'end'
+ case 129: // 'eq'
+ case 130: // 'every'
+ case 132: // 'except'
+ case 133: // 'exit'
+ case 134: // 'external'
+ case 136: // 'first'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 139: // 'for'
+ case 142: // 'from'
+ case 143: // 'ft-option'
+ case 148: // 'ge'
+ case 150: // 'group'
+ case 152: // 'gt'
+ case 153: // 'idiv'
+ case 155: // 'import'
+ case 156: // 'in'
+ case 157: // 'index'
+ case 161: // 'insert'
+ case 162: // 'instance'
+ case 163: // 'integrity'
+ case 164: // 'intersect'
+ case 165: // 'into'
+ case 166: // 'is'
+ case 168: // 'json'
+ case 170: // 'jsoniq'
+ case 173: // 'last'
+ case 174: // 'lax'
+ case 175: // 'le'
+ case 177: // 'let'
+ case 179: // 'loop'
+ case 181: // 'lt'
+ case 183: // 'mod'
+ case 184: // 'modify'
+ case 185: // 'module'
+ case 189: // 'ne'
+ case 195: // 'nodes'
+ case 198: // 'object'
+ case 202: // 'only'
+ case 203: // 'option'
+ case 204: // 'or'
+ case 205: // 'order'
+ case 207: // 'ordering'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ case 222: // 'rename'
+ case 223: // 'replace'
+ case 224: // 'return'
+ case 225: // 'returning'
+ case 226: // 'revalidation'
+ case 228: // 'satisfies'
+ case 229: // 'schema'
+ case 232: // 'score'
+ case 233: // 'select'
+ case 234: // 'self'
+ case 239: // 'sliding'
+ case 240: // 'some'
+ case 241: // 'stable'
+ case 242: // 'start'
+ case 245: // 'strict'
+ case 253: // 'to'
+ case 254: // 'treat'
+ case 256: // 'try'
+ case 257: // 'tumbling'
+ case 258: // 'type'
+ case 260: // 'union'
+ case 263: // 'updating'
+ case 266: // 'validate'
+ case 267: // 'value'
+ case 268: // 'variable'
+ case 269: // 'version'
+ case 272: // 'where'
+ case 273: // 'while'
+ case 276: // 'with'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 3353 // '{' EQName^Token
+ || lk == 4377 // '{' IntegerLiteral
+ || lk == 4889 // '{' DecimalLiteral
+ || lk == 5401 // '{' DoubleLiteral
+ || lk == 5913 // '{' StringLiteral
+ || lk == 16153 // '{' '$'
+ || lk == 16665 // '{' '$$'
+ || lk == 17177 // '{' '%'
+ || lk == 18055 // 'false' '('
+ || lk == 18117 // 'null' '('
+ || lk == 18175 // 'true' '('
+ || lk == 18201 // '{' '('
+ || lk == 18713 // '{' '(#'
+ || lk == 21273 // '{' '+'
+ || lk == 22297 // '{' '-'
+ || lk == 24345 // '{' '/'
+ || lk == 24857 // '{' '//'
+ || lk == 28441 // '{' '<'
+ || lk == 28953 // '{' '<!--'
+ || lk == 31001 // '{' '<?'
+ || lk == 35609 // '{' '['
+ || lk == 36633 // '{' 'after'
+ || lk == 37657 // '{' 'allowing'
+ || lk == 38169 // '{' 'ancestor'
+ || lk == 38681 // '{' 'ancestor-or-self'
+ || lk == 39193 // '{' 'and'
+ || lk == 40217 // '{' 'append'
+ || lk == 40729 // '{' 'array'
+ || lk == 41241 // '{' 'as'
+ || lk == 41753 // '{' 'ascending'
+ || lk == 42265 // '{' 'at'
+ || lk == 42777 // '{' 'attribute'
+ || lk == 43289 // '{' 'base-uri'
+ || lk == 43801 // '{' 'before'
+ || lk == 44313 // '{' 'boundary-space'
+ || lk == 44825 // '{' 'break'
+ || lk == 45849 // '{' 'case'
+ || lk == 46361 // '{' 'cast'
+ || lk == 46873 // '{' 'castable'
+ || lk == 47385 // '{' 'catch'
+ || lk == 48409 // '{' 'child'
+ || lk == 48921 // '{' 'collation'
+ || lk == 49945 // '{' 'comment'
+ || lk == 50457 // '{' 'constraint'
+ || lk == 50969 // '{' 'construction'
+ || lk == 52505 // '{' 'context'
+ || lk == 53017 // '{' 'continue'
+ || lk == 53529 // '{' 'copy'
+ || lk == 54041 // '{' 'copy-namespaces'
+ || lk == 54553 // '{' 'count'
+ || lk == 55065 // '{' 'decimal-format'
+ || lk == 56089 // '{' 'declare'
+ || lk == 56601 // '{' 'default'
+ || lk == 57113 // '{' 'delete'
+ || lk == 57625 // '{' 'descendant'
+ || lk == 58137 // '{' 'descendant-or-self'
+ || lk == 58649 // '{' 'descending'
+ || lk == 61209 // '{' 'div'
+ || lk == 61721 // '{' 'document'
+ || lk == 62233 // '{' 'document-node'
+ || lk == 62745 // '{' 'element'
+ || lk == 63257 // '{' 'else'
+ || lk == 63769 // '{' 'empty'
+ || lk == 64281 // '{' 'empty-sequence'
+ || lk == 64793 // '{' 'encoding'
+ || lk == 65305 // '{' 'end'
+ || lk == 66329 // '{' 'eq'
+ || lk == 66841 // '{' 'every'
+ || lk == 67865 // '{' 'except'
+ || lk == 68377 // '{' 'exit'
+ || lk == 68889 // '{' 'external'
+ || lk == 69401 // '{' 'false'
+ || lk == 69913 // '{' 'first'
+ || lk == 70425 // '{' 'following'
+ || lk == 70937 // '{' 'following-sibling'
+ || lk == 71449 // '{' 'for'
+ || lk == 72985 // '{' 'from'
+ || lk == 73497 // '{' 'ft-option'
+ || lk == 75545 // '{' 'function'
+ || lk == 76057 // '{' 'ge'
+ || lk == 77081 // '{' 'group'
+ || lk == 78105 // '{' 'gt'
+ || lk == 78617 // '{' 'idiv'
+ || lk == 79129 // '{' 'if'
+ || lk == 79641 // '{' 'import'
+ || lk == 80153 // '{' 'in'
+ || lk == 80665 // '{' 'index'
+ || lk == 82713 // '{' 'insert'
+ || lk == 83225 // '{' 'instance'
+ || lk == 83737 // '{' 'integrity'
+ || lk == 84249 // '{' 'intersect'
+ || lk == 84761 // '{' 'into'
+ || lk == 85273 // '{' 'is'
+ || lk == 85785 // '{' 'item'
+ || lk == 86297 // '{' 'json'
+ || lk == 86809 // '{' 'json-item'
+ || lk == 87321 // '{' 'jsoniq'
+ || lk == 88857 // '{' 'last'
+ || lk == 89369 // '{' 'lax'
+ || lk == 89881 // '{' 'le'
+ || lk == 90905 // '{' 'let'
+ || lk == 91929 // '{' 'loop'
+ || lk == 92953 // '{' 'lt'
+ || lk == 93977 // '{' 'mod'
+ || lk == 94489 // '{' 'modify'
+ || lk == 95001 // '{' 'module'
+ || lk == 96025 // '{' 'namespace'
+ || lk == 96537 // '{' 'namespace-node'
+ || lk == 97049 // '{' 'ne'
+ || lk == 99609 // '{' 'node'
+ || lk == 100121 // '{' 'nodes'
+ || lk == 100633 // '{' 'not'
+ || lk == 101145 // '{' 'null'
+ || lk == 101657 // '{' 'object'
+ || lk == 103705 // '{' 'only'
+ || lk == 104217 // '{' 'option'
+ || lk == 104729 // '{' 'or'
+ || lk == 105241 // '{' 'order'
+ || lk == 105753 // '{' 'ordered'
+ || lk == 106265 // '{' 'ordering'
+ || lk == 107801 // '{' 'parent'
+ || lk == 110873 // '{' 'preceding'
+ || lk == 111385 // '{' 'preceding-sibling'
+ || lk == 112921 // '{' 'processing-instruction'
+ || lk == 113945 // '{' 'rename'
+ || lk == 114457 // '{' 'replace'
+ || lk == 114969 // '{' 'return'
+ || lk == 115481 // '{' 'returning'
+ || lk == 115993 // '{' 'revalidation'
+ || lk == 117017 // '{' 'satisfies'
+ || lk == 117529 // '{' 'schema'
+ || lk == 118041 // '{' 'schema-attribute'
+ || lk == 118553 // '{' 'schema-element'
+ || lk == 119065 // '{' 'score'
+ || lk == 119577 // '{' 'select'
+ || lk == 120089 // '{' 'self'
+ || lk == 122649 // '{' 'sliding'
+ || lk == 123161 // '{' 'some'
+ || lk == 123673 // '{' 'stable'
+ || lk == 124185 // '{' 'start'
+ || lk == 125721 // '{' 'strict'
+ || lk == 126745 // '{' 'structured-item'
+ || lk == 127257 // '{' 'switch'
+ || lk == 127769 // '{' 'text'
+ || lk == 129817 // '{' 'to'
+ || lk == 130329 // '{' 'treat'
+ || lk == 130841 // '{' 'true'
+ || lk == 131353 // '{' 'try'
+ || lk == 131865 // '{' 'tumbling'
+ || lk == 132377 // '{' 'type'
+ || lk == 132889 // '{' 'typeswitch'
+ || lk == 133401 // '{' 'union'
+ || lk == 134425 // '{' 'unordered'
+ || lk == 134937 // '{' 'updating'
+ || lk == 136473 // '{' 'validate'
+ || lk == 136985 // '{' 'value'
+ || lk == 137497 // '{' 'variable'
+ || lk == 138009 // '{' 'version'
+ || lk == 139545 // '{' 'where'
+ || lk == 140057 // '{' 'while'
+ || lk == 141593 // '{' 'with'
+ || lk == 144153 // '{' '{'
+ || lk == 145177 // '{' '{|'
+ || lk == 147225) // '{' '}'
+ {
+ lk = memoized(20, 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_Literal();
+ 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_FunctionCall();
+ lk = -5;
+ }
+ catch (p5A)
+ {
+ 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_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(20, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 12935: // 'false' EOF
+ case 12997: // 'null' EOF
+ case 13055: // 'true' EOF
+ case 13447: // 'false' '!'
+ case 13509: // 'null' '!'
+ case 13567: // 'true' '!'
+ case 13959: // 'false' '!='
+ case 14021: // 'null' '!='
+ case 14079: // 'true' '!='
+ case 19591: // 'false' ')'
+ case 19653: // 'null' ')'
+ case 19711: // 'true' ')'
+ case 20103: // 'false' '*'
+ case 20165: // 'null' '*'
+ case 20223: // 'true' '*'
+ case 21127: // 'false' '+'
+ case 21189: // 'null' '+'
+ case 21247: // 'true' '+'
+ case 21639: // 'false' ','
+ case 21701: // 'null' ','
+ case 21759: // 'true' ','
+ case 22151: // 'false' '-'
+ case 22213: // 'null' '-'
+ case 22271: // 'true' '-'
+ case 23175: // 'false' '.'
+ case 23237: // 'null' '.'
+ case 23295: // 'true' '.'
+ case 24199: // 'false' '/'
+ case 24261: // 'null' '/'
+ case 24319: // 'true' '/'
+ case 24711: // 'false' '//'
+ case 24773: // 'null' '//'
+ case 24831: // 'true' '//'
+ case 25735: // 'false' ':'
+ case 25797: // 'null' ':'
+ case 25855: // 'true' ':'
+ case 27783: // 'false' ';'
+ case 27845: // 'null' ';'
+ case 27903: // 'true' ';'
+ case 28295: // 'false' '<'
+ case 28357: // 'null' '<'
+ case 28415: // 'true' '<'
+ case 29831: // 'false' '<<'
+ case 29893: // 'null' '<<'
+ case 29951: // 'true' '<<'
+ case 30343: // 'false' '<='
+ case 30405: // 'null' '<='
+ case 30463: // 'true' '<='
+ case 31367: // 'false' '='
+ case 31429: // 'null' '='
+ case 31487: // 'true' '='
+ case 31879: // 'false' '>'
+ case 31941: // 'null' '>'
+ case 31999: // 'true' '>'
+ case 32391: // 'false' '>='
+ case 32453: // 'null' '>='
+ case 32511: // 'true' '>='
+ case 32903: // 'false' '>>'
+ case 32965: // 'null' '>>'
+ case 33023: // 'true' '>>'
+ case 35463: // 'false' '['
+ case 35525: // 'null' '['
+ case 35583: // 'true' '['
+ case 35975: // 'false' ']'
+ case 36037: // 'null' ']'
+ case 36095: // 'true' ']'
+ case 36487: // 'false' 'after'
+ case 36549: // 'null' 'after'
+ case 36607: // 'true' 'after'
+ case 39047: // 'false' 'and'
+ case 39109: // 'null' 'and'
+ case 39167: // 'true' 'and'
+ case 41095: // 'false' 'as'
+ case 41157: // 'null' 'as'
+ case 41215: // 'true' 'as'
+ case 41607: // 'false' 'ascending'
+ case 41669: // 'null' 'ascending'
+ case 41727: // 'true' 'ascending'
+ case 42119: // 'false' 'at'
+ case 42181: // 'null' 'at'
+ case 42239: // 'true' 'at'
+ case 43655: // 'false' 'before'
+ case 43717: // 'null' 'before'
+ case 43775: // 'true' 'before'
+ case 45191: // 'false' 'by'
+ case 45253: // 'null' 'by'
+ case 45311: // 'true' 'by'
+ case 45703: // 'false' 'case'
+ case 45765: // 'null' 'case'
+ case 45823: // 'true' 'case'
+ case 46215: // 'false' 'cast'
+ case 46277: // 'null' 'cast'
+ case 46335: // 'true' 'cast'
+ case 46727: // 'false' 'castable'
+ case 46789: // 'null' 'castable'
+ case 46847: // 'true' 'castable'
+ case 48775: // 'false' 'collation'
+ case 48837: // 'null' 'collation'
+ case 48895: // 'true' 'collation'
+ case 51335: // 'false' 'contains'
+ case 51397: // 'null' 'contains'
+ case 51455: // 'true' 'contains'
+ case 54407: // 'false' 'count'
+ case 54469: // 'null' 'count'
+ case 54527: // 'true' 'count'
+ case 56455: // 'false' 'default'
+ case 56517: // 'null' 'default'
+ case 56575: // 'true' 'default'
+ case 58503: // 'false' 'descending'
+ case 58565: // 'null' 'descending'
+ case 58623: // 'true' 'descending'
+ case 61063: // 'false' 'div'
+ case 61125: // 'null' 'div'
+ case 61183: // 'true' 'div'
+ case 63111: // 'false' 'else'
+ case 63173: // 'null' 'else'
+ case 63231: // 'true' 'else'
+ case 63623: // 'false' 'empty'
+ case 63685: // 'null' 'empty'
+ case 63743: // 'true' 'empty'
+ case 65159: // 'false' 'end'
+ case 65221: // 'null' 'end'
+ case 65279: // 'true' 'end'
+ case 66183: // 'false' 'eq'
+ case 66245: // 'null' 'eq'
+ case 66303: // 'true' 'eq'
+ case 67719: // 'false' 'except'
+ case 67781: // 'null' 'except'
+ case 67839: // 'true' 'except'
+ case 71303: // 'false' 'for'
+ case 71365: // 'null' 'for'
+ case 71423: // 'true' 'for'
+ case 75911: // 'false' 'ge'
+ case 75973: // 'null' 'ge'
+ case 76031: // 'true' 'ge'
+ case 76935: // 'false' 'group'
+ case 76997: // 'null' 'group'
+ case 77055: // 'true' 'group'
+ case 77959: // 'false' 'gt'
+ case 78021: // 'null' 'gt'
+ case 78079: // 'true' 'gt'
+ case 78471: // 'false' 'idiv'
+ case 78533: // 'null' 'idiv'
+ case 78591: // 'true' 'idiv'
+ case 83079: // 'false' 'instance'
+ case 83141: // 'null' 'instance'
+ case 83199: // 'true' 'instance'
+ case 84103: // 'false' 'intersect'
+ case 84165: // 'null' 'intersect'
+ case 84223: // 'true' 'intersect'
+ case 84615: // 'false' 'into'
+ case 84677: // 'null' 'into'
+ case 84735: // 'true' 'into'
+ case 85127: // 'false' 'is'
+ case 85189: // 'null' 'is'
+ case 85247: // 'true' 'is'
+ case 89735: // 'false' 'le'
+ case 89797: // 'null' 'le'
+ case 89855: // 'true' 'le'
+ case 90759: // 'false' 'let'
+ case 90821: // 'null' 'let'
+ case 90879: // 'true' 'let'
+ case 92807: // 'false' 'lt'
+ case 92869: // 'null' 'lt'
+ case 92927: // 'true' 'lt'
+ case 93831: // 'false' 'mod'
+ case 93893: // 'null' 'mod'
+ case 93951: // 'true' 'mod'
+ case 94343: // 'false' 'modify'
+ case 94405: // 'null' 'modify'
+ case 94463: // 'true' 'modify'
+ case 96903: // 'false' 'ne'
+ case 96965: // 'null' 'ne'
+ case 97023: // 'true' 'ne'
+ case 103559: // 'false' 'only'
+ case 103621: // 'null' 'only'
+ case 103679: // 'true' 'only'
+ case 104583: // 'false' 'or'
+ case 104645: // 'null' 'or'
+ case 104703: // 'true' 'or'
+ case 105095: // 'false' 'order'
+ case 105157: // 'null' 'order'
+ case 105215: // 'true' 'order'
+ case 107143: // 'false' 'paragraphs'
+ case 107205: // 'null' 'paragraphs'
+ case 107263: // 'true' 'paragraphs'
+ case 114823: // 'false' 'return'
+ case 114885: // 'null' 'return'
+ case 114943: // 'true' 'return'
+ case 116871: // 'false' 'satisfies'
+ case 116933: // 'null' 'satisfies'
+ case 116991: // 'true' 'satisfies'
+ case 121479: // 'false' 'sentences'
+ case 121541: // 'null' 'sentences'
+ case 121599: // 'true' 'sentences'
+ case 123527: // 'false' 'stable'
+ case 123589: // 'null' 'stable'
+ case 123647: // 'true' 'stable'
+ case 124039: // 'false' 'start'
+ case 124101: // 'null' 'start'
+ case 124159: // 'true' 'start'
+ case 129159: // 'false' 'times'
+ case 129221: // 'null' 'times'
+ case 129279: // 'true' 'times'
+ case 129671: // 'false' 'to'
+ case 129733: // 'null' 'to'
+ case 129791: // 'true' 'to'
+ case 130183: // 'false' 'treat'
+ case 130245: // 'null' 'treat'
+ case 130303: // 'true' 'treat'
+ case 133255: // 'false' 'union'
+ case 133317: // 'null' 'union'
+ case 133375: // 'true' 'union'
+ case 139399: // 'false' 'where'
+ case 139461: // 'null' 'where'
+ case 139519: // 'true' 'where'
+ case 141447: // 'false' 'with'
+ case 141509: // 'null' 'with'
+ case 141567: // 'true' 'with'
+ case 142983: // 'false' 'words'
+ case 143045: // 'null' 'words'
+ case 143103: // 'true' 'words'
+ case 145543: // 'false' '|'
+ case 145605: // 'null' '|'
+ case 145663: // 'true' '|'
+ case 146055: // 'false' '||'
+ case 146117: // 'null' '||'
+ case 146175: // 'true' '||'
+ case 146567: // 'false' '|}'
+ case 146629: // 'null' '|}'
+ case 146687: // 'true' '|}'
+ case 147079: // 'false' '}'
+ case 147141: // 'null' '}'
+ case 147199: // 'true' '}'
+ parse_Literal();
+ break;
+ case 31: // '$'
+ parse_VarRef();
+ break;
+ case 35: // '('
+ parse_ParenthesizedExpr();
+ break;
+ case 32: // '$$'
+ parse_ContextItemExpr();
+ break;
+ case -5:
+ case 17926: // EQName^Token '('
+ case 17991: // 'after' '('
+ case 17993: // 'allowing' '('
+ case 17994: // 'ancestor' '('
+ case 17995: // 'ancestor-or-self' '('
+ case 17996: // 'and' '('
+ case 17998: // 'append' '('
+ case 18000: // 'as' '('
+ case 18001: // 'ascending' '('
+ case 18002: // 'at' '('
+ case 18004: // 'base-uri' '('
+ case 18005: // 'before' '('
+ case 18006: // 'boundary-space' '('
+ case 18007: // 'break' '('
+ case 18009: // 'case' '('
+ case 18010: // 'cast' '('
+ case 18011: // 'castable' '('
+ case 18012: // 'catch' '('
+ case 18014: // 'child' '('
+ case 18015: // 'collation' '('
+ case 18018: // 'constraint' '('
+ case 18019: // 'construction' '('
+ case 18022: // 'context' '('
+ case 18023: // 'continue' '('
+ case 18024: // 'copy' '('
+ case 18025: // 'copy-namespaces' '('
+ case 18026: // 'count' '('
+ case 18027: // 'decimal-format' '('
+ case 18029: // 'declare' '('
+ case 18030: // 'default' '('
+ case 18031: // 'delete' '('
+ case 18032: // 'descendant' '('
+ case 18033: // 'descendant-or-self' '('
+ case 18034: // 'descending' '('
+ case 18039: // 'div' '('
+ case 18040: // 'document' '('
+ case 18043: // 'else' '('
+ case 18044: // 'empty' '('
+ case 18046: // 'encoding' '('
+ case 18047: // 'end' '('
+ case 18049: // 'eq' '('
+ case 18050: // 'every' '('
+ case 18052: // 'except' '('
+ case 18053: // 'exit' '('
+ case 18054: // 'external' '('
+ case 18056: // 'first' '('
+ case 18057: // 'following' '('
+ case 18058: // 'following-sibling' '('
+ case 18059: // 'for' '('
+ case 18062: // 'from' '('
+ case 18063: // 'ft-option' '('
+ case 18068: // 'ge' '('
+ case 18070: // 'group' '('
+ case 18072: // 'gt' '('
+ case 18073: // 'idiv' '('
+ case 18075: // 'import' '('
+ case 18076: // 'in' '('
+ case 18077: // 'index' '('
+ case 18081: // 'insert' '('
+ case 18082: // 'instance' '('
+ case 18083: // 'integrity' '('
+ case 18084: // 'intersect' '('
+ case 18085: // 'into' '('
+ case 18086: // 'is' '('
+ case 18088: // 'json' '('
+ case 18090: // 'jsoniq' '('
+ case 18093: // 'last' '('
+ case 18094: // 'lax' '('
+ case 18095: // 'le' '('
+ case 18097: // 'let' '('
+ case 18099: // 'loop' '('
+ case 18101: // 'lt' '('
+ case 18103: // 'mod' '('
+ case 18104: // 'modify' '('
+ case 18105: // 'module' '('
+ case 18107: // 'namespace' '('
+ case 18109: // 'ne' '('
+ case 18115: // 'nodes' '('
+ case 18118: // 'object' '('
+ case 18122: // 'only' '('
+ case 18123: // 'option' '('
+ case 18124: // 'or' '('
+ case 18125: // 'order' '('
+ case 18126: // 'ordered' '('
+ case 18127: // 'ordering' '('
+ case 18130: // 'parent' '('
+ case 18136: // 'preceding' '('
+ case 18137: // 'preceding-sibling' '('
+ case 18142: // 'rename' '('
+ case 18143: // 'replace' '('
+ case 18144: // 'return' '('
+ case 18145: // 'returning' '('
+ case 18146: // 'revalidation' '('
+ case 18148: // 'satisfies' '('
+ case 18149: // 'schema' '('
+ case 18152: // 'score' '('
+ case 18153: // 'select' '('
+ case 18154: // 'self' '('
+ case 18159: // 'sliding' '('
+ case 18160: // 'some' '('
+ case 18161: // 'stable' '('
+ case 18162: // 'start' '('
+ case 18165: // 'strict' '('
+ case 18173: // 'to' '('
+ case 18174: // 'treat' '('
+ case 18176: // 'try' '('
+ case 18177: // 'tumbling' '('
+ case 18178: // 'type' '('
+ case 18180: // 'union' '('
+ case 18182: // 'unordered' '('
+ case 18183: // 'updating' '('
+ case 18186: // 'validate' '('
+ case 18187: // 'value' '('
+ case 18188: // 'variable' '('
+ case 18189: // 'version' '('
+ case 18192: // 'where' '('
+ case 18193: // 'while' '('
+ case 18196: // 'with' '('
+ parse_FunctionCall();
+ break;
+ case 144078: // 'ordered' '{'
+ parse_OrderedExpr();
+ break;
+ case 144134: // 'unordered' '{'
+ parse_UnorderedExpr();
+ break;
+ case 33: // '%'
+ case 79: // 'array'
+ case 121: // 'document-node'
+ case 125: // 'empty-sequence'
+ case 147: // 'function'
+ case 154: // 'if'
+ case 167: // 'item'
+ case 169: // 'json-item'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 247: // 'structured-item'
+ case 248: // 'switch'
+ case 259: // 'typeswitch'
+ case 14854: // EQName^Token '#'
+ case 14919: // 'after' '#'
+ case 14921: // 'allowing' '#'
+ case 14922: // 'ancestor' '#'
+ case 14923: // 'ancestor-or-self' '#'
+ case 14924: // 'and' '#'
+ case 14926: // 'append' '#'
+ case 14928: // 'as' '#'
+ case 14929: // 'ascending' '#'
+ case 14930: // 'at' '#'
+ case 14931: // 'attribute' '#'
+ case 14932: // 'base-uri' '#'
+ case 14933: // 'before' '#'
+ case 14934: // 'boundary-space' '#'
+ case 14935: // 'break' '#'
+ case 14937: // 'case' '#'
+ case 14938: // 'cast' '#'
+ case 14939: // 'castable' '#'
+ case 14940: // 'catch' '#'
+ case 14942: // 'child' '#'
+ case 14943: // 'collation' '#'
+ case 14945: // 'comment' '#'
+ case 14946: // 'constraint' '#'
+ case 14947: // 'construction' '#'
+ case 14950: // 'context' '#'
+ case 14951: // 'continue' '#'
+ case 14952: // 'copy' '#'
+ case 14953: // 'copy-namespaces' '#'
+ case 14954: // 'count' '#'
+ case 14955: // 'decimal-format' '#'
+ case 14957: // 'declare' '#'
+ case 14958: // 'default' '#'
+ case 14959: // 'delete' '#'
+ case 14960: // 'descendant' '#'
+ case 14961: // 'descendant-or-self' '#'
+ case 14962: // 'descending' '#'
+ case 14967: // 'div' '#'
+ case 14968: // 'document' '#'
+ case 14970: // 'element' '#'
+ case 14971: // 'else' '#'
+ case 14972: // 'empty' '#'
+ case 14974: // 'encoding' '#'
+ case 14975: // 'end' '#'
+ case 14977: // 'eq' '#'
+ case 14978: // 'every' '#'
+ case 14980: // 'except' '#'
+ case 14981: // 'exit' '#'
+ case 14982: // 'external' '#'
+ case 14983: // 'false' '#'
+ case 14984: // 'first' '#'
+ case 14985: // 'following' '#'
+ case 14986: // 'following-sibling' '#'
+ case 14987: // 'for' '#'
+ case 14990: // 'from' '#'
+ case 14991: // 'ft-option' '#'
+ case 14996: // 'ge' '#'
+ case 14998: // 'group' '#'
+ case 15000: // 'gt' '#'
+ case 15001: // 'idiv' '#'
+ case 15003: // 'import' '#'
+ case 15004: // 'in' '#'
+ case 15005: // 'index' '#'
+ case 15009: // 'insert' '#'
+ case 15010: // 'instance' '#'
+ case 15011: // 'integrity' '#'
+ case 15012: // 'intersect' '#'
+ case 15013: // 'into' '#'
+ case 15014: // 'is' '#'
+ case 15016: // 'json' '#'
+ case 15018: // 'jsoniq' '#'
+ case 15021: // 'last' '#'
+ case 15022: // 'lax' '#'
+ case 15023: // 'le' '#'
+ case 15025: // 'let' '#'
+ case 15027: // 'loop' '#'
+ case 15029: // 'lt' '#'
+ case 15031: // 'mod' '#'
+ case 15032: // 'modify' '#'
+ case 15033: // 'module' '#'
+ case 15035: // 'namespace' '#'
+ case 15037: // 'ne' '#'
+ case 15043: // 'nodes' '#'
+ case 15045: // 'null' '#'
+ case 15046: // 'object' '#'
+ case 15050: // 'only' '#'
+ case 15051: // 'option' '#'
+ case 15052: // 'or' '#'
+ case 15053: // 'order' '#'
+ case 15054: // 'ordered' '#'
+ case 15055: // 'ordering' '#'
+ case 15058: // 'parent' '#'
+ case 15064: // 'preceding' '#'
+ case 15065: // 'preceding-sibling' '#'
+ case 15068: // 'processing-instruction' '#'
+ case 15070: // 'rename' '#'
+ case 15071: // 'replace' '#'
+ case 15072: // 'return' '#'
+ case 15073: // 'returning' '#'
+ case 15074: // 'revalidation' '#'
+ case 15076: // 'satisfies' '#'
+ case 15077: // 'schema' '#'
+ case 15080: // 'score' '#'
+ case 15081: // 'select' '#'
+ case 15082: // 'self' '#'
+ case 15087: // 'sliding' '#'
+ case 15088: // 'some' '#'
+ case 15089: // 'stable' '#'
+ case 15090: // 'start' '#'
+ case 15093: // 'strict' '#'
+ case 15097: // 'text' '#'
+ case 15101: // 'to' '#'
+ case 15102: // 'treat' '#'
+ case 15103: // 'true' '#'
+ case 15104: // 'try' '#'
+ case 15105: // 'tumbling' '#'
+ case 15106: // 'type' '#'
+ case 15108: // 'union' '#'
+ case 15110: // 'unordered' '#'
+ case 15111: // 'updating' '#'
+ case 15114: // 'validate' '#'
+ case 15115: // 'value' '#'
+ case 15116: // 'variable' '#'
+ case 15117: // 'version' '#'
+ case 15120: // 'where' '#'
+ case 15121: // 'while' '#'
+ case 15124: // 'with' '#'
+ parse_FunctionItemExpr();
+ break;
+ case -10:
+ case 27929: // '{' ';'
+ parse_BlockExpr();
+ break;
+ case -11:
+ case 10009: // '{' NCName^Token
+ parse_ObjectConstructor();
+ break;
+ case 69: // '['
+ parse_ArrayConstructor();
+ break;
+ case 283: // '{|'
+ parse_JSONSimpleObjectUnion();
+ break;
+ default:
+ parse_Constructor();
+ }
+ eventHandler.endNonterminal("PrimaryExpr", e0);
+ }
+
+ function try_PrimaryExpr()
+ {
+ switch (l1)
+ {
+ case 187: // 'namespace'
+ lookahead2W(246); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 220: // 'processing-instruction'
+ lookahead2W(244); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 281: // '{'
+ lookahead2W(282); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 83: // 'attribute'
+ case 122: // 'element'
+ lookahead2W(252); // EQName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 97: // 'comment'
+ case 249: // 'text'
+ lookahead2W(97); // S^WS | '#' | '(:' | '{'
+ break;
+ case 120: // 'document'
+ case 206: // 'ordered'
+ case 262: // 'unordered'
+ lookahead2W(148); // S^WS | '#' | '(' | '(:' | '{'
+ break;
+ case 135: // 'false'
+ case 197: // 'null'
+ case 255: // 'true'
+ lookahead2W(236); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '.' |
+ break;
+ case 6: // EQName^Token
+ case 71: // 'after'
+ case 73: // 'allowing'
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 76: // 'and'
+ case 78: // 'append'
+ case 80: // 'as'
+ case 81: // 'ascending'
+ case 82: // 'at'
+ case 84: // 'base-uri'
+ case 85: // 'before'
+ case 86: // 'boundary-space'
+ case 87: // 'break'
+ case 89: // 'case'
+ case 90: // 'cast'
+ case 91: // 'castable'
+ case 92: // 'catch'
+ case 94: // 'child'
+ case 95: // 'collation'
+ case 98: // 'constraint'
+ case 99: // 'construction'
+ case 102: // 'context'
+ case 103: // 'continue'
+ case 104: // 'copy'
+ case 105: // 'copy-namespaces'
+ case 106: // 'count'
+ case 107: // 'decimal-format'
+ case 109: // 'declare'
+ case 110: // 'default'
+ case 111: // 'delete'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 114: // 'descending'
+ case 119: // 'div'
+ case 123: // 'else'
+ case 124: // 'empty'
+ case 126: // 'encoding'
+ case 127: // 'end'
+ case 129: // 'eq'
+ case 130: // 'every'
+ case 132: // 'except'
+ case 133: // 'exit'
+ case 134: // 'external'
+ case 136: // 'first'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 139: // 'for'
+ case 142: // 'from'
+ case 143: // 'ft-option'
+ case 148: // 'ge'
+ case 150: // 'group'
+ case 152: // 'gt'
+ case 153: // 'idiv'
+ case 155: // 'import'
+ case 156: // 'in'
+ case 157: // 'index'
+ case 161: // 'insert'
+ case 162: // 'instance'
+ case 163: // 'integrity'
+ case 164: // 'intersect'
+ case 165: // 'into'
+ case 166: // 'is'
+ case 168: // 'json'
+ case 170: // 'jsoniq'
+ case 173: // 'last'
+ case 174: // 'lax'
+ case 175: // 'le'
+ case 177: // 'let'
+ case 179: // 'loop'
+ case 181: // 'lt'
+ case 183: // 'mod'
+ case 184: // 'modify'
+ case 185: // 'module'
+ case 189: // 'ne'
+ case 195: // 'nodes'
+ case 198: // 'object'
+ case 202: // 'only'
+ case 203: // 'option'
+ case 204: // 'or'
+ case 205: // 'order'
+ case 207: // 'ordering'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ case 222: // 'rename'
+ case 223: // 'replace'
+ case 224: // 'return'
+ case 225: // 'returning'
+ case 226: // 'revalidation'
+ case 228: // 'satisfies'
+ case 229: // 'schema'
+ case 232: // 'score'
+ case 233: // 'select'
+ case 234: // 'self'
+ case 239: // 'sliding'
+ case 240: // 'some'
+ case 241: // 'stable'
+ case 242: // 'start'
+ case 245: // 'strict'
+ case 253: // 'to'
+ case 254: // 'treat'
+ case 256: // 'try'
+ case 257: // 'tumbling'
+ case 258: // 'type'
+ case 260: // 'union'
+ case 263: // 'updating'
+ case 266: // 'validate'
+ case 267: // 'value'
+ case 268: // 'variable'
+ case 269: // 'version'
+ case 272: // 'where'
+ case 273: // 'while'
+ case 276: // 'with'
+ lookahead2W(95); // S^WS | '#' | '(' | '(:'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 3353 // '{' EQName^Token
+ || lk == 4377 // '{' IntegerLiteral
+ || lk == 4889 // '{' DecimalLiteral
+ || lk == 5401 // '{' DoubleLiteral
+ || lk == 5913 // '{' StringLiteral
+ || lk == 16153 // '{' '$'
+ || lk == 16665 // '{' '$$'
+ || lk == 17177 // '{' '%'
+ || lk == 18055 // 'false' '('
+ || lk == 18117 // 'null' '('
+ || lk == 18175 // 'true' '('
+ || lk == 18201 // '{' '('
+ || lk == 18713 // '{' '(#'
+ || lk == 21273 // '{' '+'
+ || lk == 22297 // '{' '-'
+ || lk == 24345 // '{' '/'
+ || lk == 24857 // '{' '//'
+ || lk == 28441 // '{' '<'
+ || lk == 28953 // '{' '<!--'
+ || lk == 31001 // '{' '<?'
+ || lk == 35609 // '{' '['
+ || lk == 36633 // '{' 'after'
+ || lk == 37657 // '{' 'allowing'
+ || lk == 38169 // '{' 'ancestor'
+ || lk == 38681 // '{' 'ancestor-or-self'
+ || lk == 39193 // '{' 'and'
+ || lk == 40217 // '{' 'append'
+ || lk == 40729 // '{' 'array'
+ || lk == 41241 // '{' 'as'
+ || lk == 41753 // '{' 'ascending'
+ || lk == 42265 // '{' 'at'
+ || lk == 42777 // '{' 'attribute'
+ || lk == 43289 // '{' 'base-uri'
+ || lk == 43801 // '{' 'before'
+ || lk == 44313 // '{' 'boundary-space'
+ || lk == 44825 // '{' 'break'
+ || lk == 45849 // '{' 'case'
+ || lk == 46361 // '{' 'cast'
+ || lk == 46873 // '{' 'castable'
+ || lk == 47385 // '{' 'catch'
+ || lk == 48409 // '{' 'child'
+ || lk == 48921 // '{' 'collation'
+ || lk == 49945 // '{' 'comment'
+ || lk == 50457 // '{' 'constraint'
+ || lk == 50969 // '{' 'construction'
+ || lk == 52505 // '{' 'context'
+ || lk == 53017 // '{' 'continue'
+ || lk == 53529 // '{' 'copy'
+ || lk == 54041 // '{' 'copy-namespaces'
+ || lk == 54553 // '{' 'count'
+ || lk == 55065 // '{' 'decimal-format'
+ || lk == 56089 // '{' 'declare'
+ || lk == 56601 // '{' 'default'
+ || lk == 57113 // '{' 'delete'
+ || lk == 57625 // '{' 'descendant'
+ || lk == 58137 // '{' 'descendant-or-self'
+ || lk == 58649 // '{' 'descending'
+ || lk == 61209 // '{' 'div'
+ || lk == 61721 // '{' 'document'
+ || lk == 62233 // '{' 'document-node'
+ || lk == 62745 // '{' 'element'
+ || lk == 63257 // '{' 'else'
+ || lk == 63769 // '{' 'empty'
+ || lk == 64281 // '{' 'empty-sequence'
+ || lk == 64793 // '{' 'encoding'
+ || lk == 65305 // '{' 'end'
+ || lk == 66329 // '{' 'eq'
+ || lk == 66841 // '{' 'every'
+ || lk == 67865 // '{' 'except'
+ || lk == 68377 // '{' 'exit'
+ || lk == 68889 // '{' 'external'
+ || lk == 69401 // '{' 'false'
+ || lk == 69913 // '{' 'first'
+ || lk == 70425 // '{' 'following'
+ || lk == 70937 // '{' 'following-sibling'
+ || lk == 71449 // '{' 'for'
+ || lk == 72985 // '{' 'from'
+ || lk == 73497 // '{' 'ft-option'
+ || lk == 75545 // '{' 'function'
+ || lk == 76057 // '{' 'ge'
+ || lk == 77081 // '{' 'group'
+ || lk == 78105 // '{' 'gt'
+ || lk == 78617 // '{' 'idiv'
+ || lk == 79129 // '{' 'if'
+ || lk == 79641 // '{' 'import'
+ || lk == 80153 // '{' 'in'
+ || lk == 80665 // '{' 'index'
+ || lk == 82713 // '{' 'insert'
+ || lk == 83225 // '{' 'instance'
+ || lk == 83737 // '{' 'integrity'
+ || lk == 84249 // '{' 'intersect'
+ || lk == 84761 // '{' 'into'
+ || lk == 85273 // '{' 'is'
+ || lk == 85785 // '{' 'item'
+ || lk == 86297 // '{' 'json'
+ || lk == 86809 // '{' 'json-item'
+ || lk == 87321 // '{' 'jsoniq'
+ || lk == 88857 // '{' 'last'
+ || lk == 89369 // '{' 'lax'
+ || lk == 89881 // '{' 'le'
+ || lk == 90905 // '{' 'let'
+ || lk == 91929 // '{' 'loop'
+ || lk == 92953 // '{' 'lt'
+ || lk == 93977 // '{' 'mod'
+ || lk == 94489 // '{' 'modify'
+ || lk == 95001 // '{' 'module'
+ || lk == 96025 // '{' 'namespace'
+ || lk == 96537 // '{' 'namespace-node'
+ || lk == 97049 // '{' 'ne'
+ || lk == 99609 // '{' 'node'
+ || lk == 100121 // '{' 'nodes'
+ || lk == 100633 // '{' 'not'
+ || lk == 101145 // '{' 'null'
+ || lk == 101657 // '{' 'object'
+ || lk == 103705 // '{' 'only'
+ || lk == 104217 // '{' 'option'
+ || lk == 104729 // '{' 'or'
+ || lk == 105241 // '{' 'order'
+ || lk == 105753 // '{' 'ordered'
+ || lk == 106265 // '{' 'ordering'
+ || lk == 107801 // '{' 'parent'
+ || lk == 110873 // '{' 'preceding'
+ || lk == 111385 // '{' 'preceding-sibling'
+ || lk == 112921 // '{' 'processing-instruction'
+ || lk == 113945 // '{' 'rename'
+ || lk == 114457 // '{' 'replace'
+ || lk == 114969 // '{' 'return'
+ || lk == 115481 // '{' 'returning'
+ || lk == 115993 // '{' 'revalidation'
+ || lk == 117017 // '{' 'satisfies'
+ || lk == 117529 // '{' 'schema'
+ || lk == 118041 // '{' 'schema-attribute'
+ || lk == 118553 // '{' 'schema-element'
+ || lk == 119065 // '{' 'score'
+ || lk == 119577 // '{' 'select'
+ || lk == 120089 // '{' 'self'
+ || lk == 122649 // '{' 'sliding'
+ || lk == 123161 // '{' 'some'
+ || lk == 123673 // '{' 'stable'
+ || lk == 124185 // '{' 'start'
+ || lk == 125721 // '{' 'strict'
+ || lk == 126745 // '{' 'structured-item'
+ || lk == 127257 // '{' 'switch'
+ || lk == 127769 // '{' 'text'
+ || lk == 129817 // '{' 'to'
+ || lk == 130329 // '{' 'treat'
+ || lk == 130841 // '{' 'true'
+ || lk == 131353 // '{' 'try'
+ || lk == 131865 // '{' 'tumbling'
+ || lk == 132377 // '{' 'type'
+ || lk == 132889 // '{' 'typeswitch'
+ || lk == 133401 // '{' 'union'
+ || lk == 134425 // '{' 'unordered'
+ || lk == 134937 // '{' 'updating'
+ || lk == 136473 // '{' 'validate'
+ || lk == 136985 // '{' 'value'
+ || lk == 137497 // '{' 'variable'
+ || lk == 138009 // '{' 'version'
+ || lk == 139545 // '{' 'where'
+ || lk == 140057 // '{' 'while'
+ || lk == 141593 // '{' 'with'
+ || lk == 144153 // '{' '{'
+ || lk == 145177 // '{' '{|'
+ || lk == 147225) // '{' '}'
+ {
+ lk = memoized(20, 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_Literal();
+ memoize(20, e0A, -1);
+ lk = -14;
+ }
+ 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_FunctionCall();
+ memoize(20, e0A, -5);
+ lk = -14;
+ }
+ catch (p5A)
+ {
+ 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_BlockExpr();
+ memoize(20, e0A, -10);
+ lk = -14;
+ }
+ 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(20, e0A, -11);
+ }
+ }
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 12935: // 'false' EOF
+ case 12997: // 'null' EOF
+ case 13055: // 'true' EOF
+ case 13447: // 'false' '!'
+ case 13509: // 'null' '!'
+ case 13567: // 'true' '!'
+ case 13959: // 'false' '!='
+ case 14021: // 'null' '!='
+ case 14079: // 'true' '!='
+ case 19591: // 'false' ')'
+ case 19653: // 'null' ')'
+ case 19711: // 'true' ')'
+ case 20103: // 'false' '*'
+ case 20165: // 'null' '*'
+ case 20223: // 'true' '*'
+ case 21127: // 'false' '+'
+ case 21189: // 'null' '+'
+ case 21247: // 'true' '+'
+ case 21639: // 'false' ','
+ case 21701: // 'null' ','
+ case 21759: // 'true' ','
+ case 22151: // 'false' '-'
+ case 22213: // 'null' '-'
+ case 22271: // 'true' '-'
+ case 23175: // 'false' '.'
+ case 23237: // 'null' '.'
+ case 23295: // 'true' '.'
+ case 24199: // 'false' '/'
+ case 24261: // 'null' '/'
+ case 24319: // 'true' '/'
+ case 24711: // 'false' '//'
+ case 24773: // 'null' '//'
+ case 24831: // 'true' '//'
+ case 25735: // 'false' ':'
+ case 25797: // 'null' ':'
+ case 25855: // 'true' ':'
+ case 27783: // 'false' ';'
+ case 27845: // 'null' ';'
+ case 27903: // 'true' ';'
+ case 28295: // 'false' '<'
+ case 28357: // 'null' '<'
+ case 28415: // 'true' '<'
+ case 29831: // 'false' '<<'
+ case 29893: // 'null' '<<'
+ case 29951: // 'true' '<<'
+ case 30343: // 'false' '<='
+ case 30405: // 'null' '<='
+ case 30463: // 'true' '<='
+ case 31367: // 'false' '='
+ case 31429: // 'null' '='
+ case 31487: // 'true' '='
+ case 31879: // 'false' '>'
+ case 31941: // 'null' '>'
+ case 31999: // 'true' '>'
+ case 32391: // 'false' '>='
+ case 32453: // 'null' '>='
+ case 32511: // 'true' '>='
+ case 32903: // 'false' '>>'
+ case 32965: // 'null' '>>'
+ case 33023: // 'true' '>>'
+ case 35463: // 'false' '['
+ case 35525: // 'null' '['
+ case 35583: // 'true' '['
+ case 35975: // 'false' ']'
+ case 36037: // 'null' ']'
+ case 36095: // 'true' ']'
+ case 36487: // 'false' 'after'
+ case 36549: // 'null' 'after'
+ case 36607: // 'true' 'after'
+ case 39047: // 'false' 'and'
+ case 39109: // 'null' 'and'
+ case 39167: // 'true' 'and'
+ case 41095: // 'false' 'as'
+ case 41157: // 'null' 'as'
+ case 41215: // 'true' 'as'
+ case 41607: // 'false' 'ascending'
+ case 41669: // 'null' 'ascending'
+ case 41727: // 'true' 'ascending'
+ case 42119: // 'false' 'at'
+ case 42181: // 'null' 'at'
+ case 42239: // 'true' 'at'
+ case 43655: // 'false' 'before'
+ case 43717: // 'null' 'before'
+ case 43775: // 'true' 'before'
+ case 45191: // 'false' 'by'
+ case 45253: // 'null' 'by'
+ case 45311: // 'true' 'by'
+ case 45703: // 'false' 'case'
+ case 45765: // 'null' 'case'
+ case 45823: // 'true' 'case'
+ case 46215: // 'false' 'cast'
+ case 46277: // 'null' 'cast'
+ case 46335: // 'true' 'cast'
+ case 46727: // 'false' 'castable'
+ case 46789: // 'null' 'castable'
+ case 46847: // 'true' 'castable'
+ case 48775: // 'false' 'collation'
+ case 48837: // 'null' 'collation'
+ case 48895: // 'true' 'collation'
+ case 51335: // 'false' 'contains'
+ case 51397: // 'null' 'contains'
+ case 51455: // 'true' 'contains'
+ case 54407: // 'false' 'count'
+ case 54469: // 'null' 'count'
+ case 54527: // 'true' 'count'
+ case 56455: // 'false' 'default'
+ case 56517: // 'null' 'default'
+ case 56575: // 'true' 'default'
+ case 58503: // 'false' 'descending'
+ case 58565: // 'null' 'descending'
+ case 58623: // 'true' 'descending'
+ case 61063: // 'false' 'div'
+ case 61125: // 'null' 'div'
+ case 61183: // 'true' 'div'
+ case 63111: // 'false' 'else'
+ case 63173: // 'null' 'else'
+ case 63231: // 'true' 'else'
+ case 63623: // 'false' 'empty'
+ case 63685: // 'null' 'empty'
+ case 63743: // 'true' 'empty'
+ case 65159: // 'false' 'end'
+ case 65221: // 'null' 'end'
+ case 65279: // 'true' 'end'
+ case 66183: // 'false' 'eq'
+ case 66245: // 'null' 'eq'
+ case 66303: // 'true' 'eq'
+ case 67719: // 'false' 'except'
+ case 67781: // 'null' 'except'
+ case 67839: // 'true' 'except'
+ case 71303: // 'false' 'for'
+ case 71365: // 'null' 'for'
+ case 71423: // 'true' 'for'
+ case 75911: // 'false' 'ge'
+ case 75973: // 'null' 'ge'
+ case 76031: // 'true' 'ge'
+ case 76935: // 'false' 'group'
+ case 76997: // 'null' 'group'
+ case 77055: // 'true' 'group'
+ case 77959: // 'false' 'gt'
+ case 78021: // 'null' 'gt'
+ case 78079: // 'true' 'gt'
+ case 78471: // 'false' 'idiv'
+ case 78533: // 'null' 'idiv'
+ case 78591: // 'true' 'idiv'
+ case 83079: // 'false' 'instance'
+ case 83141: // 'null' 'instance'
+ case 83199: // 'true' 'instance'
+ case 84103: // 'false' 'intersect'
+ case 84165: // 'null' 'intersect'
+ case 84223: // 'true' 'intersect'
+ case 84615: // 'false' 'into'
+ case 84677: // 'null' 'into'
+ case 84735: // 'true' 'into'
+ case 85127: // 'false' 'is'
+ case 85189: // 'null' 'is'
+ case 85247: // 'true' 'is'
+ case 89735: // 'false' 'le'
+ case 89797: // 'null' 'le'
+ case 89855: // 'true' 'le'
+ case 90759: // 'false' 'let'
+ case 90821: // 'null' 'let'
+ case 90879: // 'true' 'let'
+ case 92807: // 'false' 'lt'
+ case 92869: // 'null' 'lt'
+ case 92927: // 'true' 'lt'
+ case 93831: // 'false' 'mod'
+ case 93893: // 'null' 'mod'
+ case 93951: // 'true' 'mod'
+ case 94343: // 'false' 'modify'
+ case 94405: // 'null' 'modify'
+ case 94463: // 'true' 'modify'
+ case 96903: // 'false' 'ne'
+ case 96965: // 'null' 'ne'
+ case 97023: // 'true' 'ne'
+ case 103559: // 'false' 'only'
+ case 103621: // 'null' 'only'
+ case 103679: // 'true' 'only'
+ case 104583: // 'false' 'or'
+ case 104645: // 'null' 'or'
+ case 104703: // 'true' 'or'
+ case 105095: // 'false' 'order'
+ case 105157: // 'null' 'order'
+ case 105215: // 'true' 'order'
+ case 107143: // 'false' 'paragraphs'
+ case 107205: // 'null' 'paragraphs'
+ case 107263: // 'true' 'paragraphs'
+ case 114823: // 'false' 'return'
+ case 114885: // 'null' 'return'
+ case 114943: // 'true' 'return'
+ case 116871: // 'false' 'satisfies'
+ case 116933: // 'null' 'satisfies'
+ case 116991: // 'true' 'satisfies'
+ case 121479: // 'false' 'sentences'
+ case 121541: // 'null' 'sentences'
+ case 121599: // 'true' 'sentences'
+ case 123527: // 'false' 'stable'
+ case 123589: // 'null' 'stable'
+ case 123647: // 'true' 'stable'
+ case 124039: // 'false' 'start'
+ case 124101: // 'null' 'start'
+ case 124159: // 'true' 'start'
+ case 129159: // 'false' 'times'
+ case 129221: // 'null' 'times'
+ case 129279: // 'true' 'times'
+ case 129671: // 'false' 'to'
+ case 129733: // 'null' 'to'
+ case 129791: // 'true' 'to'
+ case 130183: // 'false' 'treat'
+ case 130245: // 'null' 'treat'
+ case 130303: // 'true' 'treat'
+ case 133255: // 'false' 'union'
+ case 133317: // 'null' 'union'
+ case 133375: // 'true' 'union'
+ case 139399: // 'false' 'where'
+ case 139461: // 'null' 'where'
+ case 139519: // 'true' 'where'
+ case 141447: // 'false' 'with'
+ case 141509: // 'null' 'with'
+ case 141567: // 'true' 'with'
+ case 142983: // 'false' 'words'
+ case 143045: // 'null' 'words'
+ case 143103: // 'true' 'words'
+ case 145543: // 'false' '|'
+ case 145605: // 'null' '|'
+ case 145663: // 'true' '|'
+ case 146055: // 'false' '||'
+ case 146117: // 'null' '||'
+ case 146175: // 'true' '||'
+ case 146567: // 'false' '|}'
+ case 146629: // 'null' '|}'
+ case 146687: // 'true' '|}'
+ case 147079: // 'false' '}'
+ case 147141: // 'null' '}'
+ case 147199: // 'true' '}'
+ try_Literal();
+ break;
+ case 31: // '$'
+ try_VarRef();
+ break;
+ case 35: // '('
+ try_ParenthesizedExpr();
+ break;
+ case 32: // '$$'
+ try_ContextItemExpr();
+ break;
+ case -5:
+ case 17926: // EQName^Token '('
+ case 17991: // 'after' '('
+ case 17993: // 'allowing' '('
+ case 17994: // 'ancestor' '('
+ case 17995: // 'ancestor-or-self' '('
+ case 17996: // 'and' '('
+ case 17998: // 'append' '('
+ case 18000: // 'as' '('
+ case 18001: // 'ascending' '('
+ case 18002: // 'at' '('
+ case 18004: // 'base-uri' '('
+ case 18005: // 'before' '('
+ case 18006: // 'boundary-space' '('
+ case 18007: // 'break' '('
+ case 18009: // 'case' '('
+ case 18010: // 'cast' '('
+ case 18011: // 'castable' '('
+ case 18012: // 'catch' '('
+ case 18014: // 'child' '('
+ case 18015: // 'collation' '('
+ case 18018: // 'constraint' '('
+ case 18019: // 'construction' '('
+ case 18022: // 'context' '('
+ case 18023: // 'continue' '('
+ case 18024: // 'copy' '('
+ case 18025: // 'copy-namespaces' '('
+ case 18026: // 'count' '('
+ case 18027: // 'decimal-format' '('
+ case 18029: // 'declare' '('
+ case 18030: // 'default' '('
+ case 18031: // 'delete' '('
+ case 18032: // 'descendant' '('
+ case 18033: // 'descendant-or-self' '('
+ case 18034: // 'descending' '('
+ case 18039: // 'div' '('
+ case 18040: // 'document' '('
+ case 18043: // 'else' '('
+ case 18044: // 'empty' '('
+ case 18046: // 'encoding' '('
+ case 18047: // 'end' '('
+ case 18049: // 'eq' '('
+ case 18050: // 'every' '('
+ case 18052: // 'except' '('
+ case 18053: // 'exit' '('
+ case 18054: // 'external' '('
+ case 18056: // 'first' '('
+ case 18057: // 'following' '('
+ case 18058: // 'following-sibling' '('
+ case 18059: // 'for' '('
+ case 18062: // 'from' '('
+ case 18063: // 'ft-option' '('
+ case 18068: // 'ge' '('
+ case 18070: // 'group' '('
+ case 18072: // 'gt' '('
+ case 18073: // 'idiv' '('
+ case 18075: // 'import' '('
+ case 18076: // 'in' '('
+ case 18077: // 'index' '('
+ case 18081: // 'insert' '('
+ case 18082: // 'instance' '('
+ case 18083: // 'integrity' '('
+ case 18084: // 'intersect' '('
+ case 18085: // 'into' '('
+ case 18086: // 'is' '('
+ case 18088: // 'json' '('
+ case 18090: // 'jsoniq' '('
+ case 18093: // 'last' '('
+ case 18094: // 'lax' '('
+ case 18095: // 'le' '('
+ case 18097: // 'let' '('
+ case 18099: // 'loop' '('
+ case 18101: // 'lt' '('
+ case 18103: // 'mod' '('
+ case 18104: // 'modify' '('
+ case 18105: // 'module' '('
+ case 18107: // 'namespace' '('
+ case 18109: // 'ne' '('
+ case 18115: // 'nodes' '('
+ case 18118: // 'object' '('
+ case 18122: // 'only' '('
+ case 18123: // 'option' '('
+ case 18124: // 'or' '('
+ case 18125: // 'order' '('
+ case 18126: // 'ordered' '('
+ case 18127: // 'ordering' '('
+ case 18130: // 'parent' '('
+ case 18136: // 'preceding' '('
+ case 18137: // 'preceding-sibling' '('
+ case 18142: // 'rename' '('
+ case 18143: // 'replace' '('
+ case 18144: // 'return' '('
+ case 18145: // 'returning' '('
+ case 18146: // 'revalidation' '('
+ case 18148: // 'satisfies' '('
+ case 18149: // 'schema' '('
+ case 18152: // 'score' '('
+ case 18153: // 'select' '('
+ case 18154: // 'self' '('
+ case 18159: // 'sliding' '('
+ case 18160: // 'some' '('
+ case 18161: // 'stable' '('
+ case 18162: // 'start' '('
+ case 18165: // 'strict' '('
+ case 18173: // 'to' '('
+ case 18174: // 'treat' '('
+ case 18176: // 'try' '('
+ case 18177: // 'tumbling' '('
+ case 18178: // 'type' '('
+ case 18180: // 'union' '('
+ case 18182: // 'unordered' '('
+ case 18183: // 'updating' '('
+ case 18186: // 'validate' '('
+ case 18187: // 'value' '('
+ case 18188: // 'variable' '('
+ case 18189: // 'version' '('
+ case 18192: // 'where' '('
+ case 18193: // 'while' '('
+ case 18196: // 'with' '('
+ try_FunctionCall();
+ break;
+ case 144078: // 'ordered' '{'
+ try_OrderedExpr();
+ break;
+ case 144134: // 'unordered' '{'
+ try_UnorderedExpr();
+ break;
+ case 33: // '%'
+ case 79: // 'array'
+ case 121: // 'document-node'
+ case 125: // 'empty-sequence'
+ case 147: // 'function'
+ case 154: // 'if'
+ case 167: // 'item'
+ case 169: // 'json-item'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ case 247: // 'structured-item'
+ case 248: // 'switch'
+ case 259: // 'typeswitch'
+ case 14854: // EQName^Token '#'
+ case 14919: // 'after' '#'
+ case 14921: // 'allowing' '#'
+ case 14922: // 'ancestor' '#'
+ case 14923: // 'ancestor-or-self' '#'
+ case 14924: // 'and' '#'
+ case 14926: // 'append' '#'
+ case 14928: // 'as' '#'
+ case 14929: // 'ascending' '#'
+ case 14930: // 'at' '#'
+ case 14931: // 'attribute' '#'
+ case 14932: // 'base-uri' '#'
+ case 14933: // 'before' '#'
+ case 14934: // 'boundary-space' '#'
+ case 14935: // 'break' '#'
+ case 14937: // 'case' '#'
+ case 14938: // 'cast' '#'
+ case 14939: // 'castable' '#'
+ case 14940: // 'catch' '#'
+ case 14942: // 'child' '#'
+ case 14943: // 'collation' '#'
+ case 14945: // 'comment' '#'
+ case 14946: // 'constraint' '#'
+ case 14947: // 'construction' '#'
+ case 14950: // 'context' '#'
+ case 14951: // 'continue' '#'
+ case 14952: // 'copy' '#'
+ case 14953: // 'copy-namespaces' '#'
+ case 14954: // 'count' '#'
+ case 14955: // 'decimal-format' '#'
+ case 14957: // 'declare' '#'
+ case 14958: // 'default' '#'
+ case 14959: // 'delete' '#'
+ case 14960: // 'descendant' '#'
+ case 14961: // 'descendant-or-self' '#'
+ case 14962: // 'descending' '#'
+ case 14967: // 'div' '#'
+ case 14968: // 'document' '#'
+ case 14970: // 'element' '#'
+ case 14971: // 'else' '#'
+ case 14972: // 'empty' '#'
+ case 14974: // 'encoding' '#'
+ case 14975: // 'end' '#'
+ case 14977: // 'eq' '#'
+ case 14978: // 'every' '#'
+ case 14980: // 'except' '#'
+ case 14981: // 'exit' '#'
+ case 14982: // 'external' '#'
+ case 14983: // 'false' '#'
+ case 14984: // 'first' '#'
+ case 14985: // 'following' '#'
+ case 14986: // 'following-sibling' '#'
+ case 14987: // 'for' '#'
+ case 14990: // 'from' '#'
+ case 14991: // 'ft-option' '#'
+ case 14996: // 'ge' '#'
+ case 14998: // 'group' '#'
+ case 15000: // 'gt' '#'
+ case 15001: // 'idiv' '#'
+ case 15003: // 'import' '#'
+ case 15004: // 'in' '#'
+ case 15005: // 'index' '#'
+ case 15009: // 'insert' '#'
+ case 15010: // 'instance' '#'
+ case 15011: // 'integrity' '#'
+ case 15012: // 'intersect' '#'
+ case 15013: // 'into' '#'
+ case 15014: // 'is' '#'
+ case 15016: // 'json' '#'
+ case 15018: // 'jsoniq' '#'
+ case 15021: // 'last' '#'
+ case 15022: // 'lax' '#'
+ case 15023: // 'le' '#'
+ case 15025: // 'let' '#'
+ case 15027: // 'loop' '#'
+ case 15029: // 'lt' '#'
+ case 15031: // 'mod' '#'
+ case 15032: // 'modify' '#'
+ case 15033: // 'module' '#'
+ case 15035: // 'namespace' '#'
+ case 15037: // 'ne' '#'
+ case 15043: // 'nodes' '#'
+ case 15045: // 'null' '#'
+ case 15046: // 'object' '#'
+ case 15050: // 'only' '#'
+ case 15051: // 'option' '#'
+ case 15052: // 'or' '#'
+ case 15053: // 'order' '#'
+ case 15054: // 'ordered' '#'
+ case 15055: // 'ordering' '#'
+ case 15058: // 'parent' '#'
+ case 15064: // 'preceding' '#'
+ case 15065: // 'preceding-sibling' '#'
+ case 15068: // 'processing-instruction' '#'
+ case 15070: // 'rename' '#'
+ case 15071: // 'replace' '#'
+ case 15072: // 'return' '#'
+ case 15073: // 'returning' '#'
+ case 15074: // 'revalidation' '#'
+ case 15076: // 'satisfies' '#'
+ case 15077: // 'schema' '#'
+ case 15080: // 'score' '#'
+ case 15081: // 'select' '#'
+ case 15082: // 'self' '#'
+ case 15087: // 'sliding' '#'
+ case 15088: // 'some' '#'
+ case 15089: // 'stable' '#'
+ case 15090: // 'start' '#'
+ case 15093: // 'strict' '#'
+ case 15097: // 'text' '#'
+ case 15101: // 'to' '#'
+ case 15102: // 'treat' '#'
+ case 15103: // 'true' '#'
+ case 15104: // 'try' '#'
+ case 15105: // 'tumbling' '#'
+ case 15106: // 'type' '#'
+ case 15108: // 'union' '#'
+ case 15110: // 'unordered' '#'
+ case 15111: // 'updating' '#'
+ case 15114: // 'validate' '#'
+ case 15115: // 'value' '#'
+ case 15116: // 'variable' '#'
+ case 15117: // 'version' '#'
+ case 15120: // 'where' '#'
+ case 15121: // 'while' '#'
+ case 15124: // 'with' '#'
+ try_FunctionItemExpr();
+ break;
+ case -10:
+ case 27929: // '{' ';'
+ try_BlockExpr();
+ break;
+ case -11:
+ case 10009: // '{' NCName^Token
+ try_ObjectConstructor();
+ break;
+ case 69: // '['
+ try_ArrayConstructor();
+ break;
+ case 283: // '{|'
+ try_JSONSimpleObjectUnion();
+ break;
+ case -14:
+ break;
+ default:
+ try_Constructor();
+ }
+ }
+
+ function parse_JSONSimpleObjectUnion()
+ {
+ eventHandler.startNonterminal("JSONSimpleObjectUnion", e0);
+ shift(283); // '{|'
+ lookahead1W(273); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 286) // '|}'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(286); // '|}'
+ eventHandler.endNonterminal("JSONSimpleObjectUnion", e0);
+ }
+
+ function try_JSONSimpleObjectUnion()
+ {
+ shiftT(283); // '{|'
+ lookahead1W(273); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 286) // '|}'
+ {
+ try_Expr();
+ }
+ shiftT(286); // '|}'
+ }
+
+ function parse_ObjectConstructor()
+ {
+ eventHandler.startNonterminal("ObjectConstructor", e0);
+ shift(281); // '{'
+ lookahead1W(276); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 287) // '}'
+ {
+ whitespace();
+ parse_PairConstructorList();
+ }
+ shift(287); // '}'
+ eventHandler.endNonterminal("ObjectConstructor", e0);
+ }
+
+ function try_ObjectConstructor()
+ {
+ shiftT(281); // '{'
+ lookahead1W(276); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 287) // '}'
+ {
+ try_PairConstructorList();
+ }
+ shiftT(287); // '}'
+ }
+
+ function parse_PairConstructorList()
+ {
+ eventHandler.startNonterminal("PairConstructorList", e0);
+ parse_PairConstructor();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shift(42); // ','
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_PairConstructor();
+ }
+ eventHandler.endNonterminal("PairConstructorList", e0);
+ }
+
+ function try_PairConstructorList()
+ {
+ try_PairConstructor();
+ for (;;)
+ {
+ if (l1 != 42) // ','
+ {
+ break;
+ }
+ shiftT(42); // ','
+ lookahead1W(267); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PairConstructor();
+ }
+ }
+
+ function parse_PairConstructor()
+ {
+ eventHandler.startNonterminal("PairConstructor", e0);
+ switch (l1)
+ {
+ case 78: // 'append'
+ lookahead2W(278); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 139: // 'for'
+ lookahead2W(187); // S^WS | '#' | '$' | '(' | '(:' | ':' | 'sliding' | 'tumbling'
+ break;
+ case 161: // 'insert'
+ lookahead2W(281); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 177: // 'let'
+ lookahead2W(178); // S^WS | '#' | '$' | '(' | '(:' | ':' | 'score'
+ break;
+ case 187: // 'namespace'
+ lookahead2W(251); // NCName^Token | S^WS | '#' | '(' | '(:' | ':' | 'after' | 'allowing' |
+ break;
+ case 220: // 'processing-instruction'
+ lookahead2W(247); // NCName^Token | S^WS | '#' | '(:' | ':' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 223: // 'replace'
+ lookahead2W(180); // S^WS | '#' | '(' | '(:' | ':' | 'node' | 'value'
+ break;
+ case 266: // 'validate'
+ lookahead2W(191); // S^WS | '#' | '(' | '(:' | ':' | 'lax' | 'strict' | 'type' | '{'
+ break;
+ case 83: // 'attribute'
+ case 122: // 'element'
+ lookahead2W(256); // EQName^Token | S^WS | '#' | '(:' | ':' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 97: // 'comment'
+ case 249: // 'text'
+ lookahead2W(149); // S^WS | '#' | '(:' | ':' | '{'
+ break;
+ case 111: // 'delete'
+ case 222: // 'rename'
+ lookahead2W(261); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 104: // 'copy'
+ case 130: // 'every'
+ case 240: // 'some'
+ lookahead2W(165); // S^WS | '#' | '$' | '(' | '(:' | ':'
+ break;
+ case 135: // 'false'
+ case 197: // 'null'
+ case 255: // 'true'
+ lookahead2W(208); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '.' | '/' | '//' | ':' |
+ break;
+ case 120: // 'document'
+ case 206: // 'ordered'
+ case 256: // 'try'
+ case 262: // 'unordered'
+ lookahead2W(167); // S^WS | '#' | '(' | '(:' | ':' | '{'
+ break;
+ case 121: // 'document-node'
+ case 125: // 'empty-sequence'
+ case 167: // 'item'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ lookahead2W(96); // S^WS | '#' | '(:' | ':'
+ break;
+ case 71: // 'after'
+ case 73: // 'allowing'
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 76: // 'and'
+ case 80: // 'as'
+ case 81: // 'ascending'
+ case 82: // 'at'
+ case 84: // 'base-uri'
+ case 85: // 'before'
+ case 86: // 'boundary-space'
+ case 87: // 'break'
+ case 89: // 'case'
+ case 90: // 'cast'
+ case 91: // 'castable'
+ case 92: // 'catch'
+ case 94: // 'child'
+ case 95: // 'collation'
+ case 98: // 'constraint'
+ case 99: // 'construction'
+ case 102: // 'context'
+ case 103: // 'continue'
+ case 105: // 'copy-namespaces'
+ case 106: // 'count'
+ case 107: // 'decimal-format'
+ case 109: // 'declare'
+ case 110: // 'default'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 114: // 'descending'
+ case 119: // 'div'
+ case 123: // 'else'
+ case 124: // 'empty'
+ case 126: // 'encoding'
+ case 127: // 'end'
+ case 129: // 'eq'
+ case 132: // 'except'
+ case 133: // 'exit'
+ case 134: // 'external'
+ case 136: // 'first'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 142: // 'from'
+ case 143: // 'ft-option'
+ case 147: // 'function'
+ case 148: // 'ge'
+ case 150: // 'group'
+ case 152: // 'gt'
+ case 153: // 'idiv'
+ case 154: // 'if'
+ case 155: // 'import'
+ case 156: // 'in'
+ case 157: // 'index'
+ case 162: // 'instance'
+ case 163: // 'integrity'
+ case 164: // 'intersect'
+ case 165: // 'into'
+ case 166: // 'is'
+ case 168: // 'json'
+ case 170: // 'jsoniq'
+ case 173: // 'last'
+ case 174: // 'lax'
+ case 175: // 'le'
+ case 179: // 'loop'
+ case 181: // 'lt'
+ case 183: // 'mod'
+ case 184: // 'modify'
+ case 185: // 'module'
+ case 189: // 'ne'
+ case 195: // 'nodes'
+ case 198: // 'object'
+ case 202: // 'only'
+ case 203: // 'option'
+ case 204: // 'or'
+ case 205: // 'order'
+ case 207: // 'ordering'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ case 224: // 'return'
+ case 225: // 'returning'
+ case 226: // 'revalidation'
+ case 228: // 'satisfies'
+ case 229: // 'schema'
+ case 232: // 'score'
+ case 233: // 'select'
+ case 234: // 'self'
+ case 239: // 'sliding'
+ case 241: // 'stable'
+ case 242: // 'start'
+ case 245: // 'strict'
+ case 248: // 'switch'
+ case 253: // 'to'
+ case 254: // 'treat'
+ case 257: // 'tumbling'
+ case 258: // 'type'
+ case 259: // 'typeswitch'
+ case 260: // 'union'
+ case 263: // 'updating'
+ case 267: // 'value'
+ case 268: // 'variable'
+ case 269: // 'version'
+ case 272: // 'where'
+ case 273: // 'while'
+ case 276: // 'with'
+ lookahead2W(144); // S^WS | '#' | '(' | '(:' | ':'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 25735 // 'false' ':'
+ || lk == 25797 // 'null' ':'
+ || lk == 25855) // 'true' ':'
+ {
+ lk = memoized(21, 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_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(21, e0, lk);
+ }
+ }
+ switch (lk)
+ {
+ case -2:
+ case 19: // NCName^Token
+ case 25671: // 'after' ':'
+ case 25673: // 'allowing' ':'
+ case 25674: // 'ancestor' ':'
+ case 25675: // 'ancestor-or-self' ':'
+ case 25676: // 'and' ':'
+ case 25678: // 'append' ':'
+ case 25680: // 'as' ':'
+ case 25681: // 'ascending' ':'
+ case 25682: // 'at' ':'
+ case 25683: // 'attribute' ':'
+ case 25684: // 'base-uri' ':'
+ case 25685: // 'before' ':'
+ case 25686: // 'boundary-space' ':'
+ case 25687: // 'break' ':'
+ case 25689: // 'case' ':'
+ case 25690: // 'cast' ':'
+ case 25691: // 'castable' ':'
+ case 25692: // 'catch' ':'
+ case 25694: // 'child' ':'
+ case 25695: // 'collation' ':'
+ case 25697: // 'comment' ':'
+ case 25698: // 'constraint' ':'
+ case 25699: // 'construction' ':'
+ case 25702: // 'context' ':'
+ case 25703: // 'continue' ':'
+ case 25704: // 'copy' ':'
+ case 25705: // 'copy-namespaces' ':'
+ case 25706: // 'count' ':'
+ case 25707: // 'decimal-format' ':'
+ case 25709: // 'declare' ':'
+ case 25710: // 'default' ':'
+ case 25711: // 'delete' ':'
+ case 25712: // 'descendant' ':'
+ case 25713: // 'descendant-or-self' ':'
+ case 25714: // 'descending' ':'
+ case 25719: // 'div' ':'
+ case 25720: // 'document' ':'
+ case 25721: // 'document-node' ':'
+ case 25722: // 'element' ':'
+ case 25723: // 'else' ':'
+ case 25724: // 'empty' ':'
+ case 25725: // 'empty-sequence' ':'
+ case 25726: // 'encoding' ':'
+ case 25727: // 'end' ':'
+ case 25729: // 'eq' ':'
+ case 25730: // 'every' ':'
+ case 25732: // 'except' ':'
+ case 25733: // 'exit' ':'
+ case 25734: // 'external' ':'
+ case 25736: // 'first' ':'
+ case 25737: // 'following' ':'
+ case 25738: // 'following-sibling' ':'
+ case 25739: // 'for' ':'
+ case 25742: // 'from' ':'
+ case 25743: // 'ft-option' ':'
+ case 25747: // 'function' ':'
+ case 25748: // 'ge' ':'
+ case 25750: // 'group' ':'
+ case 25752: // 'gt' ':'
+ case 25753: // 'idiv' ':'
+ case 25754: // 'if' ':'
+ case 25755: // 'import' ':'
+ case 25756: // 'in' ':'
+ case 25757: // 'index' ':'
+ case 25761: // 'insert' ':'
+ case 25762: // 'instance' ':'
+ case 25763: // 'integrity' ':'
+ case 25764: // 'intersect' ':'
+ case 25765: // 'into' ':'
+ case 25766: // 'is' ':'
+ case 25767: // 'item' ':'
+ case 25768: // 'json' ':'
+ case 25770: // 'jsoniq' ':'
+ case 25773: // 'last' ':'
+ case 25774: // 'lax' ':'
+ case 25775: // 'le' ':'
+ case 25777: // 'let' ':'
+ case 25779: // 'loop' ':'
+ case 25781: // 'lt' ':'
+ case 25783: // 'mod' ':'
+ case 25784: // 'modify' ':'
+ case 25785: // 'module' ':'
+ case 25787: // 'namespace' ':'
+ case 25788: // 'namespace-node' ':'
+ case 25789: // 'ne' ':'
+ case 25794: // 'node' ':'
+ case 25795: // 'nodes' ':'
+ case 25798: // 'object' ':'
+ case 25802: // 'only' ':'
+ case 25803: // 'option' ':'
+ case 25804: // 'or' ':'
+ case 25805: // 'order' ':'
+ case 25806: // 'ordered' ':'
+ case 25807: // 'ordering' ':'
+ case 25810: // 'parent' ':'
+ case 25816: // 'preceding' ':'
+ case 25817: // 'preceding-sibling' ':'
+ case 25820: // 'processing-instruction' ':'
+ case 25822: // 'rename' ':'
+ case 25823: // 'replace' ':'
+ case 25824: // 'return' ':'
+ case 25825: // 'returning' ':'
+ case 25826: // 'revalidation' ':'
+ case 25828: // 'satisfies' ':'
+ case 25829: // 'schema' ':'
+ case 25830: // 'schema-attribute' ':'
+ case 25831: // 'schema-element' ':'
+ case 25832: // 'score' ':'
+ case 25833: // 'select' ':'
+ case 25834: // 'self' ':'
+ case 25839: // 'sliding' ':'
+ case 25840: // 'some' ':'
+ case 25841: // 'stable' ':'
+ case 25842: // 'start' ':'
+ case 25845: // 'strict' ':'
+ case 25848: // 'switch' ':'
+ case 25849: // 'text' ':'
+ case 25853: // 'to' ':'
+ case 25854: // 'treat' ':'
+ case 25856: // 'try' ':'
+ case 25857: // 'tumbling' ':'
+ case 25858: // 'type' ':'
+ case 25859: // 'typeswitch' ':'
+ case 25860: // 'union' ':'
+ case 25862: // 'unordered' ':'
+ case 25863: // 'updating' ':'
+ case 25866: // 'validate' ':'
+ case 25867: // 'value' ':'
+ case 25868: // 'variable' ':'
+ case 25869: // 'version' ':'
+ case 25872: // 'where' ':'
+ case 25873: // 'while' ':'
+ case 25876: // 'with' ':'
+ parse_NCName();
+ break;
+ default:
+ parse_ExprSingle();
+ }
+ lookahead1W(26); // S^WS | '(:' | ':'
+ shift(50); // ':'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_ExprSingle();
+ eventHandler.endNonterminal("PairConstructor", e0);
+ }
+
+ function try_PairConstructor()
+ {
+ switch (l1)
+ {
+ case 78: // 'append'
+ lookahead2W(278); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 139: // 'for'
+ lookahead2W(187); // S^WS | '#' | '$' | '(' | '(:' | ':' | 'sliding' | 'tumbling'
+ break;
+ case 161: // 'insert'
+ lookahead2W(281); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 177: // 'let'
+ lookahead2W(178); // S^WS | '#' | '$' | '(' | '(:' | ':' | 'score'
+ break;
+ case 187: // 'namespace'
+ lookahead2W(251); // NCName^Token | S^WS | '#' | '(' | '(:' | ':' | 'after' | 'allowing' |
+ break;
+ case 220: // 'processing-instruction'
+ lookahead2W(247); // NCName^Token | S^WS | '#' | '(:' | ':' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 223: // 'replace'
+ lookahead2W(180); // S^WS | '#' | '(' | '(:' | ':' | 'node' | 'value'
+ break;
+ case 266: // 'validate'
+ lookahead2W(191); // S^WS | '#' | '(' | '(:' | ':' | 'lax' | 'strict' | 'type' | '{'
+ break;
+ case 83: // 'attribute'
+ case 122: // 'element'
+ lookahead2W(256); // EQName^Token | S^WS | '#' | '(:' | ':' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 97: // 'comment'
+ case 249: // 'text'
+ lookahead2W(149); // S^WS | '#' | '(:' | ':' | '{'
+ break;
+ case 111: // 'delete'
+ case 222: // 'rename'
+ lookahead2W(261); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ break;
+ case 104: // 'copy'
+ case 130: // 'every'
+ case 240: // 'some'
+ lookahead2W(165); // S^WS | '#' | '$' | '(' | '(:' | ':'
+ break;
+ case 135: // 'false'
+ case 197: // 'null'
+ case 255: // 'true'
+ lookahead2W(208); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '.' | '/' | '//' | ':' |
+ break;
+ case 120: // 'document'
+ case 206: // 'ordered'
+ case 256: // 'try'
+ case 262: // 'unordered'
+ lookahead2W(167); // S^WS | '#' | '(' | '(:' | ':' | '{'
+ break;
+ case 121: // 'document-node'
+ case 125: // 'empty-sequence'
+ case 167: // 'item'
+ case 188: // 'namespace-node'
+ case 194: // 'node'
+ case 230: // 'schema-attribute'
+ case 231: // 'schema-element'
+ lookahead2W(96); // S^WS | '#' | '(:' | ':'
+ break;
+ case 71: // 'after'
+ case 73: // 'allowing'
+ case 74: // 'ancestor'
+ case 75: // 'ancestor-or-self'
+ case 76: // 'and'
+ case 80: // 'as'
+ case 81: // 'ascending'
+ case 82: // 'at'
+ case 84: // 'base-uri'
+ case 85: // 'before'
+ case 86: // 'boundary-space'
+ case 87: // 'break'
+ case 89: // 'case'
+ case 90: // 'cast'
+ case 91: // 'castable'
+ case 92: // 'catch'
+ case 94: // 'child'
+ case 95: // 'collation'
+ case 98: // 'constraint'
+ case 99: // 'construction'
+ case 102: // 'context'
+ case 103: // 'continue'
+ case 105: // 'copy-namespaces'
+ case 106: // 'count'
+ case 107: // 'decimal-format'
+ case 109: // 'declare'
+ case 110: // 'default'
+ case 112: // 'descendant'
+ case 113: // 'descendant-or-self'
+ case 114: // 'descending'
+ case 119: // 'div'
+ case 123: // 'else'
+ case 124: // 'empty'
+ case 126: // 'encoding'
+ case 127: // 'end'
+ case 129: // 'eq'
+ case 132: // 'except'
+ case 133: // 'exit'
+ case 134: // 'external'
+ case 136: // 'first'
+ case 137: // 'following'
+ case 138: // 'following-sibling'
+ case 142: // 'from'
+ case 143: // 'ft-option'
+ case 147: // 'function'
+ case 148: // 'ge'
+ case 150: // 'group'
+ case 152: // 'gt'
+ case 153: // 'idiv'
+ case 154: // 'if'
+ case 155: // 'import'
+ case 156: // 'in'
+ case 157: // 'index'
+ case 162: // 'instance'
+ case 163: // 'integrity'
+ case 164: // 'intersect'
+ case 165: // 'into'
+ case 166: // 'is'
+ case 168: // 'json'
+ case 170: // 'jsoniq'
+ case 173: // 'last'
+ case 174: // 'lax'
+ case 175: // 'le'
+ case 179: // 'loop'
+ case 181: // 'lt'
+ case 183: // 'mod'
+ case 184: // 'modify'
+ case 185: // 'module'
+ case 189: // 'ne'
+ case 195: // 'nodes'
+ case 198: // 'object'
+ case 202: // 'only'
+ case 203: // 'option'
+ case 204: // 'or'
+ case 205: // 'order'
+ case 207: // 'ordering'
+ case 210: // 'parent'
+ case 216: // 'preceding'
+ case 217: // 'preceding-sibling'
+ case 224: // 'return'
+ case 225: // 'returning'
+ case 226: // 'revalidation'
+ case 228: // 'satisfies'
+ case 229: // 'schema'
+ case 232: // 'score'
+ case 233: // 'select'
+ case 234: // 'self'
+ case 239: // 'sliding'
+ case 241: // 'stable'
+ case 242: // 'start'
+ case 245: // 'strict'
+ case 248: // 'switch'
+ case 253: // 'to'
+ case 254: // 'treat'
+ case 257: // 'tumbling'
+ case 258: // 'type'
+ case 259: // 'typeswitch'
+ case 260: // 'union'
+ case 263: // 'updating'
+ case 267: // 'value'
+ case 268: // 'variable'
+ case 269: // 'version'
+ case 272: // 'where'
+ case 273: // 'while'
+ case 276: // 'with'
+ lookahead2W(144); // S^WS | '#' | '(' | '(:' | ':'
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 25735 // 'false' ':'
+ || lk == 25797 // 'null' ':'
+ || lk == 25855) // 'true' ':'
+ {
+ lk = memoized(21, 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_ExprSingle();
+ memoize(21, e0A, -1);
+ lk = -3;
+ }
+ 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(21, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -2:
+ case 19: // NCName^Token
+ case 25671: // 'after' ':'
+ case 25673: // 'allowing' ':'
+ case 25674: // 'ancestor' ':'
+ case 25675: // 'ancestor-or-self' ':'
+ case 25676: // 'and' ':'
+ case 25678: // 'append' ':'
+ case 25680: // 'as' ':'
+ case 25681: // 'ascending' ':'
+ case 25682: // 'at' ':'
+ case 25683: // 'attribute' ':'
+ case 25684: // 'base-uri' ':'
+ case 25685: // 'before' ':'
+ case 25686: // 'boundary-space' ':'
+ case 25687: // 'break' ':'
+ case 25689: // 'case' ':'
+ case 25690: // 'cast' ':'
+ case 25691: // 'castable' ':'
+ case 25692: // 'catch' ':'
+ case 25694: // 'child' ':'
+ case 25695: // 'collation' ':'
+ case 25697: // 'comment' ':'
+ case 25698: // 'constraint' ':'
+ case 25699: // 'construction' ':'
+ case 25702: // 'context' ':'
+ case 25703: // 'continue' ':'
+ case 25704: // 'copy' ':'
+ case 25705: // 'copy-namespaces' ':'
+ case 25706: // 'count' ':'
+ case 25707: // 'decimal-format' ':'
+ case 25709: // 'declare' ':'
+ case 25710: // 'default' ':'
+ case 25711: // 'delete' ':'
+ case 25712: // 'descendant' ':'
+ case 25713: // 'descendant-or-self' ':'
+ case 25714: // 'descending' ':'
+ case 25719: // 'div' ':'
+ case 25720: // 'document' ':'
+ case 25721: // 'document-node' ':'
+ case 25722: // 'element' ':'
+ case 25723: // 'else' ':'
+ case 25724: // 'empty' ':'
+ case 25725: // 'empty-sequence' ':'
+ case 25726: // 'encoding' ':'
+ case 25727: // 'end' ':'
+ case 25729: // 'eq' ':'
+ case 25730: // 'every' ':'
+ case 25732: // 'except' ':'
+ case 25733: // 'exit' ':'
+ case 25734: // 'external' ':'
+ case 25736: // 'first' ':'
+ case 25737: // 'following' ':'
+ case 25738: // 'following-sibling' ':'
+ case 25739: // 'for' ':'
+ case 25742: // 'from' ':'
+ case 25743: // 'ft-option' ':'
+ case 25747: // 'function' ':'
+ case 25748: // 'ge' ':'
+ case 25750: // 'group' ':'
+ case 25752: // 'gt' ':'
+ case 25753: // 'idiv' ':'
+ case 25754: // 'if' ':'
+ case 25755: // 'import' ':'
+ case 25756: // 'in' ':'
+ case 25757: // 'index' ':'
+ case 25761: // 'insert' ':'
+ case 25762: // 'instance' ':'
+ case 25763: // 'integrity' ':'
+ case 25764: // 'intersect' ':'
+ case 25765: // 'into' ':'
+ case 25766: // 'is' ':'
+ case 25767: // 'item' ':'
+ case 25768: // 'json' ':'
+ case 25770: // 'jsoniq' ':'
+ case 25773: // 'last' ':'
+ case 25774: // 'lax' ':'
+ case 25775: // 'le' ':'
+ case 25777: // 'let' ':'
+ case 25779: // 'loop' ':'
+ case 25781: // 'lt' ':'
+ case 25783: // 'mod' ':'
+ case 25784: // 'modify' ':'
+ case 25785: // 'module' ':'
+ case 25787: // 'namespace' ':'
+ case 25788: // 'namespace-node' ':'
+ case 25789: // 'ne' ':'
+ case 25794: // 'node' ':'
+ case 25795: // 'nodes' ':'
+ case 25798: // 'object' ':'
+ case 25802: // 'only' ':'
+ case 25803: // 'option' ':'
+ case 25804: // 'or' ':'
+ case 25805: // 'order' ':'
+ case 25806: // 'ordered' ':'
+ case 25807: // 'ordering' ':'
+ case 25810: // 'parent' ':'
+ case 25816: // 'preceding' ':'
+ case 25817: // 'preceding-sibling' ':'
+ case 25820: // 'processing-instruction' ':'
+ case 25822: // 'rename' ':'
+ case 25823: // 'replace' ':'
+ case 25824: // 'return' ':'
+ case 25825: // 'returning' ':'
+ case 25826: // 'revalidation' ':'
+ case 25828: // 'satisfies' ':'
+ case 25829: // 'schema' ':'
+ case 25830: // 'schema-attribute' ':'
+ case 25831: // 'schema-element' ':'
+ case 25832: // 'score' ':'
+ case 25833: // 'select' ':'
+ case 25834: // 'self' ':'
+ case 25839: // 'sliding' ':'
+ case 25840: // 'some' ':'
+ case 25841: // 'stable' ':'
+ case 25842: // 'start' ':'
+ case 25845: // 'strict' ':'
+ case 25848: // 'switch' ':'
+ case 25849: // 'text' ':'
+ case 25853: // 'to' ':'
+ case 25854: // 'treat' ':'
+ case 25856: // 'try' ':'
+ case 25857: // 'tumbling' ':'
+ case 25858: // 'type' ':'
+ case 25859: // 'typeswitch' ':'
+ case 25860: // 'union' ':'
+ case 25862: // 'unordered' ':'
+ case 25863: // 'updating' ':'
+ case 25866: // 'validate' ':'
+ case 25867: // 'value' ':'
+ case 25868: // 'variable' ':'
+ case 25869: // 'version' ':'
+ case 25872: // 'where' ':'
+ case 25873: // 'while' ':'
+ case 25876: // 'with' ':'
+ try_NCName();
+ break;
+ case -3:
+ break;
+ default:
+ try_ExprSingle();
+ }
+ lookahead1W(26); // S^WS | '(:' | ':'
+ shiftT(50); // ':'
+ lookahead1W(266); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_ArrayConstructor()
+ {
+ eventHandler.startNonterminal("ArrayConstructor", e0);
+ shift(69); // '['
+ lookahead1W(272); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 70) // ']'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(70); // ']'
+ eventHandler.endNonterminal("ArrayConstructor", e0);
+ }
+
+ function try_ArrayConstructor()
+ {
+ shiftT(69); // '['
+ lookahead1W(272); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ if (l1 != 70) // ']'
+ {
+ try_Expr();
+ }
+ shiftT(70); // ']'
+ }
+
+ function parse_BlockExpr()
+ {
+ eventHandler.startNonterminal("BlockExpr", e0);
+ shift(281); // '{'
+ lookahead1W(280); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_StatementsAndOptionalExpr();
+ shift(287); // '}'
+ eventHandler.endNonterminal("BlockExpr", e0);
+ }
+
+ function try_BlockExpr()
+ {
+ shiftT(281); // '{'
+ lookahead1W(280); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_StatementsAndOptionalExpr();
+ shiftT(287); // '}'
+ }
+
+ function parse_FunctionDecl()
+ {
+ eventHandler.startNonterminal("FunctionDecl", e0);
+ shift(147); // 'function'
+ lookahead1W(245); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_EQName();
+ lookahead1W(22); // S^WS | '(' | '(:'
+ shift(35); // '('
+ lookahead1W(98); // S^WS | '$' | '(:' | ')'
+ if (l1 == 31) // '$'
+ {
+ whitespace();
+ parse_ParamList();
+ }
+ shift(38); // ')'
+ lookahead1W(158); // S^WS | '(:' | 'as' | 'external' | '{'
+ if (l1 == 80) // 'as'
+ {
+ whitespace();
+ parse_ReturnType();
+ }
+ lookahead1W(122); // S^WS | '(:' | 'external' | '{'
+ switch (l1)
+ {
+ case 281: // '{'
+ shift(281); // '{'
+ lookahead1W(280); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ whitespace();
+ parse_StatementsAndOptionalExpr();
+ shift(287); // '}'
+ break;
+ default:
+ shift(134); // 'external'
+ }
+ eventHandler.endNonterminal("FunctionDecl", e0);
+ }
+
+ function parse_ReturnType()
+ {
+ eventHandler.startNonterminal("ReturnType", e0);
+ shift(80); // 'as'
+ lookahead1W(253); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ eventHandler.endNonterminal("ReturnType", e0);
+ }
+
+ function shift(t)
+ {
+ if (l1 == t)
+ {
+ whitespace();
+ eventHandler.terminal(JSONiqParser.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)
+ {
+ eventHandler.whitespace(e0, b1);
+ e0 = b1;
+ }
+ }
+
+ function matchW(set)
+ {
+ var code;
+ for (;;)
+ {
+ code = match(set);
+ if (code != 22) // S^WS
+ {
+ if (code != 37) // '(:'
+ {
+ 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;
+ }
+
+ function error(b, e, s, l, t)
+ {
+ if (e >= ex)
+ {
+ bx = b;
+ ex = e;
+ sx = s;
+ lx = l;
+ tx = t;
+ }
+ throw new self.ParseException(bx, ex, sx, lx, tx);
+ }
+
+ var lk, b0, e0;
+ var l1, b1, e1;
+ var l2, b2, e2;
+ var bx, ex, sx, lx, tx;
+ var eventHandler;
+ var memo;
+
+ function memoize(i, e, v)
+ {
+ memo[(e << 5) + i] = v;
+ }
+
+ function memoized(i, e)
+ {
+ var v = memo[(e << 5) + i];
+ return typeof v != "undefined" ? v : 0;
+ }
+
+ var input;
+ var size;
+ var begin;
+ var end;
+
+ function match(tokenSetId)
+ {
+ var nonbmp = false;
+ begin = end;
+ var current = end;
+ var result = JSONiqParser.INITIAL[tokenSetId];
+ var state = 0;
+
+ for (var code = result & 8191; code != 0; )
+ {
+ var charclass;
+ var c0 = current < size ? input.charCodeAt(current) : 0;
+ ++current;
+ if (c0 < 0x80)
+ {
+ charclass = JSONiqParser.MAP0[c0];
+ }
+ else if (c0 < 0xd800)
+ {
+ var c1 = c0 >> 4;
+ charclass = JSONiqParser.MAP1[(c0 & 15) + JSONiqParser.MAP1[(c1 & 31) + JSONiqParser.MAP1[c1 >> 5]]];
+ }
+ 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 (JSONiqParser.MAP2[m] > c0) hi = m - 1;
+ else if (JSONiqParser.MAP2[6 + m] < c0) lo = m + 1;
+ else {charclass = JSONiqParser.MAP2[12 + m]; break;}
+ if (lo > hi) {charclass = 0; break;}
+ }
+ }
+
+ state = code;
+ var i0 = (charclass << 13) + code - 1;
+ code = JSONiqParser.TRANSITION[(i0 & 31) + JSONiqParser.TRANSITION[i0 >> 5]];
+
+ if (code > 8191)
+ {
+ result = code;
+ code &= 8191;
+ end = current;
+ }
+ }
+
+ result >>= 13;
+ if (result == 0)
+ {
+ end = current - 1;
+ var c1 = end < size ? input.charCodeAt(end) : 0;
+ if (c1 >= 0xdc00 && c1 < 0xe000) --end;
+ return 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;
+ }
+}
+
+JSONiqParser.getTokenSet = function(tokenSetId)
+{
+ var set = [];
+ var s = tokenSetId < 0 ? - tokenSetId : JSONiqParser.INITIAL[tokenSetId] & 8191;
+ for (var i = 0; i < 289; i += 32)
+ {
+ var j = i;
+ var i0 = (i >> 5) * 4235 + s - 1;
+ var i1 = i0 >> 2;
+ var i2 = i1 >> 2;
+ var f = JSONiqParser.EXPECTED[(i0 & 3) + JSONiqParser.EXPECTED[(i1 & 3) + JSONiqParser.EXPECTED[(i2 & 15) + JSONiqParser.EXPECTED[i2 >> 4]]]];
+ for ( ; f != 0; f >>>= 1, ++j)
+ {
+ if ((f & 1) != 0)
+ {
+ set.push(JSONiqParser.TOKEN[j]);
+ }
+ }
+ }
+ return set;
+};
+
+JSONiqParser.MAP0 =
+[ 71, 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, 40, 30, 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, 40, 40
+];
+
+JSONiqParser.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, 71, 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, 40, 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, 40, 30, 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, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 30, 30, 40, 40, 40, 40, 40, 40, 40, 70, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70
+];
+
+JSONiqParser.MAP2 =
+[ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 40, 30, 40, 30, 30, 40
+];
+
+JSONiqParser.INITIAL =
+[ 1, 24578, 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, 285, 286, 287, 288, 289
+];
+
+JSONiqParser.TRANSITION =
+[ 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 18432, 18508, 18512, 18508, 18508, 18471, 18503, 18452, 18508, 18544, 32640, 25253, 32640, 72986, 32640, 32640, 18907, 32640, 23058, 21807, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 22530, 32640, 61740, 32640, 32640, 53140, 22565, 22594, 54694, 22641, 32640, 25253, 32640, 22707, 32640, 32640, 18907, 32640, 40804, 19219, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 22757, 32640, 23442, 32640, 20728, 22822, 22912, 62853, 22949, 23023, 32640, 25253, 37379, 72986, 32640, 32640, 18907, 32640, 23058, 40482, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 23090, 32640, 70756, 57235, 23625, 57174, 23143, 53889, 57205, 23194, 32640, 44590, 57237, 72986, 32640, 32640, 18907, 32640, 23058, 18925, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 22132, 19073, 46732, 23294, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 23361, 32640, 61740, 23437, 23807, 23824, 22912, 35136, 23474, 23607, 32640, 25253, 32640, 72986, 32640, 32640, 18907, 32640, 40461, 21807, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 22530, 32640, 61740, 57592, 32640, 53140, 23657, 43708, 23704, 23789, 32640, 25253, 32640, 72986, 32640, 32640, 18907, 32640, 23058, 21807, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 22530, 32640, 61740, 32640, 32640, 39259, 23856, 32640, 32640, 23893, 32640, 25253, 32640, 72986, 32640, 32640, 18907, 32640, 23058, 21807, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 73053, 22069, 23965, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 24031, 32640, 23861, 32640, 22776, 24082, 22912, 56240, 24206, 24329, 32640, 25253, 32640, 24379, 32640, 32640, 18907, 32640, 23058, 57529, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 24415, 24449, 24453, 24440, 24534, 24485, 24515, 24566, 24596, 24628, 32640, 32105, 32640, 72986, 32640, 32640, 18907, 32640, 23058, 21807, 31154, 45903, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 24678, 32640, 61740, 24746, 48361, 53140, 24789, 24808, 24825, 24857, 32640, 27397, 32640, 72986, 32640, 32640, 18907, 32640, 23058, 21807, 31154, 45563, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 24907, 32640, 61740, 32640, 32640, 52064, 24984, 25013, 61799, 25045, 32640, 25253, 32640, 72986, 32640, 32640, 18907, 32640, 23058, 21807, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 25095, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 22530, 32640, 61740, 32640, 32640, 54034, 25151, 25188, 25171, 25235, 32640, 25253, 32640, 72986, 32640, 32640, 18907, 32640, 23058, 21807, 31154, 19779, 32640, 25302, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 25340, 32640, 61740, 24702, 35413, 25353, 25385, 25402, 58363, 25449, 32640, 25253, 32640, 72986, 32640, 32640, 18907, 32640, 23058, 21807, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 25499, 32640, 61740, 32640, 32640, 53140, 25538, 25575, 25558, 25622, 32640, 25253, 32640, 72986, 32640, 32640, 49347, 54782, 64809, 35297, 64457, 32024, 25672, 25724, 32640, 25308, 42746, 72012, 48724, 25775, 59604, 63895, 70062, 53329, 26051, 44572, 32640, 32640, 53365, 69246, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 36217, 25878, 32640, 32640, 25912, 56403, 72012, 72012, 47453, 69896, 25776, 64787, 25947, 25982, 26472, 26016, 26050, 68602, 32640, 32640, 21278, 65491, 41507, 72012, 47768, 59999, 36922, 55439, 25983, 53287, 66001, 26051, 68608, 32640, 35129, 65495, 72012, 26084, 25776, 26132, 25983, 66375, 26051, 26181, 26227, 36550, 62167, 71378, 26264, 56947, 53286, 26299, 56814, 66968, 50229, 37146, 26336, 26407, 64681, 37193, 26609, 67516, 26450, 26504, 26590, 60773, 47253, 26654, 26722, 26771, 49912, 26461, 51539, 26820, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 22530, 32640, 61740, 32640, 32640, 29428, 26976, 69042, 27027, 27107, 32640, 25253, 32640, 27176, 32640, 32640, 18907, 32640, 35800, 21807, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 27212, 32640, 18617, 32640, 32640, 53140, 27264, 27332, 41428, 27379, 32640, 25253, 32640, 27446, 36386, 32640, 18907, 32640, 23058, 40482, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 27496, 32640, 61740, 32640, 32640, 45704, 22912, 32640, 27545, 27614, 32640, 25253, 32640, 27679, 32640, 32640, 49347, 54782, 51035, 35297, 32640, 32024, 32640, 27715, 32640, 25308, 72012, 72012, 48724, 25776, 59604, 25983, 61672, 26051, 26051, 49853, 32640, 32640, 70980, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 40010, 32640, 32640, 25692, 32640, 68393, 72012, 72012, 27753, 25776, 25776, 39830, 25983, 25983, 39566, 26051, 26051, 43098, 32640, 32640, 32640, 65491, 72012, 72012, 27795, 25776, 60349, 39842, 25983, 53287, 26051, 26051, 70527, 32640, 32640, 65495, 72012, 46827, 25776, 55996, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 27836, 32640, 26232, 27985, 34535, 60068, 27930, 27958, 60099, 28032, 32640, 32366, 32640, 72986, 32640, 32640, 73079, 29194, 30273, 28620, 31154, 44986, 32640, 18612, 18649, 18757, 18789, 18959, 32755, 28084, 30249, 28403, 29274, 28141, 28173, 28885, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21681, 28259, 30189, 28317, 28376, 29214, 30382, 28201, 30288, 28732, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 28435, 28285, 28497, 28109, 28529, 28561, 28593, 28652, 28684, 28716, 19661, 19735, 19811, 19878, 19910, 19942, 28764, 21709, 32781, 28826, 28935, 28991, 29023, 29361, 30055, 20090, 20138, 20211, 20265, 29171, 28465, 29246, 28344, 29334, 29302, 29393, 20579, 20709, 20774, 29460, 29082, 29111, 29139, 29492, 29611, 20949, 21030, 29555, 29643, 29675, 28857, 29707, 21310, 29804, 29832, 29864, 29896, 29992, 30024, 30105, 30173, 28959, 30221, 29583, 29053, 28794, 28227, 30320, 30352, 29523, 30414, 30442, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 30485, 32640, 61740, 55714, 40332, 67370, 30532, 30549, 30500, 30596, 32640, 25253, 32640, 72986, 32640, 32640, 18907, 32640, 23058, 21807, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 25063, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 62487, 66570, 19251, 64424, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 30661, 19661, 19735, 19811, 19878, 19910, 19942, 30758, 30851, 33683, 30826, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 30890, 63521, 30967, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 22530, 32640, 61740, 32640, 32640, 32640, 31025, 31042, 31089, 31121, 32640, 25253, 32640, 72986, 41921, 32640, 18907, 32640, 23058, 19161, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31186, 32640, 61740, 32640, 32640, 53140, 31304, 31321, 61422, 31368, 32640, 25253, 32640, 72986, 38336, 32640, 18907, 32640, 23058, 19597, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31436, 32640, 22917, 32640, 32640, 53140, 31488, 31505, 63455, 31552, 32640, 25253, 32640, 72986, 23911, 32640, 18907, 32640, 23058, 20233, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 31603, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31688, 32640, 61740, 27887, 32640, 57839, 22912, 31734, 24347, 31775, 32640, 25253, 32640, 31840, 32640, 32640, 18907, 32640, 57508, 20515, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 22530, 32640, 61740, 32640, 32640, 53140, 22912, 32640, 62571, 27379, 32640, 25253, 32640, 72986, 32640, 32640, 18907, 32640, 23058, 21807, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 72814, 32640, 32640, 53140, 22912, 36567, 70299, 34240, 32640, 25253, 32640, 32640, 32640, 32640, 49347, 54782, 64809, 51195, 32640, 32024, 32640, 32640, 32640, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 53000, 32640, 32640, 25682, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 34467, 32640, 32640, 25692, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 43098, 32640, 32640, 46497, 65491, 72012, 72012, 51277, 25776, 46932, 39842, 25983, 53287, 26051, 26051, 70527, 32640, 32640, 65495, 72012, 46827, 25776, 55996, 25983, 53288, 26051, 37187, 32640, 52315, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 72814, 32640, 32640, 53140, 22912, 36567, 70299, 34240, 32640, 25253, 32640, 32640, 32640, 32640, 49347, 54782, 64809, 51195, 32640, 32024, 32640, 32640, 32640, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 53000, 32640, 32640, 25682, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 34467, 32640, 32640, 25692, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 43098, 32640, 32640, 32640, 65491, 72012, 72012, 51277, 25776, 46932, 39842, 25983, 53287, 26051, 26051, 70527, 32640, 32640, 65495, 72012, 46827, 25776, 55996, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 72814, 32640, 32640, 53140, 22912, 36567, 70299, 34240, 32640, 25253, 32640, 32640, 32640, 32640, 49347, 54782, 64809, 51195, 32640, 32024, 32640, 32640, 32640, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 53000, 32640, 32640, 25682, 32497, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 34467, 32640, 32640, 25692, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 43098, 32640, 32640, 32640, 65491, 72012, 72012, 51277, 25776, 46932, 39842, 25983, 53287, 26051, 26051, 70527, 32640, 32640, 65495, 72012, 46827, 25776, 55996, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 72814, 32640, 32640, 53140, 22912, 36567, 70299, 34240, 32640, 25253, 32640, 32640, 32640, 32640, 49347, 54782, 64809, 51195, 32640, 32024, 32640, 32640, 32640, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 53000, 32640, 32640, 25682, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 34467, 32640, 32640, 20179, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 43098, 32640, 32640, 32640, 65491, 72012, 72012, 51277, 25776, 46932, 39842, 25983, 53287, 26051, 26051, 70527, 32640, 32640, 65495, 72012, 46827, 25776, 55996, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 72814, 32640, 32640, 53140, 22912, 36567, 70299, 34240, 32640, 25253, 32640, 31980, 32640, 32640, 49347, 54782, 64809, 51195, 32640, 32024, 32640, 31979, 32640, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 53000, 32640, 32640, 25682, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 34467, 32640, 32640, 25692, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 43098, 32640, 32640, 32640, 65491, 72012, 72012, 51277, 25776, 46932, 39842, 25983, 53287, 26051, 26051, 70527, 32640, 32640, 65495, 72012, 46827, 25776, 55996, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 72814, 32640, 32640, 53140, 22912, 36567, 70299, 34240, 32640, 25253, 32640, 32640, 32640, 32640, 49347, 54782, 64809, 51195, 32640, 32024, 32640, 32640, 32640, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 44572, 32640, 32640, 32640, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 58552, 32640, 32640, 32640, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 68602, 32640, 32640, 32640, 65491, 72012, 72012, 47768, 25776, 36922, 39842, 25983, 53287, 26051, 26051, 68608, 32640, 32640, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 72814, 32640, 32640, 53140, 22912, 36567, 70299, 34240, 32640, 25253, 32640, 32640, 32640, 32640, 49347, 54782, 64809, 69771, 32640, 32024, 32640, 32640, 32640, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 44572, 32640, 32640, 32640, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 58552, 32640, 32640, 32640, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 68602, 32640, 32640, 32640, 65491, 72012, 72012, 47768, 25776, 36922, 39842, 25983, 53287, 26051, 26051, 68608, 32640, 32640, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 72814, 32640, 32640, 53140, 22912, 36567, 70299, 41903, 32640, 25253, 32640, 32640, 32640, 32640, 49347, 54782, 64809, 51195, 32640, 32024, 32640, 32640, 32640, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 44572, 32640, 32640, 32640, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 58552, 32640, 32640, 32640, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 68602, 32640, 32640, 32640, 65491, 72012, 72012, 47768, 25776, 36922, 39842, 25983, 53287, 26051, 26051, 68608, 32640, 32640, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 72814, 32640, 32640, 53140, 32012, 36567, 70299, 34240, 32640, 25253, 32640, 32640, 32640, 32640, 49347, 54782, 64809, 51195, 32640, 32024, 32640, 57111, 32640, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 44572, 32640, 32640, 32640, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 58552, 32640, 32640, 32640, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 68602, 32640, 32640, 32640, 65491, 72012, 72012, 47768, 25776, 36922, 39842, 25983, 53287, 26051, 26051, 68608, 32640, 32640, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 72814, 32640, 32640, 53140, 22912, 27513, 32056, 32087, 32640, 25253, 32640, 32640, 32640, 32640, 49347, 54782, 64809, 51195, 32640, 32024, 32640, 32640, 32640, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 44572, 32640, 32640, 32640, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 58552, 32640, 32640, 32640, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 68602, 32640, 32640, 32640, 65491, 72012, 72012, 47768, 25776, 36922, 39842, 25983, 53287, 26051, 26051, 68608, 32640, 32640, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 72814, 32640, 32640, 53140, 22912, 36567, 70299, 34240, 32640, 25253, 32640, 32640, 32640, 32640, 49347, 54782, 64809, 51195, 32640, 32024, 32640, 32640, 32640, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 44572, 32640, 32640, 32640, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 58552, 32640, 32640, 32640, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 68602, 32640, 32640, 32640, 65491, 72012, 72012, 47768, 25776, 36922, 39842, 25983, 53287, 26051, 26051, 68608, 32640, 31793, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32154, 32640, 72814, 32640, 32640, 53140, 22912, 36567, 70299, 34240, 32640, 25253, 32640, 32640, 32640, 32640, 49347, 54782, 64809, 51195, 32640, 32024, 32640, 32640, 32640, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 44572, 32640, 32640, 32640, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 58552, 32640, 32640, 32640, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 68602, 32640, 32640, 32640, 65491, 72012, 72012, 47768, 25776, 36922, 39842, 25983, 53287, 26051, 26051, 68608, 32640, 32640, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32191, 32640, 61740, 32640, 32640, 53140, 32266, 32219, 32317, 32348, 32640, 25253, 32640, 72986, 32640, 32640, 18907, 32640, 23058, 21807, 31154, 19779, 32640, 32398, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 32449, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 22530, 32640, 61740, 32640, 32640, 53140, 22912, 32640, 32640, 32541, 32640, 25253, 32640, 72986, 32640, 32640, 18907, 32640, 23058, 40482, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 22530, 32639, 61740, 32640, 32640, 53140, 32606, 32625, 66147, 32673, 32640, 25253, 32640, 72986, 32640, 32640, 18907, 32640, 23058, 21807, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 32724, 21452, 21374, 21431, 32813, 21618, 21650, 32920, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 22530, 32640, 61740, 32640, 32640, 53140, 22912, 32640, 32640, 27379, 32640, 25253, 32640, 72986, 32640, 32640, 18907, 32640, 23058, 21807, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 33014, 72814, 65242, 23329, 65262, 33049, 33078, 33110, 33141, 72172, 33868, 38406, 33224, 33302, 35892, 33415, 33497, 33529, 33657, 32640, 70241, 33715, 23262, 70547, 65483, 72012, 56115, 31942, 25776, 33771, 25983, 62395, 26051, 60426, 53000, 43338, 33820, 20169, 33900, 28052, 33936, 72012, 34004, 34096, 25776, 69679, 34153, 25983, 34209, 34305, 26051, 34381, 34413, 59316, 60982, 34567, 18580, 43988, 66280, 56105, 34613, 34671, 54769, 57995, 34763, 50540, 69616, 34835, 44365, 69116, 72659, 27683, 51215, 45101, 34941, 55781, 57901, 25776, 68182, 34981, 25983, 35037, 38017, 43551, 35100, 35168, 46148, 32692, 38542, 69316, 67857, 54357, 35200, 37506, 35270, 39191, 36089, 32640, 37090, 24260, 50683, 56669, 60278, 35348, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 43929, 35445, 35530, 35582, 50980, 66874, 47849, 48295, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 35651, 72814, 32640, 32640, 53140, 35689, 35718, 35750, 35781, 32640, 25253, 32640, 32640, 32640, 32640, 42703, 63159, 35832, 71490, 32640, 32024, 32640, 32640, 32640, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 53000, 32640, 32640, 71083, 54414, 54421, 64131, 72012, 55872, 25809, 25776, 60149, 25844, 25983, 63179, 26051, 26051, 34327, 34467, 32640, 32640, 25692, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 43098, 32640, 35952, 27144, 30726, 72012, 63213, 63138, 25776, 69714, 35989, 25983, 42068, 36035, 26051, 36069, 32640, 32640, 65495, 72012, 46827, 25776, 55996, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 20456, 36134, 36191, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 64516, 72814, 48426, 59530, 63767, 36272, 36304, 36336, 36367, 32640, 36432, 25203, 32640, 32640, 41660, 37716, 55922, 36483, 36530, 48415, 59494, 31702, 18855, 62820, 64973, 39682, 72012, 36599, 25776, 18725, 36659, 69934, 36699, 26051, 52493, 36750, 23246, 55732, 34581, 32640, 18679, 55301, 36783, 36820, 35485, 36918, 36954, 37494, 37030, 64702, 65892, 37178, 34467, 32640, 37225, 65319, 32640, 68393, 72012, 37261, 33962, 25776, 37316, 55427, 25983, 39119, 39566, 26051, 49047, 43098, 37375, 42559, 23999, 65491, 72012, 48479, 51277, 25776, 37411, 39842, 45287, 53287, 26051, 67220, 70527, 32640, 37538, 37571, 37131, 46827, 23541, 55996, 67894, 53288, 53572, 47622, 37618, 25915, 66600, 37659, 46843, 32872, 37796, 37836, 46302, 47046, 68392, 23524, 65621, 25983, 37889, 41315, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 37927, 37988, 38060, 47849, 36159, 34716, 26535, 44815, 38151, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 20106, 72814, 32509, 23162, 53140, 38224, 38253, 38285, 38316, 32640, 25253, 32640, 32640, 60657, 39330, 34441, 50711, 54836, 51195, 33270, 38384, 46719, 22206, 33192, 38438, 72385, 38511, 38616, 40937, 20657, 38673, 38705, 39528, 38892, 38940, 32640, 47380, 49323, 32640, 70823, 64131, 72012, 32968, 25809, 25776, 45195, 25844, 25983, 46666, 26051, 26051, 58683, 38996, 32640, 59450, 25692, 27180, 22361, 39052, 64136, 40912, 42209, 25776, 39090, 66443, 25983, 39151, 60300, 26051, 39223, 32640, 32640, 36102, 70444, 72012, 71366, 65683, 25776, 39291, 39362, 35619, 34803, 26051, 43538, 70527, 72942, 37229, 65495, 39402, 46827, 39434, 39492, 52767, 39560, 39598, 39731, 22659, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 19837, 68392, 68106, 33972, 25983, 39769, 58918, 26609, 71375, 56493, 39511, 67952, 33375, 70146, 67746, 39807, 39877, 27300, 39932, 39984, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 22609, 72814, 27464, 30794, 40060, 40119, 40148, 40180, 40211, 40263, 40295, 40364, 40412, 40514, 40546, 40606, 40667, 40699, 40731, 40783, 20976, 40854, 40994, 52527, 25308, 41046, 39699, 41078, 46357, 49141, 41137, 44544, 41236, 41286, 41368, 47192, 41460, 41554, 41610, 40087, 41703, 41735, 41816, 41872, 41968, 42030, 42100, 42250, 42282, 42373, 42458, 42490, 42522, 42554, 42591, 31571, 42679, 24113, 42735, 42778, 42826, 42887, 59586, 42933, 43014, 20677, 52796, 43080, 37857, 50773, 19009, 50153, 72778, 68055, 66201, 43130, 61992, 43205, 43285, 43380, 36003, 43457, 50341, 43583, 43639, 62580, 43704, 43740, 65764, 46827, 43772, 55996, 43804, 43857, 43893, 43961, 72604, 44020, 44104, 67022, 44136, 44196, 44228, 44289, 44397, 41399, 46788, 44452, 69369, 44513, 44648, 70208, 20438, 68896, 51376, 63626, 44257, 54317, 44622, 67433, 55113, 55250, 49487, 51457, 67801, 44680, 44712, 34716, 38736, 44788, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 54076, 72814, 67462, 71804, 46979, 44874, 44903, 44935, 44966, 65157, 25253, 32640, 32640, 45018, 45029, 45061, 36627, 47904, 71490, 70229, 49986, 32640, 30141, 65148, 45093, 45133, 72012, 45175, 25776, 67154, 25983, 61672, 45240, 26051, 53000, 32640, 32640, 25682, 32640, 30614, 64131, 72012, 62187, 25809, 25776, 34052, 25844, 25983, 58051, 26051, 26051, 68586, 34467, 32640, 32640, 25692, 49974, 68393, 36788, 72012, 33962, 51715, 25776, 55427, 25983, 45283, 39566, 26051, 45319, 43098, 32640, 32640, 22533, 65491, 72012, 65748, 51277, 25776, 40635, 39842, 48131, 53287, 26051, 72059, 70527, 32640, 32640, 65495, 72012, 46827, 25776, 55996, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 26195, 32640, 30913, 33383, 31947, 68516, 43425, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 38767, 44815, 45355, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 72814, 72990, 32640, 53140, 45461, 45480, 45512, 45543, 32640, 25253, 25880, 32640, 32640, 32640, 49347, 54782, 64809, 65216, 32640, 32024, 32640, 29772, 32640, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 44572, 32640, 32640, 32640, 26944, 43348, 64131, 72012, 72012, 45595, 25776, 25776, 45631, 25983, 25984, 26051, 26051, 26018, 58552, 32640, 45666, 62963, 32640, 45736, 45143, 72012, 33962, 47777, 25776, 55427, 45634, 25983, 39566, 62106, 26051, 66507, 32640, 61374, 32640, 65491, 72012, 72012, 47768, 25776, 36922, 39842, 25983, 53287, 26051, 26051, 68608, 32640, 45776, 65495, 72012, 45833, 25776, 43236, 25983, 48970, 26051, 35378, 19759, 45883, 40885, 45935, 34121, 45988, 46059, 68691, 46114, 46509, 48784, 46180, 46232, 52911, 56583, 46294, 61320, 46334, 46389, 52972, 46541, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 57068, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 72814, 32640, 32640, 53140, 22912, 36567, 70299, 37061, 32640, 46592, 32640, 23927, 23933, 35920, 72528, 46641, 71255, 46698, 32640, 41638, 46765, 32640, 32640, 25308, 72012, 32982, 31942, 25812, 62010, 25983, 52465, 26051, 62071, 44572, 32640, 32640, 32640, 32640, 46875, 64131, 72012, 72012, 46928, 25776, 25777, 25844, 25983, 25846, 26051, 26051, 48238, 66922, 32640, 32640, 32640, 58432, 34888, 72012, 72012, 24139, 25776, 25776, 64186, 25983, 25983, 64365, 26051, 26051, 68602, 32640, 31139, 32640, 65491, 72012, 59125, 47768, 25776, 23575, 39842, 25983, 43409, 26051, 51585, 68608, 32640, 40326, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 23989, 59115, 71381, 31947, 25983, 51580, 26788, 46560, 61892, 58181, 67203, 61301, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 48851, 72814, 23672, 46964, 47011, 47078, 47108, 47140, 47171, 32640, 41336, 32640, 50620, 20998, 40574, 47224, 47285, 49169, 47359, 32640, 35316, 31404, 32640, 22498, 71540, 47426, 22395, 47485, 41998, 47553, 68243, 35005, 43487, 49590, 47654, 45801, 22675, 32476, 32285, 47707, 67491, 67589, 47739, 47809, 47521, 53771, 47881, 39370, 54202, 70106, 63727, 47936, 58552, 32640, 49793, 48007, 32640, 65551, 71979, 37586, 48049, 48729, 71596, 33444, 48130, 48163, 50320, 48235, 48270, 34864, 70560, 48327, 48393, 48458, 72887, 48523, 38468, 37956, 42313, 48632, 55501, 51516, 36886, 48664, 48761, 48816, 50855, 27414, 41840, 48883, 63268, 48941, 45429, 49017, 55015, 49079, 32640, 22725, 23734, 49111, 51113, 69533, 55593, 49224, 46302, 49298, 68392, 71381, 31947, 25983, 51580, 58698, 26609, 49388, 58232, 70503, 49450, 42622, 70146, 67746, 49519, 60834, 49912, 26461, 39900, 47849, 56608, 49551, 26535, 44815, 49622, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 69860, 72814, 32640, 32640, 53140, 22912, 46609, 49741, 49772, 32640, 25253, 32640, 32640, 32640, 32640, 49347, 54782, 64809, 51195, 32640, 32024, 32640, 32640, 32640, 25308, 72012, 57444, 31942, 38479, 62010, 25983, 49825, 26051, 53559, 44572, 32640, 32640, 32640, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 58552, 32640, 32640, 32640, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 68602, 32640, 32640, 32640, 65491, 72012, 72012, 47768, 25776, 36922, 39842, 25983, 53287, 26051, 26051, 68608, 32640, 32640, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 59709, 72814, 32640, 32640, 53140, 22912, 36567, 70299, 34240, 32640, 25253, 61385, 32640, 32640, 32640, 49347, 54782, 64809, 51195, 32640, 32024, 32640, 32640, 32640, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 44572, 32640, 32640, 32640, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 55063, 32640, 32640, 32640, 32640, 51342, 72012, 72012, 34031, 25776, 25776, 21586, 25983, 25983, 37804, 26051, 26051, 68602, 32640, 32640, 32640, 65491, 72012, 72012, 47768, 25776, 36922, 39842, 25983, 53287, 26051, 26051, 68608, 32640, 32640, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 52831, 72814, 72305, 49953, 50018, 50050, 50069, 50101, 50132, 70815, 25253, 24050, 32640, 72261, 50206, 50261, 50293, 50389, 50456, 50572, 49266, 32159, 46476, 50609, 46896, 49653, 37284, 50652, 61556, 51136, 34792, 50743, 43516, 41182, 50834, 50887, 32640, 37764, 32640, 32640, 39657, 23757, 50924, 50956, 53683, 55377, 51012, 52437, 51082, 71275, 51168, 51247, 58552, 31456, 32640, 51318, 32640, 68393, 71632, 34909, 33962, 25776, 51408, 55427, 25983, 51489, 51571, 26051, 51617, 51676, 60646, 71309, 32640, 65491, 66269, 72012, 47768, 51714, 36922, 67551, 25983, 53287, 50411, 26051, 51682, 70346, 19987, 51747, 72012, 24952, 25776, 68123, 51821, 47327, 51856, 50424, 31808, 72723, 44072, 71378, 24163, 55203, 53286, 67732, 46302, 62840, 68392, 67136, 45208, 51824, 51580, 51892, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 49192, 51996, 52096, 48579, 26535, 57041, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32641, 72814, 32640, 52167, 20380, 52202, 52231, 52263, 52294, 52373, 25253, 38352, 32640, 52375, 52359, 29926, 52407, 61167, 51195, 57599, 32024, 25590, 52525, 32640, 52559, 51778, 52613, 52685, 43173, 52736, 25950, 43825, 49580, 44319, 53632, 52043, 52828, 32640, 32640, 32640, 58759, 38563, 72012, 52863, 54749, 25776, 52943, 55231, 25984, 38908, 53056, 26018, 58552, 53105, 32640, 22853, 53172, 39020, 53205, 55838, 69472, 53239, 53488, 67539, 53276, 33788, 39566, 53320, 63643, 68602, 32640, 32640, 32640, 65491, 72012, 72012, 47768, 25776, 36922, 39842, 25983, 53287, 26051, 26051, 68608, 32640, 32640, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 53361, 32640, 72366, 71378, 53397, 57660, 53286, 53431, 46302, 32640, 68392, 71381, 47833, 35238, 66390, 37193, 26609, 71375, 60465, 43860, 63958, 50482, 38641, 53073, 53467, 53538, 49912, 26461, 39900, 47849, 36159, 48078, 53604, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 53715, 36751, 53803, 53858, 53921, 53950, 53982, 54013, 68341, 65423, 54066, 22337, 73196, 54108, 54140, 54172, 54234, 54389, 39321, 25417, 42341, 50174, 54455, 44050, 56059, 66616, 54504, 54555, 45851, 57679, 42130, 56789, 64232, 60925, 56829, 19692, 32640, 54689, 69055, 20609, 57455, 72012, 54726, 52653, 25776, 54814, 63908, 25984, 61227, 36498, 26018, 58552, 32640, 47394, 24383, 68318, 72870, 72012, 54868, 18707, 25776, 69705, 54929, 25983, 71927, 54995, 26051, 43915, 55047, 31632, 29738, 32574, 55095, 55145, 55282, 55174, 55347, 55409, 55471, 55533, 55625, 55661, 26850, 67349, 33333, 55693, 55764, 55813, 55904, 55954, 45409, 55563, 59673, 58326, 64010, 31239, 37627, 56028, 56147, 63574, 71739, 56202, 48600, 52021, 33017, 44420, 56272, 51439, 56304, 26558, 56379, 49469, 56435, 56525, 55629, 58860, 53658, 56557, 38796, 56640, 56760, 53746, 56861, 56918, 47849, 36159, 34716, 35068, 57014, 26905, 57100, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 57143, 60501, 46140, 53140, 57269, 57298, 57330, 57361, 57393, 21867, 57487, 53826, 57561, 73137, 57631, 57725, 57757, 57818, 64532, 33845, 25743, 28903, 32640, 30718, 48491, 57871, 57933, 57965, 50507, 34177, 46420, 65902, 58083, 44572, 34502, 27347, 47675, 69192, 32417, 27057, 58115, 45744, 58167, 58213, 58473, 58264, 36980, 26375, 58296, 44349, 69977, 37742, 31057, 58358, 32640, 35957, 68393, 49673, 58395, 33962, 23558, 65824, 55427, 66456, 46015, 39566, 60313, 47611, 68602, 32640, 47038, 58431, 65491, 72012, 72012, 58464, 25776, 27804, 58505, 25983, 57693, 26051, 26051, 58542, 33253, 32640, 51913, 22383, 49691, 64312, 64327, 50524, 46027, 71028, 38028, 53132, 32640, 21514, 49356, 67641, 68454, 61634, 65986, 49249, 32640, 68392, 71381, 31947, 25983, 51580, 39737, 67971, 58592, 35498, 68821, 42982, 65031, 58624, 58730, 58791, 58892, 49912, 26461, 39900, 47849, 36159, 34716, 60897, 62262, 58971, 59003, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 53024, 32640, 59046, 59088, 59157, 59186, 59218, 59249, 26690, 25253, 32640, 62512, 59314, 32640, 21399, 45956, 59348, 59428, 60204, 32024, 59282, 59482, 59526, 27721, 62325, 42794, 59562, 37343, 41105, 59653, 46262, 57786, 56728, 42158, 59014, 59705, 59741, 32640, 32640, 64131, 27582, 72012, 25809, 51286, 25776, 25844, 68525, 25984, 26051, 69412, 26018, 38086, 59766, 53173, 30453, 31873, 68393, 59807, 72012, 38182, 56458, 25776, 67880, 68261, 25983, 39566, 61247, 26051, 68602, 40380, 32640, 32640, 65491, 72012, 59857, 47966, 60005, 45599, 39842, 71940, 53287, 26051, 59892, 68608, 32640, 32640, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 71116, 32640, 59931, 71378, 25776, 29955, 53286, 26051, 56227, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 36718, 59969, 24280, 60037, 60131, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 72814, 32640, 32640, 53140, 22912, 36567, 70299, 34240, 32640, 25253, 54423, 32640, 20742, 60181, 32843, 60251, 67710, 54291, 32640, 32024, 32640, 32640, 32640, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 44572, 32640, 29420, 32640, 32640, 32640, 64131, 72012, 72012, 60345, 25776, 25776, 60381, 25983, 25984, 26051, 26051, 26018, 58552, 32640, 32640, 32640, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 68602, 32640, 32640, 32640, 65491, 53207, 72012, 47768, 27763, 36922, 39842, 71874, 53287, 26051, 60418, 68608, 32640, 32640, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 70720, 71381, 60458, 35226, 48985, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 36240, 60497, 23383, 53140, 60533, 60561, 60593, 60624, 23405, 25467, 22160, 33169, 60689, 60747, 60715, 60805, 60866, 60957, 32640, 36400, 61023, 26995, 32640, 33355, 55315, 59825, 61082, 65831, 61145, 47313, 61199, 61279, 67236, 61352, 32640, 30073, 61417, 71794, 61454, 22979, 61508, 38584, 61544, 61588, 56170, 61624, 61666, 64623, 61704, 26051, 48694, 58552, 65333, 72472, 61736, 61772, 61831, 56082, 61881, 64292, 46200, 55981, 63076, 32888, 56329, 36998, 50357, 58842, 68602, 61924, 31336, 31217, 32949, 61962, 72012, 54897, 52135, 36922, 43253, 54949, 53287, 62059, 62103, 54635, 69791, 32640, 71552, 72012, 20633, 25776, 66700, 25983, 70631, 26051, 43048, 60991, 32640, 27575, 38860, 26267, 35612, 71431, 26052, 46302, 39252, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 59396, 61050, 48909, 62138, 49921, 43861, 50802, 44756, 26873, 47849, 36159, 34716, 33560, 62235, 62294, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 69266, 62427, 62544, 62612, 62644, 62673, 62705, 62736, 31256, 49878, 31910, 32640, 62790, 62885, 62917, 44164, 69556, 51644, 62949, 62995, 45696, 32640, 19278, 63027, 63108, 63211, 63245, 54342, 53506, 63300, 61672, 63378, 63410, 44572, 63450, 21770, 63487, 58560, 32640, 57422, 68884, 61512, 63553, 47513, 61592, 63606, 63675, 29960, 51050, 63717, 37895, 63759, 18562, 21217, 40028, 32560, 63799, 59860, 58135, 43158, 25776, 63843, 70614, 25983, 63875, 63940, 26051, 63990, 64042, 64442, 21262, 32640, 64117, 58399, 38848, 47768, 24174, 64168, 39842, 56347, 53287, 26051, 64218, 68608, 27898, 31520, 65495, 64264, 51931, 42855, 67656, 26365, 64359, 39180, 64397, 32640, 22880, 64131, 71378, 25776, 29955, 53286, 26051, 56886, 32234, 41489, 41766, 51964, 60386, 51580, 64489, 54657, 64564, 34064, 72128, 35550, 42184, 64655, 39628, 49921, 43861, 62758, 40962, 68714, 54610, 64734, 36847, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 25270, 32640, 23111, 32122, 64856, 64887, 64919, 64950, 31389, 65005, 27232, 34519, 65063, 65120, 65088, 61113, 65189, 65294, 65365, 65397, 32640, 65455, 65527, 65583, 65653, 65730, 65796, 42647, 52704, 58025, 65863, 65934, 65966, 66033, 64072, 66099, 26683, 30564, 66131, 66179, 66246, 41522, 66312, 64765, 26100, 66344, 66422, 62027, 63346, 66488, 48098, 66539, 38119, 40439, 30690, 24714, 66648, 46809, 22991, 67082, 66680, 47975, 66732, 66764, 58510, 66819, 66851, 26304, 66906, 66954, 31272, 32640, 67000, 67054, 67114, 21544, 34639, 21568, 67186, 67268, 67325, 67402, 54264, 43607, 48017, 34273, 42426, 67583, 30935, 67621, 41784, 67688, 48203, 67778, 64824, 41671, 20315, 24236, 67833, 44481, 37470, 67926, 59378, 68003, 32640, 68087, 68155, 34696, 68214, 39952, 68293, 68373, 68425, 68486, 66787, 35862, 33375, 70146, 67746, 49921, 43861, 49912, 58817, 68777, 68557, 68640, 68746, 58655, 44815, 68853, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 64085, 32640, 48353, 53140, 68928, 68957, 68989, 69020, 32640, 27125, 27632, 30788, 27143, 32640, 31656, 64595, 69087, 69148, 32640, 32024, 32640, 69224, 32640, 49895, 69298, 39058, 69348, 25776, 49418, 25983, 70024, 69401, 45323, 46448, 24757, 70970, 32640, 27865, 31743, 52581, 61849, 69444, 69504, 54523, 54583, 69588, 33465, 69648, 59899, 33588, 69746, 58552, 69823, 32640, 32640, 69855, 38964, 72012, 72012, 65611, 69892, 25776, 72113, 69928, 25983, 39566, 69966, 26051, 41254, 35657, 32640, 32640, 61476, 72012, 72012, 62354, 25776, 36922, 70009, 25983, 26418, 26051, 26051, 34349, 32640, 18845, 26622, 72012, 27075, 25776, 39460, 70056, 67293, 70094, 41204, 31858, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 45386, 70138, 70178, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 46082, 68666, 70273, 34716, 26535, 44842, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 22217, 68030, 66060, 33739, 70331, 54472, 70378, 70409, 32640, 25253, 32640, 32640, 32640, 32640, 19302, 70476, 56692, 51195, 59775, 43315, 32640, 32640, 27647, 25308, 37113, 62203, 70592, 53244, 62010, 70663, 47583, 56714, 33625, 44572, 32640, 32640, 28000, 32640, 29763, 64131, 55855, 72012, 25809, 51949, 25776, 25844, 56967, 25984, 26051, 33611, 26018, 58552, 32640, 32640, 32640, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 68602, 32640, 32640, 32640, 65491, 72012, 72012, 47768, 25776, 36922, 39842, 25983, 53287, 26051, 26051, 68608, 50577, 32640, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 25506, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 70701, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 59056, 32640, 70752, 70788, 70855, 70884, 70916, 70947, 32640, 25253, 32640, 32640, 32640, 32640, 41578, 49709, 71012, 71060, 32640, 32024, 32640, 32640, 71115, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 44572, 32640, 32640, 32640, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 58552, 32640, 32640, 38108, 32640, 24932, 72012, 72012, 52641, 25776, 25776, 71858, 25983, 25983, 43032, 26051, 26051, 68602, 32640, 71148, 32640, 65491, 51789, 34949, 47768, 56478, 42901, 39842, 71181, 63325, 63418, 36037, 68608, 32640, 32640, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32154, 32640, 72814, 32640, 32640, 53140, 22912, 36567, 70299, 34240, 32640, 25640, 43672, 32640, 22790, 58939, 37441, 71228, 41160, 51195, 32640, 22183, 71515, 71307, 32640, 25308, 72012, 71341, 31942, 35465, 71413, 36667, 59621, 26051, 71463, 42401, 32640, 32640, 32640, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 58552, 32640, 32640, 41936, 32640, 68393, 66214, 72012, 71584, 38192, 25776, 42053, 70669, 25983, 39566, 39775, 26051, 68602, 35405, 32640, 32640, 65491, 71628, 72012, 48552, 25776, 36922, 26149, 25983, 53287, 71664, 26051, 68608, 32640, 32640, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 72814, 32640, 32640, 53140, 22912, 36567, 70299, 37690, 32640, 25253, 66067, 32640, 32640, 32640, 71710, 26739, 42964, 71771, 20325, 32024, 32640, 32640, 32640, 27283, 72012, 59937, 31942, 25776, 52893, 25983, 56982, 26051, 51860, 44572, 23321, 32640, 32640, 37539, 32640, 38825, 72013, 72012, 71836, 53399, 25776, 71906, 39845, 25984, 71678, 53435, 26018, 58552, 30134, 32640, 32640, 32640, 68393, 71972, 72012, 63054, 52123, 25776, 62376, 48188, 25983, 24297, 36872, 26051, 68602, 32640, 32640, 33904, 65491, 72012, 72011, 47768, 42218, 36922, 39842, 71196, 53287, 26051, 72045, 68608, 32640, 48843, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 45251, 32640, 34258, 23504, 63811, 25776, 68806, 63685, 26051, 46302, 23041, 68392, 72091, 44738, 54963, 34731, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 31905, 32640, 72814, 32640, 32640, 53140, 72160, 36567, 70299, 34240, 32640, 25253, 32640, 32640, 32640, 32640, 49347, 54782, 64809, 51195, 32640, 32024, 32640, 32640, 32640, 25308, 72012, 72012, 31942, 25776, 62010, 25983, 61672, 26051, 26051, 44572, 32640, 32640, 32640, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 58552, 32640, 32640, 32640, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 68602, 32640, 32640, 32640, 65491, 72012, 72012, 47768, 25776, 36922, 39842, 25983, 53287, 26051, 26051, 68608, 32640, 32640, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 22530, 32640, 72268, 72234, 40231, 72204, 72300, 72337, 72417, 72449, 32640, 25253, 71149, 72986, 32640, 32640, 22011, 19703, 24646, 21807, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 21985, 22069, 72504, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 22530, 32640, 61740, 32640, 70431, 53140, 72560, 72589, 60219, 72636, 32640, 25253, 32640, 72986, 50892, 50890, 18907, 32640, 40751, 21807, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22037, 22069, 18821, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 22530, 32640, 61930, 32640, 32640, 19846, 72691, 72708, 30629, 72755, 32640, 25253, 32640, 72810, 59270, 52170, 18907, 32640, 23058, 21807, 31154, 19779, 32640, 18612, 18649, 18757, 18789, 18959, 22311, 22069, 72846, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 21310, 21452, 21374, 21431, 21484, 21618, 21650, 21741, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 22530, 32640, 61740, 32640, 32640, 53140, 22912, 32640, 32640, 72919, 32640, 25253, 32640, 32640, 32640, 32640, 49347, 54782, 64809, 35297, 32640, 32024, 32640, 32640, 32640, 25308, 72012, 72012, 48724, 25776, 59604, 25983, 61672, 26051, 26051, 44572, 32640, 32640, 32640, 32640, 32640, 64131, 72012, 72012, 25809, 25776, 25776, 25844, 25983, 25984, 26051, 26051, 26018, 58552, 32640, 32640, 32640, 32640, 68393, 72012, 72012, 33962, 25776, 25776, 55427, 25983, 25983, 39566, 26051, 26051, 68602, 32640, 32640, 32640, 65491, 72012, 72012, 47768, 25776, 36922, 39842, 25983, 53287, 26051, 26051, 68608, 32640, 32640, 65495, 72012, 51360, 25776, 65698, 25983, 53288, 26051, 37187, 32640, 32640, 64131, 71378, 25776, 29955, 53286, 26051, 46302, 32640, 68392, 71381, 31947, 25983, 51580, 37193, 26609, 71375, 60465, 43860, 58860, 33375, 70146, 67746, 49921, 43861, 49912, 26461, 39900, 47849, 36159, 34716, 26535, 44815, 26905, 26933, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 34485, 32640, 23212, 23229, 52327, 72974, 32640, 32640, 32640, 72986, 32640, 32640, 18907, 32640, 23058, 21807, 31154, 43659, 32640, 18612, 18649, 18757, 18789, 18959, 21985, 22069, 72504, 22057, 18887, 18787, 18957, 18991, 36451, 32640, 24875, 69179, 19041, 62458, 19134, 40819, 21341, 19073, 46732, 21342, 19074, 46733, 19106, 19193, 40822, 19438, 66570, 19251, 21244, 41014, 19334, 19366, 19398, 19470, 19502, 19538, 25119, 19498, 19534, 19570, 19359, 19629, 19422, 19661, 19735, 19811, 19878, 19910, 19942, 20019, 30851, 30993, 20026, 30858, 20058, 19907, 21927, 19969, 20090, 20138, 20211, 20265, 20357, 63521, 20412, 63518, 20488, 20547, 20291, 20579, 20709, 20774, 20821, 20870, 20853, 20885, 20789, 20917, 20949, 21030, 21062, 21094, 21084, 21126, 21186, 73022, 21452, 21374, 21431, 73111, 21618, 21650, 73169, 21802, 23057, 21839, 21899, 21959, 22101, 21154, 22249, 22281, 22427, 22459, 22487, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 32640, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 180523, 180523, 180523, 180523, 0, 188716, 188716, 188716, 180523, 180523, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 0, 188716, 180523, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 139264, 147456, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 131072, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 188716, 367, 188716, 180523, 188716, 188716, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 180523, 188716, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2289, 0, 2290, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2368, 2369, 0, 0, 2371, 0, 0, 0, 0, 2376, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4276224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 307, 0, 0, 5767168, 0, 0, 0, 4857856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5259264, 0, 5414912, 5447680, 0, 0, 5562368, 5636096, 5685248, 0, 5750784, 5873664, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1877, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1889, 521, 521, 521, 521, 521, 521, 0, 0, 0, 0, 57886, 57886, 57886, 59821, 57886, 59823, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 50657, 58754, 977, 57909, 57909, 58853, 57909, 57909, 58857, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58871, 0, 0, 5636096, 5873664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5873664, 0, 0, 0, 0, 0, 0, 0, 5480448, 4358144, 4358144, 4358144, 4358144, 4857856, 4874240, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5259264, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5414912, 4358144, 5447680, 4358144, 5464064, 4358144, 5480448, 5562368, 4358144, 0, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 977, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1262, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5873664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1140, 0, 0, 1145, 0, 4857856, 4874240, 0, 0, 4923392, 5562368, 4358144, 4358144, 4358144, 5636096, 4358144, 5685248, 4358144, 4358144, 5750784, 4358144, 4358144, 4358144, 4358144, 4358144, 5873664, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6275072, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4923392, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 4923392, 0, 0, 0, 0, 4366336, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2755, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2766, 0, 0, 0, 0, 0, 0, 4825088, 0, 0, 5177344, 0, 0, 0, 0, 5701632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5808128, 0, 0, 0, 0, 4792320, 4833280, 0, 0, 5701632, 0, 5242880, 0, 0, 0, 0, 0, 0, 0, 5341184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5627904, 5652480, 0, 5701632, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4825088, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5177344, 4358144, 4358144, 4358144, 4358144, 4358144, 5242880, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5341184, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5627904, 5652480, 4358144, 5701632, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 483328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 4923392, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5341184, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5627904, 5652480, 4358144, 5701632, 4358144, 4358144, 5808128, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 1051, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 4923392, 0, 0, 6422528, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5619712, 0, 0, 0, 0, 0, 0, 0, 5726208, 5758976, 0, 0, 5791744, 0, 0, 0, 0, 0, 0, 0, 1151, 1278, 0, 0, 0, 0, 0, 0, 1285, 0, 0, 0, 0, 0, 0, 0, 1290, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 848, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 0, 6479872, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4931584, 4939776, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5054464, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5210112, 4358144, 4358144, 4358144, 4358144, 5292032, 4358144, 4358144, 4358144, 4358144, 5365760, 4358144, 4358144, 4358144, 5455872, 4358144, 4358144, 4358144, 4358144, 4358144, 5554176, 5570560, 5578752, 5619712, 5668864, 4358144, 4358144, 4358144, 5791744, 5816320, 4358144, 5857280, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6119424, 4358144, 6168576, 4358144, 4358144, 4358144, 4358144, 6242304, 4358144, 6291456, 4358144, 6316032, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6463488, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4931584, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 6463488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4931584, 4939776, 0, 0, 0, 0, 0, 0, 5054464, 0, 0, 0, 0, 0, 0, 0, 0, 5210112, 0, 0, 0, 0, 5292032, 0, 0, 0, 0, 5365760, 0, 0, 0, 5455872, 0, 0, 0, 0, 0, 5554176, 5570560, 5578752, 5619712, 5668864, 0, 5578752, 5619712, 5668864, 0, 0, 0, 5791744, 5816320, 0, 5857280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6119424, 0, 6168576, 0, 0, 0, 0, 0, 6242304, 0, 6291456, 0, 6316032, 0, 6291456, 0, 6316032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6463488, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4931584, 4939776, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 491520, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 4923392, 5578752, 5619712, 5668864, 4358144, 4358144, 4358144, 5791744, 5816320, 4358144, 5857280, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6119424, 4358144, 6168576, 4358144, 4358144, 4358144, 4358144, 4358144, 6242304, 4956160, 4964352, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5218304, 0, 0, 0, 0, 5799936, 0, 5881856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6373376, 6389760, 0, 0, 0, 0, 0, 1758, 0, 0, 1761, 0, 1763, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 977, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6488064, 6103040, 0, 0, 0, 0, 0, 6184960, 5316608, 0, 0, 5644288, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6217728, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3384, 0, 0, 0, 3388, 0, 0, 0, 0, 0, 3394, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 367, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5390336, 5308416, 5488640, 0, 0, 5070848, 5431296, 0, 6430720, 0, 0, 5160960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4784128, 0, 0, 0, 0, 0, 0, 0, 0, 3623, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2359296, 417, 417, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6283264, 6332416, 0, 0, 0, 5881856, 0, 5382144, 0, 0, 0, 0, 0, 0, 6266880, 4784128, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4915200, 4358144, 4956160, 4972544, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5070848, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5218304, 4358144, 5267456, 4358144, 4358144, 5308416, 5316608, 4358144, 4358144, 4358144, 5431296, 4358144, 5488640, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5799936, 4358144, 4358144, 5881856, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6103040, 4358144, 4358144, 4358144, 6184960, 4358144, 4358144, 6283264, 4358144, 4358144, 6332416, 4358144, 4358144, 4358144, 6389760, 4358144, 4358144, 6430720, 6438912, 4358144, 4358144, 4358144, 6266880, 6488064, 0, 0, 0, 6266880, 6488064, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3149, 0, 0, 0, 0, 3154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4358144, 6430720, 6438912, 0, 0, 0, 0, 0, 0, 4784128, 0, 0, 0, 4849664, 0, 0, 0, 0, 0, 4915200, 0, 4956160, 4972544, 0, 0, 0, 0, 0, 0, 5070848, 0, 0, 0, 0, 0, 0, 0, 5218304, 0, 0, 6103040, 0, 0, 0, 6184960, 0, 0, 0, 6283264, 0, 0, 6332416, 0, 0, 0, 6389760, 0, 0, 6430720, 6438912, 4784128, 4358144, 4358144, 4358144, 4849664, 4358144, 4358144, 4358144, 4358144, 4358144, 4915200, 0, 5660672, 5718016, 0, 5865472, 0, 0, 6037504, 0, 0, 6078464, 0, 0, 6340608, 0, 6455296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 325, 326, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5472256, 0, 0, 0, 6209536, 0, 0, 0, 0, 6176768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4898816, 0, 5709824, 0, 0, 0, 0, 0, 1790, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1806, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2348, 0, 0, 0, 0, 0, 0, 0, 0, 5283840, 0, 0, 0, 0, 5251072, 0, 6414336, 5832704, 0, 5955584, 0, 0, 4358144, 4358144, 4841472, 4358144, 4358144, 4358144, 4898816, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368640, 0, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 4923392, 4358144, 5111808, 4358144, 4358144, 4358144, 4358144, 4358144, 5283840, 4358144, 4358144, 4358144, 4358144, 5472256, 5521408, 4358144, 4358144, 4358144, 5595136, 5709824, 5718016, 4358144, 5824512, 5865472, 4358144, 4358144, 5922816, 4358144, 4358144, 6021120, 4358144, 6037504, 4358144, 4358144, 6078464, 6111232, 4358144, 6176768, 6209536, 4358144, 6234112, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3408, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1172, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4358144, 6078464, 6111232, 4358144, 6176768, 6209536, 6234112, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 0, 0, 0, 4841472, 0, 0, 0, 4898816, 0, 0, 0, 0, 0, 0, 0, 0, 0, 340, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 388, 0, 139264, 147456, 0, 0, 0, 0, 0, 6037504, 0, 0, 6078464, 6111232, 0, 6176768, 6209536, 0, 6234112, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4841472, 0, 0, 0, 4898816, 0, 0, 0, 0, 0, 0, 0, 0, 3773, 0, 3627, 3775, 0, 0, 3778, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 4024, 521, 4026, 521, 521, 4028, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 6021120, 0, 6037504, 0, 0, 6078464, 6111232, 0, 6176768, 6209536, 0, 6234112, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4841472, 4358144, 4358144, 4358144, 4898816, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 499712, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 4923392, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5111808, 4358144, 4358144, 4358144, 4358144, 4358144, 5283840, 4358144, 4358144, 4358144, 4358144, 5472256, 5521408, 4358144, 4358144, 4358144, 4358144, 5595136, 5709824, 5718016, 4358144, 5824512, 5865472, 4358144, 4358144, 5922816, 0, 5029888, 5038080, 0, 0, 5103616, 5201920, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6406144, 5357568, 0, 5505024, 0, 0, 0, 0, 0, 5890048, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1873, 521, 521, 521, 521, 521, 521, 521, 521, 1884, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3216, 521, 521, 521, 521, 0, 0, 57886, 57886, 57886, 57886, 57886, 60569, 57886, 60570, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58842, 57886, 57886, 57886, 57886, 50657, 58754, 977, 57909, 57909, 58854, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59962, 59963, 57909, 57909, 57909, 57909, 57909, 57909, 59970, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 6160384, 0, 5095424, 5349376, 0, 5275648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5947392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 301, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6471680, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4997120, 4358144, 4358144, 5038080, 4358144, 4358144, 4358144, 5095424, 5103616, 4358144, 4358144, 5201920, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5890048, 4358144, 4358144, 4358144, 6029312, 4358144, 4358144, 4358144, 4358144, 6160384, 4358144, 4358144, 4358144, 4358144, 5890048, 4358144, 4358144, 4358144, 6029312, 4358144, 4358144, 4358144, 4358144, 6160384, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6406144, 0, 0, 0, 0, 0, 0, 0, 0, 4997120, 0, 0, 5038080, 0, 0, 0, 0, 6406144, 0, 0, 0, 0, 0, 0, 0, 0, 4997120, 0, 0, 5038080, 0, 0, 0, 5095424, 5103616, 0, 0, 5201920, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5890048, 0, 0, 0, 6029312, 0, 0, 0, 0, 6160384, 0, 0, 0, 0, 0, 0, 0, 6406144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4997120, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6406144, 4358144, 4358144, 4358144, 0, 0, 0, 4890624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5898240, 5963776, 0, 0, 6193152, 0, 0, 5406720, 6397952, 5300224, 5234688, 5423104, 0, 0, 0, 0, 5988352, 0, 0, 6135808, 6307840, 0, 5996544, 4800512, 0, 6356992, 0, 0, 0, 5496832, 0, 0, 0, 0, 0, 5611520, 0, 0, 0, 0, 0, 0, 0, 1187, 0, 0, 1190, 1191, 0, 0, 0, 0, 1195, 0, 0, 0, 367, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 782, 0, 0, 0, 0, 0, 0, 0, 786, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 801, 4947968, 5021696, 5529600, 0, 0, 5169152, 0, 0, 0, 4800512, 4808704, 4358144, 4358144, 4890624, 4358144, 4947968, 4358144, 4358144, 4358144, 5046272, 4358144, 4358144, 4358144, 4358144, 5185536, 4358144, 5234688, 5300224, 4358144, 4358144, 5406720, 5529600, 4358144, 4358144, 4358144, 5898240, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6307840, 4358144, 4358144, 6356992, 6381568, 6397952, 4800512, 4808704, 0, 0, 4890624, 0, 4947968, 0, 0, 0, 5046272, 0, 0, 0, 0, 5185536, 0, 5234688, 5300224, 0, 0, 5406720, 5529600, 0, 0, 0, 0, 5898240, 0, 0, 0, 0, 0, 0, 0, 0, 6307840, 0, 0, 6356992, 6381568, 6397952, 4800512, 4808704, 0, 0, 4890624, 0, 0, 6356992, 6381568, 6397952, 4800512, 4808704, 4358144, 4358144, 4890624, 4358144, 4947968, 4358144, 4358144, 4358144, 5046272, 4358144, 4358144, 4358144, 4358144, 5185536, 4358144, 5234688, 5300224, 4358144, 4358144, 5406720, 5529600, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4907008, 0, 5079040, 6094848, 0, 0, 0, 4358144, 4907008, 4358144, 5079040, 4358144, 5226496, 4358144, 5742592, 4358144, 4358144, 4358144, 6094848, 0, 4907008, 0, 5079040, 0, 5226496, 5898240, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6307840, 4358144, 4358144, 6356992, 6381568, 6397952, 5021696, 4358144, 4358144, 5021696, 0, 0, 0, 4980736, 0, 0, 0, 0, 0, 5373952, 5734400, 6045696, 0, 0, 0, 0, 0, 2306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2290, 0, 0, 0, 0, 0, 0, 0, 6152192, 0, 0, 0, 6316032, 0, 0, 0, 0, 5816320, 6291456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2778, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2803, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6258688, 6447104, 0, 0, 6127616, 0, 6348800, 5906432, 0, 5537792, 3627, 0, 0, 0, 0, 5939200, 0, 0, 5677056, 6365184, 4866048, 0, 6070272, 5545984, 5152768, 0, 0, 6144000, 4358144, 4866048, 4882432, 4358144, 0, 0, 0, 0, 0, 4825088, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5177344, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5324800, 5373952, 5537792, 5545984, 5586944, 5734400, 5971968, 0, 6045696, 0, 6070272, 0, 0, 0, 0, 6348800, 0, 4866048, 4882432, 0, 4980736, 0, 0, 0, 0, 0, 0, 0, 0, 521, 831, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 877, 521, 521, 521, 521, 895, 521, 521, 57886, 57886, 58249, 0, 5324800, 5373952, 5537792, 5545984, 5586944, 5734400, 5971968, 0, 6045696, 0, 6070272, 0, 0, 0, 0, 6348800, 4358144, 4866048, 4882432, 4358144, 4980736, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5324800, 5373952, 5537792, 5545984, 5734400, 5971968, 4358144, 6045696, 4358144, 6070272, 4358144, 4358144, 4358144, 6348800, 0, 4866048, 4882432, 0, 4980736, 0, 0, 0, 0, 5537792, 5545984, 5586944, 5734400, 5971968, 4358144, 6045696, 4358144, 6070272, 4358144, 4358144, 4358144, 4358144, 6348800, 4358144, 6144000, 0, 6144000, 0, 4988928, 5005312, 0, 0, 0, 0, 5775360, 0, 0, 0, 3627, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 3441, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3454, 521, 521, 521, 0, 0, 0, 0, 0, 0, 57886, 57886, 60242, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60250, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60293, 57886, 57886, 57886, 60296, 60297, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59917, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 5693440, 0, 6496256, 5144576, 5136384, 0, 5914624, 4358144, 4358144, 5005312, 4358144, 4358144, 4358144, 5120000, 5136384, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6324224, 0, 0, 5005312, 0, 0, 0, 5120000, 5136384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6324224, 0, 0, 5005312, 0, 0, 0, 5120000, 5136384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6324224, 4358144, 0, 0, 900, 900, 900, 4825988, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 5178244, 900, 900, 900, 900, 900, 5219204, 900, 5268356, 900, 900, 5309316, 5317508, 900, 900, 900, 5432196, 900, 5489540, 900, 900, 900, 900, 900, 900, 900, 900, 900, 5800836, 900, 900, 5882756, 900, 4358144, 5005312, 4358144, 4358144, 4358144, 5120000, 5136384, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6324224, 5914624, 5914624, 0, 0, 0, 0, 0, 5513216, 5783552, 0, 3627, 0, 0, 0, 0, 0, 0, 1759, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1772, 0, 1774, 0, 0, 0, 1778, 0, 0, 0, 1782, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 4923392, 0, 5013504, 0, 0, 6053888, 0, 0, 0, 0, 6012928, 4358144, 4358144, 5013504, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6053888, 4358144, 4358144, 0, 0, 5013504, 0, 0, 0, 0, 0, 0, 685, 0, 0, 0, 0, 0, 0, 692, 367, 367, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 705, 0, 0, 0, 0, 0, 0, 0, 0, 6053888, 0, 0, 0, 0, 0, 5013504, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6053888, 0, 0, 0, 4358144, 4358144, 5013504, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5799936, 4358144, 4358144, 5881856, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6103040, 4358144, 4358144, 4358144, 6184960, 4358144, 4358144, 4358144, 6283264, 4358144, 4358144, 6332416, 4358144, 4358144, 4358144, 4358144, 4358144, 6053888, 4358144, 4358144, 4358144, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 5193728, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 0, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5259264, 0, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 901, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5259264, 0, 0, 0, 0, 0, 0, 0, 0, 5414912, 0, 5447680, 0, 5464064, 0, 5480448, 5562368, 0, 0, 0, 5636096, 0, 5685248, 0, 0, 5750784, 0, 0, 0, 0, 0, 5873664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5193728, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5193728, 0, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 5193728, 4358144, 0, 1959, 0, 0, 0, 4825088, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5177344, 0, 0, 0, 0, 0, 0, 715, 0, 717, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 732, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1189, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1250, 1252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 0, 0, 0, 0, 0, 367, 0, 295, 0, 0, 5742592, 0, 0, 0, 6094848, 0, 0, 4907008, 0, 5079040, 0, 5226496, 0, 5742592, 0, 0, 0, 6094848, 0, 4358144, 4907008, 4358144, 5079040, 4358144, 5226496, 4358144, 5742592, 4358144, 4358144, 4358144, 6094848, 4358144, 5062656, 0, 0, 0, 4358144, 5062656, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 5062656, 0, 0, 0, 0, 0, 6225920, 0, 5062656, 0, 0, 0, 0, 0, 6225920, 4358144, 5062656, 4358144, 4358144, 4358144, 0, 900, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5259264, 0, 0, 0, 0, 0, 0, 0, 746, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 762, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 2396, 521, 521, 521, 521, 2400, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3199, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1390, 521, 521, 1394, 521, 521, 521, 521, 521, 1401, 521, 521, 4358144, 4358144, 4358144, 6225920, 0, 0, 0, 4816896, 4358144, 4358144, 4358144, 4358144, 6086656, 4816896, 0, 0, 0, 0, 6086656, 4816896, 0, 0, 0, 0, 6086656, 4816896, 4358144, 4358144, 4358144, 4358144, 6086656, 5087232, 0, 5931008, 4358144, 5332992, 5980160, 4358144, 0, 5332992, 5980160, 0, 0, 5332992, 5980160, 0, 4358144, 5332992, 5980160, 4358144, 5439488, 5128192, 4358144, 5128192, 0, 5128192, 0, 5128192, 4358144, 4358144, 0, 0, 4358144, 4358144, 0, 0, 4358144, 6004736, 6004736, 6004736, 6004736, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1289, 0, 0, 0, 0, 0, 0, 0, 0, 1294, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2816, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221645, 221645, 221645, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 221645, 461, 221645, 221645, 221645, 461, 221645, 221645, 221645, 221645, 221645, 221645, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 327, 328, 329, 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221645, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3390, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1769, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1780, 0, 0, 0, 0, 0, 0, 0, 4268032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 755, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3414, 0, 0, 0, 0, 3418, 0, 0, 0, 0, 3423, 0, 0, 0, 0, 0, 0, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 237568, 301, 0, 305, 237568, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 788, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 305, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 305, 0, 0, 0, 0, 0, 0, 305, 237982, 147456, 0, 0, 0, 305, 0, 0, 0, 0, 0, 2334, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2349, 0, 0, 0, 0, 0, 0, 0, 3406, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3420, 3421, 0, 0, 0, 0, 3426, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 516096, 0, 0, 0, 0, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 305, 0, 305, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 1870, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2453, 521, 521, 521, 2456, 521, 521, 521, 521, 521, 2461, 521, 305, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 65536, 302, 0, 4268032, 98304, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3626, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4210978, 24578, 3, 0, 0, 296, 0, 0, 0, 0, 296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 245760, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 399, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 399, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 245760, 0, 0, 0, 0, 245760, 0, 245760, 0, 245760, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 326, 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 326, 0, 0, 0, 0, 0, 0, 0, 0, 4210978, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 212992, 0, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 212992, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1270, 0, 0, 2059, 0, 0, 0, 4825088, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5177344, 0, 0, 0, 0, 0, 0, 0, 1730, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 311, 310, 0, 0, 0, 310, 310, 311, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 262144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 350, 0, 0, 0, 0, 0, 0, 0, 0, 351, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 657, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 673, 674, 0, 0, 0, 0, 0, 0, 262144, 262144, 262144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 301, 0, 0, 0, 262144, 0, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 262731, 0, 262731, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 3439, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3670, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60591, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59853, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60298, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 262731, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 245760, 245760, 245760, 245760, 245760, 245760, 245760, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 278528, 278528, 0, 0, 131072, 278528, 0, 0, 0, 278528, 0, 0, 0, 0, 278528, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 333, 384, 0, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 278528, 0, 278528, 0, 0, 0, 0, 0, 521, 521, 521, 521, 3438, 521, 521, 521, 521, 3442, 521, 521, 521, 521, 521, 521, 521, 3448, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1901, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1921, 521, 521, 278528, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 262144, 0, 0, 0, 0, 0, 0, 262144, 262144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 262144, 262144, 0, 262144, 0, 0, 0, 139264, 147456, 262144, 0, 0, 0, 0, 0, 0, 0, 0, 415, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 302, 0, 0, 0, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 631, 0, 4268032, 305, 634, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 532480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 754, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1506, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2810, 2811, 0, 0, 0, 0, 0, 0, 0, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 286720, 302, 0, 306, 286720, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 722, 0, 0, 0, 0, 0, 0, 0, 0, 0, 733, 0, 0, 0, 0, 733, 0, 739, 0, 0, 0, 0, 0, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 306, 0, 0, 0, 0, 0, 0, 306, 139264, 287138, 0, 0, 0, 306, 0, 0, 0, 0, 0, 2386, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2402, 521, 2404, 521, 521, 521, 521, 521, 521, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59830, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60836, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60274, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 306, 0, 306, 0, 0, 0, 0, 0, 521, 521, 521, 3437, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3449, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3464, 521, 3466, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 61250, 57909, 57909, 61252, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 59994, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 306, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 66168, 0, 4268032, 305, 98939, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540672, 0, 0, 0, 0, 0, 0, 0, 540672, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 0, 4268032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2352, 0, 0, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 303, 303, 303, 0, 0, 303, 303, 295215, 303, 303, 303, 303, 303, 303, 303, 303, 303, 295215, 373, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 368, 303, 0, 295215, 303, 303, 303, 303, 295285, 295215, 295215, 295215, 295215, 295215, 295215, 303, 303, 303, 303, 303, 303, 295285, 295215, 295215, 295215, 303, 303, 303, 295285, 139264, 147456, 295215, 295215, 303, 303, 295215, 303, 303, 131072, 303, 303, 303, 303, 295215, 303, 303, 303, 303, 295215, 303, 295215, 295215, 295215, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 295215, 295215, 295215, 295215, 295215, 295215, 303, 303, 303, 295215, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 303, 295215, 303, 295215, 295215, 295215, 295215, 295215, 295215, 295215, 303, 0, 303, 0, 303, 303, 303, 295215, 303, 303, 303, 295215, 295215, 303, 295215, 303, 295215, 295215, 295215, 295215, 295215, 295215, 295215, 295215, 295285, 295285, 295285, 295285, 295285, 295285, 295285, 295285, 295285, 295285, 295285, 295285, 295285, 295285, 295285, 295285, 295285, 295285, 295285, 295215, 295215, 295215, 295215, 295215, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4358144, 4359045, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 352256, 0, 352256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2373, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319488, 0, 0, 0, 0, 0, 0, 319488, 319488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1743, 0, 0, 0, 0, 0, 0, 0, 1751, 1752, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319488, 0, 0, 0, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 319488, 0, 0, 0, 0, 319488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319488, 0, 0, 0, 0, 319488, 0, 319488, 319488, 319488, 0, 24578, 3, 0, 0, 4366336, 253952, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5627904, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4284416, 0, 0, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 327680, 0, 0, 0, 0, 0, 0, 0, 0, 521, 2389, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3219, 521, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60571, 57886, 57886, 57886, 57886, 57886, 57886, 60579, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 327680, 327680, 327680, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 327680, 327680, 327680, 327680, 335872, 327680, 327680, 327680, 335872, 327680, 327680, 327680, 327680, 327680, 327680, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49716, 0, 0, 0, 0, 0, 327680, 49716, 327680, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5627904, 0, 0, 0, 0, 0, 0, 196608, 0, 0, 0, 106496, 0, 0, 4284416, 0, 0, 0, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49152, 977, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6463488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4931584, 4939776, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 344064, 344064, 344064, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 344064, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 727, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 344064, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 356, 357, 358, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 295, 0, 0, 0, 0, 0, 4276224, 1245, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 352256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 352256, 0, 0, 0, 0, 0, 0, 131072, 0, 352256, 352256, 0, 0, 352256, 0, 0, 352256, 0, 352256, 0, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 352256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1197, 0, 367, 367, 0, 1200, 0, 0, 0, 0, 0, 0, 0, 0, 352256, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 706, 0, 0, 1, 291, 3, 0, 0, 0, 297, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3398, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360448, 360448, 360448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 360448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1226, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360448, 1, 0, 3, 155941, 155941, 295, 0, 629, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 367, 0, 0, 0, 0, 698, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1212, 0, 0, 0, 0, 1217, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1806, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4276224, 1245, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1259, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1188, 0, 58796, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59402, 521, 58754, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58826, 57886, 57886, 50657, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59502, 57886, 0, 2281, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 739, 0, 0, 0, 2357, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3428, 0, 57909, 59926, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58906, 57909, 57909, 59952, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57886, 57936, 60009, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 60035, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60937, 521, 3212, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59387, 59388, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60604, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60320, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60702, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 3612, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3381, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 369, 0, 0, 0, 57886, 57886, 60830, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60853, 57886, 57886, 57936, 57936, 57936, 57936, 60914, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60057, 57936, 57936, 57936, 57936, 61027, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 61045, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60634, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59493, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57886, 61048, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61056, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60378, 57936, 57936, 57936, 57886, 57886, 57886, 57886, 61156, 57886, 57886, 57886, 57886, 61157, 61158, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59997, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57909, 61175, 57909, 57909, 57909, 57909, 61176, 61177, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61194, 57936, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61078, 61079, 57936, 57936, 57936, 57936, 61083, 61084, 57936, 57936, 57936, 57936, 57936, 61088, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61195, 61196, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3627, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 3177, 521, 521, 521, 521, 521, 521, 3184, 521, 3186, 521, 521, 521, 57936, 57936, 57936, 57936, 57936, 61270, 57936, 57936, 57936, 57936, 57936, 57936, 61276, 57936, 57936, 57936, 61280, 57936, 521, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 3627, 0, 0, 0, 0, 0, 0, 1791, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 672, 0, 0, 0, 0, 0, 0, 0, 3947, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 61306, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58312, 57886, 57886, 57886, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61322, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61338, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 3759, 521, 57886, 61105, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57886, 61439, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 61452, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 61465, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60413, 57936, 57936, 57936, 57936, 57936, 57936, 60421, 57936, 57936, 57936, 57936, 57936, 60426, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 0, 0, 4077, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 0, 0, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 0, 521, 521, 57886, 57886, 57909, 57909, 57936, 57936, 521, 57886, 57909, 57936, 521, 57886, 57909, 57936, 521, 57886, 57909, 57936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1829, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 376832, 376832, 376832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1254, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1268, 1269, 0, 0, 0, 0, 0, 419, 419, 419, 419, 590, 590, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 419, 0, 419, 0, 0, 0, 0, 0, 521, 1866, 521, 521, 521, 521, 521, 521, 1872, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 0, 0, 57886, 57886, 57886, 57886, 60568, 57886, 57886, 57886, 57886, 57886, 57886, 60575, 57886, 60577, 57886, 57886, 419, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 367, 0, 696, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2817, 0, 0, 0, 4268773, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2380, 0, 0, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 721, 0, 0, 0, 0, 0, 0, 0, 0, 731, 0, 637, 731, 0, 735, 736, 637, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 393678, 393678, 393678, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 4025, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 393678, 0, 393678, 393678, 393678, 0, 393678, 393678, 393678, 393678, 393678, 393678, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1771, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 425984, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 3176, 521, 521, 521, 521, 521, 3181, 521, 521, 521, 521, 521, 521, 521, 0, 0, 0, 4268032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 475136, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 374, 0, 0, 375, 0, 0, 0, 0, 0, 327, 375, 330, 374, 0, 0, 0, 0, 0, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 57887, 521, 57887, 521, 521, 57887, 521, 521, 57910, 57887, 521, 521, 57887, 57887, 57887, 57910, 0, 0, 0, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 0, 420, 0, 0, 0, 0, 0, 521, 3435, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1916, 521, 521, 521, 521, 521, 521, 420, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 304, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 723, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1287, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 741, 420, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2791, 0, 0, 1239, 0, 0, 0, 741, 1246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 1322, 521, 521, 521, 521, 521, 521, 521, 2468, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60276, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 521, 521, 521, 2468, 2895, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60305, 57886, 57886, 0, 0, 0, 2963, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 417792, 308, 309, 0, 0, 0, 0, 0, 0, 1815, 0, 0, 0, 0, 0, 0, 0, 0, 1821, 0, 1823, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540672, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3127, 0, 0, 0, 0, 3132, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 309, 0, 417792, 417792, 0, 0, 417792, 417792, 417792, 417792, 417792, 417792, 417792, 417792, 417792, 417792, 417792, 417792, 417792, 418101, 417792, 417792, 418100, 418101, 417792, 417792, 418100, 417792, 418100, 417792, 0, 0, 0, 0, 0, 0, 0, 0, 417792, 0, 0, 0, 417792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 309, 309, 309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1802, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 417792, 1, 24578, 3, 0, 0, 4366964, 0, 0, 0, 0, 0, 301, 302, 311296, 4268032, 305, 306, 0, 434176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1846, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1859, 0, 0, 1860, 0, 0, 900, 900, 5415812, 900, 5448580, 900, 5464964, 900, 5481348, 5563268, 900, 900, 900, 5636996, 900, 5686148, 900, 900, 5751684, 900, 900, 900, 900, 900, 5874564, 900, 900, 900, 900, 900, 900, 900, 900, 900, 6464388, 0, 0, 0, 0, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 4932560, 4940752, 976, 976, 976, 976, 976, 4359044, 4858756, 4875140, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 5260164, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 5415812, 4359044, 5448580, 4359044, 5464964, 4359044, 5481348, 5563268, 4359044, 4359044, 4359044, 5636996, 4359044, 5686148, 4359044, 4359044, 5751684, 4359044, 4359044, 4359044, 4359044, 4359044, 5874564, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 6275972, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 5342084, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 5628804, 5653380, 4359044, 5702532, 4359044, 4359044, 5809028, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4907008, 0, 5079040, 6094848, 0, 0, 0, 4358144, 4907008, 4358144, 5079040, 4358144, 5226496, 4358144, 5742592, 4358144, 4358144, 4358144, 6094848, 900, 4907908, 900, 5079940, 900, 5227396, 900, 5243780, 900, 900, 900, 900, 900, 900, 900, 5342084, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 5628804, 5653380, 900, 5702532, 900, 900, 900, 900, 900, 900, 5211012, 900, 900, 900, 900, 5292932, 900, 900, 900, 900, 5366660, 900, 900, 900, 5456772, 900, 900, 900, 900, 900, 5555076, 5571460, 5579652, 5620612, 5669764, 900, 0, 0, 976, 976, 976, 4826064, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 5178320, 976, 976, 976, 976, 976, 5112784, 976, 976, 976, 976, 976, 5284816, 976, 976, 976, 976, 5473232, 5522384, 976, 976, 976, 976, 5596112, 5710800, 5718992, 976, 5825488, 5866448, 976, 976, 5923792, 976, 5243856, 976, 976, 976, 976, 976, 976, 976, 5342160, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 5628880, 5653456, 976, 5702608, 976, 976, 976, 976, 976, 976, 976, 5260240, 976, 976, 976, 976, 976, 976, 976, 976, 5415888, 976, 5448656, 976, 5465040, 976, 5481424, 5563344, 976, 976, 976, 5637072, 976, 5686224, 976, 976, 5751760, 976, 4358144, 4358144, 4358144, 4358144, 4358144, 6463488, 0, 0, 0, 0, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 4932484, 4940676, 900, 900, 900, 900, 900, 900, 5055364, 900, 900, 5112708, 900, 900, 900, 900, 900, 5284740, 900, 900, 900, 900, 5473156, 5522308, 900, 900, 900, 900, 5596036, 5710724, 5718916, 900, 5825412, 5866372, 900, 900, 5923716, 900, 900, 6022020, 900, 900, 900, 5792644, 5817220, 900, 5858180, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 6120324, 900, 6169476, 900, 900, 900, 900, 900, 6243204, 900, 6292356, 900, 6316932, 976, 5055440, 976, 976, 976, 976, 976, 976, 976, 976, 5211088, 976, 976, 976, 976, 5293008, 976, 976, 976, 976, 5366736, 976, 976, 976, 5456848, 976, 976, 976, 976, 976, 5555152, 5571536, 5579728, 5620688, 5669840, 976, 976, 976, 5792720, 5817296, 976, 5858256, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 6120400, 976, 6169552, 976, 976, 976, 976, 976, 6243280, 976, 6292432, 976, 6317008, 976, 976, 976, 976, 976, 976, 976, 976, 976, 6464464, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4932484, 4940676, 4359044, 4359044, 4359044, 4359044, 4359044, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 900, 900, 900, 900, 900, 900, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 4923392, 4359044, 5055364, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 5211012, 4359044, 4359044, 4359044, 4359044, 5292932, 4359044, 4359044, 4359044, 4359044, 5366660, 4359044, 4359044, 4359044, 5456772, 4359044, 4359044, 4359044, 4359044, 4359044, 5555076, 5571460, 5579652, 5620612, 5669764, 4359044, 4359044, 4359044, 5792644, 5817220, 4359044, 5858180, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 6120324, 4359044, 6169476, 4359044, 4359044, 4359044, 4359044, 4359044, 6243204, 4359044, 6292356, 4359044, 6316932, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 6464388, 4358144, 4358144, 4358144, 4358144, 4358144, 900, 900, 900, 900, 900, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4931584, 0, 0, 0, 0, 0, 0, 0, 4358144, 6430720, 6438912, 0, 0, 0, 0, 0, 0, 4785028, 900, 900, 900, 4850564, 900, 900, 900, 900, 900, 4916100, 900, 4957060, 4973444, 900, 900, 900, 900, 900, 900, 5071748, 900, 900, 5194628, 900, 900, 900, 900, 900, 900, 900, 900, 976, 976, 976, 976, 976, 5194704, 976, 976, 976, 976, 976, 976, 976, 976, 4359044, 4359044, 4359044, 4359044, 4359044, 5194628, 4359044, 0, 0, 4785104, 976, 976, 976, 4850640, 976, 976, 976, 976, 976, 4916176, 976, 4957136, 4973520, 976, 976, 976, 976, 976, 976, 5071824, 976, 976, 976, 976, 976, 976, 976, 5219280, 976, 976, 6357968, 6382544, 6398928, 4801412, 4809604, 4359044, 4359044, 4891524, 4359044, 4948868, 4359044, 4359044, 4359044, 5047172, 4359044, 4359044, 4359044, 4359044, 5186436, 4359044, 5235588, 5301124, 4359044, 4359044, 5407620, 5530500, 4359044, 4359044, 4359044, 4359044, 4359044, 4923392, 4358144, 4358144, 4358144, 4358144, 4358144, 900, 4924292, 900, 900, 900, 900, 4366336, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1264, 0, 0, 0, 0, 0, 0, 0, 5268432, 976, 976, 5309392, 5317584, 976, 976, 976, 5432272, 976, 5489616, 976, 976, 976, 976, 976, 976, 976, 976, 976, 5800912, 976, 976, 5882832, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 976, 6104016, 976, 976, 976, 6185936, 976, 976, 976, 6284240, 976, 976, 6333392, 976, 976, 976, 6390736, 976, 976, 6431696, 6439888, 4785028, 4359044, 4359044, 4359044, 4850564, 4359044, 4359044, 4359044, 4359044, 4359044, 4916100, 4359044, 4957060, 4973444, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 5071748, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 5219204, 4359044, 5268356, 4359044, 4359044, 5309316, 5317508, 4359044, 4359044, 4359044, 5432196, 4359044, 5489540, 4359044, 4359044, 4359044, 4359044, 4359044, 6054788, 4359044, 4359044, 4359044, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 5193728, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 900, 900, 900, 5096324, 5104516, 900, 900, 5202820, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 5890948, 900, 900, 900, 6030212, 900, 900, 900, 900, 6161284, 900, 900, 900, 900, 6407044, 976, 976, 976, 976, 976, 976, 976, 976, 4998096, 976, 976, 5039056, 976, 976, 976, 5096400, 5104592, 976, 976, 5202896, 976, 976, 976, 976, 976, 976, 976, 5891024, 976, 976, 976, 6030288, 976, 976, 976, 976, 6161360, 976, 976, 976, 976, 976, 976, 976, 6407120, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4998020, 4359044, 4358144, 6078464, 6111232, 4358144, 6176768, 6209536, 6234112, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 0, 900, 900, 4842372, 900, 900, 900, 4899716, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 975, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 6300624, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 5809028, 6038404, 900, 900, 6079364, 6112132, 900, 6177668, 6210436, 900, 6235012, 900, 900, 900, 900, 900, 900, 900, 0, 0, 976, 976, 4842448, 976, 976, 976, 4899792, 976, 976, 976, 976, 976, 976, 5874640, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 6276048, 976, 976, 976, 976, 976, 976, 976, 976, 976, 0, 900, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 5112708, 4359044, 4359044, 4359044, 4359044, 4359044, 5284740, 4359044, 4359044, 4359044, 4359044, 5473156, 5522308, 4359044, 4359044, 4359044, 4359044, 5596036, 5710724, 5718916, 4359044, 5825412, 5866372, 4359044, 4359044, 5923716, 976, 6022096, 976, 6038480, 976, 976, 6079440, 6112208, 976, 6177744, 6210512, 976, 6235088, 976, 976, 976, 976, 976, 976, 976, 4359044, 4359044, 4842372, 4359044, 4359044, 4359044, 4899716, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 5800836, 4359044, 4359044, 5882756, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 6103940, 4359044, 4359044, 4359044, 6185860, 4359044, 4359044, 4359044, 6284164, 4359044, 4359044, 6333316, 4359044, 4359044, 6022020, 4359044, 6038404, 4359044, 4359044, 6079364, 6112132, 4359044, 6177668, 6210436, 4359044, 6235012, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4358144, 4358144, 4358144, 900, 900, 900, 0, 0, 0, 0, 0, 0, 0, 1760, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 0, 419, 0, 4358144, 4358144, 4358144, 5890048, 4358144, 4358144, 4358144, 6029312, 4358144, 4358144, 4358144, 4358144, 6160384, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6406144, 900, 900, 900, 900, 900, 900, 900, 900, 4998020, 900, 900, 5038980, 4359044, 5038980, 4359044, 4359044, 4359044, 5096324, 5104516, 4359044, 4359044, 5202820, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 5890948, 4359044, 4359044, 4359044, 6030212, 4359044, 4359044, 4359044, 4359044, 6161284, 4359044, 4359044, 4359044, 6226820, 0, 0, 0, 4816896, 4358144, 4358144, 4358144, 4358144, 6086656, 4817796, 900, 900, 900, 900, 6087556, 4817872, 976, 976, 976, 976, 6087632, 4817796, 4359044, 4359044, 4359044, 4359044, 6087556, 5087232, 4358144, 4358144, 4358144, 5898240, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6307840, 4358144, 4358144, 6356992, 6381568, 6397952, 4801412, 4809604, 900, 900, 4891524, 900, 4948868, 900, 900, 900, 5047172, 900, 900, 900, 900, 900, 6054788, 900, 900, 900, 976, 976, 5014480, 976, 976, 976, 976, 976, 976, 976, 976, 976, 6054864, 976, 976, 976, 4359044, 4359044, 5014404, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 6407044, 4358144, 4358144, 4358144, 900, 900, 900, 4890624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5898240, 5963776, 0, 0, 6193152, 0, 0, 5406720, 6397952, 5186436, 900, 5235588, 5301124, 900, 900, 5407620, 5530500, 900, 900, 900, 900, 5899140, 900, 900, 900, 900, 900, 900, 900, 900, 6308740, 900, 900, 6357892, 6382468, 6398852, 4801488, 4809680, 976, 976, 4891600, 976, 4948944, 976, 976, 976, 5047248, 976, 976, 976, 976, 5186512, 976, 5235664, 5301200, 976, 976, 5407696, 5530576, 976, 976, 976, 976, 5899216, 976, 976, 976, 976, 976, 976, 976, 976, 6308816, 5899140, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 6308740, 4359044, 4359044, 6357892, 6382468, 6398852, 5021696, 4358144, 4358144, 5022596, 900, 900, 0, 4980736, 0, 0, 0, 0, 0, 5373952, 5734400, 6045696, 0, 0, 0, 0, 0, 2771, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2785, 0, 2786, 0, 0, 0, 0, 0, 0, 0, 0, 1843, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1263, 0, 0, 0, 0, 0, 0, 0, 0, 4980736, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5324800, 5373952, 5537792, 5545984, 5734400, 5971968, 4358144, 6045696, 4358144, 6070272, 4358144, 4358144, 4358144, 6348800, 900, 4866948, 4883332, 900, 4981636, 900, 900, 900, 900, 5325700, 5374852, 5538692, 5546884, 5587844, 5735300, 5972868, 900, 6046596, 900, 6071172, 900, 900, 900, 900, 6349700, 976, 4867024, 4883408, 976, 4981712, 976, 976, 976, 976, 976, 976, 976, 976, 5325776, 5374928, 5538768, 5546960, 5587920, 5735376, 5972944, 976, 6046672, 976, 6071248, 976, 976, 976, 976, 6349776, 4359044, 4866948, 4883332, 4359044, 4981636, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 5325700, 5374852, 5538692, 5546884, 5587844, 5735300, 5972868, 4359044, 6046596, 4359044, 6071172, 4359044, 4359044, 4359044, 4359044, 6349700, 4358144, 6144000, 900, 6144900, 0, 4988928, 5005312, 0, 0, 0, 0, 5775360, 0, 0, 0, 3627, 0, 0, 0, 0, 0, 655, 0, 0, 521, 521, 521, 521, 521, 845, 521, 521, 861, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59499, 57909, 57909, 57909, 57886, 5693440, 0, 6496256, 5144576, 5136384, 0, 5914624, 4358144, 4358144, 5005312, 4358144, 4358144, 4358144, 5120000, 5136384, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6324224, 900, 900, 5006212, 900, 900, 900, 5120900, 5137284, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 6325124, 976, 976, 5006288, 976, 976, 976, 5120976, 5137360, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 6325200, 4359044, 4359044, 4359044, 6390660, 4359044, 4359044, 6431620, 6439812, 4358144, 4358144, 4358144, 6266880, 6488064, 900, 900, 900, 6267780, 6488964, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1767, 0, 0, 0, 0, 0, 1773, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4359044, 5006212, 4359044, 4359044, 4359044, 5120900, 5137284, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 6325124, 5914624, 5915524, 0, 0, 0, 0, 0, 5513216, 5783552, 0, 3627, 0, 0, 0, 0, 0, 0, 2285, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1265, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 6300548, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 0, 5013504, 0, 0, 6053888, 0, 0, 0, 0, 6012928, 4358144, 4358144, 5013504, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6053888, 4358144, 4358144, 900, 900, 5014404, 900, 900, 900, 900, 6275972, 900, 900, 900, 900, 900, 900, 900, 900, 900, 0, 0, 977, 976, 976, 976, 976, 976, 4858832, 4875216, 976, 976, 976, 976, 976, 976, 976, 976, 976, 976, 0, 0, 0, 0, 900, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 6300548, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4358144, 4358144, 900, 5743492, 900, 900, 900, 6095748, 900, 976, 4907984, 976, 5080016, 976, 5227472, 976, 5743568, 976, 976, 976, 6095824, 976, 4359044, 4907908, 4359044, 5079940, 4359044, 5227396, 4359044, 5743492, 4359044, 4359044, 4359044, 6095748, 4359044, 5062656, 0, 0, 0, 4358144, 5062656, 4358144, 4358144, 4358144, 4358144, 4358144, 900, 5063556, 900, 900, 900, 900, 900, 6226820, 976, 5063632, 976, 976, 976, 976, 976, 6226896, 4359044, 5063556, 4359044, 4359044, 4359044, 4825988, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 4359044, 5178244, 4359044, 4359044, 4359044, 4359044, 4359044, 5243780, 4359044, 0, 5931008, 4358144, 5332992, 5980160, 4358144, 900, 5333892, 5981060, 900, 976, 5333968, 5981136, 976, 4359044, 5333892, 5981060, 4359044, 5439488, 5128192, 4358144, 5129092, 900, 5129168, 976, 5129092, 4359044, 4358144, 900, 976, 4359044, 4358144, 900, 976, 4359044, 6004736, 6005636, 6005712, 6005636, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2345, 0, 0, 0, 0, 0, 2351, 0, 0, 0, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 450560, 0, 0, 0, 0, 0, 0, 450560, 0, 0, 450560, 0, 450560, 450560, 450560, 450560, 450560, 450560, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 450560, 0, 0, 0, 450560, 0, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 450560, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1824, 0, 0, 0, 0, 0, 0, 1729, 0, 0, 0, 0, 0, 0, 450560, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1848, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2359296, 0, 2359296, 0, 0, 0, 2359296, 0, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 4358144, 6291456, 4358144, 6316032, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6463488, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 0, 0, 0, 0, 0, 302, 0, 0, 306, 0, 0, 0, 0, 0, 0, 2335, 0, 0, 0, 0, 0, 2339, 0, 0, 0, 0, 0, 0, 0, 2343, 2344, 0, 0, 0, 0, 0, 2350, 0, 0, 0, 0, 0, 0, 1302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 2836, 521, 521, 521, 521, 2840, 521, 521, 4358144, 6430720, 6438912, 901, 0, 0, 0, 901, 0, 4784128, 0, 0, 0, 4849664, 0, 0, 0, 0, 0, 4915200, 0, 4956160, 4972544, 0, 0, 0, 0, 0, 0, 5070848, 0, 0, 0, 0, 0, 744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 327, 0, 0, 374, 374, 404, 977, 0, 4784128, 0, 0, 0, 4849664, 0, 0, 0, 0, 0, 4915200, 0, 4956160, 4972544, 0, 0, 0, 0, 0, 0, 5070848, 0, 0, 0, 0, 0, 0, 0, 5218304, 0, 5267456, 0, 0, 5308416, 5316608, 0, 0, 0, 5431296, 0, 5488640, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5799936, 0, 0, 5881856, 0, 0, 0, 0, 0, 0, 0, 0, 4358144, 6078464, 6111232, 4358144, 6176768, 6209536, 6234112, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 901, 0, 0, 0, 4841472, 0, 0, 0, 4898816, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3653, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3218, 521, 521, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60573, 57886, 60576, 57886, 57886, 57886, 6037504, 0, 0, 6078464, 6111232, 0, 6176768, 6209536, 0, 6234112, 0, 0, 0, 0, 0, 0, 0, 977, 0, 0, 0, 4841472, 0, 0, 0, 4898816, 0, 0, 0, 0, 0, 0, 0, 0, 6103040, 0, 0, 0, 6184960, 0, 0, 0, 6283264, 0, 0, 6332416, 0, 0, 0, 6389760, 0, 0, 6430720, 6438912, 0, 0, 0, 0, 0, 0, 0, 0, 459186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 459215, 459215, 459215, 459215, 459215, 459215, 459215, 459215, 459215, 459215, 459215, 459215, 459215, 459215, 459215, 459215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2291, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459340, 459215, 459372, 459215, 459215, 459372, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2777, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5480448, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5840896, 5849088, 0, 1, 24578, 3, 0, 0, 0, 0, 507904, 0, 0, 0, 507904, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 507904, 0, 0, 0, 0, 0, 2796, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2804, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3385, 3386, 0, 0, 0, 0, 3391, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 662, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2779, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2789, 0, 0, 0, 2793, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 507904, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2781, 0, 0, 2784, 0, 0, 0, 0, 2788, 0, 0, 0, 0, 0, 507904, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 442368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 658, 0, 0, 661, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1225, 0, 0, 0, 0, 0, 0, 0, 1233, 0, 0, 0, 0, 0, 0, 1, 24578, 3, 0, 0, 0, 0, 0, 516096, 0, 0, 0, 516096, 0, 0, 0, 0, 0, 0, 516096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2287, 0, 2288, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2297, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 516560, 516560, 516560, 516560, 516560, 516560, 516560, 516560, 516560, 516560, 516560, 516560, 516560, 516560, 516560, 516560, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 516560, 1, 24578, 0, 0, 0, 4366336, 0, 0, 548864, 0, 0, 301, 302, 0, 4268032, 305, 306, 409600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1806, 0, 2340, 0, 0, 0, 0, 0, 0, 0, 0, 2347, 0, 0, 0, 0, 0, 0, 2354, 4358144, 5005312, 4358144, 4358144, 4358144, 5120000, 5136384, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6324224, 5914624, 5914624, 0, 0, 0, 0, 0, 5513216, 5783552, 0, 40960, 0, 0, 0, 0, 0, 0, 2747, 0, 2749, 0, 0, 2752, 0, 0, 0, 0, 0, 0, 2757, 0, 0, 0, 2760, 2761, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 855, 521, 521, 521, 521, 521, 874, 521, 521, 521, 521, 892, 521, 521, 521, 57886, 57886, 57886, 1, 24578, 4227364, 0, 0, 0, 0, 0, 0, 298, 0, 0, 0, 298, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1227, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540672, 0, 0, 540672, 0, 0, 0, 540672, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1857, 0, 0, 0, 0, 0, 0, 0, 0, 1, 24578, 4227364, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3148, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3393, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4268032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 499712, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3389, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2370, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 24578, 3, 155941, 295, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 636, 0, 0, 0, 521, 521, 521, 58754, 901, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 0, 0, 0, 0, 742, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 437, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57887, 57887, 57887, 57887, 57887, 57887, 57887, 57910, 57910, 57887, 57887, 57937, 57887, 57887, 57887, 57887, 57887, 57887, 57887, 57937, 57937, 57887, 57887, 57887, 57887, 57937, 57937, 57887, 521, 57887, 57887, 57887, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4399797, 4399797, 4399797, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 410, 358, 0, 0, 399, 0, 0, 0, 0, 0, 139264, 147456, 399, 410, 0, 423, 410, 1, 24578, 3, 155942, 295, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1236, 0, 0, 0, 1, 24578, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 573440, 0, 573440, 573440, 573440, 0, 573440, 573440, 573440, 573440, 573440, 573440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3628, 0, 0, 0, 3631, 0, 0, 0, 0, 0, 0, 0, 0, 3639, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 573440, 573440, 573440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1819, 1820, 0, 1822, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1836, 0, 0, 0, 0, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 573440, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4399798, 311296, 4399798, 0, 0, 0, 311296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4276224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1260, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1847, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1738, 0, 5300224, 5234688, 5423104, 0, 0, 0, 0, 5988352, 0, 0, 6135808, 6307840, 0, 5996544, 4800512, 0, 6356992, 3627, 0, 0, 5496832, 0, 0, 0, 0, 0, 5611520, 0, 0, 0, 0, 0, 0, 0, 1792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1801, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1818, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 326, 326, 376, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 630, 302, 0, 4268032, 633, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2806, 0, 0, 0, 0, 0, 0, 0, 0, 2814, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 581632, 0, 0, 0, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 581632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 340, 581632, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3172, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3183, 521, 521, 3187, 521, 521, 6258688, 6447104, 0, 0, 6127616, 0, 6348800, 5906432, 0, 5537792, 3774, 0, 0, 0, 0, 5939200, 0, 0, 5677056, 6365184, 4866048, 0, 6070272, 5545984, 5152768, 0, 0, 6144000, 4358144, 4866048, 4882432, 4358144, 4358144, 4358144, 0, 901, 900, 900, 900, 900, 900, 4858756, 4875140, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 5260164, 900, 900, 900, 900, 900, 900, 900, 900, 6103940, 900, 900, 900, 6185860, 900, 900, 900, 6284164, 900, 900, 6333316, 900, 900, 900, 6390660, 900, 900, 6431620, 6439812, 0, 0, 0, 0, 5537792, 5545984, 5586944, 5734400, 5971968, 4358144, 6045696, 4358144, 6070272, 4358144, 4358144, 4358144, 4358144, 6348800, 4358144, 6144000, 0, 6144000, 0, 4988928, 5005312, 0, 0, 0, 0, 5775360, 0, 0, 0, 3869, 0, 0, 0, 0, 0, 787, 0, 0, 521, 521, 521, 521, 521, 847, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60869, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59939, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59946, 57909, 59948, 57909, 59951, 57909, 57909, 4358144, 5005312, 4358144, 4358144, 4358144, 5120000, 5136384, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6324224, 5914624, 5914624, 0, 0, 0, 0, 0, 5513216, 5783552, 0, 3869, 0, 0, 0, 0, 0, 0, 2822, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2830, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1938, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1387, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 0, 310, 311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3638, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 310, 0, 451, 465, 465, 465, 478, 478, 478, 478, 478, 478, 478, 478, 478, 499, 478, 478, 478, 478, 517, 478, 478, 478, 517, 478, 478, 478, 478, 478, 478, 522, 57888, 522, 57888, 522, 522, 57888, 522, 522, 57911, 57888, 522, 522, 57888, 57888, 57888, 57911, 57888, 57888, 57888, 57888, 57888, 57888, 57888, 57911, 57911, 57888, 57888, 57938, 57888, 57888, 57888, 57888, 57888, 57888, 57888, 57938, 57938, 57888, 57888, 57888, 57888, 57938, 57938, 57888, 522, 57888, 57888, 57888, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 638, 0, 0, 641, 642, 0, 0, 0, 0, 0, 0, 745, 0, 0, 0, 0, 0, 0, 751, 0, 0, 0, 0, 0, 0, 0, 0, 761, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1279, 0, 0, 0, 0, 1284, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1292, 0, 0, 0, 0, 0, 0, 0, 0, 743, 0, 0, 0, 0, 638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 758, 0, 0, 0, 0, 764, 0, 0, 768, 0, 0, 0, 0, 0, 0, 3115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1166, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1175, 0, 1177, 1178, 0, 0, 0, 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, 641, 0, 0, 0, 0, 0, 3114, 0, 0, 0, 0, 0, 3118, 0, 0, 0, 0, 0, 0, 0, 3124, 3125, 3126, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1306, 0, 0, 0, 1310, 0, 0, 0, 0, 1313, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61024, 57886, 57886, 0, 824, 825, 0, 0, 0, 0, 780, 521, 521, 834, 838, 521, 521, 850, 521, 521, 521, 866, 521, 871, 521, 879, 521, 882, 521, 521, 896, 521, 57886, 57886, 57886, 57886, 57886, 57886, 59898, 57886, 57886, 57886, 0, 0, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 59913, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59448, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59461, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58253, 58257, 57886, 57886, 58269, 57886, 57886, 57886, 58285, 57886, 58290, 57886, 58298, 57886, 58301, 57886, 57886, 58315, 57886, 0, 57909, 57909, 57909, 58329, 58333, 57909, 57909, 58345, 57909, 57909, 57909, 58361, 57909, 58366, 57909, 58374, 57909, 58377, 57909, 57909, 58391, 57909, 0, 0, 0, 0, 58290, 57936, 57936, 57936, 58404, 58408, 57936, 57936, 58420, 57936, 57936, 57936, 58436, 57936, 58441, 57936, 58449, 57936, 0, 0, 0, 0, 521, 521, 521, 521, 521, 4172, 521, 57886, 57886, 57886, 57886, 57886, 61522, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 61528, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59544, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59557, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59545, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59014, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58452, 57936, 57936, 58466, 57936, 834, 838, 1128, 882, 521, 521, 0, 58257, 58253, 58478, 58301, 57886, 57886, 155941, 1138, 0, 0, 1141, 0, 0, 1146, 0, 0, 0, 0, 0, 0, 0, 0, 6103040, 0, 0, 0, 6184960, 0, 0, 0, 6283264, 0, 0, 6332416, 0, 0, 0, 6389760, 0, 0, 6430720, 6438912, 977, 0, 0, 0, 0, 0, 1210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1231, 0, 0, 0, 0, 0, 0, 0, 0, 377, 0, 362, 0, 0, 0, 0, 0, 0, 0, 0, 0, 362, 0, 0, 0, 0, 139264, 147456, 0, 0, 0, 0, 0, 57886, 58831, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 50657, 58754, 977, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59964, 57909, 57909, 57909, 57909, 59969, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 1753, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1777, 0, 0, 0, 0, 0, 0, 0, 0, 1188, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 1199, 0, 0, 0, 0, 0, 0, 0, 0, 0, 688, 0, 0, 0, 0, 367, 367, 367, 0, 0, 697, 0, 0, 0, 0, 0, 0, 0, 704, 0, 0, 0, 0, 0, 0, 0, 1813, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2815, 0, 0, 1861, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1874, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1887, 521, 521, 521, 521, 521, 521, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61044, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 521, 521, 521, 521, 521, 1929, 521, 521, 1932, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1945, 521, 521, 521, 521, 521, 521, 1951, 521, 521, 521, 521, 521, 521, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59828, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59380, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 61166, 57909, 57909, 57909, 61169, 57909, 57909, 57909, 57909, 521, 58754, 1960, 57886, 57886, 57886, 57886, 57886, 59311, 57886, 57886, 57886, 57886, 57886, 59317, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59330, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60835, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60845, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60854, 57886, 50657, 2060, 57909, 57909, 57909, 57909, 57909, 59411, 57909, 57909, 57909, 57909, 57909, 59417, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59430, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58890, 57909, 57909, 57909, 58893, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58900, 57909, 57909, 58904, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59472, 57909, 57909, 59475, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59489, 57909, 57909, 57909, 57909, 57909, 57909, 59495, 57909, 57909, 57909, 57909, 57909, 57909, 57886, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3413, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3151, 0, 0, 0, 3155, 0, 3157, 0, 0, 0, 0, 0, 0, 0, 0, 57936, 57936, 57936, 57936, 57936, 59507, 57936, 57936, 57936, 57936, 57936, 59513, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59526, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59579, 57936, 57936, 57936, 57936, 57936, 57936, 59587, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 3105, 0, 0, 0, 0, 0, 0, 57936, 57936, 59568, 57936, 57936, 59571, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59585, 57936, 57936, 57936, 57936, 57936, 57936, 59591, 57936, 57936, 57936, 57936, 57936, 57936, 521, 2256, 521, 521, 521, 57886, 59605, 57886, 57886, 57886, 2265, 0, 2266, 0, 0, 0, 0, 2268, 0, 2269, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2275, 0, 0, 0, 0, 0, 0, 791, 0, 521, 521, 521, 521, 521, 521, 521, 521, 859, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 2265, 0, 2266, 0, 0, 0, 0, 2268, 0, 2269, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 212992, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1737, 1738, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 753, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 417792, 0, 0, 0, 0, 417792, 0, 0, 0, 0, 0, 309, 0, 309, 0, 0, 0, 0, 2331, 0, 2333, 0, 0, 0, 0, 0, 0, 0, 0, 1806, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1826, 0, 1828, 0, 0, 0, 0, 0, 0, 0, 1835, 0, 0, 521, 2464, 521, 521, 521, 521, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59829, 57886, 57886, 59832, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60265, 57886, 57886, 57886, 57886, 60268, 57886, 57886, 60270, 57886, 60271, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60280, 57886, 57886, 60284, 59840, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59860, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61032, 57886, 57886, 57886, 57886, 57886, 57886, 61038, 57886, 61040, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61089, 57936, 57936, 57936, 57909, 57909, 57909, 57909, 59929, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59949, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58886, 57909, 58888, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 60375, 57936, 60376, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60012, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60032, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60070, 57936, 57936, 57936, 2405, 521, 521, 521, 521, 59836, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2399, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2446, 521, 521, 521, 521, 521, 521, 521, 2452, 521, 521, 521, 521, 521, 521, 2457, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2847, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2889, 521, 521, 521, 521, 521, 521, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60315, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60323, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58924, 57909, 57909, 58928, 57909, 57909, 57909, 57909, 57909, 58935, 57909, 57909, 57909, 58942, 57909, 0, 57886, 57936, 57936, 57936, 57936, 60359, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60370, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60380, 57936, 0, 0, 0, 0, 521, 521, 521, 4170, 4171, 521, 521, 57886, 57886, 57886, 61520, 61521, 57886, 57886, 57886, 57909, 57909, 57909, 61526, 61527, 57909, 57909, 57909, 57936, 57936, 57936, 61532, 57936, 57936, 60435, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 301, 305, 0, 0, 0, 0, 3104, 0, 0, 0, 3108, 0, 0, 0, 0, 0, 0, 3142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 262731, 0, 0, 0, 0, 0, 0, 0, 0, 3113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3136, 57909, 60627, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60636, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60644, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61057, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61062, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 60676, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60685, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60693, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 521, 0, 57886, 57886, 57886, 57886, 57886, 57886, 155941, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1192, 1193, 0, 0, 0, 0, 0, 367, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60915, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60933, 57936, 60935, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60703, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 2748, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 352256, 0, 352256, 352256, 0, 0, 0, 0, 521, 3948, 521, 3950, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 61307, 57886, 61309, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58807, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59347, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61165, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61170, 57909, 57909, 57909, 57909, 61323, 57909, 61325, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 61339, 57936, 61341, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 3859, 521, 61204, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3627, 0, 0, 0, 0, 0, 4012, 0, 0, 0, 4015, 0, 0, 521, 521, 521, 521, 4020, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 61377, 57886, 57886, 57886, 57886, 57886, 57909, 60861, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60352, 57909, 57909, 57909, 57909, 57909, 57909, 0, 0, 0, 312, 313, 314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2765, 0, 0, 0, 0, 0, 0, 426, 0, 131072, 0, 0, 0, 426, 0, 0, 0, 0, 0, 426, 452, 0, 0, 0, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 516, 452, 516, 516, 516, 452, 516, 516, 516, 516, 516, 516, 523, 57889, 523, 57889, 523, 523, 57889, 523, 523, 57912, 57889, 523, 523, 57889, 57889, 57889, 57912, 57889, 57889, 57889, 57889, 57889, 57889, 57889, 57912, 57912, 57889, 57889, 57939, 57889, 57889, 57889, 57889, 57889, 57889, 57889, 57939, 57939, 57889, 57889, 57889, 57889, 57939, 57939, 57889, 614, 57889, 57966, 57966, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 385024, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 57909, 57909, 58370, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 0, 0, 0, 57886, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58445, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61199, 57936, 57936, 57936, 57936, 521, 521, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3627, 0, 0, 0, 0, 0, 805, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 641, 0, 0, 0, 0, 0, 820, 780, 0, 0, 0, 0, 0, 0, 754, 0, 0, 754, 0, 0, 0, 0, 0, 754, 754, 0, 0, 815, 0, 0, 0, 0, 0, 0, 0, 0, 0, 754, 0, 0, 0, 0, 0, 0, 2770, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2379, 0, 0, 0, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 60312, 57909, 57909, 57909, 57909, 60316, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60345, 57909, 57909, 57909, 57909, 60349, 57909, 57909, 57909, 60354, 57909, 57909, 57909, 57909, 60381, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60432, 57936, 57936, 57936, 57936, 57936, 60436, 57936, 57936, 57936, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 301, 305, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3387, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2807, 0, 0, 0, 0, 0, 2812, 0, 0, 0, 0, 0, 57886, 61381, 57886, 61383, 57886, 57886, 61385, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61395, 57909, 61397, 57909, 57909, 61399, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57936, 61409, 57936, 61411, 57936, 57936, 61413, 57936, 57936, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2271, 0, 0, 0, 0, 0, 0, 0, 0, 0, 350, 351, 352, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 295, 0, 319, 319, 427, 428, 131072, 435, 428, 436, 427, 435, 436, 0, 315, 436, 448, 453, 466, 466, 466, 479, 479, 479, 479, 479, 479, 479, 479, 479, 479, 501, 501, 501, 514, 514, 515, 515, 501, 515, 515, 515, 501, 515, 515, 515, 515, 515, 515, 524, 57890, 524, 57890, 524, 524, 57890, 524, 524, 57913, 57890, 524, 524, 57890, 57890, 57890, 57913, 57890, 57890, 57890, 57890, 57890, 57890, 57890, 57913, 57913, 57890, 57890, 57940, 57890, 57890, 57890, 57890, 57890, 57890, 57890, 57940, 57940, 57890, 57890, 57890, 57890, 57940, 57940, 57890, 615, 57965, 57965, 57965, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 401408, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1198, 367, 367, 0, 0, 1201, 0, 0, 0, 1204, 0, 1206, 0, 679, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 367, 695, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5242880, 0, 0, 0, 0, 0, 5603328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57909, 57909, 57909, 57909, 57909, 58378, 57909, 57909, 57909, 57909, 0, 0, 0, 0, 57886, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59553, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58453, 57936, 57936, 57936, 57936, 521, 521, 521, 883, 521, 521, 0, 57886, 57886, 57886, 58302, 57886, 57886, 155941, 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3411, 0, 0, 0, 3415, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 57886, 521, 57886, 521, 521, 57886, 521, 521, 57909, 57886, 521, 521, 57886, 57886, 57886, 57909, 521, 521, 521, 58754, 901, 57886, 57886, 58758, 57886, 57886, 58762, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58776, 57886, 58781, 57886, 57886, 58785, 57886, 57886, 58788, 57886, 57886, 57886, 57886, 57886, 57886, 58279, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 57909, 57909, 58322, 57909, 57909, 57909, 57909, 57909, 57909, 58355, 57909, 57909, 57909, 58876, 57909, 57909, 58880, 57909, 57909, 58883, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58902, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 58951, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58965, 57936, 58970, 57936, 57936, 58974, 57936, 57936, 58977, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 57886, 57886, 3861, 0, 0, 0, 3863, 0, 0, 0, 0, 0, 0, 3627, 3870, 0, 1723, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 385, 521, 521, 521, 1927, 1928, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2433, 521, 521, 521, 521, 58754, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59320, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59332, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 61494, 57909, 61495, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 61502, 57936, 61503, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60018, 57936, 60020, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60396, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60401, 57936, 57936, 57936, 57936, 57936, 57886, 57886, 59370, 59371, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 50657, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59420, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59432, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59446, 57909, 57909, 57909, 59450, 57909, 57909, 59455, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59990, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59998, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57909, 59470, 59471, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57886, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 643, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3447, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1341, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3200, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 61016, 57886, 57886, 57886, 61019, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59566, 59567, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3162, 0, 0, 521, 2437, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2450, 521, 521, 521, 521, 521, 2454, 2455, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1374, 521, 1376, 521, 521, 521, 521, 521, 521, 521, 1389, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1404, 57886, 57886, 57886, 57886, 59869, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59882, 57886, 57886, 57886, 57886, 57886, 59886, 59887, 59888, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58800, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58822, 57886, 57886, 57886, 57886, 0, 0, 0, 2744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 114688, 0, 0, 57886, 57886, 57886, 60288, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 2962, 0, 0, 0, 0, 0, 826, 0, 0, 521, 521, 521, 521, 521, 849, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 60863, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60875, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59447, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60672, 3137, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1837, 0, 0, 0, 3166, 0, 0, 3169, 0, 0, 0, 0, 0, 0, 0, 3173, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2451, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3379, 0, 0, 0, 0, 0, 0, 0, 3383, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3422, 0, 0, 0, 0, 0, 0, 3429, 521, 3458, 3459, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60827, 57886, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 640, 0, 0, 0, 0, 0, 0, 0, 695, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 883, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 2267, 0, 1142, 0, 0, 0, 0, 2270, 0, 1147, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1795, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1809, 57909, 60884, 57909, 60886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60000, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60911, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60926, 57936, 60928, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60045, 60046, 57936, 57936, 57936, 57936, 57936, 57936, 60053, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61072, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59595, 57936, 57936, 57936, 1881, 521, 4010, 0, 4011, 0, 0, 0, 0, 0, 0, 0, 521, 4018, 521, 4019, 521, 521, 521, 4023, 521, 521, 521, 521, 521, 521, 521, 57886, 61375, 57886, 61376, 57886, 57886, 57886, 57886, 57886, 57886, 60264, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60269, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60275, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60283, 57886, 61380, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 61389, 57909, 61390, 57909, 57909, 57909, 61394, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 61403, 57936, 61404, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60388, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 3376, 0, 0, 61408, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 1710, 0, 0, 0, 0, 0, 0, 1717, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2338, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 4213, 57886, 57886, 57886, 61559, 57909, 57909, 57909, 61561, 57936, 57936, 57936, 61563, 0, 521, 521, 57886, 57886, 57909, 57909, 57936, 57936, 521, 57886, 57909, 57936, 521, 521, 521, 521, 521, 521, 0, 2471, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59858, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 376, 0, 131072, 0, 0, 0, 376, 0, 0, 438, 444, 0, 376, 454, 467, 467, 467, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 502, 525, 57891, 525, 57891, 525, 525, 57891, 525, 525, 57914, 57891, 525, 525, 57891, 57891, 57891, 57914, 57891, 57891, 57891, 57891, 57891, 57891, 57891, 57914, 57914, 57891, 57891, 57941, 57891, 57891, 57891, 57891, 57891, 57891, 57891, 57941, 57941, 57891, 57891, 57891, 57891, 57941, 57941, 57891, 525, 57891, 57891, 57891, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 229376, 0, 491520, 524288, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 725, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1180, 1181, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 719, 0, 0, 0, 0, 0, 0, 0, 0, 0, 729, 0, 0, 0, 0, 0, 0, 0, 0, 0, 738, 0, 0, 1166, 0, 1298, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1284, 0, 0, 0, 1312, 1180, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 1321, 521, 521, 521, 0, 0, 0, 0, 0, 0, 57886, 60241, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58814, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 521, 521, 521, 521, 521, 1371, 521, 521, 1373, 521, 521, 521, 521, 1378, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1403, 521, 521, 521, 521, 521, 521, 521, 521, 3196, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3203, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1902, 521, 521, 521, 521, 521, 521, 521, 521, 1913, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1935, 521, 521, 521, 1941, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1950, 521, 521, 521, 521, 1956, 521, 521, 521, 521, 58754, 901, 57886, 57886, 58759, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58786, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61247, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61263, 57909, 57909, 57936, 57909, 57909, 57909, 57909, 58881, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58896, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58905, 57909, 57909, 58907, 57909, 57909, 57909, 57909, 58912, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58937, 57909, 57909, 57909, 57909, 0, 58812, 57936, 57936, 58948, 57936, 0, 0, 0, 0, 521, 521, 4169, 521, 521, 521, 4173, 57886, 57886, 61519, 57886, 57886, 57886, 61523, 57886, 57909, 57909, 61525, 57909, 57909, 57909, 61529, 57909, 57936, 57936, 61531, 57936, 0, 0, 0, 0, 4168, 521, 521, 521, 521, 521, 521, 61518, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61524, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61530, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61274, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 57886, 0, 3938, 0, 0, 3941, 0, 0, 0, 3627, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1883, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2876, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 60819, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58999, 57936, 57936, 59001, 57936, 57936, 57936, 57936, 59007, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59519, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59530, 57936, 57936, 57936, 57936, 57936, 59032, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 1138, 1705, 0, 0, 0, 0, 1712, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2410, 521, 521, 521, 2259, 57886, 57886, 57886, 57886, 59608, 2265, 0, 2266, 0, 0, 0, 0, 2268, 0, 2269, 0, 0, 0, 0, 0, 2272, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2408, 521, 521, 521, 521, 521, 521, 521, 521, 2416, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1397, 521, 521, 521, 521, 521, 57886, 59893, 57886, 59895, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59916, 57909, 57909, 57909, 57909, 59920, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59958, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59971, 57909, 57909, 57909, 57909, 57909, 59975, 59976, 59977, 57909, 57909, 57909, 57909, 57909, 57909, 59982, 57909, 59984, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59999, 57936, 57936, 57936, 57936, 60003, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60683, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 3369, 521, 57886, 60716, 57886, 0, 0, 0, 0, 0, 57936, 57936, 57936, 57936, 57936, 60065, 57936, 60067, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 2739, 2266, 0, 2740, 2269, 0, 0, 0, 0, 0, 0, 3622, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 415, 415, 0, 0, 0, 0, 0, 60285, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 2962, 0, 0, 0, 0, 0, 1156, 1157, 1158, 1159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 791, 0, 0, 0, 0, 0, 0, 0, 791, 0, 0, 57909, 57909, 57909, 60310, 57909, 60311, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59460, 57909, 57909, 57909, 57909, 57909, 59467, 57909, 521, 521, 3191, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3204, 521, 521, 521, 521, 521, 521, 521, 3210, 57886, 57886, 57886, 60582, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60596, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60606, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 57909, 57909, 57909, 57909, 60617, 57909, 57909, 57909, 57909, 57909, 57909, 60624, 57909, 57886, 60602, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 2962, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61182, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58975, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58990, 57909, 57909, 57909, 57909, 60651, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60680, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60694, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61273, 57936, 61275, 57936, 57936, 57936, 57936, 57936, 57936, 521, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 3627, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1878, 1879, 521, 521, 521, 521, 1886, 521, 521, 521, 521, 521, 521, 521, 521, 1337, 521, 1342, 521, 521, 1346, 521, 521, 1349, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1380, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1396, 521, 521, 521, 521, 521, 57936, 57936, 57936, 57936, 57936, 60700, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 3768, 0, 0, 0, 0, 57909, 61073, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60030, 57936, 57936, 57936, 57936, 57936, 0, 521, 521, 521, 521, 521, 521, 3953, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 61312, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 2557, 0, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59466, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61328, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 61344, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 61382, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61396, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61080, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61090, 57936, 57936, 57936, 57936, 61410, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 2265, 1706, 2266, 0, 0, 0, 0, 2268, 1713, 2269, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1243, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2353, 0, 0, 330, 0, 0, 0, 0, 0, 0, 375, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 330, 0, 139264, 147456, 0, 0, 0, 0, 0, 0, 0, 1842, 0, 0, 1845, 0, 0, 0, 0, 0, 0, 1851, 1852, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1845, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 329, 0, 0, 0, 0, 455, 468, 468, 468, 481, 481, 481, 481, 492, 494, 481, 481, 492, 481, 503, 503, 503, 503, 518, 503, 503, 503, 518, 503, 503, 503, 503, 503, 503, 526, 57892, 526, 57892, 526, 526, 57892, 526, 526, 57915, 57892, 526, 526, 57892, 57892, 57892, 57915, 57892, 57892, 57892, 57892, 57892, 57892, 57892, 57915, 57915, 57892, 57892, 57942, 57892, 57892, 57892, 57892, 57892, 57892, 57892, 57942, 57942, 57892, 57892, 57892, 57892, 57942, 57942, 57892, 526, 57892, 57892, 57892, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2310144, 0, 0, 0, 0, 0, 0, 0, 2310144, 2310144, 0, 0, 0, 0, 0, 0, 0, 0, 2310144, 0, 0, 0, 0, 0, 651, 652, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 663, 664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 676, 677, 678, 0, 0, 0, 682, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 367, 0, 0, 0, 0, 0, 0, 700, 701, 0, 0, 0, 0, 0, 707, 0, 0, 0, 0, 0, 3141, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 450560, 450560, 0, 0, 0, 0, 0, 711, 0, 713, 0, 0, 0, 0, 0, 0, 720, 0, 0, 0, 724, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2756, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 742, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 752, 0, 0, 0, 0, 0, 0, 759, 0, 0, 0, 765, 766, 0, 0, 0, 0, 0, 0, 0, 2308, 0, 0, 0, 0, 2313, 2314, 0, 0, 2316, 2317, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 270336, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 301, 0, 0, 305, 0, 0, 4857856, 4874240, 0, 0, 4923392, 0, 0, 0, 775, 0, 777, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 789, 0, 794, 0, 797, 0, 0, 0, 0, 0, 0, 777, 0, 789, 0, 803, 0, 0, 0, 0, 797, 809, 0, 0, 0, 0, 0, 809, 809, 812, 0, 0, 0, 777, 0, 0, 0, 0, 0, 821, 0, 0, 0, 0, 0, 0, 806, 0, 0, 806, 0, 0, 0, 0, 0, 806, 806, 0, 0, 0, 0, 786, 0, 0, 0, 0, 0, 0, 822, 782, 0, 0, 0, 0, 0, 775, 0, 0, 0, 821, 521, 521, 835, 521, 841, 521, 521, 856, 521, 521, 867, 521, 872, 521, 521, 881, 884, 889, 521, 897, 521, 57886, 57886, 57886, 57886, 57886, 57886, 60291, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 2962, 0, 0, 58254, 57886, 58260, 57886, 57886, 58275, 57886, 57886, 58286, 57886, 58291, 57886, 57886, 58300, 58303, 58308, 57886, 58316, 57886, 0, 57909, 57909, 57909, 58330, 57909, 58336, 57909, 57909, 58351, 57909, 57909, 58362, 57909, 58367, 57909, 57909, 58376, 58379, 58384, 57909, 58392, 57909, 0, 0, 0, 0, 58291, 57936, 57936, 57936, 58405, 57936, 58411, 57936, 57936, 58426, 57936, 57936, 58437, 57936, 58442, 57936, 57936, 58451, 58454, 58459, 57936, 58467, 57936, 835, 521, 521, 1129, 889, 521, 0, 57886, 58254, 57886, 58479, 58308, 57886, 155941, 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2326528, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 0, 1153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1163, 0, 0, 0, 0, 0, 0, 0, 1170, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1051, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6299648, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 1209, 0, 0, 0, 0, 0, 0, 0, 0, 1218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1235, 0, 0, 1187, 0, 0, 0, 0, 0, 3434, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3451, 521, 521, 521, 521, 521, 521, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59827, 57886, 57886, 57886, 57886, 59831, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58801, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58810, 57886, 57886, 58812, 57886, 57886, 57886, 57886, 58817, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61388, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61402, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 0, 742, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1258, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5857280, 0, 6463488, 4939776, 0, 0, 5455872, 0, 0, 0, 0, 0, 0, 0, 0, 6062080, 6463488, 0, 5398528, 0, 521, 521, 521, 521, 1328, 521, 521, 521, 521, 521, 521, 1343, 521, 521, 521, 1348, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1365, 521, 1407, 521, 58754, 901, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58767, 57886, 57886, 57886, 57886, 57886, 57886, 58782, 57886, 57886, 57886, 58787, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58839, 57886, 57886, 57886, 57886, 57886, 57886, 50657, 58754, 977, 57909, 57909, 57909, 58855, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58869, 57909, 57909, 57909, 58877, 57909, 57909, 57909, 58882, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58899, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 0, 0, 0, 57886, 57936, 57936, 57936, 57936, 57936, 57936, 58419, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59003, 57936, 59005, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59018, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60704, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 0, 57936, 57936, 57936, 57936, 57936, 57936, 58956, 57936, 57936, 57936, 57936, 57936, 57936, 58971, 57936, 57936, 57936, 58976, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 2741, 0, 57936, 58993, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59009, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59025, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61101, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 690, 691, 0, 367, 367, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 703, 0, 0, 0, 0, 0, 57936, 57936, 57936, 59036, 57936, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 1138, 1705, 0, 0, 0, 0, 1712, 0, 0, 0, 0, 1719, 0, 1721, 0, 0, 0, 0, 0, 3621, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3632, 0, 0, 0, 3635, 3636, 0, 0, 0, 0, 0, 0, 393678, 0, 393678, 393678, 393678, 393678, 393678, 393678, 393678, 393678, 393678, 393678, 393678, 393678, 393678, 393678, 393678, 393678, 393678, 393678, 393678, 393678, 393678, 0, 393678, 393678, 0, 1754, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1770, 0, 0, 0, 0, 0, 1776, 0, 0, 1779, 0, 1781, 0, 0, 0, 0, 0, 0, 3642, 0, 3644, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2854, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1943, 1944, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 0, 0, 1787, 1788, 0, 0, 0, 0, 0, 0, 0, 0, 1797, 1798, 0, 0, 0, 0, 0, 0, 1804, 0, 0, 1806, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 888, 521, 521, 521, 521, 57886, 57886, 57886, 1810, 1811, 1812, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1830, 1831, 0, 1832, 1833, 0, 0, 0, 0, 0, 0, 1186, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 810, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3395, 0, 0, 3397, 0, 0, 0, 0, 0, 0, 0, 0, 1863, 1721, 1721, 1865, 521, 1867, 521, 1868, 1869, 521, 1871, 521, 521, 521, 1875, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1888, 521, 521, 521, 521, 1892, 521, 521, 521, 521, 1896, 521, 1898, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1908, 1909, 1911, 521, 521, 521, 521, 521, 521, 521, 1919, 1920, 521, 1922, 521, 521, 521, 521, 521, 521, 521, 521, 3667, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60611, 57886, 57886, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60622, 57909, 60625, 521, 1925, 1926, 521, 521, 521, 521, 521, 521, 521, 1934, 521, 1936, 521, 1939, 521, 521, 521, 521, 521, 1946, 521, 521, 1948, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3197, 3198, 521, 521, 521, 521, 3201, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3206, 521, 521, 521, 3209, 521, 521, 58754, 0, 59307, 57886, 59309, 57886, 59310, 57886, 59312, 57886, 59314, 57886, 57886, 57886, 59318, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59331, 57886, 57886, 57886, 57886, 59335, 57886, 1, 24578, 3, 155941, 156275, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 483328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2341, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57886, 57886, 57886, 59339, 57886, 59341, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59351, 59352, 59354, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59362, 59363, 57886, 59365, 57886, 57886, 57886, 57886, 57886, 58799, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58829, 59368, 59369, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59377, 57886, 59379, 57886, 59382, 57886, 57886, 57886, 57886, 57886, 59390, 57886, 57886, 59392, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 2558, 0, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60371, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 60377, 57936, 57936, 57936, 57936, 50657, 0, 59407, 57909, 59409, 57909, 59410, 57909, 59412, 57909, 59414, 57909, 57909, 57909, 59418, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59431, 57909, 57909, 57909, 57909, 59435, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58916, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 57886, 57936, 57936, 57936, 57936, 57936, 521, 1335, 521, 521, 521, 521, 58774, 57886, 57886, 57886, 57886, 57886, 1138, 0, 0, 1709, 0, 0, 0, 0, 1716, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3882, 521, 3884, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59847, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60277, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 59439, 57909, 59441, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59451, 59452, 59454, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59462, 59463, 57909, 59465, 57909, 57909, 59468, 59469, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59477, 57909, 59479, 57909, 59482, 57909, 57909, 57909, 57909, 57909, 59490, 57909, 57909, 59492, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57886, 57886, 57886, 57886, 57886, 60290, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60299, 57886, 57886, 57886, 60302, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 1214, 0, 0, 0, 0, 0, 0, 0, 0, 1223, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1238, 59503, 57936, 59505, 57936, 59506, 57936, 59508, 57936, 59510, 57936, 57936, 57936, 59514, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59527, 57936, 57936, 57936, 57936, 59531, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 1138, 0, 1707, 0, 0, 0, 0, 1714, 0, 0, 0, 0, 0, 0, 0, 0, 3170, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3182, 521, 3185, 521, 521, 521, 521, 59535, 57936, 59537, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59547, 59548, 59550, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59558, 59559, 57936, 57936, 59561, 57936, 57936, 59564, 59565, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59573, 57936, 59575, 57936, 59578, 57936, 57936, 57936, 57936, 57936, 59586, 57936, 57936, 59588, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 1926, 521, 2258, 521, 57886, 59369, 57886, 59607, 57886, 2265, 0, 2266, 0, 0, 0, 0, 2268, 0, 2269, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2276, 0, 0, 2279, 2280, 0, 0, 0, 2284, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2790, 0, 0, 0, 0, 2303, 0, 0, 0, 0, 2307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2323, 0, 0, 0, 0, 2327, 0, 0, 0, 0, 0, 3873, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58803, 57886, 57886, 57886, 57886, 58808, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58816, 57886, 57886, 57886, 58823, 58825, 57886, 57886, 57886, 0, 2356, 0, 0, 0, 0, 0, 0, 0, 0, 2365, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2375, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 875, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 2412, 521, 2414, 521, 521, 521, 521, 521, 521, 521, 2420, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1357, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2441, 2442, 521, 521, 521, 521, 521, 521, 2449, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1383, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1400, 521, 521, 521, 2463, 521, 521, 2466, 2467, 521, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59833, 57886, 59835, 57886, 57886, 57886, 57886, 57886, 57886, 60585, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60599, 57886, 57886, 57886, 57886, 57886, 59843, 57886, 59845, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59851, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60300, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 59896, 57886, 57886, 59899, 59900, 57886, 0, 0, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59922, 57909, 57909, 57909, 57909, 57909, 57909, 58388, 57909, 57909, 57909, 0, 0, 0, 0, 57886, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 57886, 57886, 0, 0, 0, 3862, 0, 0, 3865, 0, 0, 0, 0, 3627, 0, 0, 59924, 57909, 57909, 57909, 57909, 57909, 57909, 59932, 57909, 59934, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59940, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 59991, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60707, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 0, 60007, 57936, 57936, 57936, 57936, 57936, 57936, 60015, 57936, 60017, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60023, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 2739, 2266, 0, 2740, 2269, 0, 0, 0, 521, 2868, 521, 521, 521, 521, 2872, 521, 521, 521, 2877, 521, 521, 521, 521, 521, 521, 521, 521, 2885, 521, 521, 521, 521, 521, 521, 521, 2890, 521, 521, 521, 521, 521, 521, 0, 0, 0, 0, 57886, 57886, 59820, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58811, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60259, 57886, 60261, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60278, 57886, 57886, 57886, 57886, 60282, 57886, 57886, 57886, 57886, 57886, 60605, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60319, 57909, 57909, 57909, 57909, 57909, 60324, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57886, 57886, 60287, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60295, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60301, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 2962, 0, 0, 0, 0, 0, 1185, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1732, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1856, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60314, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60326, 57909, 60328, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60365, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61082, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57909, 57909, 57909, 57909, 60362, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60368, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60379, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58959, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58978, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58988, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58960, 58967, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58980, 57936, 58982, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60417, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60424, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60410, 57936, 57936, 57936, 57936, 60414, 57936, 57936, 57936, 60419, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60427, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 0, 3103, 0, 0, 3106, 3107, 0, 0, 3110, 3111, 60433, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 301, 305, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 728, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3140, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 278528, 0, 0, 0, 0, 0, 0, 3167, 3168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3189, 60580, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60593, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60600, 57909, 57909, 57909, 60629, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60642, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58925, 57909, 57909, 57909, 57909, 57909, 58933, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 57886, 57936, 57936, 57936, 57936, 57909, 57909, 60649, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60678, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60691, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60044, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 57886, 3937, 0, 3939, 0, 0, 0, 0, 0, 3627, 3943, 0, 3945, 57936, 57936, 57936, 60698, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 2368, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2398, 521, 521, 2401, 521, 521, 521, 521, 521, 521, 2409, 521, 521, 3403, 0, 0, 0, 0, 3405, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3419, 0, 0, 0, 0, 3424, 3425, 0, 3427, 0, 0, 0, 0, 0, 1197, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1286, 0, 0, 0, 0, 1314, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3452, 521, 521, 521, 521, 3430, 0, 0, 0, 3433, 521, 521, 521, 521, 521, 521, 3440, 521, 521, 521, 521, 521, 3444, 521, 521, 521, 521, 521, 521, 521, 3450, 521, 521, 521, 521, 521, 3456, 60828, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60834, 57886, 57886, 57886, 57886, 57886, 60840, 57886, 57886, 60843, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60850, 60852, 57886, 57886, 57886, 57886, 57886, 57886, 58282, 58284, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 57909, 57909, 58327, 57909, 57909, 57909, 57909, 57909, 57909, 58358, 58360, 57909, 60856, 57886, 60858, 60859, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 60866, 57909, 57909, 57909, 57909, 57909, 60870, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60876, 57909, 57909, 57909, 57909, 57909, 60882, 57909, 57909, 60885, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60892, 60894, 57909, 57909, 57909, 57909, 60898, 57909, 60900, 60901, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 60908, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61200, 57936, 57936, 57936, 521, 521, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 3866, 3867, 0, 3627, 0, 3871, 57936, 57936, 60912, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60918, 57936, 57936, 57936, 57936, 57936, 60924, 57936, 57936, 60927, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60934, 60936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59000, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59020, 57936, 57936, 57936, 57936, 57936, 59028, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59542, 57936, 57936, 57936, 59546, 57936, 57936, 59551, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60048, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60940, 57936, 60942, 60943, 57936, 521, 521, 3602, 57886, 57886, 60949, 0, 0, 0, 0, 0, 0, 3611, 0, 0, 3614, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 3649, 3650, 521, 521, 521, 521, 3654, 3655, 521, 521, 521, 521, 521, 3659, 521, 521, 521, 521, 3662, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 61018, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61023, 57886, 57886, 57886, 57886, 57886, 57886, 60833, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60841, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60855, 57909, 57909, 57909, 57909, 57909, 57909, 61052, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61063, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61071, 57909, 57909, 57909, 57909, 57909, 57909, 58914, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58930, 57909, 57909, 57909, 57909, 57909, 57909, 58941, 57909, 0, 57886, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 367, 0, 0, 0, 303104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57886, 57886, 61240, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61256, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 61076, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61081, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61092, 57886, 57886, 57886, 61440, 57886, 61442, 57886, 57886, 57886, 57886, 61447, 61448, 61449, 61450, 57909, 57909, 57909, 61453, 57909, 61455, 57909, 57909, 57909, 57909, 61460, 61461, 61462, 61463, 57936, 57936, 57936, 61466, 57936, 61468, 57936, 57936, 57936, 57936, 61473, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61031, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 61392, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 61406, 57936, 57936, 57936, 61535, 57936, 0, 0, 0, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 521, 521, 521, 521, 4198, 521, 57886, 57886, 57886, 57886, 61546, 57886, 57909, 57909, 57909, 57909, 61550, 57909, 57936, 57936, 57936, 57936, 61554, 57936, 0, 371, 371, 0, 429, 131072, 371, 429, 429, 332, 371, 429, 0, 0, 429, 449, 429, 0, 0, 0, 429, 488, 488, 488, 493, 488, 488, 488, 493, 488, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 429, 527, 57893, 527, 57893, 527, 527, 57893, 527, 527, 57916, 57893, 527, 527, 57893, 57893, 57893, 57916, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57916, 57916, 57893, 57893, 57943, 57893, 57893, 57893, 57893, 57893, 57893, 57893, 57943, 57943, 57893, 57893, 57893, 57893, 57943, 57943, 57893, 527, 57893, 57893, 57893, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 0, 4399798, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 773, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 773, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 773, 0, 0, 0, 521, 828, 521, 521, 521, 521, 521, 521, 860, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 58246, 1295, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 2839, 521, 521, 521, 521, 521, 521, 1326, 521, 521, 521, 521, 521, 1338, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2430, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 58754, 901, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58765, 57886, 57886, 57886, 57886, 57886, 58777, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59381, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61041, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 58954, 57936, 57936, 57936, 57936, 57936, 58966, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 3375, 0, 0, 0, 57909, 57909, 57909, 59954, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60355, 57909, 57909, 57909, 57936, 57936, 57936, 60037, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59026, 57936, 57936, 57936, 0, 0, 4212, 521, 521, 521, 61558, 57886, 57886, 57886, 61560, 57909, 57909, 57909, 61562, 57936, 57936, 57936, 0, 521, 521, 57886, 57886, 57909, 57909, 57936, 57936, 521, 57886, 57909, 57936, 521, 521, 521, 521, 521, 521, 521, 521, 3793, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60607, 57886, 57886, 60610, 57886, 57886, 60613, 0, 0, 60614, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60637, 60638, 57909, 57909, 57909, 57909, 60641, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60647, 0, 0, 0, 430, 131072, 0, 430, 430, 0, 0, 430, 439, 0, 430, 0, 430, 469, 469, 469, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 528, 57894, 528, 57894, 528, 528, 57894, 528, 528, 57917, 57894, 528, 528, 57894, 57894, 57894, 57917, 57894, 57894, 57894, 57894, 57894, 57894, 57894, 57917, 57917, 57894, 57894, 57944, 57894, 57894, 57894, 57894, 57894, 57894, 57894, 57944, 57944, 57894, 57894, 57894, 57894, 57944, 57944, 57894, 528, 57894, 57894, 57894, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 58754, 1961, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 2561, 0, 50657, 2061, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59950, 57909, 57909, 2302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2326, 0, 0, 0, 0, 0, 1213, 0, 1215, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 0, 420, 0, 0, 0, 0, 0, 2385, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1949, 521, 521, 521, 521, 521, 521, 521, 0, 3138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3158, 0, 0, 0, 0, 0, 0, 0, 0, 1731, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1747, 0, 0, 1750, 0, 0, 521, 521, 521, 3213, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 50657, 58754, 977, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58868, 57909, 0, 0, 3404, 0, 0, 0, 0, 0, 3407, 0, 3409, 0, 0, 3412, 0, 0, 0, 0, 0, 3417, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 4399797, 4399797, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 3460, 521, 521, 521, 521, 521, 521, 521, 521, 3468, 521, 521, 3471, 521, 521, 521, 60818, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58296, 57886, 57886, 57886, 57886, 58314, 57886, 57886, 0, 57909, 57909, 58325, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57886, 60857, 57886, 57886, 57886, 60860, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60877, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59959, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 60664, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57909, 57909, 57909, 57909, 57909, 60887, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60896, 57909, 57909, 60899, 57909, 57909, 57909, 60902, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 4089, 521, 57886, 57886, 57886, 60938, 57936, 57936, 60941, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3615, 0, 0, 0, 0, 0, 0, 0, 393, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3159, 3160, 0, 0, 0, 0, 0, 521, 521, 521, 521, 3663, 521, 3665, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 61017, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59850, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59857, 57886, 59859, 57886, 59862, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61029, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61035, 57886, 61037, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 61046, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58917, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58934, 57909, 57909, 57909, 57909, 57909, 57909, 0, 57886, 57936, 57936, 57936, 58949, 57936, 61093, 57936, 61095, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 3791, 521, 521, 521, 521, 521, 521, 521, 521, 3797, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58804, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58819, 57886, 57886, 57886, 57886, 57886, 57886, 61153, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61159, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61172, 57909, 57909, 57909, 57909, 57909, 57909, 58915, 57909, 57909, 58922, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58936, 57909, 57909, 57909, 57909, 57909, 0, 57886, 57936, 57936, 57936, 57936, 57936, 521, 1336, 521, 521, 521, 521, 58775, 57886, 57886, 57886, 57886, 57886, 1138, 0, 0, 0, 0, 1711, 0, 0, 0, 0, 1718, 0, 0, 0, 0, 0, 0, 1247, 1248, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1155, 1154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2799, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3630, 0, 0, 0, 0, 0, 0, 0, 3637, 0, 0, 57936, 57936, 57936, 57936, 57936, 61197, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3627, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3782, 0, 0, 521, 521, 521, 521, 0, 0, 0, 0, 683, 684, 0, 0, 0, 0, 689, 0, 0, 0, 367, 367, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 530, 57896, 530, 57896, 530, 530, 57896, 530, 530, 57919, 57896, 530, 530, 57896, 57896, 57896, 57919, 57886, 58258, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58317, 0, 57909, 57909, 57909, 57909, 58334, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59481, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57886, 57936, 57936, 57936, 57936, 58468, 521, 839, 521, 521, 521, 898, 0, 58258, 57886, 57886, 57886, 57886, 58317, 155941, 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1219, 1220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6299648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5808128, 0, 0, 0, 1211, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1230, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 3647, 521, 521, 521, 521, 521, 521, 521, 3652, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2421, 521, 521, 521, 2424, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2895, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60842, 57886, 60844, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 1839, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1853, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1307, 1308, 0, 0, 1154, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 1319, 521, 521, 521, 1958, 58754, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 2962, 0, 0, 386, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 401, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 412, 0, 0, 0, 0, 0, 0, 412, 139264, 147456, 0, 0, 0, 421, 0, 333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 333, 0, 0, 0, 0, 0, 0, 0, 0, 333, 0, 0, 139264, 147456, 0, 0, 0, 0, 0, 0, 0, 2773, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3634, 0, 0, 0, 0, 0, 0, 424, 424, 0, 0, 131072, 424, 0, 0, 0, 424, 0, 440, 0, 0, 424, 334, 470, 470, 470, 483, 483, 483, 483, 483, 483, 483, 483, 483, 483, 504, 512, 512, 512, 512, 519, 512, 512, 512, 519, 512, 512, 512, 512, 512, 512, 529, 57895, 529, 57895, 529, 529, 57895, 529, 529, 57918, 57895, 529, 529, 57895, 57895, 57895, 57918, 57895, 57895, 57895, 57895, 57895, 57895, 57895, 57918, 57918, 57895, 57895, 57945, 57895, 57895, 57895, 57895, 57895, 57895, 57895, 57945, 57945, 57895, 57895, 57895, 57895, 57945, 57945, 57895, 529, 57895, 57895, 57895, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1734, 0, 0, 0, 0, 0, 0, 0, 0, 1741, 0, 0, 1744, 1745, 1746, 0, 1748, 1749, 0, 0, 0, 822, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 842, 521, 851, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 899, 57886, 57886, 57886, 57886, 57886, 57886, 61244, 57886, 57886, 57886, 61248, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 61254, 57909, 57909, 57909, 57909, 57909, 57909, 61260, 57909, 57909, 57909, 61264, 57909, 57936, 57886, 57886, 58261, 57886, 58270, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58318, 0, 57909, 57909, 57909, 57909, 57909, 58337, 57909, 58346, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58887, 58889, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60661, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60669, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58469, 521, 521, 521, 521, 1130, 899, 0, 57886, 57886, 57886, 57886, 58480, 58318, 155941, 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1764, 1765, 1766, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2319, 2320, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 1331, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1350, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1360, 521, 521, 521, 521, 521, 521, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59825, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59837, 57886, 57886, 521, 1408, 521, 58754, 901, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58770, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58789, 57886, 57886, 57886, 57886, 57886, 57886, 59342, 59343, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59360, 57886, 57886, 57886, 57886, 57886, 59367, 57886, 57886, 58833, 57886, 57886, 57886, 57886, 57886, 58840, 57886, 57886, 57886, 58847, 57886, 50657, 58754, 977, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58865, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58919, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 57886, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60042, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 3370, 57886, 57886, 60717, 0, 0, 0, 0, 0, 57936, 57936, 57936, 59037, 57936, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1796, 0, 0, 0, 0, 0, 0, 0, 1803, 0, 1805, 0, 0, 0, 1807, 0, 739, 0, 0, 0, 0, 1838, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1850, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1836, 1924, 521, 521, 521, 521, 521, 521, 521, 521, 1933, 521, 521, 521, 521, 521, 521, 1942, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1952, 1954, 521, 521, 521, 0, 0, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59861, 57886, 57886, 57886, 57886, 57886, 57886, 521, 58754, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59328, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61033, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 50657, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59428, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 0, 0, 0, 57886, 57936, 57936, 58397, 57936, 57936, 57936, 57936, 57936, 57936, 58430, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59572, 57936, 57936, 57936, 57936, 57936, 57936, 59581, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59592, 59594, 57936, 57936, 57936, 57936, 521, 521, 521, 0, 0, 2472, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59885, 57886, 57886, 57886, 57886, 59889, 57886, 57886, 57886, 2329, 0, 0, 0, 0, 0, 0, 0, 0, 2337, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3128, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 2465, 521, 521, 521, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 59824, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59836, 57886, 57886, 57886, 57886, 57886, 57886, 61492, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61500, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59583, 59584, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 2255, 521, 59925, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60358, 59953, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59972, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59935, 57909, 59937, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60660, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60671, 57936, 60008, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59598, 521, 521, 60036, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60055, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 0, 0, 4132, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 2769, 0, 0, 2772, 0, 0, 0, 0, 0, 0, 2776, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2787, 0, 0, 0, 0, 0, 0, 0, 394, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 319488, 319488, 0, 0, 0, 0, 0, 0, 2795, 0, 0, 0, 0, 2797, 0, 0, 0, 0, 0, 0, 0, 2801, 2802, 0, 0, 2805, 0, 0, 2808, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2818, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2828, 0, 0, 0, 0, 521, 2832, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2878, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1356, 521, 521, 521, 1359, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2873, 521, 521, 521, 521, 521, 521, 2880, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2888, 521, 521, 521, 2891, 521, 521, 521, 0, 0, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60253, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61493, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61501, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60921, 57936, 60923, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60930, 57936, 57936, 60932, 57936, 57936, 57936, 57936, 57936, 0, 0, 57909, 60308, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60331, 57936, 57936, 60407, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60415, 57936, 57936, 57936, 57936, 57936, 57936, 60422, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60431, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59574, 57936, 57936, 57936, 59580, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59590, 57936, 57936, 57936, 57936, 59596, 57936, 57936, 521, 521, 521, 0, 901, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59864, 57886, 57886, 57886, 57936, 60434, 57936, 57936, 57936, 57936, 57936, 57936, 3094, 521, 521, 521, 521, 60441, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 3102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 3646, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3658, 521, 521, 521, 3112, 0, 0, 0, 0, 0, 0, 0, 3116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3130, 3131, 0, 0, 0, 0, 0, 0, 0, 3143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 333, 334, 335, 0, 0, 0, 0, 0, 3211, 521, 521, 521, 521, 521, 521, 521, 3215, 521, 521, 521, 521, 521, 0, 0, 57886, 57886, 57886, 60567, 57886, 57886, 57886, 57886, 57886, 60572, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61246, 57886, 57886, 57886, 61249, 57909, 57909, 57909, 57909, 61253, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61262, 57909, 57909, 57909, 61265, 60601, 57886, 60603, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60608, 57886, 57886, 57886, 57886, 57886, 0, 0, 57909, 57909, 57909, 60616, 57909, 57909, 57909, 57909, 57909, 60621, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60654, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61086, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57909, 57909, 57909, 60650, 57909, 60652, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60657, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 60665, 57936, 57936, 57936, 57936, 57936, 60670, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60041, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60054, 57936, 57936, 57936, 57936, 57936, 60058, 60059, 60060, 57936, 60696, 57936, 57936, 57936, 60699, 57936, 60701, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60706, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 3374, 0, 0, 3377, 3378, 521, 521, 521, 521, 521, 521, 3462, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 60822, 57886, 57886, 57886, 57886, 60826, 57886, 57886, 57886, 57886, 57886, 58835, 57886, 57886, 57886, 57886, 57886, 57886, 58846, 57886, 50657, 58754, 977, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58862, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58394, 0, 0, 0, 0, 57886, 57936, 57936, 57936, 57936, 57936, 58412, 57936, 58421, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 4085, 521, 4087, 521, 521, 521, 57886, 57886, 57886, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60916, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60931, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 3608, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1194, 0, 1196, 0, 0, 367, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3619, 3620, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3633, 0, 0, 0, 0, 0, 0, 0, 0, 1793, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1806, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60825, 57886, 57886, 57886, 57886, 521, 521, 3787, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3798, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 61149, 57886, 57886, 57886, 57886, 57886, 58836, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 50657, 58754, 977, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58861, 57909, 57909, 57909, 58870, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61198, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3627, 0, 0, 3777, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 4022, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 61379, 0, 521, 521, 521, 521, 521, 521, 521, 521, 3955, 521, 3957, 3958, 521, 3960, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61314, 57886, 61316, 61317, 57886, 61319, 57886, 61321, 61488, 57886, 61489, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 61496, 57909, 61497, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 61504, 57936, 61505, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58961, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59019, 57936, 57936, 59023, 57936, 57936, 57936, 57936, 57936, 59030, 0, 0, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 0, 521, 521, 57886, 57886, 57909, 57909, 57936, 57936, 4224, 61569, 61570, 61571, 521, 521, 521, 521, 521, 521, 521, 1332, 1339, 521, 521, 521, 521, 521, 521, 521, 521, 1352, 521, 1354, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2422, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 0, 0, 57886, 60566, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58307, 57886, 57886, 57886, 57886, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57896, 57896, 57896, 57896, 57896, 57896, 57896, 57919, 57919, 57896, 57896, 57946, 57896, 57896, 57896, 57896, 57896, 57896, 57896, 57946, 57946, 57896, 57896, 57896, 57896, 57946, 57946, 57896, 530, 57896, 57896, 57896, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2312, 0, 0, 0, 2315, 0, 0, 0, 0, 0, 2321, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57909, 58909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 57886, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 1138, 1705, 1706, 0, 0, 0, 1712, 1713, 0, 0, 0, 0, 0, 0, 0, 0, 687, 0, 0, 0, 0, 0, 367, 367, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 383, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 339, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2366, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 0, 0, 0, 0, 0, 1162, 0, 0, 0, 0, 0, 0, 405, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, 0, 0, 0, 0, 0, 0, 383, 0, 139264, 147456, 0, 405, 0, 0, 405, 0, 0, 0, 431, 131072, 0, 431, 431, 0, 0, 431, 0, 445, 431, 0, 431, 471, 471, 471, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 484, 531, 57897, 531, 57897, 531, 531, 57897, 531, 531, 57920, 57897, 531, 531, 57897, 57897, 57897, 57920, 57897, 57897, 57897, 57897, 57897, 57897, 57897, 57920, 57920, 57897, 57897, 57947, 57897, 57897, 57897, 57897, 57897, 57897, 57897, 57947, 57947, 57897, 57897, 57897, 57897, 57947, 57947, 57897, 531, 57897, 57897, 57897, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2775, 0, 0, 0, 0, 0, 2780, 0, 2782, 2783, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1157, 0, 0, 0, 0, 0, 0, 0, 1159, 0, 0, 0, 0, 0, 0, 1266, 0, 0, 0, 0, 1271, 654, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 654, 0, 654, 0, 0, 0, 0, 813, 0, 0, 0, 654, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 3645, 521, 521, 521, 3648, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3656, 521, 521, 521, 521, 521, 521, 521, 0, 0, 0, 0, 733, 654, 0, 0, 521, 829, 521, 521, 521, 844, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 885, 521, 521, 521, 521, 57886, 57886, 58247, 57886, 57886, 57886, 58263, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58304, 57886, 57886, 57886, 57886, 0, 57909, 57909, 58323, 57909, 57909, 57909, 58339, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59987, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 59996, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60391, 57936, 60393, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60022, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60029, 57936, 60031, 57936, 60034, 57936, 57936, 57909, 57909, 57909, 57909, 57909, 58380, 57909, 57909, 57909, 57909, 0, 0, 0, 0, 57886, 57936, 57936, 58398, 57936, 57936, 57936, 58414, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60390, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60710, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 0, 58455, 57936, 57936, 57936, 57936, 521, 521, 521, 885, 521, 521, 0, 57886, 57886, 57886, 58304, 57886, 57886, 293, 1138, 0, 0, 1142, 0, 0, 1147, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3888, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58841, 57886, 57886, 57886, 57886, 57886, 50657, 58754, 977, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60639, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59965, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 0, 0, 1154, 1155, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3133, 0, 0, 0, 0, 0, 0, 1155, 0, 0, 0, 0, 0, 0, 1280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 760, 0, 0, 763, 0, 0, 767, 0, 0, 0, 0, 521, 521, 521, 58754, 901, 57886, 58757, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58771, 58778, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58791, 57886, 58793, 57886, 57886, 57886, 57886, 57886, 60831, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60849, 57886, 60851, 57886, 57886, 57886, 57886, 57886, 57886, 58278, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58354, 57909, 57909, 58908, 57909, 58910, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58923, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58938, 57909, 57909, 57909, 0, 57886, 57936, 58946, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60068, 57936, 57936, 60071, 60072, 57936, 2404, 521, 2731, 521, 521, 59835, 57886, 60080, 57886, 57886, 2739, 2266, 0, 2740, 2269, 0, 0, 0, 0, 0, 0, 4014, 0, 4016, 0, 521, 521, 521, 521, 521, 4021, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 61378, 57886, 57936, 59033, 57936, 57936, 57936, 521, 1332, 521, 1389, 521, 521, 58771, 57886, 57886, 58828, 57886, 57886, 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3156, 0, 0, 0, 0, 3161, 0, 0, 0, 3163, 0, 1724, 1725, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2342912, 0, 0, 0, 521, 521, 521, 521, 521, 521, 1930, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1957, 521, 58754, 1961, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59321, 59322, 57886, 57886, 57886, 57886, 59329, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 61391, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 61405, 57936, 57936, 50657, 2061, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59421, 59422, 57909, 57909, 57909, 57909, 59429, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 0, 0, 741, 57886, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59520, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57909, 57909, 57909, 57909, 59473, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59501, 57909, 57886, 57886, 57886, 57886, 57886, 60832, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60847, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58843, 57886, 57886, 57886, 50657, 58754, 977, 57909, 58852, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58866, 58873, 57936, 57936, 57936, 57936, 57936, 59540, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59560, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 521, 0, 57886, 57886, 57886, 57886, 57886, 57886, 155941, 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2809, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57936, 57936, 57936, 59569, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59597, 57936, 521, 521, 521, 0, 2895, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59359, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 2330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2346, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2397, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61162, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59866, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59878, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59884, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59890, 57886, 57886, 57886, 57886, 57886, 61030, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61036, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 61393, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 61407, 57909, 57909, 57909, 57909, 59955, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59967, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59973, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60366, 57909, 57909, 57909, 60369, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 60373, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 4083, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57909, 57909, 59979, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60430, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60038, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60050, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60056, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 521, 0, 57886, 57886, 57886, 57886, 57886, 57886, 155941, 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1149, 0, 0, 57936, 57936, 60062, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3109, 0, 0, 60258, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59865, 3164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 3180, 521, 521, 521, 521, 521, 521, 3188, 521, 521, 521, 521, 521, 521, 521, 1333, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2858, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57909, 57909, 60628, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61070, 57909, 57909, 57936, 57936, 57936, 60677, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59027, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61099, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3171, 0, 0, 0, 521, 3175, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 0, 2472, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59349, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61039, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57886, 57886, 57886, 57886, 61441, 57886, 61443, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61454, 57909, 61456, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 3607, 0, 3609, 0, 0, 0, 3613, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1733, 0, 0, 0, 1736, 0, 0, 1739, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 335872, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 335872, 0, 0, 61467, 57936, 61469, 57936, 57936, 57936, 57936, 0, 0, 0, 0, 0, 0, 0, 4134, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 61485, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59846, 57886, 59848, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60273, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 388, 340, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2351104, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 441, 0, 0, 0, 456, 472, 472, 472, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 505, 532, 57898, 532, 57898, 532, 532, 57898, 532, 532, 57921, 57898, 532, 532, 57898, 57898, 57898, 57921, 57898, 57898, 57898, 57898, 57898, 57898, 57898, 57921, 57921, 57898, 57898, 57948, 57898, 57898, 57898, 57898, 57898, 57898, 57898, 57948, 57948, 57898, 57898, 57898, 57898, 57948, 57948, 57898, 532, 57898, 57898, 57898, 1, 24578, 3, 155941, 156275, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3410, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 212992, 0, 0, 0, 0, 0, 212992, 212992, 212992, 212992, 212992, 655, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 655, 0, 655, 0, 0, 0, 0, 0, 0, 0, 0, 655, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57886, 57886, 57886, 58264, 57886, 57886, 58280, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 57909, 57909, 57909, 57909, 57909, 57909, 58340, 57909, 57909, 58356, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59444, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59464, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58921, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 57886, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 1138, 1705, 0, 0, 0, 0, 1712, 0, 0, 0, 0, 0, 0, 0, 1722, 0, 1241, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1293, 0, 0, 0, 0, 0, 1299, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1890, 521, 521, 521, 521, 521, 521, 521, 521, 1372, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1391, 521, 521, 521, 521, 521, 1399, 521, 521, 521, 521, 521, 521, 0, 0, 0, 0, 57886, 59819, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59357, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 521, 521, 521, 58754, 901, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58772, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58848, 50657, 58754, 977, 58851, 57909, 57909, 57909, 57909, 57909, 58858, 57909, 57909, 57909, 57909, 58864, 57909, 57909, 57909, 58830, 57886, 57886, 57886, 57886, 57886, 58838, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 50657, 58754, 977, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58867, 57909, 57909, 57909, 57909, 57909, 57909, 60631, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60645, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59985, 57909, 57909, 59988, 59989, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60005, 57936, 0, 0, 1755, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 338, 339, 0, 521, 58754, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59323, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59334, 57886, 57886, 57886, 57886, 57886, 58837, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 50657, 58754, 977, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61058, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61064, 57909, 61066, 57909, 57909, 57909, 57909, 57909, 57909, 50657, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59423, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59434, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61178, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61191, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 1138, 1705, 0, 0, 0, 0, 1712, 0, 0, 0, 0, 0, 0, 0, 0, 349, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 295, 0, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59541, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59552, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61279, 57936, 57936, 521, 57886, 0, 0, 0, 3940, 0, 0, 0, 0, 3627, 0, 0, 0, 0, 0, 2282, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2298, 2299, 0, 0, 0, 0, 0, 0, 0, 3382, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 0, 0, 0, 2355, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2328, 521, 2413, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2866, 57886, 57886, 57886, 57886, 59844, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58824, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 59928, 57909, 57909, 57909, 57909, 59933, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60011, 57936, 57936, 57936, 57936, 60016, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58985, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 3380, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4284416, 0, 0, 57886, 60829, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59366, 57886, 57936, 57936, 57936, 60913, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59562, 57936, 57936, 57936, 0, 521, 521, 521, 521, 3951, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 61310, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59875, 57886, 57886, 57886, 57886, 59880, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 50657, 58754, 977, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58859, 57909, 57909, 57909, 58863, 57909, 57909, 58874, 57909, 57909, 57909, 57909, 61326, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 61342, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59004, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60689, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61508, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 521, 1333, 521, 521, 1698, 521, 58772, 57886, 57886, 57886, 59047, 57886, 1138, 0, 0, 1708, 0, 0, 0, 0, 1715, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3883, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59344, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59364, 57886, 57886, 57886, 341, 342, 343, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 341, 295, 0, 0, 0, 0, 0, 4013, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 4027, 521, 521, 4029, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59376, 57886, 57886, 57886, 57886, 57886, 57886, 59385, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59396, 59398, 57886, 57886, 57886, 57886, 0, 0, 0, 389, 390, 392, 342, 0, 0, 0, 0, 0, 0, 341, 0, 0, 0, 0, 341, 0, 0, 0, 342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 639, 748, 749, 750, 0, 0, 0, 0, 0, 756, 757, 0, 0, 0, 0, 0, 0, 0, 0, 769, 770, 0, 772, 0, 0, 0, 389, 0, 0, 0, 0, 0, 0, 342, 0, 0, 0, 389, 0, 0, 0, 0, 0, 342, 389, 0, 0, 0, 139264, 147456, 0, 0, 0, 422, 0, 0, 0, 0, 0, 245760, 0, 0, 0, 245760, 0, 0, 245760, 245760, 245760, 0, 0, 0, 0, 0, 245760, 0, 245760, 245760, 0, 0, 0, 245760, 245760, 0, 0, 245760, 0, 0, 0, 0, 131072, 0, 0, 0, 341, 0, 0, 0, 446, 0, 341, 0, 473, 473, 473, 473, 489, 489, 489, 489, 489, 489, 489, 489, 489, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 473, 533, 57899, 533, 57899, 533, 533, 57899, 533, 533, 57922, 57899, 533, 533, 57899, 57899, 57899, 57922, 57899, 57899, 57899, 57899, 57899, 57899, 57899, 57922, 57922, 57899, 57935, 57949, 57935, 57935, 57935, 57935, 57935, 57935, 57935, 57949, 57949, 57935, 57935, 57935, 57935, 57949, 57949, 57935, 533, 57899, 57899, 57899, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 344064, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 344064, 0, 0, 0, 710, 0, 0, 0, 0, 0, 0, 0, 718, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 331, 332, 0, 0, 0, 0, 0, 0, 0, 0, 802, 0, 660, 0, 779, 0, 0, 0, 0, 0, 779, 802, 0, 802, 800, 0, 0, 0, 814, 0, 0, 0, 656, 817, 0, 779, 0, 0, 0, 0, 0, 823, 0, 0, 0, 0, 783, 656, 827, 0, 521, 830, 521, 521, 521, 846, 521, 521, 862, 521, 521, 521, 521, 876, 521, 521, 521, 521, 894, 521, 521, 57886, 57886, 58248, 57886, 57886, 57886, 58265, 57886, 57886, 58281, 57886, 57886, 57886, 57886, 58295, 57886, 57886, 57886, 57886, 58313, 57886, 57886, 0, 57909, 57909, 58324, 57909, 57909, 57909, 58341, 57909, 57909, 58357, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59476, 57909, 57909, 57909, 57909, 57909, 57909, 59485, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59496, 59498, 57909, 57909, 57909, 57909, 57886, 57909, 57909, 58371, 57909, 57909, 57909, 57909, 58389, 57909, 57909, 0, 0, 0, 0, 57886, 57936, 57936, 58399, 57936, 57936, 57936, 58416, 57936, 57936, 58432, 57936, 57936, 57936, 57936, 58446, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60412, 57936, 57936, 60416, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60425, 57936, 57936, 57936, 60428, 60429, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 521, 0, 57886, 57886, 57886, 57886, 57886, 57886, 155941, 1138, 0, 0, 1143, 0, 0, 1148, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3881, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58802, 57886, 57886, 57886, 58806, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 2962, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60623, 57909, 57936, 57936, 58464, 57936, 57936, 521, 521, 521, 521, 521, 521, 0, 57886, 57886, 57886, 57886, 57886, 57886, 155941, 1138, 0, 301, 0, 0, 305, 0, 0, 0, 0, 0, 0, 0, 0, 1816, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 740, 0, 0, 0, 0, 1274, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1286, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540, 57906, 540, 57906, 540, 540, 57906, 540, 540, 57929, 57906, 540, 540, 57906, 57906, 57906, 57929, 521, 521, 521, 58754, 901, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58773, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59348, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59361, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58797, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58821, 57886, 57886, 57886, 57886, 57886, 57886, 59374, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59386, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59397, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61444, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61457, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 3095, 521, 521, 521, 57886, 60442, 57886, 57886, 57886, 0, 0, 3100, 3101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3627, 0, 3776, 0, 0, 0, 0, 3780, 0, 0, 0, 0, 0, 0, 0, 0, 3783, 0, 521, 521, 521, 3785, 0, 0, 0, 0, 1814, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221645, 221645, 221645, 221645, 521, 58754, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59316, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59327, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59345, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59356, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59876, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 50657, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59416, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59427, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 0, 0, 0, 57886, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58429, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 2440, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2459, 521, 521, 521, 0, 0, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60252, 57886, 57886, 57886, 57886, 57886, 60257, 59892, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 57909, 57909, 57909, 59910, 57909, 59912, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60340, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61060, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59981, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 59993, 57936, 59995, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60686, 60687, 57936, 57936, 57936, 57936, 60690, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60064, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2274, 0, 0, 0, 0, 0, 0, 0, 2820, 0, 0, 0, 0, 2823, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2831, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3961, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61320, 57886, 521, 2842, 521, 521, 2845, 2846, 521, 521, 521, 521, 521, 2851, 521, 2853, 521, 521, 521, 521, 2857, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2863, 521, 521, 521, 0, 0, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60251, 57886, 57886, 60254, 60255, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60878, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59445, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59456, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61336, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61352, 57936, 521, 521, 521, 521, 521, 2871, 521, 521, 521, 521, 521, 521, 2879, 521, 521, 521, 521, 521, 2884, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1904, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1353, 1355, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 60260, 57886, 60262, 57886, 57886, 57886, 57886, 60266, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60272, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60281, 57886, 57886, 57886, 57886, 57886, 59373, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59401, 57886, 57886, 57886, 57886, 57886, 60289, 57886, 57886, 57886, 57886, 57886, 60294, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60330, 57909, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60318, 57909, 57909, 60321, 60322, 57909, 57909, 57909, 57909, 57909, 60327, 57909, 60329, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60336, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60342, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60350, 57909, 57909, 57909, 57909, 57909, 57909, 60357, 57909, 57909, 57909, 60333, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60339, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60348, 57909, 57909, 57909, 57909, 57909, 57909, 60356, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60632, 57909, 57909, 60635, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60646, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60889, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 60906, 57936, 57936, 57936, 57936, 60910, 57909, 57909, 57909, 60361, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61192, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60383, 57936, 57936, 60386, 60387, 57936, 57936, 57936, 57936, 57936, 60392, 57936, 60394, 57936, 57936, 57936, 57936, 60398, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60404, 0, 0, 3139, 0, 0, 0, 0, 0, 0, 0, 3145, 0, 3147, 0, 0, 0, 3150, 0, 0, 3153, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 450560, 450560, 0, 0, 450560, 450560, 450560, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1799, 0, 0, 0, 0, 0, 0, 0, 0, 1806, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3174, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2882, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2892, 521, 521, 521, 521, 521, 3192, 521, 521, 3195, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3205, 521, 521, 521, 521, 521, 521, 521, 521, 2443, 521, 521, 521, 521, 2448, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1906, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1940, 521, 521, 521, 521, 521, 521, 1947, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3214, 521, 521, 3217, 521, 521, 3220, 0, 0, 60565, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58302, 57886, 57886, 57886, 57886, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57886, 57886, 57886, 57886, 60583, 57886, 57886, 60586, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60597, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59871, 57886, 57886, 57886, 57886, 57886, 59877, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 2962, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 0, 3431, 0, 0, 521, 521, 3436, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3453, 521, 3455, 521, 521, 521, 521, 521, 521, 521, 1334, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1358, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2419, 521, 521, 521, 521, 521, 521, 521, 521, 2426, 521, 2428, 521, 2431, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2444, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1392, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3461, 521, 521, 3463, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 60820, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59378, 57886, 57886, 57886, 59384, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59394, 57886, 57886, 57886, 57886, 59400, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 60888, 57909, 57909, 60890, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 60904, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 3601, 521, 57886, 60948, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 306, 0, 0, 0, 0, 0, 0, 306, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 3664, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61020, 61021, 57886, 57886, 57886, 57886, 61025, 61026, 57909, 57909, 61049, 61050, 57909, 57909, 57909, 57909, 61054, 61055, 57909, 57909, 57909, 57909, 57909, 61059, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61065, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59960, 57909, 57909, 57909, 57909, 57909, 59966, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60341, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60353, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 61094, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 3764, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 2394, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2406, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3792, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59849, 57886, 57886, 57886, 57886, 57886, 57886, 59854, 57886, 59856, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60267, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61163, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57886, 57886, 61154, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61173, 57886, 57886, 57886, 57886, 61242, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61258, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 61075, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61087, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 4137, 521, 4138, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 0, 521, 521, 3949, 521, 521, 521, 521, 3954, 521, 521, 521, 521, 3959, 521, 521, 57886, 57886, 61308, 57886, 57886, 57886, 57886, 61313, 57886, 57886, 57886, 57886, 61318, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60873, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 0, 0, 0, 57886, 57936, 57936, 57936, 57936, 57936, 57936, 58418, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58969, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59012, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59029, 57936, 57909, 57909, 61324, 57909, 57909, 57909, 57909, 61329, 57909, 57909, 57909, 57909, 61334, 57909, 57909, 57909, 57936, 57936, 61340, 57936, 57936, 57936, 57936, 61345, 57936, 57936, 57936, 57936, 61350, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58962, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58986, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 3606, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1740, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 61384, 57886, 57886, 61386, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61398, 57909, 57909, 61400, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 3600, 521, 521, 60947, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3617, 3618, 0, 0, 57936, 57936, 57936, 57936, 61412, 57936, 57936, 61414, 57936, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60872, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59449, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58932, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 57886, 57936, 57936, 57936, 57936, 61533, 57936, 57936, 57936, 0, 0, 0, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 521, 4195, 521, 521, 521, 521, 57886, 61543, 57886, 57886, 57886, 57886, 57909, 61547, 57909, 57909, 57909, 57909, 57936, 61551, 57936, 57936, 57936, 57936, 0, 0, 0, 521, 521, 4196, 4197, 521, 521, 57886, 57886, 61544, 61545, 57886, 57886, 57909, 57909, 61548, 61549, 57909, 57909, 57936, 57936, 61552, 61553, 57936, 57936, 0, 57886, 57909, 57936, 4232, 61577, 61578, 61579, 521, 57886, 57909, 57936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1261, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 344, 345, 346, 347, 348, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 295, 0, 0, 0, 0, 0, 245760, 245760, 245760, 245760, 245760, 245760, 0, 0, 0, 0, 0, 0, 0, 245760, 245760, 245760, 0, 0, 0, 0, 139264, 147456, 245760, 245760, 0, 0, 245760, 0, 0, 0, 245760, 245760, 0, 0, 0, 0, 0, 0, 245760, 0, 0, 0, 0, 0, 0, 245760, 0, 0, 245760, 0, 0, 245760, 0, 0, 245760, 0, 245760, 245760, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 737, 0, 0, 0, 348, 347, 131072, 346, 347, 347, 348, 346, 347, 0, 346, 347, 450, 457, 474, 474, 474, 485, 485, 485, 491, 485, 485, 491, 491, 485, 491, 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, 506, 534, 57900, 534, 57900, 534, 534, 57900, 534, 534, 57923, 57900, 534, 534, 57900, 57900, 57900, 57923, 57900, 57900, 57900, 57900, 57900, 57900, 57900, 57923, 57923, 57900, 57900, 57950, 57900, 57900, 57900, 57900, 57900, 57900, 57900, 57950, 57950, 57900, 57900, 57900, 57900, 57950, 57950, 57900, 534, 57900, 57900, 57900, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 639, 0, 0, 0, 0, 644, 645, 646, 647, 648, 649, 650, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 665, 666, 0, 668, 669, 0, 0, 0, 0, 0, 675, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1881, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1375, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1914, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 709, 0, 0, 712, 0, 714, 0, 716, 0, 0, 0, 0, 0, 0, 0, 0, 0, 726, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 499712, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 301, 0, 302, 305, 0, 306, 4857856, 4874240, 0, 0, 4923392, 0, 0, 0, 0, 757, 0, 0, 778, 0, 0, 0, 0, 0, 0, 0, 0, 0, 785, 0, 0, 0, 0, 0, 796, 0, 0, 685, 0, 0, 0, 757, 0, 0, 0, 0, 0, 278528, 278528, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1176, 0, 0, 0, 0, 0, 685, 816, 816, 0, 0, 0, 0, 0, 521, 521, 836, 840, 843, 521, 852, 521, 521, 521, 868, 870, 873, 521, 521, 521, 886, 890, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60871, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58892, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60372, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58255, 58259, 58262, 57886, 58271, 57886, 57886, 57886, 58287, 58289, 58292, 57886, 57886, 57886, 58305, 58309, 57886, 57886, 57886, 0, 57909, 57909, 57909, 58331, 58335, 58338, 57909, 58347, 57909, 57909, 57909, 58363, 58365, 58368, 57909, 57909, 57909, 58381, 58385, 57909, 57909, 57909, 0, 0, 0, 0, 58396, 57936, 57936, 57936, 58406, 58410, 58413, 57936, 58422, 57936, 57936, 57936, 58438, 58440, 58443, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58963, 57936, 57936, 57936, 57936, 58973, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58989, 57936, 58456, 58460, 57936, 57936, 57936, 836, 1127, 521, 886, 890, 1131, 0, 58476, 58255, 57886, 58305, 58309, 58481, 155941, 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 540672, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 540672, 0, 0, 1366, 521, 521, 1370, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1381, 521, 521, 1388, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1402, 521, 521, 521, 0, 2895, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60248, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60256, 57886, 521, 521, 521, 58754, 901, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58795, 57886, 57886, 57886, 58798, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58805, 57886, 57886, 58809, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58820, 57886, 57886, 58827, 57886, 57886, 57886, 57886, 57886, 59897, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59918, 57909, 57909, 59921, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58885, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58898, 57909, 57909, 57909, 57909, 58903, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59480, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57886, 57936, 57936, 58994, 57936, 57936, 58998, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59010, 57936, 57936, 59017, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59031, 521, 1894, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1903, 521, 521, 521, 1907, 521, 521, 1912, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2447, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2458, 521, 521, 521, 521, 521, 58754, 0, 57886, 59308, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59315, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61164, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59337, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59346, 57886, 57886, 57886, 59350, 57886, 57886, 59355, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61160, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 61168, 57909, 57909, 57909, 57909, 57909, 50657, 0, 57909, 59408, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59415, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59437, 57936, 59504, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59511, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59533, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60681, 57936, 57936, 60684, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60695, 57936, 0, 0, 0, 0, 2305, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 352256, 352256, 352256, 352256, 521, 521, 521, 2438, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2865, 521, 2794, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2381, 2894, 521, 521, 0, 0, 0, 2896, 0, 1961, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59393, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 2061, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59974, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 60437, 57936, 57936, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1727, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 3789, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 61146, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61151, 57886, 61239, 57886, 57886, 57886, 57886, 57886, 61245, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 61251, 57909, 57909, 57909, 57909, 61255, 57909, 57909, 57909, 57909, 57909, 61261, 57909, 57909, 57909, 57909, 57936, 0, 0, 4166, 0, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59577, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 3766, 0, 0, 0, 0, 0, 3769, 57936, 57936, 61267, 57936, 57936, 57936, 57936, 61271, 57936, 57936, 57936, 57936, 57936, 61277, 57936, 57936, 57936, 57936, 521, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 3627, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1880, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1891, 521, 0, 521, 521, 521, 521, 521, 3952, 521, 521, 521, 3956, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 61311, 57886, 57886, 57886, 61315, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61387, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61401, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60043, 57936, 57936, 57936, 57936, 57936, 60049, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3627, 0, 0, 57909, 57909, 57909, 57909, 57909, 61327, 57909, 57909, 57909, 61331, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 61343, 57936, 57936, 57936, 61347, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61102, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 728, 0, 788, 0, 0, 0, 0, 0, 0, 0, 0, 788, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 0, 521, 521, 57886, 57886, 57909, 57909, 57936, 57936, 521, 57886, 57909, 57936, 4228, 61573, 61574, 61575, 521, 57886, 57909, 57936, 521, 57886, 57909, 57936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1742, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 391, 0, 0, 0, 395, 391, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 363, 364, 365, 366, 0, 0, 367, 0, 295, 0, 0, 349, 0, 407, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 407, 0, 0, 0, 0, 0, 0, 407, 0, 349, 0, 139264, 147456, 0, 0, 0, 0, 0, 0, 0, 3643, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2887, 521, 521, 521, 521, 521, 521, 521, 521, 521, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 442, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 500, 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 507, 535, 57901, 535, 57901, 535, 535, 57901, 535, 535, 57924, 57901, 535, 535, 57901, 57901, 57901, 57924, 57901, 57901, 57901, 57901, 57901, 57901, 57901, 57924, 57924, 57901, 57901, 57951, 57901, 57901, 57901, 57901, 57901, 57901, 57901, 57951, 57951, 57901, 57901, 57901, 57901, 57951, 57951, 57901, 616, 57901, 57967, 57967, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2351104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1228, 0, 0, 0, 0, 0, 0, 0, 0, 1237, 0, 0, 0, 672, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2300, 0, 57909, 57909, 58372, 57909, 57909, 57909, 57909, 58390, 57909, 57909, 0, 0, 0, 0, 57886, 57936, 57936, 58400, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58447, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60917, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60925, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 57886, 57886, 0, 0, 0, 0, 0, 3864, 0, 0, 0, 0, 0, 3627, 0, 0, 57936, 57936, 58465, 57936, 57936, 521, 521, 521, 521, 521, 521, 0, 57886, 57886, 57886, 57886, 57886, 57886, 155941, 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2325, 0, 0, 0, 0, 1242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 0, 0, 0, 0, 1203, 1161, 0, 0, 0, 0, 0, 0, 1273, 1160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 318, 0, 0, 0, 521, 521, 521, 58754, 901, 57886, 57886, 57886, 58760, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58774, 57886, 57886, 57886, 57886, 58784, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59873, 59874, 57886, 57886, 57886, 57886, 57886, 57886, 59881, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 977, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58929, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 57886, 57936, 57936, 57936, 57936, 57909, 57909, 57909, 58879, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58895, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60656, 57909, 57909, 60659, 57909, 57909, 60662, 60663, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 1756, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 337, 0, 0, 0, 1785, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1800, 0, 0, 0, 0, 0, 0, 0, 1243, 0, 0, 0, 0, 0, 0, 0, 0, 2286, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1173, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 2418, 521, 521, 521, 521, 521, 521, 2423, 521, 2425, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1379, 521, 521, 521, 521, 521, 521, 521, 1393, 521, 521, 521, 521, 521, 521, 521, 521, 1405, 521, 521, 2869, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2435, 2436, 57936, 57936, 57936, 57936, 57936, 57936, 60411, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59529, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 3432, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1398, 521, 521, 521, 521, 521, 0, 3872, 0, 0, 0, 0, 0, 521, 3875, 521, 521, 3877, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 61234, 57886, 57886, 61236, 57886, 57886, 57886, 57886, 57886, 60263, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60279, 57886, 57886, 57886, 57886, 57886, 61266, 57936, 57936, 61268, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 3627, 0, 3944, 0, 0, 0, 0, 0, 417792, 0, 417792, 0, 0, 0, 0, 309, 0, 0, 0, 0, 0, 417792, 0, 417792, 0, 0, 0, 0, 139264, 147456, 417792, 0, 0, 0, 417792, 0, 0, 0, 0, 417792, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 417792, 0, 0, 417792, 0, 0, 417792, 0, 417792, 418100, 3946, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59383, 57886, 57886, 57886, 57886, 57886, 57886, 59391, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 787, 0, 787, 0, 0, 0, 0, 0, 0, 0, 0, 787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1160, 0, 0, 0, 0, 1165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 460, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2335231, 2335197, 2335231, 2335231, 57886, 57886, 57886, 58266, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 57909, 57909, 57909, 57909, 57909, 57909, 58342, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60891, 57909, 60893, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60019, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60025, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 58754, 1962, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 2557, 2962, 0, 0, 50657, 2062, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61068, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 60408, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59021, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57886, 61028, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 0, 0, 350, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 345, 0, 0, 0, 0, 0, 352, 350, 131072, 0, 350, 350, 352, 0, 350, 0, 0, 350, 352, 350, 0, 0, 0, 350, 350, 350, 350, 350, 350, 350, 350, 498, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 536, 57902, 536, 57902, 536, 536, 57902, 536, 536, 57925, 57902, 536, 536, 57902, 57902, 57902, 57925, 57902, 57902, 57902, 57902, 57902, 57902, 57902, 57925, 57925, 57902, 57902, 57952, 57902, 57902, 57902, 57902, 57902, 57902, 57902, 57952, 57952, 57902, 57902, 57902, 57902, 57952, 57952, 57902, 536, 57902, 57902, 57902, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2751, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 791, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 674, 0, 0, 0, 0, 0, 0, 673, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 798, 799, 0, 0, 0, 0, 0, 0, 0, 521, 521, 837, 521, 521, 521, 853, 857, 521, 521, 521, 521, 521, 878, 880, 521, 521, 891, 521, 521, 521, 57886, 57886, 58250, 0, 751, 0, 0, 804, 0, 0, 0, 0, 0, 804, 0, 657, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 819, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 3879, 521, 521, 521, 521, 521, 521, 3885, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 61238, 58256, 57886, 57886, 57886, 58272, 58276, 57886, 57886, 57886, 57886, 57886, 58297, 58299, 57886, 57886, 58310, 57886, 57886, 57886, 0, 57909, 57909, 58326, 58332, 57909, 57909, 57909, 58348, 58352, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61330, 57909, 61332, 61333, 57909, 61335, 57909, 61337, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61346, 57936, 61348, 61349, 57936, 61351, 57936, 61353, 57909, 57909, 58373, 58375, 57909, 57909, 58386, 57909, 57909, 57909, 0, 0, 0, 0, 57886, 57936, 57936, 58401, 58407, 57936, 57936, 57936, 58423, 58427, 57936, 57936, 57936, 57936, 57936, 58448, 58450, 57936, 0, 4165, 0, 4167, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 521, 1695, 521, 1697, 521, 521, 59044, 57886, 57886, 59046, 57886, 57886, 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1720, 0, 0, 57936, 58461, 57936, 57936, 57936, 837, 521, 880, 521, 891, 521, 0, 57886, 58256, 58299, 57886, 58310, 57886, 155941, 1138, 0, 301, 0, 0, 305, 0, 0, 0, 0, 0, 0, 0, 0, 2309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3396, 0, 0, 0, 0, 0, 0, 0, 1208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1222, 0, 1224, 0, 0, 0, 0, 1229, 0, 0, 0, 0, 1234, 0, 0, 0, 0, 0, 0, 0, 3874, 521, 521, 521, 521, 3878, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3887, 521, 521, 61233, 57886, 57886, 57886, 57886, 61237, 57886, 1406, 521, 521, 58754, 901, 57886, 57886, 57886, 57886, 58761, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58792, 58794, 57886, 57886, 57886, 57886, 58273, 58277, 58283, 57886, 58288, 57886, 57886, 57886, 57886, 57886, 58306, 57886, 57886, 57886, 57886, 0, 57909, 57909, 58328, 57909, 57909, 57909, 57909, 58349, 58353, 58359, 57909, 58364, 57886, 58832, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58844, 58845, 57886, 57886, 50657, 58754, 977, 57909, 57909, 57909, 57909, 58856, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 0, 0, 0, 57886, 57936, 57936, 57936, 57936, 57936, 57936, 58415, 57936, 57936, 58431, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57909, 57909, 57909, 57909, 57909, 58913, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58927, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58939, 58940, 57909, 57909, 0, 57886, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59512, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59523, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60021, 57936, 57936, 57936, 57936, 57936, 57936, 60026, 57936, 60028, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58950, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58981, 58983, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61202, 57936, 521, 521, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3627, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3781, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 57936, 59034, 59035, 57936, 57936, 521, 521, 1696, 521, 521, 1699, 57886, 57886, 59045, 57886, 57886, 59048, 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2774, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 730, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1789, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 507904, 507904, 507904, 507904, 0, 1773, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1855, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2825, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 2837, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1895, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1955, 521, 521, 521, 58754, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59313, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58813, 57886, 58815, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58828, 57886, 57886, 57886, 59338, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59399, 57886, 57886, 57886, 50657, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59413, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60909, 57936, 57936, 57909, 59438, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 57886, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59509, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59534, 0, 0, 0, 2332, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 0, 0, 0, 0, 0, 2358, 0, 2360, 2361, 2362, 0, 2364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2372, 0, 0, 0, 0, 2377, 2378, 0, 0, 0, 0, 0, 0, 0, 49716, 49716, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 327680, 327680, 327680, 327680, 2382, 0, 0, 0, 0, 0, 0, 0, 2388, 521, 521, 521, 521, 521, 521, 2395, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1905, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1918, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2439, 521, 521, 521, 521, 521, 2445, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3801, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 2745, 2746, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2359296, 367, 0, 0, 0, 521, 521, 2843, 521, 521, 521, 521, 521, 2848, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2864, 521, 521, 521, 0, 2895, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60247, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 50657, 58754, 977, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59487, 59488, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57886, 57936, 57936, 57936, 57936, 57936, 60384, 57936, 57936, 57936, 57936, 57936, 60389, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59016, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60405, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60033, 57936, 57936, 57936, 57936, 57936, 57936, 61269, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61278, 57936, 57936, 57936, 521, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 3627, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3446, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1937, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1385, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57936, 61534, 57936, 57936, 4192, 0, 4194, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 0, 4193, 0, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 0, 4211, 0, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 0, 521, 521, 57886, 57886, 57909, 57909, 57936, 57936, 521, 57886, 57909, 57936, 521, 521, 521, 521, 521, 521, 521, 1335, 521, 521, 521, 521, 1345, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1361, 521, 521, 521, 0, 0, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60246, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 57909, 57909, 57909, 57909, 59911, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58926, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 57886, 57936, 57936, 57936, 57936, 0, 0, 0, 0, 370, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 378, 0, 0, 0, 0, 370, 0, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4825088, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 5177344, 4358144, 4358144, 4358144, 0, 0, 0, 0, 0, 0, 302, 0, 0, 0, 302, 0, 0, 306, 0, 0, 0, 306, 0, 0, 0, 4931584, 0, 0, 0, 0, 0, 0, 0, 0, 747, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 771, 0, 387, 0, 353, 0, 0, 0, 0, 0, 396, 397, 0, 398, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 398, 0, 0, 403, 0, 0, 0, 0, 0, 0, 0, 557056, 557056, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3129, 0, 0, 0, 0, 0, 0, 0, 370, 378, 406, 0, 0, 0, 370, 0, 0, 353, 0, 0, 0, 370, 0, 409, 411, 0, 370, 398, 0, 0, 370, 378, 0, 139264, 147456, 398, 409, 0, 0, 409, 0, 0, 0, 432, 131072, 0, 432, 432, 0, 0, 432, 0, 411, 432, 0, 458, 0, 0, 0, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 508, 508, 508, 508, 520, 508, 508, 508, 520, 508, 508, 508, 508, 508, 508, 537, 57903, 537, 57903, 537, 537, 57903, 537, 537, 57926, 57903, 537, 537, 57903, 57903, 57903, 57926, 57903, 57903, 57903, 57903, 57903, 57903, 57903, 57926, 57926, 57903, 57903, 57953, 57903, 57903, 57903, 57903, 57903, 57903, 57903, 57953, 57953, 57903, 57903, 57903, 57903, 57953, 57953, 57903, 617, 57903, 57968, 57968, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 636, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4017, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 61374, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 774, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 793, 0, 0, 0, 0, 0, 0, 0, 774, 0, 0, 0, 0, 0, 1276, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1288, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3625, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 305, 0, 0, 0, 0, 0, 0, 305, 0, 0, 0, 0, 0, 0, 0, 793, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 687, 0, 0, 0, 774, 0, 0, 0, 0, 793, 0, 0, 0, 0, 0, 0, 0, 793, 0, 0, 0, 0, 774, 0, 793, 0, 521, 832, 521, 521, 521, 521, 521, 521, 863, 865, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 58251, 1151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2342, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1182, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1207, 1296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1290, 1316, 1317, 0, 1290, 521, 521, 521, 521, 521, 521, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 59822, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 59907, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59915, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 521, 1325, 521, 521, 521, 1329, 521, 521, 1340, 521, 521, 1344, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1363, 521, 521, 521, 0, 2895, 0, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 60245, 57886, 57886, 57886, 57886, 60249, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58294, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59483, 57909, 57909, 57909, 57909, 57909, 57909, 59491, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57886, 521, 1367, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2893, 521, 521, 521, 58754, 901, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58764, 57886, 57886, 57886, 58768, 57886, 57886, 58779, 57886, 57886, 58783, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60588, 60589, 57886, 57886, 57886, 57886, 60592, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60598, 57886, 57886, 57886, 57909, 57909, 58878, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58897, 57909, 57909, 57909, 58901, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60367, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59515, 57936, 57936, 57936, 57936, 59521, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59532, 57936, 57936, 57936, 57936, 57936, 57936, 58953, 57936, 57936, 57936, 58957, 57936, 57936, 58968, 57936, 57936, 58972, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58991, 57936, 57936, 57936, 58995, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60399, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 1726, 1727, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 516560, 516560, 516560, 516560, 0, 1786, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1808, 0, 0, 0, 0, 0, 5111808, 0, 0, 0, 0, 0, 5283840, 0, 0, 0, 0, 5472256, 5521408, 0, 0, 0, 0, 5595136, 5709824, 5718016, 0, 5824512, 5865472, 0, 0, 5922816, 0, 0, 6021120, 0, 521, 58754, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59324, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60837, 57886, 60839, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60846, 57886, 57886, 60848, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 50657, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59424, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61181, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60047, 57936, 57936, 57936, 57936, 60052, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57909, 57909, 57909, 57909, 57909, 59442, 59443, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 60907, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59538, 59539, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59556, 57936, 57936, 57936, 57936, 57936, 57936, 59563, 57936, 57936, 521, 521, 521, 59324, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 318, 0, 0, 0, 0, 0, 2384, 0, 0, 2387, 0, 521, 521, 2390, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 60823, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59867, 59868, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59879, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59891, 57909, 57909, 57909, 57909, 57909, 59956, 59957, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59968, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58891, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59457, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59980, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 59992, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3868, 3627, 0, 0, 57936, 57936, 57936, 57936, 57936, 60039, 60040, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60051, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60705, 57936, 57936, 60708, 57936, 57936, 60711, 3368, 521, 521, 60715, 57886, 57886, 0, 0, 0, 0, 0, 57936, 57936, 57936, 60063, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 2732, 2733, 57886, 57886, 57886, 60081, 60082, 0, 0, 1710, 0, 0, 1717, 0, 0, 0, 0, 0, 1728, 1729, 0, 0, 0, 0, 0, 1735, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, 361, 0, 0, 0, 0, 0, 0, 0, 367, 0, 295, 0, 0, 0, 0, 2821, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2827, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2460, 521, 2462, 57886, 60286, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59919, 57909, 57909, 57909, 57909, 57936, 60406, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60418, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59011, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 3194, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3207, 521, 521, 521, 521, 521, 521, 0, 0, 0, 0, 59818, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59826, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60590, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 57909, 60615, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60648, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60002, 57936, 57936, 57936, 57936, 57936, 60697, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 6152192, 0, 0, 0, 6316032, 0, 196608, 0, 0, 5816320, 6291456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2754, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57936, 57936, 57936, 57936, 57936, 61097, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 3760, 57886, 57886, 61106, 3763, 0, 0, 0, 0, 3767, 0, 0, 0, 0, 0, 0, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1167, 0, 0, 0, 0, 1171, 0, 0, 1174, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 3788, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 61147, 57886, 57886, 57886, 61150, 57886, 57886, 57886, 57886, 58274, 57886, 57886, 57886, 57886, 57886, 58293, 57886, 57886, 57886, 57886, 58311, 57886, 57886, 57886, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58350, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59478, 57909, 57909, 57909, 59484, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59494, 57909, 57909, 57909, 57909, 59500, 57909, 57909, 57886, 57886, 57886, 57886, 61241, 57886, 61243, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61257, 57909, 61259, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 61074, 57936, 57936, 57936, 61077, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61085, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59516, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59528, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61470, 57936, 57936, 57936, 0, 4130, 0, 0, 0, 0, 0, 521, 521, 4135, 521, 4136, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 61486, 57886, 61487, 57886, 57886, 57886, 57886, 59340, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59353, 57886, 57886, 57886, 59358, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59914, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 0, 0, 0, 57886, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60709, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 358, 0, 0, 0, 475, 475, 475, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 509, 509, 513, 513, 513, 513, 509, 513, 513, 513, 509, 513, 513, 513, 513, 513, 513, 538, 57904, 538, 57904, 538, 538, 57904, 538, 538, 57927, 57904, 538, 538, 57904, 57904, 57904, 57927, 57904, 57904, 57904, 57904, 57904, 57904, 57904, 57927, 57927, 57904, 57904, 57954, 57904, 57904, 57904, 57904, 57904, 57904, 57904, 57954, 57954, 57904, 57904, 57904, 57904, 57954, 57954, 57904, 618, 57904, 57969, 57969, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 637, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1305, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1288, 0, 521, 521, 1320, 521, 1323, 0, 680, 681, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 367, 0, 0, 0, 0, 0, 0, 0, 0, 702, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 3876, 521, 521, 521, 521, 3880, 521, 521, 521, 521, 521, 3886, 521, 521, 521, 57886, 57886, 57886, 61235, 57886, 57886, 57886, 658, 0, 637, 0, 0, 0, 0, 0, 0, 781, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 790, 0, 795, 0, 0, 0, 0, 0, 0, 637, 0, 0, 781, 521, 833, 521, 521, 521, 521, 854, 858, 864, 521, 869, 521, 521, 521, 521, 521, 887, 521, 521, 521, 521, 57886, 57886, 58252, 0, 790, 0, 795, 0, 781, 0, 807, 0, 0, 0, 0, 807, 0, 0, 0, 0, 0, 637, 0, 0, 0, 0, 0, 0, 0, 0, 781, 0, 0, 0, 0, 0, 0, 1277, 0, 1162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 670, 0, 0, 0, 0, 0, 0, 0, 0, 57909, 57909, 57909, 57909, 57909, 58382, 57909, 57909, 57909, 57909, 0, 0, 0, 0, 57886, 57936, 57936, 58403, 57936, 57936, 57936, 57936, 58424, 58428, 58434, 57936, 58439, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 521, 0, 57886, 57886, 57886, 57886, 57886, 57886, 155941, 1138, 0, 0, 1142, 0, 0, 1147, 0, 0, 0, 0, 0, 0, 0, 311, 0, 0, 0, 0, 0, 310, 0, 310, 311, 0, 310, 310, 311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 310, 408, 311, 0, 0, 0, 0, 0, 0, 311, 413, 0, 0, 139264, 147456, 0, 0, 0, 0, 0, 58457, 57936, 57936, 57936, 57936, 521, 521, 521, 887, 521, 521, 0, 57886, 57886, 57886, 58306, 57886, 57886, 155941, 1138, 0, 301, 0, 0, 305, 0, 0, 0, 0, 0, 0, 0, 0, 2336, 0, 0, 0, 0, 1806, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2292, 2293, 0, 2295, 2296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1152, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1169, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1179, 0, 0, 0, 1183, 1184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 0, 0, 0, 1202, 0, 0, 0, 0, 0, 0, 0, 686, 0, 0, 0, 0, 0, 0, 367, 367, 367, 0, 0, 0, 0, 0, 699, 0, 0, 0, 0, 0, 0, 0, 0, 708, 0, 0, 1243, 0, 0, 0, 0, 0, 0, 1251, 0, 0, 0, 0, 0, 1256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1267, 0, 0, 0, 0, 0, 0, 1301, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 0, 0, 0, 0, 1275, 0, 0, 1152, 0, 0, 0, 1281, 0, 1283, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1291, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 2393, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2405, 521, 521, 521, 521, 521, 521, 0, 1297, 1256, 0, 1281, 1300, 0, 1303, 0, 0, 0, 1183, 0, 0, 0, 0, 1311, 0, 0, 0, 0, 0, 1311, 0, 0, 1202, 1311, 1318, 521, 521, 521, 521, 521, 521, 0, 0, 0, 2473, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61043, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 1324, 521, 521, 521, 521, 1330, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1351, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1364, 521, 521, 521, 0, 2895, 0, 0, 0, 0, 57886, 57886, 57886, 60243, 57886, 60244, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 521, 521, 1369, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1377, 521, 521, 521, 1384, 1386, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2881, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3202, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3208, 521, 521, 521, 521, 1409, 58754, 901, 58756, 57886, 57886, 57886, 57886, 57886, 58763, 57886, 57886, 57886, 57886, 58769, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58790, 57886, 57886, 57886, 57886, 57886, 57886, 59870, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58818, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 58911, 57909, 57909, 57909, 58918, 58920, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58943, 0, 58944, 58945, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59543, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58984, 57936, 57936, 57936, 58987, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58952, 57936, 57936, 57936, 57936, 58958, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58979, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58992, 57936, 57936, 57936, 57936, 58997, 57936, 57936, 57936, 57936, 57936, 59002, 57936, 57936, 57936, 59006, 57936, 57936, 57936, 59013, 59015, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60922, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60395, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59038, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 1138, 0, 0, 0, 1710, 0, 0, 0, 0, 1717, 0, 0, 0, 0, 0, 0, 362, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 734, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1757, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1775, 0, 0, 0, 0, 0, 0, 0, 1783, 1784, 0, 0, 0, 0, 1840, 1841, 0, 0, 0, 1844, 0, 0, 0, 0, 0, 1849, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 581632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 581632, 0, 581632, 581632, 0, 1862, 0, 1864, 1840, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1876, 521, 521, 521, 521, 1882, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2850, 521, 2852, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2427, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1893, 521, 521, 521, 521, 1897, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1910, 521, 521, 521, 1915, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2849, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2429, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 58754, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59319, 57886, 57886, 57886, 57886, 59325, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59336, 50657, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59419, 57909, 57909, 57909, 57909, 59425, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59436, 57909, 57909, 57909, 57909, 57909, 57909, 60653, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61091, 57936, 57909, 57909, 57909, 59440, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59453, 57909, 57909, 57909, 59458, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59936, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59942, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 59536, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59549, 57936, 57936, 57936, 59554, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 2730, 521, 521, 521, 57886, 60079, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 2257, 521, 521, 59604, 57886, 59606, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2277, 2278, 0, 0, 0, 0, 0, 5210112, 0, 5365760, 0, 5554176, 5570560, 5578752, 0, 5668864, 0, 0, 5791744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6201344, 6242304, 6250496, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3443, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1382, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 0, 0, 2383, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2403, 521, 521, 2407, 521, 521, 521, 2411, 57886, 57886, 59842, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59852, 57886, 57886, 57886, 59855, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60609, 57886, 57886, 57886, 57886, 0, 0, 57909, 57909, 57909, 57909, 57909, 60618, 57909, 60619, 57909, 57909, 57909, 57909, 57909, 57886, 57886, 59894, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 2561, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59923, 57909, 57909, 59927, 57909, 57909, 57909, 59931, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59941, 57909, 57909, 57909, 59944, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61180, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 61186, 57936, 57936, 57936, 61190, 57936, 57936, 57936, 57936, 57936, 59978, 57909, 57909, 57909, 57909, 57909, 59983, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60006, 57936, 57936, 60010, 57936, 57936, 57936, 60014, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60024, 57936, 57936, 57936, 60027, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 0, 4076, 0, 4078, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 60061, 57936, 57936, 57936, 57936, 57936, 60066, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2273, 0, 0, 0, 0, 0, 0, 0, 0, 2743, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2753, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3629, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2819, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2826, 0, 0, 0, 0, 0, 0, 521, 521, 2833, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3465, 3467, 521, 521, 521, 3470, 521, 3472, 3473, 521, 57886, 57886, 57886, 57886, 57886, 57886, 60824, 57886, 57886, 57886, 57886, 57886, 2841, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2856, 521, 521, 521, 521, 2859, 521, 521, 2861, 521, 2862, 521, 521, 521, 521, 521, 521, 0, 0, 2472, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59834, 57886, 57886, 59838, 57886, 521, 521, 521, 521, 2870, 521, 521, 2874, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2883, 521, 521, 521, 2886, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3669, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 50657, 58754, 977, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58860, 57909, 57909, 57909, 57909, 57909, 58872, 0, 0, 57909, 57909, 60309, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60317, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61183, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60420, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59008, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59022, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57909, 60332, 57909, 57909, 57909, 57909, 60335, 57909, 57909, 60337, 57909, 60338, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60347, 57909, 57909, 60351, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60655, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 60666, 57936, 57936, 57936, 57936, 57936, 57936, 60673, 57909, 57909, 60360, 57909, 57909, 57909, 60363, 60364, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 60374, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 3096, 521, 521, 57886, 57886, 60443, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 450560, 450560, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 147456, 0, 0, 450560, 0, 0, 57936, 57936, 57936, 60382, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60397, 57936, 57936, 57936, 57936, 60400, 57936, 57936, 60402, 57936, 60403, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61272, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 57886, 0, 0, 0, 0, 0, 0, 0, 3942, 3627, 0, 0, 0, 0, 0, 371, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 371, 0, 0, 0, 379, 381, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1885, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3794, 521, 521, 521, 3795, 3796, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 2559, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60325, 57909, 57909, 57909, 57909, 57909, 57909, 3190, 521, 521, 521, 3193, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1917, 521, 521, 521, 521, 521, 57886, 60581, 57886, 57886, 57886, 60584, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60594, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60838, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 2561, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60630, 57909, 57909, 57909, 60633, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60643, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 0, 0, 0, 57886, 57936, 57936, 57936, 57936, 57936, 57936, 58417, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60920, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 3627, 0, 0, 0, 60674, 57936, 57936, 57936, 57936, 60679, 57936, 57936, 57936, 60682, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60692, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 4072, 4073, 0, 0, 0, 0, 0, 4079, 4080, 4081, 521, 521, 521, 4084, 521, 4086, 521, 521, 521, 521, 61435, 61436, 61437, 3457, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3469, 521, 521, 521, 521, 521, 57886, 57886, 57886, 60821, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60587, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60595, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 2560, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60640, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60883, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60897, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 60905, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61201, 57936, 57936, 521, 521, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3627, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3784, 521, 521, 521, 57936, 60939, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 0, 3610, 0, 0, 0, 0, 0, 0, 0, 3616, 0, 0, 0, 0, 0, 0, 372, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 377, 0, 0, 0, 0, 0, 0, 0, 0, 2824, 2782, 0, 0, 0, 0, 0, 2829, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 2838, 521, 521, 521, 521, 521, 0, 0, 0, 3640, 3641, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3651, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3671, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60612, 57886, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60620, 57909, 57909, 57909, 57909, 521, 3661, 521, 521, 521, 521, 521, 3666, 521, 3668, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61022, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60292, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60303, 57886, 57886, 57886, 57886, 57886, 0, 2962, 0, 0, 57909, 57909, 57909, 57909, 61051, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61061, 57909, 57909, 57909, 57909, 57909, 57909, 61067, 57909, 61069, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58884, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58894, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59938, 57909, 57909, 57909, 57909, 57909, 57909, 59943, 57909, 59945, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 61096, 57936, 61098, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 3765, 0, 0, 0, 0, 0, 0, 0, 0, 2363, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2374, 0, 0, 0, 0, 0, 0, 0, 0, 0, 656, 0, 0, 659, 660, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 671, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3770, 0, 0, 0, 0, 0, 0, 0, 3627, 0, 0, 0, 0, 0, 3779, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3786, 521, 521, 521, 3790, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3799, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 61148, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60867, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60880, 57909, 57909, 61152, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61161, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 61167, 57909, 57909, 57909, 61171, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61053, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59459, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61438, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61446, 57886, 57909, 57909, 57909, 61451, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61459, 57909, 57936, 57936, 57936, 61464, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59576, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57936, 57936, 57936, 57936, 57936, 61472, 57936, 0, 0, 0, 0, 4131, 0, 4133, 521, 521, 521, 521, 521, 521, 521, 521, 521, 4139, 4140, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61445, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61458, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60919, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60929, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 4088, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 61490, 61491, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61498, 61499, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61506, 61507, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61415, 0, 0, 4074, 4075, 0, 0, 0, 521, 521, 521, 4082, 521, 521, 521, 521, 521, 521, 521, 521, 4090, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 60865, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61184, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61189, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 0, 521, 4220, 57886, 61565, 57909, 61566, 57936, 61567, 521, 57886, 57909, 57936, 521, 521, 521, 521, 521, 521, 521, 1899, 1900, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3800, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 425, 425, 0, 0, 131072, 425, 0, 0, 0, 425, 0, 0, 447, 0, 425, 0, 476, 476, 476, 0, 0, 361, 361, 361, 495, 361, 361, 361, 361, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 476, 539, 57905, 539, 57905, 539, 539, 57905, 539, 539, 57928, 57905, 539, 539, 57905, 57905, 57905, 57928, 57905, 57905, 57905, 57905, 57905, 57905, 57905, 57928, 57928, 57905, 57905, 57955, 57905, 57905, 57905, 57905, 57905, 57905, 57905, 57955, 57955, 57905, 57905, 57905, 57905, 57955, 57955, 57905, 539, 57905, 57905, 57905, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 376832, 0, 376832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1854, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57909, 58369, 57909, 57909, 57909, 57909, 58387, 57909, 57909, 57909, 0, 0, 0, 0, 58293, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58425, 57936, 57936, 57936, 57936, 57936, 58444, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60069, 57936, 57936, 57936, 57936, 2729, 521, 521, 521, 521, 60078, 57886, 57886, 57886, 57886, 2739, 2266, 0, 2740, 2269, 0, 0, 2742, 57936, 58462, 57936, 57936, 57936, 521, 521, 521, 521, 892, 521, 0, 57886, 57886, 57886, 57886, 58311, 57886, 155941, 1138, 0, 1139, 0, 0, 1144, 0, 0, 0, 0, 0, 1150, 0, 0, 0, 0, 0, 5341184, 0, 5652480, 0, 0, 0, 0, 4759552, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1827, 0, 0, 0, 0, 0, 0, 0, 1834, 0, 0, 0, 0, 0, 0, 1244, 0, 0, 0, 0, 1249, 0, 0, 0, 1253, 0, 0, 0, 0, 0, 0, 0, 1253, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 466944, 0, 0, 0, 0, 0, 0, 0, 0, 1825, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, 354, 355, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 295, 0, 521, 521, 521, 1327, 521, 521, 521, 1336, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2895, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60574, 57886, 57886, 60578, 57886, 521, 521, 521, 58754, 901, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58766, 57886, 57886, 57886, 58775, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61034, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 61042, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 61047, 57909, 57936, 57936, 57936, 57936, 57936, 58955, 57936, 57936, 57936, 58964, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59555, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 521, 521, 1931, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1953, 521, 521, 521, 521, 521, 521, 0, 2470, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59839, 521, 58754, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59333, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 60864, 57909, 57909, 57909, 57909, 60868, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60874, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 0, 0, 0, 57886, 57936, 57936, 58402, 57936, 57936, 57936, 57936, 57936, 57936, 58433, 58435, 57936, 57936, 57936, 57936, 57936, 57936, 50657, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59433, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59986, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60001, 57936, 57936, 60004, 57936, 57936, 57909, 57909, 57909, 57909, 57909, 59474, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59486, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59497, 57909, 57909, 57909, 57909, 57909, 57886, 57886, 57886, 57886, 59372, 57886, 57886, 59375, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59389, 57886, 57886, 57886, 57886, 57886, 57886, 59395, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59872, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 60304, 57886, 57886, 57886, 0, 2962, 0, 0, 57936, 57936, 57936, 57936, 59570, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59582, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59593, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 521, 0, 57886, 57886, 57886, 57886, 57886, 57886, 293, 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3119, 0, 3120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3135, 0, 0, 0, 0, 2283, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2301, 0, 0, 0, 0, 2359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 336, 0, 0, 0, 0, 57886, 59841, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59863, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 59930, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 57886, 57936, 57936, 58947, 57936, 57936, 57936, 57936, 57936, 57936, 60013, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59589, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 0, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60313, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58931, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 0, 57886, 57936, 57936, 57936, 57936, 60626, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 1259, 57886, 57936, 57936, 57936, 57936, 57936, 60675, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59524, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57886, 57886, 57886, 61155, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 61174, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61193, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 61100, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 57886, 57886, 57886, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 367, 0, 0, 0, 0, 0, 0, 0, 1205, 0, 0, 57936, 57936, 57936, 57936, 61471, 57936, 57936, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 57886, 57886, 57936, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57936, 57936, 57886, 57886, 57886, 57886, 57936, 57936, 57886, 521, 57886, 57886, 57886, 372, 372, 0, 0, 131072, 372, 0, 0, 0, 372, 0, 0, 0, 0, 372, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 57906, 57906, 57906, 57906, 57906, 57906, 57906, 57929, 57929, 57906, 57906, 57956, 57906, 57906, 57906, 57906, 57906, 57906, 57906, 57956, 57956, 57906, 57906, 57906, 57906, 57956, 57956, 57906, 540, 57906, 57906, 57906, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2334720, 0, 2334720, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 2834, 2835, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 58267, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 57909, 57909, 57909, 57909, 57909, 57909, 58343, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 61179, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 57936, 61187, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 301, 305, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1282, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2758, 2759, 0, 0, 2762, 0, 2764, 0, 0, 0, 0, 0, 521, 521, 521, 58754, 901, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58780, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 57909, 57909, 59909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60658, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 57936, 57936, 60667, 57936, 60668, 57936, 57936, 57936, 57936, 58875, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59947, 57909, 57909, 57909, 57909, 57909, 0, 0, 0, 3771, 0, 3772, 0, 0, 0, 0, 3627, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3657, 521, 521, 521, 521, 521, 521, 0, 0, 0, 363, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 0, 245760, 0, 0, 0, 363, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 363, 0, 364, 0, 0, 0, 0, 363, 0, 0, 0, 139264, 147456, 0, 0, 0, 0, 0, 0, 653, 654, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1858, 0, 0, 0, 0, 0, 0, 0, 0, 0, 433, 131072, 0, 433, 433, 0, 0, 433, 0, 364, 433, 0, 459, 0, 0, 0, 487, 487, 490, 490, 490, 490, 496, 497, 490, 490, 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 541, 57907, 541, 57907, 541, 541, 57907, 541, 541, 57930, 57907, 541, 541, 57907, 57907, 57907, 57930, 57907, 57907, 57907, 57907, 57907, 57907, 57907, 57930, 57930, 57907, 57907, 57957, 57907, 57907, 57907, 57907, 57907, 57907, 57907, 57957, 57957, 57907, 57907, 57907, 57907, 57957, 57957, 57907, 619, 57907, 57970, 57970, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1762, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1239, 1806, 0, 0, 0, 0, 1246, 1246, 0, 0, 57909, 57909, 57909, 57909, 57909, 58383, 57909, 57909, 57909, 57909, 0, 0, 0, 0, 57886, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60688, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58458, 57936, 57936, 57936, 57936, 521, 521, 521, 888, 521, 521, 0, 57886, 57886, 57886, 58307, 57886, 57886, 155941, 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1794, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1806, 0, 0, 0, 0, 0, 0, 0, 0, 1272, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3402, 2768, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2318336, 57909, 57909, 57909, 57909, 57909, 60334, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60344, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57886, 57886, 57886, 58268, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 57909, 57909, 57909, 57909, 57909, 57909, 58344, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 58393, 0, 0, 0, 0, 57886, 57936, 57936, 57936, 57936, 58409, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59517, 59518, 57936, 57936, 57936, 57936, 59525, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 1240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2792, 0, 521, 1368, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1395, 521, 521, 521, 521, 521, 521, 521, 521, 2875, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 58834, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 50657, 58754, 977, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60895, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 60903, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 58996, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59024, 57936, 57936, 57936, 57936, 57936, 521, 521, 521, 521, 521, 521, 0, 57886, 57886, 57886, 57886, 57886, 57886, 155941, 1138, 0, 301, 0, 0, 305, 0, 0, 0, 0, 0, 0, 0, 0, 1216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1232, 0, 0, 0, 0, 0, 0, 0, 0, 1304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 3178, 521, 3179, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2469, 0, 0, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59883, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 521, 521, 521, 2844, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2434, 521, 521, 57936, 57936, 57936, 57936, 57936, 57936, 60385, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 59522, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 640, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 893, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57909, 57909, 60862, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60879, 57909, 60881, 57909, 57936, 58463, 57936, 57936, 57936, 1126, 521, 521, 521, 893, 521, 0, 57886, 58477, 57886, 57886, 58312, 57886, 155941, 1138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1817, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, 0, 0, 0, 331, 521, 58754, 0, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 59326, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 0, 57909, 59908, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60343, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 50657, 0, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59426, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 59961, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 60346, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 521, 521, 521, 521, 2415, 521, 2417, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2432, 521, 521, 521, 521, 521, 521, 2867, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1923, 57936, 57936, 57936, 57936, 60409, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 60423, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 3660, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 57886, 0, 0, 0, 2562, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57909, 57936, 57936, 57936, 61185, 57936, 57936, 57936, 61188, 57936, 57936, 57936, 57936, 57936, 57936, 57936, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 443, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2310144, 0, 0, 2310144, 0, 0, 0, 0, 0, 0, 0, 2310144, 0, 2310144, 0, 0, 0, 0, 0, 0, 2310144, 2310560, 2310560, 0, 2310144, 0, 0, 2310144, 0, 0, 0, 0, 0, 0, 2310144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2310144, 0, 0, 0, 0, 0, 0, 2310144, 0, 0, 0, 0, 0, 0, 654, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2310144, 0, 367, 0, 0, 0, 0, 0, 0, 0, 2310560, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 380, 0, 383, 0, 0, 0, 0, 0, 0, 2310144, 0, 0, 0, 2310144, 0, 0, 0, 0, 0, 2310144, 0, 0, 2310144, 0, 0, 2310144, 0, 2310144, 2310144, 0, 2310144, 0, 2310144, 2310144, 0, 0, 0, 0, 0, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 3445, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1347, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 1362, 521, 521, 2310144, 0, 0, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310733, 2310144, 2310733, 2310144, 2310144, 2310733, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2310, 0, 0, 0, 0, 0, 0, 0, 0, 2318, 0, 0, 0, 0, 0, 2322, 0, 0, 2324, 0, 0, 0, 0, 0, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 839, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 898, 57886, 57886, 57886, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 460, 2335197, 2335197, 2335197, 460, 460, 460, 460, 460, 460, 460, 460, 460, 460, 2335231, 2335231, 2335231, 2335231, 2335231, 2335231, 2335231, 2335231, 2335231, 2335231, 2335231, 2335231, 2335231, 2335231, 2335231, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3392, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3399, 3400, 0, 3401, 0, 2335231, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2750, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2763, 0, 0, 0, 0, 0, 2767, 0, 0, 0, 0, 417, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2359296, 0, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 2359296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3416, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2359296, 1, 24578, 3, 0, 0, 4366336, 0, 0, 0, 0, 0, 301, 302, 0, 4268032, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2798, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2813, 0, 0, 0, 0, 2367488, 0, 0, 4268032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 367, 0, 295, 0, 0, 0, 0, 0, 6275072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 976, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 0, 0, 0, 0, 0, 0, 521, 521, 521, 2391, 2392, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 521, 2855, 521, 521, 521, 521, 521, 521, 521, 2860, 521, 521, 521, 521, 521, 521, 521, 521, 0, 1, 24578, 3, 155941, 155941, 295, 0, 0, 0, 0, 0, 301, 302, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3134, 0, 0, 212992, 0, 0, 0, 0, 0, 4366336, 0, 0, 0, 0, 0, 0, 0, 0, 4268032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 382, 0, 0, 6258688, 6447104, 0, 0, 6127616, 0, 6348800, 5906432, 0, 5537792, 0, 0, 0, 0, 0, 5939200, 0, 0, 5677056, 6365184, 4866048, 0, 6070272, 5545984, 5152768, 0, 0, 6144000, 4358144, 4866048, 4882432, 4358144, 4358144, 4358144, 0, 1411, 0, 0, 0, 0, 0, 4857856, 4874240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5259264, 0, 0, 0, 0, 0, 0, 0, 0, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 900, 900, 900, 5537792, 5545984, 5586944, 5734400, 5971968, 4358144, 6045696, 4358144, 6070272, 4358144, 4358144, 4358144, 4358144, 6348800, 4358144, 6144000, 0, 6144000, 0, 4988928, 5005312, 0, 0, 0, 0, 5775360, 0, 0, 0, 0, 0, 0, 0, 750, 808, 0, 0, 0, 750, 0, 0, 811, 692, 0, 0, 0, 816, 0, 0, 0, 818, 0, 0, 0, 685, 692, 0, 0, 4358144, 5005312, 4358144, 4358144, 4358144, 5120000, 5136384, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 4358144, 6324224, 5914624, 5914624, 0, 0, 0, 0, 0, 5513216, 5783552, 0, 0, 0, 0, 0, 0, 656, 0, 779, 0, 0, 0, 0, 0, 0, 0, 783, 0, 0, 0, 0, 792, 0, 0, 0, 0, 0, 800, 0, 783, 0, 0
+];
+
+JSONiqParser.EXPECTED =
+[ 166, 182, 211, 1104, 242, 1452, 1467, 273, 289, 712, 1117, 319, 349, 333, 365, 381, 397, 413, 195, 1866, 2240, 2243, 2234, 2234, 2234, 2234, 2234, 2234, 2234, 2234, 2234, 2234, 2234, 429, 445, 461, 477, 2088, 226, 493, 2075, 939, 621, 523, 543, 1716, 559, 575, 591, 607, 1422, 650, 666, 1822, 697, 1565, 634, 728, 738, 754, 796, 812, 828, 844, 860, 876, 892, 908, 924, 955, 2180, 985, 681, 2211, 1015, 1044, 1028, 1060, 1090, 1133, 1320, 1149, 1165, 1551, 1181, 1197, 1213, 1229, 1259, 1904, 1365, 1375, 999, 969, 1762, 1289, 1305, 1336, 1351, 1488, 1391, 1407, 1504, 1623, 1520, 1536, 1581, 1273, 1610, 1639, 1655, 1671, 2118, 2149, 1687, 1703, 1437, 507, 1732, 1748, 1778, 1074, 780, 1809, 1838, 1854, 1890, 1920, 1936, 1952, 1968, 1984, 2000, 2016, 2032, 2061, 257, 2104, 303, 2045, 767, 1793, 1594, 2134, 1243, 2165, 2196, 2227, 2234, 1874, 1479, 2234, 2234, 2234, 2234, 2234, 2234, 2234, 2234, 2234, 2234, 2234, 2234, 2234, 2234, 536, 2259, 2263, 2271, 2271, 2271, 2265, 2269, 2271, 2272, 2276, 2279, 2286, 2282, 2290, 2294, 2298, 2302, 2306, 2310, 2381, 2790, 2790, 4003, 4941, 2790, 2791, 2314, 3074, 2982, 2790, 2790, 2790, 2687, 2790, 5013, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2827, 2790, 2571, 3537, 4080, 2436, 2320, 2443, 2466, 2326, 2336, 2790, 2790, 2790, 2343, 2790, 2790, 2349, 3841, 2707, 2790, 2734, 2759, 2790, 2790, 2790, 2790, 4756, 2738, 2790, 2790, 2790, 2790, 4767, 2321, 2390, 2466, 2466, 2466, 2466, 2355, 2361, 2790, 2790, 2790, 2790, 2790, 2371, 4535, 2790, 2696, 4816, 2790, 2790, 2790, 2697, 4817, 2790, 2790, 2790, 4822, 4790, 2790, 2790, 3017, 3842, 2448, 2790, 2790, 3537, 4079, 4079, 4079, 4079, 4079, 4099, 2436, 2436, 2436, 2436, 2436, 2387, 2321, 2321, 2321, 2321, 2321, 2459, 2466, 2466, 2466, 2466, 2466, 2332, 2401, 2790, 2790, 2762, 4873, 2790, 2790, 2790, 2790, 2820, 4885, 2790, 2790, 2790, 2790, 3243, 4891, 3542, 4079, 4079, 4079, 4097, 2436, 2436, 2436, 2436, 2458, 2321, 2321, 2321, 2331, 2466, 2466, 2426, 2790, 2790, 3074, 4076, 4079, 4079, 2396, 2436, 2482, 2321, 2321, 2464, 2466, 2466, 2411, 2790, 2790, 4535, 2790, 4077, 4079, 4079, 2480, 2436, 2436, 2457, 2321, 2321, 2420, 2467, 2428, 2834, 3536, 4079, 2434, 2436, 2441, 2321, 2465, 2332, 2447, 4095, 4081, 2437, 2376, 2466, 2452, 4078, 2436, 2321, 2466, 4335, 4081, 2456, 2463, 2422, 4080, 2482, 2463, 2471, 4098, 2483, 2331, 2478, 2329, 2487, 2491, 2474, 2495, 2498, 2508, 2512, 2519, 2519, 2519, 2515, 2525, 2519, 2521, 2529, 2536, 2532, 2540, 2544, 2548, 2552, 2556, 2560, 4697, 2790, 2790, 2790, 4729, 2790, 4591, 2584, 2858, 2790, 2790, 2790, 3364, 2591, 2790, 3610, 2603, 2609, 2613, 2617, 2621, 2625, 2628, 2632, 2636, 4053, 2702, 2790, 2790, 2790, 2790, 3877, 2642, 2648, 2892, 4432, 2646, 2915, 2367, 2654, 3828, 2813, 2790, 2652, 3406, 2659, 2664, 2790, 2790, 2790, 2790, 2790, 2671, 4434, 2580, 4063, 2790, 2676, 2680, 2790, 2790, 2790, 3867, 2684, 2790, 2790, 2790, 3868, 2685, 2750, 2790, 2790, 2790, 2790, 2756, 2760, 2790, 2790, 2790, 2790, 2790, 2880, 2666, 2790, 2790, 2777, 4228, 3359, 2851, 4232, 4238, 2790, 4246, 4420, 4253, 3266, 4258, 4264, 3443, 2790, 4721, 2782, 2790, 2790, 2790, 3228, 3232, 2790, 2790, 2790, 2790, 4105, 2790, 2790, 2790, 2790, 2790, 2790, 3903, 3876, 2788, 4641, 2790, 2790, 2790, 3307, 2790, 2790, 2790, 4640, 2818, 2790, 2790, 3306, 2795, 2935, 2812, 2790, 2790, 2744, 2790, 3875, 3239, 2817, 2790, 4088, 2790, 2790, 2824, 2790, 3502, 2818, 2790, 3007, 2790, 3959, 3750, 2960, 2745, 3748, 2790, 4626, 2790, 4622, 2667, 2940, 2842, 3754, 2902, 4615, 2840, 3753, 3753, 3753, 4616, 2838, 4624, 4624, 3006, 3753, 2841, 2903, 2719, 3291, 3292, 3752, 2941, 2998, 3000, 2847, 2790, 2790, 2790, 2790, 2790, 3322, 3326, 2790, 2790, 2790, 3241, 4802, 2775, 4735, 2782, 2790, 2790, 2790, 4802, 3231, 2790, 2790, 2790, 2771, 4780, 3110, 4601, 2790, 3607, 2790, 3763, 3555, 2886, 2973, 2790, 3980, 2790, 3666, 2790, 4542, 2416, 2884, 2890, 2896, 2907, 4569, 2911, 2790, 2919, 5035, 2790, 2913, 2925, 2790, 4599, 2686, 2790, 3665, 2790, 4541, 3125, 4330, 4429, 2929, 2934, 2939, 3953, 2790, 2790, 4197, 3440, 2790, 2790, 2790, 2790, 4592, 3426, 2790, 2790, 2790, 2790, 2790, 4860, 2951, 2790, 3324, 2790, 2790, 3609, 3761, 2790, 4016, 2955, 2741, 2842, 2790, 4742, 2959, 2790, 2790, 4535, 2790, 2790, 4096, 4079, 4079, 4079, 4079, 2435, 2436, 2436, 2436, 2436, 2437, 2980, 2790, 2790, 2790, 2790, 2802, 2989, 2790, 2790, 2790, 2790, 2801, 2988, 2790, 2790, 2790, 4818, 4810, 3928, 2790, 3608, 3761, 2316, 2993, 3004, 2790, 3011, 3032, 2790, 2790, 2790, 4503, 3015, 2790, 2790, 2790, 2790, 3011, 3032, 2790, 2790, 2790, 2790, 2790, 3026, 4920, 2790, 2790, 2790, 2790, 3025, 4919, 2790, 2790, 2790, 2790, 2790, 4355, 3755, 4359, 2790, 2790, 3354, 3059, 4366, 4372, 4240, 2834, 4504, 3016, 2790, 2790, 3635, 3927, 3023, 3031, 4541, 3436, 3037, 3854, 3044, 2790, 2790, 3451, 3049, 2790, 2790, 3024, 3043, 2790, 2790, 2801, 3048, 2790, 2790, 3053, 3064, 3031, 4492, 3071, 2975, 3079, 2790, 3470, 3088, 2790, 3421, 3079, 2790, 2801, 3098, 2790, 4152, 3102, 3109, 2574, 3114, 3122, 2790, 4585, 3124, 2790, 3129, 2790, 4584, 3123, 2790, 4154, 3033, 3133, 4950, 3518, 3142, 4948, 4952, 3148, 2790, 4155, 3156, 3188, 3160, 3150, 4950, 3167, 3186, 3174, 3174, 3174, 3180, 3184, 3192, 3192, 3196, 3200, 3175, 3209, 3433, 3213, 3176, 3861, 3217, 3221, 4494, 3225, 3236, 3247, 2790, 2790, 2790, 2790, 3914, 2790, 2790, 3253, 3263, 3403, 3170, 3479, 3270, 3274, 3278, 3282, 3285, 3285, 3286, 2790, 2790, 3913, 2790, 3549, 3337, 3848, 3342, 3290, 3496, 2655, 3296, 3300, 3311, 3318, 4953, 3330, 4637, 2790, 3320, 2790, 2790, 3659, 2790, 2790, 3336, 2790, 2790, 4722, 2770, 2790, 2790, 2790, 2790, 4722, 2770, 2790, 2790, 2790, 2790, 2790, 4190, 3341, 3484, 3460, 3144, 3346, 3363, 3369, 2976, 3375, 2790, 2790, 2790, 3383, 3388, 2790, 2790, 2790, 3472, 2790, 2790, 2790, 4413, 2790, 4305, 3786, 4825, 2790, 2790, 2364, 2790, 3482, 3486, 2790, 3416, 3420, 2790, 4591, 3425, 2790, 2790, 2790, 2790, 2672, 3430, 2790, 2790, 2790, 3769, 2790, 2790, 2790, 2790, 3471, 3736, 2790, 2790, 2790, 2790, 3776, 2790, 3469, 2790, 2790, 2790, 2790, 4198, 3468, 2790, 2790, 2790, 2790, 4198, 3468, 2790, 2790, 2790, 2790, 2921, 3506, 2790, 2790, 2790, 4591, 3513, 2790, 2790, 2790, 3724, 2660, 2790, 4124, 3542, 3476, 3490, 3494, 3634, 3500, 2790, 2921, 3506, 2790, 2790, 2790, 2790, 3512, 3517, 3522, 2833, 3204, 2790, 3527, 2790, 2790, 2790, 4249, 2790, 2790, 2790, 3526, 2790, 2790, 2790, 3821, 2761, 2790, 2790, 2790, 2790, 4347, 2686, 2790, 2790, 2790, 2790, 4351, 2790, 4248, 2790, 2790, 2790, 3531, 3517, 3412, 2790, 2790, 4987, 2790, 2790, 2563, 2790, 2790, 2790, 4094, 4079, 4079, 4079, 4079, 2435, 2436, 2436, 2436, 2397, 2321, 2321, 2321, 2321, 2321, 2464, 2466, 2466, 2466, 2466, 2393, 2405, 2790, 2790, 2833, 2790, 4987, 2790, 2790, 4422, 2790, 2790, 4126, 4322, 3032, 2790, 4987, 2790, 3390, 4989, 2790, 2605, 2730, 2790, 3541, 3547, 4788, 3547, 2566, 2566, 2566, 4894, 4014, 4014, 4014, 4788, 2832, 3553, 2315, 4875, 2567, 4015, 4896, 2830, 2899, 3559, 3560, 3564, 2790, 2790, 2790, 2790, 2790, 3615, 3614, 2790, 2790, 4465, 3917, 2585, 3619, 3625, 3737, 4266, 4915, 3629, 3649, 4306, 3633, 3639, 3647, 3653, 2790, 2790, 4691, 3658, 2790, 4464, 3916, 2790, 3663, 2722, 3670, 3674, 4193, 4196, 2790, 3690, 2790, 2790, 2790, 2382, 3694, 2790, 2790, 2790, 2383, 3695, 2790, 2790, 2790, 2339, 3143, 2790, 2790, 2790, 4517, 2790, 2965, 4474, 4719, 4065, 4703, 2578, 3699, 3704, 2790, 2790, 3118, 2790, 2790, 2790, 4999, 2790, 4869, 4984, 5004, 2752, 2790, 2790, 3118, 2790, 4317, 3723, 2790, 2790, 2790, 2790, 4391, 3711, 2790, 2790, 2790, 2790, 3716, 3847, 2790, 2790, 3259, 2790, 2790, 2790, 2790, 2790, 3258, 2783, 2790, 2790, 2790, 2790, 3258, 2783, 3791, 2725, 2790, 3795, 2790, 2790, 3803, 2790, 2790, 3810, 2790, 2790, 2638, 2790, 4782, 3202, 2716, 3818, 2790, 3795, 2790, 4584, 3812, 2790, 2351, 2790, 2790, 3811, 2790, 3825, 3838, 2790, 2790, 4988, 2790, 3725, 4875, 2790, 2414, 2790, 3535, 4942, 2790, 2430, 2790, 4323, 4014, 3846, 3205, 3847, 4039, 2790, 2713, 2790, 3852, 3683, 3067, 3104, 2790, 3685, 4305, 3685, 3915, 3915, 3105, 3683, 3683, 3683, 3066, 3331, 3105, 3332, 3331, 3332, 3684, 3256, 2790, 2790, 3371, 3735, 2790, 2790, 2790, 2790, 3421, 3742, 2790, 2790, 2790, 2790, 2790, 3741, 2790, 2790, 2790, 2790, 3746, 2790, 3759, 2703, 3621, 4113, 3881, 3885, 3889, 3893, 3894, 3898, 3902, 2790, 2790, 3162, 2790, 2790, 3643, 2983, 4501, 4562, 3907, 3765, 4282, 3921, 2790, 4554, 4022, 2790, 3925, 3932, 4556, 3936, 2790, 4242, 3941, 2790, 2855, 2784, 3943, 4375, 4402, 2862, 2866, 2870, 2874, 2874, 2875, 2879, 2819, 3325, 2790, 2778, 2790, 4182, 4960, 4187, 2504, 5007, 4203, 4207, 4211, 4215, 4219, 4222, 4224, 2790, 2790, 4077, 4079, 4079, 4079, 4079, 4079, 2396, 2436, 2436, 2436, 2436, 2436, 2375, 2321, 2321, 2321, 2322, 2466, 2466, 2466, 2466, 2466, 2332, 2357, 2380, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 3204, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 3163, 2790, 2790, 2746, 3858, 4848, 4930, 3872, 3642, 4579, 2727, 4118, 2315, 3764, 3947, 3951, 2790, 2790, 3814, 3957, 2790, 2790, 2790, 3967, 3350, 2984, 2729, 3978, 3548, 3984, 3961, 2790, 2790, 3813, 3988, 2790, 2790, 2790, 2790, 3686, 4027, 2790, 2790, 2790, 2790, 3257, 4051, 2790, 3074, 2790, 2790, 4299, 3993, 2790, 4007, 2790, 2984, 2790, 3568, 3575, 4260, 3583, 3587, 3591, 3594, 3597, 3600, 3601, 3605, 2790, 2790, 2790, 4750, 2964, 2790, 2790, 2790, 2790, 2969, 2761, 2790, 2790, 2790, 2790, 4743, 2790, 4834, 2790, 3348, 4604, 4013, 4070, 4311, 4020, 2790, 2790, 2790, 4026, 2790, 2790, 2790, 2790, 3578, 4964, 2790, 2790, 2790, 2790, 4969, 2790, 2790, 2790, 2790, 3579, 2790, 4031, 2790, 4037, 2790, 4043, 2789, 4333, 4571, 4021, 2790, 2790, 4362, 2790, 2790, 2790, 2790, 3968, 4183, 2790, 2790, 4271, 3972, 4033, 2790, 2790, 4832, 2790, 2796, 2790, 4360, 3993, 2790, 2790, 2790, 2790, 4049, 2790, 2790, 2790, 2790, 4361, 2761, 4510, 4241, 4057, 4254, 4773, 4069, 4439, 2790, 2790, 4976, 2790, 2790, 2790, 4457, 2761, 2790, 2790, 4485, 3989, 2790, 2790, 4456, 4074, 3731, 4836, 4254, 4085, 4092, 3707, 2790, 4060, 2790, 2790, 4060, 4147, 4132, 4140, 4134, 4843, 2501, 4130, 4921, 4921, 4921, 4291, 4135, 4132, 4132, 4132, 4139, 4922, 4135, 4144, 4922, 4923, 4133, 4159, 4169, 4171, 4166, 4163, 4175, 4178, 2790, 2790, 2790, 2800, 2790, 2746, 3958, 4087, 2818, 2790, 3314, 2806, 2790, 3502, 2818, 2790, 2790, 4270, 3039, 4275, 2790, 2790, 2790, 4279, 3358, 2850, 4286, 4295, 2790, 3397, 3607, 4303, 4310, 2790, 2790, 4965, 4315, 2790, 2790, 2790, 3378, 4321, 2790, 2790, 2790, 3379, 2790, 2790, 3472, 2790, 2790, 2790, 2345, 3847, 2790, 2790, 3471, 3736, 2790, 4603, 2790, 4305, 2790, 4812, 4327, 4339, 2790, 2790, 3352, 3356, 2996, 4343, 3937, 4297, 4995, 4476, 2843, 2790, 3025, 4927, 2790, 2790, 4934, 2406, 2599, 4938, 5023, 4946, 2790, 2790, 2790, 2790, 4957, 4381, 4359, 2790, 2790, 2790, 3806, 4389, 2790, 2790, 2790, 2790, 3963, 4396, 2790, 2790, 2790, 2946, 2790, 2790, 2790, 3712, 2947, 2790, 2790, 2790, 4234, 3973, 2790, 2790, 2790, 3962, 4395, 2790, 2790, 2790, 2790, 3962, 4395, 3755, 4359, 2790, 3056, 3060, 4368, 3960, 4535, 4377, 2790, 2790, 2790, 2808, 4400, 2790, 2790, 2790, 2790, 4406, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 4708, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 3152, 3203, 2790, 2790, 2790, 2790, 2790, 3963, 4411, 2790, 2790, 2790, 2807, 4407, 4446, 2790, 4417, 2942, 4426, 3654, 3761, 2790, 2790, 3720, 2790, 2790, 2790, 2790, 2790, 3729, 2790, 4472, 2790, 2586, 3787, 3138, 2790, 4862, 4438, 2790, 2790, 2807, 4451, 2790, 2790, 2790, 4443, 2790, 2790, 2790, 4450, 4689, 3400, 2942, 4455, 4536, 4484, 2790, 4461, 2790, 2790, 4469, 2790, 2790, 4480, 2790, 2790, 3779, 4523, 4489, 4498, 3654, 4483, 2790, 4508, 2790, 5040, 4002, 2790, 4514, 2790, 2790, 4521, 4525, 4529, 4540, 4384, 4590, 4385, 2790, 4514, 2790, 4547, 4551, 2790, 3997, 4560, 4566, 3999, 4575, 3995, 4009, 4009, 4009, 4583, 4589, 4001, 4001, 4596, 3680, 4608, 4879, 4613, 4620, 4609, 4877, 2407, 3782, 4792, 4793, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 3018, 4630, 4634, 4645, 4649, 4653, 4657, 4661, 4665, 4669, 4672, 4676, 4679, 4683, 2790, 2790, 2790, 3017, 4695, 4542, 4761, 4701, 4577, 4906, 4707, 4712, 4716, 4727, 2790, 3832, 2594, 3075, 4733, 3830, 4739, 2790, 2790, 2790, 3019, 4842, 2597, 4900, 4904, 4853, 4912, 2790, 2790, 2790, 2790, 2790, 3027, 4747, 4754, 4760, 4765, 4771, 4777, 4786, 4797, 4801, 2790, 2790, 2790, 2790, 4807, 2790, 2790, 3876, 4543, 4150, 2930, 2766, 2790, 2790, 2790, 2790, 2790, 4723, 2790, 2790, 2790, 2691, 2790, 2790, 2790, 3094, 2695, 2701, 2790, 2790, 2790, 2790, 3508, 2790, 4840, 2406, 4847, 4803, 4111, 4852, 4857, 4914, 2790, 2790, 2790, 2790, 2696, 4866, 2790, 2790, 3910, 2790, 2790, 4686, 4531, 4887, 3772, 3082, 3706, 2790, 4289, 2790, 3974, 3915, 4973, 2790, 4980, 4984, 5018, 4907, 4994, 2790, 2790, 2801, 4830, 2790, 2790, 2790, 5000, 2790, 3091, 2790, 2790, 4103, 4533, 4109, 3084, 2790, 4117, 4908, 2790, 3303, 2790, 4122, 3249, 2790, 4999, 2790, 2790, 4828, 2790, 2790, 3571, 2790, 5011, 5017, 5022, 2790, 2790, 3799, 2790, 3384, 3389, 2790, 2790, 5029, 3394, 2790, 2790, 2790, 2790, 4881, 2790, 3543, 3449, 3410, 3116, 5028, 2790, 3798, 2790, 2790, 5027, 3365, 3864, 2790, 4990, 2790, 4045, 2790, 2710, 2790, 3447, 4603, 3455, 3459, 3700, 3677, 2790, 2790, 3464, 2790, 2790, 2790, 2790, 2790, 4199, 5033, 3136, 2790, 4383, 5039, 2587, 3834, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2578, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 6090, 6563, 5044, 5057, 5054, 6594, 6596, 6596, 6596, 6591, 5074, 6595, 6596, 6596, 6596, 6596, 5087, 5061, 5074, 6596, 6596, 5067, 5062, 6596, 5078, 5084, 5080, 5066, 6594, 6163, 5071, 5091, 5094, 5094, 5094, 5095, 5099, 5099, 5103, 5107, 5114, 5111, 5118, 5122, 5134, 5137, 5129, 5130, 5127, 5125, 5141, 5145, 6561, 6446, 5234, 5173, 5635, 5635, 5635, 5219, 5598, 5503, 5251, 5251, 5251, 5251, 5252, 5196, 5267, 6248, 5502, 5251, 5251, 5196, 5196, 5196, 5266, 5202, 5212, 5632, 5635, 5050, 6519, 6509, 5635, 6818, 5635, 5635, 5146, 5150, 6535, 5218, 5635, 5635, 5147, 5154, 5196, 5267, 5268, 5502, 5213, 5214, 5232, 5214, 5631, 5635, 5146, 5151, 5635, 5155, 5619, 6297, 5635, 6532, 6536, 5244, 5250, 5251, 5251, 5251, 5295, 5631, 5633, 5635, 5635, 5635, 5049, 6518, 5502, 5502, 5293, 5251, 5251, 5226, 5196, 5196, 6247, 5270, 5502, 5502, 5502, 5504, 5268, 5502, 5214, 5633, 5282, 5635, 5635, 5635, 5273, 6084, 5196, 5267, 5271, 5635, 5166, 5635, 5635, 5749, 5219, 5251, 5296, 5196, 5196, 5306, 5635, 5196, 5265, 5269, 5273, 5635, 5635, 5165, 5635, 6247, 5268, 5502, 5502, 5502, 5502, 5251, 5502, 5251, 5251, 5251, 5186, 5193, 5272, 5635, 5635, 6261, 5635, 5298, 5635, 5635, 6262, 5502, 5502, 5294, 5251, 5251, 5251, 5296, 5251, 5251, 5264, 5196, 5196, 5196, 5196, 5265, 5196, 5197, 5635, 6245, 5269, 5293, 5296, 5306, 6246, 6247, 5502, 5502, 5502, 5292, 5251, 5251, 5196, 6255, 6247, 5270, 5292, 5251, 5264, 5197, 5198, 5302, 5297, 5312, 5312, 5304, 5635, 5179, 5635, 5643, 5168, 5635, 6860, 5329, 5590, 5333, 5336, 5339, 5343, 5362, 5419, 5347, 5351, 5404, 5419, 5419, 5419, 5419, 5368, 5384, 5393, 5355, 5359, 5418, 5367, 5372, 5346, 5420, 5381, 5390, 5397, 5377, 5386, 5419, 5376, 5401, 5416, 5424, 5428, 5430, 5430, 5434, 5436, 5440, 5473, 5444, 5446, 5365, 5407, 5450, 5454, 5458, 5466, 5464, 5466, 5462, 5470, 5477, 5635, 5181, 6353, 5635, 5219, 5635, 5635, 5219, 5635, 7266, 5635, 5904, 5635, 6256, 6080, 5635, 6853, 5635, 5635, 5169, 5672, 6820, 5635, 5635, 5635, 5275, 5635, 5635, 7112, 6346, 7172, 5635, 5220, 7282, 5635, 5273, 5642, 5635, 5635, 6879, 5246, 5891, 5635, 5635, 5182, 6258, 5523, 6083, 6080, 5977, 6569, 5635, 6877, 6875, 6150, 5527, 5530, 5531, 5535, 5538, 5542, 5547, 5545, 5551, 5553, 5554, 5558, 5561, 5569, 5562, 5566, 5562, 5572, 5574, 5578, 5635, 6820, 6222, 5635, 5975, 5635, 5635, 6702, 6210, 5614, 5635, 5635, 5189, 5635, 5635, 6773, 5656, 5635, 5635, 5635, 5307, 5668, 5635, 5635, 5635, 5315, 6779, 5662, 5666, 5635, 5635, 5635, 5582, 5675, 5635, 5635, 5635, 5320, 5679, 6567, 5635, 5683, 5691, 5698, 5706, 5734, 5699, 5707, 6568, 5635, 5635, 5635, 5491, 6736, 5694, 5700, 5708, 5162, 5635, 5635, 5635, 5513, 7310, 6318, 5664, 5635, 5635, 5635, 5277, 5746, 5635, 5712, 5635, 5274, 5273, 5635, 5274, 6223, 5635, 5275, 5635, 6695, 5635, 5635, 6694, 5823, 6568, 5635, 5322, 5635, 5635, 5910, 5635, 5635, 5635, 6618, 5236, 5635, 5717, 6739, 6745, 5731, 6568, 5635, 5324, 5635, 6335, 5811, 5635, 5635, 5635, 5675, 5701, 5732, 5635, 5635, 5318, 5635, 5635, 6736, 6740, 6744, 5730, 5734, 5635, 5635, 5635, 5514, 5768, 5701, 5775, 6568, 5776, 5635, 5635, 5635, 5615, 5747, 7254, 5635, 5635, 5512, 6989, 5208, 6448, 5733, 5635, 5635, 5635, 5625, 5788, 7253, 5635, 5635, 5635, 5635, 5159, 5797, 5635, 5635, 5635, 5638, 6319, 5635, 5635, 5635, 5640, 6027, 5799, 5635, 5635, 5635, 5646, 5650, 6805, 5635, 5635, 5635, 5655, 5805, 5798, 5635, 5635, 5635, 5636, 5515, 5803, 6804, 6568, 5635, 5496, 5048, 5635, 5219, 6618, 5635, 5635, 5635, 6260, 5635, 5583, 5635, 5635, 5819, 6695, 5635, 5635, 5635, 5724, 5819, 5635, 5821, 5819, 5635, 5635, 6934, 6878, 5756, 5815, 5829, 5635, 5508, 5204, 5664, 5842, 5846, 5854, 5858, 5862, 5866, 5866, 5868, 5870, 5870, 5870, 5870, 5874, 5874, 5874, 5874, 5877, 5879, 5635, 5635, 5635, 5738, 7116, 5885, 5635, 6258, 6080, 5635, 5899, 5917, 5635, 5635, 5594, 5635, 5324, 5635, 5635, 6618, 5635, 6618, 5635, 5582, 5635, 5635, 5819, 5921, 5635, 5635, 5487, 7303, 5485, 5635, 6834, 5635, 5635, 5612, 5635, 6832, 5932, 5635, 5635, 5635, 7178, 5635, 6696, 5635, 5937, 5325, 5635, 5635, 5635, 5761, 5969, 5635, 5635, 5635, 5804, 5984, 5635, 5635, 5635, 5819, 5635, 5850, 6339, 5992, 5606, 5635, 5635, 5635, 6696, 5635, 5938, 5635, 6256, 6930, 6081, 6015, 5635, 5635, 5635, 5895, 6016, 5635, 5635, 5635, 5902, 5640, 5999, 6005, 6011, 6261, 5635, 6095, 5635, 5635, 6088, 6289, 6037, 6042, 5635, 5635, 5635, 7255, 5635, 5635, 6027, 6032, 6038, 6043, 5635, 5635, 6256, 5635, 6082, 5635, 5820, 5635, 5820, 5635, 5635, 5821, 6261, 6335, 6695, 5635, 5635, 6692, 6568, 5923, 7028, 6032, 6058, 6033, 6059, 5635, 5635, 5635, 5908, 7128, 7132, 6613, 5635, 5635, 5635, 5923, 5517, 6786, 6790, 5635, 6564, 5635, 5635, 5635, 5907, 6260, 6318, 5635, 5635, 5635, 7259, 6072, 6033, 6064, 5635, 5635, 7027, 6032, 6063, 6564, 5635, 5635, 6260, 6261, 5636, 6988, 7255, 5678, 5635, 6082, 5635, 5821, 5945, 5412, 5635, 5635, 5635, 7285, 5635, 5635, 6257, 6081, 6261, 5635, 5635, 5635, 5221, 6071, 6711, 6064, 5635, 5635, 6838, 5635, 5589, 6617, 6072, 6712, 6065, 5635, 5635, 6844, 5635, 5635, 6851, 6568, 6070, 6710, 6063, 6564, 5943, 6983, 5635, 5635, 5635, 7286, 5635, 5756, 5635, 5635, 5635, 5943, 6260, 6094, 5635, 5635, 5635, 7332, 5720, 5635, 6821, 6073, 6109, 5635, 5635, 5635, 5956, 5635, 6099, 6107, 6066, 6256, 6081, 6337, 5635, 5635, 6852, 5635, 5320, 5635, 6075, 6079, 5635, 5635, 5635, 5958, 5635, 6820, 7158, 6077, 5635, 5635, 5635, 7346, 5635, 6131, 6821, 6074, 6076, 5635, 5635, 6820, 6708, 6127, 5635, 5635, 7156, 5634, 5905, 5635, 5228, 6053, 5274, 6116, 6079, 5635, 6981, 6142, 7156, 5822, 5635, 7157, 6118, 5635, 5635, 6115, 6078, 5635, 5635, 6114, 6078, 5635, 5635, 6115, 6078, 5635, 5674, 5285, 5674, 6117, 5635, 5635, 5636, 5635, 5635, 5635, 6221, 6118, 5635, 5635, 6116, 6139, 6079, 5635, 6139, 7083, 5674, 6617, 7134, 5635, 7134, 5635, 7134, 5635, 6616, 6614, 5635, 5635, 6878, 5764, 6744, 6449, 5734, 5635, 5287, 6614, 6614, 6614, 7253, 5635, 5674, 5635, 5635, 5512, 5516, 5635, 6392, 6392, 5635, 5636, 5642, 6257, 5635, 6085, 7286, 5635, 5635, 5635, 6481, 6485, 5733, 6255, 6840, 6147, 5635, 5635, 6940, 6946, 7286, 6617, 6879, 6154, 6160, 6167, 6156, 6171, 6175, 6179, 6183, 6184, 6189, 6189, 6185, 6193, 6193, 6193, 6193, 6196, 7276, 5635, 5583, 5635, 5635, 5582, 6208, 5635, 5635, 6214, 6197, 5278, 6228, 5635, 5635, 6975, 5635, 5635, 7001, 5769, 5797, 5308, 5635, 6961, 5635, 5635, 7001, 5770, 6236, 5635, 5980, 6254, 5635, 5635, 5636, 5945, 5412, 5951, 5635, 5635, 6252, 5635, 5635, 5635, 6053, 5635, 6255, 6086, 6855, 6868, 5635, 6399, 5635, 6614, 5635, 5635, 6273, 5635, 5635, 5638, 5964, 6676, 5635, 5635, 5636, 6988, 6994, 5635, 5678, 5635, 6081, 5635, 5819, 5972, 5635, 5635, 5635, 6082, 6085, 5635, 6281, 5635, 5635, 5640, 6573, 6802, 5206, 6295, 5635, 5635, 7007, 7016, 7041, 5635, 7144, 6290, 6803, 5207, 5207, 6296, 5635, 5635, 5635, 6084, 6291, 5771, 6995, 5635, 5635, 7034, 5635, 5635, 7152, 5635, 5635, 7253, 5635, 5635, 6954, 5657, 5635, 7252, 6400, 5635, 6670, 5635, 6259, 6209, 5635, 5639, 6347, 5635, 5635, 5635, 6088, 6309, 6301, 6325, 6329, 5635, 6310, 6302, 6326, 6079, 5635, 6982, 5907, 5635, 6258, 6081, 6311, 6801, 6327, 5635, 5635, 7257, 6960, 6255, 6086, 6856, 6869, 5635, 5635, 5640, 7027, 6400, 5635, 6735, 7277, 6693, 5635, 6671, 5635, 5635, 5320, 6310, 6323, 6327, 6324, 6328, 5635, 5635, 5635, 6089, 5149, 5153, 6086, 6866, 6567, 5635, 5635, 7287, 6616, 5635, 6879, 7278, 5582, 5635, 6769, 6564, 5635, 7252, 6400, 5288, 6079, 6695, 6669, 5635, 5635, 6201, 5635, 6344, 5635, 5635, 5674, 5805, 6351, 6357, 5635, 5635, 5676, 5635, 6820, 7179, 6366, 6329, 5635, 5260, 5635, 5635, 5635, 6122, 6399, 5635, 5635, 6671, 5635, 6259, 6365, 7255, 5635, 6021, 5635, 5635, 5315, 5167, 5635, 5635, 5635, 6247, 6247, 6619, 5635, 5635, 5635, 6255, 6086, 5635, 6620, 5635, 5635, 5635, 6256, 5219, 5635, 5635, 6619, 5904, 5748, 6771, 6620, 6618, 5635, 7096, 6618, 6618, 6618, 6770, 5901, 5511, 6370, 5635, 5635, 7333, 5721, 5635, 7255, 7154, 5635, 5635, 7349, 5518, 7319, 6209, 6384, 5635, 6372, 5985, 6719, 6390, 6396, 6404, 6408, 6411, 6413, 6417, 6418, 6418, 6422, 6424, 6425, 6429, 6429, 6429, 6429, 6430, 6429, 5635, 5635, 5755, 5635, 5635, 5635, 5888, 5635, 6604, 7326, 5635, 5635, 5635, 6616, 5635, 6692, 5635, 5824, 6457, 6568, 5635, 6852, 5635, 6948, 5635, 6949, 6455, 5635, 5635, 5635, 6261, 6260, 5635, 6462, 6456, 5635, 5637, 5640, 6675, 7115, 5635, 6467, 5635, 5658, 6453, 5635, 6463, 5635, 5635, 5635, 6262, 7328, 5635, 5635, 5635, 6267, 5277, 6615, 5635, 5635, 5755, 5818, 5635, 6819, 5635, 5635, 6494, 6473, 5635, 6477, 5635, 5638, 6346, 5635, 5635, 7275, 5635, 5635, 7287, 5635, 5635, 5635, 6480, 5635, 6498, 6507, 6513, 6518, 6508, 6514, 5635, 5635, 6523, 5635, 5635, 5635, 6315, 5635, 6540, 5635, 5635, 5783, 5635, 5635, 6554, 5635, 5635, 5635, 6339, 5635, 6263, 6549, 6503, 5635, 6547, 5176, 6553, 5635, 5635, 5635, 6334, 5635, 6558, 7327, 5635, 5635, 5784, 5635, 6578, 5153, 5635, 5635, 5635, 6439, 6088, 6574, 6579, 5154, 5635, 5635, 6583, 5635, 5635, 5894, 5810, 5635, 5635, 5581, 5635, 5635, 5635, 5725, 6054, 5637, 5635, 5635, 5900, 5635, 5635, 5635, 5904, 5635, 6088, 6588, 5153, 5635, 5638, 6826, 7252, 6088, 5148, 5152, 5635, 5640, 7087, 6772, 6084, 6772, 6084, 5275, 5635, 6694, 5904, 6338, 5277, 6693, 5635, 5825, 5635, 6821, 6600, 5635, 5640, 7334, 5907, 5635, 5635, 6822, 6224, 5635, 5644, 5648, 6102, 5635, 6821, 6223, 5635, 5635, 5635, 6479, 6762, 5824, 5635, 5321, 5635, 5647, 7054, 7038, 5635, 7255, 5637, 5635, 5654, 5635, 5635, 5222, 7284, 5635, 5635, 5276, 5635, 5277, 6695, 6337, 6260, 5635, 5635, 5635, 5256, 6220, 5154, 5635, 5635, 5635, 6399, 5638, 6692, 5635, 5635, 5923, 6072, 5638, 7024, 6610, 5635, 5674, 6141, 5635, 5635, 6854, 5635, 5635, 6878, 5693, 5699, 7255, 6216, 6771, 5635, 5677, 5635, 5635, 5635, 5587, 5911, 6624, 5628, 6630, 6638, 6641, 6645, 6648, 6656, 6656, 6656, 6656, 6651, 6652, 6652, 6652, 6660, 6660, 6660, 6660, 6662, 6666, 5635, 5635, 5635, 6566, 6048, 5635, 5622, 5635, 5686, 5838, 5635, 5686, 6053, 5635, 5635, 5635, 5985, 5635, 5589, 6694, 5939, 6617, 5912, 6686, 5635, 5635, 5944, 5411, 6052, 6691, 5635, 5635, 6756, 6701, 5635, 5635, 5635, 6567, 6125, 6772, 5635, 5635, 5987, 5635, 5635, 6723, 6729, 7278, 6695, 6734, 5635, 5635, 5991, 5605, 6749, 5635, 5635, 5635, 6615, 5635, 5635, 5635, 5645, 5649, 5635, 6480, 6763, 6750, 5635, 6764, 5607, 5635, 5635, 5635, 5835, 5635, 6717, 5635, 5635, 6026, 6031, 5608, 5635, 6730, 6143, 6483, 6487, 6568, 5635, 5635, 6486, 5734, 5635, 5635, 6133, 6881, 5635, 5635, 6133, 7095, 5635, 5635, 5635, 6816, 6204, 6203, 5635, 5635, 6134, 6772, 5909, 5635, 5635, 5635, 6620, 5635, 5597, 6879, 6795, 5635, 5635, 5635, 6685, 6480, 6484, 6488, 5635, 5635, 6616, 6615, 5635, 5635, 6204, 6202, 5274, 6126, 5635, 5635, 6220, 6224, 7347, 6777, 5635, 5635, 6230, 5635, 5635, 6230, 6485, 5733, 5635, 5635, 6054, 5204, 5635, 7269, 6772, 5635, 5687, 5952, 5635, 5713, 5635, 5635, 5276, 6615, 5635, 6277, 5635, 5635, 6619, 6809, 5734, 5635, 5635, 6246, 6247, 6247, 6247, 6247, 5270, 5502, 7114, 5635, 7254, 5635, 5674, 5805, 5798, 6276, 5748, 5635, 5635, 6255, 6247, 6247, 6247, 5269, 5502, 5502, 5835, 6053, 5635, 5635, 6318, 6568, 5635, 7347, 7114, 5635, 5635, 6819, 5321, 5635, 6845, 5635, 5635, 5635, 6716, 5635, 6974, 5635, 5635, 6333, 5635, 6256, 5317, 6285, 5635, 5635, 6966, 5635, 5635, 6965, 5635, 5635, 6257, 5635, 6961, 6053, 5635, 5635, 6967, 5635, 6255, 5589, 6617, 5635, 5753, 5635, 5635, 5323, 5635, 6113, 5634, 5904, 5635, 6256, 6961, 6053, 6255, 6965, 6965, 6965, 5635, 6967, 6965, 5635, 6965, 5635, 6258, 6967, 6965, 7286, 6269, 5741, 5741, 5741, 6053, 6849, 5635, 5635, 5635, 6754, 5635, 7342, 6334, 5635, 5780, 6568, 5635, 5492, 6542, 6492, 5635, 5635, 5635, 6307, 6311, 6324, 6936, 6083, 6873, 5319, 6886, 6892, 6890, 6896, 6900, 6900, 6902, 6908, 6906, 6906, 6908, 6916, 6915, 6912, 6920, 6921, 6921, 6921, 6921, 6925, 6928, 5208, 5635, 5635, 6855, 6526, 6380, 5635, 5635, 6340, 5993, 6565, 5635, 5635, 6617, 5635, 5635, 5635, 6706, 5635, 6239, 5635, 5635, 6364, 7154, 5635, 6242, 5635, 5635, 5637, 5965, 5635, 6953, 5635, 5635, 6376, 5635, 5635, 6958, 5635, 5635, 6443, 5589, 7258, 5635, 5635, 5635, 6760, 5635, 6971, 5635, 6979, 6987, 6993, 6329, 5635, 5832, 6260, 6680, 6878, 5791, 6543, 5635, 5836, 5635, 5635, 6284, 5635, 5635, 6567, 5635, 6616, 5635, 5635, 6469, 6482, 6999, 5635, 5639, 5635, 5635, 5635, 6461, 5725, 5635, 5635, 5635, 6768, 7012, 7040, 5635, 5635, 6547, 6501, 7041, 5635, 5635, 5635, 6769, 5635, 7008, 7017, 7042, 5635, 5848, 5748, 6255, 5483, 5635, 5635, 6245, 6247, 5635, 7021, 5933, 6053, 5904, 6935, 6879, 5792, 5644, 5648, 7055, 7046, 5645, 7052, 7056, 7047, 5646, 7053, 7057, 7048, 5724, 5635, 5635, 5635, 6783, 6486, 5734, 5820, 5635, 5904, 6935, 6879, 5748, 6879, 5793, 5635, 6566, 5635, 5757, 5635, 5635, 5724, 5756, 5635, 5277, 5635, 5635, 5635, 7176, 7094, 7061, 7048, 5635, 5635, 6548, 6502, 5649, 6103, 7067, 7048, 5635, 7061, 6564, 5635, 5635, 6568, 5635, 5646, 5650, 7066, 7124, 5635, 7065, 7123, 5635, 5635, 6584, 5635, 5635, 6987, 7154, 5635, 5881, 5635, 5635, 6365, 5635, 6878, 5318, 6615, 5635, 5899, 5962, 5635, 5602, 5635, 5635, 5188, 5635, 7077, 5635, 5635, 5635, 6794, 5647, 7076, 7069, 5635, 5900, 6053, 5726, 5646, 7075, 7068, 5635, 5635, 6879, 5635, 5635, 5635, 6799, 6809, 5635, 7176, 7081, 5635, 5901, 7114, 6434, 5635, 5635, 7176, 7089, 5635, 5902, 5511, 6435, 5635, 5635, 5757, 5274, 5635, 6088, 7088, 5635, 5902, 5635, 5635, 5635, 6800, 5635, 6088, 7154, 5635, 5903, 5635, 5906, 6616, 6614, 5820, 5904, 6880, 5635, 5908, 5635, 5635, 5924, 7029, 6033, 5640, 7178, 5635, 5635, 6614, 5635, 5635, 6088, 7093, 5635, 5908, 6605, 7327, 7177, 7095, 5635, 5901, 5902, 5635, 5640, 6218, 5821, 6880, 5635, 5635, 6615, 6616, 5635, 5635, 6259, 5635, 5635, 6259, 5635, 5903, 5635, 5635, 5635, 5745, 5640, 7178, 6772, 5238, 5635, 7100, 6880, 5635, 5913, 6687, 5635, 6700, 5635, 5635, 6135, 5635, 5635, 6681, 5635, 5635, 6820, 7094, 5635, 5928, 5635, 5635, 5608, 6878, 5635, 7100, 6881, 5635, 7115, 5635, 5635, 7254, 7106, 5635, 5635, 5635, 6821, 6073, 6820, 7275, 5635, 5635, 5635, 6820, 6309, 6133, 7095, 6880, 5635, 5943, 5410, 5949, 5635, 5635, 5635, 7252, 5635, 5635, 7120, 5635, 5635, 7273, 7120, 6878, 5635, 5635, 6693, 5635, 5635, 5635, 7274, 5635, 5635, 6695, 5635, 5635, 5819, 5809, 5635, 7138, 5635, 6963, 5905, 6209, 5635, 6961, 5635, 5979, 6253, 5635, 5635, 7002, 6744, 5798, 5240, 5635, 6021, 5499, 7109, 5673, 5635, 7142, 5635, 6962, 6021, 6964, 6625, 6022, 7174, 7271, 7149, 7162, 7166, 7170, 7183, 7187, 7191, 7194, 7202, 7197, 7198, 7206, 7208, 7212, 7218, 7217, 7213, 7222, 7232, 7232, 7225, 7231, 7227, 7236, 7240, 5635, 5985, 5837, 5635, 5723, 5635, 5635, 6602, 6606, 7128, 7132, 5904, 5635, 5910, 5481, 7100, 7241, 5635, 5635, 6695, 5824, 6360, 5635, 5635, 5635, 6853, 6259, 6079, 5635, 6529, 7245, 7247, 7251, 5635, 5986, 5635, 5635, 5763, 6743, 5702, 5776, 5635, 7263, 5635, 5635, 6725, 5492, 7283, 7255, 5635, 5635, 6737, 5769, 7291, 5635, 7292, 5635, 5997, 6003, 6009, 6015, 5635, 7296, 7130, 5635, 5998, 6004, 6010, 5907, 5903, 5635, 5635, 6737, 6741, 5635, 6086, 5641, 5635, 5635, 5635, 7100, 5635, 5635, 6738, 6742, 6879, 5635, 7114, 5635, 7252, 5635, 5635, 6853, 6855, 5635, 6020, 5635, 5635, 5635, 7254, 5635, 6337, 5635, 5635, 6770, 5635, 6772, 5635, 6086, 6084, 5635, 5635, 6259, 5635, 7301, 6386, 5635, 5635, 5635, 6878, 5635, 5512, 7309, 6633, 5635, 6047, 5635, 5635, 5635, 7256, 7310, 6634, 5635, 5635, 5635, 6882, 5635, 7307, 7311, 6338, 6853, 5320, 5635, 5640, 7334, 5722, 5635, 5635, 6821, 6126, 5635, 5635, 6021, 6772, 7128, 7132, 5258, 5635, 5635, 5635, 6966, 5642, 5635, 5635, 7101, 5635, 6850, 5635, 6336, 5635, 6260, 5635, 6261, 7102, 5985, 6334, 5635, 5635, 5644, 7073, 7315, 7319, 6338, 5635, 6080, 5906, 5903, 7316, 6788, 5635, 5635, 6772, 5635, 6084, 7095, 5635, 5635, 5686, 5635, 7317, 6789, 5635, 5635, 6813, 5635, 7318, 6790, 6770, 6769, 5635, 5635, 6619, 5635, 6769, 6820, 5635, 5635, 6881, 7115, 5635, 6852, 6855, 5635, 5635, 5635, 6845, 5635, 6718, 6694, 5635, 5635, 5635, 6942, 6786, 6790, 5635, 5635, 5635, 6967, 5635, 5635, 6786, 6790, 6770, 6769, 7254, 5635, 7101, 5635, 7297, 7132, 5258, 7113, 5635, 5635, 6819, 5635, 5635, 5635, 5166, 6379, 5048, 5635, 5635, 6821, 6074, 6078, 5635, 5635, 5635, 5978, 7350, 5519, 7320, 5635, 6081, 5678, 6626, 7319, 5635, 5635, 5635, 7006, 7348, 5517, 6786, 6617, 5635, 6772, 6771, 5635, 6084, 6303, 6488, 5635, 7324, 5906, 5903, 5635, 6085, 5641, 5635, 6084, 6352, 5635, 5635, 5635, 6231, 5047, 5635, 5635, 5635, 7033, 5635, 7348, 7335, 5903, 5635, 6879, 5635, 6851, 5678, 5909, 6855, 6864, 5635, 7340, 5635, 5635, 6829, 5635, 6087, 5635, 6881, 5635, 6852, 6819, 6850, 5635, 5635, 6261, 7332, 7336, 5635, 5635, 5635, 7145, 5635, 6232, 5635, 5635, 6833, 5635, 5274, 5635, 5635, 5635, 7177, 0, 0, 1075838976, 2097152, 16384, 0, 0, 0, 62, 64, 4194560, 4196352, 270532608, 2097152, 2097152, 268435456, 4194432, 541065216, 541065216, 541065216, 541065216, 4194304, 4194304, 4196352, -1606418432, -1606418432, 541065216, 541065216, 4194304, 4198144, 541065216, 541065216, -2143289344, -2143289344, 8425488, 4194304, 4194304, 4194304, 541065216, 37748736, 4194304, 541065216, 4194304, 4194304, 4194432, 37748736, -1606418432, 742391808, 239075328, 775946240, 171966464, 171966464, 171966464, 171966464, 239075328, 171966464, 775946240, 239075328, 239075328, 775946240, 775946240, 775946240, 4718592, 64, 4718592, 2097216, 4720640, 4194400, 4194368, -2142763008, 541589504, 4194368, 541589504, 541589504, 541065280, 4194368, 4194368, 541065312, 541065280, -2143289280, 4194368, -2143285440, -1605890240, -2142761152, -2109731008, -1606414528, -2143285440, -2143285440, -2143285440, -1605890240, -1606414528, -1606414528, -2143285440, -2143285408, -2143285440, -2143285440, -2142761152, 776470528, -1908404416, 775946304, 775946304, -1908404416, 2, 4, 8, 16, 512, 1024, 16777216, 33554432, 402653184, 0, 0, 0, -1979711488, 0, 8192, 8392704, 0, 0x80000000, 16777216, 0, 0, 1536, 32768, 0, 0, 128, 196608, 0, 16384, 1536, 1792, 8192, 16384, 131072, 131072, 0, 0, 64, 1536, 32768, 96, 96, 0, 0, 0x80000000, 16, 0, 0, 1536, 64, 524352, 524352, 524352, 524352, 0, 524288, 64, 64, 262144, 1048576, 4194304, 16777216, 33554432, 67108864, 134217728, 536870912, 0, 128, 128, 128, 128, 2048, 1536, 1024, 0, 0, 0, 15, 208, 15360, 96, 96, 0, 64, 64, 16392, 64, 1048576, 128, 128, 0, 256, 8192, 0, 8192, 0, 33554432, 0, 1024, 1024, 0, 0, 0x80000000, 65536, 32, 96, 96, 96, 96, 64, 0, 8388608, 4096, 0, 0, 8192, 2097152, 0x80000000, 96, 524352, 524352, 524352, 524288, 524288, 524288, 64, 64, 64, 0, 0, 0, 8, 0, 0, 0, 11, 64, 64, 128, 2048, 0, 4096, 0, 0, 131072, 128, 64, 64, 64, 96, 96, 96, 524352, 524352, 524288, 64, 524288, 64, 64, 96, 524352, 0, 0, 0, 18, 33554432, 64, 96, 524352, 524288, 0, 64, 0, 2097152, 0, 0, 4, 16, 0, 0, 16, 8388608, 0, 0, 4096, 536870912, 1073741824, 0, 4, 32, 32, 4, 1073872896, 32, 40, 96, 160, 1056, 262176, 1048608, 2097184, 32, 32, 32, 524320, 32, 1073872896, 40, 262176, 1120, 96, 4195360, 6291488, 2097184, 2097184, 4194336, 4194336, 536870944, 32, 32, 40, 262176, 32, 32, 40, 262184, 1120, 96, 6292512, 4195360, 56, 262184, 40, 262184, 40, 0, 4, 262184, 40, 40, 40, 40, 4195104, 6292512, 4196128, 32, 262184, 34, 34, 40, 48, 42, 32, 32, 327155712, 34, 1056, 1056, 32, 96, 32, 32, 41, 262184, 32, 64, 512, 2048, 16384, 67108864, 42, 1056, 4194336, 32, 32, 32, 32, 56, 2098208, 42, 4457568, -326784344, -322851160, -322851160, -322698144, -322698144, -322698144, -322698144, -322695456, -322695456, -322695456, -322695456, -322597152, -320598176, -322597152, -322597144, -321548576, -320598168, -321548568, -322597144, 32, 0, 96, 32, 42, 224, 40, 262176, 42, 106, 293601323, 293601323, 293863467, 293699627, 293617707, 293716011, 297896507, 293964347, 293702267, 297896507, 293702203, 293702203, 293702203, 293702203, 293964347, 297896507, 297896507, -322597144, -322588952, -321548568, -322588952, -37744981, -322597144, -321548568, -37482773, 0, 131072, 1048576, 2097152, 0, 0, -1744830464, 0, -1744830464, 0, 318767104, 0, 0, 0, 48, 0, 1, 285212672, 0, 0, 2048, 64, 64, 64, 64, 32, 96, 0, 32, 64, 65536, 0, 0, 1, 2, 12, 16, 64, 128, 1024, 2048, 4096, 0, 2, 65536, 262656, 5242880, -1842937664, 201330721, 201330721, -2111369023, -2111369023, -2111369023, -2111369023, -2111369023, -2111369023, -2111360575, -2111369023, -2111369023, -1977151295, -1977151293, -1910042431, -1893265183, -2111368509, -1893265183, -1893265183, -1893265183, -1893265183, -2111368509, -1893265183, -1893265183, -553689472, -553656704, -553689472, -553689472, -553656704, -553656704, -553656704, -553656704, -553656704, -553656704, -553656672, -553656672, -553656672, -553656672, -553656672, -553656670, -553656608, -553656672, -553656664, -553656664, -553656672, -553656670, -553656672, -553656672, -536912159, -553656671, -536879391, -536879391, -536879391, 0, 0, 2048, 4194304, 0, 0, 0, 262656, 0, 0, 0, 536870912, 1073741824, 458880, 2097152, -1845493760, 0, 0, 4096, 2097152, 0, 0, 1, 4096, 201326592, 805306368, -1073741824, 0, 0, 0, 24576, 471424, 0, -2113929216, 0, 0, 0, 220, -1912602624, 18874368, 463488, 0, 0, 9216, 0, 0, 16384, 8192, 8192, 32768, 2048, 2048, 2048, 2048, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 4, 16, 224, 256, 512, 32768, 0, 1040000, 15728640, -570425344, 0, 0, 0, 254, 4194304, 16777216, 33554432, 268435456, 536870912, 0x80000000, 0, 0, -570425344, 32505856, 2097152, 301989888, 0, 0, 0, 512, 0, 0, 0, 256, 12288, 0, 167772160, 234881024, 0, 0, 16384, 32768, 50331648, 0, 128, 512, 7168, 16384, 32768, 196608, 16384, 196608, 786432, 1048576, 2097152, 4194304, 8388608, 33554432, 2097152, 4194304, 8388608, 503316480, 1073741824, 0x80000000, 0, 4096, 201326592, 0, 0, 0, 167772160, 234881024, 128, 1024, 4096, 8192, 0, 0, 8192, 268435456, 0, 0, 4194304, 8388608, 234881024, 268435456, 1073741824, 0x80000000, 0, 0, 1048576, 4194304, 33554432, 268435456, 268435456, 268435456, 268435456, 0, 128, 131072, 2097152, 0, 0, 0, 520, 0, 201326592, 0, 0, 0, 1073741824, 0, 0, 0, 134217728, 128, 512, 3072, 16384, 32768, 3072, 16384, 131072, 524288, 1048576, 4194304, 16777216, 33554432, 201326592, 268435456, 1073741824, 0x80000000, 1048576, 4194304, 268435456, 536870912, 131072, 0, 0, 131072, 0, 131072, 2097152, 0, 0, 16384, 2097152, 0, 0, 2097152, 4194304, 134217728, 0x80000000, 0, 0, 0, 512, 3072, 131072, 524288, 1048576, 131072, 524288, 4194304, 0x80000000, 0, 0, 0, 16384, 16384, 18432, 0, 0, 0, 2048, 0, 0, 4096, 1048576, 0, 0, 67108864, 1073741824, 0x80000000, 0, 0, 29696, 0, 0, 32768, 50331648, 268435456, 0x80000000, 0, 0, 1, 1, 18952, 1024, 0, 65, 1024, 0, 4096, 32768, 0, 1024, 18952, 65, 268436480, 2101248, 524288, 1024, 19017, -1744550912, 8388624, 8388624, 8388624, -1739308032, -1739308032, -1739308032, -1739308032, -1736162288, -1736162288, -1736162288, -1736162288, -7868466, -7868466, -7868466, -7868466, -7868450, -7868450, -7868450, 0, 0, 0, 1610612736, 1024, 0, 2101248, 0, 0, 262144, 65536, 262144, 262144, 0, 0, 2048, 131072, 524288, 585, 0, 0, 0, 8192, 0, 0, 0, 4096, 0, 0, 0, 32, 0, 0, 0, 44, 64576, 0, 1024, 278528, -1744830464, 5521408, -1744830464, 0, 0, 2, 12, 64, 0, 1040, 8667136, -1744830464, -67108864, 0, 0, 0, 9728, 0, 2014, 0, 0, 0, 13312, 0, 1, 4, 8, 32, 64, 16384, 67108864, 134217728, 268435456, 0x80000000, 0, 0, 520, 1024, 0, 0, 2, 16, 0, 278528, 0, 0, 2, 67108864, 16384, 0, 5242880, 0x80000000, 0, 0, 327680, 0, 0, 328192, 0, 0, 0, 118, 577408, 22020096, 1040, 0, 0, 0, 16384, 0, 67108864, 1998, 518144, 8388608, 50331648, 201326592, 805306368, 0, 2, 204, 768, 1024, 10240, 1024, 10240, 16384, 32768, 458752, 8388608, 458752, 8388608, 50331648, 67108864, 134217728, 805306368, 134217728, 805306368, 1073741824, 0x80000000, 0, 220, 0, 0, 0, 32768, 33554436, 2, 12, 192, 768, 1024, 1024, 2048, 8192, 16384, 32768, 458752, 32768, 458752, 50331648, 67108864, 134217728, 134217728, 805306368, 1073741824, 0, 0, 208, 0, 0, 0, 34816, 67108864, 268435456, 0, 0, 0, 65536, 458752, 50331648, 67108864, 805306368, 1073741824, 458752, 50331648, 67108864, 536870912, 1073741824, 0, 0, 4, 8, 64, 128, 512, 2048, 196608, 262144, 33554432, 536870912, 0, 0, 0, 262144, 0, 0, 0, 64, 0, 0, 2, 4, 8, 262144, 0, 1048576, 4194304, 0, 0, 4, 8, 128, 512, 1024, 32768, 65536, 131072, 2048, 196608, 262144, 50331648, 536870912, 1073741824, 1, 4, 8, 512, 2048, 131072, 33554432, 536870912, 0, 0, 4, 8, 512, 2048, 8192, 32768, 8388608, 0, 524288, 262144, 0, 0, 4, 64, 128, 8388608, 0, 512, 2048, 131072, 536870912, 0, 0, 4194304, 8192, 2097152, 268435456, 0x80000000, 16, 33554432, -2147418112, 537395200, 537395200, 0, 4196352, 537427968, 4196352, 0, 537395200, 4196352, 4196352, 276901888, 8540160, -1606418432, 32768, 537395200, 4196352, 1082130432, 51380242, 51380242, 51380242, 22022147, 22349827, 22349827, 22349827, 22366219, 22349843, 22349827, 22349827, 22366219, 22349827, 55576594, 55576594, 55576594, 55576594, 1062785014, 324012114, 55576594, 55576594, 55576594, 1062785014, 1062785014, 1062785014, 1062785014, 0, 0, 0, 329728, 557056, 0, 0, 0, 393216, 0, 0, 17825792, 33554432, 0, 0, 0, 462976, 3, 22020096, 0, 0, 4, 134217728, 0, 0, 8, 16, 512, 402653184, 0, 0, 346112, 19, 0, 0, 8, 64, 0, 0, 0, 82, 301989888, 0, 0, 393232, 0, 0, 393240, 0, 0, 524288, 524288, 524288, 524288, 0, 577408, 22020096, 1040187392, 0, 0, 0, 524288, 0, 0, 0, 16, 0, 0, 0, 6, 16384, 32768, 268435456, 0, 268435456, 0, 1048576, 16777216, 33554432, 0, 0, 524288, 1048576, 2097152, 0, 80, 268435456, 0, 0, 524288, 536870912, 0, 112, 128, 256, 3584, 16384, 32768, 134217728, 805306368, 0, 0, 0, 1007232, 256, 1536, 2048, 16384, 32768, 262144, 0, 4, 16, 32, 64, 128, 256, 1536, 0, 16, 33554432, 0, 0, 1048576, 4194304, 0x80000000, 1536, 16384, 32768, 524288, 4194304, 33554432, 134217728, 536870912, 0, 0, 0, 32768, 0, 0, 0, 1048576, 0, 0, 0, 1998, 518144, 1, 0, 0, 65536, 262144, 0, 0, 256, 1536, 32768, 524288, 0, 0, 4194304, 134217728, 536870912, 0, 0, 1114112, 1073741824, 16, 64, 1536, 32768, 524288, 4194304, 67174400, 33554432, 1073741824, 0, 67174400, 0, 0, 16384, 1073741824, 0, 0, 2097152, 0, 1572864, 0, 1073741824, 16384, 0, 4194304, 0, 8, 0, 131072, 0, 131072, 0, 8, 131072, 131072, 134217728, 4096, 0, 8, 0, 8, 131072, 4194304, -2146430976, 131072, 134217736, 16908320, 547389524, 547389524, 555909216, 555909216, 555909216, 555909216, 564297840, 564297844, 564297844, 564297844, 564297844, 564297844, 564297844, 1001055742, 1001056254, 1001055742, 1001055742, 1001056254, 1001056254, 1001056254, 1001056254, 1001056254, 1001055742, 1, 0, 67108864, 1073741824, 0, 84, 2129920, 8388608, 536870912, 0, 96, 2260992, 0, 0, 2097152, 4194304, 8388608, 134217728, 268435456, 1280, 2809856, 58720256, 939524096, 0, 0, 0, 1052672, 0, 254, 1792, 2809856, 58720256, 939524096, 0, 939524096, 0, 0, 12, 16, 32768, 2097152, 8388608, 536870912, 0, 163840, 0, 0, 12, 32, 64, 1024, 2048, 57344, 262144, 50331648, 268435456, 1073741824, 0x80000000, 0, 52, 0, 0, 20, 64, 62, 64, 128, 1280, 8192, 16384, 131072, 524288, 58720256, 24576, 163840, 524288, 2097152, 58720256, 402653184, 58720256, 402653184, 536870912, 0, 0, 64, 128, 1792, 24576, 163840, 4, 16, 8388608, 0, 0, 2113536, 0, 0, 3735552, 0, 0, 8388608, 8388608, 4096, 4096, 4096, 4096, 0, 48, 25165824, 0, 0, 0, 1572864, 0, 6, 56, 128, 1792, 8192, 524288, 58720256, 402653184, 0, 0, 32, 128, 256, 262144, 262144, 1048576, 1073741824, 0, 0, 0, 0x80000000, 0, 0, 0, -2147483646, 4, 24, 32, 128, 1792, 1280, 8192, 524288, 16777216, 33554432, 0, 262144, 33554432, 134217728, 0, 8, 16, 1024, 16777216, 4194432, 3145728, 541065216, -2143289344, 4194304, 4194304, 4194304, 4194304, 16, 402653184, 0, 0, 32, 128, 256, 2048, 262144, 524288, 4, 16384, 65536, 67108864, 0, 0, 0, 131072, 0, 0, 0, 1024, 0, 0, 32768, 8192, 0, 2048, 0, 32, 8192, 3670016, 2048, 8192, 196608, 1048576, 0, 0, 34816, 9216, 4096, 4096, 29696, 29712, 29712, 29840, 29712, 29712, 29840, 536900624, 4224144, 144384, -754647956, -754647956, -754647956, -754647956, 144384, 144384, 144384, 144384, -754647940, -754647940, -754647940, -754647940, -754516884, -754647956, -754516884, -754516884, -754516884, 0, 0, 8388608, 1073741824, 0, 0, 67108864, 12, 16384, 0, 65536, 29824, 0, 0, 0, 3670016, 44, 64576, 319029248, -1073741824, 0, 0, 60, 0, 0, 0, 4194304, 0, 0, 0, 2014, 0, 319160320, 0, 0, 0, 5242880, 0, 4, 8, 256, 512, 2048, 8192, 16384, 458752, 50331648, 0, 524288, 3145728, 0, 0, 16384, 8, 0, 28672, 0, 0, 32, 524288, 0, 16, 0, 128, 0, 12288, 131072, 0, 0, 128, 512, 3072, 4096, 16384, 32768, 131072, 524288, 1048576, 2097152, 4194304, 262144, 318767104, -1073741824, 0, 0, 0, 28, 0, 0, 60, 64576, 28, 32, 64, 1024, 2048, 61440, 262144, 318767104, 24576, 0, 0, 0, 8388608, 0, 0, 0, 1040000, 67108864, 16384, 0, 65536, 262144, 1048576, 0, 8, 64, 2048, 4096, 8192, 65536, 131072, 1048576, 0, 0, 128, 536870912, 4194304, 131072, 0, 0, 64, 2048, 16384, 32768, 524288, 1048576, 4194304, 134217728, 0x80000000, 32768, 262144, 50331648, 268435456, 0, 32768, 8388608, 0, 0, 16777216, 16777216, 0, 0, 0, 4, 8, 16, 2, 67108864, 0, 65536, 201326592, 0x80000000, 0, 0, 1998, 59238400, -67108864, 0, 524288, 1048576, 0, 0, 64, 256, 32768, 50331648, 268435456, 0, 0, 1, 256, 0, 0, 0, 16777216, 0, 0, 256, 0, 8192, 0, 256, 262144, 2113536, 2097152, 135790592, 0, 256, 8192, 2097152, 0, 0x80000000, 0, 32768, 2097152, 0, 0x80000000, 5242880, 0, 0, 0, 128, 0, 0, 0, 208, 131073, 0, 0, 131073, 0, 135790592, 131073, 4, 0, 131073, 393233, 1610612736, 1610612736, 1610612736, 393241, 393241, 393241, 393241, 805707793, 805707793, 1879449617, 805708049, 1879449617, 1879449617, 1879449617, 1879449617, -483948553, -475559945, -475559945, -483948553, -483948553, -475559945, -483948553, -475559945, -483948553, -475559945, -475559945, -475559945, -475559945, -475559945, -215504905, -475559945, -207116297, -207116297, 0, 0, 72, 0, 4096, 4194304, 32768, 0, 0, 256, 401424, 805306368, 0, 0, 112, 25165824, 0, 1879048192, 0, 0, 116, 0, 0, 401680, 0, 0, 0, 32505856, 7, 19367920, -503316480, 0, 0, 0, 33554432, 0, 0, 33554432, 268435456, 0, 0, 0, 19376112, -234881024, 0, 0, 50331648, 268435456, 0, 27764720, -234881024, 0, 0, 512, 2048, 0, 0, 1, 2, 4, 32, 524288, 1048576, 524288, 1048576, 33554432, 67108864, 134217728, 805306368, 0, 24, 0, 0, 512, 3072, 16384, 0, 7, 16, 480, 1536, 32768, 1536, 32768, 65536, 2490368, 32768, 65536, 10878976, 16777216, 33554432, 0, 9728, 268435456, 0, 0, 67108866, 12, 64, 128, 512, 1024, 2048, 0, 16, 393216, 0, 0, 393216, 2097152, 16777216, 33554432, 536870912, -1073741824, 0, 0, 10485760, 16777216, 33554432, 1073741824, 0x80000000, 0, 16, 224, 256, 1536, 32768, 65536, 393216, 10485760, 16777216, 131072, 262144, 2097152, 16777216, 32768, 131072, 262144, 2097152, 8388608, 16777216, 0, 0, 4, 16, 224, 512, 32768, 131072, 2097152, 16777216, 192, 32768, 0, 0, 512, 4096, 4, 16, 192, 32768, 8388608, 0, 16, 64, 128, 8388608, 0, 0, 1024, 0, 4, 0, 0, 0, 3145728, 0, 4, 128, 0, 0, 268435456, 2, 0, 0, 65536, 0, 0, 0, 65, 0, 64, 128, 8388608, 16777216, 1073741824, 0, 0, 512, 2048, 32768, 262144, 524288, 8388608, 0, 0, 512, 131072, 524288, 8388608, 33554432, 0x80000000, 33554432, 33554432, 0, 2, 4, 112, 128, -2113929216, 100663296, 100663296, 2, 4, 524288, 134217728, 0, 0, 8, 512, 2048, 196608, 33554436, 0, 0, 33554436, 4224, 4224, 0, 65536, 100663296, 4224, 65536, 65536, 262144, 33554432, 0, 2, 4, 16, 64, 128, 256, 0, 4224, 65536, 16777216, 262400, 65536, 4224, -1072627712, 805306384, -1342177264, -1342177264, -1070006272, -1069989376, -1069989376, -1069989376, -258932720, -258932720, -258932720, -258932720, -1069989360, -1065795072, -1061600768, -1069989376, -225378288, -258932720, -258932720, -258932720, -225378288, 1260767, 1260767, 34815199, 1260767, 1260767, 1260767, 1260767, 34815199, 1260767, 34815199, 34815199, 34815199, 1260767, 1260767, 169032927, 1242774751, -1978450721, 169032927, -1978450721, -1978450721, -1978450721, 169032927, 169032927, 169032927, 169032927, -225231649, -1173144353, -225231649, -225231649, -91013921, 0, 0, 0, 67108864, 0, 3751936, 0, 0, 528, 7946240, 12140544, 0, 0, 0, 134217728, 0, 0, 0, 7, 27756528, -503316480, 0, 0, 9502720, 1610612736, 0, 0, 486539264, 0, 0, 2048, 32768, 0, 0, 64, 128, 0, 0, 536870912, 0, 0, 208, 15360, 1245184, 0, 0, 0, 268435456, 0, 0, 0, 15, 9633792, 0, 0, 0, 32, 512, 2048, 262144, 0, 3670016, 0, 0, 1040, 1040, 1, 2, 12, 80, 128, 7168, 8192, 196608, 16, 64, 128, 3072, 4096, 8192, 65536, 131072, 0, 0, 32, 262144, 524288, 33554432, 134217728, 0, 0, 0, 2, 8, 64, 128, 1024, 4096, 0, 0, 262144, 0, 4096, 4194304, 1, 1, 1, 0, 0, 2, 8, 16, 64
+];
+
+JSONiqParser.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'",
+ "'false'",
+ "'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'",
+ "'jsoniq'",
+ "'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'",
+ "'null'",
+ "'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'",
+ "'select'",
+ "'self'",
+ "'sensitive'",
+ "'sentence'",
+ "'sentences'",
+ "'skip'",
+ "'sliding'",
+ "'some'",
+ "'stable'",
+ "'start'",
+ "'stemming'",
+ "'stop'",
+ "'strict'",
+ "'strip'",
+ "'structured-item'",
+ "'switch'",
+ "'text'",
+ "'then'",
+ "'thesaurus'",
+ "'times'",
+ "'to'",
+ "'treat'",
+ "'true'",
+ "'try'",
+ "'tumbling'",
+ "'type'",
+ "'typeswitch'",
+ "'union'",
+ "'unique'",
+ "'unordered'",
+ "'updating'",
+ "'uppercase'",
+ "'using'",
+ "'validate'",
+ "'value'",
+ "'variable'",
+ "'version'",
+ "'weight'",
+ "'when'",
+ "'where'",
+ "'while'",
+ "'wildcards'",
+ "'window'",
+ "'with'",
+ "'without'",
+ "'word'",
+ "'words'",
+ "'zero-digit'",
+ "'{'",
+ "'{{'",
+ "'{|'",
+ "'|'",
+ "'||'",
+ "'|}'",
+ "'}'",
+ "'}}'"
+];
+
+},{}],"/node_modules/xqlint/lib/parsers/XQueryParser.js":[function(_dereq_,module,exports){
+ var XQueryParser = exports.XQueryParser = function XQueryParser(string, parsingEventHandler)
+ {
+ init(string, parsingEventHandler);
+ var self = this;
+
+ this.ParseException = function(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 = {};
+ 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 = XQueryParser.getTokenSet(- 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 = 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 || found != null ? "" : "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(274); // 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(198); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 64274 // 'xquery' 'encoding'
+ || lk == 134930) // 'xquery' 'version'
+ {
+ parse_VersionDecl();
+ }
+ lookahead1W(274); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ switch (l1)
+ {
+ case 182: // 'module'
+ lookahead2W(193); // 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(248); // 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(274); // 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(178); // 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(274); // 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(254); // 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(180); // 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(248); // 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(248); // 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(248); // 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(254); // 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(254); // 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(254); // 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(254); // 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(254); // 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(254); // 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(254); // 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(254); // 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(254); // 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(254); // 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(254); // 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(254); // 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(254); // 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(254); // 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(254); // 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(254); // 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(254); // 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(254); // 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(254); // 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(254); // 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(254); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NextItem();
+ }
+ eventHandler.endNonterminal("WindowVars", e0);
+ }
+
+ function try_WindowVars()
+ {
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(254); // 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(254); // 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(254); // 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(254); // 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(254); // 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(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_GroupingSpecList();
+ eventHandler.endNonterminal("GroupByClause", e0);
+ }
+
+ function try_GroupByClause()
+ {
+ shiftT(148); // 'group'
+ lookahead1W(34); // S^WS | '(:' | 'by'
+ shiftT(87); // 'by'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ 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(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ 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(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_GroupingSpec();
+ }
+ }
+
+ function parse_GroupingSpec()
+ {
+ eventHandler.startNonterminal("GroupingSpec", e0);
+ switch (l1)
+ {
+ case 31: // '$'
+ lookahead2W(254); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 3103 // '$' EQName^Token
+ || lk == 35871 // '$' 'after'
+ || lk == 36895 // '$' 'allowing'
+ || lk == 37407 // '$' 'ancestor'
+ || lk == 37919 // '$' 'ancestor-or-self'
+ || lk == 38431 // '$' 'and'
+ || lk == 39455 // '$' 'append'
+ || lk == 39967 // '$' 'array'
+ || lk == 40479 // '$' 'as'
+ || lk == 40991 // '$' 'ascending'
+ || lk == 41503 // '$' 'at'
+ || lk == 42015 // '$' 'attribute'
+ || lk == 42527 // '$' 'base-uri'
+ || lk == 43039 // '$' 'before'
+ || lk == 43551 // '$' 'boundary-space'
+ || lk == 44063 // '$' 'break'
+ || lk == 45087 // '$' 'case'
+ || lk == 45599 // '$' 'cast'
+ || lk == 46111 // '$' 'castable'
+ || lk == 46623 // '$' 'catch'
+ || lk == 47647 // '$' 'child'
+ || lk == 48159 // '$' 'collation'
+ || lk == 49183 // '$' 'comment'
+ || lk == 49695 // '$' 'constraint'
+ || lk == 50207 // '$' 'construction'
+ || lk == 51743 // '$' 'context'
+ || lk == 52255 // '$' 'continue'
+ || lk == 52767 // '$' 'copy'
+ || lk == 53279 // '$' 'copy-namespaces'
+ || lk == 53791 // '$' 'count'
+ || lk == 54303 // '$' 'decimal-format'
+ || lk == 55327 // '$' 'declare'
+ || lk == 55839 // '$' 'default'
+ || lk == 56351 // '$' 'delete'
+ || lk == 56863 // '$' 'descendant'
+ || lk == 57375 // '$' 'descendant-or-self'
+ || lk == 57887 // '$' 'descending'
+ || lk == 60447 // '$' 'div'
+ || lk == 60959 // '$' 'document'
+ || lk == 61471 // '$' 'document-node'
+ || lk == 61983 // '$' 'element'
+ || lk == 62495 // '$' 'else'
+ || lk == 63007 // '$' 'empty'
+ || lk == 63519 // '$' 'empty-sequence'
+ || lk == 64031 // '$' 'encoding'
+ || lk == 64543 // '$' 'end'
+ || lk == 65567 // '$' 'eq'
+ || lk == 66079 // '$' 'every'
+ || lk == 67103 // '$' 'except'
+ || lk == 67615 // '$' 'exit'
+ || lk == 68127 // '$' 'external'
+ || lk == 68639 // '$' 'first'
+ || lk == 69151 // '$' 'following'
+ || lk == 69663 // '$' 'following-sibling'
+ || lk == 70175 // '$' 'for'
+ || lk == 72223 // '$' 'ft-option'
+ || lk == 74271 // '$' 'function'
+ || lk == 74783 // '$' 'ge'
+ || lk == 75807 // '$' 'group'
+ || lk == 76831 // '$' 'gt'
+ || lk == 77343 // '$' 'idiv'
+ || lk == 77855 // '$' 'if'
+ || lk == 78367 // '$' 'import'
+ || lk == 78879 // '$' 'in'
+ || lk == 79391 // '$' 'index'
+ || lk == 81439 // '$' 'insert'
+ || lk == 81951 // '$' 'instance'
+ || lk == 82463 // '$' 'integrity'
+ || lk == 82975 // '$' 'intersect'
+ || lk == 83487 // '$' 'into'
+ || lk == 83999 // '$' 'is'
+ || lk == 84511 // '$' 'item'
+ || lk == 85023 // '$' 'json'
+ || lk == 85535 // '$' 'json-item'
+ || lk == 87071 // '$' 'last'
+ || lk == 87583 // '$' 'lax'
+ || lk == 88095 // '$' 'le'
+ || lk == 89119 // '$' 'let'
+ || lk == 90143 // '$' 'loop'
+ || lk == 91167 // '$' 'lt'
+ || lk == 92191 // '$' 'mod'
+ || lk == 92703 // '$' 'modify'
+ || lk == 93215 // '$' 'module'
+ || lk == 94239 // '$' 'namespace'
+ || lk == 94751 // '$' 'namespace-node'
+ || lk == 95263 // '$' 'ne'
+ || lk == 97823 // '$' 'node'
+ || lk == 98335 // '$' 'nodes'
+ || lk == 99359 // '$' 'object'
+ || lk == 101407 // '$' 'only'
+ || lk == 101919 // '$' 'option'
+ || lk == 102431 // '$' 'or'
+ || lk == 102943 // '$' 'order'
+ || lk == 103455 // '$' 'ordered'
+ || lk == 103967 // '$' 'ordering'
+ || lk == 105503 // '$' 'parent'
+ || lk == 108575 // '$' 'preceding'
+ || lk == 109087 // '$' 'preceding-sibling'
+ || lk == 110623 // '$' 'processing-instruction'
+ || lk == 111647 // '$' 'rename'
+ || lk == 112159 // '$' 'replace'
+ || lk == 112671 // '$' 'return'
+ || lk == 113183 // '$' 'returning'
+ || lk == 113695 // '$' 'revalidation'
+ || lk == 114719 // '$' 'satisfies'
+ || lk == 115231 // '$' 'schema'
+ || lk == 115743 // '$' 'schema-attribute'
+ || lk == 116255 // '$' 'schema-element'
+ || lk == 116767 // '$' 'score'
+ || lk == 117279 // '$' 'self'
+ || lk == 119839 // '$' 'sliding'
+ || lk == 120351 // '$' 'some'
+ || lk == 120863 // '$' 'stable'
+ || lk == 121375 // '$' 'start'
+ || lk == 122911 // '$' 'strict'
+ || lk == 123935 // '$' 'structured-item'
+ || lk == 124447 // '$' 'switch'
+ || lk == 124959 // '$' 'text'
+ || lk == 127007 // '$' 'to'
+ || lk == 127519 // '$' 'treat'
+ || lk == 128031 // '$' 'try'
+ || lk == 128543 // '$' 'tumbling'
+ || lk == 129055 // '$' 'type'
+ || lk == 129567 // '$' 'typeswitch'
+ || lk == 130079 // '$' 'union'
+ || lk == 131103 // '$' 'unordered'
+ || lk == 131615 // '$' 'updating'
+ || lk == 133151 // '$' 'validate'
+ || lk == 133663 // '$' 'value'
+ || lk == 134175 // '$' 'variable'
+ || lk == 134687 // '$' 'version'
+ || lk == 136223 // '$' 'where'
+ || lk == 136735 // '$' 'while'
+ || lk == 138271 // '$' 'with'
+ || lk == 140319) // '$' 'xquery'
+ {
+ 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
+ {
+ try_GroupingVariable();
+ lookahead1W(182); // 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
+ }
+ 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);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ parse_GroupingVariable();
+ lookahead1W(182); // 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
+ }
+ break;
+ default:
+ parse_ExprSingle();
+ }
+ eventHandler.endNonterminal("GroupingSpec", e0);
+ }
+
+ function try_GroupingSpec()
+ {
+ switch (l1)
+ {
+ case 31: // '$'
+ lookahead2W(254); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 3103 // '$' EQName^Token
+ || lk == 35871 // '$' 'after'
+ || lk == 36895 // '$' 'allowing'
+ || lk == 37407 // '$' 'ancestor'
+ || lk == 37919 // '$' 'ancestor-or-self'
+ || lk == 38431 // '$' 'and'
+ || lk == 39455 // '$' 'append'
+ || lk == 39967 // '$' 'array'
+ || lk == 40479 // '$' 'as'
+ || lk == 40991 // '$' 'ascending'
+ || lk == 41503 // '$' 'at'
+ || lk == 42015 // '$' 'attribute'
+ || lk == 42527 // '$' 'base-uri'
+ || lk == 43039 // '$' 'before'
+ || lk == 43551 // '$' 'boundary-space'
+ || lk == 44063 // '$' 'break'
+ || lk == 45087 // '$' 'case'
+ || lk == 45599 // '$' 'cast'
+ || lk == 46111 // '$' 'castable'
+ || lk == 46623 // '$' 'catch'
+ || lk == 47647 // '$' 'child'
+ || lk == 48159 // '$' 'collation'
+ || lk == 49183 // '$' 'comment'
+ || lk == 49695 // '$' 'constraint'
+ || lk == 50207 // '$' 'construction'
+ || lk == 51743 // '$' 'context'
+ || lk == 52255 // '$' 'continue'
+ || lk == 52767 // '$' 'copy'
+ || lk == 53279 // '$' 'copy-namespaces'
+ || lk == 53791 // '$' 'count'
+ || lk == 54303 // '$' 'decimal-format'
+ || lk == 55327 // '$' 'declare'
+ || lk == 55839 // '$' 'default'
+ || lk == 56351 // '$' 'delete'
+ || lk == 56863 // '$' 'descendant'
+ || lk == 57375 // '$' 'descendant-or-self'
+ || lk == 57887 // '$' 'descending'
+ || lk == 60447 // '$' 'div'
+ || lk == 60959 // '$' 'document'
+ || lk == 61471 // '$' 'document-node'
+ || lk == 61983 // '$' 'element'
+ || lk == 62495 // '$' 'else'
+ || lk == 63007 // '$' 'empty'
+ || lk == 63519 // '$' 'empty-sequence'
+ || lk == 64031 // '$' 'encoding'
+ || lk == 64543 // '$' 'end'
+ || lk == 65567 // '$' 'eq'
+ || lk == 66079 // '$' 'every'
+ || lk == 67103 // '$' 'except'
+ || lk == 67615 // '$' 'exit'
+ || lk == 68127 // '$' 'external'
+ || lk == 68639 // '$' 'first'
+ || lk == 69151 // '$' 'following'
+ || lk == 69663 // '$' 'following-sibling'
+ || lk == 70175 // '$' 'for'
+ || lk == 72223 // '$' 'ft-option'
+ || lk == 74271 // '$' 'function'
+ || lk == 74783 // '$' 'ge'
+ || lk == 75807 // '$' 'group'
+ || lk == 76831 // '$' 'gt'
+ || lk == 77343 // '$' 'idiv'
+ || lk == 77855 // '$' 'if'
+ || lk == 78367 // '$' 'import'
+ || lk == 78879 // '$' 'in'
+ || lk == 79391 // '$' 'index'
+ || lk == 81439 // '$' 'insert'
+ || lk == 81951 // '$' 'instance'
+ || lk == 82463 // '$' 'integrity'
+ || lk == 82975 // '$' 'intersect'
+ || lk == 83487 // '$' 'into'
+ || lk == 83999 // '$' 'is'
+ || lk == 84511 // '$' 'item'
+ || lk == 85023 // '$' 'json'
+ || lk == 85535 // '$' 'json-item'
+ || lk == 87071 // '$' 'last'
+ || lk == 87583 // '$' 'lax'
+ || lk == 88095 // '$' 'le'
+ || lk == 89119 // '$' 'let'
+ || lk == 90143 // '$' 'loop'
+ || lk == 91167 // '$' 'lt'
+ || lk == 92191 // '$' 'mod'
+ || lk == 92703 // '$' 'modify'
+ || lk == 93215 // '$' 'module'
+ || lk == 94239 // '$' 'namespace'
+ || lk == 94751 // '$' 'namespace-node'
+ || lk == 95263 // '$' 'ne'
+ || lk == 97823 // '$' 'node'
+ || lk == 98335 // '$' 'nodes'
+ || lk == 99359 // '$' 'object'
+ || lk == 101407 // '$' 'only'
+ || lk == 101919 // '$' 'option'
+ || lk == 102431 // '$' 'or'
+ || lk == 102943 // '$' 'order'
+ || lk == 103455 // '$' 'ordered'
+ || lk == 103967 // '$' 'ordering'
+ || lk == 105503 // '$' 'parent'
+ || lk == 108575 // '$' 'preceding'
+ || lk == 109087 // '$' 'preceding-sibling'
+ || lk == 110623 // '$' 'processing-instruction'
+ || lk == 111647 // '$' 'rename'
+ || lk == 112159 // '$' 'replace'
+ || lk == 112671 // '$' 'return'
+ || lk == 113183 // '$' 'returning'
+ || lk == 113695 // '$' 'revalidation'
+ || lk == 114719 // '$' 'satisfies'
+ || lk == 115231 // '$' 'schema'
+ || lk == 115743 // '$' 'schema-attribute'
+ || lk == 116255 // '$' 'schema-element'
+ || lk == 116767 // '$' 'score'
+ || lk == 117279 // '$' 'self'
+ || lk == 119839 // '$' 'sliding'
+ || lk == 120351 // '$' 'some'
+ || lk == 120863 // '$' 'stable'
+ || lk == 121375 // '$' 'start'
+ || lk == 122911 // '$' 'strict'
+ || lk == 123935 // '$' 'structured-item'
+ || lk == 124447 // '$' 'switch'
+ || lk == 124959 // '$' 'text'
+ || lk == 127007 // '$' 'to'
+ || lk == 127519 // '$' 'treat'
+ || lk == 128031 // '$' 'try'
+ || lk == 128543 // '$' 'tumbling'
+ || lk == 129055 // '$' 'type'
+ || lk == 129567 // '$' 'typeswitch'
+ || lk == 130079 // '$' 'union'
+ || lk == 131103 // '$' 'unordered'
+ || lk == 131615 // '$' 'updating'
+ || lk == 133151 // '$' 'validate'
+ || lk == 133663 // '$' 'value'
+ || lk == 134175 // '$' 'variable'
+ || lk == 134687 // '$' 'version'
+ || lk == 136223 // '$' 'where'
+ || lk == 136735 // '$' 'while'
+ || lk == 138271 // '$' 'with'
+ || lk == 140319) // '$' 'xquery'
+ {
+ 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
+ {
+ try_GroupingVariable();
+ lookahead1W(182); // 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
+ }
+ memoize(2, e0A, -1);
+ lk = -3;
+ }
+ 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, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ try_GroupingVariable();
+ lookahead1W(182); // 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
+ }
+ break;
+ case -3:
+ break;
+ default:
+ try_ExprSingle();
+ }
+ }
+
+ function parse_GroupingVariable()
+ {
+ eventHandler.startNonterminal("GroupingVariable", e0);
+ shift(31); // '$'
+ lookahead1W(254); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("GroupingVariable", e0);
+ }
+
+ function try_GroupingVariable()
+ {
+ shiftT(31); // '$'
+ lookahead1W(254); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+
+ 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(179); // 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(179); // 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 | '$' | '(:'
+ whitespace();
+ parse_QuantifiedVarDecl();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_QuantifiedVarDecl();
+ }
+ 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 | '$' | '(:'
+ try_QuantifiedVarDecl();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_QuantifiedVarDecl();
+ }
+ shiftT(224); // 'satisfies'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+
+ function parse_QuantifiedVarDecl()
+ {
+ eventHandler.startNonterminal("QuantifiedVarDecl", e0);
+ shift(31); // '$'
+ lookahead1W(254); // 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();
+ eventHandler.endNonterminal("QuantifiedVarDecl", e0);
+ }
+
+ function try_QuantifiedVarDecl()
+ {
+ shiftT(31); // '$'
+ lookahead1W(254); // 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();
+ }
+
+ 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(254); // 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(254); // 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(261); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(254); // 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(261); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(254); // 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(183); // 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(183); // 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(256); // 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(256); // 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(256); // 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(256); // 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(266); // 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(266); // 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(266); // 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(266); // 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(266); // 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(266); // 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(266); // 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(266); // 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(266); // 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(266); // 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(266); // 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(266); // 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(266); // 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(266); // 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(266); // 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(266); // 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(266); // 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(266); // 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(254); // 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(254); // 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(254); // 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(254); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_SingleType();
+ }
+ }
+
+ function parse_UnaryExpr()
+ {
+ eventHandler.startNonterminal("UnaryExpr", e0);
+ for (;;)
+ {
+ lookahead1W(266); // 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(266); // 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(247); // 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(247); // 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(265); // 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(265); // 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(254); // 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(254); // 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(273); // 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(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 282) // '}'
+ {
+ try_Expr();
+ }
+ shiftT(282); // '}'
+ }
+
+ function parse_Pragma()
+ {
+ eventHandler.startNonterminal("Pragma", e0);
+ shift(35); // '(#'
+ lookahead1(251); // 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(251); // 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(285); // 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(264); // 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(285); // 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(264); // 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(265); // 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(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
+ {
+ switch (l1)
+ {
+ case 46: // '/'
+ shiftT(46); // '/'
+ break;
+ case 47: // '//'
+ shiftT(47); // '//'
+ break;
+ default:
+ shiftT(26); // '!'
+ }
+ lookahead1W(264); // 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(3, 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(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_StepExpr();
+ }
+ eventHandler.endNonterminal("RelativePathExpr", e0);
+ }
+
+ function try_RelativePathExpr()
+ {
+ try_StepExpr();
+ for (;;)
+ {
+ switch (l1)
+ {
+ case 26: // '!'
+ lookahead2W(265); // 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(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
+ {
+ switch (l1)
+ {
+ case 46: // '/'
+ shiftT(46); // '/'
+ break;
+ case 47: // '//'
+ shiftT(47); // '//'
+ break;
+ default:
+ shiftT(26); // '!'
+ }
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_StepExpr();
+ memoize(3, e0A, -1);
+ continue;
+ }
+ catch (p1A)
+ {
+ 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, e0A, -2);
+ break;
+ }
+ }
+ }
+ if (lk != -1
+ && lk != 46 // '/'
+ && lk != 47) // '//'
+ {
+ break;
+ }
+ switch (l1)
+ {
+ case 46: // '/'
+ shiftT(46); // '/'
+ break;
+ case 47: // '//'
+ shiftT(47); // '//'
+ break;
+ default:
+ shiftT(26); // '!'
+ }
+ lookahead1W(264); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_StepExpr();
+ }
+ }
+
+ function parse_StepExpr()
+ {
+ eventHandler.startNonterminal("StepExpr", e0);
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ lookahead2W(284); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 121: // 'element'
+ lookahead2W(282); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 184: // 'namespace'
+ case 216: // 'processing-instruction'
+ lookahead2W(281); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 96: // 'comment'
+ case 119: // 'document'
+ case 202: // 'ordered'
+ case 244: // 'text'
+ case 256: // 'unordered'
+ lookahead2W(246); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 78: // 'array'
+ case 124: // 'empty-sequence'
+ case 152: // 'if'
+ case 165: // 'item'
+ case 167: // 'json-item'
+ case 242: // 'structured-item'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ lookahead2W(239); // 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(245); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 6: // EQName^Token
+ case 70: // 'after'
+ case 72: // 'allowing'
+ case 75: // 'and'
+ case 77: // 'append'
+ 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 166: // 'json'
+ 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 194: // 'object'
+ 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(243); // 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(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_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(4, 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 14925: // 'append' '#'
+ case 14926: // 'array' '#'
+ 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 15014: // 'json' '#'
+ case 15015: // 'json-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 15042: // 'object' '#'
+ 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 15090: // 'structured-item' '#'
+ 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 17485: // 'append' '('
+ 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 17574: // 'json' '('
+ 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 17602: // 'object' '('
+ 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 39506: // 'attribute' 'append'
+ case 39545: // 'element' 'append'
+ case 39608: // 'namespace' 'append'
+ case 39640: // 'processing-instruction' 'append'
+ case 40018: // 'attribute' 'array'
+ case 40057: // 'element' 'array'
+ 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 85074: // 'attribute' 'json'
+ case 85113: // 'element' 'json'
+ case 85176: // 'namespace' 'json'
+ case 85208: // 'processing-instruction' 'json'
+ case 85586: // 'attribute' 'json-item'
+ case 85625: // 'element' 'json-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 99410: // 'attribute' 'object'
+ case 99449: // 'element' 'object'
+ case 99512: // 'namespace' 'object'
+ case 99544: // 'processing-instruction' 'object'
+ 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 123986: // 'attribute' 'structured-item'
+ case 124025: // 'element' 'structured-item'
+ 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(284); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 121: // 'element'
+ lookahead2W(282); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 184: // 'namespace'
+ case 216: // 'processing-instruction'
+ lookahead2W(281); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' |
+ break;
+ case 96: // 'comment'
+ case 119: // 'document'
+ case 202: // 'ordered'
+ case 244: // 'text'
+ case 256: // 'unordered'
+ lookahead2W(246); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 78: // 'array'
+ case 124: // 'empty-sequence'
+ case 152: // 'if'
+ case 165: // 'item'
+ case 167: // 'json-item'
+ case 242: // 'structured-item'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ lookahead2W(239); // 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(245); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 6: // EQName^Token
+ case 70: // 'after'
+ case 72: // 'allowing'
+ case 75: // 'and'
+ case 77: // 'append'
+ 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 166: // 'json'
+ 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 194: // 'object'
+ 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(243); // 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(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_PostfixExpr();
+ memoize(4, e0A, -1);
+ lk = -3;
+ }
+ 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, e0A, -2);
+ }
+ }
+ }
+ 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 14925: // 'append' '#'
+ case 14926: // 'array' '#'
+ 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 15014: // 'json' '#'
+ case 15015: // 'json-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 15042: // 'object' '#'
+ 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 15090: // 'structured-item' '#'
+ 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 17485: // 'append' '('
+ 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 17574: // 'json' '('
+ 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 17602: // 'object' '('
+ 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 39506: // 'attribute' 'append'
+ case 39545: // 'element' 'append'
+ case 39608: // 'namespace' 'append'
+ case 39640: // 'processing-instruction' 'append'
+ case 40018: // 'attribute' 'array'
+ case 40057: // 'element' 'array'
+ 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 85074: // 'attribute' 'json'
+ case 85113: // 'element' 'json'
+ case 85176: // 'namespace' 'json'
+ case 85208: // 'processing-instruction' 'json'
+ case 85586: // 'attribute' 'json-item'
+ case 85625: // 'element' 'json-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 99410: // 'attribute' 'object'
+ case 99449: // 'element' 'object'
+ case 99512: // 'namespace' 'object'
+ case 99544: // 'processing-instruction' 'object'
+ 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 123986: // 'attribute' 'structured-item'
+ case 124025: // 'element' 'structured-item'
+ 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;
+ case -3:
+ 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(241); // 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(237); // 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(241); // 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(237); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ try_PredicateList();
+ }
+
+ function parse_ForwardStep()
+ {
+ eventHandler.startNonterminal("ForwardStep", e0);
+ switch (l1)
+ {
+ case 82: // 'attribute'
+ lookahead2W(244); // 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(241); // 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(256); // 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(244); // 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(241); // 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(256); // 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(256); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_NodeTest();
+ eventHandler.endNonterminal("AbbrevForwardStep", e0);
+ }
+
+ function try_AbbrevForwardStep()
+ {
+ if (l1 == 66) // '@'
+ {
+ shiftT(66); // '@'
+ }
+ lookahead1W(256); // 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(256); // 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(256); // 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(240); // 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(240); // 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(240); // 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(240); // 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(275); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 37) // ')'
+ {
+ whitespace();
+ parse_Argument();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Argument();
+ }
+ }
+ shift(37); // ')'
+ eventHandler.endNonterminal("ArgumentList", e0);
+ }
+
+ function try_ArgumentList()
+ {
+ shiftT(34); // '('
+ lookahead1W(275); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 37) // ')'
+ {
+ try_Argument();
+ for (;;)
+ {
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(270); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Argument();
+ }
+ }
+ shiftT(37); // ')'
+ }
+
+ function parse_PredicateList()
+ {
+ eventHandler.startNonterminal("PredicateList", e0);
+ for (;;)
+ {
+ lookahead1W(237); // S^WS | EOF | '!' | '!=' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' | '//' | ':' |
+ if (l1 != 68) // '['
+ {
+ break;
+ }
+ whitespace();
+ parse_Predicate();
+ }
+ eventHandler.endNonterminal("PredicateList", e0);
+ }
+
+ function try_PredicateList()
+ {
+ for (;;)
+ {
+ lookahead1W(237); // 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(254); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ eventHandler.endNonterminal("VarRef", e0);
+ }
+
+ function try_VarRef()
+ {
+ shiftT(31); // '$'
+ lookahead1W(254); // 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(257); // 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(276); // 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(257); // 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(276); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 282) // '}'
+ {
+ try_ContentExpr();
+ }
+ shiftT(282); // '}'
+ }
+
+ function parse_CompNamespaceConstructor()
+ {
+ eventHandler.startNonterminal("CompNamespaceConstructor", e0);
+ shift(184); // 'namespace'
+ lookahead1W(250); // 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(250); // 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(242); // 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(238); // 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(242); // 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(238); // 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 78: // 'array'
+ case 82: // 'attribute'
+ case 96: // 'comment'
+ case 120: // 'document-node'
+ case 121: // 'element'
+ case 145: // 'function'
+ case 165: // 'item'
+ case 167: // 'json-item'
+ case 185: // 'namespace-node'
+ case 191: // 'node'
+ case 194: // 'object'
+ case 216: // 'processing-instruction'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 242: // 'structured-item'
+ case 244: // 'text'
+ lookahead2W(242); // 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 17486: // 'array' '('
+ case 17575: // 'json-item' '('
+ case 17602: // 'object' '('
+ parse_JSONTest();
+ break;
+ case 17650: // 'structured-item' '('
+ parse_StructuredItemTest();
+ break;
+ default:
+ parse_AtomicOrUnionType();
+ }
+ eventHandler.endNonterminal("ItemType", e0);
+ }
+
+ function try_ItemType()
+ {
+ switch (l1)
+ {
+ case 78: // 'array'
+ case 82: // 'attribute'
+ case 96: // 'comment'
+ case 120: // 'document-node'
+ case 121: // 'element'
+ case 145: // 'function'
+ case 165: // 'item'
+ case 167: // 'json-item'
+ case 185: // 'namespace-node'
+ case 191: // 'node'
+ case 194: // 'object'
+ case 216: // 'processing-instruction'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 242: // 'structured-item'
+ case 244: // 'text'
+ lookahead2W(242); // 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 17486: // 'array' '('
+ case 17575: // 'json-item' '('
+ case 17602: // 'object' '('
+ try_JSONTest();
+ break;
+ case 17650: // '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(252); // 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(252); // 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(260); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ if (l1 != 37) // ')'
+ {
+ whitespace();
+ parse_AttribNameOrWildcard();
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 == 41) // ','
+ {
+ shift(41); // ','
+ lookahead1W(254); // 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(260); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ if (l1 != 37) // ')'
+ {
+ try_AttribNameOrWildcard();
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 == 41) // ','
+ {
+ shiftT(41); // ','
+ lookahead1W(254); // 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(254); // 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(254); // 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(260); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ if (l1 != 37) // ')'
+ {
+ whitespace();
+ parse_ElementNameOrWildcard();
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 == 41) // ','
+ {
+ shift(41); // ','
+ lookahead1W(254); // 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(260); // EQName^Token | S^WS | '(:' | ')' | '*' | 'after' | 'allowing' | 'ancestor' |
+ if (l1 != 37) // ')'
+ {
+ try_ElementNameOrWildcard();
+ lookahead1W(101); // S^WS | '(:' | ')' | ','
+ if (l1 == 41) // ','
+ {
+ shiftT(41); // ','
+ lookahead1W(254); // 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(254); // 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(254); // 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(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_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(5, 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(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_AnyFunctionTest();
+ memoize(5, e0A, -1);
+ lk = -3;
+ }
+ 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, e0A, -2);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ try_AnyFunctionTest();
+ break;
+ case -3:
+ 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(262); // 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(262); // 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 | '$' | '(:'
+ whitespace();
+ parse_TransformSpec();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ whitespace();
+ parse_TransformSpec();
+ }
+ 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 | '$' | '(:'
+ try_TransformSpec();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(21); // S^WS | '$' | '(:'
+ try_TransformSpec();
+ }
+ 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_TransformSpec()
+ {
+ eventHandler.startNonterminal("TransformSpec", e0);
+ shift(31); // '$'
+ lookahead1W(254); // 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();
+ eventHandler.endNonterminal("TransformSpec", e0);
+ }
+
+ function try_TransformSpec()
+ {
+ shiftT(31); // '$'
+ lookahead1W(254); // 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();
+ }
+
+ 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(266); // 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(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ break;
+ default:
+ shift(183); // 'most'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ }
+ break;
+ default:
+ shift(140); // 'from'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ shift(248); // 'to'
+ lookahead1W(266); // 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(266); // 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(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_AdditiveExpr();
+ break;
+ default:
+ shiftT(183); // 'most'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_AdditiveExpr();
+ }
+ break;
+ default:
+ shiftT(140); // 'from'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_AdditiveExpr();
+ shiftT(248); // 'to'
+ lookahead1W(266); // 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(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_AdditiveExpr();
+ whitespace();
+ parse_FTUnit();
+ eventHandler.endNonterminal("FTWindow", e0);
+ }
+
+ function try_FTWindow()
+ {
+ shiftT(269); // 'window'
+ lookahead1W(266); // 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(181); // 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(181); // 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(254); // 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(254); // 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(266); // 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(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_UnionExpr();
+ }
+
+ function parse_CollectionDecl()
+ {
+ eventHandler.startNonterminal("CollectionDecl", e0);
+ shift(95); // 'collection'
+ lookahead1W(254); // 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(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_ItemType();
+ 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(254); // 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(254); // 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(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_IndexDomainExpr();
+ shift(87); // 'by'
+ lookahead1W(265); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_IndexKeySpec();
+ for (;;)
+ {
+ lookahead1W(103); // S^WS | '(:' | ',' | ';'
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(265); // 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(254); // 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(254); // 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(265); // 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(254); // 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(265); // 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(249); // 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;
+ case 78: // 'array'
+ shift(78); // 'array'
+ break;
+ case 167: // 'json-item'
+ shift(167); // 'json-item'
+ break;
+ case 242: // 'structured-item'
+ shift(242); // 'structured-item'
+ break;
+ default:
+ parse_FunctionName();
+ }
+ eventHandler.endNonterminal("EQName", e0);
+ }
+
+ function try_EQName()
+ {
+ lookahead1(249); // 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;
+ case 78: // 'array'
+ shiftT(78); // 'array'
+ break;
+ case 167: // 'json-item'
+ shiftT(167); // 'json-item'
+ break;
+ case 242: // 'structured-item'
+ shiftT(242); // 'structured-item'
+ 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;
+ case 221: // 'returning'
+ shift(221); // 'returning'
+ break;
+ case 77: // 'append'
+ shift(77); // 'append'
+ break;
+ case 166: // 'json'
+ shift(166); // 'json'
+ break;
+ default:
+ shift(194); // 'object'
+ }
+ 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;
+ case 221: // 'returning'
+ shiftT(221); // 'returning'
+ break;
+ case 77: // 'append'
+ shiftT(77); // 'append'
+ break;
+ case 166: // 'json'
+ shiftT(166); // 'json'
+ break;
+ default:
+ shiftT(194); // 'object'
+ }
+ }
+
+ 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;
+ case 221: // 'returning'
+ shift(221); // 'returning'
+ break;
+ case 77: // 'append'
+ shift(77); // 'append'
+ break;
+ case 166: // 'json'
+ shift(166); // 'json'
+ break;
+ default:
+ shift(194); // 'object'
+ }
+ 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;
+ case 221: // 'returning'
+ shiftT(221); // 'returning'
+ break;
+ case 77: // 'append'
+ shiftT(77); // 'append'
+ break;
+ case 166: // 'json'
+ shiftT(166); // 'json'
+ break;
+ default:
+ shiftT(194); // 'object'
+ }
+ }
+
+ 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(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ switch (l1)
+ {
+ case 34: // '('
+ lookahead2W(268); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 35: // '(#'
+ lookahead2(251); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ break;
+ case 46: // '/'
+ lookahead2W(283); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 47: // '//'
+ lookahead2W(264); // 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(256); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 68: // '['
+ lookahead2W(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 77: // 'append'
+ lookahead2W(199); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 82: // 'attribute'
+ lookahead2W(280); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ break;
+ case 121: // 'element'
+ lookahead2W(279); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ break;
+ case 132: // 'exit'
+ lookahead2W(202); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 137: // 'for'
+ lookahead2W(207); // 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(206); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 260: // 'validate'
+ lookahead2W(209); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 276: // '{'
+ lookahead2W(276); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 278: // '{|'
+ lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 5: // Wildcard
+ case 45: // '..'
+ lookahead2W(185); // S^WS | EOF | '!' | '!=' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ case 31: // '$'
+ case 32: // '%'
+ lookahead2W(254); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 40: // '+'
+ case 42: // '-'
+ lookahead2W(266); // 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(208); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 184: // 'namespace'
+ case 216: // 'processing-instruction'
+ lookahead2W(267); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ break;
+ case 103: // 'copy'
+ case 129: // 'every'
+ case 235: // 'some'
+ case 262: // 'variable'
+ lookahead2W(196); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 44: // '.'
+ lookahead2W(191); // S^WS | EOF | '!' | '!=' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' |
+ break;
+ case 78: // 'array'
+ case 124: // 'empty-sequence'
+ case 165: // 'item'
+ case 167: // 'json-item'
+ case 242: // 'structured-item'
+ lookahead2W(190); // 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(197); // 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 166: // 'json'
+ 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 194: // 'object'
+ 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(194); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 53 // ';'
+ && 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 != 12877 // 'append' EOF
+ && lk != 12878 // 'array' 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 != 12966 // 'json' EOF
+ && lk != 12967 // 'json-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 != 12994 // 'object' 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 != 13042 // 'structured-item' 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 != 21069 // 'append' ','
+ && lk != 21070 // 'array' ','
+ && 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 != 21158 // 'json' ','
+ && lk != 21159 // 'json-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 != 21186 // 'object' ','
+ && 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 != 21234 // 'structured-item' ','
+ && 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 != 27213 // 'append' ';'
+ && lk != 27214 // 'array' ';'
+ && 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 != 27302 // 'json' ';'
+ && lk != 27303 // 'json-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 != 27330 // 'object' ';'
+ && 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 != 27378 // 'structured-item' ';'
+ && 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 != 144461 // 'append' '}'
+ && lk != 144462 // 'array' '}'
+ && 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 != 144550 // 'json' '}'
+ && lk != 144551 // 'json-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 != 144578 // 'object' '}'
+ && 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 != 144626 // 'structured-item' '}'
+ && 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(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_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(6, e0, lk);
+ }
+ }
+ if (lk != -1
+ && lk != 53 // ';'
+ && 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 != 27213 // 'append' ';'
+ && lk != 27214 // 'array' ';'
+ && 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 != 27302 // 'json' ';'
+ && lk != 27303 // 'json-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 != 27330 // 'object' ';'
+ && 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 != 27378 // 'structured-item' ';'
+ && 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(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ switch (l1)
+ {
+ case 34: // '('
+ lookahead2W(268); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 35: // '(#'
+ lookahead2(251); // EQName^Token | S | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' |
+ break;
+ case 46: // '/'
+ lookahead2W(283); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 47: // '//'
+ lookahead2W(264); // 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(256); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 68: // '['
+ lookahead2W(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 77: // 'append'
+ lookahead2W(199); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 82: // 'attribute'
+ lookahead2W(280); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ break;
+ case 121: // 'element'
+ lookahead2W(279); // EQName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ break;
+ case 132: // 'exit'
+ lookahead2W(202); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 137: // 'for'
+ lookahead2W(207); // 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(206); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 260: // 'validate'
+ lookahead2W(209); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 276: // '{'
+ lookahead2W(276); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 278: // '{|'
+ lookahead2W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 5: // Wildcard
+ case 45: // '..'
+ lookahead2W(185); // S^WS | EOF | '!' | '!=' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ case 31: // '$'
+ case 32: // '%'
+ lookahead2W(254); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 40: // '+'
+ case 42: // '-'
+ lookahead2W(266); // 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(208); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ case 184: // 'namespace'
+ case 216: // 'processing-instruction'
+ lookahead2W(267); // NCName^Token | S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' |
+ break;
+ case 103: // 'copy'
+ case 129: // 'every'
+ case 235: // 'some'
+ case 262: // 'variable'
+ lookahead2W(196); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 8: // IntegerLiteral
+ case 9: // DecimalLiteral
+ case 10: // DoubleLiteral
+ case 11: // StringLiteral
+ case 44: // '.'
+ lookahead2W(191); // S^WS | EOF | '!' | '!=' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' | ';' |
+ break;
+ case 78: // 'array'
+ case 124: // 'empty-sequence'
+ case 165: // 'item'
+ case 167: // 'json-item'
+ case 242: // 'structured-item'
+ lookahead2W(190); // 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(197); // 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 166: // 'json'
+ 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 194: // 'object'
+ 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(194); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | ',' | '-' | '/' | '//' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk != 25 // EOF
+ && lk != 53 // ';'
+ && 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 != 12877 // 'append' EOF
+ && lk != 12878 // 'array' 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 != 12966 // 'json' EOF
+ && lk != 12967 // 'json-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 != 12994 // 'object' 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 != 13042 // 'structured-item' 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 != 21069 // 'append' ','
+ && lk != 21070 // 'array' ','
+ && 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 != 21158 // 'json' ','
+ && lk != 21159 // 'json-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 != 21186 // 'object' ','
+ && 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 != 21234 // 'structured-item' ','
+ && 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 != 27213 // 'append' ';'
+ && lk != 27214 // 'array' ';'
+ && 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 != 27302 // 'json' ';'
+ && lk != 27303 // 'json-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 != 27330 // 'object' ';'
+ && 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 != 27378 // 'structured-item' ';'
+ && 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 != 144461 // 'append' '}'
+ && lk != 144462 // 'array' '}'
+ && 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 != 144550 // 'json' '}'
+ && lk != 144551 // 'json-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 != 144578 // 'object' '}'
+ && 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 != 144626 // 'structured-item' '}'
+ && 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(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_Statement();
+ memoize(6, e0A, -1);
+ continue;
+ }
+ catch (p1A)
+ {
+ 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, e0A, -2);
+ break;
+ }
+ }
+ }
+ if (lk != -1
+ && lk != 53 // ';'
+ && 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 != 27213 // 'append' ';'
+ && lk != 27214 // 'array' ';'
+ && 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 != 27302 // 'json' ';'
+ && lk != 27303 // 'json-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 != 27330 // 'object' ';'
+ && 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 != 27378 // 'structured-item' ';'
+ && 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(188); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ case 137: // 'for'
+ lookahead2W(195); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ break;
+ case 174: // 'let'
+ lookahead2W(192); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ break;
+ case 250: // 'try'
+ lookahead2W(189); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ case 262: // 'variable'
+ lookahead2W(186); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ break;
+ case 276: // '{'
+ lookahead2W(276); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 31: // '$'
+ case 32: // '%'
+ lookahead2W(254); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 86: // 'break'
+ case 102: // 'continue'
+ lookahead2W(187); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ case 152: // 'if'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ case 267: // 'while'
+ lookahead2W(184); // 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 == 27412 // '{' ';'
+ || 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 == 39455 // '$' 'append'
+ || lk == 39456 // '%' 'append'
+ || lk == 39700 // '{' 'append'
+ || lk == 39967 // '$' 'array'
+ || lk == 39968 // '%' 'array'
+ || lk == 40212 // '{' 'array'
+ || 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 == 85023 // '$' 'json'
+ || lk == 85024 // '%' 'json'
+ || lk == 85268 // '{' 'json'
+ || lk == 85535 // '$' 'json-item'
+ || lk == 85536 // '%' 'json-item'
+ || lk == 85780 // '{' 'json-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 == 99359 // '$' 'object'
+ || lk == 99360 // '%' 'object'
+ || lk == 99604 // '{' 'object'
+ || 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 == 123935 // '$' 'structured-item'
+ || lk == 123936 // '%' 'structured-item'
+ || lk == 124180 // '{' 'structured-item'
+ || 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(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
+ {
+ 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(7, 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;
+ case 53: // ';'
+ parse_VoidStatement();
+ break;
+ default:
+ parse_ApplyStatement();
+ }
+ eventHandler.endNonterminal("Statement", e0);
+ }
+
+ function try_Statement()
+ {
+ switch (l1)
+ {
+ case 132: // 'exit'
+ lookahead2W(188); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ case 137: // 'for'
+ lookahead2W(195); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ break;
+ case 174: // 'let'
+ lookahead2W(192); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ break;
+ case 250: // 'try'
+ lookahead2W(189); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ case 262: // 'variable'
+ lookahead2W(186); // S^WS | '!' | '!=' | '#' | '$' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' |
+ break;
+ case 276: // '{'
+ lookahead2W(276); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 31: // '$'
+ case 32: // '%'
+ lookahead2W(254); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 86: // 'break'
+ case 102: // 'continue'
+ lookahead2W(187); // S^WS | '!' | '!=' | '#' | '(' | '(:' | '*' | '+' | '-' | '/' | '//' | ';' | '<' |
+ break;
+ case 152: // 'if'
+ case 243: // 'switch'
+ case 253: // 'typeswitch'
+ case 267: // 'while'
+ lookahead2W(184); // 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 == 27412 // '{' ';'
+ || 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 == 39455 // '$' 'append'
+ || lk == 39456 // '%' 'append'
+ || lk == 39700 // '{' 'append'
+ || lk == 39967 // '$' 'array'
+ || lk == 39968 // '%' 'array'
+ || lk == 40212 // '{' 'array'
+ || 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 == 85023 // '$' 'json'
+ || lk == 85024 // '%' 'json'
+ || lk == 85268 // '{' 'json'
+ || lk == 85535 // '$' 'json-item'
+ || lk == 85536 // '%' 'json-item'
+ || lk == 85780 // '{' 'json-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 == 99359 // '$' 'object'
+ || lk == 99360 // '%' 'object'
+ || lk == 99604 // '{' 'object'
+ || 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 == 123935 // '$' 'structured-item'
+ || lk == 123936 // '%' 'structured-item'
+ || lk == 124180 // '{' 'structured-item'
+ || 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(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
+ {
+ try_ApplyStatement();
+ memoize(7, e0A, -1);
+ lk = -15;
+ }
+ 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();
+ memoize(7, e0A, -2);
+ lk = -15;
+ }
+ 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();
+ memoize(7, e0A, -3);
+ lk = -15;
+ }
+ 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();
+ memoize(7, e0A, -12);
+ lk = -15;
+ }
+ 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(7, e0A, -13);
+ }
+ }
+ }
+ }
+ }
+ }
+ 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;
+ case 53: // ';'
+ try_VoidStatement();
+ break;
+ case -15:
+ 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(254); // 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(254); // 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(276); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Statements();
+ shift(282); // '}'
+ eventHandler.endNonterminal("BlockStatement", e0);
+ }
+
+ function try_BlockStatement()
+ {
+ shiftT(276); // '{'
+ lookahead1W(276); // 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(269); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("ReturnStatement", e0);
+ }
+
+ function try_ReturnStatement()
+ {
+ shiftT(220); // 'return'
+ lookahead1W(269); // 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(269); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Statement();
+ lookahead1W(48); // S^WS | '(:' | 'else'
+ shift(122); // 'else'
+ lookahead1W(269); // 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(269); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Statement();
+ lookahead1W(48); // S^WS | '(:' | 'else'
+ shiftT(122); // 'else'
+ lookahead1W(269); // 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(269); // 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(269); // 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(269); // 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(269); // 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(256); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_CatchErrorList();
+ whitespace();
+ parse_BlockStatement();
+ lookahead1W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ switch (l1)
+ {
+ case 91: // 'catch'
+ lookahead2W(278); // 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(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
+ {
+ lookahead1W(36); // S^WS | '(:' | 'catch'
+ shiftT(91); // 'catch'
+ lookahead1W(256); // 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(8, 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 != 39515 // 'catch' 'append'
+ && lk != 40027 // 'catch' 'array'
+ && 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 != 85083 // 'catch' 'json'
+ && lk != 85595 // 'catch' 'json-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 != 99419 // 'catch' 'object'
+ && 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 != 123995 // 'catch' 'structured-item'
+ && 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();
+ lookahead1W(36); // S^WS | '(:' | 'catch'
+ shiftT(91); // 'catch'
+ lookahead1W(256); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_CatchErrorList();
+ try_BlockStatement();
+ for (;;)
+ {
+ lookahead1W(277); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ switch (l1)
+ {
+ case 91: // 'catch'
+ lookahead2W(278); // 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(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
+ {
+ lookahead1W(36); // S^WS | '(:' | 'catch'
+ shiftT(91); // 'catch'
+ lookahead1W(256); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_CatchErrorList();
+ try_BlockStatement();
+ memoize(8, e0A, -1);
+ continue;
+ }
+ catch (p1A)
+ {
+ 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, e0A, -2);
+ break;
+ }
+ }
+ }
+ 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 != 39515 // 'catch' 'append'
+ && lk != 40027 // 'catch' 'array'
+ && 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 != 85083 // 'catch' 'json'
+ && lk != 85595 // 'catch' 'json-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 != 99419 // 'catch' 'object'
+ && 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 != 123995 // 'catch' 'structured-item'
+ && 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;
+ }
+ lookahead1W(36); // S^WS | '(:' | 'catch'
+ shiftT(91); // 'catch'
+ lookahead1W(256); // Wildcard | EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_CatchErrorList();
+ try_BlockStatement();
+ }
+ }
+
+ 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(254); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_VarName();
+ }
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shift(220); // 'return'
+ lookahead1W(269); // 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(254); // EQName^Token | S^WS | '(:' | 'after' | 'allowing' | 'ancestor' |
+ try_VarName();
+ }
+ lookahead1W(70); // S^WS | '(:' | 'return'
+ shiftT(220); // 'return'
+ lookahead1W(269); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Statement();
+ }
+
+ function parse_CaseStatement()
+ {
+ eventHandler.startNonterminal("CaseStatement", e0);
+ shift(88); // 'case'
+ lookahead1W(261); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ if (l1 == 31) // '$'
+ {
+ shift(31); // '$'
+ lookahead1W(254); // 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(269); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_Statement();
+ eventHandler.endNonterminal("CaseStatement", e0);
+ }
+
+ function try_CaseStatement()
+ {
+ shiftT(88); // 'case'
+ lookahead1W(261); // EQName^Token | S^WS | '$' | '%' | '(' | '(:' | 'after' | 'allowing' |
+ if (l1 == 31) // '$'
+ {
+ shiftT(31); // '$'
+ lookahead1W(254); // 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(269); // 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(254); // 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(254); // 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(254); // 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(254); // 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(269); // 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(269); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_Statement();
+ }
+
+ function parse_VoidStatement()
+ {
+ eventHandler.startNonterminal("VoidStatement", e0);
+ shift(53); // ';'
+ eventHandler.endNonterminal("VoidStatement", e0);
+ }
+
+ function try_VoidStatement()
+ {
+ shiftT(53); // ';'
+ }
+
+ function parse_ExprSingle()
+ {
+ eventHandler.startNonterminal("ExprSingle", e0);
+ switch (l1)
+ {
+ case 137: // 'for'
+ lookahead2W(235); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ break;
+ case 174: // 'let'
+ lookahead2W(232); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ break;
+ case 250: // 'try'
+ lookahead2W(231); // 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(235); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ break;
+ case 174: // 'let'
+ lookahead2W(232); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ break;
+ case 250: // 'try'
+ lookahead2W(231); // 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 77: // 'append'
+ lookahead2W(230); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 218: // 'rename'
+ lookahead2W(233); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 219: // 'replace'
+ lookahead2W(234); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 110: // 'delete'
+ case 159: // 'insert'
+ lookahead2W(236); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 103: // 'copy'
+ case 129: // 'every'
+ case 235: // 'some'
+ lookahead2W(229); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 133851) // 'replace' 'value'
+ {
+ 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
+ {
+ try_ReplaceExpr();
+ lk = -6;
+ }
+ catch (p6A)
+ {
+ 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(9, e0, lk);
+ }
+ }
+ 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 -6:
+ case 98011: // 'replace' 'node'
+ 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 -11:
+ parse_JSONReplaceExpr();
+ break;
+ case 85069: // 'append' 'json'
+ parse_JSONAppendExpr();
+ break;
+ default:
+ parse_OrExpr();
+ }
+ eventHandler.endNonterminal("ExprSimple", e0);
+ }
+
+ function try_ExprSimple()
+ {
+ switch (l1)
+ {
+ case 77: // 'append'
+ lookahead2W(230); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 218: // 'rename'
+ lookahead2W(233); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 219: // 'replace'
+ lookahead2W(234); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 110: // 'delete'
+ case 159: // 'insert'
+ lookahead2W(236); // S^WS | EOF | '!' | '!=' | '#' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' | '/' |
+ break;
+ case 103: // 'copy'
+ case 129: // 'every'
+ case 235: // 'some'
+ lookahead2W(229); // S^WS | EOF | '!' | '!=' | '#' | '$' | '(' | '(:' | ')' | '*' | '+' | ',' | '-' |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 133851) // 'replace' 'value'
+ {
+ 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
+ {
+ try_ReplaceExpr();
+ memoize(9, e0A, -6);
+ lk = -13;
+ }
+ catch (p6A)
+ {
+ 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(9, e0A, -11);
+ }
+ }
+ }
+ 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 -6:
+ case 98011: // 'replace' 'node'
+ 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 -11:
+ try_JSONReplaceExpr();
+ break;
+ case 85069: // 'append' 'json'
+ try_JSONAppendExpr();
+ break;
+ case -13:
+ break;
+ default:
+ try_OrExpr();
+ }
+ }
+
+ function parse_JSONDeleteExpr()
+ {
+ eventHandler.startNonterminal("JSONDeleteExpr", e0);
+ shift(110); // 'delete'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shift(166); // 'json'
+ lookahead1W(263); // 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(263); // EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral | StringLiteral |
+ try_PostfixExpr();
+ }
+
+ function parse_JSONInsertExpr()
+ {
+ eventHandler.startNonterminal("JSONInsertExpr", e0);
+ switch (l1)
+ {
+ case 159: // 'insert'
+ lookahead2W(56); // S^WS | '(:' | 'json'
+ break;
+ default:
+ lk = l1;
+ }
+ 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(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(11, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shiftT(211); // 'position'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ memoize(11, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(11, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1)
+ {
+ 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(10, e0, lk);
+ }
+ switch (lk)
+ {
+ case -1:
+ 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(11, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = 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 (p1B)
+ {
+ lk = -2;
+ }
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(11, 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();
+ }
+ break;
+ default:
+ shift(159); // 'insert'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shift(166); // 'json'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_PairConstructorList();
+ shift(163); // 'into'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_ExprSingle();
+ }
+ eventHandler.endNonterminal("JSONInsertExpr", e0);
+ }
+
+ function try_JSONInsertExpr()
+ {
+ switch (l1)
+ {
+ case 159: // 'insert'
+ lookahead2W(56); // S^WS | '(:' | 'json'
+ break;
+ default:
+ lk = l1;
+ }
+ 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(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(11, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shiftT(211); // 'position'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ memoize(11, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(11, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1)
+ {
+ shiftT(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shiftT(211); // 'position'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+ memoize(10, e0A, -1);
+ lk = -3;
+ }
+ 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, e0A, -2);
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ 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(11, e0);
+ if (lk == 0)
+ {
+ var b0B = b0; var e0B = e0; var l1B = l1;
+ var b1B = b1; var e1B = e1; var l2B = l2;
+ var b2B = b2; var e2B = e2;
+ try
+ {
+ shiftT(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shiftT(211); // 'position'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ memoize(11, e0B, -1);
+ }
+ catch (p1B)
+ {
+ b0 = b0B; e0 = e0B; l1 = l1B; if (l1 == 0) {end = e0B;} else {
+ b1 = b1B; e1 = e1B; l2 = l2B; if (l2 == 0) {end = e1B;} else {
+ b2 = b2B; e2 = e2B; end = e2B; }}
+ memoize(11, e0B, -2);
+ }
+ lk = -2;
+ }
+ }
+ if (lk == -1)
+ {
+ shiftT(81); // 'at'
+ lookahead1W(69); // S^WS | '(:' | 'position'
+ shiftT(211); // 'position'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_ExprSingle();
+ }
+ break;
+ case -3:
+ break;
+ default:
+ shiftT(159); // 'insert'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shiftT(166); // 'json'
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_PairConstructorList();
+ shiftT(163); // 'into'
+ 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(263); // 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(263); // 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(82); // S^WS | '(:' | 'value'
+ shift(261); // 'value'
+ lookahead1W(64); // S^WS | '(:' | 'of'
+ shift(196); // 'of'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shift(166); // 'json'
+ lookahead1W(263); // 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(82); // S^WS | '(:' | 'value'
+ shiftT(261); // 'value'
+ lookahead1W(64); // S^WS | '(:' | 'of'
+ shiftT(196); // 'of'
+ lookahead1W(56); // S^WS | '(:' | 'json'
+ shiftT(166); // 'json'
+ lookahead1W(263); // 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(257); // 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(276); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 144660) // '{' '}'
+ {
+ lk = memoized(12, 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(12, 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(257); // 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(276); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 144660) // '{' '}'
+ {
+ lk = memoized(12, 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); // '}'
+ memoize(12, e0A, -1);
+ lk = -3;
+ }
+ 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(12, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shiftT(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shiftT(282); // '}'
+ break;
+ case -3:
+ break;
+ default:
+ try_BlockExpr();
+ }
+ }
+
+ function parse_CompPIConstructor()
+ {
+ eventHandler.startNonterminal("CompPIConstructor", e0);
+ shift(216); // 'processing-instruction'
+ lookahead1W(250); // 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(276); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 144660) // '{' '}'
+ {
+ lk = memoized(13, 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(13, 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(250); // 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(276); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ default:
+ lk = l1;
+ }
+ if (lk == 144660) // '{' '}'
+ {
+ lk = memoized(13, 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); // '}'
+ memoize(13, e0A, -1);
+ lk = -3;
+ }
+ 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(13, e0A, -2);
+ }
+ }
+ }
+ switch (lk)
+ {
+ case -1:
+ shiftT(276); // '{'
+ lookahead1W(88); // S^WS | '(:' | '}'
+ shiftT(282); // '}'
+ break;
+ case -3:
+ 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(255); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 216: // 'processing-instruction'
+ lookahead2W(253); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 276: // '{'
+ lookahead2W(276); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 82: // 'attribute'
+ case 121: // 'element'
+ lookahead2W(258); // 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 77: // 'append'
+ 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 166: // 'json'
+ 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 194: // 'object'
+ 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 == 40212 // '{' 'array'
+ || 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 == 85268 // '{' 'json'
+ || lk == 85780 // '{' 'json-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 == 99604 // '{' 'object'
+ || 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 == 124180 // '{' 'structured-item'
+ || 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(14, 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(14, 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 17485: // 'append' '('
+ 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 17574: // 'json' '('
+ 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 17602: // 'object' '('
+ 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 78: // 'array'
+ case 120: // 'document-node'
+ case 124: // 'empty-sequence'
+ case 145: // 'function'
+ case 152: // 'if'
+ case 165: // 'item'
+ case 167: // 'json-item'
+ case 185: // 'namespace-node'
+ case 191: // 'node'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 242: // 'structured-item'
+ 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 14925: // 'append' '#'
+ 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 15014: // 'json' '#'
+ 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 15042: // 'object' '#'
+ 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:
+ case 27412: // '{' ';'
+ 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(255); // NCName^Token | S^WS | '#' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 216: // 'processing-instruction'
+ lookahead2W(253); // NCName^Token | S^WS | '#' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ break;
+ case 276: // '{'
+ lookahead2W(276); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ break;
+ case 82: // 'attribute'
+ case 121: // 'element'
+ lookahead2W(258); // 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 77: // 'append'
+ 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 166: // 'json'
+ 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 194: // 'object'
+ 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 == 40212 // '{' 'array'
+ || 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 == 85268 // '{' 'json'
+ || lk == 85780 // '{' 'json-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 == 99604 // '{' 'object'
+ || 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 == 124180 // '{' 'structured-item'
+ || 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(14, 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();
+ memoize(14, e0A, -10);
+ lk = -14;
+ }
+ 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(14, e0A, -11);
+ }
+ }
+ }
+ 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 17485: // 'append' '('
+ 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 17574: // 'json' '('
+ 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 17602: // 'object' '('
+ 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 78: // 'array'
+ case 120: // 'document-node'
+ case 124: // 'empty-sequence'
+ case 145: // 'function'
+ case 152: // 'if'
+ case 165: // 'item'
+ case 167: // 'json-item'
+ case 185: // 'namespace-node'
+ case 191: // 'node'
+ case 226: // 'schema-attribute'
+ case 227: // 'schema-element'
+ case 242: // 'structured-item'
+ 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 14925: // 'append' '#'
+ 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 15014: // 'json' '#'
+ 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 15042: // 'object' '#'
+ 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:
+ case 27412: // '{' ';'
+ try_BlockExpr();
+ break;
+ case -11:
+ try_ObjectConstructor();
+ break;
+ case 68: // '['
+ try_ArrayConstructor();
+ break;
+ case 278: // '{|'
+ try_JSONSimpleObjectUnion();
+ break;
+ case -14:
+ break;
+ default:
+ try_Constructor();
+ }
+ }
+
+ function parse_JSONSimpleObjectUnion()
+ {
+ eventHandler.startNonterminal("JSONSimpleObjectUnion", e0);
+ shift(278); // '{|'
+ lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 281) // '|}'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(281); // '|}'
+ eventHandler.endNonterminal("JSONSimpleObjectUnion", e0);
+ }
+
+ function try_JSONSimpleObjectUnion()
+ {
+ shiftT(278); // '{|'
+ lookahead1W(272); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 281) // '|}'
+ {
+ try_Expr();
+ }
+ shiftT(281); // '|}'
+ }
+
+ function parse_ObjectConstructor()
+ {
+ eventHandler.startNonterminal("ObjectConstructor", e0);
+ shift(276); // '{'
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 282) // '}'
+ {
+ whitespace();
+ parse_PairConstructorList();
+ }
+ shift(282); // '}'
+ eventHandler.endNonterminal("ObjectConstructor", e0);
+ }
+
+ function try_ObjectConstructor()
+ {
+ shiftT(276); // '{'
+ lookahead1W(273); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 282) // '}'
+ {
+ try_PairConstructorList();
+ }
+ shiftT(282); // '}'
+ }
+
+ function parse_PairConstructorList()
+ {
+ eventHandler.startNonterminal("PairConstructorList", e0);
+ parse_PairConstructor();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shift(41); // ','
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_PairConstructor();
+ }
+ eventHandler.endNonterminal("PairConstructorList", e0);
+ }
+
+ function try_PairConstructorList()
+ {
+ try_PairConstructor();
+ for (;;)
+ {
+ if (l1 != 41) // ','
+ {
+ break;
+ }
+ shiftT(41); // ','
+ lookahead1W(266); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_PairConstructor();
+ }
+ }
+
+ 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(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 69) // ']'
+ {
+ whitespace();
+ parse_Expr();
+ }
+ shift(69); // ']'
+ eventHandler.endNonterminal("ArrayConstructor", e0);
+ }
+
+ function try_ArrayConstructor()
+ {
+ shiftT(68); // '['
+ lookahead1W(271); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ if (l1 != 69) // ']'
+ {
+ try_Expr();
+ }
+ shiftT(69); // ']'
+ }
+
+ function parse_BlockExpr()
+ {
+ eventHandler.startNonterminal("BlockExpr", e0);
+ shift(276); // '{'
+ lookahead1W(276); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_StatementsAndOptionalExpr();
+ shift(282); // '}'
+ eventHandler.endNonterminal("BlockExpr", e0);
+ }
+
+ function try_BlockExpr()
+ {
+ shiftT(276); // '{'
+ lookahead1W(276); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ try_StatementsAndOptionalExpr();
+ shiftT(282); // '}'
+ }
+
+ function parse_FunctionDecl()
+ {
+ eventHandler.startNonterminal("FunctionDecl", e0);
+ shift(145); // 'function'
+ lookahead1W(254); // 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'
+ {
+ whitespace();
+ parse_ReturnType();
+ }
+ lookahead1W(118); // S^WS | '(:' | 'external' | '{'
+ switch (l1)
+ {
+ case 276: // '{'
+ shift(276); // '{'
+ lookahead1W(276); // Wildcard | EQName^Token | IntegerLiteral | DecimalLiteral | DoubleLiteral |
+ whitespace();
+ parse_StatementsAndOptionalExpr();
+ shift(282); // '}'
+ break;
+ default:
+ shift(133); // 'external'
+ }
+ eventHandler.endNonterminal("FunctionDecl", e0);
+ }
+
+ function parse_ReturnType()
+ {
+ eventHandler.startNonterminal("ReturnType", e0);
+ shift(79); // 'as'
+ lookahead1W(259); // EQName^Token | S^WS | '%' | '(' | '(:' | 'after' | 'allowing' | 'ancestor' |
+ whitespace();
+ parse_SequenceType();
+ eventHandler.endNonterminal("ReturnType", e0);
+ }
+
+ 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)
+ {
+ eventHandler.whitespace(e0, b1);
+ e0 = b1;
+ }
+ }
+
+ 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;
+ }
+
+ function error(b, e, s, l, t)
+ {
+ if (e >= ex)
+ {
+ bx = b;
+ ex = e;
+ sx = s;
+ lx = l;
+ tx = t;
+ }
+ throw new self.ParseException(bx, ex, sx, lx, tx);
+ }
+
+ var lk, b0, e0;
+ var l1, b1, e1;
+ var l2, b2, e2;
+ var bx, ex, sx, lx, tx;
+ var eventHandler;
+ var memo;
+
+ 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;
+ }
+
+ var input;
+ var size;
+ var begin;
+ var end;
+
+ function match(tokenSetId)
+ {
+ var nonbmp = false;
+ begin = end;
+ var current = end;
+ var result = XQueryParser.INITIAL[tokenSetId];
+ var state = 0;
+
+ 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;
+ charclass = XQueryParser.MAP1[(c0 & 15) + XQueryParser.MAP1[(c1 & 31) + XQueryParser.MAP1[c1 >> 5]]];
+ }
+ 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;
+ code = XQueryParser.TRANSITION[(i0 & 15) + XQueryParser.TRANSITION[i0 >> 4]];
+
+ 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;
+ return 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;
+ }
+}
+
+XQueryParser.getTokenSet = function(tokenSetId)
+{
+ var set = [];
+ var s = tokenSetId < 0 ? - tokenSetId : XQueryParser.INITIAL[tokenSetId] & 4095;
+ for (var i = 0; i < 284; i += 32)
+ {
+ var j = i;
+ var i0 = (i >> 5) * 3612 + s - 1;
+ var i1 = i0 >> 2;
+ var i2 = i1 >> 2;
+ var f = XQueryParser.EXPECTED[(i0 & 3) + XQueryParser.EXPECTED[(i1 & 3) + XQueryParser.EXPECTED[(i2 & 15) + XQueryParser.EXPECTED[i2 >> 4]]]];
+ for ( ; f != 0; f >>>= 1, ++j)
+ {
+ if ((f & 1) != 0)
+ {
+ set.push(XQueryParser.TOKEN[j]);
+ }
+ }
+ }
+ return set;
+};
+
+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, 285, 286
+];
+
+XQueryParser.TRANSITION =
+[ 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25307, 18176, 18180, 18180, 18180, 18210, 18180, 18180, 18180, 18180, 18222, 18180, 18180, 18180, 18180, 18198, 18180, 18182, 18238, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 38672, 38672, 38672, 38672, 30470, 38672, 38672, 38672, 38672, 42922, 38623, 20771, 20784, 20796, 20808, 43870, 38625, 20832, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 28718, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19553, 19028, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22954, 20869, 38672, 38672, 38672, 37958, 38672, 38672, 36976, 20909, 20888, 38672, 38672, 38672, 38672, 39926, 20282, 20925, 20958, 38672, 38672, 38672, 43215, 38672, 38672, 25928, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 20997, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 21013, 21118, 38672, 38672, 38672, 24651, 38672, 38672, 44696, 38672, 42922, 38824, 21095, 21058, 21048, 21080, 21111, 48022, 20832, 38672, 38672, 38672, 43215, 21139, 38672, 25530, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 21157, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 18776, 18792, 20360, 18810, 18830, 18835, 19257, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 38666, 38672, 38672, 38672, 21880, 38671, 38672, 36460, 38672, 21173, 38661, 21224, 38672, 21231, 38672, 42738, 42750, 20832, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 38672, 38672, 38672, 38672, 30470, 21247, 38672, 38672, 38672, 28875, 38672, 38672, 21266, 38672, 38672, 21288, 21300, 20832, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 38672, 38672, 38672, 38672, 30470, 38672, 38672, 38672, 38672, 31059, 38672, 38672, 38672, 38672, 38672, 38672, 24860, 21316, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 18988, 50434, 18503, 18525, 21353, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 24749, 21390, 38672, 38672, 38672, 23220, 38672, 38672, 49687, 45814, 21411, 38672, 38672, 38672, 38672, 41859, 18366, 21448, 21478, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 21515, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 46185, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 21462, 21573, 21537, 21537, 21537, 21580, 21532, 21537, 21542, 21615, 21558, 21644, 21596, 21609, 21631, 21657, 21669, 21681, 20832, 38672, 38672, 38672, 21337, 38672, 38672, 50505, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 45351, 38672, 18269, 42564, 21697, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 30462, 38672, 38672, 38672, 22025, 23251, 38672, 22249, 23257, 42922, 30462, 38672, 21719, 21725, 21741, 21766, 21750, 21795, 38672, 38672, 38672, 46035, 38672, 38672, 50505, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 45351, 38672, 18269, 42564, 30475, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 24785, 38672, 38672, 38672, 30470, 38672, 38672, 38672, 37115, 50393, 21856, 21832, 21850, 21834, 21872, 21896, 21908, 20832, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 21924, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 38672, 38672, 38672, 38672, 30470, 38672, 38672, 38672, 37301, 25812, 27394, 21985, 22003, 21985, 22017, 27392, 21987, 20832, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 45351, 38672, 18269, 42564, 29641, 38672, 42072, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 20981, 38672, 38672, 38672, 30470, 24643, 38672, 48413, 22054, 26165, 22041, 22070, 22074, 22074, 22090, 20979, 48442, 20832, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22114, 38672, 38672, 38672, 38672, 30470, 38672, 38672, 38672, 38672, 42922, 47221, 22137, 22155, 22137, 22169, 47219, 22139, 22193, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 22230, 38672, 22247, 38672, 29641, 22265, 42072, 33771, 38672, 38672, 38672, 38672, 26929, 22475, 35267, 22475, 22475, 36544, 42277, 22411, 22411, 33858, 26727, 37227, 26727, 26727, 35540, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 18609, 24891, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 33803, 21432, 38031, 38672, 38672, 38672, 38672, 38672, 22291, 38672, 26931, 22311, 22475, 22475, 22475, 22475, 33849, 22352, 22411, 35447, 22411, 22411, 33324, 22381, 26727, 45449, 26727, 26727, 32918, 33802, 38672, 38672, 38672, 38672, 30028, 38672, 38672, 22475, 36607, 22475, 22475, 28015, 33854, 22411, 22410, 22411, 22411, 27851, 26727, 45441, 26727, 26727, 22521, 33795, 38672, 38672, 22807, 38672, 38672, 28255, 22475, 22475, 38505, 29442, 22411, 22411, 34626, 26485, 26727, 26727, 26860, 26998, 22647, 38672, 38672, 22428, 26931, 48359, 22475, 42142, 32794, 22411, 28347, 37402, 26727, 22521, 32486, 38672, 18915, 38672, 22451, 22474, 36860, 37042, 22411, 22492, 22517, 22520, 26312, 34036, 26929, 42625, 42144, 35207, 26975, 22537, 26310, 35759, 22589, 36765, 22624, 22640, 22663, 22685, 22706, 39617, 42139, 28345, 26456, 39814, 47009, 22727, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 38672, 38672, 38672, 38672, 30470, 38672, 38672, 38672, 23092, 42922, 38672, 38672, 38672, 38672, 38672, 31140, 31152, 22751, 38672, 38672, 38672, 43215, 38672, 38672, 26131, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 27937, 27268, 22230, 38672, 38672, 38672, 29641, 38672, 40144, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 36544, 22411, 22411, 22411, 33858, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 18609, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 33803, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 33802, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 28015, 33854, 22411, 22411, 22411, 22411, 27851, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 22803, 38672, 38672, 38672, 22886, 38672, 38672, 38672, 38672, 42922, 36439, 22823, 22844, 22866, 22878, 36438, 22828, 20832, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 41329, 38672, 22902, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 22923, 38672, 38672, 38672, 30470, 38672, 38672, 38672, 23115, 42922, 38672, 38672, 38672, 38672, 38672, 26339, 22940, 22970, 38672, 38672, 38672, 43215, 38672, 38672, 23007, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 47631, 27268, 22230, 38672, 38672, 38672, 29641, 38672, 48650, 23029, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 36544, 22411, 22411, 22411, 33858, 26727, 26727, 26727, 26727, 30990, 42723, 23085, 38672, 38672, 38672, 38672, 38672, 23048, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 23072, 23108, 38672, 38672, 38672, 38672, 38672, 48411, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 46833, 22411, 22411, 22411, 22411, 22411, 47864, 26727, 26727, 26727, 26727, 26727, 32918, 41804, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 43252, 33854, 22411, 22411, 22411, 22411, 48185, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 23131, 22411, 22411, 22411, 36778, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 18878, 38672, 38672, 38672, 35592, 32963, 38672, 38672, 23153, 42922, 37950, 35335, 23190, 23196, 23212, 38672, 41919, 23236, 23274, 38672, 38672, 45078, 23291, 38672, 50505, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 25157, 23483, 23350, 24209, 23309, 45351, 38672, 18269, 42564, 28228, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19821, 23376, 23336, 23369, 23392, 24203, 23434, 23465, 24172, 23726, 19833, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 18729, 23481, 23642, 24581, 23499, 23504, 24048, 23353, 23520, 23933, 23353, 24164, 23917, 24518, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 23536, 23854, 23815, 23561, 23577, 23632, 24450, 24255, 23689, 23658, 23674, 23716, 23742, 24268, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 23773, 23804, 23842, 24040, 23870, 23886, 23449, 23700, 23902, 23320, 23949, 23992, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 24027, 23545, 23592, 24064, 24137, 24459, 24094, 24110, 23407, 20069, 47383, 20010, 46515, 35979, 20039, 20679, 24126, 24567, 24482, 24153, 24188, 23616, 24225, 20191, 20207, 20223, 20259, 20298, 20337, 24284, 24078, 24374, 24300, 24330, 24314, 23418, 20424, 20452, 20468, 24361, 23826, 23606, 24390, 24419, 20532, 24435, 24475, 24498, 24628, 20608, 23750, 23928, 24403, 20644, 23757, 24508, 20660, 20054, 24345, 20695, 24537, 24597, 24613, 24552, 23788, 24240, 23964, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 39906, 38672, 38672, 38672, 30470, 24672, 38672, 38672, 24667, 26611, 24688, 24695, 24695, 24695, 24711, 26910, 24735, 20832, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 24765, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 20739, 24828, 48943, 18855, 18871, 18894, 40258, 24858, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19087, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 24876, 24922, 24938, 19905, 19631, 19046, 24954, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 24970, 18446, 19976, 19994, 19525, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 38672, 38672, 38672, 38672, 30470, 38672, 38672, 38672, 38672, 21250, 35576, 24999, 24999, 24999, 35584, 31668, 31680, 20832, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 38672, 38672, 25271, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 19887, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 50381, 27744, 38672, 38672, 38672, 30470, 38672, 38672, 38672, 38672, 42922, 40452, 25015, 25015, 25015, 25023, 27746, 40454, 20832, 25047, 38672, 38672, 43215, 38672, 38672, 50505, 38672, 38672, 25065, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 20310, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 50286, 50295, 38672, 38672, 38672, 23056, 38672, 38672, 38672, 38672, 42922, 44048, 25088, 25088, 25088, 25096, 46630, 44050, 25120, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 38672, 38672, 18699, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 25136, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 25152, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25173, 38672, 38672, 38672, 38672, 30470, 25218, 38672, 38672, 21395, 32346, 38672, 38672, 38672, 25210, 25237, 21393, 25221, 25256, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 22214, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19206, 20349, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 38672, 38672, 38672, 38672, 30470, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 38672, 41563, 25293, 20832, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 44448, 27298, 33333, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 25375, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 48405, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 30349, 25414, 38672, 38672, 38672, 38672, 38672, 48411, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 41804, 38672, 38672, 38672, 38672, 34976, 38672, 38672, 22475, 22475, 22475, 22475, 33754, 33854, 22411, 22411, 22411, 22411, 31454, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 23131, 22411, 22411, 22411, 36778, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 25437, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 44448, 27298, 33333, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 25375, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 48405, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 30349, 25414, 38672, 38672, 38672, 38672, 38672, 48411, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 41804, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 33754, 33854, 22411, 22411, 22411, 22411, 31454, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 23131, 22411, 22411, 22411, 36778, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 44448, 27298, 33333, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 25375, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 48405, 30057, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 30349, 25414, 38672, 38672, 38672, 38672, 38672, 48411, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 41804, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 33754, 33854, 22411, 22411, 22411, 22411, 31454, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 23131, 22411, 22411, 22411, 36778, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 44448, 27298, 33333, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 25375, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 48405, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 30349, 25414, 38672, 38672, 38672, 38672, 38672, 25455, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 41804, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 33754, 33854, 22411, 22411, 22411, 22411, 31454, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 23131, 22411, 22411, 22411, 36778, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 44448, 27298, 33333, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 40102, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 25375, 38672, 38672, 38672, 29641, 38672, 49130, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 48405, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 30349, 25414, 38672, 38672, 38672, 38672, 38672, 48411, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 41804, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 33754, 33854, 22411, 22411, 22411, 22411, 31454, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 23131, 22411, 22411, 22411, 36778, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 44448, 27298, 33333, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 25375, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 33803, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 33802, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 28015, 33854, 22411, 22411, 22411, 22411, 27851, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 44448, 27298, 33333, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 25482, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 33803, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 33802, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 28015, 33854, 22411, 22411, 22411, 22411, 27851, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 44448, 27298, 33333, 25500, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 25375, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 33803, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 33802, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 28015, 33854, 22411, 22411, 22411, 22411, 27851, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38220, 38672, 38672, 38672, 44448, 27298, 33333, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 25375, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 25563, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 33803, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 33802, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 28015, 33854, 22411, 22411, 22411, 22411, 27851, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 28464, 25582, 25594, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 25375, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 33803, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 33802, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 28015, 33854, 22411, 22411, 22411, 22411, 27851, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 44448, 27298, 33333, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 25375, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 33803, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 33802, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 28015, 33854, 22411, 22411, 22411, 22411, 27851, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 21426, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25610, 38672, 38672, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 44448, 27298, 33333, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 25375, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 33803, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 33802, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 28015, 33854, 22411, 22411, 22411, 22411, 27851, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 38672, 38672, 38672, 38672, 30470, 38672, 38672, 38672, 38672, 42922, 44752, 25631, 25649, 25671, 25683, 44753, 25633, 20832, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 35735, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 25717, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 38672, 38672, 38672, 38672, 30470, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 38672, 38672, 24860, 20832, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 38672, 38672, 38672, 38672, 30470, 38672, 38672, 38672, 38672, 42922, 31997, 38672, 25754, 25760, 25776, 23293, 41839, 20832, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 25800, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 25828, 20548, 20592, 20589, 50171, 25844, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 25049, 38672, 38672, 38672, 22098, 25865, 25896, 25377, 25881, 25913, 30410, 30418, 25964, 25978, 25990, 26006, 26018, 25344, 45647, 38672, 26034, 48091, 26052, 33210, 26086, 26116, 26153, 26223, 35321, 26181, 25701, 26211, 26248, 26264, 43583, 44602, 26280, 26296, 26329, 38672, 38672, 38672, 30176, 26355, 38925, 41958, 22850, 24803, 38672, 44654, 30480, 22475, 22475, 22475, 36601, 25393, 22411, 22411, 43601, 22690, 26727, 26727, 26727, 39641, 30990, 39463, 38672, 43148, 28319, 38672, 29724, 26374, 19326, 38672, 38672, 32428, 40296, 38574, 45608, 22475, 22475, 26394, 26439, 26475, 26509, 22411, 37859, 28780, 26529, 38451, 26727, 26727, 43300, 45056, 22573, 30349, 25414, 26545, 38672, 26563, 38672, 40287, 48411, 38672, 26599, 35364, 28653, 26627, 31403, 45616, 49789, 33849, 44356, 22411, 30609, 28411, 41138, 33324, 35718, 26727, 47625, 44193, 29223, 41749, 42781, 38094, 28940, 38672, 21816, 21032, 26644, 38672, 47420, 26664, 22475, 41307, 22336, 31195, 39296, 22411, 22411, 26685, 31454, 47988, 26726, 26727, 30787, 32911, 36940, 26744, 38697, 46064, 38672, 26779, 26799, 26821, 22787, 22475, 23131, 26837, 37515, 22411, 36778, 26853, 26876, 26727, 33519, 46887, 26926, 38672, 38672, 26931, 37355, 35081, 26947, 38899, 38878, 26969, 48550, 26727, 26994, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 38555, 27014, 22600, 47761, 48246, 27057, 27076, 27094, 27113, 28343, 26456, 27133, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 27153, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 39378, 27172, 38672, 27196, 27202, 27218, 27234, 27246, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 27262, 42259, 26453, 27284, 27268, 25375, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 46100, 48405, 27326, 25277, 38672, 38672, 28258, 22475, 22475, 22475, 37137, 27346, 22411, 22411, 22411, 22411, 39760, 37334, 26727, 26727, 26727, 26727, 27410, 32919, 30349, 25414, 38672, 38672, 38672, 38672, 38672, 48411, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 41804, 38672, 38672, 27435, 38672, 38672, 33108, 38672, 49441, 22475, 22475, 22475, 38002, 42895, 22411, 22411, 22411, 22411, 27454, 27481, 26727, 26727, 26727, 43058, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 23131, 22411, 22411, 22411, 36778, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 46997, 37168, 35831, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 27504, 38672, 38672, 22098, 38672, 27541, 38672, 27559, 23976, 27578, 27586, 27602, 27617, 27629, 27645, 27657, 25344, 38672, 38672, 27676, 44992, 38672, 22924, 38672, 38672, 38672, 38672, 38672, 38672, 27673, 50511, 27692, 47251, 26513, 26453, 41246, 27710, 25375, 29768, 38672, 38672, 32334, 38672, 27740, 38672, 27762, 27784, 38672, 25948, 27789, 27805, 27821, 22475, 22475, 27840, 27878, 22411, 22411, 22690, 27915, 27931, 26727, 26727, 30990, 39463, 44557, 38672, 38672, 44934, 38672, 38225, 48405, 33126, 27953, 38672, 38672, 27694, 47073, 35424, 37245, 22475, 35786, 48497, 47338, 42686, 30280, 22411, 37334, 37394, 27977, 27995, 43743, 26727, 32919, 30349, 25414, 38672, 38672, 24003, 38672, 30096, 48411, 38672, 38672, 26931, 22475, 22475, 22475, 28013, 28031, 33849, 22411, 22411, 22411, 28053, 28070, 33324, 26727, 26727, 26727, 28092, 28109, 32918, 41804, 28131, 38672, 38672, 49206, 38672, 28149, 38672, 22475, 22475, 22475, 22780, 33754, 33854, 22411, 22411, 42031, 22411, 31454, 26727, 26727, 26727, 28171, 22521, 33795, 38672, 38672, 31346, 38672, 46687, 21493, 22475, 28191, 22475, 23131, 22411, 30274, 22411, 36778, 26727, 35228, 26727, 31599, 28213, 38672, 38672, 38672, 28250, 28274, 47411, 42142, 28296, 31494, 28347, 36728, 31954, 22521, 26313, 38672, 38672, 28317, 27136, 22475, 28335, 22411, 36897, 26977, 26727, 22564, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 28363, 28379, 28427, 28480, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 28504, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 24521, 38672, 38672, 22098, 38672, 28530, 45484, 38672, 46575, 28549, 28557, 28573, 28587, 28595, 28611, 28623, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 19750, 26547, 38672, 26546, 19755, 28639, 42141, 48492, 27360, 44280, 27268, 25375, 29257, 27180, 28679, 29641, 21703, 38672, 25730, 38672, 38083, 42329, 28697, 28734, 27137, 27824, 36531, 43498, 28750, 22608, 46434, 28774, 46408, 28796, 28814, 28833, 26727, 28849, 39463, 38672, 38672, 38672, 25738, 38672, 29761, 48405, 38672, 38672, 38672, 19698, 28258, 22475, 22475, 22475, 27023, 35786, 22411, 22411, 22411, 22411, 28891, 37334, 26727, 26727, 26727, 26727, 28912, 43066, 28929, 28956, 38672, 38672, 33876, 38672, 28992, 48411, 38672, 38672, 29009, 29030, 27032, 22475, 22475, 22669, 33849, 29109, 45393, 22411, 22411, 32729, 33324, 29133, 37067, 26727, 26727, 34717, 32918, 41804, 38672, 38672, 38672, 38672, 38672, 29157, 38672, 29181, 22475, 22475, 29202, 33754, 43112, 22411, 22411, 32083, 22411, 34472, 29222, 26727, 26727, 29239, 22521, 33795, 38672, 29256, 29273, 38672, 29294, 28255, 32383, 27117, 29315, 23131, 44876, 34578, 42252, 36778, 44915, 26727, 29337, 26998, 46887, 21810, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 29370, 38672, 27136, 22475, 29387, 22411, 41041, 26977, 26727, 43751, 26312, 34036, 26929, 22475, 42144, 22411, 29411, 29240, 26310, 35759, 22476, 22411, 26978, 48196, 29430, 26953, 38544, 39617, 34809, 33567, 37775, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38673, 29464, 38672, 22098, 22435, 29483, 38672, 29506, 26195, 29530, 29540, 29556, 29570, 29582, 29598, 29610, 25344, 38672, 29626, 25072, 29668, 50094, 29711, 40102, 40331, 29748, 21064, 29784, 29812, 29843, 29873, 29903, 29919, 29957, 26423, 29973, 30010, 25375, 30044, 30091, 38782, 30112, 30134, 26137, 30161, 38672, 38672, 26583, 38672, 26929, 39099, 30212, 36878, 44806, 30228, 43650, 28758, 46842, 30244, 46765, 30296, 30317, 30336, 30384, 39463, 20089, 31354, 30434, 38799, 41183, 30450, 30496, 38672, 30542, 30564, 29278, 30580, 39823, 30631, 28663, 42103, 30647, 30685, 30712, 30766, 30811, 30837, 34161, 30878, 30901, 34681, 30930, 30980, 31006, 31022, 25414, 31049, 38672, 18321, 49090, 31075, 31094, 31128, 34195, 32584, 46802, 31168, 22475, 33645, 42347, 31190, 47486, 31211, 22411, 47598, 49959, 31232, 32841, 31257, 26727, 39569, 42011, 31278, 31335, 49499, 35851, 39273, 31370, 43966, 34186, 21188, 33468, 37601, 29186, 31389, 31426, 42239, 40895, 22411, 31442, 31481, 31454, 31519, 31539, 30795, 31561, 31595, 33795, 38672, 48757, 39401, 38672, 30196, 28255, 39519, 43549, 31615, 23131, 34822, 47675, 31635, 36778, 22546, 47769, 31572, 26998, 46887, 39201, 31656, 18290, 31696, 31734, 31750, 31772, 31808, 31845, 31869, 31903, 37385, 31919, 31970, 26378, 18593, 32021, 48908, 39526, 44237, 32042, 32063, 32099, 48723, 41712, 26312, 41270, 26929, 22475, 32144, 22411, 32167, 44894, 26310, 32185, 46276, 40692, 44326, 31465, 20435, 32208, 32228, 32248, 32274, 32295, 32319, 32362, 32399, 32415, 28257, 28345, 26459, 32457, 32473, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 32509, 38672, 22098, 32530, 32548, 43771, 30190, 32600, 32630, 38672, 32616, 32654, 32662, 32678, 32690, 25344, 38672, 38672, 48277, 43215, 38672, 38672, 38672, 38672, 29732, 38672, 38672, 32706, 29731, 26036, 33631, 42208, 32724, 38438, 44280, 27268, 25375, 21272, 38672, 38672, 31985, 38672, 38672, 38672, 26576, 32745, 36837, 38672, 26929, 32766, 22475, 22475, 22475, 32810, 32857, 22411, 22411, 22690, 27419, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 48405, 38672, 38672, 40108, 38672, 28258, 22475, 22475, 22475, 42113, 35786, 22411, 22411, 22411, 22411, 32877, 37334, 26727, 26727, 26727, 26728, 26727, 32919, 30349, 25414, 38672, 38672, 38672, 38672, 38672, 48411, 32026, 38672, 26931, 22475, 22475, 46869, 22475, 22475, 33849, 22411, 22411, 39678, 22411, 22411, 33324, 26727, 26727, 41099, 26727, 26727, 32918, 41804, 38672, 38672, 38672, 38672, 38672, 30118, 38672, 22475, 22475, 22475, 42121, 33754, 33854, 22411, 22411, 48685, 22411, 31454, 26727, 26727, 26727, 46758, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 23131, 22411, 22411, 22411, 36778, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 36404, 38672, 38672, 38672, 44299, 22475, 42143, 31823, 22411, 32169, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 27097, 32897, 36362, 47020, 32935, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 22098, 38672, 25031, 38672, 38672, 43445, 32979, 32987, 33003, 33009, 33025, 33041, 33053, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 29467, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 33069, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 33103, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 33124, 38672, 18284, 28258, 22475, 22475, 22475, 22475, 40837, 22411, 22411, 22411, 22411, 22411, 34394, 26727, 26727, 26727, 26727, 26727, 32919, 33803, 38672, 38672, 38672, 33142, 38672, 33163, 42808, 38672, 42803, 38566, 22475, 22475, 37994, 22475, 22475, 33849, 22411, 22411, 47479, 22411, 22411, 33324, 26727, 26727, 31312, 26727, 26727, 41720, 33181, 38672, 38672, 34958, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 28015, 33854, 22411, 22411, 22411, 22411, 27851, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 34949, 49071, 38672, 28255, 22475, 22475, 29048, 29442, 22411, 22411, 43834, 26485, 26727, 26727, 49882, 26998, 33184, 33200, 40222, 33234, 22991, 22475, 33277, 33313, 50063, 43479, 33349, 26727, 33377, 32128, 26313, 33405, 26648, 22985, 33423, 33443, 35387, 48797, 34523, 33492, 40922, 33514, 26312, 34036, 46959, 32375, 33535, 33554, 33575, 35236, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 28488, 33591, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 44448, 27298, 33333, 25344, 32005, 38672, 38672, 33617, 38672, 38672, 38672, 30064, 38672, 30073, 38672, 30064, 33661, 30069, 38721, 42958, 22411, 33692, 33700, 33716, 25375, 38672, 38672, 25941, 29641, 33732, 20082, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 33752, 25393, 22411, 22411, 23137, 22690, 26727, 26727, 26727, 49362, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25615, 38672, 33770, 28258, 22475, 22475, 22475, 22475, 40491, 22411, 22411, 22411, 22411, 22411, 40736, 26727, 26727, 26727, 26727, 26727, 33787, 33803, 33407, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 33819, 48351, 22475, 22475, 22475, 22475, 33849, 46363, 22411, 22411, 22411, 22411, 33324, 48523, 26727, 26727, 26727, 26727, 32918, 33802, 38672, 38672, 48282, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 33840, 33854, 22411, 22411, 22411, 28403, 27851, 26727, 26727, 26727, 43360, 22521, 33795, 38672, 38672, 42813, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 33874, 21141, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 33892, 34036, 21208, 22475, 46215, 22411, 33914, 26727, 33935, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 42795, 38672, 22098, 25439, 25194, 32493, 40646, 40656, 38304, 38312, 33959, 33974, 33986, 34002, 34014, 25344, 38672, 38672, 38672, 49261, 33079, 38672, 38672, 23275, 34030, 34052, 38672, 34078, 34127, 34177, 34211, 38408, 34239, 34258, 29354, 34285, 25375, 38672, 38672, 36069, 29641, 38672, 34301, 38672, 38672, 38672, 34327, 24011, 26929, 47957, 34366, 22475, 34410, 34439, 34460, 34488, 32881, 44853, 22711, 39788, 26727, 49664, 34508, 39463, 38672, 28969, 45656, 28681, 19706, 18253, 38672, 26070, 26232, 47650, 46594, 28258, 42618, 22475, 45107, 34547, 44588, 22411, 34575, 22411, 34594, 34618, 34642, 27997, 26727, 35481, 34668, 34697, 32919, 33803, 38672, 38672, 38672, 44387, 34733, 34759, 38672, 38672, 38672, 26931, 34796, 22475, 22475, 22475, 34845, 34862, 31216, 22411, 22411, 37262, 22411, 34878, 31262, 26727, 26727, 28913, 26727, 34894, 33802, 38672, 34931, 35005, 30145, 35033, 35049, 30548, 35079, 26669, 35097, 35117, 35142, 44418, 22411, 35167, 35192, 43624, 31718, 26727, 43013, 39321, 47169, 35252, 30750, 31033, 38672, 35289, 35307, 35357, 32192, 22475, 35380, 35403, 34559, 22411, 35440, 35463, 30821, 35479, 35497, 35530, 35556, 35608, 38672, 38672, 24906, 47811, 35630, 37839, 28037, 35670, 48379, 27078, 35705, 48704, 22521, 26313, 33898, 38672, 35734, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 28514, 35751, 26929, 35782, 35802, 36916, 32303, 49941, 26310, 49171, 22476, 22411, 26978, 48196, 35867, 35883, 35899, 35915, 42139, 28345, 26456, 28257, 28343, 26456, 35951, 36348, 35941, 33538, 36362, 36357, 34905, 35967, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 33252, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38672, 20573, 33260, 46302, 45557, 36019, 36031, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 25375, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 34780, 22475, 25393, 22411, 22411, 36047, 22690, 26727, 26727, 36130, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 33803, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 33802, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 28015, 33854, 22411, 22411, 22411, 22411, 27851, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 20243, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 44448, 27298, 33333, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 36066, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 25375, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 33803, 45849, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26931, 36085, 22475, 22475, 22475, 22475, 33849, 36106, 22411, 22411, 22411, 22411, 33324, 36126, 26727, 26727, 26727, 26727, 32918, 33802, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 28015, 33854, 22411, 22411, 22411, 22411, 27851, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 19729, 38672, 22098, 38672, 39473, 38672, 44217, 36146, 36184, 36196, 36212, 36218, 36234, 36250, 36262, 25344, 38672, 36278, 38672, 43215, 38672, 25421, 18575, 38672, 27438, 38672, 38672, 46139, 36299, 48111, 34141, 26409, 36335, 39145, 44169, 36378, 36420, 36455, 38672, 29371, 36476, 38672, 27543, 38672, 36498, 35844, 31373, 34743, 36516, 40527, 36565, 29321, 36586, 36623, 36646, 22411, 36676, 29093, 36714, 29346, 28817, 43388, 36750, 36802, 37724, 36836, 38672, 38672, 38672, 26061, 38672, 38672, 38672, 38672, 38672, 28258, 36853, 42951, 22475, 36876, 38513, 34492, 36894, 36913, 40984, 22411, 43282, 35514, 28798, 26727, 43717, 26727, 36932, 33803, 38672, 38672, 36956, 38672, 38672, 18909, 32575, 38672, 38672, 26931, 22475, 22475, 41976, 35273, 36992, 33849, 22411, 22411, 45307, 44424, 37025, 33324, 26727, 26727, 40875, 39885, 37058, 32918, 33802, 34967, 38672, 38672, 32750, 38672, 38672, 38672, 22475, 38401, 22475, 22475, 28015, 33854, 34444, 22411, 22411, 22411, 27851, 26727, 37091, 26727, 26727, 22521, 33795, 37110, 34940, 38672, 46173, 45770, 29014, 37131, 22475, 22475, 37153, 29988, 22411, 22411, 37195, 37219, 26727, 26727, 36392, 46887, 38346, 38672, 39265, 26931, 22475, 37243, 42142, 22411, 37261, 28347, 26727, 37278, 22521, 26313, 38672, 37296, 38672, 27136, 22475, 37317, 22411, 48861, 26977, 26727, 48595, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 35925, 29395, 39608, 37350, 37371, 26459, 33538, 37783, 48331, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 41939, 38672, 22098, 38672, 25566, 38672, 38672, 29887, 39046, 39054, 37418, 37432, 37440, 37456, 37468, 25500, 38672, 37493, 38672, 43215, 38672, 28533, 38672, 38672, 27562, 38672, 38672, 37494, 37484, 23258, 20853, 42141, 37510, 47612, 44280, 27268, 25375, 38672, 29490, 38672, 29641, 38672, 37531, 37550, 38672, 38672, 38672, 37570, 27517, 39732, 22475, 40520, 37590, 25393, 37627, 22412, 37898, 37646, 31523, 26727, 48530, 31241, 31792, 37683, 37699, 24812, 38672, 37723, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28258, 37740, 22475, 37799, 22475, 35786, 45030, 31853, 36110, 22411, 22411, 37334, 31545, 34712, 40790, 26727, 26727, 32919, 33803, 38672, 21024, 48965, 38672, 38672, 33943, 28155, 37816, 38672, 26931, 46335, 37834, 22475, 27041, 22475, 34377, 49011, 37855, 22411, 33297, 22411, 27890, 39339, 37875, 26727, 27899, 26727, 32918, 33802, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 28015, 33854, 22411, 22411, 22411, 22411, 27851, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 48203, 38672, 38672, 38672, 26931, 29057, 22475, 42142, 32786, 22411, 28347, 22555, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 37895, 26977, 49110, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 37914, 31619, 41895, 26978, 37938, 37974, 41757, 45432, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 36549, 37075, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 25240, 38672, 24719, 38672, 46651, 38018, 25104, 38054, 38118, 38157, 38142, 38161, 38126, 38177, 38189, 25344, 38672, 45759, 49561, 49547, 38205, 49199, 38672, 38241, 38259, 34062, 38289, 38328, 38371, 38273, 38387, 38424, 38467, 39556, 38529, 27268, 25375, 40213, 38672, 38672, 38590, 21779, 38672, 38614, 38641, 21123, 43234, 38689, 38713, 41522, 39725, 26628, 22475, 25393, 38737, 22411, 29117, 22690, 32232, 31319, 26727, 38753, 34652, 38772, 35341, 38672, 38798, 38815, 38672, 38672, 40618, 38672, 38672, 38672, 38840, 33601, 40485, 22475, 38858, 22475, 35786, 47683, 38876, 40856, 22411, 22411, 37334, 32114, 26727, 42187, 26727, 26727, 32919, 33803, 38672, 38672, 38672, 38672, 24776, 38672, 36500, 33087, 26755, 48300, 22475, 22475, 22475, 46796, 41600, 49410, 22411, 22411, 22411, 38894, 29994, 47730, 26727, 26727, 26727, 46465, 44085, 32918, 33802, 38915, 38949, 38972, 38992, 38672, 39015, 39031, 44824, 39070, 29039, 39086, 28015, 33854, 39115, 39131, 22365, 39171, 27851, 40395, 48234, 48581, 49654, 22521, 39190, 33147, 39225, 26763, 39254, 38337, 41515, 31410, 48668, 36570, 39289, 44624, 49920, 36050, 39312, 46490, 26727, 39337, 39355, 46887, 39394, 38672, 20942, 22766, 22475, 39417, 21499, 22411, 39448, 25398, 26727, 39489, 22521, 47568, 38672, 38672, 46680, 45512, 39505, 42143, 39542, 32076, 39585, 39633, 39657, 35567, 35614, 26929, 29075, 42144, 39674, 26975, 39694, 26310, 35759, 35126, 47451, 29414, 27465, 39712, 39748, 39776, 39804, 46246, 41657, 47873, 28257, 28343, 26456, 28257, 28345, 26459, 39839, 39865, 36357, 34905, 30398, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 39901, 22098, 38672, 30368, 39922, 38672, 45211, 39942, 39950, 39966, 39980, 39988, 40004, 40016, 25344, 35063, 40032, 40048, 40074, 25784, 40124, 38672, 40160, 20023, 50351, 40199, 40238, 40274, 40312, 49237, 40347, 40363, 36660, 40411, 40427, 25375, 38672, 40443, 18661, 36161, 37534, 38672, 18669, 43864, 38672, 38672, 44690, 26929, 22475, 37009, 40470, 40507, 25393, 22411, 40543, 31503, 45950, 26727, 47993, 40578, 40601, 30990, 39463, 38672, 44715, 38672, 38672, 40617, 29165, 40634, 41441, 21201, 19353, 22907, 40672, 45368, 47429, 22475, 22475, 40708, 37034, 28896, 40724, 22411, 47891, 41633, 40762, 35506, 40782, 26727, 47175, 32919, 22394, 40806, 38672, 38654, 32566, 38672, 38672, 38672, 38672, 48740, 26931, 22475, 38860, 22475, 40833, 22475, 33849, 22411, 41060, 22411, 40853, 22411, 33324, 26727, 38756, 26727, 40872, 26727, 32918, 33802, 38672, 38672, 20973, 45998, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 22458, 40891, 22411, 22411, 22411, 22411, 40911, 26727, 26727, 26727, 26727, 22501, 33795, 23174, 18332, 38672, 38672, 38672, 40938, 22475, 40962, 22475, 40684, 22411, 40981, 22411, 31782, 26727, 49841, 26727, 26998, 28442, 38672, 38672, 38672, 26931, 41000, 41019, 42142, 41039, 41057, 28347, 41076, 41095, 22521, 44039, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 34915, 34036, 27330, 41115, 29084, 41137, 35817, 26727, 27724, 35759, 41154, 41218, 41701, 41262, 41286, 47258, 44155, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 28115, 33538, 27862, 36357, 34905, 46290, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 26904, 22098, 38672, 38672, 41323, 22275, 41345, 40139, 38672, 26358, 41381, 41394, 41410, 41422, 25344, 38672, 38672, 45842, 43215, 38672, 38672, 38672, 41438, 50256, 38672, 22231, 41440, 45848, 38672, 34773, 41457, 34829, 39879, 41487, 27268, 25375, 38102, 38672, 38672, 29641, 38672, 41538, 41554, 33261, 38672, 38672, 36430, 26929, 41579, 35101, 34846, 45533, 41616, 41649, 40556, 45401, 41673, 41736, 41773, 26727, 41789, 40746, 42656, 41831, 38672, 41855, 41875, 32532, 32708, 46542, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 41594, 22475, 35786, 22411, 22411, 22411, 41893, 22411, 37334, 26727, 26727, 37094, 26727, 26727, 32919, 27373, 41911, 29299, 38672, 38672, 38672, 41935, 25466, 38672, 41955, 26931, 22475, 41121, 41974, 22475, 22475, 34152, 22411, 46370, 41992, 22411, 22411, 30778, 26727, 31887, 42009, 26727, 26727, 32918, 33802, 38243, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 48461, 22475, 28015, 42027, 22411, 22411, 42047, 22411, 37764, 26727, 26727, 48819, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 22208, 38672, 18340, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 28175, 42067, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 30944, 42088, 42137, 42160, 42180, 48196, 42203, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 44448, 27298, 33333, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 31078, 38672, 38672, 32435, 32438, 32441, 42224, 25897, 46967, 28280, 42275, 42293, 31579, 27268, 42319, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 46624, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 41023, 22411, 22411, 22411, 22411, 22411, 42864, 26727, 26727, 26727, 26727, 26727, 32919, 33803, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 33802, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 28015, 33854, 22411, 22411, 22411, 22411, 27851, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 42345, 42143, 29941, 22411, 26977, 42363, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 44743, 22177, 38672, 38672, 27385, 38672, 45876, 42383, 22121, 42412, 42425, 42433, 42449, 42461, 25344, 38672, 32955, 42527, 43215, 18706, 42477, 42499, 33244, 42519, 38672, 42543, 40174, 42559, 42580, 42605, 42641, 42672, 40377, 42708, 42766, 25375, 38672, 38672, 38672, 42829, 42880, 42911, 43973, 27961, 38672, 38672, 23013, 42938, 22475, 42974, 41003, 39432, 42995, 32861, 22411, 36698, 35176, 43029, 43292, 26727, 43049, 43082, 43138, 38672, 38672, 38672, 25328, 43172, 43191, 38672, 43210, 28234, 38672, 43231, 48341, 22475, 43250, 22475, 22325, 43268, 47118, 39174, 22411, 22411, 43316, 43332, 43358, 40585, 26727, 37280, 43376, 43410, 33803, 38672, 38672, 41815, 45184, 39238, 30360, 38672, 43434, 50186, 43461, 43495, 48777, 43514, 43538, 22475, 43573, 43599, 31640, 43617, 43640, 22411, 43666, 43692, 49367, 43710, 43733, 26727, 47922, 33802, 43767, 38672, 38672, 43787, 43812, 38672, 43850, 50024, 43886, 43557, 22475, 28015, 33854, 43908, 34242, 22411, 22411, 27851, 46470, 43935, 44079, 26727, 39658, 43953, 38672, 43989, 21331, 38672, 38672, 33824, 22475, 22475, 49385, 34223, 22411, 22411, 22411, 44011, 26727, 26727, 26727, 44027, 46887, 19958, 38672, 38672, 50007, 22475, 22475, 28197, 22411, 22411, 44066, 26727, 26727, 44101, 26313, 20872, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26890, 47793, 44124, 44140, 44185, 44209, 20435, 28340, 26976, 33389, 44233, 44253, 44277, 44296, 28343, 26456, 28257, 28345, 26459, 44315, 44342, 38482, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 18636, 22098, 44386, 29857, 38069, 44372, 44403, 44440, 44464, 44480, 44494, 44510, 44526, 44538, 25344, 44554, 46908, 38672, 40088, 38672, 38672, 41365, 38672, 43156, 26783, 26781, 47212, 47203, 34311, 44573, 42979, 44618, 41232, 44280, 27268, 44640, 44676, 38672, 44712, 29827, 28456, 38672, 38672, 38672, 44731, 44769, 38672, 40058, 44785, 40965, 44822, 22475, 44840, 44869, 48063, 22411, 22690, 39155, 44892, 44910, 26727, 30990, 39463, 38672, 44931, 38672, 44950, 44971, 38672, 38672, 38672, 38672, 38672, 44987, 28258, 45008, 41301, 22475, 22475, 37611, 28054, 22411, 45028, 22411, 22411, 45046, 30301, 30320, 26727, 26727, 28093, 30742, 33803, 38672, 38672, 45072, 32638, 30075, 38672, 46548, 37818, 38672, 42396, 22475, 22475, 47037, 45094, 33476, 49452, 22411, 22411, 49585, 32047, 36630, 35654, 26727, 26727, 39696, 33919, 26493, 44108, 45157, 32514, 38672, 49604, 38672, 38672, 38672, 45200, 22475, 22475, 43892, 45227, 28015, 33854, 22411, 41993, 40562, 22411, 27851, 26727, 26727, 32834, 45248, 22521, 33795, 38672, 22295, 45267, 19361, 38672, 28255, 36090, 22475, 45286, 43473, 42051, 22411, 45304, 43005, 43694, 26727, 49877, 26998, 46887, 38672, 50299, 46144, 45323, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 49054, 26313, 45345, 36168, 40817, 45367, 22475, 45384, 22411, 30669, 26977, 26727, 45417, 45465, 36482, 45500, 45528, 32279, 22411, 44261, 26727, 45549, 35759, 34423, 35689, 37179, 48196, 20435, 28340, 26976, 27310, 33427, 47309, 26456, 32258, 46222, 29141, 45599, 45573, 45589, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 42503, 22098, 38672, 38672, 19843, 38672, 45632, 29682, 29695, 45672, 45688, 45703, 45719, 45731, 25344, 25697, 36820, 25484, 43215, 48936, 33218, 45747, 38933, 25691, 45794, 45830, 45905, 45865, 45892, 45921, 30595, 45937, 41471, 45980, 45966, 25375, 45996, 46014, 46030, 34093, 38672, 38672, 46051, 24794, 46090, 46124, 46160, 46201, 46238, 46262, 46318, 46334, 46351, 46386, 26710, 46424, 30615, 39597, 40389, 46450, 46486, 30259, 41502, 46506, 46564, 38672, 46591, 46610, 46646, 38672, 45270, 33165, 46667, 46703, 46719, 46781, 46818, 46866, 45012, 35786, 47344, 42692, 28076, 22411, 34531, 37334, 42303, 43342, 43676, 26727, 37661, 41688, 46885, 38672, 46904, 39209, 44660, 46924, 28976, 46946, 38672, 30957, 20847, 49903, 46983, 47036, 22475, 47053, 33288, 31829, 47089, 22411, 22411, 47105, 35219, 43394, 47140, 26727, 26727, 47156, 32918, 33802, 47191, 38672, 41877, 37707, 38672, 50210, 38598, 47237, 45288, 47274, 47290, 28015, 43827, 47306, 47325, 28394, 29934, 30696, 36786, 37667, 47360, 43033, 22521, 43418, 47376, 50112, 38672, 38355, 49147, 28255, 47399, 22475, 22475, 47445, 47467, 34602, 22411, 47502, 47526, 50046, 26727, 47556, 46887, 36283, 49516, 38672, 48840, 29206, 44799, 47584, 47703, 30662, 30727, 45251, 31880, 34269, 39367, 47647, 38672, 49567, 38494, 40946, 47666, 47699, 47719, 39849, 48630, 47746, 32945, 47785, 47809, 47827, 47850, 47889, 47907, 48880, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 49752, 49772, 47949, 47973, 48009, 48038, 49034, 30862, 33538, 36362, 36357, 47933, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 48079, 38672, 38672, 48107, 38672, 19671, 30510, 30518, 48127, 30518, 30526, 48143, 48155, 25344, 38672, 38672, 38672, 44955, 38672, 29647, 38672, 38672, 38672, 38672, 29652, 46888, 38672, 38672, 45329, 35643, 48171, 30851, 45141, 48219, 48262, 38672, 38672, 38672, 29641, 38672, 38672, 50200, 50208, 38672, 38672, 38672, 48298, 33458, 22475, 22475, 22475, 48316, 48375, 22411, 22411, 28301, 37203, 26727, 26727, 26727, 30914, 41169, 48395, 38672, 34989, 34103, 38672, 38672, 38672, 48429, 38672, 34985, 36969, 28258, 49732, 31174, 47066, 48458, 46734, 22411, 37326, 35682, 48477, 41625, 48513, 26727, 48546, 48566, 33498, 48611, 32919, 33803, 38672, 32557, 38672, 48646, 38672, 38672, 38672, 19786, 38672, 26931, 22475, 48666, 22475, 22475, 22475, 32777, 22411, 48684, 22411, 22411, 22411, 31945, 26727, 48701, 26727, 26727, 26727, 32918, 33361, 38672, 45778, 38672, 38672, 38672, 38672, 41194, 35417, 22475, 22475, 22475, 28015, 42844, 22411, 22411, 22411, 22411, 27851, 48720, 26727, 26727, 26727, 22521, 33795, 48739, 38672, 38672, 48756, 38672, 35766, 48773, 22475, 22475, 45119, 48793, 22411, 42164, 43122, 48813, 26727, 43937, 26998, 46887, 48835, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 43522, 42144, 48856, 26975, 48877, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 20436, 32151, 30885, 28257, 28345, 26459, 33538, 22735, 48896, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 48924, 48962, 36314, 45181, 38672, 50538, 38672, 45169, 48959, 38038, 34111, 48981, 48993, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 27525, 42141, 49009, 31292, 44280, 27268, 25375, 38672, 36812, 40252, 29641, 38672, 38672, 38672, 38672, 43194, 38672, 38672, 26929, 45232, 22475, 37800, 22475, 25393, 49027, 22411, 46850, 22690, 27979, 26727, 26727, 49050, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 49070, 38672, 38672, 49087, 38672, 28258, 22475, 49810, 22475, 22475, 35786, 22411, 22411, 34386, 22411, 22411, 37334, 26727, 26727, 49106, 26727, 26727, 32919, 33803, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 33802, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 28015, 33854, 22411, 22411, 22411, 22411, 27851, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 49126, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 49146, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 49163, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 49187, 38672, 21516, 38672, 20816, 49222, 49253, 38672, 49277, 49291, 49304, 49320, 49332, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 31934, 32212, 26453, 47540, 49348, 25375, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 43175, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 33803, 38672, 38672, 38672, 38672, 38672, 35291, 38672, 38672, 38672, 36319, 22475, 22475, 22475, 22475, 22475, 31707, 22411, 22411, 22411, 22411, 22411, 45130, 26727, 26727, 26727, 26727, 26727, 32918, 33802, 38672, 38842, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 49383, 22475, 49401, 33854, 22411, 42856, 22411, 47124, 27851, 26727, 41079, 26727, 26727, 49426, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25610, 38672, 38672, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 41202, 49468, 49480, 25344, 38672, 38672, 38672, 43215, 49496, 38672, 49515, 38672, 38672, 46071, 46074, 38672, 49532, 28993, 37922, 42141, 49583, 32824, 44280, 27268, 25375, 38672, 38672, 46108, 29641, 46524, 46533, 49601, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 49620, 37001, 25393, 22411, 29448, 22411, 49639, 26727, 26727, 48625, 36734, 30990, 43097, 49680, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 33803, 38672, 38672, 38672, 38672, 38672, 38672, 49703, 38672, 38672, 26931, 22475, 22475, 49727, 22475, 22475, 48053, 22411, 22411, 49748, 22411, 22411, 46748, 26727, 26727, 49768, 26727, 26727, 32918, 33802, 20903, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 49788, 22475, 22475, 28015, 33854, 26700, 22411, 22411, 22411, 27851, 42367, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 44448, 27298, 33333, 25344, 45477, 38672, 38672, 43215, 38672, 38672, 49711, 38672, 38672, 38672, 49707, 38672, 38672, 27156, 49805, 37753, 37630, 26453, 49986, 49826, 25375, 38672, 20236, 38672, 29641, 38672, 38672, 38672, 38672, 38672, 38672, 28133, 26929, 22475, 22475, 22475, 47834, 25393, 22411, 22411, 22411, 49862, 26727, 26727, 26727, 37879, 30990, 39463, 38672, 45808, 38672, 38672, 38672, 38672, 38672, 38672, 29514, 38672, 38672, 28258, 49898, 22475, 31756, 22475, 35786, 22411, 49919, 22411, 36688, 22411, 37334, 40766, 26727, 26727, 49936, 26727, 32919, 33803, 38672, 25655, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26931, 22475, 37984, 22475, 22475, 22475, 35151, 22411, 46398, 22411, 22411, 22411, 43919, 26727, 31302, 26727, 26727, 26727, 32918, 33802, 38672, 38672, 38672, 38672, 38672, 38999, 38672, 22475, 22475, 26805, 22475, 49623, 33854, 22411, 22411, 49957, 22411, 49975, 26727, 26727, 47510, 26727, 49846, 33795, 38672, 38672, 18612, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 30025, 38672, 38672, 50002, 26931, 50023, 22475, 27060, 22411, 22411, 28347, 50040, 26727, 22521, 26313, 38672, 40323, 38672, 27136, 29066, 42143, 22411, 50062, 26977, 27488, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 25323, 38672, 38672, 38672, 38672, 22098, 38672, 38672, 38672, 38672, 42922, 41360, 38672, 38672, 38672, 44448, 27298, 33333, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 25375, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 25393, 22411, 22411, 22411, 22690, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 33803, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 33802, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 28015, 33854, 22411, 22411, 22411, 22411, 27851, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 38672, 38672, 38672, 38672, 34339, 19585, 19583, 40183, 33676, 50079, 27766, 27768, 50110, 33673, 34350, 50128, 50140, 20832, 38672, 38672, 38672, 43215, 38672, 38672, 25515, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 20613, 18794, 19200, 19418, 35990, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 18475, 50434, 18503, 18525, 50156, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 38672, 38672, 38672, 38672, 30470, 38672, 38672, 20273, 38672, 42922, 31104, 31112, 50226, 50240, 50248, 42483, 50272, 20832, 38672, 38672, 38672, 43215, 38672, 38672, 50505, 38672, 38672, 38672, 25547, 38672, 38672, 25544, 18953, 18958, 18794, 35998, 18531, 35990, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19406, 50434, 18503, 18525, 18547, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 38672, 38672, 38672, 38672, 42589, 38672, 38672, 38672, 38672, 24842, 35017, 50315, 50319, 50335, 50343, 43995, 50367, 20832, 38672, 38672, 38672, 43215, 38672, 38672, 25359, 38672, 38672, 23171, 38672, 38672, 38672, 23167, 18953, 18958, 18794, 35998, 19418, 35990, 45351, 38672, 18269, 42564, 29641, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 19075, 50434, 18503, 18525, 50409, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 20424, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 20532, 20548, 20592, 20589, 50171, 20608, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 20939, 38672, 38672, 38672, 38672, 30470, 38672, 38672, 38672, 38672, 42922, 38672, 38672, 38672, 38672, 38672, 38672, 24860, 25344, 38672, 38672, 38672, 43215, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28256, 42141, 22411, 26453, 44280, 27268, 22230, 38672, 38672, 38672, 29641, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26929, 22475, 22475, 22475, 22475, 36544, 22411, 22411, 22411, 33858, 26727, 26727, 26727, 26727, 30990, 39463, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 28258, 22475, 22475, 22475, 22475, 35786, 22411, 22411, 22411, 22411, 22411, 37334, 26727, 26727, 26727, 26727, 26727, 32919, 33803, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 26931, 22475, 22475, 22475, 22475, 22475, 33849, 22411, 22411, 22411, 22411, 22411, 33324, 26727, 26727, 26727, 26727, 26727, 32918, 33802, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 22475, 22475, 22475, 22475, 28015, 33854, 22411, 22411, 22411, 22411, 27851, 26727, 26727, 26727, 26727, 22521, 33795, 38672, 38672, 38672, 38672, 38672, 28255, 22475, 22475, 22475, 29442, 22411, 22411, 22411, 26485, 26727, 26727, 26727, 26998, 46887, 38672, 38672, 38672, 26931, 22475, 22475, 42142, 22411, 22411, 28347, 26727, 26727, 22521, 26313, 38672, 38672, 38672, 27136, 22475, 42143, 22411, 22411, 26977, 26727, 22520, 26312, 34036, 26929, 22475, 42144, 22411, 26975, 26727, 26310, 35759, 22476, 22411, 26978, 48196, 20435, 28340, 26976, 39617, 42139, 28345, 26456, 28257, 28343, 26456, 28257, 28345, 26459, 33538, 36362, 36357, 34905, 28863, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38956, 38672, 38672, 29796, 50456, 50460, 50460, 50482, 38955, 50476, 50498, 38672, 38672, 38672, 38672, 38672, 38672, 50505, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 18953, 18958, 18794, 35998, 19418, 35990, 45351, 38672, 18269, 42564, 38672, 38672, 40144, 38672, 23032, 18306, 18356, 18382, 18387, 18403, 18422, 18462, 20670, 18475, 50434, 18503, 18525, 50156, 19412, 50440, 18509, 36003, 19232, 20563, 38672, 46930, 18591, 38672, 38672, 37574, 18609, 18628, 33736, 18652, 18685, 18722, 18753, 18745, 18769, 18406, 25849, 18792, 20360, 18810, 18830, 18835, 19138, 18794, 20364, 18814, 18794, 18839, 19540, 19955, 37554, 48943, 18855, 18871, 18894, 40258, 38672, 38976, 18931, 18947, 18974, 19016, 19062, 19169, 19103, 19129, 20726, 19934, 19154, 19185, 19222, 19248, 20726, 19934, 19154, 19185, 19222, 19273, 19000, 30964, 19299, 19315, 28712, 19342, 25187, 19377, 19393, 19434, 19464, 19495, 19569, 19608, 24938, 19905, 19631, 19046, 19601, 24931, 19898, 19624, 19039, 19647, 19687, 43796, 19722, 19792, 19745, 19771, 19808, 19113, 19859, 19875, 19921, 18446, 19976, 19994, 24983, 18444, 19974, 19992, 20321, 18562, 47383, 20010, 46515, 35979, 20039, 20679, 20105, 20160, 20116, 20132, 20159, 20115, 20176, 19479, 20207, 20223, 20259, 20298, 20337, 20380, 20402, 21368, 20386, 20408, 21374, 19283, 50527, 20452, 20468, 20484, 20497, 50424, 20500, 20516, 26100, 20548, 20592, 20589, 50171, 18953, 19547, 18794, 18487, 20629, 20143, 19945, 20660, 18437, 21954, 20695, 20711, 21969, 19448, 21939, 20755, 19510, 19659, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 38672, 94505, 94505, 90408, 90408, 94505, 94505, 94505, 94505, 94505, 94505, 94505, 94505, 94505, 94505, 94505, 94505, 94505, 94505, 94505, 94505, 1, 12290, 94505, 94505, 94505, 94505, 94505, 94505, 94505, 94505, 94505, 0, 94505, 90408, 94505, 94505, 94505, 94505, 94505, 94505, 94505, 94505, 94505, 364, 94505, 90408, 94505, 94505, 94505, 94505, 94505, 94505, 94505, 69632, 73728, 94505, 94505, 94505, 94505, 94505, 65536, 94505, 3, 0, 0, 2183168, 0, 0, 0, 90408, 94505, 298, 299, 0, 2134016, 302, 303, 0, 0, 0, 0, 0, 1636, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1645, 0, 0, 2732032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2904064, 2908160, 0, 0, 0, 0, 0, 1699, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2963, 0, 0, 0, 0, 0, 2424832, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2625536, 0, 0, 0, 0, 0, 2045, 0, 0, 0, 0, 2049, 0, 0, 0, 0, 0, 0, 0, 2711, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2976, 0, 534, 534, 534, 534, 534, 2699264, 2715648, 0, 0, 2772992, 2805760, 2830336, 0, 2863104, 2920448, 0, 0, 0, 0, 0, 0, 0, 303, 303, 303, 303, 0, 303, 303, 303, 303, 0, 2805760, 2920448, 0, 0, 0, 0, 0, 2920448, 0, 0, 0, 0, 0, 0, 0, 2732032, 0, 2179072, 2179072, 2179072, 2179072, 2424832, 2433024, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3125248, 2625536, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2699264, 2179072, 2715648, 2179072, 2723840, 2179072, 2732032, 2772992, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2592768, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2551808, 2125824, 2125824, 2125824, 2125824, 2125824, 2637824, 2125824, 2179072, 2179072, 2805760, 2179072, 2830336, 2179072, 2179072, 2863104, 2179072, 2179072, 2179072, 2179072, 2920448, 2179072, 2179072, 2179072, 0, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 2424832, 2433024, 2125824, 2125824, 2125824, 2125824, 0, 2502656, 0, 0, 3010560, 0, 0, 0, 0, 2990080, 2179072, 2179072, 2699264, 2125824, 2715648, 2125824, 2723840, 2125824, 2732032, 2772992, 2125824, 2125824, 2125824, 2805760, 2125824, 2830336, 2125824, 2125824, 2863104, 2125824, 2125824, 2125824, 2125824, 2920448, 2863104, 2125824, 2125824, 2125824, 2125824, 2920448, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 1142784, 0, 2179072, 2125824, 2125824, 2125824, 3117056, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 975, 2125824, 0, 0, 0, 0, 0, 0, 2510848, 2514944, 0, 0, 2547712, 2596864, 0, 0, 0, 0, 0, 0, 735, 0, 0, 0, 0, 735, 0, 741, 0, 0, 0, 2789376, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3137, 0, 0, 2142208, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2733, 0, 2662400, 0, 2813952, 0, 0, 0, 0, 2375680, 0, 0, 0, 0, 0, 0, 0, 0, 0, 350, 351, 352, 0, 0, 0, 0, 2584576, 0, 0, 0, 0, 2838528, 0, 0, 2838528, 0, 0, 0, 0, 0, 0, 0, 0, 1122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1186, 0, 0, 0, 0, 0, 0, 0, 2891776, 0, 0, 0, 0, 0, 2392064, 2412544, 0, 0, 2838528, 0, 0, 0, 0, 0, 0, 262144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 706, 0, 0, 0, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2408448, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 0, 2126724, 2126724, 2617344, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2662400, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2584576, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2801664, 2813952, 2179072, 2838528, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 1798, 2125824, 2125824, 2125824, 2408448, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2662400, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2801664, 2813952, 2125824, 2838528, 2125824, 2813952, 2125824, 2838528, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3125248, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 2822144, 0, 0, 2883584, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3080192, 3100672, 3104768, 0, 0, 0, 0, 3186688, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 305, 306, 0, 0, 0, 0, 0, 0, 2797568, 0, 0, 0, 0, 0, 0, 0, 2850816, 2867200, 0, 0, 2883584, 0, 0, 0, 0, 0, 2072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3134, 0, 0, 0, 0, 2465792, 0, 0, 2719744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3014656, 3207168, 0, 2691072, 0, 0, 3215360, 0, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2179072, 2179072, 2179072, 2179072, 2179072, 2461696, 2465792, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2523136, 2179072, 2179072, 2179072, 0, 1342, 2125824, 2125824, 2125824, 2125824, 2125824, 2424832, 2433024, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2473984, 2478080, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2600960, 2179072, 2179072, 2179072, 2179072, 2641920, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 1047, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3035136, 2125824, 2125824, 3072000, 2125824, 2125824, 2125824, 3121152, 2125824, 2125824, 3141632, 2125824, 2125824, 2125824, 3170304, 2179072, 2179072, 2719744, 2179072, 2179072, 2179072, 2179072, 2179072, 2768896, 2777088, 2781184, 2797568, 2822144, 2179072, 2179072, 2179072, 0, 900, 2125824, 2125824, 2125824, 2125824, 2125824, 2424832, 2433024, 2125824, 2125824, 2125824, 2125824, 298, 0, 299, 0, 302, 0, 303, 0, 0, 0, 2473984, 2478080, 2179072, 3063808, 2179072, 2179072, 2179072, 2179072, 3100672, 2179072, 2179072, 3133440, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2551808, 2179072, 2179072, 2179072, 2179072, 2179072, 2637824, 2179072, 2179072, 2179072, 2179072, 3207168, 2179072, 0, 0, 0, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 2125824, 2125824, 2125824, 2408448, 2125824, 2125824, 2125824, 2719744, 2125824, 2125824, 2125824, 2125824, 2125824, 2768896, 2777088, 2781184, 2797568, 2822144, 2125824, 2125824, 2125824, 2883584, 2179072, 2912256, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3039232, 2125824, 2912256, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3039232, 2125824, 2125824, 0, 2125824, 2126799, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 245760, 0, 0, 2179072, 2125824, 2125824, 3063808, 2125824, 2125824, 2125824, 2125824, 2125824, 3100672, 2125824, 2125824, 3133440, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 2179072, 2125824, 2125824, 2457600, 2179072, 2179072, 2179072, 2179072, 2457600, 2125824, 2125824, 2125824, 3207168, 2125824, 0, 0, 0, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 1894, 2125824, 2125824, 2125824, 2408448, 2125824, 2125824, 2125824, 2125824, 2125824, 3207168, 2125824, 2179072, 2125824, 2125824, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 0, 2486272, 0, 0, 0, 0, 0, 2678784, 2854912, 3006464, 0, 2924544, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3162112, 3170304, 0, 0, 3219456, 3035136, 0, 0, 0, 0, 0, 3072000, 2650112, 0, 0, 2809856, 0, 0, 0, 0, 0, 0, 0, 1650, 0, 0, 0, 0, 0, 0, 1654, 0, 2686976, 2736128, 0, 0, 2531328, 2707456, 0, 3190784, 0, 0, 2576384, 0, 0, 0, 0, 0, 0, 0, 1688, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2742, 0, 0, 0, 0, 0, 0, 0, 3121152, 3141632, 0, 0, 0, 2924544, 0, 2682880, 0, 0, 0, 0, 0, 0, 3112960, 2387968, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2453504, 2179072, 2473984, 2482176, 2179072, 2179072, 2179072, 0, 901, 2125824, 2125824, 2125824, 2125824, 2125824, 2424832, 2433024, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 2179072, 2125824, 2125824, 2179072, 2179072, 2179072, 2531328, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2605056, 2179072, 2629632, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2527232, 2125824, 2125824, 2125824, 2125824, 2125824, 3092480, 2125824, 2527232, 2125824, 2650112, 2179072, 2179072, 2179072, 2707456, 2179072, 2736128, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2887680, 2179072, 2125824, 2125824, 2125824, 2125824, 2441216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2932736, 2179072, 2924544, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3035136, 2179072, 2179072, 3072000, 2179072, 2125824, 2658304, 2973696, 2125824, 2125824, 2658304, 2973696, 2125824, 2711552, 2560000, 2179072, 2560000, 2125824, 2560000, 2125824, 2125824, 2125824, 2125824, 2125824, 3223552, 975, 0, 2125824, 2125824, 2416640, 2125824, 2125824, 2125824, 2445312, 2125824, 2125824, 2125824, 2125824, 2179072, 2125824, 2125824, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 1047, 0, 0, 2179072, 2125824, 2125824, 2179072, 3121152, 2179072, 2179072, 3141632, 2179072, 2179072, 2179072, 3170304, 2179072, 2179072, 3190784, 3194880, 2179072, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1134592, 2125824, 2125824, 3190784, 3194880, 2125824, 0, 0, 0, 0, 0, 0, 2387968, 2125824, 2125824, 2125824, 2420736, 2125824, 2125824, 2125824, 2125824, 2125824, 2453504, 2125824, 2707456, 2125824, 2736128, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2887680, 2125824, 2125824, 2924544, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3141632, 2125824, 2125824, 2125824, 3170304, 2125824, 2125824, 3190784, 3194880, 2125824, 2179072, 2125824, 2125824, 2179072, 2125824, 2125824, 2179072, 2125824, 2125824, 2985984, 2985984, 2985984, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 419, 419, 0, 0, 65536, 419, 2179072, 3112960, 3219456, 2125824, 2125824, 3112960, 3219456, 2125824, 2125824, 3112960, 3219456, 0, 0, 0, 0, 0, 0, 0, 1701, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1624, 0, 0, 0, 0, 0, 0, 0, 3022848, 0, 0, 3145728, 0, 3203072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 335, 336, 0, 0, 0, 0, 0, 0, 0, 0, 3067904, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 787, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2445312, 0, 2842624, 0, 0, 0, 2637824, 0, 0, 0, 0, 2621440, 0, 0, 0, 0, 0, 2100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2727936, 0, 0, 0, 3084288, 3182592, 2899968, 0, 2961408, 0, 0, 2179072, 2179072, 2416640, 2179072, 2179072, 2179072, 2445312, 2179072, 2179072, 2179072, 0, 901, 2126724, 2126724, 2126724, 2126724, 2126724, 2425732, 2433924, 2126724, 2126724, 2126724, 2126724, 2458574, 2126798, 2126798, 2126798, 2126798, 2183168, 0, 0, 0, 0, 0, 0, 0, 396, 0, 0, 0, 0, 0, 396, 0, 0, 2179072, 2179072, 2179072, 2727936, 2752512, 2179072, 2179072, 2179072, 2842624, 2846720, 2179072, 2895872, 2916352, 2179072, 2179072, 2945024, 2179072, 2179072, 2994176, 2179072, 3002368, 2179072, 2179072, 3022848, 2179072, 3067904, 3084288, 3096576, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 237568, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2605056, 2125824, 2629632, 2125824, 2125824, 2650112, 2125824, 2125824, 2125824, 2707456, 2125824, 2736128, 2125824, 2125824, 2125824, 2125824, 2179072, 2179072, 2179072, 3223552, 0, 0, 2125824, 2125824, 2416640, 2125824, 2125824, 2125824, 2445312, 2125824, 2125824, 2125824, 2125824, 2125824, 2600960, 2125824, 2125824, 2125824, 2125824, 2641920, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3010560, 2125824, 2125824, 2125824, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2940, 0, 2637824, 2125824, 2125824, 2125824, 2125824, 2727936, 2752512, 2125824, 2125824, 2125824, 2125824, 2842624, 2846720, 2125824, 2895872, 2916352, 2125824, 2125824, 2125824, 2125824, 2945024, 2125824, 2125824, 2994176, 2125824, 3002368, 2125824, 2125824, 3022848, 2125824, 3067904, 3084288, 2125824, 3096576, 2125824, 2125824, 0, 0, 0, 2928640, 0, 0, 0, 3059712, 0, 2543616, 2666496, 0, 2633728, 0, 0, 0, 0, 0, 0, 766, 767, 0, 0, 0, 754, 0, 0, 774, 0, 2179072, 2179072, 2179072, 2494464, 2179072, 2179072, 2514944, 2179072, 2179072, 2179072, 2543616, 2547712, 2179072, 2179072, 2596864, 2179072, 2126724, 2126724, 2126724, 2126724, 2126724, 2593668, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126798, 0, 0, 0, 0, 0, 0, 2510848, 2514944, 0, 0, 2547712, 2596864, 0, 0, 0, 0, 0, 0, 1164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1564, 0, 1566, 0, 0, 0, 2179072, 2179072, 3059712, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3178496, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2928640, 2125824, 2125824, 2125824, 2998272, 2125824, 2125824, 2125824, 2125824, 3059712, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3178496, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3010560, 2125824, 2125824, 2125824, 2125824, 2125824, 2502656, 2125824, 2125824, 2125824, 2494464, 2125824, 2125824, 2514944, 2125824, 2125824, 2125824, 2543616, 2547712, 2125824, 2125824, 2596864, 2125824, 2125824, 2125824, 2125824, 2125824, 3059712, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3178496, 2179072, 2125824, 2125824, 2179072, 2126724, 2126724, 2126798, 2126798, 2441216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2932736, 2965504, 0, 0, 3076096, 0, 0, 2695168, 3174400, 2646016, 2613248, 2703360, 0, 0, 0, 0, 2977792, 0, 0, 3047424, 3129344, 0, 2981888, 2396160, 0, 3153920, 0, 0, 0, 2740224, 0, 0, 0, 0, 0, 0, 1106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 334, 0, 0, 0, 0, 0, 0, 0, 0, 2793472, 0, 0, 0, 0, 0, 2469888, 2506752, 2756608, 0, 0, 2580480, 0, 0, 0, 0, 0, 0, 1146880, 0, 1146880, 0, 0, 0, 0, 0, 0, 0, 302, 302, 302, 302, 0, 302, 302, 302, 302, 0, 2396160, 2400256, 2179072, 2179072, 2441216, 2179072, 2469888, 2179072, 2179072, 2179072, 2519040, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 241664, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3223552, 2179072, 2125824, 2125824, 2179072, 2179072, 2125824, 2125824, 2125824, 2588672, 2179072, 2613248, 2646016, 2179072, 2179072, 2695168, 2756608, 2179072, 2179072, 2179072, 2932736, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 245760, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2584576, 2125824, 2125824, 2125824, 2125824, 2125824, 2617344, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2662400, 2179072, 2179072, 2179072, 3129344, 2179072, 2179072, 3153920, 3166208, 3174400, 2396160, 2400256, 2125824, 2125824, 2441216, 2125824, 2469888, 2125824, 2125824, 2125824, 2519040, 2125824, 2125824, 2125824, 2125824, 2125824, 2519040, 2125824, 2125824, 2125824, 2125824, 2588672, 2125824, 2613248, 2646016, 2125824, 2125824, 2695168, 2756608, 2125824, 2125824, 2125824, 2125824, 2932736, 2125824, 0, 3108864, 3198976, 0, 0, 3043328, 0, 3149824, 2936832, 0, 2760704, 3132, 0, 0, 0, 0, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 3503, 2953216, 0, 0, 2826240, 3158016, 2428928, 0, 3018752, 2764800, 2572288, 0, 0, 3051520, 2179072, 2428928, 2437120, 2179072, 2486272, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2654208, 2678784, 2760704, 2764800, 2854912, 2969600, 2179072, 3006464, 2179072, 3018752, 2179072, 2179072, 2179072, 3149824, 2125824, 2428928, 2437120, 2125824, 2486272, 2125824, 2125824, 2125824, 2125824, 2125824, 2654208, 2678784, 2760704, 2764800, 2785280, 2854912, 2969600, 2125824, 3006464, 2125824, 3018752, 2125824, 2125824, 2125824, 2125824, 3149824, 2179072, 3051520, 2125824, 3051520, 2125824, 3051520, 0, 2490368, 2498560, 0, 0, 0, 0, 2875392, 0, 0, 0, 3132, 0, 0, 2834432, 0, 3227648, 2568192, 2564096, 0, 2940928, 2179072, 2179072, 2498560, 2179072, 2179072, 2179072, 2555904, 2564096, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3137536, 2125824, 2125824, 2125824, 2125824, 2457600, 2125824, 2125824, 2125824, 2125824, 2183168, 0, 0, 0, 0, 0, 0, 0, 333, 0, 0, 0, 0, 0, 333, 0, 0, 2125824, 3137536, 2125824, 2125824, 2498560, 2125824, 2125824, 2125824, 2555904, 2564096, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3132, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2126725, 2125824, 2125824, 2125824, 2502656, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3010560, 2179072, 2179072, 2125824, 2125824, 2502656, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3010560, 2179072, 2179072, 2126724, 2126724, 2503556, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2179072, 2179072, 2592768, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3117056, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2928640, 2179072, 2179072, 2179072, 2998272, 2179072, 2179072, 3031040, 0, 0, 0, 2179072, 2449408, 2179072, 2535424, 2179072, 2609152, 2179072, 2859008, 2179072, 2179072, 2179072, 3031040, 2125824, 2449408, 2125824, 2535424, 2125824, 2609152, 2125824, 2859008, 2125824, 2125824, 2125824, 3031040, 2125824, 2125824, 2449408, 2125824, 2125824, 2125824, 2125824, 2461696, 2465792, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2523136, 2125824, 2125824, 2125824, 298, 0, 0, 0, 298, 0, 299, 0, 0, 0, 299, 0, 302, 2125824, 2125824, 2125824, 3026944, 2404352, 2125824, 2125824, 2125824, 2125824, 3026944, 2539520, 0, 2949120, 2179072, 2658304, 2973696, 111044, 111044, 111044, 111044, 111044, 111044, 111044, 111044, 111044, 111044, 111044, 111044, 111044, 111044, 111044, 111044, 452, 452, 111044, 452, 452, 452, 452, 452, 452, 452, 452, 452, 452, 111044, 111044, 111044, 111044, 111044, 111044, 111044, 111044, 111044, 111044, 452, 111044, 111044, 111044, 111044, 111044, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, 0, 0, 0, 0, 0, 360, 3, 0, 0, 2183168, 0, 0, 0, 0, 0, 298, 299, 0, 2134016, 302, 303, 0, 0, 0, 0, 0, 2124, 0, 0, 0, 0, 0, 534, 534, 534, 534, 534, 847, 534, 534, 861, 534, 534, 0, 302, 118784, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3127, 0, 0, 0, 302, 0, 0, 0, 302, 119197, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 2403, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 302, 302, 0, 0, 0, 0, 302, 302, 302, 302, 302, 302, 0, 0, 0, 0, 0, 302, 0, 302, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2966, 0, 3, 0, 0, 2183168, 0, 0, 0, 0, 0, 33396, 299, 0, 2134016, 49784, 303, 0, 0, 0, 0, 0, 2428, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 298, 0, 0, 0, 302, 0, 0, 0, 2424832, 2433024, 0, 0, 2457600, 2105631, 12290, 3, 0, 0, 293, 0, 0, 0, 0, 293, 0, 0, 0, 0, 0, 0, 0, 2024, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2455, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 0, 0, 122880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 785, 0, 790, 0, 793, 0, 0, 0, 122880, 0, 122880, 122880, 122880, 0, 0, 0, 0, 0, 122880, 0, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 122880, 0, 0, 122880, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1216, 0, 0, 0, 0, 147456, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3148, 0, 0, 0, 0, 1067, 1071, 0, 0, 1075, 1079, 0, 2424832, 2433024, 0, 0, 2457600, 0, 0, 0, 131072, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 2479, 2437, 0, 0, 0, 0, 0, 2484, 0, 0, 0, 0, 0, 0, 1675, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3260, 0, 0, 534, 534, 534, 131072, 0, 0, 131072, 131072, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 131072, 0, 0, 131072, 0, 0, 0, 0, 0, 135168, 135168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 225708, 0, 0, 0, 135168, 0, 0, 135168, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1096, 0, 0, 0, 0, 0, 0, 0, 135168, 0, 135168, 135168, 135168, 135168, 135168, 135168, 0, 135168, 135168, 135168, 135168, 135168, 135168, 0, 0, 0, 0, 0, 135168, 0, 135168, 1, 12290, 3, 0, 0, 2183168, 0, 0, 0, 0, 0, 629, 630, 0, 2134016, 633, 634, 0, 0, 0, 0, 0, 2725, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2200245, 2200245, 2200245, 0, 0, 2125824, 3117056, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 1434, 2125824, 2125824, 2125824, 2125824, 2932736, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3129344, 2125824, 2125824, 3153920, 3166208, 3174400, 2506752, 2506752, 2506752, 0, 303, 139264, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 266240, 0, 0, 0, 0, 0, 303, 0, 0, 0, 303, 69632, 139681, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 2738, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2013, 0, 0, 0, 0, 303, 303, 303, 303, 303, 303, 0, 0, 0, 0, 0, 303, 0, 303, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 300, 3, 0, 0, 2183168, 0, 0, 0, 0, 0, 298, 33399, 0, 2134016, 302, 49787, 0, 0, 0, 0, 0, 2763, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 556, 556, 3020, 556, 556, 556, 61440, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 360, 300, 300, 300, 143660, 370, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 143660, 300, 300, 143660, 300, 300, 300, 143730, 300, 300, 300, 143730, 69632, 73728, 300, 300, 143660, 300, 300, 65536, 300, 300, 0, 0, 300, 300, 143660, 300, 300, 300, 300, 300, 300, 300, 300, 300, 365, 300, 0, 143660, 300, 300, 300, 143660, 143660, 143660, 143660, 143660, 143660, 143660, 143660, 143660, 143660, 143660, 143660, 143660, 143660, 143660, 143660, 300, 300, 143660, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 300, 143730, 300, 300, 300, 300, 300, 300, 300, 300, 143660, 143660, 143660, 143660, 143660, 143660, 143660, 143660, 143660, 300, 300, 300, 300, 300, 300, 300, 300, 143660, 300, 143660, 143660, 143660, 143660, 300, 143660, 143660, 143660, 143660, 143660, 143660, 300, 0, 300, 0, 300, 300, 300, 143660, 300, 143660, 143660, 143660, 143660, 143660, 143730, 143660, 143730, 143730, 143730, 143730, 143730, 143730, 143660, 143660, 143660, 143660, 143660, 143660, 143660, 143660, 1, 12290, 0, 0, 0, 0, 2200245, 2200245, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1153, 1154, 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, 155648, 0, 0, 0, 0, 155648, 0, 0, 0, 0, 0, 155648, 155648, 0, 155648, 155648, 0, 12290, 0, 0, 0, 0, 155648, 0, 155648, 0, 0, 0, 0, 0, 155648, 0, 0, 0, 0, 0, 0, 1148, 0, 0, 0, 0, 0, 0, 0, 0, 1157, 3, 0, 0, 2183168, 126976, 0, 0, 0, 0, 298, 299, 0, 2134016, 302, 303, 0, 0, 0, 0, 0, 2934, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2446, 0, 0, 0, 0, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 163840, 159744, 159744, 159744, 159744, 0, 0, 159744, 0, 0, 0, 0, 0, 0, 0, 0, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 159744, 163840, 159744, 159744, 159744, 159744, 159744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, 0, 131072, 131072, 25155, 0, 0, 0, 159744, 0, 0, 0, 25155, 25155, 25155, 159744, 25155, 25155, 25155, 25155, 25155, 25155, 25155, 159744, 159744, 159744, 159744, 25155, 159744, 25155, 1, 12290, 2125824, 3117056, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 24576, 975, 2125824, 2125824, 2125824, 2125824, 3092480, 0, 0, 0, 2404352, 2179072, 2179072, 2179072, 2179072, 3026944, 2404352, 2125824, 2125824, 2125824, 2125824, 2592768, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2449408, 0, 2535424, 2125824, 2609152, 2125824, 2859008, 2125824, 2125824, 2125824, 3031040, 2125824, 2527232, 0, 0, 0, 2179072, 2527232, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 1, 12290, 167936, 167936, 167936, 0, 0, 167936, 0, 0, 0, 0, 0, 0, 0, 0, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, 0, 155648, 0, 172032, 172032, 0, 172032, 0, 0, 172032, 172032, 0, 172032, 0, 0, 0, 0, 172032, 172032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172032, 0, 0, 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, 172032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 0, 292, 0, 0, 0, 0, 1, 288, 3, 0, 0, 0, 294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 348, 0, 0, 0, 0, 0, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 1, 0, 176128, 176128, 176128, 0, 0, 176128, 0, 0, 0, 0, 0, 0, 0, 0, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 0, 292, 0, 0, 0, 347, 3, 78114, 78114, 292, 0, 627, 0, 0, 0, 298, 299, 0, 2134016, 302, 303, 0, 0, 0, 0, 0, 2946, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 245760, 0, 0, 0, 0, 78114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 672, 0, 1102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 155648, 0, 0, 0, 0, 1146, 0, 0, 0, 0, 1151, 0, 0, 0, 0, 0, 0, 0, 346, 0, 404, 0, 0, 0, 0, 0, 404, 0, 0, 0, 2098, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2717, 0, 0, 534, 2135, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2147, 534, 534, 534, 534, 534, 534, 1775, 534, 534, 534, 1780, 534, 534, 534, 534, 534, 534, 534, 2545, 534, 534, 534, 534, 534, 534, 0, 2549, 2220, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2232, 556, 556, 556, 556, 556, 556, 2590, 556, 556, 556, 556, 556, 556, 2598, 556, 556, 2307, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2319, 580, 580, 580, 0, 0, 0, 2006, 0, 1069, 0, 0, 0, 2008, 0, 1073, 0, 2573, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1396, 0, 0, 2955, 0, 0, 0, 2959, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 371, 0, 0, 372, 0, 0, 0, 534, 3150, 534, 534, 534, 3153, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2547, 534, 534, 534, 0, 0, 3161, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 556, 556, 556, 556, 580, 3206, 580, 580, 580, 3209, 580, 580, 580, 580, 580, 580, 580, 580, 2679, 580, 580, 580, 534, 580, 556, 534, 580, 580, 3217, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 534, 580, 556, 534, 580, 580, 3309, 580, 580, 580, 580, 3310, 3311, 580, 580, 580, 580, 580, 580, 580, 580, 2875, 580, 580, 580, 580, 580, 580, 580, 580, 3071, 580, 580, 580, 580, 580, 580, 580, 580, 3233, 580, 580, 580, 580, 534, 580, 556, 1993, 534, 534, 534, 1997, 556, 556, 556, 2001, 534, 534, 534, 3339, 534, 534, 534, 534, 534, 534, 3345, 534, 534, 534, 534, 556, 3407, 556, 3409, 556, 556, 556, 556, 556, 556, 556, 556, 1373, 556, 556, 556, 556, 556, 556, 556, 3364, 556, 580, 580, 580, 580, 580, 580, 3370, 580, 580, 580, 580, 580, 580, 3376, 580, 580, 580, 3380, 580, 534, 556, 580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2925, 0, 0, 0, 0, 0, 3132, 0, 0, 0, 0, 3391, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2198, 534, 2200, 534, 534, 534, 534, 534, 534, 3406, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 26009, 1341, 975, 580, 556, 556, 556, 556, 3422, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1449, 580, 580, 580, 580, 580, 580, 580, 3522, 580, 580, 580, 580, 580, 580, 580, 580, 580, 0, 0, 0, 534, 534, 534, 534, 3585, 534, 556, 556, 3, 78114, 78114, 292, 0, 0, 0, 0, 0, 298, 299, 0, 2134016, 302, 303, 0, 0, 0, 0, 0, 2973, 0, 0, 2975, 0, 0, 534, 534, 2980, 534, 534, 534, 534, 534, 534, 2532, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2793, 534, 534, 534, 534, 534, 0, 0, 0, 304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2732, 0, 0, 192965, 192965, 192965, 192965, 192965, 192965, 192965, 192965, 192965, 192965, 192965, 192965, 192965, 192965, 192965, 192965, 0, 192965, 0, 1, 12290, 192965, 192965, 192965, 0, 0, 192965, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1201, 0, 0, 0, 0, 0, 0, 0, 0, 192965, 192965, 192965, 192965, 192965, 192965, 192965, 192965, 192965, 192965, 0, 192965, 192965, 192965, 192965, 192965, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 0, 304, 0, 0, 0, 0, 0, 0, 0, 0, 196608, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1582, 0, 0, 0, 301, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 727, 406, 406, 406, 406, 406, 406, 0, 0, 0, 0, 0, 406, 0, 406, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 118784, 298, 3, 78114, 78114, 292, 0, 0, 0, 0, 0, 298, 299, 0, 301, 302, 303, 0, 0, 0, 0, 0, 3142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2978, 534, 534, 534, 534, 0, 0, 0, 0, 733, 406, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1240, 0, 0, 0, 1244, 0, 0, 1175, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2871296, 0, 0, 1171, 1171, 0, 0, 0, 1175, 1650, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 0, 253952, 0, 0, 0, 0, 580, 580, 580, 1540, 2005, 0, 0, 0, 0, 1546, 2007, 0, 0, 0, 0, 1552, 0, 0, 0, 1558, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 405, 0, 0, 0, 0, 0, 2009, 0, 0, 0, 0, 1558, 2011, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 406, 0, 0, 0, 0, 0, 534, 534, 534, 534, 2549, 0, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1410, 556, 556, 556, 556, 556, 0, 306, 0, 306, 0, 0, 0, 0, 0, 0, 0, 0, 0, 306, 0, 0, 0, 0, 0, 0, 1155072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2705, 0, 0, 0, 0, 0, 204800, 204800, 0, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 204800, 205106, 204800, 204800, 205105, 205106, 204800, 205105, 205105, 204800, 204800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 299, 0, 0, 0, 0, 0, 3, 0, 0, 2183794, 0, 0, 0, 0, 0, 298, 299, 151552, 2134016, 302, 303, 0, 0, 0, 0, 0, 155648, 155648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 655, 212992, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 757, 0, 151552, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 286720, 2179072, 2179072, 2179072, 2179072, 2179072, 2126724, 2126724, 2126724, 2126724, 2126724, 0, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 3036110, 2126798, 2126798, 3072974, 2126798, 2126798, 2126798, 3122126, 2700164, 2126724, 2716548, 2126724, 2724740, 2126724, 2732932, 2773892, 2126724, 2126724, 2126724, 2806660, 2126724, 2831236, 2126724, 2126724, 973, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2864004, 2126724, 2126724, 2126724, 2126724, 2921348, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2626436, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 3117956, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 0, 0, 975, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 3224526, 2179072, 2126798, 2126724, 2179072, 2179072, 2126724, 2126724, 2126798, 2126798, 0, 2486272, 0, 0, 0, 0, 0, 2678784, 2854912, 3006464, 2126798, 2126798, 2126798, 2626510, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2700238, 2126798, 2716622, 2126798, 2724814, 2126798, 2126798, 2126798, 2126798, 2126798, 2454478, 2126798, 2474958, 2483150, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2532302, 2733006, 2773966, 2126798, 2126798, 2126798, 2806734, 2126798, 2831310, 2126798, 2126798, 2864078, 2126798, 2126798, 2126798, 2126798, 2921422, 2126724, 2409348, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2814852, 2126724, 2839428, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 3126148, 2126724, 2126724, 2126724, 2126724, 2126798, 2126798, 2585550, 2126798, 2126798, 2126798, 2126798, 2126798, 2618318, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2663374, 2179072, 2179072, 2179072, 3207168, 2179072, 0, 0, 0, 0, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2552708, 2126724, 2126724, 2126724, 2126724, 2126724, 2638724, 2126724, 2126724, 2720644, 2126724, 2126724, 2126724, 2126724, 2126724, 2769796, 2777988, 2782084, 2798468, 2823044, 2126724, 2126724, 2126724, 2884484, 2126724, 2913156, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 3040132, 2126724, 2126724, 2126724, 2728836, 2753412, 2126724, 2126724, 2126724, 2126724, 2843524, 2847620, 2126724, 2896772, 2917252, 2126724, 2126724, 2126724, 2126724, 3150724, 2126798, 2429902, 2438094, 2126798, 2487246, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2929614, 2126798, 2126798, 2126798, 2999246, 2126798, 3064708, 2126724, 2126724, 2126724, 2126724, 2126724, 3101572, 2126724, 2126724, 3134340, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2585476, 2126724, 2126724, 2126724, 2126724, 2126724, 2618244, 2126724, 2126724, 2126724, 2126798, 2720718, 2126798, 2126798, 2126798, 2126798, 2126798, 2769870, 2778062, 2782158, 2798542, 2823118, 2126798, 2126798, 2126798, 2884558, 2126798, 2913230, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 3040206, 2126798, 2126798, 2126798, 2126798, 2126798, 2601934, 2126798, 2126798, 2126798, 2126798, 2642894, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2606030, 2126798, 2630606, 2126798, 2126798, 2651086, 2126798, 2126798, 2126798, 3064782, 2126798, 2126798, 2126798, 2126798, 2126798, 3101646, 2126798, 2126798, 3134414, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 0, 2179072, 2126798, 2126724, 2457600, 2179072, 2179072, 2179072, 2179072, 2458500, 2126798, 2126798, 2126798, 3208142, 2126798, 2179072, 2126798, 2126724, 2179072, 2179072, 2179072, 2179072, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 3011460, 2126724, 2126724, 2126724, 2126798, 2126798, 2503630, 0, 0, 0, 0, 2388868, 2126724, 2126724, 2126724, 2421636, 2126724, 2126724, 2126724, 2126724, 2126724, 2454404, 2126724, 2126724, 2126724, 3027844, 2405326, 2126798, 2126798, 2126798, 2126798, 3027918, 2539520, 0, 2949120, 2179072, 2658304, 2973696, 2474884, 2483076, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2532228, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2601860, 2126724, 2126724, 2126724, 2126724, 2642820, 2126724, 2126724, 2126724, 2126724, 2126724, 2655108, 2679684, 2761604, 2765700, 2786180, 2855812, 2970500, 2126724, 3007364, 2126724, 3019652, 2605956, 2126724, 2630532, 2126724, 2126724, 2651012, 2126724, 2126724, 2126724, 2708356, 2126724, 2737028, 2126724, 2126724, 2126724, 2126724, 2462596, 2466692, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2524036, 2126724, 2126724, 2126724, 2126724, 3036036, 2126724, 2126724, 3072900, 2126724, 2126724, 2126724, 3122052, 2126724, 2126724, 3142532, 2126724, 2126724, 2126724, 3171204, 2126724, 2126724, 3191684, 3195780, 2126724, 0, 0, 0, 0, 0, 0, 2388942, 2126798, 2126798, 2126798, 2421710, 2708430, 2126798, 2737102, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2888654, 2126798, 2126798, 2925518, 2126798, 2126798, 2126798, 2126798, 2179072, 2126798, 2126724, 2179072, 2179072, 2179072, 2179072, 2126724, 2126724, 2126724, 2126724, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2802638, 2814926, 2126798, 2839502, 2126798, 2126798, 2126798, 3142606, 2126798, 2126798, 2126798, 3171278, 2126798, 2126798, 3191758, 3195854, 2126798, 2179072, 2126798, 2126724, 2179072, 2126724, 2126798, 2179072, 2126724, 2126798, 2179072, 2126724, 2126798, 2985984, 2986884, 2986958, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 315, 316, 316, 421, 422, 65536, 429, 2179072, 3112960, 3219456, 2126724, 2126724, 3113860, 3220356, 2126798, 2126798, 3113934, 3220430, 0, 0, 0, 0, 0, 0, 0, 2046, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1238, 0, 0, 0, 0, 0, 0, 2179072, 2179072, 2179072, 3223552, 0, 0, 2126724, 2126724, 2417540, 2126724, 2126724, 2126724, 2446212, 2126724, 2126724, 2126724, 2126724, 2888580, 2126724, 2126724, 2925444, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 0, 0, 2126798, 2126798, 2126798, 2409422, 2126798, 2126798, 2945924, 2126724, 2126724, 2995076, 2126724, 3003268, 2126724, 2126724, 3023748, 2126724, 3068804, 3085188, 2126724, 3097476, 2126724, 2126724, 2126724, 2519940, 2126724, 2126724, 2126724, 2126724, 2589572, 2126724, 2614148, 2646916, 2126724, 2126724, 2696068, 2757508, 2638798, 2126798, 2126798, 2126798, 2126798, 2728910, 2753486, 2126798, 2126798, 2126798, 2126798, 2843598, 2847694, 2126798, 2896846, 2917326, 2126798, 2126798, 2945998, 2126798, 2126798, 2995150, 2126798, 3003342, 2126798, 2126798, 3023822, 2126798, 3068878, 3085262, 2126798, 3097550, 2179072, 2179072, 3059712, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3178496, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 3224452, 0, 0, 2126798, 2126798, 2417614, 2126798, 2126798, 2126798, 2446286, 2126798, 2126724, 2126724, 3060612, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 3179396, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 3126222, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 3118030, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2495438, 2126798, 2126798, 2515918, 2126798, 2126798, 2126798, 2544590, 2548686, 2126798, 2126798, 2597838, 2126798, 2126798, 2126798, 2126798, 2425806, 2433998, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 0, 0, 0, 2179072, 2126798, 2126724, 2126798, 2126798, 2126798, 3060686, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 3179470, 2179072, 2126798, 2126724, 2179072, 2126724, 2659204, 2974596, 2126724, 2126798, 2659278, 2974670, 2126798, 2711552, 2560000, 2179072, 2560900, 2126724, 2560974, 2126798, 2126798, 2126798, 2126798, 2462670, 2466766, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2524110, 2126798, 2126798, 2126798, 2126798, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2473984, 2478080, 2179072, 2179072, 2179072, 3129344, 2179072, 2179072, 3153920, 3166208, 3174400, 2397060, 2401156, 2126724, 2126724, 2442116, 2126724, 2470788, 3154820, 3167108, 3175300, 2397134, 2401230, 2126798, 2126798, 2442190, 2126798, 2470862, 2126798, 2126798, 2126798, 2520014, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 3130318, 2126798, 2126798, 3154894, 3167182, 3175374, 2506752, 2507726, 2507652, 2126798, 2126798, 2589646, 2126798, 2614222, 2646990, 2126798, 2126798, 2696142, 2757582, 2126798, 2126798, 2126798, 2126798, 2933710, 2126798, 2126798, 2126798, 2126798, 2593742, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2449408, 0, 2535424, 2179072, 3006464, 2179072, 3018752, 2179072, 2179072, 2179072, 3149824, 2126724, 2429828, 2438020, 2126724, 2487172, 2126724, 2126724, 2126724, 2126724, 2933636, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 3130244, 2126724, 2126724, 2126798, 2126798, 2655182, 2679758, 2761678, 2765774, 2786254, 2855886, 2970574, 2126798, 3007438, 2126798, 3019726, 2126798, 2126798, 2126798, 2126798, 0, 2502656, 0, 0, 3010560, 0, 0, 0, 0, 2990080, 2179072, 2179072, 2126798, 3150798, 2179072, 3051520, 2126724, 3052420, 2126798, 3052494, 0, 2490368, 2498560, 0, 0, 0, 0, 2875392, 2179072, 2179072, 2179072, 2555904, 2564096, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 3137536, 2126724, 2126724, 2126724, 3208068, 2126724, 0, 0, 0, 0, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2552782, 2126798, 2126798, 2126798, 2126798, 2126798, 2126724, 2499460, 2126724, 2126724, 2126724, 2556804, 2564996, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2929540, 2126724, 2126724, 2126724, 2999172, 2126724, 2126724, 2126724, 3138436, 2126798, 2126798, 2499534, 2126798, 2126798, 2126798, 2556878, 2565070, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 2126798, 3011534, 2126798, 2126798, 2126798, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 322, 323, 0, 2126724, 2450308, 2126724, 2536324, 2126724, 2610052, 2126724, 2859908, 2126724, 2126724, 2126724, 3031940, 2126724, 2126798, 2450382, 2126798, 2126798, 2126798, 2126798, 3093454, 0, 0, 0, 2404352, 2179072, 2179072, 2179072, 2179072, 3026944, 2405252, 2126724, 2126724, 2495364, 2126724, 2126724, 2515844, 2126724, 2126724, 2126724, 2544516, 2548612, 2126724, 2126724, 2597764, 2126724, 2126724, 2126724, 2663300, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2126724, 2802564, 2536398, 2126798, 2610126, 2126798, 2859982, 2126798, 2126798, 2126798, 3032014, 2126798, 2527232, 0, 0, 0, 2179072, 2527232, 2179072, 2179072, 2179072, 2179072, 2179072, 2126724, 2528132, 2126724, 2126724, 2126724, 2126724, 2126724, 3093380, 2126798, 2528206, 2126798, 2126798, 2126798, 2126798, 3138510, 2940928, 2941828, 2941902, 0, 0, 0, 0, 0, 2748416, 2879488, 0, 0, 0, 0, 0, 172032, 0, 172032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 0, 0, 122880, 122880, 0, 0, 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, 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, 221184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 338, 292, 0, 0, 0, 0, 0, 0, 221184, 0, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 221184, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139264, 299, 0, 0, 2142208, 0, 0, 0, 98304, 0, 0, 0, 53248, 0, 0, 0, 0, 0, 0, 0, 2061, 2062, 0, 0, 0, 0, 0, 0, 0, 0, 159744, 0, 0, 0, 0, 0, 0, 0, 0, 1198, 0, 0, 0, 0, 0, 0, 0, 0, 1212, 0, 0, 0, 0, 0, 0, 0, 0, 1578, 0, 0, 0, 577536, 0, 0, 1583, 0, 0, 0, 302, 0, 303, 0, 0, 0, 303, 0, 0, 0, 2461696, 0, 0, 0, 0, 0, 0, 1159168, 416, 416, 0, 0, 0, 0, 0, 416, 0, 0, 98304, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12290, 2179072, 3121152, 2179072, 2179072, 3141632, 2179072, 2179072, 2179072, 3170304, 2179072, 2179072, 3190784, 3194880, 2179072, 901, 0, 0, 0, 0, 0, 229376, 0, 0, 0, 0, 0, 0, 0, 0, 1666, 0, 0, 0, 0, 0, 2958, 0, 0, 0, 0, 2962, 0, 0, 0, 0, 2967, 0, 0, 901, 0, 2387968, 2125824, 2125824, 2125824, 2420736, 2125824, 2125824, 2125824, 2125824, 2125824, 2453504, 2125824, 2473984, 2482176, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2531328, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3190784, 3194880, 2125824, 975, 0, 0, 0, 975, 0, 2387968, 2125824, 2125824, 2125824, 2420736, 2179072, 2179072, 2179072, 3223552, 901, 0, 2125824, 2125824, 2416640, 2125824, 2125824, 2125824, 2445312, 2125824, 2125824, 2125824, 2125824, 2125824, 3223552, 0, 0, 2125824, 2125824, 2416640, 2125824, 2125824, 2125824, 2445312, 2125824, 225734, 225734, 225734, 225734, 225734, 225734, 225734, 225734, 225734, 225734, 225734, 225734, 225734, 225734, 225734, 225734, 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, 379, 0, 0, 0, 0, 0, 0, 0, 217088, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 307, 308, 0, 0, 0, 114688, 0, 241664, 258048, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 676, 677, 678, 0, 0, 0, 254407, 254407, 254407, 254407, 254407, 254407, 254407, 254407, 254407, 254407, 254407, 254407, 254407, 254407, 254407, 254407, 0, 0, 0, 0, 0, 0, 0, 0, 0, 386, 0, 0, 0, 0, 0, 386, 0, 0, 0, 2183168, 0, 0, 270336, 0, 0, 298, 299, 0, 2134016, 302, 303, 200704, 0, 0, 180224, 0, 0, 0, 0, 0, 0, 0, 0, 2424832, 2433024, 0, 0, 2457600, 20480, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2126724, 2126724, 2126724, 2126724, 2126724, 1, 12290, 2113825, 0, 0, 0, 0, 0, 0, 295, 0, 0, 0, 295, 0, 0, 0, 0, 0, 0, 2387968, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 330, 381, 383, 0, 0, 0, 0, 0, 266240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 266240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 12290, 0, 0, 266240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 338, 339, 340, 2113825, 0, 0, 2183168, 0, 0, 0, 0, 0, 298, 299, 0, 2134016, 302, 303, 0, 0, 0, 0, 0, 237568, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1657, 0, 0, 0, 0, 274432, 274432, 274432, 274432, 274432, 274432, 0, 0, 0, 0, 0, 274432, 0, 274432, 1, 12290, 3, 0, 0, 0, 0, 0, 0, 0, 90408, 90408, 90408, 90408, 0, 94505, 1, 12290, 3, 78114, 292, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1611, 0, 0, 0, 3, 78114, 78114, 292, 0, 0, 0, 0, 0, 298, 299, 0, 0, 302, 303, 0, 0, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1163264, 78114, 1066, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 308, 307, 534, 534, 534, 1341, 901, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 580, 580, 3062, 580, 580, 2009, 0, 0, 0, 0, 0, 2011, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 722, 0, 0, 0, 0, 0, 0, 2954, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 330, 0, 0, 1650, 0, 0, 0, 0, 0, 0, 0, 0, 2089, 0, 0, 0, 0, 0, 0, 0, 2086, 0, 0, 0, 0, 0, 2092, 0, 0, 290, 1066, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 680, 681, 3, 78114, 78449, 292, 0, 0, 0, 0, 0, 298, 299, 0, 0, 302, 303, 0, 0, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 0, 0, 1138688, 0, 0, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 0, 739, 0, 0, 0, 0, 0, 0, 1150976, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 385, 337, 0, 581, 557, 557, 557, 557, 557, 557, 557, 581, 581, 581, 534, 581, 581, 581, 581, 581, 581, 581, 557, 557, 534, 557, 581, 557, 581, 1, 12290, 1, 12290, 3, 78115, 292, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1680, 0, 0, 0, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 1, 12290, 282624, 282624, 282624, 0, 0, 282624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2027, 0, 0, 0, 0, 0, 0, 0, 0, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 0, 282624, 282624, 282624, 282624, 282624, 0, 0, 0, 0, 0, 0, 0, 0, 0, 637, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 641, 0, 0, 0, 0, 0, 3047424, 3129344, 0, 2981888, 2396160, 0, 3153920, 3132, 0, 0, 2740224, 0, 0, 0, 0, 0, 0, 1181, 1183, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1608, 1609, 1610, 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, 286720, 0, 0, 0, 0, 0, 0, 0, 0, 0, 705, 0, 0, 0, 709, 0, 0, 0, 3108864, 3198976, 0, 0, 3043328, 0, 3149824, 2936832, 0, 2760704, 3252, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 167936, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 3329, 0, 0, 2834432, 0, 3227648, 2568192, 2564096, 0, 2940928, 2179072, 2179072, 2498560, 3329, 0, 0, 0, 0, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 0, 2125824, 2125824, 0, 0, 0, 308, 0, 0, 0, 0, 0, 307, 0, 307, 308, 0, 307, 307, 0, 0, 0, 307, 307, 308, 308, 0, 0, 0, 0, 0, 0, 307, 407, 308, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 783, 0, 0, 0, 308, 412, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 57344, 0, 0, 0, 0, 0, 0, 1120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1239, 0, 0, 0, 0, 0, 456, 456, 456, 482, 482, 456, 482, 482, 482, 482, 482, 482, 482, 507, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 482, 527, 482, 482, 482, 482, 482, 535, 558, 535, 558, 535, 535, 558, 535, 582, 558, 558, 558, 558, 558, 558, 558, 582, 582, 582, 535, 582, 582, 582, 582, 582, 582, 582, 558, 558, 535, 558, 582, 558, 582, 1, 12290, 0, 667, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 769, 0, 697, 0, 0, 0, 0, 0, 0, 0, 704, 0, 0, 0, 0, 0, 0, 0, 0, 1639, 0, 0, 0, 0, 0, 0, 0, 0, 1660, 1661, 0, 1663, 0, 0, 0, 0, 0, 729, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 740, 0, 0, 0, 0, 0, 0, 2834432, 0, 3227648, 2568192, 2564096, 0, 2940928, 2179072, 2179072, 2498560, 0, 0, 0, 638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 755, 0, 0, 0, 0, 0, 2134749, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1169, 734, 0, 0, 0, 0, 0, 0, 761, 0, 0, 765, 0, 0, 0, 0, 772, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 172032, 0, 0, 0, 0, 65536, 0, 0, 0, 641, 0, 0, 0, 0, 0, 0, 804, 0, 0, 0, 780, 0, 0, 0, 0, 0, 327, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 821, 776, 0, 0, 0, 0, 0, 825, 826, 776, 776, 0, 0, 0, 0, 0, 0, 0, 780, 0, 0, 0, 0, 0, 0, 0, 0, 1677, 0, 1679, 0, 0, 0, 0, 0, 0, 776, 729, 776, 0, 534, 534, 836, 840, 534, 534, 534, 534, 534, 534, 866, 534, 871, 534, 878, 534, 881, 534, 534, 895, 534, 534, 556, 556, 556, 909, 913, 1018, 580, 1025, 580, 1028, 580, 580, 1042, 580, 580, 0, 0, 0, 840, 987, 913, 836, 1052, 881, 534, 534, 909, 1057, 954, 556, 556, 0, 983, 1062, 1028, 580, 580, 534, 534, 556, 556, 580, 580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78114, 1066, 0, 0, 1068, 1072, 0, 0, 1076, 1080, 0, 0, 0, 0, 0, 0, 0, 406, 406, 406, 406, 0, 406, 406, 406, 406, 0, 0, 1144, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 508, 515, 515, 0, 0, 0, 1634, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3126, 0, 0, 1769, 534, 534, 1772, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1784, 534, 534, 534, 534, 534, 884, 534, 534, 534, 534, 534, 556, 556, 903, 556, 556, 0, 580, 580, 580, 984, 580, 990, 580, 580, 1003, 580, 580, 1014, 580, 534, 534, 534, 534, 1789, 534, 534, 534, 534, 534, 534, 534, 1341, 1799, 556, 556, 0, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 0, 0, 0, 0, 534, 534, 556, 556, 556, 1806, 556, 556, 556, 556, 556, 1812, 556, 556, 556, 556, 556, 556, 0, 0, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2370, 580, 580, 580, 580, 580, 580, 556, 556, 556, 1825, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 955, 556, 556, 556, 1885, 556, 556, 556, 556, 556, 556, 556, 26009, 1895, 580, 580, 580, 580, 580, 1902, 2017, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 787, 0, 0, 0, 2042, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2051, 0, 0, 0, 0, 0, 0, 1196, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1223, 0, 0, 0, 0, 0, 2109, 2110, 0, 0, 2112, 0, 0, 0, 2110, 0, 0, 2117, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 221184, 0, 0, 0, 0, 65536, 0, 2150, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1313, 0, 0, 0, 2464, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3135, 0, 0, 534, 534, 534, 534, 2502, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2510, 534, 534, 534, 2601, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2611, 556, 556, 556, 556, 556, 2563, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1388, 556, 556, 556, 556, 1393, 556, 556, 556, 556, 2632, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1967, 0, 0, 0, 2698, 0, 0, 0, 0, 0, 0, 2703, 0, 0, 0, 0, 0, 0, 0, 2115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2729, 0, 0, 0, 0, 0, 0, 2749, 2750, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 789, 0, 0, 0, 0, 0, 0, 0, 2762, 0, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2521, 534, 534, 534, 534, 534, 2773, 534, 534, 2777, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2786, 556, 2820, 556, 556, 2824, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2833, 580, 580, 580, 2869, 580, 580, 2873, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2899, 580, 580, 580, 580, 580, 580, 2882, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2890, 580, 580, 534, 534, 556, 556, 580, 580, 0, 0, 0, 0, 0, 3324, 0, 0, 0, 0, 0, 346, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221184, 0, 221184, 0, 0, 0, 0, 2931, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 534, 534, 534, 534, 534, 3010, 534, 534, 534, 534, 534, 534, 534, 534, 556, 556, 556, 556, 556, 556, 3412, 556, 556, 556, 556, 556, 556, 3051, 556, 556, 556, 556, 556, 556, 556, 556, 556, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3091, 580, 3093, 580, 580, 580, 580, 580, 580, 580, 580, 580, 534, 580, 556, 534, 534, 556, 556, 580, 3132, 3387, 0, 3389, 0, 534, 3392, 534, 3394, 534, 534, 534, 534, 534, 534, 534, 534, 1777, 534, 534, 534, 534, 534, 534, 534, 534, 2157, 534, 534, 534, 534, 534, 534, 534, 534, 2182, 534, 534, 534, 534, 2187, 534, 534, 534, 534, 3448, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 556, 556, 556, 556, 556, 3023, 556, 3461, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 580, 580, 580, 580, 3064, 580, 3475, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 0, 0, 0, 0, 3561, 534, 0, 3490, 0, 3492, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2794, 534, 534, 0, 0, 3533, 0, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1281, 309, 310, 311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 640, 0, 0, 0, 0, 420, 0, 0, 0, 0, 443, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1109, 0, 1111, 1112, 0, 0, 0, 0, 0, 0, 443, 443, 420, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 443, 526, 443, 526, 526, 526, 443, 526, 526, 526, 526, 443, 536, 559, 536, 559, 536, 536, 559, 536, 583, 559, 559, 559, 559, 559, 559, 559, 583, 583, 583, 536, 583, 583, 583, 583, 583, 583, 583, 559, 559, 609, 614, 583, 614, 620, 1, 12290, 534, 534, 874, 534, 534, 534, 534, 534, 534, 534, 534, 556, 556, 556, 556, 556, 0, 580, 580, 580, 580, 580, 580, 1021, 580, 580, 580, 580, 580, 580, 580, 580, 0, 0, 0, 534, 580, 556, 556, 556, 556, 556, 556, 556, 580, 580, 580, 534, 580, 580, 580, 580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3445, 534, 0, 0, 0, 1657, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3262, 534, 534, 1785, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1341, 0, 556, 556, 0, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1006, 580, 580, 580, 0, 0, 1544, 0, 0, 0, 0, 0, 1550, 0, 0, 0, 0, 0, 0, 347, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 167936, 580, 580, 1970, 580, 580, 580, 580, 580, 1977, 580, 580, 580, 580, 580, 580, 580, 1444, 580, 580, 580, 580, 580, 1456, 580, 580, 0, 0, 2425, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 654, 0, 0, 2612, 556, 556, 556, 556, 0, 2615, 0, 0, 0, 0, 580, 580, 580, 580, 580, 534, 556, 580, 0, 3382, 0, 0, 3385, 0, 0, 0, 580, 2621, 580, 580, 580, 580, 2625, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3221, 580, 580, 580, 580, 580, 0, 0, 0, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 0, 0, 0, 0, 0, 0, 1249, 0, 0, 0, 0, 0, 0, 534, 534, 534, 534, 534, 850, 534, 534, 534, 534, 534, 0, 312, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1172, 0, 0, 0, 315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 655, 0, 0, 422, 430, 421, 430, 0, 312, 430, 444, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 457, 478, 483, 483, 494, 483, 483, 483, 483, 483, 483, 483, 483, 509, 509, 522, 522, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 523, 509, 523, 523, 523, 523, 523, 537, 560, 537, 560, 537, 537, 560, 537, 584, 560, 560, 560, 560, 560, 560, 560, 584, 584, 584, 606, 584, 584, 584, 584, 584, 584, 607, 608, 608, 606, 608, 607, 608, 607, 1, 12290, 0, 0, 811, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 679, 0, 0, 0, 695, 0, 0, 0, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1720, 534, 534, 882, 534, 534, 556, 556, 955, 556, 556, 0, 580, 580, 1029, 580, 580, 534, 534, 556, 556, 580, 580, 0, 0, 0, 3322, 0, 0, 3325, 0, 0, 0, 0, 1161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249856, 0, 0, 0, 0, 0, 0, 0, 1193, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 0, 1206, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1218, 0, 0, 534, 534, 1254, 534, 1257, 534, 534, 534, 534, 534, 534, 534, 534, 1271, 534, 1276, 534, 534, 1280, 534, 534, 1283, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1294, 534, 534, 534, 534, 534, 1341, 901, 556, 556, 1345, 556, 556, 1349, 556, 556, 556, 556, 556, 0, 0, 0, 0, 0, 0, 580, 580, 580, 580, 580, 0, 3580, 0, 534, 534, 534, 534, 534, 534, 556, 556, 556, 556, 556, 1363, 556, 1368, 556, 556, 1372, 556, 556, 1375, 556, 556, 556, 556, 556, 0, 2296, 0, 0, 580, 580, 580, 580, 580, 580, 580, 2355, 580, 580, 580, 580, 2360, 580, 580, 580, 580, 1437, 580, 580, 1441, 580, 580, 580, 580, 580, 580, 580, 580, 1455, 580, 1460, 580, 580, 1464, 580, 580, 1467, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 0, 0, 188416, 534, 580, 556, 1669, 0, 0, 0, 0, 0, 0, 1676, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1199, 1200, 0, 0, 0, 0, 0, 580, 1923, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1459, 580, 580, 1936, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1919, 580, 534, 2176, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 0, 0, 534, 534, 534, 534, 2192, 2193, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 556, 556, 556, 556, 3022, 556, 2262, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1819, 556, 556, 556, 2278, 2279, 2280, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1846, 556, 556, 556, 1851, 556, 2349, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1985, 580, 580, 580, 2365, 2366, 2367, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 0, 3558, 0, 3560, 534, 534, 0, 2399, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1243, 0, 0, 0, 0, 0, 2465, 2466, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2090, 0, 0, 0, 0, 580, 580, 580, 2663, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 534, 580, 556, 3105, 534, 534, 534, 534, 534, 2790, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 556, 3019, 556, 556, 556, 556, 2917, 0, 0, 0, 0, 0, 2923, 0, 0, 0, 0, 0, 0, 0, 2927, 0, 0, 0, 0, 0, 2200246, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1617, 0, 0, 0, 0, 0, 0, 0, 0, 2972, 0, 0, 0, 0, 0, 0, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2987, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 899, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3027, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1432, 26009, 1341, 975, 580, 0, 3139, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1597, 0, 534, 534, 534, 534, 3175, 534, 534, 534, 534, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3438, 0, 3439, 0, 0, 0, 0, 0, 0, 0, 534, 3446, 534, 3447, 534, 534, 534, 3451, 534, 534, 534, 534, 534, 534, 534, 556, 3459, 556, 556, 556, 556, 556, 2589, 556, 556, 2593, 556, 556, 556, 556, 556, 556, 556, 2606, 556, 556, 556, 556, 556, 556, 556, 556, 2269, 556, 556, 556, 556, 556, 556, 556, 3460, 556, 556, 556, 3464, 556, 556, 556, 556, 556, 556, 556, 556, 580, 3473, 580, 0, 0, 2920, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2926, 0, 0, 0, 0, 0, 1147, 0, 1149, 0, 0, 0, 0, 0, 0, 0, 0, 534, 557, 534, 557, 534, 534, 557, 534, 3474, 580, 580, 580, 3478, 580, 580, 580, 580, 580, 580, 580, 580, 0, 0, 0, 534, 534, 3583, 3584, 534, 534, 556, 556, 3596, 556, 556, 556, 3598, 580, 580, 580, 3600, 0, 534, 534, 556, 556, 580, 580, 0, 0, 0, 0, 3244, 0, 0, 0, 0, 0, 323, 323, 373, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 725, 0, 0, 0, 0, 373, 0, 432, 438, 0, 445, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 458, 484, 484, 495, 484, 484, 484, 484, 484, 484, 484, 484, 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 510, 538, 561, 538, 561, 538, 538, 561, 538, 585, 561, 561, 561, 561, 561, 561, 561, 585, 585, 585, 538, 585, 585, 585, 585, 585, 585, 585, 561, 561, 538, 561, 585, 561, 585, 1, 12290, 787, 0, 0, 0, 0, 534, 534, 534, 534, 534, 534, 534, 534, 859, 534, 534, 534, 534, 534, 534, 2139, 534, 534, 2142, 534, 534, 534, 534, 534, 534, 534, 1760, 1761, 1762, 534, 534, 1765, 1766, 534, 534, 1114, 1115, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1613, 0, 1100, 0, 1231, 0, 0, 0, 0, 0, 1115, 0, 0, 0, 0, 0, 1214, 0, 0, 0, 0, 0, 3088384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 752, 0, 0, 0, 0, 0, 0, 1246, 1114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 534, 1255, 534, 534, 534, 1341, 901, 556, 556, 1346, 556, 556, 556, 556, 556, 556, 556, 556, 1389, 556, 556, 556, 556, 556, 556, 556, 556, 1397, 556, 556, 556, 1401, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1880, 556, 556, 556, 556, 556, 580, 1438, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1934, 580, 580, 580, 1465, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1491, 580, 580, 1478, 580, 580, 580, 580, 580, 580, 580, 1487, 580, 580, 1489, 580, 580, 580, 1493, 1517, 580, 580, 580, 580, 580, 0, 534, 580, 556, 534, 534, 534, 534, 534, 556, 580, 534, 556, 580, 534, 556, 580, 534, 556, 580, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 135168, 135168, 0, 0, 65536, 135168, 556, 556, 556, 556, 1872, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1832, 556, 556, 556, 556, 1968, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2362, 580, 580, 2004, 0, 2005, 0, 0, 0, 0, 0, 2007, 0, 0, 0, 0, 0, 0, 0, 2418, 0, 0, 0, 0, 0, 2422, 0, 0, 2009, 0, 0, 0, 0, 0, 2011, 0, 0, 0, 0, 0, 2014, 0, 0, 0, 0, 0, 0, 1576, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2077, 0, 0, 0, 0, 0, 2067, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 827, 2121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 534, 534, 534, 534, 534, 534, 534, 2770, 534, 534, 534, 534, 2137, 534, 534, 534, 534, 2141, 534, 534, 534, 534, 534, 534, 534, 534, 2518, 534, 534, 534, 534, 534, 534, 534, 534, 2803, 534, 534, 534, 534, 534, 534, 534, 534, 2989, 534, 534, 534, 534, 534, 534, 534, 534, 3165, 534, 534, 534, 534, 534, 534, 534, 534, 3270, 534, 534, 534, 534, 534, 534, 534, 534, 3280, 556, 556, 556, 556, 556, 556, 556, 1426, 556, 556, 556, 556, 26009, 1341, 975, 580, 556, 556, 2222, 556, 556, 556, 556, 2226, 556, 556, 556, 556, 556, 556, 556, 556, 1405, 556, 556, 556, 556, 556, 556, 556, 580, 580, 2309, 580, 580, 580, 580, 2313, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3527, 580, 580, 580, 0, 3531, 0, 0, 2462, 0, 0, 0, 0, 0, 2467, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1640, 0, 0, 0, 0, 0, 0, 534, 534, 534, 2489, 2490, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2522, 534, 534, 534, 534, 534, 534, 2529, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2993, 534, 534, 2620, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2376, 2660, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3316, 2707, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1100, 0, 0, 0, 0, 2724, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1686, 0, 0, 0, 0, 0, 0, 0, 2752, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2028, 0, 0, 0, 534, 534, 534, 534, 534, 2800, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1307, 534, 534, 534, 534, 534, 2891, 580, 580, 580, 580, 580, 580, 580, 2897, 580, 580, 580, 580, 580, 580, 580, 1471, 580, 580, 580, 580, 580, 580, 580, 580, 1045, 580, 0, 0, 0, 534, 580, 556, 3128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1128, 534, 534, 534, 534, 534, 3176, 534, 534, 534, 556, 556, 556, 556, 556, 556, 556, 3511, 556, 3513, 556, 556, 556, 556, 580, 556, 556, 3297, 556, 556, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3374, 580, 580, 3132, 0, 0, 0, 0, 534, 534, 534, 534, 534, 534, 3397, 534, 534, 534, 534, 0, 0, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1392, 556, 556, 556, 556, 556, 325, 326, 327, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 741, 0, 0, 0, 0, 0, 324, 372, 327, 371, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1110, 0, 0, 0, 0, 0, 324, 0, 0, 371, 371, 401, 0, 327, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1678, 0, 0, 0, 0, 0, 0, 0, 0, 0, 326, 0, 0, 0, 446, 459, 459, 459, 459, 459, 459, 459, 459, 472, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 459, 485, 485, 459, 485, 485, 500, 502, 485, 485, 500, 485, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 511, 528, 511, 511, 511, 511, 511, 539, 562, 539, 562, 539, 539, 562, 539, 586, 562, 562, 562, 562, 562, 562, 562, 586, 586, 586, 539, 586, 586, 586, 586, 586, 586, 586, 562, 562, 539, 562, 586, 562, 586, 1, 12290, 0, 651, 652, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 663, 664, 0, 0, 0, 0, 364, 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 723, 0, 0, 0, 0, 0, 0, 0, 0, 0, 682, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 364, 364, 0, 0, 0, 0, 0, 355, 0, 0, 466, 466, 466, 466, 466, 466, 466, 466, 471, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 466, 471, 0, 713, 0, 0, 0, 0, 0, 0, 720, 0, 0, 0, 724, 0, 0, 0, 0, 0, 0, 1621, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 769, 0, 0, 0, 0, 0, 0, 0, 0, 0, 762, 763, 0, 0, 0, 0, 0, 771, 0, 773, 0, 0, 0, 0, 0, 0, 1637, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1095, 0, 0, 0, 0, 0, 0, 0, 0, 0, 790, 793, 0, 0, 0, 793, 793, 790, 0, 0, 0, 0, 0, 0, 0, 106496, 0, 106496, 0, 0, 0, 0, 106496, 106496, 0, 0, 0, 773, 0, 785, 0, 802, 0, 0, 0, 0, 793, 0, 700, 0, 0, 0, 0, 364, 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1141, 0, 810, 0, 0, 0, 0, 0, 810, 810, 813, 0, 0, 0, 773, 0, 0, 0, 0, 0, 375, 0, 0, 0, 0, 367, 0, 384, 0, 350, 0, 0, 0, 0, 822, 0, 0, 0, 0, 0, 0, 0, 0, 0, 771, 0, 0, 0, 0, 0, 385, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 822, 802, 822, 0, 534, 534, 837, 534, 843, 534, 534, 856, 534, 534, 867, 534, 872, 534, 534, 880, 883, 888, 534, 896, 534, 534, 556, 556, 556, 910, 556, 556, 556, 556, 556, 2604, 2605, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3189, 556, 556, 556, 556, 556, 556, 916, 556, 556, 929, 556, 556, 940, 556, 945, 556, 556, 953, 956, 961, 556, 969, 1019, 580, 580, 1027, 1030, 1035, 580, 1043, 580, 580, 0, 0, 0, 534, 580, 556, 556, 556, 556, 556, 2825, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2284, 556, 556, 556, 556, 556, 837, 534, 1053, 888, 534, 910, 556, 1058, 961, 556, 0, 984, 580, 1063, 1035, 580, 0, 2919, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2458, 0, 0, 0, 0, 1087, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1097, 0, 0, 0, 0, 0, 0, 1659, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 751, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2032, 0, 0, 0, 0, 0, 1104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2078, 0, 0, 0, 1129, 0, 0, 0, 364, 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2471, 0, 0, 0, 0, 0, 1143, 0, 0, 0, 0, 0, 0, 0, 0, 1152, 0, 0, 0, 0, 0, 0, 0, 2442, 0, 0, 0, 0, 0, 0, 0, 2450, 1121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1189, 0, 0, 0, 0, 364, 364, 0, 0, 0, 0, 0, 0, 0, 1139, 0, 0, 0, 0, 0, 328, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2757, 2758, 0, 0, 0, 534, 1282, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1297, 1337, 534, 534, 1341, 901, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1354, 556, 556, 1419, 556, 556, 556, 556, 556, 556, 1429, 556, 556, 26009, 1341, 975, 580, 580, 580, 580, 1523, 580, 0, 534, 580, 556, 534, 534, 534, 534, 534, 556, 556, 556, 556, 556, 2837, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1862, 1863, 556, 556, 556, 556, 1461, 580, 580, 580, 1466, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1915, 580, 580, 580, 580, 580, 580, 1481, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1933, 580, 580, 580, 1495, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1511, 580, 580, 580, 0, 2005, 0, 0, 0, 0, 0, 2007, 0, 0, 0, 0, 0, 0, 0, 2074, 0, 0, 0, 0, 0, 0, 0, 0, 342, 0, 0, 0, 0, 0, 0, 0, 580, 580, 580, 1521, 580, 580, 0, 534, 580, 556, 534, 534, 534, 534, 534, 556, 580, 534, 556, 580, 3610, 3611, 3612, 534, 556, 580, 0, 0, 0, 0, 0, 0, 307, 442, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 456, 0, 0, 1585, 0, 0, 1588, 1589, 1590, 0, 1592, 1593, 0, 0, 0, 0, 1598, 1631, 1632, 0, 0, 0, 0, 0, 0, 0, 0, 1641, 1642, 0, 0, 0, 0, 0, 0, 0, 155648, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1212, 534, 534, 534, 0, 0, 0, 0, 1648, 0, 0, 1650, 0, 0, 0, 0, 1652, 1653, 0, 0, 0, 0, 0, 441, 0, 0, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 467, 552, 575, 552, 575, 552, 552, 575, 552, 0, 0, 1671, 1672, 1673, 1674, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2483, 0, 0, 0, 0, 0, 1683, 0, 0, 1686, 0, 0, 0, 0, 0, 1690, 0, 0, 0, 1694, 1695, 1706, 1566, 1566, 1708, 534, 1710, 534, 1711, 1712, 534, 1714, 534, 534, 534, 1718, 534, 534, 534, 534, 534, 886, 534, 534, 534, 534, 534, 556, 556, 908, 556, 556, 556, 556, 556, 2254, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1431, 556, 26009, 1341, 975, 1435, 534, 534, 1739, 534, 1741, 534, 534, 534, 534, 534, 534, 534, 534, 1749, 1750, 1752, 534, 1786, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1797, 1341, 0, 1802, 556, 556, 556, 556, 556, 3041, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3200, 556, 556, 556, 556, 556, 556, 1804, 556, 1805, 556, 1807, 556, 1809, 556, 556, 556, 1813, 556, 556, 556, 556, 556, 0, 0, 0, 0, 0, 0, 580, 580, 2618, 580, 580, 556, 556, 556, 556, 1826, 556, 556, 556, 556, 1830, 556, 556, 556, 556, 1834, 556, 556, 556, 556, 556, 3055, 556, 556, 556, 556, 556, 580, 580, 580, 3063, 580, 580, 580, 580, 1724, 1915, 1819, 534, 534, 534, 534, 556, 556, 556, 556, 580, 580, 580, 580, 0, 0, 2692, 0, 0, 1836, 556, 556, 556, 556, 556, 556, 556, 556, 1844, 1845, 1847, 556, 556, 556, 556, 556, 0, 2297, 0, 0, 580, 580, 580, 580, 580, 580, 580, 2667, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2653, 580, 580, 580, 580, 2657, 580, 556, 556, 556, 1855, 1856, 1857, 556, 556, 1860, 1861, 556, 556, 556, 556, 556, 556, 0, 0, 580, 580, 580, 2862, 580, 580, 580, 580, 556, 1869, 556, 556, 556, 1873, 556, 556, 556, 556, 556, 556, 556, 1882, 556, 556, 0, 580, 580, 580, 580, 580, 580, 580, 1002, 580, 580, 580, 580, 580, 580, 3555, 3556, 580, 580, 0, 0, 3559, 0, 534, 534, 1903, 580, 1905, 580, 580, 580, 1909, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3528, 580, 580, 0, 0, 0, 1922, 580, 580, 580, 580, 1926, 580, 580, 580, 580, 1930, 580, 1932, 580, 580, 580, 580, 580, 1524, 0, 1270, 1454, 1362, 534, 534, 534, 534, 534, 556, 1952, 1953, 580, 580, 1956, 1957, 580, 580, 580, 580, 580, 580, 580, 1965, 580, 580, 534, 534, 556, 556, 580, 580, 3321, 0, 0, 0, 3323, 0, 0, 0, 0, 0, 0, 2114, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2605056, 0, 0, 0, 0, 2887680, 580, 1969, 580, 580, 580, 580, 580, 580, 580, 1978, 580, 580, 580, 580, 580, 580, 0, 534, 580, 556, 534, 534, 534, 534, 534, 556, 580, 580, 580, 1989, 534, 580, 556, 1766, 534, 1995, 534, 1861, 556, 1999, 556, 1957, 580, 2003, 580, 0, 2005, 0, 0, 0, 0, 0, 2007, 0, 0, 0, 0, 0, 0, 0, 2702, 0, 0, 0, 0, 0, 0, 0, 2706, 0, 2018, 0, 0, 2021, 2022, 0, 0, 0, 2026, 0, 0, 0, 0, 0, 0, 0, 414, 414, 0, 0, 0, 0, 0, 414, 0, 0, 0, 2069, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 742, 0, 0, 0, 1650, 0, 0, 0, 0, 0, 0, 0, 2088, 0, 0, 0, 0, 0, 0, 0, 451, 1147348, 1147348, 1147348, 1147348, 1147348, 1147348, 1147348, 1147348, 1147348, 1147348, 1147348, 1147348, 1147348, 1147348, 1147348, 1147348, 2095, 0, 2097, 0, 0, 0, 0, 0, 0, 0, 0, 2106, 0, 0, 0, 0, 0, 0, 0, 184725, 184925, 184925, 184925, 0, 184925, 184925, 184925, 184925, 184925, 184925, 0, 0, 0, 0, 0, 184925, 0, 184925, 1, 12290, 534, 534, 534, 2153, 534, 2155, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1746, 534, 534, 534, 534, 534, 534, 2204, 2205, 534, 534, 0, 0, 0, 0, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2558, 556, 556, 556, 556, 2238, 556, 2240, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2231, 556, 556, 556, 556, 556, 2291, 2292, 556, 556, 0, 0, 0, 0, 580, 580, 580, 580, 580, 580, 580, 1506, 580, 580, 580, 580, 580, 1513, 580, 580, 580, 580, 2325, 580, 2327, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2318, 580, 580, 580, 580, 580, 2378, 2379, 580, 580, 2145, 2317, 2230, 534, 2385, 534, 534, 556, 2389, 556, 556, 0, 580, 580, 580, 580, 580, 580, 997, 580, 580, 580, 580, 580, 580, 2328, 580, 2330, 580, 580, 580, 580, 580, 580, 580, 2342, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1474, 580, 580, 580, 580, 580, 580, 580, 2393, 580, 580, 2005, 0, 2007, 0, 2009, 0, 2011, 0, 0, 0, 0, 0, 0, 0, 2727, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1579, 0, 0, 0, 0, 0, 0, 0, 2437, 2438, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1089, 0, 0, 534, 2526, 534, 534, 534, 2531, 534, 534, 534, 534, 534, 534, 534, 2538, 534, 534, 534, 534, 534, 534, 2169, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2782, 534, 534, 2785, 534, 534, 534, 534, 534, 534, 534, 2543, 534, 534, 534, 534, 534, 534, 534, 534, 0, 2549, 556, 556, 2587, 556, 556, 556, 556, 2591, 556, 556, 556, 2596, 556, 556, 556, 556, 556, 0, 2615, 0, 0, 0, 0, 580, 580, 580, 580, 580, 534, 556, 580, 0, 0, 0, 0, 0, 0, 0, 3386, 556, 556, 556, 2603, 556, 556, 556, 556, 556, 556, 556, 556, 2609, 556, 556, 556, 556, 556, 556, 3042, 556, 3044, 556, 556, 556, 556, 556, 556, 556, 1404, 556, 556, 1411, 556, 556, 556, 556, 556, 580, 580, 580, 2623, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1451, 580, 580, 580, 580, 580, 580, 2635, 580, 2637, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1914, 580, 580, 580, 580, 580, 580, 580, 2662, 580, 580, 580, 580, 580, 580, 580, 2669, 580, 580, 580, 580, 580, 580, 2895, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1046, 0, 0, 0, 534, 580, 556, 580, 580, 580, 2675, 580, 580, 580, 580, 580, 580, 580, 580, 534, 580, 556, 534, 2913, 556, 2915, 580, 534, 534, 534, 2798, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 3348, 534, 556, 556, 556, 556, 556, 2846, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2245, 556, 556, 556, 556, 0, 2943, 2944, 0, 2945, 0, 2947, 0, 0, 0, 0, 2949, 0, 0, 0, 0, 0, 0, 0, 225883, 225883, 225883, 225883, 225734, 225883, 225883, 225883, 225883, 225883, 225883, 225734, 225734, 225734, 225734, 225734, 225899, 225734, 225899, 1, 12290, 2968, 2969, 0, 2971, 0, 0, 2974, 0, 0, 0, 2977, 534, 534, 534, 534, 534, 0, 0, 0, 0, 556, 2214, 556, 556, 556, 556, 556, 0, 0, 0, 0, 0, 0, 580, 2617, 580, 580, 580, 534, 2984, 534, 534, 534, 534, 534, 2988, 534, 534, 534, 534, 534, 534, 534, 2994, 534, 534, 534, 534, 534, 3000, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1763, 534, 534, 534, 534, 534, 3009, 3011, 534, 534, 534, 3014, 534, 3016, 3017, 534, 556, 556, 556, 556, 556, 556, 0, 0, 580, 2861, 580, 580, 580, 580, 580, 580, 0, 1267, 1451, 1359, 534, 534, 534, 1530, 534, 556, 3024, 556, 556, 556, 556, 556, 3028, 556, 556, 556, 556, 556, 556, 556, 3034, 556, 556, 556, 556, 556, 3185, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2229, 556, 556, 2233, 556, 556, 556, 556, 556, 556, 3040, 556, 556, 3043, 556, 556, 556, 556, 556, 556, 556, 556, 1829, 556, 556, 556, 556, 556, 556, 556, 3050, 3052, 556, 556, 556, 556, 3056, 556, 3058, 3059, 556, 580, 580, 580, 580, 580, 580, 3083, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2331, 580, 580, 580, 580, 2335, 580, 580, 3066, 580, 580, 580, 580, 580, 3070, 580, 580, 580, 580, 580, 580, 580, 3076, 580, 3092, 3094, 580, 580, 580, 580, 3098, 580, 3100, 3101, 580, 534, 580, 556, 534, 534, 534, 534, 534, 887, 534, 534, 534, 534, 534, 556, 556, 556, 556, 556, 0, 0, 0, 2299, 580, 580, 580, 580, 580, 580, 580, 3084, 580, 3086, 580, 580, 580, 580, 580, 580, 3106, 556, 3108, 580, 3110, 0, 0, 0, 0, 0, 0, 3116, 0, 0, 3119, 0, 0, 0, 0, 364, 364, 0, 0, 0, 0, 0, 1096, 0, 0, 0, 0, 0, 0, 0, 286720, 0, 0, 0, 0, 0, 0, 0, 0, 0, 643, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3140, 3141, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2107, 0, 0, 0, 556, 556, 556, 556, 3184, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2272, 556, 556, 556, 556, 556, 556, 556, 3195, 556, 556, 556, 556, 556, 556, 556, 556, 3203, 556, 556, 556, 556, 556, 556, 3197, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2594, 556, 556, 556, 556, 556, 556, 556, 556, 556, 580, 580, 580, 3208, 580, 580, 580, 580, 580, 580, 580, 3213, 580, 580, 580, 580, 1907, 580, 580, 580, 580, 580, 580, 580, 580, 1918, 580, 580, 580, 580, 580, 3096, 580, 580, 3099, 580, 580, 580, 534, 580, 556, 534, 534, 534, 534, 534, 534, 3278, 534, 534, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3515, 556, 556, 580, 556, 3296, 556, 556, 556, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3214, 3326, 3327, 0, 3132, 0, 3331, 0, 0, 0, 0, 0, 0, 0, 534, 534, 534, 2766, 534, 534, 534, 534, 534, 2771, 534, 534, 534, 3405, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 960, 556, 556, 556, 556, 556, 3420, 556, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1452, 580, 580, 580, 580, 580, 3436, 580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 3502, 534, 534, 534, 534, 534, 3450, 534, 534, 534, 534, 534, 534, 534, 534, 556, 556, 556, 3281, 556, 556, 556, 3284, 556, 556, 556, 3463, 556, 556, 556, 556, 556, 556, 556, 556, 556, 580, 580, 580, 580, 580, 580, 3302, 580, 580, 580, 580, 580, 580, 580, 3477, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3486, 3487, 0, 0, 0, 0, 364, 364, 0, 0, 0, 0, 1137, 1095, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 266240, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 3493, 3494, 3495, 534, 534, 534, 3498, 534, 3500, 534, 534, 534, 534, 534, 534, 534, 3269, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2781, 534, 534, 534, 534, 534, 534, 534, 3505, 3506, 3507, 556, 556, 556, 3510, 556, 3512, 556, 556, 556, 556, 3517, 3518, 3519, 3520, 580, 580, 580, 3523, 580, 3525, 580, 580, 580, 580, 3530, 0, 0, 0, 0, 0, 0, 1687, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 783, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3562, 534, 534, 534, 3566, 556, 556, 3568, 556, 556, 556, 3572, 556, 580, 580, 3574, 580, 580, 580, 3578, 580, 0, 0, 0, 534, 534, 534, 534, 534, 534, 556, 556, 580, 580, 0, 3111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 398, 0, 0, 0, 0, 0, 0, 0, 0, 328, 329, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2409, 0, 0, 0, 0, 368, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1629, 0, 0, 0, 0, 368, 0, 0, 0, 376, 378, 0, 0, 0, 0, 0, 0, 0, 0, 2025, 0, 0, 0, 0, 0, 0, 0, 0, 2047, 0, 0, 0, 0, 0, 0, 0, 0, 2087, 0, 0, 0, 0, 0, 0, 0, 0, 2127, 0, 0, 534, 534, 534, 534, 534, 0, 0, 411, 0, 0, 0, 411, 69632, 73728, 0, 368, 368, 0, 423, 65536, 368, 0, 0, 368, 423, 492, 496, 492, 492, 501, 492, 492, 492, 501, 492, 423, 423, 329, 423, 0, 0, 423, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2048, 0, 0, 0, 0, 0, 0, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, 540, 563, 540, 563, 540, 540, 563, 540, 587, 563, 563, 563, 563, 563, 563, 563, 587, 587, 587, 540, 587, 587, 587, 587, 587, 587, 587, 563, 563, 540, 563, 587, 563, 587, 1, 12290, 0, 769, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1644, 0, 556, 556, 556, 556, 933, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2285, 556, 2287, 556, 556, 0, 0, 1207, 0, 1096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2447, 0, 0, 0, 534, 534, 534, 534, 1260, 534, 534, 534, 534, 534, 1272, 534, 534, 534, 534, 534, 0, 0, 0, 2212, 556, 556, 556, 556, 556, 556, 556, 3029, 556, 556, 556, 556, 556, 556, 556, 556, 3030, 556, 556, 556, 556, 556, 556, 556, 534, 534, 534, 1341, 901, 556, 556, 556, 556, 556, 556, 556, 556, 1352, 556, 556, 0, 580, 580, 580, 580, 580, 580, 998, 580, 580, 580, 580, 580, 580, 2650, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2315, 580, 2317, 580, 580, 580, 580, 556, 556, 556, 1364, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1378, 1380, 556, 556, 556, 556, 556, 1871, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1413, 556, 556, 1417, 534, 534, 534, 534, 534, 3567, 556, 556, 556, 556, 556, 556, 556, 3573, 580, 580, 580, 580, 580, 2677, 580, 580, 580, 580, 580, 580, 534, 580, 556, 534, 534, 534, 534, 556, 556, 556, 556, 580, 534, 3597, 556, 556, 556, 3599, 580, 580, 580, 0, 534, 534, 556, 556, 580, 580, 0, 0, 0, 3243, 0, 0, 0, 0, 0, 0, 0, 657, 0, 0, 0, 0, 0, 0, 0, 0, 306, 306, 306, 0, 0, 0, 0, 0, 424, 424, 0, 424, 433, 0, 424, 424, 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, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 486, 541, 564, 541, 564, 541, 541, 564, 541, 588, 564, 564, 564, 564, 564, 564, 564, 588, 588, 588, 541, 588, 588, 588, 588, 588, 588, 588, 564, 564, 541, 564, 588, 564, 588, 1, 12290, 78114, 1066, 0, 0, 1069, 1073, 0, 0, 1077, 1081, 0, 0, 0, 0, 0, 0, 0, 703, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2104, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1194, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2472, 0, 0, 0, 0, 1670, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1667, 0, 0, 0, 0, 0, 2044, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2704, 0, 0, 0, 0, 2068, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1681, 1682, 2392, 580, 580, 580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2928, 0, 0, 0, 2932, 0, 0, 0, 0, 0, 2938, 0, 0, 0, 0, 0, 0, 0, 719, 0, 0, 0, 0, 0, 0, 0, 0, 0, 721, 0, 0, 0, 0, 0, 0, 2953, 0, 0, 2956, 0, 0, 0, 0, 0, 2961, 0, 0, 0, 0, 0, 0, 0, 748, 0, 0, 0, 0, 0, 0, 0, 0, 333, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1204, 2995, 534, 534, 534, 534, 534, 534, 534, 534, 534, 3004, 534, 534, 534, 534, 534, 0, 0, 2211, 0, 556, 556, 556, 556, 556, 556, 556, 2268, 556, 556, 556, 556, 2273, 556, 556, 556, 534, 534, 534, 3012, 534, 534, 3015, 534, 534, 534, 3018, 556, 556, 556, 556, 556, 0, 0, 0, 0, 580, 580, 580, 580, 580, 580, 580, 556, 556, 534, 556, 580, 556, 580, 1, 12290, 556, 556, 556, 556, 3054, 556, 556, 3057, 556, 556, 556, 3060, 580, 580, 580, 580, 0, 0, 0, 0, 0, 0, 0, 0, 2396, 0, 0, 0, 3077, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3087, 580, 580, 580, 580, 0, 0, 0, 0, 0, 0, 3442, 0, 3444, 0, 534, 534, 0, 3120, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2015, 0, 0, 534, 534, 3151, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 3458, 556, 556, 534, 534, 534, 534, 3163, 534, 534, 534, 534, 534, 534, 534, 3168, 534, 3170, 534, 534, 534, 534, 534, 1261, 534, 534, 534, 1270, 534, 534, 534, 534, 534, 534, 534, 2493, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2196, 534, 534, 534, 534, 534, 534, 556, 556, 556, 580, 580, 3207, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1962, 580, 580, 580, 580, 580, 580, 3227, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 534, 580, 556, 2912, 534, 2914, 556, 2916, 3275, 534, 534, 534, 534, 534, 534, 534, 556, 556, 556, 556, 556, 556, 556, 556, 580, 580, 580, 556, 556, 3287, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3293, 556, 556, 556, 556, 556, 556, 3466, 556, 556, 556, 556, 556, 556, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3306, 3587, 3588, 556, 556, 580, 580, 3591, 3592, 580, 580, 0, 0, 0, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1716, 534, 534, 534, 0, 683, 684, 0, 0, 0, 0, 689, 0, 0, 0, 364, 364, 364, 0, 0, 0, 0, 0, 534, 830, 534, 534, 534, 534, 534, 534, 860, 534, 534, 534, 534, 534, 534, 2180, 2181, 534, 534, 534, 534, 534, 534, 2188, 534, 0, 751, 0, 0, 0, 0, 0, 751, 751, 0, 0, 816, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 0, 0, 970, 556, 0, 580, 580, 580, 580, 988, 580, 580, 580, 580, 580, 580, 580, 580, 1044, 580, 0, 0, 0, 841, 988, 914, 534, 534, 534, 534, 897, 556, 556, 556, 556, 970, 0, 580, 580, 580, 580, 1044, 0, 0, 0, 1145, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2408448, 0, 0, 534, 1318, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 0, 2549, 1696, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1190, 580, 580, 1988, 580, 534, 580, 556, 534, 534, 534, 534, 556, 556, 556, 556, 580, 580, 580, 580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2122, 0, 0, 0, 0, 0, 0, 0, 0, 534, 534, 534, 534, 534, 2768, 534, 2769, 534, 534, 2540, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 0, 0, 0, 0, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 0, 0, 975, 580, 0, 3129, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2053, 0, 3235, 534, 3237, 556, 3239, 580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3124, 3125, 0, 0, 0, 556, 556, 556, 3298, 556, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2359, 580, 580, 580, 580, 3317, 580, 534, 534, 556, 556, 580, 580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2076, 0, 0, 0, 0, 0, 0, 461, 461, 479, 487, 487, 479, 487, 487, 487, 487, 487, 487, 487, 487, 512, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 520, 529, 520, 520, 520, 520, 520, 542, 565, 542, 565, 542, 542, 565, 542, 589, 565, 565, 565, 565, 565, 565, 565, 589, 589, 589, 542, 589, 589, 589, 589, 589, 589, 589, 565, 565, 542, 565, 589, 565, 589, 1, 12290, 0, 0, 760, 0, 0, 764, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3132, 0, 0, 0, 0, 0, 778, 0, 0, 0, 0, 0, 0, 0, 782, 0, 0, 0, 0, 0, 0, 0, 779, 0, 0, 0, 0, 788, 0, 0, 0, 0, 0, 0, 800, 0, 0, 0, 0, 0, 0, 805, 0, 0, 0, 782, 0, 0, 0, 0, 364, 364, 0, 0, 0, 1136, 0, 0, 0, 0, 0, 0, 0, 1606, 0, 0, 0, 0, 0, 0, 0, 0, 553, 576, 553, 576, 553, 553, 576, 553, 0, 805, 0, 0, 0, 0, 0, 805, 805, 0, 0, 0, 0, 782, 0, 0, 0, 0, 0, 534, 831, 534, 534, 534, 846, 534, 534, 534, 534, 534, 0, 2210, 0, 0, 556, 556, 556, 556, 556, 556, 556, 1893, 26009, 0, 1898, 580, 1900, 580, 1901, 580, 0, 0, 0, 0, 823, 778, 0, 0, 823, 0, 0, 0, 0, 0, 0, 0, 0, 2468, 0, 0, 0, 0, 0, 0, 0, 0, 2022, 0, 2116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 823, 534, 534, 534, 534, 844, 534, 852, 534, 534, 534, 534, 0, 0, 556, 556, 556, 556, 556, 2815, 556, 2816, 556, 556, 917, 556, 925, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2583, 556, 971, 556, 0, 580, 580, 580, 580, 580, 991, 580, 999, 580, 580, 580, 580, 580, 580, 3097, 580, 580, 580, 580, 580, 534, 580, 556, 534, 534, 534, 534, 1054, 898, 556, 556, 556, 1059, 971, 0, 580, 580, 580, 1064, 1045, 0, 1159, 0, 0, 0, 0, 0, 0, 0, 1167, 0, 0, 0, 0, 0, 0, 0, 789, 0, 0, 0, 0, 0, 0, 770, 0, 0, 0, 1219, 0, 0, 0, 0, 0, 0, 0, 0, 1224, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 364, 0, 0, 0, 1134592, 0, 0, 0, 1134592, 1134592, 0, 0, 1134592, 0, 0, 1134592, 0, 1134592, 534, 534, 1284, 534, 534, 534, 534, 534, 534, 534, 1292, 534, 534, 534, 534, 534, 0, 2209, 0, 0, 556, 556, 556, 556, 556, 556, 556, 1842, 556, 556, 556, 556, 556, 556, 556, 556, 26009, 1896, 580, 580, 580, 580, 580, 580, 534, 534, 534, 1321, 534, 534, 1325, 534, 534, 534, 534, 534, 1331, 534, 534, 534, 534, 534, 534, 534, 3342, 534, 3344, 534, 534, 534, 534, 534, 556, 1338, 534, 534, 1341, 901, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2568, 556, 556, 556, 556, 556, 1357, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1376, 556, 556, 556, 556, 556, 0, 2615, 0, 0, 0, 0, 580, 580, 580, 2619, 580, 556, 556, 556, 1384, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1816, 1817, 556, 556, 580, 580, 580, 1522, 580, 580, 0, 534, 580, 556, 534, 534, 534, 534, 534, 556, 556, 556, 556, 556, 3196, 556, 3198, 556, 556, 556, 556, 556, 556, 556, 556, 1878, 1879, 556, 556, 556, 556, 556, 556, 534, 534, 534, 534, 1773, 534, 534, 534, 534, 534, 534, 1781, 534, 534, 534, 534, 0, 0, 556, 556, 556, 2813, 556, 556, 556, 556, 556, 2818, 556, 556, 1823, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2842, 556, 556, 556, 1853, 556, 556, 556, 556, 1859, 556, 556, 556, 556, 556, 556, 556, 556, 2840, 556, 556, 556, 556, 556, 556, 556, 1868, 556, 556, 556, 556, 556, 556, 1876, 556, 556, 556, 556, 556, 556, 556, 556, 2850, 556, 556, 556, 556, 556, 556, 556, 556, 1886, 1888, 556, 556, 556, 556, 556, 26009, 0, 580, 580, 580, 580, 580, 580, 0, 1525, 1526, 1527, 534, 534, 1529, 534, 534, 556, 580, 580, 580, 1955, 580, 580, 580, 580, 580, 580, 580, 580, 1964, 580, 580, 580, 580, 580, 1940, 1941, 1943, 580, 580, 580, 580, 580, 580, 580, 1951, 580, 580, 580, 1972, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1982, 1984, 580, 580, 580, 580, 1925, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2372, 580, 2374, 580, 580, 0, 0, 0, 2057, 0, 0, 0, 0, 0, 2063, 0, 0, 0, 0, 0, 0, 0, 1089, 0, 0, 0, 0, 1241, 1242, 0, 0, 0, 0, 0, 0, 2071, 0, 0, 0, 0, 0, 0, 0, 0, 2079, 0, 0, 0, 0, 0, 534, 833, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1306, 534, 534, 534, 534, 534, 534, 2134, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2146, 534, 534, 534, 534, 534, 534, 534, 3453, 534, 534, 534, 534, 534, 556, 556, 556, 556, 556, 556, 2826, 556, 556, 556, 556, 556, 556, 556, 556, 556, 949, 556, 556, 556, 556, 967, 556, 2189, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1314, 2203, 534, 534, 534, 534, 0, 0, 0, 0, 556, 556, 556, 556, 556, 556, 2219, 2290, 556, 556, 556, 556, 0, 0, 0, 0, 580, 580, 580, 580, 580, 580, 2306, 2377, 580, 580, 580, 580, 2146, 2318, 2231, 534, 534, 534, 534, 556, 556, 556, 556, 580, 580, 580, 580, 0, 534, 534, 556, 556, 580, 580, 0, 0, 0, 0, 0, 0, 3246, 0, 0, 0, 0, 0, 2413, 2414, 0, 0, 2417, 0, 2419, 0, 0, 0, 0, 0, 0, 0, 0, 2712, 0, 0, 0, 0, 0, 0, 0, 0, 2728, 0, 0, 0, 0, 0, 0, 0, 0, 2429, 0, 0, 0, 0, 0, 0, 0, 0, 2406, 0, 0, 0, 0, 0, 0, 0, 0, 2454, 0, 0, 0, 0, 0, 0, 0, 0, 1587, 0, 0, 0, 0, 0, 0, 0, 1595, 1596, 0, 0, 0, 2424, 0, 0, 2427, 0, 0, 0, 0, 0, 0, 2431, 0, 0, 0, 0, 0, 0, 0, 1159168, 0, 1159168, 0, 0, 0, 0, 1159168, 1159168, 0, 0, 0, 2452, 0, 0, 0, 0, 0, 0, 0, 2456, 2457, 0, 0, 2460, 0, 0, 2463, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2473, 0, 0, 0, 0, 0, 639, 0, 0, 0, 0, 644, 645, 646, 647, 648, 649, 534, 2487, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 3008, 534, 534, 534, 2515, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1293, 534, 534, 534, 534, 2527, 534, 534, 534, 534, 534, 534, 2534, 534, 534, 534, 534, 534, 534, 534, 534, 3343, 534, 534, 534, 534, 534, 534, 556, 534, 534, 2541, 534, 534, 534, 2544, 534, 534, 534, 534, 534, 534, 534, 0, 0, 0, 0, 556, 556, 556, 556, 2217, 556, 556, 556, 2574, 556, 556, 556, 556, 556, 556, 2579, 556, 556, 556, 556, 556, 556, 556, 1427, 1428, 556, 556, 556, 26009, 1341, 975, 580, 2585, 556, 556, 556, 556, 556, 556, 2592, 556, 556, 556, 556, 556, 556, 2599, 556, 556, 556, 556, 556, 3290, 556, 556, 556, 556, 3291, 3292, 556, 556, 556, 556, 556, 0, 0, 2298, 0, 580, 580, 580, 580, 580, 580, 580, 2886, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3312, 580, 580, 580, 580, 580, 580, 2673, 580, 580, 580, 2676, 580, 580, 580, 580, 580, 580, 580, 2681, 2682, 2683, 534, 534, 534, 534, 534, 1289, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2185, 534, 534, 534, 534, 2720, 2721, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2080, 0, 0, 0, 2736, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2746, 0, 0, 0, 0, 0, 667, 0, 0, 0, 0, 0, 729, 0, 780, 0, 0, 0, 0, 0, 305, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1565, 0, 0, 0, 0, 0, 0, 2751, 0, 0, 0, 2753, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2109, 534, 534, 534, 534, 534, 2787, 2788, 534, 534, 534, 534, 2791, 534, 534, 534, 534, 534, 534, 534, 534, 534, 556, 556, 3178, 556, 556, 556, 556, 2796, 534, 534, 534, 2799, 534, 2801, 534, 534, 534, 534, 534, 534, 2805, 534, 534, 534, 534, 534, 534, 2492, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1745, 534, 534, 534, 534, 534, 534, 2834, 2835, 556, 556, 556, 556, 2838, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2257, 556, 556, 556, 556, 556, 556, 556, 2844, 556, 556, 556, 2847, 556, 2849, 556, 556, 556, 556, 556, 556, 556, 2854, 580, 2867, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1949, 580, 580, 580, 2883, 2884, 580, 580, 580, 580, 2887, 580, 580, 580, 580, 580, 580, 580, 1928, 580, 580, 580, 580, 580, 580, 580, 580, 1912, 1913, 580, 580, 580, 580, 1920, 580, 580, 580, 580, 2893, 580, 580, 580, 2896, 580, 2898, 580, 580, 580, 580, 580, 580, 1190, 534, 580, 556, 534, 534, 534, 534, 534, 556, 580, 2903, 580, 580, 580, 580, 580, 580, 534, 580, 556, 534, 534, 556, 556, 580, 580, 0, 0, 3242, 0, 0, 0, 0, 0, 0, 0, 0, 225734, 225734, 225734, 225734, 225734, 225734, 225734, 225734, 0, 0, 0, 0, 0, 0, 0, 0, 0, 366, 0, 0, 0, 0, 0, 0, 580, 2918, 0, 0, 2921, 2922, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3132, 0, 0, 3255, 0, 534, 534, 534, 534, 2986, 534, 534, 534, 534, 534, 534, 534, 2992, 534, 534, 534, 534, 534, 534, 891, 534, 534, 534, 534, 556, 556, 556, 556, 556, 0, 0, 0, 0, 580, 580, 2302, 580, 580, 580, 580, 556, 556, 556, 3026, 556, 556, 556, 556, 556, 556, 556, 3032, 556, 556, 556, 556, 556, 556, 1841, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3357, 556, 3359, 556, 556, 556, 556, 580, 580, 580, 580, 3068, 580, 580, 580, 580, 580, 580, 580, 3074, 580, 580, 580, 580, 580, 2311, 580, 580, 2314, 580, 580, 580, 580, 580, 580, 2322, 3138, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1191, 3247, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 534, 534, 534, 2767, 534, 534, 534, 534, 534, 534, 534, 534, 3265, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1341, 0, 556, 556, 534, 534, 3276, 534, 534, 534, 534, 534, 556, 556, 556, 556, 556, 556, 3283, 556, 556, 556, 556, 556, 3299, 580, 580, 580, 580, 580, 580, 580, 3304, 580, 580, 580, 580, 580, 3479, 580, 3481, 580, 580, 3483, 580, 580, 0, 0, 0, 0, 0, 0, 1210, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2421, 0, 0, 0, 0, 0, 3132, 0, 0, 0, 0, 534, 534, 534, 534, 534, 534, 534, 534, 3399, 534, 3401, 3402, 534, 3404, 534, 556, 556, 556, 556, 556, 556, 556, 556, 3414, 556, 3416, 3417, 556, 3419, 556, 3421, 580, 580, 580, 580, 580, 580, 580, 580, 3430, 580, 3432, 3433, 580, 3435, 580, 3437, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 534, 534, 534, 534, 534, 534, 3499, 534, 3501, 534, 534, 580, 580, 580, 3553, 580, 3554, 580, 580, 580, 580, 0, 0, 0, 0, 534, 534, 534, 534, 534, 534, 3538, 534, 3539, 534, 534, 534, 3604, 3605, 3606, 534, 556, 580, 534, 556, 580, 534, 556, 580, 0, 0, 0, 0, 0, 0, 0, 3211264, 0, 0, 0, 2179072, 2179072, 2179072, 2179072, 2179072, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 3117056, 2125824, 2125824, 2125824, 2125824, 590, 566, 566, 566, 566, 566, 566, 566, 590, 590, 590, 543, 590, 590, 590, 590, 590, 590, 590, 566, 566, 543, 566, 590, 566, 590, 1, 12290, 556, 556, 1398, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2853, 556, 0, 0, 730, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1126, 1127, 0, 534, 534, 534, 534, 2138, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2784, 534, 534, 534, 556, 556, 556, 2223, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1849, 556, 556, 556, 580, 580, 580, 2310, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1490, 580, 580, 580, 402, 0, 0, 0, 0, 380, 0, 69632, 73728, 0, 0, 0, 0, 425, 65536, 0, 0, 0, 0, 364, 364, 1133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3133, 0, 0, 0, 3136, 0, 425, 425, 0, 425, 0, 439, 425, 425, 462, 462, 462, 469, 462, 462, 462, 462, 462, 462, 462, 462, 469, 462, 462, 462, 462, 462, 462, 462, 462, 476, 462, 488, 488, 462, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 488, 531, 544, 567, 544, 567, 544, 544, 567, 544, 591, 567, 567, 567, 567, 567, 567, 567, 591, 591, 591, 544, 591, 591, 591, 591, 591, 591, 591, 567, 567, 544, 567, 591, 567, 591, 1, 12290, 0, 0, 0, 653, 654, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2939, 0, 0, 2941, 0, 0, 0, 654, 0, 654, 0, 0, 0, 0, 814, 0, 0, 0, 654, 0, 0, 0, 0, 374, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 2130, 534, 534, 534, 556, 919, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 957, 556, 556, 556, 556, 556, 556, 3545, 556, 3546, 556, 556, 556, 556, 580, 580, 580, 580, 580, 580, 0, 0, 0, 534, 534, 534, 534, 534, 534, 556, 556, 534, 534, 884, 534, 534, 556, 556, 957, 556, 556, 0, 580, 580, 1031, 580, 580, 580, 580, 580, 2907, 580, 580, 534, 580, 556, 534, 534, 556, 556, 580, 580, 0, 0, 0, 0, 0, 0, 0, 3117, 0, 0, 0, 290, 1066, 0, 0, 1069, 1073, 0, 0, 1077, 1081, 0, 0, 0, 0, 0, 0, 0, 1094, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192965, 192965, 192965, 192965, 192965, 192965, 192965, 192965, 0, 0, 0, 1088, 1089, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 131072, 0, 0, 0, 1130, 0, 0, 364, 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3132, 0, 3254, 0, 0, 1089, 1088, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2093, 0, 1088, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 1253, 534, 534, 534, 534, 534, 1303, 534, 534, 1305, 534, 534, 534, 1309, 534, 534, 534, 0, 901, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3549, 580, 580, 580, 534, 534, 534, 534, 1287, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2804, 534, 534, 2807, 534, 534, 1320, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1334, 534, 534, 534, 534, 534, 1323, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2509, 534, 534, 534, 534, 534, 534, 534, 1341, 901, 556, 1344, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2283, 556, 556, 556, 556, 556, 556, 556, 556, 1358, 1365, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1379, 556, 556, 0, 580, 580, 580, 985, 989, 992, 580, 1000, 580, 580, 580, 1015, 1017, 556, 556, 556, 1399, 556, 556, 556, 556, 556, 556, 556, 1412, 556, 556, 556, 556, 556, 556, 1858, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1402, 556, 556, 556, 556, 556, 556, 556, 1416, 556, 1436, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1450, 1457, 580, 580, 580, 580, 580, 3069, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1510, 580, 580, 580, 580, 580, 580, 1518, 580, 580, 580, 580, 0, 1266, 1450, 1358, 534, 534, 1320, 534, 534, 556, 556, 556, 556, 556, 3354, 556, 556, 556, 556, 556, 556, 3360, 556, 556, 556, 556, 556, 556, 2615, 0, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2626, 580, 580, 580, 580, 580, 580, 556, 1412, 556, 556, 580, 580, 1504, 580, 580, 1066, 0, 0, 0, 0, 0, 0, 0, 1107, 0, 0, 0, 0, 0, 0, 0, 0, 658, 0, 0, 661, 0, 0, 0, 0, 1570, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1228, 1721, 1722, 534, 534, 534, 534, 1729, 534, 534, 534, 534, 534, 534, 534, 534, 534, 556, 3177, 556, 556, 556, 3180, 556, 534, 1770, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1311, 534, 556, 556, 1824, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3204, 556, 556, 556, 1838, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3294, 556, 580, 1987, 580, 580, 534, 580, 556, 534, 534, 534, 534, 556, 556, 556, 556, 580, 580, 580, 580, 0, 0, 0, 0, 2694, 2029, 0, 2030, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2039, 0, 0, 0, 0, 0, 0, 1700, 0, 0, 0, 0, 0, 0, 0, 0, 0, 298, 0, 0, 0, 0, 0, 0, 534, 534, 2190, 534, 534, 534, 534, 534, 2195, 534, 534, 534, 534, 534, 534, 534, 1326, 534, 534, 534, 534, 534, 534, 534, 534, 1291, 534, 534, 534, 534, 534, 534, 534, 556, 2276, 556, 556, 556, 556, 556, 556, 2282, 556, 556, 556, 556, 556, 556, 556, 1810, 556, 556, 556, 556, 556, 556, 556, 556, 3188, 556, 556, 556, 556, 556, 556, 556, 580, 2363, 580, 580, 580, 580, 580, 580, 2369, 580, 580, 580, 580, 580, 580, 580, 2329, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3557, 0, 0, 0, 0, 534, 534, 580, 580, 2634, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1948, 580, 580, 0, 0, 0, 0, 2699, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 163840, 0, 0, 0, 534, 534, 534, 534, 534, 2778, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1779, 534, 534, 534, 534, 534, 534, 2809, 534, 534, 0, 0, 556, 556, 556, 556, 556, 556, 556, 556, 2817, 556, 556, 556, 556, 556, 3465, 556, 3467, 556, 556, 3469, 556, 556, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3373, 580, 3375, 580, 556, 556, 556, 2858, 556, 556, 0, 0, 580, 580, 580, 580, 580, 580, 580, 580, 1445, 580, 580, 580, 1454, 580, 580, 580, 2866, 580, 580, 580, 580, 580, 580, 2874, 580, 580, 580, 580, 580, 580, 580, 580, 1473, 580, 580, 580, 580, 580, 580, 580, 534, 2996, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1767, 1768, 3036, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2275, 580, 3078, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1966, 580, 0, 0, 0, 0, 3130, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 167936, 0, 0, 0, 534, 534, 3174, 534, 534, 534, 534, 534, 534, 556, 556, 556, 556, 556, 556, 556, 1828, 556, 556, 556, 556, 556, 556, 556, 556, 26009, 0, 580, 580, 580, 580, 580, 580, 0, 0, 0, 0, 3535, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2991, 534, 534, 534, 3542, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3550, 580, 580, 580, 580, 580, 3082, 580, 580, 3085, 580, 580, 580, 580, 580, 580, 580, 1911, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3072, 580, 580, 580, 580, 580, 580, 463, 463, 463, 447, 447, 463, 447, 447, 447, 447, 447, 447, 447, 447, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 513, 545, 568, 545, 568, 545, 545, 568, 545, 592, 568, 568, 568, 568, 568, 568, 568, 592, 592, 592, 545, 592, 592, 592, 592, 592, 592, 592, 568, 568, 545, 568, 592, 568, 592, 1, 12290, 0, 0, 0, 655, 0, 655, 0, 0, 0, 0, 0, 0, 0, 0, 655, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 556, 920, 556, 556, 934, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2841, 556, 556, 556, 556, 0, 0, 1160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1155, 0, 0, 0, 0, 0, 1177, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2461696, 0, 0, 0, 0, 0, 1232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2801664, 0, 0, 534, 534, 534, 534, 1322, 534, 534, 534, 534, 534, 1329, 534, 534, 534, 534, 534, 534, 534, 2505, 534, 2507, 534, 534, 534, 534, 534, 534, 534, 1793, 534, 534, 534, 534, 1341, 0, 556, 556, 556, 556, 1359, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 965, 556, 556, 556, 556, 556, 1421, 556, 556, 556, 556, 556, 556, 556, 556, 26009, 1341, 975, 580, 580, 580, 580, 1974, 1975, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2641, 580, 580, 580, 2644, 580, 556, 556, 1534, 556, 580, 580, 580, 1538, 580, 1066, 0, 1542, 0, 0, 0, 1548, 0, 0, 0, 1554, 0, 0, 0, 1560, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2444, 0, 0, 0, 2448, 0, 0, 1599, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1569, 534, 534, 1723, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1734, 534, 534, 534, 534, 534, 534, 892, 534, 534, 534, 534, 556, 556, 556, 556, 556, 0, 0, 2298, 0, 0, 0, 580, 580, 580, 580, 580, 580, 3480, 580, 580, 580, 580, 580, 580, 0, 0, 0, 534, 3582, 534, 534, 534, 534, 556, 3586, 1754, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1316, 0, 2096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2108, 0, 534, 534, 534, 534, 2154, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 3006, 534, 534, 534, 556, 556, 556, 2239, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1864, 556, 556, 1867, 580, 580, 580, 2326, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1512, 580, 580, 580, 556, 556, 3194, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1414, 556, 556, 0, 0, 3328, 3132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 534, 534, 534, 534, 851, 534, 534, 534, 534, 534, 580, 580, 3379, 580, 580, 534, 556, 580, 0, 0, 0, 3384, 0, 0, 0, 0, 0, 0, 306, 204800, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 298, 0, 0, 0, 0, 0, 3132, 0, 0, 0, 0, 534, 534, 534, 534, 3395, 534, 534, 534, 534, 534, 534, 534, 2156, 534, 2158, 534, 534, 534, 534, 534, 534, 534, 2170, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2546, 534, 534, 534, 534, 0, 2549, 387, 389, 339, 0, 0, 0, 0, 0, 0, 338, 0, 0, 339, 0, 0, 0, 0, 0, 0, 2023, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 359, 0, 0, 0, 0, 0, 0, 0, 0, 386, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 393, 394, 0, 395, 0, 0, 0, 0, 0, 395, 0, 0, 0, 0, 0, 1209, 0, 0, 0, 0, 1214, 0, 0, 0, 0, 0, 0, 0, 2405, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1094, 0, 0, 0, 0, 1099, 0, 0, 0, 338, 0, 0, 440, 0, 0, 464, 464, 464, 464, 464, 464, 464, 464, 546, 569, 546, 569, 546, 546, 569, 546, 475, 464, 464, 464, 493, 470, 493, 493, 493, 493, 493, 493, 493, 493, 464, 464, 470, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 464, 474, 474, 464, 475, 464, 464, 464, 593, 569, 569, 569, 569, 569, 569, 569, 593, 593, 593, 546, 593, 593, 593, 593, 593, 593, 593, 569, 569, 546, 569, 593, 569, 593, 1, 12290, 0, 0, 0, 699, 0, 0, 0, 0, 0, 0, 0, 0, 708, 0, 710, 0, 0, 0, 0, 431, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1643, 0, 0, 0, 0, 743, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2411, 0, 0, 759, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 656, 0, 775, 0, 0, 0, 0, 0, 824, 0, 0, 0, 0, 0, 0, 779, 656, 0, 0, 796, 0, 0, 0, 0, 699, 0, 0, 0, 0, 0, 0, 799, 0, 0, 0, 0, 434, 0, 0, 331, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 461, 796, 779, 0, 0, 801, 0, 660, 0, 775, 0, 0, 0, 0, 0, 0, 0, 0, 2755, 0, 0, 0, 0, 0, 0, 0, 0, 2937, 0, 0, 0, 0, 0, 0, 0, 0, 2741, 0, 0, 0, 2745, 0, 2747, 0, 0, 0, 775, 801, 0, 801, 796, 0, 0, 0, 815, 0, 0, 0, 656, 818, 828, 0, 0, 0, 0, 534, 832, 534, 534, 534, 848, 534, 534, 862, 534, 534, 534, 534, 534, 534, 2504, 534, 534, 534, 534, 534, 534, 534, 534, 534, 898, 534, 556, 556, 556, 556, 556, 534, 534, 875, 534, 534, 534, 534, 893, 534, 534, 534, 556, 556, 904, 556, 556, 0, 580, 580, 976, 580, 580, 580, 580, 580, 580, 1007, 580, 580, 580, 580, 580, 1908, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1921, 556, 921, 556, 556, 935, 556, 556, 556, 556, 948, 556, 556, 556, 556, 966, 556, 556, 556, 556, 580, 580, 580, 580, 580, 580, 0, 3594, 0, 534, 534, 534, 534, 534, 534, 534, 534, 534, 3156, 534, 534, 534, 534, 534, 534, 534, 2802, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1795, 534, 534, 1341, 1800, 556, 556, 580, 1022, 580, 580, 580, 580, 1040, 580, 580, 580, 0, 0, 0, 534, 580, 556, 556, 556, 556, 580, 580, 580, 580, 580, 580, 3428, 580, 580, 580, 580, 580, 534, 556, 580, 3381, 0, 3383, 0, 0, 0, 0, 0, 0, 0, 2126, 0, 0, 0, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1717, 534, 534, 0, 0, 1131, 0, 364, 364, 0, 1134, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2481, 0, 0, 0, 0, 0, 0, 0, 1174, 0, 0, 0, 0, 0, 0, 1091, 0, 0, 0, 0, 0, 0, 0, 0, 111044, 111044, 111044, 111044, 111044, 111044, 111044, 111044, 1, 12290, 1093, 0, 0, 0, 0, 0, 0, 1197, 0, 0, 0, 0, 1202, 0, 0, 0, 0, 0, 0, 2033, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 131072, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 324, 0, 0, 0, 0, 1131, 0, 0, 1237, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2713, 0, 0, 0, 0, 0, 0, 1216, 0, 0, 0, 0, 1248, 0, 0, 0, 0, 0, 0, 0, 534, 534, 534, 841, 534, 534, 534, 534, 534, 534, 534, 556, 556, 1360, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1382, 580, 580, 1497, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2334, 580, 580, 556, 1533, 556, 556, 580, 580, 1537, 580, 580, 1066, 0, 0, 0, 0, 0, 0, 0, 1121, 0, 0, 1124, 1125, 0, 0, 0, 0, 1584, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1614, 0, 0, 0, 1602, 0, 0, 1605, 0, 1607, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 0, 122880, 122880, 122880, 122880, 122880, 0, 0, 1697, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2423, 0, 534, 1755, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2162, 534, 556, 1822, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3049, 556, 556, 556, 556, 2265, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3031, 556, 556, 556, 556, 0, 0, 0, 0, 2402, 0, 2404, 0, 0, 2407, 0, 0, 0, 0, 0, 0, 0, 1165, 0, 0, 0, 0, 0, 0, 0, 0, 0, 750, 0, 0, 0, 0, 0, 0, 2412, 0, 0, 0, 2415, 2416, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106496, 0, 0, 0, 0, 0, 0, 0, 0, 2426, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2912256, 0, 3207168, 0, 0, 0, 0, 2440, 0, 2441, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2470, 0, 0, 0, 0, 0, 2461, 0, 0, 0, 0, 0, 0, 0, 0, 2469, 0, 0, 0, 0, 0, 2475, 0, 0, 0, 0, 2478, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2486, 0, 0, 0, 0, 435, 0, 0, 447, 463, 463, 463, 463, 463, 463, 463, 463, 463, 473, 463, 463, 463, 463, 463, 463, 534, 2500, 2501, 534, 534, 534, 534, 534, 2506, 534, 2508, 534, 534, 534, 534, 2512, 2525, 534, 534, 534, 534, 534, 534, 2533, 534, 534, 534, 534, 2537, 534, 534, 534, 534, 534, 534, 1262, 534, 534, 534, 534, 534, 534, 1277, 534, 534, 556, 556, 556, 2561, 556, 556, 2564, 2565, 556, 556, 556, 556, 556, 2570, 556, 2572, 556, 556, 556, 556, 2576, 556, 556, 556, 556, 556, 556, 556, 556, 2582, 556, 556, 0, 580, 580, 977, 580, 580, 580, 993, 580, 580, 580, 580, 580, 580, 1443, 580, 580, 580, 1447, 580, 580, 1458, 580, 580, 556, 556, 2602, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1833, 556, 556, 2685, 534, 534, 556, 2687, 556, 556, 580, 2689, 580, 580, 0, 0, 0, 0, 0, 0, 0, 2936, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2036, 0, 0, 0, 0, 0, 0, 0, 0, 2708, 0, 0, 0, 0, 0, 0, 0, 2714, 2715, 2716, 0, 0, 0, 0, 0, 0, 2060, 0, 0, 0, 0, 0, 2064, 0, 0, 2066, 0, 2735, 0, 2737, 0, 0, 0, 2740, 0, 0, 2743, 0, 0, 0, 0, 0, 0, 0, 2960, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2430, 0, 0, 0, 0, 0, 2435, 534, 534, 2810, 534, 0, 0, 2811, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2566, 556, 556, 556, 556, 556, 556, 556, 2856, 556, 556, 2859, 556, 0, 0, 2860, 580, 580, 580, 580, 580, 580, 580, 2651, 580, 580, 580, 580, 580, 580, 2658, 580, 580, 2892, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2321, 580, 2902, 580, 580, 2905, 580, 580, 2908, 580, 2909, 2910, 2911, 534, 534, 556, 556, 580, 580, 0, 0, 0, 0, 0, 3115, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 420, 0, 65536, 0, 2929, 2930, 0, 0, 0, 0, 2935, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2730, 0, 0, 0, 0, 0, 534, 534, 2997, 534, 2999, 534, 534, 534, 534, 534, 534, 3005, 534, 534, 3007, 534, 534, 534, 534, 534, 1324, 534, 534, 534, 534, 534, 534, 534, 534, 1335, 1336, 556, 3037, 556, 3039, 556, 556, 556, 556, 556, 556, 556, 3046, 556, 556, 3048, 556, 556, 556, 556, 580, 580, 580, 580, 580, 1066, 0, 0, 0, 0, 0, 0, 0, 377, 0, 380, 0, 0, 0, 380, 0, 0, 580, 580, 3079, 580, 3081, 580, 580, 580, 580, 580, 580, 580, 3088, 580, 580, 3090, 534, 534, 534, 534, 534, 3164, 534, 534, 534, 534, 534, 534, 534, 3169, 534, 534, 534, 534, 534, 534, 2779, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 3167, 534, 534, 534, 534, 534, 3181, 3182, 556, 556, 556, 556, 3186, 3187, 556, 556, 556, 556, 556, 3191, 556, 556, 0, 580, 580, 978, 580, 580, 580, 995, 580, 580, 1009, 580, 580, 580, 580, 580, 2353, 2354, 580, 580, 580, 580, 580, 580, 2361, 580, 580, 556, 556, 556, 580, 580, 580, 580, 580, 580, 580, 3210, 3211, 580, 580, 580, 580, 580, 1442, 580, 580, 580, 580, 1448, 580, 580, 580, 580, 580, 580, 3524, 580, 3526, 580, 580, 580, 580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 534, 3215, 3216, 580, 580, 580, 580, 580, 3220, 580, 580, 580, 580, 580, 580, 580, 580, 1507, 580, 580, 580, 580, 580, 580, 580, 3226, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 534, 580, 556, 2684, 556, 556, 556, 3288, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2258, 556, 556, 556, 3307, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2347, 2348, 3132, 0, 0, 0, 0, 534, 534, 3393, 534, 534, 534, 534, 3398, 534, 534, 534, 534, 534, 534, 1290, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1267, 534, 534, 534, 534, 534, 534, 534, 3403, 534, 534, 556, 556, 3408, 556, 556, 556, 556, 3413, 556, 556, 556, 556, 556, 556, 1874, 556, 556, 556, 556, 556, 1881, 556, 556, 556, 3418, 556, 556, 556, 580, 580, 3424, 580, 580, 580, 580, 3429, 580, 580, 580, 580, 580, 1468, 580, 580, 580, 580, 580, 580, 580, 1476, 580, 580, 3434, 580, 580, 580, 0, 0, 0, 0, 0, 3441, 0, 0, 0, 0, 534, 534, 534, 534, 3497, 534, 534, 534, 534, 534, 534, 534, 534, 1731, 534, 534, 534, 534, 1735, 534, 534, 534, 3563, 3564, 534, 534, 556, 556, 556, 3569, 3570, 556, 556, 556, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3212, 580, 580, 580, 3575, 3576, 580, 580, 580, 0, 0, 0, 534, 534, 534, 534, 534, 534, 556, 556, 0, 580, 580, 979, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2358, 580, 580, 580, 580, 580, 341, 342, 343, 344, 345, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 221184, 0, 0, 0, 0, 0, 0, 390, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 302, 0, 0, 0, 344, 344, 345, 344, 0, 343, 344, 448, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 465, 480, 489, 489, 497, 489, 499, 489, 489, 499, 499, 489, 499, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 514, 547, 570, 547, 570, 547, 547, 570, 547, 594, 570, 570, 570, 570, 570, 570, 570, 594, 594, 594, 547, 594, 594, 594, 594, 594, 594, 594, 570, 570, 547, 570, 594, 570, 594, 1, 12290, 650, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 665, 666, 0, 668, 669, 0, 0, 0, 0, 0, 675, 0, 0, 0, 0, 0, 0, 0, 1220, 1250, 1251, 0, 1220, 0, 534, 534, 534, 0, 0, 0, 685, 0, 0, 0, 0, 0, 0, 692, 364, 364, 364, 0, 0, 0, 0, 0, 687, 0, 0, 0, 0, 0, 364, 364, 364, 0, 0, 0, 0, 0, 734, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1691, 0, 0, 0, 0, 712, 0, 714, 0, 716, 0, 0, 0, 0, 0, 0, 0, 0, 0, 726, 0, 0, 0, 0, 436, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2138112, 0, 0, 0, 0, 0, 0, 639, 745, 746, 747, 0, 0, 0, 0, 0, 753, 754, 0, 0, 0, 0, 0, 748, 0, 0, 803, 0, 0, 0, 0, 0, 0, 0, 0, 1134592, 0, 0, 1134592, 0, 0, 0, 0, 0, 685, 0, 0, 665, 0, 685, 0, 797, 668, 716, 0, 685, 798, 0, 0, 0, 0, 0, 1090, 1091, 1092, 1093, 0, 0, 0, 0, 0, 0, 0, 0, 2948, 0, 0, 0, 0, 0, 2951, 0, 0, 0, 754, 0, 0, 0, 0, 0, 0, 0, 0, 747, 807, 808, 0, 0, 0, 0, 0, 1119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3055616, 0, 0, 0, 3133440, 0, 0, 0, 0, 747, 0, 0, 812, 692, 0, 0, 0, 817, 0, 0, 0, 0, 0, 0, 2073, 0, 2075, 0, 0, 0, 0, 0, 0, 0, 0, 1702, 0, 0, 1703, 0, 0, 1704, 0, 819, 0, 0, 0, 685, 692, 0, 0, 685, 817, 817, 0, 0, 0, 0, 0, 0, 0, 3131, 0, 0, 0, 0, 0, 0, 0, 0, 749, 0, 0, 0, 0, 0, 0, 756, 870, 873, 534, 534, 534, 885, 889, 534, 534, 534, 534, 556, 556, 556, 911, 915, 918, 556, 926, 556, 556, 556, 941, 943, 946, 556, 556, 556, 958, 962, 556, 556, 0, 580, 580, 980, 986, 580, 580, 580, 580, 1004, 580, 580, 580, 580, 580, 1469, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2627, 580, 580, 2630, 2631, 580, 1020, 580, 580, 580, 1032, 1036, 580, 580, 580, 580, 0, 0, 0, 1048, 1049, 1050, 838, 534, 885, 889, 1055, 911, 556, 958, 962, 1060, 0, 985, 580, 1032, 1036, 1065, 1101, 0, 0, 0, 0, 1105, 0, 0, 1108, 0, 0, 0, 0, 0, 0, 0, 0, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 249856, 1, 12290, 1298, 534, 534, 1302, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1312, 534, 534, 534, 534, 534, 1727, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1796, 534, 1341, 0, 556, 556, 534, 1319, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1332, 534, 534, 534, 534, 534, 534, 1304, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1266, 1273, 534, 534, 534, 534, 534, 556, 1383, 556, 556, 556, 556, 556, 556, 556, 1390, 556, 556, 1394, 556, 556, 556, 556, 556, 1385, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2595, 556, 556, 556, 556, 556, 580, 580, 580, 1482, 580, 580, 1486, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1929, 580, 580, 580, 580, 580, 580, 580, 1496, 580, 580, 1503, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1516, 1615, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1655, 0, 0, 0, 1647, 0, 1649, 0, 0, 0, 1651, 0, 741, 0, 0, 0, 0, 0, 0, 330, 0, 0, 0, 0, 0, 0, 0, 330, 0, 0, 69632, 73728, 0, 418, 418, 0, 0, 65536, 418, 0, 0, 0, 534, 1709, 534, 534, 534, 534, 534, 534, 1715, 534, 534, 534, 534, 0, 0, 556, 2812, 556, 556, 556, 556, 556, 556, 556, 556, 3356, 556, 556, 556, 556, 556, 556, 556, 534, 534, 1787, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1341, 0, 556, 1803, 556, 556, 556, 556, 1839, 556, 556, 556, 1843, 556, 556, 1848, 556, 556, 556, 556, 556, 556, 1892, 556, 26009, 0, 580, 580, 580, 580, 580, 580, 0, 1269, 1453, 1361, 534, 534, 534, 534, 534, 556, 580, 580, 580, 1906, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1917, 580, 580, 580, 1935, 580, 580, 580, 1939, 580, 580, 1944, 580, 580, 580, 580, 580, 580, 580, 580, 1945, 580, 580, 580, 580, 580, 580, 580, 0, 0, 2010, 0, 1077, 0, 0, 0, 2012, 0, 1081, 0, 0, 0, 0, 0, 0, 0, 3144, 0, 0, 0, 0, 0, 0, 3147, 0, 534, 534, 534, 2177, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1341, 1800, 556, 556, 556, 556, 2263, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1850, 556, 556, 580, 580, 2350, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2346, 580, 580, 0, 2550, 0, 1800, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2569, 556, 2571, 556, 556, 2613, 556, 556, 556, 0, 0, 0, 2616, 0, 1896, 580, 580, 580, 580, 580, 580, 3219, 580, 580, 580, 580, 580, 580, 580, 580, 3225, 0, 0, 2761, 0, 0, 0, 534, 2765, 534, 534, 534, 534, 534, 534, 534, 534, 534, 3166, 534, 534, 534, 534, 534, 3171, 534, 534, 2789, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1295, 534, 534, 556, 556, 2836, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1865, 556, 556, 534, 534, 2985, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1310, 534, 534, 534, 534, 534, 2998, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1341, 1801, 556, 556, 556, 3025, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3205, 556, 556, 3038, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2247, 556, 556, 580, 580, 3067, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2643, 580, 580, 580, 580, 580, 3080, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2345, 580, 580, 580, 534, 534, 534, 534, 534, 3267, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2159, 534, 534, 534, 534, 2163, 3285, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2289, 3336, 534, 534, 534, 534, 3340, 534, 534, 534, 534, 534, 3346, 534, 534, 534, 556, 556, 556, 556, 580, 580, 580, 580, 580, 1066, 0, 0, 0, 1545, 0, 0, 0, 0, 0, 1620, 0, 0, 1623, 0, 1625, 0, 0, 0, 0, 0, 0, 0, 2480, 0, 0, 0, 0, 0, 0, 0, 0, 555, 578, 555, 578, 555, 555, 578, 555, 556, 556, 3351, 556, 556, 556, 556, 3355, 556, 556, 556, 556, 556, 3361, 556, 556, 0, 580, 580, 981, 580, 580, 580, 580, 580, 580, 1010, 1012, 580, 580, 580, 580, 1029, 580, 580, 580, 580, 580, 0, 0, 0, 534, 580, 556, 3377, 580, 580, 580, 580, 534, 556, 580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3251, 0, 3132, 3253, 0, 0, 3256, 3132, 0, 0, 0, 0, 534, 534, 534, 534, 534, 3396, 534, 534, 534, 3400, 534, 534, 534, 534, 534, 1742, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2536, 534, 534, 534, 534, 534, 388, 0, 0, 0, 392, 388, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233472, 0, 0, 0, 0, 0, 0, 0, 404, 0, 346, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 437, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 636, 0, 0, 0, 0, 515, 515, 515, 515, 0, 0, 0, 0, 0, 0, 0, 0, 0, 515, 515, 515, 515, 515, 515, 515, 515, 548, 571, 548, 571, 548, 548, 571, 548, 595, 571, 571, 571, 571, 571, 571, 571, 595, 595, 595, 548, 595, 595, 595, 595, 595, 595, 595, 571, 571, 610, 615, 595, 615, 621, 1, 12290, 0, 0, 744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1668, 534, 534, 876, 534, 534, 534, 534, 894, 534, 534, 534, 556, 556, 905, 556, 556, 0, 580, 580, 982, 580, 580, 580, 580, 1001, 1005, 1011, 580, 1016, 580, 580, 1023, 580, 580, 580, 580, 1041, 580, 580, 580, 0, 0, 0, 534, 580, 556, 556, 556, 556, 580, 580, 580, 580, 580, 1066, 0, 0, 1544, 0, 0, 0, 0, 0, 0, 2764, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1268, 534, 534, 534, 534, 534, 534, 0, 0, 0, 0, 1162, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1173, 0, 0, 0, 1178, 0, 0, 0, 0, 1094, 0, 0, 0, 0, 0, 0, 0, 0, 274432, 274432, 274432, 0, 274432, 274432, 274432, 274432, 1256, 534, 534, 534, 534, 534, 534, 534, 534, 1269, 534, 534, 534, 534, 1279, 534, 534, 534, 534, 534, 1757, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2197, 534, 534, 534, 534, 534, 534, 534, 534, 1341, 901, 556, 556, 556, 1347, 556, 556, 556, 556, 556, 556, 556, 1877, 556, 556, 556, 556, 556, 556, 556, 556, 26009, 0, 580, 1899, 580, 580, 580, 580, 556, 556, 1361, 556, 556, 556, 556, 1371, 556, 556, 556, 556, 556, 556, 556, 556, 3468, 556, 556, 3470, 556, 580, 580, 580, 556, 556, 556, 556, 1422, 556, 556, 556, 556, 556, 556, 556, 26009, 1341, 975, 580, 580, 580, 580, 1990, 1991, 1992, 534, 1994, 534, 534, 556, 1998, 556, 556, 580, 580, 580, 3367, 580, 580, 580, 580, 3371, 580, 580, 580, 580, 580, 580, 3232, 580, 580, 580, 580, 580, 580, 534, 580, 556, 2384, 534, 534, 534, 2388, 556, 556, 556, 580, 580, 1439, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1453, 580, 580, 580, 580, 580, 2381, 2382, 2383, 534, 534, 534, 534, 556, 556, 556, 556, 3410, 556, 556, 556, 556, 556, 556, 556, 580, 1463, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1477, 580, 580, 1498, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1514, 580, 580, 580, 580, 2005, 0, 2007, 0, 2009, 0, 2011, 0, 0, 0, 0, 0, 0, 0, 2034, 2035, 0, 2037, 2038, 0, 0, 0, 0, 0, 0, 0, 1555, 0, 0, 0, 1561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 286720, 286720, 0, 286720, 286720, 1, 12290, 0, 0, 0, 1586, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 303, 0, 0, 0, 0, 1600, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2434, 0, 556, 1852, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3363, 0, 1556, 0, 0, 0, 0, 0, 1562, 0, 0, 0, 0, 0, 0, 0, 0, 305, 204800, 204800, 0, 205105, 204800, 1, 12290, 0, 0, 0, 2070, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 337, 0, 0, 0, 0, 0, 2111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1188, 0, 0, 534, 2165, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2173, 534, 2250, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2584, 2337, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2375, 580, 2211, 0, 0, 0, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2597, 556, 556, 556, 556, 556, 556, 2588, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2831, 556, 556, 556, 534, 3107, 556, 3109, 580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2138112, 1170, 0, 0, 0, 0, 0, 3132, 3330, 0, 0, 3332, 0, 0, 0, 0, 0, 534, 3335, 534, 534, 534, 534, 534, 1774, 534, 534, 534, 1778, 534, 534, 534, 534, 534, 534, 534, 1776, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2535, 534, 534, 534, 534, 534, 534, 534, 3337, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 556, 556, 556, 556, 556, 556, 556, 556, 3350, 556, 556, 3352, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2852, 556, 556, 556, 556, 556, 580, 3366, 580, 580, 3368, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1946, 580, 580, 580, 580, 580, 580, 3132, 0, 3388, 0, 3390, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 556, 556, 902, 556, 556, 0, 0, 0, 783, 0, 783, 0, 0, 0, 0, 0, 0, 0, 0, 783, 0, 0, 0, 0, 556, 556, 556, 556, 556, 556, 556, 556, 2557, 556, 556, 556, 556, 556, 556, 2848, 556, 556, 556, 556, 556, 556, 556, 556, 556, 947, 556, 556, 556, 556, 556, 556, 556, 922, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1381, 556, 556, 972, 0, 580, 580, 580, 580, 580, 580, 996, 580, 580, 580, 580, 580, 580, 1910, 580, 580, 580, 580, 1916, 580, 580, 580, 580, 78114, 1066, 0, 0, 1070, 1074, 0, 0, 1078, 1082, 0, 0, 0, 0, 0, 0, 0, 1222, 0, 0, 0, 0, 1225, 0, 1181, 0, 534, 3162, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2201, 534, 580, 580, 580, 3218, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2629, 580, 580, 580, 347, 347, 349, 347, 0, 0, 347, 347, 0, 0, 0, 0, 348, 0, 0, 0, 0, 0, 0, 2125, 0, 0, 2128, 0, 534, 534, 2131, 534, 534, 0, 0, 0, 347, 347, 349, 347, 347, 347, 347, 347, 347, 506, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 347, 549, 572, 549, 572, 549, 549, 572, 549, 596, 572, 572, 572, 572, 572, 572, 572, 596, 596, 596, 549, 596, 596, 596, 596, 596, 596, 596, 572, 572, 549, 572, 596, 572, 596, 1, 12290, 0, 0, 0, 715, 0, 717, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1147348, 0, 0, 0, 0, 0, 0, 0, 732, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 353, 354, 355, 356, 758, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 673, 674, 0, 0, 0, 0, 0, 0, 0, 794, 795, 0, 0, 0, 0, 795, 0, 0, 0, 0, 0, 795, 0, 0, 794, 809, 0, 803, 0, 657, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3117056, 0, 0, 0, 0, 820, 0, 0, 0, 0, 0, 0, 795, 0, 0, 0, 0, 0, 0, 0, 0, 1159168, 364, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 795, 534, 534, 839, 534, 534, 534, 534, 857, 534, 534, 534, 534, 534, 534, 1728, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 3272, 534, 534, 534, 3273, 3274, 534, 534, 877, 879, 534, 534, 890, 534, 534, 534, 534, 556, 556, 906, 912, 556, 556, 556, 556, 580, 580, 580, 580, 580, 1066, 0, 1543, 0, 0, 0, 1549, 556, 556, 556, 930, 556, 556, 556, 556, 556, 950, 952, 556, 556, 963, 556, 556, 556, 556, 556, 1840, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1831, 556, 556, 556, 556, 1835, 580, 1024, 1026, 580, 580, 1037, 580, 580, 580, 580, 0, 0, 0, 534, 580, 556, 556, 556, 556, 580, 580, 580, 580, 580, 1066, 1540, 0, 0, 0, 1546, 0, 0, 0, 0, 0, 131072, 0, 131072, 131072, 131072, 131072, 0, 131072, 131072, 131072, 131072, 131072, 131072, 0, 0, 0, 0, 0, 131072, 0, 131072, 1, 12290, 839, 879, 534, 890, 534, 912, 952, 556, 963, 556, 0, 986, 1026, 580, 1037, 580, 580, 580, 580, 2005, 0, 2007, 0, 2009, 0, 2011, 0, 0, 2397, 0, 0, 0, 0, 0, 330, 331, 332, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2083, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2731, 0, 0, 0, 0, 0, 0, 1132, 364, 364, 0, 0, 1135, 0, 0, 0, 1138, 0, 1140, 0, 0, 0, 0, 556, 556, 556, 556, 556, 556, 556, 2556, 556, 556, 556, 556, 556, 556, 2577, 556, 556, 556, 556, 556, 556, 556, 556, 556, 26009, 1897, 580, 580, 580, 580, 580, 580, 1142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1156, 0, 0, 0, 0, 556, 556, 556, 556, 556, 556, 2555, 556, 556, 556, 556, 2559, 1158, 0, 0, 0, 0, 1163, 0, 0, 0, 0, 1168, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 0, 1247, 0, 0, 0, 0, 0, 0, 0, 1168, 534, 534, 534, 534, 534, 534, 1743, 534, 534, 534, 534, 534, 534, 534, 534, 534, 897, 534, 556, 556, 556, 556, 914, 534, 534, 534, 1286, 1288, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 556, 556, 907, 556, 556, 534, 534, 534, 1341, 901, 556, 556, 556, 556, 1348, 556, 556, 556, 556, 556, 556, 0, 2298, 580, 580, 580, 580, 580, 580, 580, 580, 2640, 580, 580, 580, 580, 580, 580, 2645, 580, 580, 580, 1440, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2670, 2671, 580, 580, 1494, 580, 580, 580, 580, 580, 580, 580, 1508, 580, 580, 580, 580, 580, 580, 580, 2678, 580, 580, 580, 580, 534, 580, 556, 534, 534, 534, 1996, 556, 556, 556, 2000, 580, 580, 1519, 1520, 580, 580, 580, 0, 534, 580, 556, 534, 1528, 534, 534, 1531, 556, 556, 556, 556, 580, 580, 580, 580, 580, 1066, 1541, 0, 0, 0, 1547, 0, 0, 0, 0, 556, 556, 556, 2553, 556, 2554, 556, 556, 556, 556, 556, 556, 0, 0, 580, 580, 580, 580, 2863, 580, 580, 580, 1532, 556, 556, 1535, 580, 1536, 580, 580, 1539, 1066, 0, 0, 0, 0, 0, 0, 0, 1577, 0, 0, 0, 0, 0, 0, 0, 0, 0, 770, 0, 0, 0, 0, 0, 0, 0, 0, 1617, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1203, 0, 0, 0, 0, 1633, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1217, 0, 0, 0, 0, 0, 0, 1658, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 364, 364, 0, 0, 0, 0, 1698, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1226, 0, 0, 534, 1738, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2207, 2549, 534, 534, 534, 1788, 534, 534, 534, 534, 1794, 534, 534, 534, 1341, 0, 556, 556, 556, 556, 556, 1891, 556, 556, 26009, 1896, 580, 580, 580, 580, 580, 580, 1470, 1472, 580, 580, 580, 580, 580, 580, 580, 580, 1960, 580, 580, 1963, 580, 580, 580, 580, 556, 556, 1870, 556, 556, 556, 1875, 556, 556, 556, 556, 556, 556, 556, 556, 1884, 556, 556, 556, 556, 1890, 556, 556, 556, 26009, 0, 580, 580, 580, 580, 580, 580, 1927, 580, 580, 580, 580, 1931, 580, 580, 580, 580, 580, 1904, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2672, 580, 580, 580, 1971, 580, 580, 580, 580, 580, 580, 580, 580, 1980, 580, 580, 580, 580, 580, 1504, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2316, 580, 580, 2320, 580, 580, 1986, 580, 580, 580, 534, 580, 556, 534, 534, 534, 534, 556, 556, 556, 556, 580, 580, 580, 580, 0, 0, 0, 2693, 0, 0, 0, 0, 0, 2099, 0, 2101, 2102, 2103, 0, 2105, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 424, 65536, 0, 0, 0, 0, 2123, 0, 0, 0, 0, 0, 0, 0, 2129, 534, 534, 534, 534, 0, 2211, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3045, 556, 556, 556, 556, 556, 534, 534, 2136, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1333, 534, 534, 534, 534, 534, 2166, 534, 2168, 534, 2171, 534, 534, 534, 534, 534, 534, 534, 534, 534, 3271, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2178, 534, 534, 534, 534, 534, 2184, 534, 534, 534, 534, 534, 534, 534, 2792, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2519, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2206, 0, 0, 0, 0, 2213, 556, 556, 556, 556, 556, 556, 939, 556, 944, 556, 951, 556, 954, 556, 556, 968, 556, 2221, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1415, 556, 556, 556, 2251, 556, 2253, 556, 2256, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2607, 556, 556, 556, 2610, 556, 556, 556, 556, 556, 2264, 556, 556, 556, 556, 556, 2270, 556, 556, 556, 556, 556, 556, 1369, 556, 556, 556, 1374, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2293, 0, 0, 0, 0, 2300, 580, 580, 580, 580, 580, 580, 1942, 580, 580, 580, 1947, 580, 580, 580, 580, 580, 580, 2308, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2880, 580, 580, 580, 2338, 580, 2340, 580, 2343, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1961, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2351, 580, 580, 580, 580, 580, 2357, 580, 580, 580, 580, 580, 580, 1958, 1959, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3234, 580, 580, 580, 534, 580, 556, 0, 0, 2400, 2401, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 399, 0, 0, 0, 2436, 0, 0, 2439, 0, 0, 0, 0, 2443, 0, 0, 0, 0, 0, 0, 0, 0, 2818048, 2846720, 0, 2916352, 0, 0, 3002368, 0, 0, 0, 2451, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2459, 0, 0, 0, 0, 556, 556, 2552, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2851, 556, 556, 556, 556, 556, 556, 0, 0, 0, 2477, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2485, 0, 0, 0, 0, 0, 1195, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111044, 0, 0, 0, 0, 534, 534, 534, 534, 534, 2503, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2520, 534, 534, 534, 534, 534, 556, 556, 556, 556, 2562, 556, 556, 556, 556, 556, 2567, 556, 556, 556, 556, 556, 0, 0, 0, 0, 580, 580, 580, 580, 2304, 580, 580, 580, 2633, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2901, 580, 534, 534, 534, 2686, 556, 556, 556, 2688, 580, 580, 580, 2690, 2691, 0, 0, 0, 0, 0, 0, 2453, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1185, 0, 0, 0, 0, 0, 0, 0, 0, 2709, 0, 2710, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1159168, 0, 0, 0, 0, 2855, 556, 556, 556, 556, 556, 0, 0, 580, 580, 580, 580, 580, 2864, 580, 2865, 580, 580, 2904, 580, 580, 580, 580, 580, 534, 580, 556, 534, 534, 556, 556, 580, 580, 0, 0, 0, 3113, 0, 0, 0, 0, 0, 0, 0, 0, 254407, 254407, 254407, 254407, 254407, 254407, 254407, 254407, 1, 12290, 556, 556, 556, 3053, 556, 556, 556, 556, 556, 556, 556, 580, 3061, 580, 580, 580, 580, 580, 2649, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2371, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3095, 580, 580, 580, 580, 580, 580, 580, 534, 580, 556, 534, 534, 2386, 2387, 556, 556, 2390, 2391, 534, 534, 3338, 534, 534, 534, 534, 534, 534, 534, 534, 534, 3347, 534, 534, 3349, 556, 556, 556, 556, 3353, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3362, 556, 556, 556, 556, 580, 580, 580, 580, 580, 3427, 580, 580, 580, 3431, 580, 580, 580, 580, 1031, 580, 580, 580, 580, 580, 0, 0, 0, 534, 580, 556, 556, 556, 3365, 580, 580, 580, 580, 3369, 580, 580, 580, 580, 580, 580, 580, 580, 2356, 580, 580, 580, 580, 580, 580, 580, 580, 3378, 580, 580, 580, 534, 556, 580, 0, 0, 0, 0, 0, 0, 0, 0, 402, 0, 0, 0, 0, 0, 0, 0, 534, 534, 534, 3449, 534, 534, 534, 534, 534, 534, 534, 534, 534, 556, 556, 556, 3179, 556, 556, 556, 556, 556, 3462, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 580, 580, 580, 3300, 580, 580, 580, 3303, 580, 580, 580, 580, 580, 3476, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 0, 0, 0, 534, 580, 556, 0, 0, 3491, 0, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 3158, 534, 534, 534, 534, 534, 3565, 534, 556, 556, 556, 556, 556, 3571, 556, 556, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3372, 580, 580, 580, 580, 580, 580, 3577, 580, 580, 3579, 0, 3581, 534, 534, 534, 534, 534, 534, 556, 556, 556, 556, 556, 2224, 556, 556, 2227, 556, 556, 556, 556, 556, 556, 2235, 400, 0, 0, 0, 0, 0, 367, 375, 403, 0, 0, 0, 0, 0, 367, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2054, 408, 410, 0, 0, 367, 375, 0, 69632, 73728, 0, 0, 0, 0, 426, 65536, 0, 0, 0, 0, 556, 2551, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2271, 556, 556, 556, 556, 556, 426, 426, 0, 426, 0, 410, 426, 449, 0, 0, 0, 0, 0, 0, 0, 0, 534, 556, 534, 556, 534, 534, 556, 534, 367, 0, 0, 395, 0, 0, 0, 0, 0, 350, 0, 0, 367, 0, 0, 395, 0, 408, 0, 490, 490, 0, 490, 490, 490, 490, 490, 490, 490, 490, 516, 516, 516, 516, 449, 449, 449, 449, 524, 449, 449, 525, 449, 516, 530, 516, 516, 516, 530, 516, 516, 516, 516, 532, 550, 573, 550, 573, 550, 550, 573, 550, 597, 573, 573, 573, 573, 573, 573, 573, 597, 597, 597, 550, 597, 597, 597, 597, 597, 597, 597, 573, 573, 611, 616, 597, 616, 622, 1, 12290, 0, 0, 636, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1567, 1568, 0, 789, 0, 0, 0, 0, 534, 834, 534, 534, 534, 534, 534, 534, 863, 865, 534, 534, 534, 534, 534, 1790, 1792, 534, 534, 534, 534, 534, 1341, 0, 556, 556, 0, 580, 580, 580, 983, 987, 580, 580, 580, 580, 580, 580, 1013, 580, 556, 556, 556, 556, 936, 938, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2829, 556, 556, 2832, 556, 556, 78114, 1066, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1083, 0, 0, 0, 0, 0, 1234, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2050, 0, 0, 0, 0, 1085, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1098, 0, 0, 0, 0, 0, 1235, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122880, 0, 0, 0, 0, 0, 0, 1116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1581, 1582, 0, 0, 0, 0, 1085, 1208, 0, 0, 0, 0, 0, 0, 1215, 0, 0, 0, 0, 0, 0, 347, 348, 349, 0, 0, 0, 0, 0, 0, 0, 0, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 282624, 0, 0, 0, 1220, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1220, 1229, 534, 534, 534, 1259, 534, 534, 534, 1263, 534, 534, 1274, 534, 534, 1278, 534, 534, 534, 534, 534, 534, 3001, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1327, 534, 534, 534, 534, 534, 534, 534, 1299, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2497, 534, 534, 534, 534, 1341, 901, 556, 556, 556, 556, 556, 556, 556, 1351, 556, 556, 556, 556, 556, 1423, 556, 556, 556, 1430, 556, 556, 26009, 1341, 975, 580, 1355, 556, 556, 1366, 556, 556, 1370, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2828, 556, 556, 556, 556, 556, 556, 1462, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3315, 580, 1479, 580, 580, 580, 1483, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2877, 580, 580, 580, 580, 0, 1571, 1572, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1612, 0, 0, 0, 0, 0, 0, 1603, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 364, 364, 0, 696, 0, 1616, 0, 1618, 0, 0, 0, 1622, 0, 0, 0, 1626, 0, 0, 0, 1630, 0, 0, 0, 0, 1572, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 364, 364, 695, 0, 534, 534, 534, 1724, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1782, 1783, 534, 534, 556, 1837, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1818, 556, 556, 556, 556, 1889, 556, 556, 556, 556, 26009, 0, 580, 580, 580, 580, 580, 580, 1976, 580, 580, 580, 580, 580, 1981, 580, 580, 580, 0, 0, 0, 2031, 0, 2032, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2200246, 151552, 2200246, 0, 0, 2175, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2186, 534, 534, 534, 534, 534, 534, 1758, 534, 534, 534, 534, 1764, 534, 534, 534, 534, 0, 0, 556, 556, 556, 556, 2814, 556, 556, 556, 556, 556, 0, 0, 0, 0, 580, 2301, 580, 580, 580, 580, 580, 1038, 580, 580, 580, 580, 0, 0, 0, 534, 580, 556, 580, 580, 2394, 2395, 0, 1544, 0, 1550, 0, 1556, 0, 1562, 0, 0, 0, 0, 0, 0, 374, 0, 0, 0, 0, 0, 0, 0, 359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2052, 0, 0, 2476, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2482, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 345, 344, 65536, 343, 534, 534, 534, 534, 2530, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1275, 534, 534, 534, 534, 580, 2661, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3075, 580, 580, 0, 0, 2722, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1665, 0, 0, 534, 2797, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2511, 534, 556, 556, 2845, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2259, 556, 556, 0, 0, 2970, 0, 0, 0, 0, 0, 0, 0, 0, 534, 534, 534, 534, 534, 534, 855, 534, 534, 534, 534, 0, 0, 0, 0, 3122, 3123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2424832, 2433024, 0, 0, 2457600, 3149, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1737, 3172, 534, 534, 534, 534, 534, 534, 534, 534, 556, 556, 556, 556, 556, 556, 556, 2242, 556, 556, 556, 556, 556, 556, 556, 556, 1406, 556, 556, 556, 556, 556, 556, 556, 580, 580, 580, 3229, 580, 580, 580, 580, 580, 580, 580, 580, 580, 534, 580, 556, 556, 556, 556, 580, 580, 580, 580, 3426, 580, 580, 580, 580, 580, 580, 580, 2639, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2344, 580, 580, 580, 580, 580, 580, 534, 3236, 556, 3238, 580, 3240, 3241, 0, 0, 0, 0, 3245, 0, 0, 0, 0, 0, 0, 640, 0, 0, 0, 0, 0, 0, 0, 0, 0, 323, 397, 0, 0, 0, 323, 0, 0, 0, 3258, 0, 0, 0, 0, 0, 0, 0, 0, 3261, 0, 534, 534, 534, 534, 534, 534, 534, 3154, 3155, 534, 534, 534, 534, 3159, 3160, 3263, 534, 534, 534, 3266, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1330, 534, 534, 534, 534, 580, 580, 3318, 534, 3319, 556, 3320, 580, 0, 0, 0, 0, 0, 0, 0, 0, 543, 566, 543, 566, 543, 543, 566, 543, 556, 556, 3543, 556, 3544, 556, 556, 556, 556, 556, 556, 556, 556, 580, 580, 3551, 580, 3552, 580, 580, 580, 580, 580, 580, 580, 580, 0, 0, 0, 0, 534, 534, 3536, 534, 3537, 534, 534, 534, 534, 534, 534, 534, 1730, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2183, 534, 534, 534, 534, 534, 534, 409, 355, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 0, 65536, 0, 0, 0, 0, 638, 0, 0, 641, 642, 0, 0, 0, 0, 0, 0, 0, 0, 1591, 0, 0, 1594, 0, 0, 0, 0, 466, 477, 466, 0, 0, 466, 0, 0, 0, 0, 0, 0, 0, 0, 517, 517, 521, 521, 521, 521, 466, 466, 466, 466, 466, 466, 466, 471, 466, 521, 517, 521, 521, 517, 521, 521, 521, 521, 533, 551, 574, 551, 574, 551, 551, 574, 551, 598, 574, 574, 574, 574, 574, 574, 574, 598, 598, 598, 551, 598, 598, 598, 598, 598, 598, 598, 574, 574, 612, 617, 598, 617, 623, 1, 12290, 0, 0, 731, 0, 0, 0, 637, 731, 0, 737, 738, 637, 0, 0, 0, 0, 0, 0, 656, 0, 0, 659, 660, 0, 0, 0, 0, 0, 0, 0, 2754, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2420, 0, 0, 0, 0, 0, 0, 777, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 786, 0, 791, 0, 0, 0, 0, 0, 1575, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 303, 303, 0, 0, 0, 0, 0, 0, 0, 0, 791, 0, 0, 0, 0, 0, 0, 791, 0, 0, 0, 0, 0, 0, 672, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2016, 0, 0, 0, 0, 806, 0, 0, 0, 0, 0, 637, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 349, 347, 65536, 0, 0, 0, 0, 777, 0, 0, 0, 0, 0, 0, 0, 777, 777, 0, 637, 0, 0, 0, 786, 0, 791, 0, 777, 0, 806, 0, 0, 0, 658, 0, 777, 791, 829, 0, 534, 835, 534, 534, 534, 534, 854, 858, 864, 534, 869, 556, 556, 927, 931, 937, 556, 942, 556, 556, 556, 556, 556, 959, 556, 556, 556, 556, 556, 1424, 556, 556, 556, 556, 556, 556, 26009, 1341, 975, 580, 534, 534, 886, 534, 534, 556, 556, 959, 556, 556, 0, 580, 580, 1033, 580, 580, 580, 580, 1033, 580, 580, 580, 580, 580, 0, 0, 0, 534, 580, 556, 0, 1086, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2449, 0, 0, 0, 0, 1103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1113, 0, 0, 0, 1117, 1118, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 364, 364, 208896, 0, 0, 0, 0, 0, 0, 1179, 0, 1182, 0, 0, 0, 0, 0, 1187, 0, 0, 0, 0, 0, 0, 2726, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 784, 0, 0, 0, 0, 0, 0, 0, 0, 1205, 0, 0, 1086, 0, 0, 0, 1211, 0, 1213, 0, 0, 0, 0, 0, 0, 0, 1638, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1227, 0, 0, 0, 0, 654, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2964, 2965, 0, 0, 1230, 1187, 0, 1211, 1233, 0, 1236, 0, 0, 0, 0, 0, 1117, 0, 0, 0, 0, 0, 0, 2739, 0, 0, 0, 0, 2744, 0, 0, 0, 0, 0, 0, 299, 0, 0, 0, 303, 2424832, 2433024, 0, 0, 2457600, 0, 1245, 0, 0, 0, 0, 0, 1245, 0, 0, 1136, 1245, 0, 1252, 534, 534, 534, 534, 534, 534, 3279, 534, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3514, 556, 556, 556, 580, 534, 534, 1258, 534, 534, 534, 534, 1264, 534, 534, 534, 534, 534, 534, 534, 534, 534, 3455, 534, 534, 3457, 556, 556, 556, 534, 534, 1285, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1296, 534, 534, 534, 534, 534, 534, 3341, 534, 534, 534, 534, 534, 534, 534, 534, 556, 580, 3607, 3608, 3609, 534, 556, 580, 534, 556, 580, 0, 0, 0, 0, 0, 0, 333, 0, 0, 333, 0, 0, 333, 0, 0, 0, 534, 534, 1301, 534, 534, 534, 534, 534, 534, 534, 534, 1308, 534, 534, 534, 1315, 1317, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2149, 534, 1339, 534, 1341, 901, 1343, 556, 556, 556, 556, 556, 1350, 556, 556, 556, 556, 556, 556, 2225, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2244, 556, 556, 556, 556, 2248, 556, 1356, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1377, 556, 556, 556, 556, 556, 556, 2241, 556, 2243, 556, 556, 556, 556, 556, 556, 556, 1425, 556, 556, 556, 556, 556, 26009, 1341, 975, 580, 556, 556, 556, 556, 1400, 556, 556, 556, 1407, 1409, 556, 556, 556, 556, 556, 556, 1386, 556, 556, 556, 556, 556, 556, 556, 1395, 556, 1480, 580, 580, 580, 580, 1485, 580, 580, 580, 580, 580, 580, 580, 580, 1492, 580, 580, 580, 580, 2352, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2628, 580, 580, 580, 580, 580, 580, 1499, 1501, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2878, 580, 580, 2881, 1550, 0, 0, 0, 1556, 0, 0, 0, 1562, 0, 0, 0, 0, 0, 0, 0, 0, 2957312, 0, 0, 0, 0, 0, 0, 0, 0, 1150, 0, 0, 0, 0, 0, 0, 0, 0, 1166, 0, 0, 0, 0, 0, 0, 0, 0, 1179, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2094, 0, 0, 0, 1573, 1574, 0, 0, 0, 0, 0, 1580, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 0, 0, 373, 0, 65536, 0, 0, 0, 1601, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1677, 0, 0, 0, 0, 0, 0, 1619, 0, 0, 0, 0, 0, 0, 0, 1627, 1628, 0, 0, 0, 0, 0, 1604, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 254407, 0, 0, 0, 0, 0, 0, 0, 0, 1635, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 382, 0, 0, 0, 386, 0, 0, 0, 1685, 0, 0, 0, 0, 0, 1689, 0, 0, 1692, 0, 0, 0, 0, 0, 0, 3143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2756, 0, 0, 2759, 0, 0, 0, 0, 0, 0, 1689, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1705, 0, 1707, 1681, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1719, 534, 534, 534, 534, 534, 1791, 534, 534, 534, 534, 534, 534, 1341, 0, 556, 556, 556, 556, 556, 2295, 0, 0, 0, 580, 580, 580, 580, 580, 580, 580, 2666, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1446, 580, 580, 580, 580, 580, 580, 534, 534, 534, 1725, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1736, 534, 534, 534, 534, 534, 2179, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2143, 534, 2145, 534, 534, 534, 534, 534, 534, 1740, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1751, 534, 534, 534, 534, 534, 2207, 0, 0, 0, 556, 556, 556, 556, 556, 556, 556, 1403, 556, 556, 556, 556, 556, 556, 556, 556, 1408, 556, 556, 556, 556, 556, 556, 556, 534, 534, 1756, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2172, 534, 534, 2002, 580, 580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 696, 0, 0, 2019, 2020, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 662, 0, 0, 0, 2055, 2056, 0, 0, 2058, 2059, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2617344, 0, 0, 0, 0, 2081, 0, 0, 0, 0, 2084, 2085, 0, 0, 0, 0, 0, 2091, 0, 0, 0, 0, 0, 0, 3259, 0, 0, 0, 0, 0, 0, 534, 534, 534, 534, 534, 849, 534, 534, 534, 534, 534, 534, 534, 2152, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2161, 534, 534, 534, 534, 534, 534, 3452, 534, 3454, 534, 534, 3456, 534, 556, 556, 556, 556, 3509, 556, 556, 556, 556, 556, 556, 556, 556, 556, 580, 580, 580, 580, 580, 580, 0, 0, 0, 3595, 534, 534, 2164, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2174, 534, 534, 534, 2191, 534, 534, 534, 2194, 534, 534, 534, 534, 2199, 534, 534, 534, 534, 534, 534, 1759, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1732, 534, 534, 534, 534, 534, 534, 556, 2237, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2246, 556, 556, 2249, 556, 556, 2277, 556, 556, 556, 556, 2281, 556, 556, 556, 556, 2286, 556, 556, 556, 556, 556, 1808, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2608, 556, 556, 556, 556, 556, 580, 2324, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2333, 580, 580, 2336, 580, 580, 2364, 580, 580, 580, 580, 2368, 580, 580, 580, 580, 2373, 580, 580, 580, 580, 580, 2665, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1979, 580, 580, 580, 580, 580, 2398, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2408, 0, 0, 0, 0, 0, 0, 687, 0, 0, 0, 770, 0, 0, 0, 0, 789, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 176128, 534, 534, 2488, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2496, 534, 534, 534, 534, 534, 882, 534, 534, 534, 534, 534, 556, 556, 556, 556, 556, 3411, 556, 556, 556, 3415, 556, 556, 534, 534, 2514, 534, 534, 2516, 534, 2517, 534, 534, 534, 534, 534, 534, 534, 2524, 534, 534, 2528, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2539, 556, 556, 2560, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3472, 580, 580, 556, 556, 556, 2575, 556, 556, 556, 2578, 556, 556, 2580, 556, 2581, 556, 556, 556, 556, 556, 1827, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1814, 556, 556, 556, 556, 1820, 580, 2646, 580, 2647, 580, 580, 580, 580, 580, 580, 580, 580, 2655, 580, 580, 2659, 0, 2696, 2697, 0, 0, 2700, 2701, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3178496, 2670592, 0, 2744320, 0, 0, 2772, 534, 2775, 534, 534, 534, 534, 2780, 534, 534, 534, 2783, 534, 534, 534, 534, 534, 534, 534, 3002, 3003, 534, 534, 534, 534, 534, 534, 534, 534, 2494, 534, 534, 534, 534, 534, 534, 534, 534, 1744, 534, 534, 534, 1748, 534, 534, 1753, 2808, 534, 534, 534, 0, 0, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3358, 556, 556, 556, 556, 556, 2819, 556, 2822, 556, 556, 556, 556, 2827, 556, 556, 556, 2830, 556, 556, 556, 556, 556, 556, 2255, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2228, 556, 2230, 556, 556, 556, 556, 556, 556, 2857, 556, 556, 556, 0, 0, 580, 580, 580, 580, 580, 580, 580, 580, 2652, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2868, 580, 2871, 580, 580, 580, 580, 2876, 580, 580, 580, 2879, 580, 580, 580, 580, 1034, 580, 580, 580, 580, 580, 0, 0, 0, 534, 580, 556, 580, 580, 580, 580, 2906, 580, 580, 580, 534, 580, 556, 534, 534, 556, 556, 580, 580, 0, 0, 3112, 0, 3114, 0, 0, 0, 3118, 0, 0, 534, 534, 534, 534, 3013, 534, 534, 534, 534, 534, 556, 556, 556, 3021, 556, 556, 556, 556, 556, 2266, 2267, 556, 556, 556, 556, 556, 556, 2274, 556, 556, 0, 580, 580, 580, 580, 580, 580, 994, 580, 580, 1008, 580, 580, 580, 580, 580, 2341, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 0, 0, 733, 534, 580, 556, 0, 0, 3121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1693, 0, 0, 534, 3173, 534, 534, 534, 534, 534, 534, 534, 556, 556, 556, 556, 556, 556, 556, 2839, 556, 556, 556, 556, 556, 556, 556, 556, 1811, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3183, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3033, 556, 556, 556, 556, 3193, 556, 556, 556, 556, 556, 556, 3199, 556, 3201, 556, 556, 556, 556, 556, 0, 0, 0, 0, 580, 580, 580, 2303, 580, 2305, 580, 580, 580, 3228, 580, 3230, 580, 580, 580, 580, 580, 580, 580, 580, 534, 580, 556, 556, 556, 556, 580, 3423, 580, 3425, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2888, 580, 580, 580, 580, 580, 580, 0, 0, 0, 3248, 0, 0, 0, 0, 0, 0, 0, 3132, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3334, 534, 534, 0, 3257, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 534, 534, 534, 2982, 534, 534, 3264, 534, 534, 534, 3268, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1328, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 3277, 534, 534, 534, 556, 556, 556, 556, 556, 3282, 556, 556, 556, 556, 556, 2294, 0, 0, 0, 580, 580, 580, 580, 580, 580, 580, 580, 3482, 580, 580, 3484, 580, 0, 0, 0, 556, 3286, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1883, 556, 3295, 556, 556, 556, 556, 580, 580, 580, 580, 580, 3301, 580, 580, 580, 3305, 580, 580, 580, 580, 2380, 534, 580, 556, 534, 534, 534, 534, 556, 556, 556, 556, 580, 580, 580, 580, 0, 534, 3601, 556, 3602, 580, 3603, 3489, 0, 0, 0, 534, 534, 534, 3496, 534, 534, 534, 534, 534, 534, 534, 534, 1265, 534, 534, 534, 534, 534, 534, 534, 3504, 556, 556, 556, 3508, 556, 556, 556, 556, 556, 556, 556, 556, 3516, 556, 580, 580, 580, 580, 2624, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1475, 580, 580, 580, 580, 580, 580, 3521, 580, 580, 580, 580, 580, 580, 580, 580, 3529, 580, 0, 0, 0, 0, 0, 0, 122880, 122880, 122880, 122880, 122880, 0, 122880, 0, 2105631, 12290, 0, 3532, 0, 3534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 3540, 3541, 534, 534, 534, 534, 534, 2208, 0, 0, 0, 556, 556, 556, 556, 556, 556, 556, 1387, 556, 556, 556, 1391, 556, 556, 556, 556, 556, 357, 358, 0, 0, 0, 0, 0, 0, 0, 364, 0, 292, 0, 0, 0, 0, 0, 0, 688, 0, 0, 0, 0, 364, 364, 364, 0, 0, 0, 0, 0, 391, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 722, 0, 735, 654, 467, 467, 481, 0, 0, 481, 358, 358, 358, 503, 358, 358, 358, 358, 467, 467, 599, 575, 575, 575, 575, 575, 575, 575, 599, 599, 599, 552, 599, 599, 599, 599, 599, 599, 599, 575, 575, 552, 575, 599, 575, 599, 1, 12290, 556, 556, 928, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 964, 556, 556, 556, 556, 556, 2294, 2615, 0, 0, 0, 0, 580, 580, 580, 580, 580, 534, 556, 580, 0, 0, 0, 0, 0, 0, 0, 0, 2924, 0, 0, 0, 0, 0, 0, 534, 534, 534, 891, 534, 556, 556, 556, 964, 556, 0, 580, 580, 580, 1038, 580, 580, 580, 580, 2636, 580, 2638, 580, 580, 580, 580, 2642, 580, 580, 580, 580, 0, 0, 0, 3440, 0, 0, 0, 3443, 0, 0, 534, 534, 78114, 1066, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1084, 0, 0, 0, 0, 670, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2432, 0, 0, 0, 1184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 534, 534, 2132, 2133, 534, 534, 1340, 1341, 901, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1353, 556, 556, 556, 556, 580, 3590, 580, 580, 580, 580, 0, 0, 0, 534, 534, 534, 534, 534, 534, 1713, 534, 534, 534, 534, 534, 534, 534, 2140, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2990, 534, 534, 534, 534, 534, 534, 556, 556, 1362, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3047, 556, 556, 556, 0, 1551, 0, 0, 0, 1557, 0, 0, 0, 1563, 0, 0, 0, 0, 0, 0, 0, 1650, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 172032, 0, 1656, 0, 0, 0, 0, 0, 0, 0, 0, 1662, 0, 1664, 0, 0, 0, 0, 0, 0, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 172032, 1, 12290, 534, 534, 1771, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2523, 534, 534, 556, 556, 1854, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1866, 556, 556, 556, 556, 932, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 1815, 556, 556, 556, 556, 556, 1887, 556, 556, 556, 556, 556, 556, 26009, 0, 580, 580, 580, 580, 580, 580, 2312, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1488, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1924, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3073, 580, 580, 580, 580, 580, 1937, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1950, 580, 580, 580, 580, 2648, 580, 580, 580, 580, 580, 580, 580, 580, 2656, 580, 580, 580, 580, 580, 3231, 580, 580, 580, 580, 580, 580, 580, 534, 580, 556, 580, 580, 580, 1973, 580, 580, 580, 580, 580, 580, 580, 580, 580, 1983, 580, 580, 580, 580, 1484, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3222, 580, 580, 580, 580, 0, 0, 0, 2043, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 733, 1171, 0, 0, 534, 2151, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2795, 534, 2236, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2600, 2323, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3089, 580, 580, 580, 580, 2622, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3224, 580, 580, 2695, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2120, 2734, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2719, 534, 2774, 534, 2776, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2160, 534, 534, 534, 556, 2821, 556, 2823, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3190, 556, 556, 556, 580, 580, 580, 2870, 580, 2872, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2654, 580, 580, 580, 580, 580, 0, 0, 0, 0, 2933, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 534, 534, 2981, 534, 556, 556, 556, 556, 3289, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3202, 556, 556, 556, 556, 580, 3308, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3314, 580, 580, 556, 556, 3589, 556, 580, 580, 580, 580, 3593, 580, 0, 0, 0, 534, 534, 534, 3152, 534, 534, 534, 534, 534, 534, 534, 3157, 534, 534, 534, 0, 0, 359, 0, 0, 0, 0, 0, 0, 364, 0, 292, 0, 0, 0, 0, 0, 0, 702, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2600960, 0, 0, 2768896, 2777088, 2781184, 0, 0, 369, 0, 0, 369, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2040, 2041, 0, 600, 576, 576, 576, 576, 576, 576, 576, 600, 600, 600, 553, 600, 600, 600, 600, 600, 600, 600, 576, 576, 553, 576, 600, 576, 600, 1, 12290, 556, 923, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2234, 556, 556, 556, 556, 556, 1367, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3547, 3548, 556, 556, 580, 580, 580, 580, 580, 1500, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3102, 3103, 3104, 534, 1646, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2748, 0, 0, 1684, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2065, 0, 0, 580, 580, 580, 1938, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3223, 580, 580, 580, 0, 0, 0, 2723, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 734, 0, 0, 0, 2942, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2760, 0, 0, 0, 0, 3249, 0, 3250, 0, 0, 0, 0, 3132, 0, 0, 0, 0, 0, 0, 0, 3333, 0, 534, 534, 534, 0, 0, 0, 360, 361, 362, 363, 0, 0, 364, 0, 292, 0, 0, 0, 0, 0, 0, 718, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2445, 0, 0, 0, 0, 0, 0, 361, 0, 360, 0, 0, 0, 69632, 73728, 0, 0, 0, 0, 427, 65536, 0, 0, 0, 0, 685, 534, 534, 838, 842, 845, 534, 853, 534, 534, 534, 868, 427, 427, 0, 427, 0, 361, 427, 450, 0, 0, 0, 0, 0, 0, 0, 0, 690, 691, 0, 364, 364, 364, 0, 0, 0, 0, 0, 491, 491, 0, 498, 498, 498, 498, 504, 505, 498, 498, 518, 518, 518, 518, 450, 450, 450, 450, 450, 450, 450, 450, 450, 518, 518, 518, 518, 518, 518, 518, 518, 554, 577, 554, 577, 554, 554, 577, 554, 601, 577, 577, 577, 577, 577, 577, 577, 601, 601, 601, 554, 601, 601, 601, 601, 601, 601, 601, 577, 577, 613, 618, 601, 618, 624, 1, 12290, 534, 534, 887, 534, 534, 556, 556, 960, 556, 556, 0, 580, 580, 1034, 580, 580, 580, 580, 1502, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2332, 580, 580, 580, 580, 534, 2513, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2806, 534, 534, 534, 534, 2542, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 0, 0, 0, 0, 556, 556, 556, 2216, 556, 2218, 556, 580, 2674, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 534, 580, 556, 534, 534, 534, 534, 534, 2491, 534, 534, 534, 534, 2495, 534, 534, 534, 534, 534, 0, 0, 0, 0, 556, 556, 2215, 556, 556, 556, 556, 602, 578, 578, 578, 578, 578, 578, 578, 602, 602, 602, 555, 602, 602, 602, 602, 602, 602, 602, 578, 578, 555, 578, 602, 578, 602, 1, 12290, 0, 0, 698, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2410, 0, 0, 728, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2952, 0, 0, 0, 728, 0, 784, 0, 0, 0, 0, 0, 0, 0, 0, 784, 0, 0, 0, 0, 686, 0, 0, 0, 0, 0, 0, 364, 364, 364, 0, 0, 0, 0, 0, 671, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3145, 3146, 0, 0, 0, 556, 924, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2260, 2261, 0, 0, 1176, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2433, 0, 0, 534, 1300, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2548, 0, 0, 1418, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 26009, 1341, 975, 580, 580, 580, 580, 2664, 580, 580, 580, 580, 2668, 580, 580, 580, 580, 580, 580, 1505, 580, 580, 1509, 580, 580, 580, 580, 580, 1515, 0, 0, 1553, 0, 0, 0, 1559, 0, 0, 0, 0, 0, 0, 0, 0, 0, 299, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2082, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 736, 0, 0, 0, 0, 0, 0, 0, 534, 534, 534, 534, 2167, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1733, 534, 534, 534, 534, 556, 556, 556, 2252, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3471, 580, 580, 580, 580, 580, 580, 2339, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3485, 0, 0, 3488, 2499, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2202, 0, 0, 0, 0, 736, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 1747, 534, 534, 534, 534, 1051, 534, 534, 892, 534, 1056, 556, 556, 965, 556, 0, 1061, 580, 580, 1039, 580, 580, 580, 580, 2885, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2680, 534, 580, 556, 534, 556, 556, 1420, 556, 556, 556, 556, 556, 556, 556, 556, 556, 26009, 1341, 975, 580, 580, 580, 580, 2894, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2900, 580, 580, 580, 580, 534, 534, 534, 534, 1726, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2144, 534, 534, 2148, 534, 1821, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2843, 580, 580, 1954, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 3313, 580, 580, 580, 580, 556, 2586, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 2288, 556, 556, 556, 556, 556, 2614, 0, 0, 0, 0, 0, 0, 580, 580, 580, 580, 580, 1039, 580, 580, 580, 580, 0, 0, 0, 534, 580, 556, 0, 0, 0, 0, 2957, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 534, 2979, 534, 534, 534, 2983, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 534, 2498, 3065, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 580, 2889, 580, 580, 580, 580, 580, 3192, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 3035, 1134592, 0, 1134592, 0, 0, 0, 1134592, 1135007, 1135007, 0, 0, 0, 0, 0, 1135007, 0, 0, 0, 0, 700, 701, 0, 0, 0, 0, 0, 707, 0, 0, 0, 711, 0, 1134592, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2718, 0, 0, 1134592, 1134592, 0, 0, 0, 0, 1135196, 1135196, 1135196, 1135196, 1134592, 1135196, 1135196, 1135196, 1135196, 1135196, 1135196, 0, 1134592, 1134592, 1134592, 1134592, 1135196, 1134592, 1135196, 1, 12290, 2125824, 3117056, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 0, 2125824, 2125824, 2125824, 2125824, 3137536, 2940928, 2940928, 2940928, 0, 0, 0, 0, 0, 2748416, 2879488, 0, 0, 0, 0, 0, 2113, 0, 0, 0, 2113, 0, 0, 2118, 2119, 0, 0, 0, 0, 0, 1180, 0, 0, 0, 1184, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2474, 0, 1147348, 1147348, 1147348, 451, 451, 1147348, 451, 451, 451, 451, 451, 451, 451, 451, 1147399, 1147399, 1147399, 1147399, 1147399, 1147399, 1147399, 1147399, 1147399, 1147399, 1147399, 1147399, 1147399, 1147399, 1147399, 1147399, 0, 0, 0, 0, 0, 0, 0, 0, 768, 0, 0, 0, 0, 0, 0, 0, 451, 0, 0, 0, 0, 0, 1147348, 1147348, 1147348, 1147399, 1147399, 1147348, 1147399, 1147399, 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, 0, 2950, 0, 0, 0, 0, 1159168, 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, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 0, 0, 0, 0, 0, 0, 0, 0, 781, 0, 0, 0, 0, 0, 792, 0, 0, 1159168, 0, 0, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1159168, 1, 12290, 3, 0, 0, 0, 0, 249856, 0, 0, 0, 249856, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 163840, 0, 0, 0, 0, 65536, 0, 2125824, 3117056, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 0, 0, 974, 2125824, 2125824, 2125824, 2125824, 3149824, 2125824, 2428928, 2437120, 2125824, 2486272, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2625536, 2125824, 2125824, 2125824, 2125824, 2125824, 2125824, 2699264, 2125824, 2715648, 2125824, 2723840, 2125824, 0, 106496, 106496, 0, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 0, 0, 106496, 0, 0, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 106496, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2183168, 0, 0, 0, 0, 0, 0, 0, 0, 2134016, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 695, 0, 0, 0, 0, 0, 3108864, 3198976, 0, 0, 3043328, 0, 3149824, 2936832, 0, 2760704, 0, 0, 0, 0, 0, 0, 0, 69632, 73728, 0, 369, 369, 0, 0, 65536, 369
+];
+
+XQueryParser.EXPECTED =
+[ 127, 143, 342, 950, 172, 201, 188, 217, 769, 963, 247, 263, 279, 295, 311, 327, 1395, 373, 1083, 374, 374, 374, 374, 374, 374, 374, 374, 374, 419, 391, 407, 466, 435, 589, 1682, 909, 574, 156, 1220, 451, 495, 511, 527, 543, 559, 634, 1096, 678, 694, 755, 649, 785, 801, 817, 833, 849, 865, 881, 897, 937, 979, 995, 1023, 1039, 1055, 479, 1112, 1128, 1473, 1144, 1160, 1206, 1236, 357, 662, 1266, 709, 1282, 1292, 1308, 1324, 1339, 1355, 1411, 1427, 1443, 618, 1459, 724, 1489, 604, 1518, 1528, 231, 1070, 1544, 1560, 1576, 1592, 1622, 1250, 1638, 1654, 1606, 921, 1670, 739, 1698, 1714, 1820, 1190, 1730, 1746, 1502, 1758, 1774, 1790, 1806, 1175, 1850, 1860, 1836, 1009, 1370, 1876, 1385, 375, 1892, 1896, 1903, 1903, 1903, 1898, 1902, 1903, 1910, 1907, 1914, 1918, 1922, 1926, 1929, 1933, 1937, 1941, 1945, 4040, 4040, 4040, 4106, 4040, 4040, 2020, 2279, 4040, 1949, 4040, 4040, 4040, 2429, 2379, 4040, 4040, 4040, 4040, 2438, 4040, 4040, 3112, 2651, 3443, 2444, 1955, 1984, 1994, 1998, 4040, 4040, 4040, 4040, 4040, 2017, 2042, 4040, 4040, 4040, 2024, 2285, 2030, 2034, 4040, 4040, 4040, 4040, 4040, 2041, 4040, 4040, 3002, 2285, 2285, 2285, 2285, 2285, 2111, 1988, 1988, 1988, 1988, 1988, 1990, 1955, 1955, 1955, 1955, 1955, 2101, 3099, 1988, 1988, 1988, 1988, 1988, 2120, 1955, 1955, 1955, 1955, 1955, 2046, 2055, 4040, 4040, 2212, 2349, 4040, 4040, 4040, 4137, 3441, 4040, 4040, 4040, 4040, 3531, 4040, 2745, 1988, 1988, 1988, 2066, 1955, 1955, 1955, 1957, 2073, 4040, 4040, 2473, 3002, 2285, 2285, 2026, 1988, 1988, 3101, 1955, 1955, 1956, 2072, 4040, 2471, 4040, 2284, 2285, 3098, 1988, 1988, 2078, 1955, 2068, 2129, 2446, 3554, 2285, 2112, 1988, 2120, 1955, 2083, 2281, 2286, 1988, 2067, 2089, 2095, 2113, 2049, 2107, 3097, 2114, 2079, 3096, 3100, 2079, 3096, 2114, 2051, 2118, 2126, 2135, 2139, 2143, 2156, 2160, 2170, 2170, 2170, 2163, 2167, 2170, 2173, 2177, 2181, 2185, 2189, 2193, 2197, 2201, 2205, 2209, 2216, 4040, 4040, 4040, 2131, 4040, 4040, 4040, 2220, 4040, 2226, 4040, 2283, 2287, 1988, 1954, 2122, 2098, 1961, 4040, 4040, 4040, 1970, 4040, 2474, 1980, 4040, 2321, 3139, 4040, 2440, 3145, 4427, 2277, 3219, 2796, 3151, 3505, 3155, 4040, 3263, 3161, 2906, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4041, 2255, 2259, 2262, 2266, 2270, 2274, 3465, 2291, 4040, 4040, 4040, 4040, 3213, 2296, 2312, 2303, 2396, 2240, 2243, 2309, 2316, 2320, 2649, 4006, 4040, 2726, 2326, 3670, 4040, 4040, 4040, 4040, 2231, 3466, 4040, 4040, 4040, 3429, 2237, 4040, 2618, 3123, 2249, 2253, 3877, 2348, 4040, 4040, 4013, 2355, 4040, 2359, 4040, 4040, 4040, 4040, 3173, 2321, 2227, 2367, 3192, 4040, 4040, 2459, 4040, 4040, 3192, 4040, 4040, 4348, 2989, 2882, 2918, 3129, 2349, 4040, 3014, 2311, 2670, 2331, 3577, 4417, 2336, 2379, 4040, 4040, 2549, 2340, 4040, 4040, 4040, 2984, 4040, 4040, 4040, 4040, 3591, 2979, 4040, 4040, 4040, 3390, 4180, 4419, 3131, 4040, 3190, 3194, 4040, 2950, 2989, 2918, 3210, 4040, 2469, 2788, 3212, 4040, 4005, 3283, 3279, 4282, 4040, 3281, 4226, 4226, 2601, 4283, 3283, 3283, 1966, 3282, 3279, 1966, 4227, 3283, 4191, 2462, 2478, 4040, 4040, 4040, 4040, 2588, 2522, 4040, 4040, 4040, 2007, 2858, 2484, 3025, 2492, 2495, 2498, 2502, 2503, 2507, 2511, 2515, 4040, 2521, 4040, 4040, 2526, 4040, 3968, 2913, 2541, 2545, 3867, 2553, 2563, 2574, 2578, 4040, 3387, 3385, 4040, 2582, 4040, 3458, 2587, 4040, 3120, 4040, 4040, 4040, 3174, 2074, 2409, 2537, 2432, 4040, 4040, 4040, 2536, 2416, 4040, 2373, 2377, 4040, 4040, 4040, 4040, 4255, 2378, 4040, 4040, 4040, 4040, 4256, 2379, 4040, 2838, 3503, 4040, 4040, 4040, 4040, 2839, 3504, 3974, 3509, 4040, 4040, 3730, 3536, 4040, 3349, 2906, 4040, 3326, 2556, 3181, 3383, 3394, 3403, 4040, 4397, 4040, 3553, 3551, 3545, 4040, 2668, 2912, 3478, 3399, 2548, 2592, 3456, 3471, 2600, 4040, 4040, 4040, 4242, 4040, 3147, 4040, 3818, 4040, 4037, 3923, 3990, 3561, 4003, 4040, 2655, 4039, 4040, 4040, 4040, 3167, 4040, 4040, 4040, 3331, 3171, 4040, 4040, 4040, 4040, 3632, 3179, 4040, 2638, 2611, 2615, 4040, 2388, 2622, 4040, 4040, 4040, 4040, 2389, 2349, 4040, 4040, 4040, 2397, 2390, 4040, 4040, 4040, 3141, 4040, 4040, 3846, 4040, 4040, 2630, 2517, 4070, 2637, 2412, 2989, 4040, 4040, 4040, 4040, 2344, 4040, 4040, 4040, 4040, 4040, 3269, 2989, 2380, 3207, 4040, 3463, 4040, 4040, 4040, 3861, 3470, 4040, 4040, 4040, 3475, 4040, 3482, 4040, 4040, 2631, 3905, 4040, 4040, 4040, 4040, 2631, 3905, 2424, 3909, 4040, 2152, 2595, 3785, 3915, 2631, 4365, 2642, 4040, 4040, 4040, 4040, 4085, 2646, 4040, 4040, 4040, 4040, 4085, 2646, 4040, 4040, 2464, 4040, 4040, 2285, 2285, 2285, 2285, 2025, 1988, 1988, 1988, 1988, 1988, 2120, 3610, 3833, 4040, 4040, 4040, 4365, 2656, 4040, 4040, 4040, 2660, 2665, 3980, 2516, 3196, 2674, 2678, 3830, 2685, 4040, 4040, 3830, 2685, 4040, 4040, 2299, 2690, 4040, 3184, 3458, 2004, 3969, 3197, 3312, 3251, 2696, 4040, 2037, 2690, 4040, 3251, 2696, 4040, 2702, 2709, 3195, 4000, 2713, 2717, 4040, 2715, 4040, 2679, 2723, 4040, 2730, 2734, 2739, 3644, 4040, 2705, 2583, 3646, 2583, 2749, 2753, 2704, 3203, 2944, 2566, 2570, 2956, 2945, 3843, 2568, 2568, 2761, 3815, 3641, 2765, 3607, 2769, 2773, 2775, 2779, 2783, 2787, 4040, 4040, 4040, 3316, 4040, 4040, 3564, 2792, 3570, 2800, 2804, 2808, 2810, 2814, 2818, 2821, 2823, 2824, 4040, 4040, 3315, 4040, 3428, 2828, 3896, 3248, 2833, 2843, 2434, 2453, 3918, 2849, 2907, 2853, 4040, 2150, 2148, 4040, 4040, 4040, 4040, 2405, 2349, 4040, 4040, 4040, 4040, 2405, 2349, 4040, 4040, 4040, 4040, 2362, 3442, 4040, 4040, 4040, 4040, 2363, 3773, 3950, 4040, 4040, 4040, 2857, 4040, 2559, 2968, 3853, 2862, 2937, 4379, 2869, 3988, 3295, 4040, 2873, 4040, 4040, 4040, 3554, 2285, 2285, 2285, 2285, 1987, 1988, 1988, 1988, 1989, 1955, 1955, 1955, 1955, 1956, 2103, 4040, 4040, 4040, 2472, 4040, 2109, 2285, 2285, 2285, 2113, 3527, 2877, 4040, 4040, 4040, 2886, 2890, 4040, 4040, 4040, 4040, 2980, 4040, 3336, 2829, 3897, 2895, 2899, 4040, 2911, 2917, 4040, 4040, 2922, 4040, 4040, 4040, 4040, 2844, 2923, 4040, 4040, 2626, 4289, 4040, 3453, 3038, 4353, 4386, 3183, 4040, 4040, 4041, 4370, 4040, 4040, 2845, 2924, 4040, 4040, 4040, 4040, 4040, 2990, 4040, 2558, 2928, 4420, 2935, 4040, 2943, 2949, 4040, 2970, 2954, 4040, 4040, 4040, 4040, 3855, 2960, 4040, 4040, 4040, 4040, 3855, 2960, 4040, 4040, 4040, 4040, 3389, 4040, 2966, 3897, 2974, 2327, 4275, 4040, 3590, 2978, 4040, 3535, 3379, 3488, 3521, 3230, 4040, 4040, 3540, 4040, 4040, 4040, 3439, 4040, 4040, 4040, 4364, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4378, 4040, 4040, 4040, 2605, 4040, 4040, 2245, 4040, 4040, 3459, 4040, 4040, 4038, 3923, 4040, 2013, 3616, 2411, 4040, 3631, 2988, 4040, 4040, 3631, 2988, 4040, 4040, 4040, 2994, 4040, 4040, 2350, 4262, 2381, 3617, 4040, 4040, 4346, 4040, 4040, 3000, 4040, 4040, 4346, 4040, 2350, 4208, 3615, 2881, 4040, 2795, 3174, 3112, 3180, 3024, 3111, 3180, 3180, 3933, 3014, 3113, 3113, 3006, 3181, 3014, 3013, 3014, 3175, 4047, 3018, 3029, 3053, 4040, 4040, 4040, 4040, 3634, 4040, 4221, 4040, 3650, 4040, 4040, 4040, 4040, 2631, 3651, 4040, 4040, 4040, 4040, 3648, 4287, 4291, 4040, 4010, 4017, 4303, 4022, 2632, 3182, 4040, 4032, 4040, 1950, 4012, 4040, 2865, 4045, 4051, 3043, 3047, 4064, 3061, 3065, 3069, 3073, 3077, 3081, 3105, 3084, 4040, 4040, 3633, 4040, 4040, 3443, 2444, 4040, 4040, 4040, 2450, 4040, 4040, 4040, 4349, 4040, 4040, 3014, 3276, 2487, 2961, 2691, 4276, 3109, 1976, 3117, 3127, 3289, 3135, 3305, 4040, 3324, 3322, 4040, 4040, 3734, 3779, 3739, 3744, 3969, 4040, 3748, 3754, 3761, 3943, 3887, 3765, 4057, 4040, 2488, 2962, 2692, 3163, 3224, 3188, 3412, 4040, 4040, 2085, 3201, 4040, 4040, 4040, 4040, 2343, 3217, 3223, 3228, 4040, 4040, 4040, 3234, 4040, 4040, 4040, 4040, 4040, 3238, 4040, 4040, 4040, 4040, 3422, 4040, 2529, 2686, 4354, 3245, 4040, 4040, 4040, 4342, 4040, 4040, 4040, 4040, 1972, 4040, 4040, 4040, 4040, 4040, 3255, 4040, 4040, 4040, 3423, 3952, 2686, 4355, 3261, 4040, 4040, 3267, 4040, 4040, 4040, 1974, 4040, 4040, 4040, 3273, 4040, 4220, 3981, 2680, 4356, 3895, 4040, 3287, 4040, 4040, 3293, 4040, 4040, 2062, 4040, 4220, 3953, 3299, 2146, 4040, 3303, 4040, 2607, 4040, 4040, 2061, 4040, 4248, 3309, 3894, 3498, 4040, 4360, 4040, 4040, 4040, 4369, 4040, 4374, 3056, 4383, 3622, 4040, 4040, 4390, 4040, 4040, 4424, 2742, 4040, 2633, 4040, 3056, 4040, 3039, 3157, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 2455, 4325, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 3320, 4040, 3330, 3911, 3335, 3629, 3588, 4213, 3943, 3587, 4213, 4213, 4040, 3341, 3589, 3589, 3628, 4214, 3341, 3340, 3341, 3630, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 4040, 3836, 2349, 3347, 4040, 3354, 3001, 4080, 4404, 3358, 3362, 3366, 3369, 3373, 3373, 3377, 4040, 4040, 3835, 4091, 3410, 4040, 4040, 3416, 4040, 4040, 3420, 3427, 4040, 3433, 4040, 4331, 3447, 4040, 4040, 3797, 4040, 3795, 4040, 4040, 4345, 4040, 2350, 1964, 4040, 2879, 4040, 3397, 4040, 2904, 4040, 3350, 3488, 4040, 3486, 2535, 3492, 3496, 4040, 4040, 4040, 3502, 4040, 4040, 4040, 4127, 4028, 2010, 4131, 4141, 4145, 4149, 4153, 4157, 4161, 4165, 4169, 4173, 4134, 4377, 4293, 2534, 3516, 4040, 4040, 4040, 2839, 3504, 4040, 4040, 4040, 4040, 2931, 3442, 4040, 3450, 4040, 2902, 4040, 3799, 4363, 3520, 4196, 3525, 3406, 2349, 2757, 2305, 2996, 4393, 4347, 3544, 4040, 3549, 4040, 4040, 3549, 4040, 4040, 3558, 2756, 2305, 4077, 4395, 3960, 4040, 3568, 4040, 3823, 2349, 4040, 3997, 3750, 3574, 3884, 3961, 4269, 4040, 4270, 4040, 3581, 3944, 3585, 3595, 3931, 3600, 2001, 3930, 3604, 3604, 4211, 3614, 3932, 3621, 3626, 3662, 3638, 3655, 3656, 3660, 3667, 3674, 3678, 3682, 3685, 4040, 4040, 4040, 3840, 2596, 3740, 3850, 2668, 2332, 3343, 4040, 3859, 4040, 4040, 4040, 2233, 3865, 2891, 3735, 2465, 2351, 3690, 3698, 3874, 3702, 3705, 3709, 3713, 3717, 3721, 3725, 3729, 4040, 2423, 2421, 3241, 3772, 4040, 4040, 2939, 3777, 3783, 3789, 3793, 4136, 2698, 3342, 2633, 2425, 3803, 4040, 4040, 3808, 2349, 4040, 4040, 4186, 3812, 4040, 4040, 4040, 3009, 3822, 3827, 4040, 3871, 2532, 4318, 3881, 4040, 3891, 3773, 4040, 4040, 4040, 4040, 3901, 4040, 4040, 4040, 4040, 4040, 2385, 4040, 4040, 4040, 4040, 3014, 4040, 2394, 4040, 2401, 2379, 4035, 3922, 4040, 4040, 2292, 3927, 4040, 4040, 4040, 4040, 3937, 4040, 4040, 4040, 4040, 2091, 3941, 3948, 4040, 3957, 3757, 3966, 2835, 3112, 4040, 4040, 2222, 3979, 4040, 4040, 2719, 3973, 2632, 3183, 3021, 4040, 4055, 4040, 4061, 2419, 4040, 3023, 4068, 4074, 4084, 4112, 4089, 4095, 3596, 4100, 4308, 4099, 4104, 4110, 4099, 4113, 4119, 3257, 4117, 4123, 4040, 4040, 4040, 4040, 4177, 4184, 2836, 3686, 4190, 3693, 4195, 4200, 4410, 4205, 4218, 4040, 3090, 2735, 4225, 3093, 4231, 4040, 4040, 4040, 3631, 4235, 2661, 4040, 2681, 4429, 2369, 4040, 4239, 4040, 4040, 4040, 4040, 3804, 4246, 4040, 4040, 4040, 4252, 4040, 4040, 4040, 2631, 4260, 4266, 4040, 4040, 4040, 4025, 4185, 2837, 2686, 2480, 4274, 4040, 4280, 4040, 4040, 4040, 4040, 4201, 3978, 4018, 4303, 3768, 4040, 3050, 4040, 4040, 3985, 4040, 4040, 3994, 4040, 4322, 4385, 4329, 4040, 4040, 4040, 4040, 4335, 4040, 4040, 4040, 4040, 3663, 4339, 4040, 4040, 4297, 4040, 3057, 3087, 4301, 3962, 3032, 4040, 4040, 4040, 4040, 2624, 4307, 4040, 4040, 4040, 4040, 2624, 4312, 4315, 4040, 2322, 3436, 2837, 2058, 4040, 4040, 3035, 4040, 4401, 4408, 3694, 4040, 4040, 3512, 4040, 2631, 4414, 4040, 3511, 4558, 4433, 6024, 6027, 4439, 4466, 4468, 4468, 4446, 4455, 4467, 4468, 4468, 4468, 4468, 4468, 4468, 4473, 4468, 4468, 4463, 4457, 4459, 4479, 4477, 4483, 4468, 4469, 4493, 4496, 4506, 4510, 4524, 4519, 4511, 4500, 4502, 4502, 4518, 4519, 4498, 4515, 4523, 4528, 4532, 4536, 4539, 4547, 4546, 4543, 4551, 4554, 4556, 4566, 5097, 4574, 6086, 5003, 5101, 5101, 5101, 4593, 4599, 4602, 4602, 4602, 4602, 4608, 4640, 4568, 4622, 4628, 5101, 4434, 5101, 5099, 5101, 6713, 5101, 6256, 5101, 5101, 4584, 5992, 5101, 5101, 4729, 5101, 5473, 6277, 5101, 5007, 4602, 5693, 4609, 5696, 5699, 5699, 5699, 5699, 4601, 4602, 5699, 4602, 4619, 4621, 4623, 4627, 6087, 5101, 4434, 6165, 6164, 5101, 5101, 6380, 6242, 5096, 5101, 4576, 5101, 6463, 5101, 5101, 5635, 4488, 5366, 6275, 5101, 4581, 5101, 4590, 5411, 5123, 5123, 5123, 5697, 5699, 4603, 4621, 4621, 4622, 4627, 4627, 4628, 5101, 4583, 5448, 6513, 5474, 5101, 5008, 5101, 5101, 4602, 4632, 5123, 5699, 4602, 4602, 4602, 5704, 5121, 4602, 4621, 4627, 5101, 4583, 6563, 5101, 4584, 6017, 5101, 5101, 5699, 5701, 4602, 4602, 4602, 4632, 4640, 5705, 5101, 5101, 5101, 4734, 5700, 4602, 4602, 4602, 5705, 4643, 5701, 5101, 5101, 4824, 5651, 4602, 4650, 5101, 5101, 4824, 6512, 5010, 5695, 5123, 5123, 5698, 5690, 4602, 4608, 5696, 5700, 5703, 5101, 4602, 5101, 5101, 5121, 5123, 5123, 5123, 5699, 5699, 5699, 5702, 5123, 5698, 5699, 5702, 4602, 4602, 5704, 4607, 4602, 5705, 5123, 5697, 5704, 5101, 5101, 4816, 4822, 5699, 4602, 5704, 5695, 5698, 5702, 5694, 5701, 4651, 4652, 4650, 5101, 4592, 5101, 5101, 5815, 5567, 5101, 5101, 5106, 6519, 6761, 6550, 6560, 4662, 4695, 4656, 4660, 4693, 4666, 4673, 4670, 4680, 4684, 4691, 4693, 4693, 4693, 4693, 4694, 4676, 4699, 4693, 4703, 4708, 4714, 4704, 4726, 4740, 4744, 4687, 4751, 4753, 4748, 4787, 4789, 4789, 4791, 4757, 4759, 4761, 4763, 4776, 4776, 4770, 4767, 4774, 4717, 4675, 4710, 4780, 4784, 4795, 4797, 4801, 4805, 4809, 5101, 4592, 6198, 6202, 4990, 5007, 5230, 6461, 5101, 6373, 5101, 5101, 4824, 6698, 4831, 5101, 5101, 5101, 4736, 5108, 5108, 5101, 5101, 4826, 6485, 5490, 5979, 4838, 5101, 4720, 4985, 5101, 4720, 5101, 5101, 4853, 5311, 4857, 5333, 4876, 4902, 4906, 4906, 4906, 4906, 4908, 4915, 4917, 4912, 4921, 4925, 4928, 4931, 4934, 4939, 4938, 4943, 4944, 4959, 4949, 4948, 4953, 4956, 4963, 5101, 5107, 5101, 4892, 5101, 5007, 5101, 5101, 5695, 5123, 5123, 5123, 5123, 5696, 5699, 5988, 5101, 5101, 5101, 4825, 5300, 5101, 5608, 5101, 4811, 5449, 6426, 4969, 5101, 5101, 4988, 6219, 5101, 5018, 4987, 5101, 5101, 4860, 5101, 5101, 4995, 5015, 5101, 6412, 5034, 5101, 5101, 5101, 4893, 6751, 6138, 5101, 5101, 5101, 4894, 6729, 5101, 5101, 5101, 4965, 5055, 5068, 5081, 5086, 5091, 5076, 5095, 5101, 4824, 5933, 5929, 5376, 5087, 4434, 5101, 5101, 5101, 4979, 5008, 6409, 5996, 5101, 5999, 5151, 5987, 5376, 5101, 4826, 6502, 6738, 6204, 5101, 6730, 5101, 5101, 4891, 5101, 4570, 5101, 5115, 5127, 5074, 4442, 5096, 5101, 5101, 5101, 4975, 5538, 5411, 5986, 5281, 5101, 4840, 5628, 5355, 5382, 4434, 4736, 5101, 4973, 5101, 5101, 5101, 4840, 5687, 5132, 5075, 5140, 5890, 5072, 5076, 5141, 6462, 4888, 5101, 5101, 4895, 5101, 5343, 5073, 6582, 4451, 5101, 4894, 5101, 5101, 6416, 5101, 5101, 5101, 6191, 5101, 5415, 5892, 5074, 6583, 5096, 5101, 5101, 4898, 5999, 5411, 5280, 5101, 5101, 4974, 4978, 5134, 5157, 5101, 5101, 5007, 5101, 5132, 5075, 5159, 5101, 4897, 5101, 5871, 4980, 5101, 5949, 5135, 5159, 5101, 4976, 5101, 5101, 5010, 5101, 5101, 5169, 4434, 5101, 5101, 5009, 5101, 5101, 5101, 4613, 4614, 4975, 5101, 4614, 5101, 5411, 4978, 6164, 6391, 5101, 4977, 6380, 5395, 5376, 5188, 4872, 5243, 5197, 5197, 5194, 5197, 5199, 5203, 5205, 5207, 5209, 5209, 5209, 5213, 5213, 5213, 5213, 5214, 5213, 5213, 5215, 5219, 5221, 5101, 5101, 5101, 5036, 5101, 5059, 5063, 5372, 5101, 5101, 5101, 6378, 6010, 5101, 4978, 6569, 5101, 4980, 5101, 5417, 5101, 5101, 5101, 5891, 5074, 5240, 5101, 5351, 6463, 5247, 5101, 5101, 5257, 5101, 5101, 5101, 5068, 5263, 6448, 5875, 5101, 4981, 5101, 5101, 5876, 6281, 5416, 5275, 4435, 5874, 5101, 4990, 6089, 5406, 5410, 5101, 5265, 5407, 5285, 5101, 5101, 5297, 6402, 5101, 5101, 5304, 5309, 5101, 5101, 5101, 5057, 5371, 5101, 5101, 5101, 5059, 5330, 4833, 5427, 5101, 5010, 4978, 5101, 5415, 5358, 5101, 5101, 5101, 5100, 5883, 5359, 5101, 5101, 5102, 6015, 4893, 5258, 5101, 5342, 5432, 5101, 5348, 5101, 5024, 6570, 5977, 5382, 4434, 5101, 5101, 5102, 6113, 5726, 5101, 6379, 5101, 5101, 5101, 5102, 5101, 5101, 6462, 5101, 4561, 5876, 5101, 6422, 6426, 5381, 6381, 6423, 6427, 5382, 5101, 5031, 5101, 5101, 4866, 4885, 4811, 5438, 6425, 5399, 6381, 5479, 5101, 5101, 5101, 5104, 5106, 5060, 5064, 5101, 5035, 5101, 5101, 5051, 5101, 5350, 5101, 5879, 4896, 5431, 5101, 5101, 5101, 5106, 5101, 4975, 5471, 5101, 5101, 5101, 5107, 6430, 5101, 5101, 5101, 5108, 4890, 6429, 6381, 5101, 5101, 5102, 6446, 5479, 5101, 5101, 5453, 5269, 5410, 5101, 4614, 5101, 5101, 6380, 5153, 5101, 5101, 5732, 5268, 5470, 5101, 5101, 5102, 6697, 5459, 5468, 6381, 5101, 5041, 5046, 5045, 5478, 5101, 5101, 5453, 4614, 5101, 5101, 5101, 5111, 6088, 5350, 5877, 5413, 5538, 5101, 5101, 5047, 5047, 5047, 5461, 5101, 6088, 6119, 5106, 5267, 5271, 5101, 5047, 6213, 5101, 5101, 5404, 4990, 5404, 5408, 5404, 4990, 5404, 5962, 5423, 5961, 5101, 6084, 5423, 5233, 6104, 5101, 4990, 5232, 5230, 5101, 5232, 4989, 5232, 5232, 5232, 5231, 6488, 5101, 5101, 5101, 5168, 5876, 5722, 5483, 4434, 5099, 5101, 5101, 6498, 6279, 5487, 5101, 4886, 6166, 5489, 5856, 5494, 5500, 5498, 5504, 5504, 5504, 5504, 5506, 5513, 5510, 5517, 5519, 5519, 5519, 5521, 5519, 5525, 5525, 5525, 5525, 5527, 6280, 5415, 5319, 5672, 5101, 5005, 6438, 5101, 5101, 5103, 5101, 5101, 5101, 6361, 6199, 5571, 5101, 5101, 5101, 5176, 5626, 6498, 5551, 5101, 6442, 5561, 5101, 5814, 5566, 5575, 5101, 5101, 5101, 5181, 6167, 5004, 6438, 5101, 5102, 6092, 6381, 5580, 5101, 5101, 5004, 6127, 5600, 5863, 5606, 5862, 5605, 5101, 5101, 5235, 5101, 5101, 5101, 5424, 5102, 6128, 5601, 5864, 5607, 5101, 5101, 5101, 5224, 5101, 6167, 5101, 5006, 6440, 5101, 5569, 5101, 5102, 6180, 5148, 5101, 5101, 5996, 5101, 6283, 5464, 5101, 5101, 5101, 5228, 5101, 5620, 5101, 5101, 5101, 5232, 5176, 5626, 6753, 5665, 5101, 5101, 5632, 5321, 4434, 5101, 5102, 6362, 6200, 5027, 5562, 5101, 5570, 5101, 5101, 5223, 5746, 5463, 5101, 5101, 5101, 5266, 4989, 5621, 5101, 5101, 5101, 5278, 6754, 5666, 5101, 5101, 5265, 5407, 6755, 5376, 5101, 5101, 4990, 5101, 5612, 5415, 5320, 6393, 5101, 5101, 5176, 5639, 5646, 4577, 5568, 5410, 5640, 5664, 5101, 5101, 5101, 5293, 5175, 5639, 5663, 5376, 5659, 5376, 5101, 5101, 5101, 4980, 5657, 5676, 5101, 5101, 5288, 5037, 5658, 5101, 5101, 5101, 5411, 5123, 5098, 5101, 5423, 5101, 5102, 6471, 6477, 5098, 5101, 5424, 5101, 5101, 5426, 5098, 5424, 5101, 5102, 6558, 5101, 5101, 5101, 6393, 5101, 5426, 5424, 5568, 5424, 5233, 5101, 5101, 5102, 6562, 5101, 5104, 5101, 5101, 5101, 4974, 6215, 5710, 4879, 5101, 6496, 5376, 5101, 5105, 5101, 5424, 5424, 5099, 5101, 5105, 5101, 5101, 5101, 5720, 4722, 5730, 5742, 5751, 5757, 5766, 5764, 5767, 5755, 5761, 5771, 5774, 5776, 5778, 5790, 5782, 5785, 5789, 5790, 5791, 5796, 5795, 5801, 5797, 5806, 5101, 5108, 4976, 5101, 5110, 6702, 5101, 5111, 6707, 5101, 5123, 5123, 5123, 5698, 5699, 5699, 5700, 4602, 5801, 5802, 5801, 5801, 4998, 5101, 5098, 5101, 5101, 5425, 5101, 5101, 5812, 5819, 5557, 5101, 5145, 5281, 5101, 4844, 5876, 4852, 5595, 5101, 4888, 5101, 5950, 5136, 4434, 5101, 4615, 5101, 5101, 5823, 5848, 5941, 5101, 5101, 5363, 5101, 5472, 5373, 5101, 5101, 5386, 5101, 5860, 4888, 5868, 5887, 5011, 5011, 5101, 5101, 5414, 5101, 6528, 5376, 5101, 5101, 5414, 6347, 5545, 5908, 6527, 4732, 5904, 6529, 5101, 5101, 5423, 5101, 5101, 5100, 5942, 5101, 5101, 5101, 5426, 5101, 5101, 5101, 5479, 5912, 5924, 5101, 5101, 5423, 5163, 5158, 5101, 5101, 5101, 4989, 5101, 5350, 5929, 5376, 5101, 5101, 5454, 5270, 6215, 5393, 5374, 5101, 5168, 5173, 5101, 5101, 5101, 5021, 5109, 5101, 5411, 5101, 5853, 5101, 6347, 5101, 5100, 5101, 5102, 5947, 5925, 5101, 5101, 5530, 4980, 4811, 5650, 5954, 5376, 4812, 5959, 5955, 5101, 5184, 5539, 6436, 5879, 5098, 5102, 5538, 5101, 6166, 5101, 5102, 5447, 5442, 4585, 5993, 5101, 5101, 5538, 6089, 5099, 4592, 5101, 5101, 5546, 5903, 4584, 5993, 5101, 5101, 5649, 5940, 5102, 4586, 5994, 5101, 5231, 4887, 5101, 4974, 5100, 5101, 5101, 6712, 5101, 5101, 4584, 5995, 5101, 5101, 5706, 5898, 4585, 5995, 5101, 5101, 5808, 5101, 5106, 5101, 5413, 6346, 5102, 6004, 5101, 5101, 5833, 5840, 6392, 5107, 5412, 5876, 4894, 5152, 5101, 5035, 5576, 5101, 5101, 5106, 6016, 5101, 5101, 5837, 5841, 5101, 5101, 5338, 5101, 6015, 5101, 5101, 5101, 5547, 5412, 5101, 5101, 5101, 5612, 5101, 6161, 5101, 5101, 5101, 5679, 5101, 5101, 6367, 5101, 5101, 5842, 6096, 5101, 6282, 5101, 4486, 6021, 6046, 6045, 6046, 6046, 6043, 6046, 6050, 6054, 6058, 6062, 6071, 6066, 6070, 6071, 6071, 6075, 6075, 6075, 6075, 6078, 6082, 5101, 5101, 5842, 6097, 5103, 5234, 5101, 5101, 5880, 5305, 5101, 5101, 5047, 5101, 5101, 6102, 5109, 6108, 5101, 5236, 5101, 5101, 5325, 5101, 6117, 5101, 6123, 5101, 5249, 6209, 6202, 5101, 6493, 5101, 5101, 5897, 5101, 5101, 6142, 6181, 5096, 5843, 6097, 5101, 5101, 5966, 5101, 5101, 5996, 5101, 5101, 5101, 5876, 5103, 6174, 5101, 5101, 5416, 5421, 5101, 5101, 5251, 6200, 6204, 5101, 5101, 5101, 5949, 6147, 6152, 6000, 4980, 4980, 4980, 5101, 5292, 4635, 5101, 5299, 5101, 5101, 5058, 5062, 5371, 6361, 5737, 5101, 5101, 5975, 4848, 5988, 6137, 5101, 5101, 5101, 5882, 5102, 5734, 5738, 5101, 5317, 6462, 5349, 6382, 5101, 6160, 6159, 5101, 6173, 5101, 5101, 5999, 5101, 5101, 6667, 5106, 4894, 6247, 4978, 5101, 5101, 6004, 5101, 6361, 6199, 6203, 5101, 5101, 5101, 5896, 6382, 6382, 5101, 5101, 6111, 5418, 5101, 5101, 6668, 4893, 6186, 5101, 6769, 5879, 5101, 5101, 5529, 6188, 5101, 5101, 6126, 5599, 5102, 6197, 6201, 6205, 5419, 6182, 4434, 5101, 5101, 6089, 5252, 6201, 6205, 5585, 5101, 5101, 5101, 6007, 6455, 4450, 5101, 5101, 6133, 5101, 5101, 5101, 5695, 6454, 4449, 4434, 5101, 5350, 5101, 5878, 5101, 6280, 4886, 4988, 6229, 5101, 5101, 6162, 4614, 5101, 6378, 4434, 5101, 5375, 5101, 4562, 6229, 5101, 4978, 6214, 6161, 4980, 5101, 5101, 6162, 5101, 5101, 5101, 5655, 5640, 6234, 5101, 5101, 5101, 6089, 5101, 6258, 4434, 6240, 5101, 6258, 4434, 5101, 5404, 5962, 5101, 5102, 5437, 6424, 6235, 5101, 5101, 5568, 5410, 5101, 5101, 6236, 5101, 6165, 5101, 5101, 5101, 6259, 5101, 5101, 6164, 5101, 5101, 5101, 5648, 5849, 5942, 5101, 6260, 5101, 6165, 5101, 5405, 5409, 5101, 5057, 5268, 5409, 5101, 5101, 5102, 6742, 5253, 5101, 5101, 5101, 6260, 5101, 5101, 6259, 5101, 6167, 6258, 5101, 5101, 5101, 6112, 6259, 5101, 6259, 6165, 4847, 5987, 5376, 5568, 6497, 6259, 5568, 6497, 6168, 6257, 6257, 6261, 6251, 6254, 6254, 5101, 5101, 5101, 6169, 5118, 5101, 5916, 5101, 5414, 5538, 5101, 5101, 5918, 4896, 5553, 4884, 5037, 6272, 6287, 6305, 6299, 6305, 6303, 6299, 6309, 6293, 6290, 6295, 6322, 6313, 6327, 6316, 6319, 6323, 6332, 6331, 6339, 6339, 6340, 6339, 6339, 6339, 6336, 6344, 5101, 5101, 5101, 6178, 5224, 5747, 5376, 5101, 5101, 5415, 5101, 5101, 6351, 4893, 4893, 4882, 5230, 5001, 5101, 6372, 5101, 5101, 6214, 4980, 5101, 6357, 5969, 5101, 5417, 5419, 6353, 6366, 4434, 5101, 6371, 6390, 6397, 6401, 5101, 5418, 4636, 5647, 6434, 5101, 5101, 5101, 6192, 5943, 5101, 5008, 5101, 4978, 5101, 4979, 5101, 5416, 5101, 6351, 4893, 5419, 6352, 4894, 6268, 6367, 5002, 5101, 5101, 6279, 5641, 5101, 5101, 5290, 5101, 6452, 5101, 5101, 5101, 6223, 5101, 6470, 6459, 6480, 6475, 6479, 6205, 5101, 5423, 5407, 5101, 5057, 5061, 5390, 6481, 5101, 5101, 5101, 6228, 5589, 5588, 5587, 5101, 5436, 5442, 6428, 5402, 5101, 5101, 5102, 6143, 6182, 5106, 5745, 6520, 5101, 5455, 5409, 5101, 5057, 5061, 5370, 6267, 5101, 5410, 5101, 5535, 5101, 5101, 5177, 5640, 5423, 5999, 5101, 5101, 6360, 5736, 6738, 6204, 5101, 5101, 6378, 5101, 5224, 5077, 5101, 5008, 6265, 5555, 5101, 5415, 5070, 5082, 5622, 5101, 5101, 6278, 6165, 5233, 5101, 5377, 6377, 6386, 5103, 5101, 5679, 5101, 5538, 5101, 5101, 5101, 5534, 5538, 4826, 5935, 6737, 6204, 4827, 5936, 6535, 6204, 6191, 6191, 5101, 5101, 6378, 6393, 5232, 5101, 5036, 5101, 5543, 5259, 5326, 6190, 5101, 5101, 5101, 6278, 5443, 6506, 4434, 5101, 5568, 6236, 5101, 5101, 5568, 5101, 5102, 6511, 5134, 6507, 5164, 4451, 5101, 5101, 6392, 5101, 6165, 5101, 6192, 6192, 6192, 5101, 5101, 6378, 6392, 5101, 5101, 6517, 5376, 5101, 5583, 5101, 5101, 5101, 6011, 6524, 5101, 6278, 5101, 5101, 5101, 5037, 6155, 5101, 5101, 5101, 6382, 6533, 6549, 5101, 5101, 5101, 6379, 6393, 5101, 6544, 6381, 5101, 5593, 5101, 5101, 5229, 5634, 5101, 6676, 6549, 5101, 5616, 6230, 5101, 5351, 5877, 4895, 5411, 5432, 5101, 5101, 5101, 5031, 5101, 6675, 6548, 5101, 5101, 5101, 6391, 5101, 6539, 5426, 5101, 5101, 5417, 5920, 4896, 5101, 5648, 6722, 5416, 6462, 5101, 5562, 5101, 6554, 6381, 5101, 5680, 5101, 5101, 6381, 5101, 5101, 5101, 5101, 4583, 5101, 6540, 5425, 5101, 5426, 5101, 5101, 6709, 5417, 4895, 5102, 4595, 5101, 5101, 6406, 5101, 4594, 5403, 6540, 5101, 5714, 5003, 4991, 6090, 6568, 5101, 5101, 6464, 4988, 5101, 6091, 6381, 5101, 5842, 5037, 5998, 5996, 5996, 5413, 4893, 5101, 5101, 5101, 6419, 5101, 6091, 5101, 5101, 6492, 6491, 5101, 6091, 5101, 4895, 4561, 4896, 5101, 5101, 6090, 6089, 4896, 5101, 5101, 6494, 6256, 4559, 5101, 5101, 6090, 5101, 5101, 6090, 4561, 6089, 4561, 5101, 6089, 4560, 5537, 6089, 5101, 5537, 6574, 6752, 4888, 4577, 5716, 5997, 6579, 5101, 5844, 5037, 5101, 5101, 5101, 6196, 5101, 6462, 6465, 6463, 4869, 5826, 5829, 6587, 4489, 4646, 6598, 6591, 6597, 6593, 6605, 6602, 6607, 6611, 6613, 6617, 6619, 6628, 6625, 6632, 6621, 6635, 6639, 6640, 6644, 6647, 6654, 6653, 6651, 6658, 6661, 6665, 5101, 6574, 6723, 5101, 5876, 6281, 5670, 5418, 5421, 5101, 5101, 5101, 6469, 5107, 5101, 4975, 5101, 4976, 6672, 5101, 5101, 5101, 6682, 6494, 5101, 5101, 5101, 6695, 6680, 5313, 6686, 5101, 5877, 5684, 4434, 6246, 5101, 5101, 6163, 5101, 5101, 5101, 6692, 5101, 5101, 6495, 5101, 5101, 6703, 5101, 5101, 5101, 6713, 5101, 5101, 6718, 6717, 4834, 6722, 5101, 5418, 5422, 5101, 6727, 6734, 5101, 5881, 5357, 5337, 6746, 5101, 5101, 5101, 6495, 6378, 5101, 6222, 6745, 5101, 5889, 5128, 5074, 4442, 6224, 6747, 5101, 5877, 5615, 5671, 5876, 5101, 5879, 5101, 5899, 6230, 5101, 5101, 6089, 5101, 5101, 4892, 5101, 5412, 5002, 6734, 5101, 5101, 6711, 5101, 5101, 5253, 5101, 5877, 5877, 5877, 5101, 5101, 5101, 6771, 5101, 5101, 6575, 5642, 4635, 5411, 6089, 5101, 4889, 5258, 5101, 5252, 4561, 5101, 5101, 6090, 5252, 4561, 5876, 5876, 5101, 5101, 5101, 5914, 6353, 6148, 5106, 4974, 5101, 5101, 5972, 5101, 4989, 5101, 6165, 5425, 5101, 6688, 5107, 5101, 6111, 5724, 6759, 5725, 4561, 5101, 5101, 5983, 5994, 5101, 5190, 5879, 5101, 5101, 5101, 5344, 5376, 5106, 5101, 5101, 5413, 6463, 5879, 5102, 6775, 6767, 5101, 5101, 5997, 5101, 5101, 5101, 4811, 4583, 6765, 5101, 5101, 5101, 5101, 6098, 5420, 5101, 5998, 5101, 5101, 5101, 4818, 5109, 5101, 5413, 5537, 5101, 5101, 6165, 5101, 6111, 6564, 5101, 5998, 5101, 6769, 5101, 5101, 6132, 6137, 5101, 6098, 5101, 5101, 6033, 6031, 6039, 5105, 5101, 5109, 5101, 4863, 5101, 6776, 5101, 5101, 5101, 6035, 4434, 5101, 6161, 5536, 5101, 5036, 5102, 5101, 5101, 6088, 5101, 5101, 5412, 6089, 1048576, 1073741824, 0, 0, 0, -872415232, 4194560, 4196352, 270532608, 2097152, 4194304, 117440512, 134217728, 4194304, 16777216, 4194432, 3145728, 16777216, 134217728, 536870912, 1073741824, 0, 541065216, 541065216, -2143289344, -2143289344, 4194304, 4194304, 4196352, -2143289344, 4194304, 4194432, 37748736, 541065216, -2143289344, 4194304, 4194304, 4194304, 4194304, 37748736, 4194304, 4194304, 4198144, 4196352, 8540160, 4194304, 4194304, 4194304, 4196352, 276901888, 4194304, 4194304, 8425488, 4194304, 1, 0, 1024, 1024, 0, 1024, 742391808, 239075328, -1405091840, 742391808, 742391808, 775946240, 239075328, 171966464, 775946240, 171966464, 171966464, 171966464, 171966464, -1405091840, 775946240, 775946240, -1405091840, -1371537408, 775946240, 775946240, 775946240, 171966464, 239075328, 239075328, 171966464, 775946240, -1371537408, 775946240, 775946240, -1371537408, 239075328, 775946240, 775946240, 775946240, 775946240, 4718592, 64, 4718592, 2097216, 4720640, 541589504, 4194368, 541589504, 4194400, 4194368, 541065280, 4194368, -2143289280, 4194368, -2143285440, -2143285408, -2143285408, -2109730976, -2143285408, -2143285408, -2143285408, -2143285408, 776470528, -2143285408, -2109730976, 775946336, 775946304, 776470528, 775946304, -1908404384, 2, 4, 8, 262144, 0, 0, 0, 0x80000000, 8, 262144, 262144, 1048576, 0, 128, 4096, 0, 4194304, 128, 128, 0, 1048576, 0, 0, 1536, 1792, 0, 0, 1, 2, 4, 128, 2097152, 8192, 8392704, 0, 0, 1, 4, 8, 262144, 536870912, 64, 64, 32, 96, 96, 96, 96, 128, 1536, 524288, 96, 64, 524288, 524288, 1536, 1024, 0, 0, 0, 29, 96, 1048576, 128, 128, 128, 128, 2048, 2048, 2048, 2048, 2048, 2048, 0, 96, 524288, 96, 64, 0, 0, 128, 1024, 524288, 64, 64, 96, 96, 524288, 524288, 4100, 1024, 100680704, 96, 524288, 64, 96, 524288, 64, 80, 528, 524304, 1048592, 2097168, 268435472, 16, 16, 2, 536936448, 16, 262160, 16, 536936448, 16, 17, 17, 20, 16, 48, 16, 16, 20, 560, 24, 560, 48, 2097680, 3145744, 1048592, 1048592, 2097168, 16, 1049104, 2228784, 2097168, 2097168, 16, 16, 16, 16, 20, 48, 48, 3146256, 2097680, 1048592, 16, 16, 16, 28, 0, 2097552, 3146256, 16, 16, 16, 21, 16, 16, 28, 16, 0, 16, 0, -2046820352, 0, 0, 2, 2, 2, 2098064, 17, 21, 266240, 1048576, 67108864, 0x80000000, 0, 0, 64, 65536, 1048576, 0, 16, 16, 163577856, 17, 528, 528, 16, 528, -161430188, -161429676, -161429676, -161430188, -161429680, -161430188, -161430188, -161429680, -161429676, -161349072, -161429675, -161349072, -161349072, -161349072, -161349072, -161347728, -161347728, -161347728, -161347728, -161298572, -160774288, -160299084, -161298572, -161298576, -160299088, -161298576, -160774284, -160774284, -161298572, -161298572, -161298572, -161298572, 112, 21, 53, 146804757, 146812949, 146862101, 146863389, -161429676, -160905388, -161429676, -161429676, -161429676, -161429676, -161429675, -161349072, 146863421, 148960541, 146863389, 146863389, 148960541, 146863421, 148960541, 148960541, -161429740, -161429676, -160905388, -161298572, -161298572, -18860267, -160774284, -18729163, 0, 0, 1, 6, 8, 16, 262144, 0, 0, 1, 8, 0, 24, 0, 0, 1, 14, 16, 32, 1024, 32768, 100663296, -1073741824, 0, 0, 0, 150528, 131072, 16777216, 0, 0, 1, 102, 1, 32768, 131328, 131072, 524288, 2097152, 8388608, 16777216, 164096, 0, 0, 0, 1007, 0, 1073741825, 0x80000000, 0x80000000, 1073741824, 8, 0, 0, 58368, 0, 0, 65536, 1048576, 4096, 1048576, 512, 512, 9476, 134218240, 0, 1073741824, 2621440, 1073741824, 0x80000000, 0x80000000, 0, 0, 66048, 0, 0, 0, 67108864, 0, 0, 0, 16384, 0, 0, 0, 8, 0, 0, 0, 9, 4456448, 8, 16777216, 1073774592, 1226014816, 100665360, 100665360, 100665360, 100665360, -2046818288, 1091799136, 1091799136, 1091803360, 1091799136, 1091799136, -2044196848, 1091799136, 1091799136, 1091799136, 1091799136, 1091799136, 1158908000, 1158908001, 1192462432, 1192462448, 1192462448, 1192462448, 1192462448, 1200851056, 1091799393, 1200851056, 1200851056, 1091799393, 1200851056, 1200851056, 1200851056, 1192462448, 1870638912, 1870638912, 1870655296, 1870638912, 1870655296, 1870655296, 1870655296, 1870655296, 1870655296, 1870655312, 1870655316, 1870655316, 1870655316, 1870655317, 1870655348, 1870655316, 1870655316, 1870655312, 1870655312, 1879027568, 1879043952, 1870655316, 1870655316, 1870655316, 1870638928, 1879043952, 1879043956, 0, 0, 1, 12288, 0, 229440, 1048576, 1224736768, 100663296, 0, 0, 0, 1024, 0, 0, 8192, 0, 0, 0, 576, 0, 231488, 1090519040, 0, 0, 0, 2048, 0, 0, 134217728, 0, 1157627904, 1191182336, 0, 0, 131584, 268435456, 49152, 0, 0, 0, 134217728, 0, 0, 0, 16, 0, 0, 0, 13, 0, 9437184, 231744, 0, 0, 235712, 0, 0, 131328, 0, 0, 131072, 32768, 0, 0, 134217728, 0, 520000, 7864320, 1862270976, 0, 0, 0, 4096, 0, 0, 0, 1862270976, 1862270976, 1862270976, 0, 16252928, 0, 0, 0, 8192, 64, 98304, 1048576, 150994944, 83886080, 117440512, 0, 0, 2, 4, 16, 32, 256, 1024, 8192, 33554432, 0, 0, 64, 256, 3584, 8192, 16384, 65536, 262144, 524288, 1048576, 2097152, 4194304, 0x80000000, 8192, 98304, 393216, 524288, 1048576, 1048576, 2097152, 4194304, 251658240, 536870912, 8192, 16384, 98304, 393216, 251658240, 536870912, 1073741824, 0, 0, 2097152, 0, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 3, 240, 0, 83886080, 117440512, 64, 0, 2, 0, 0, 524288, 524288, 524288, 524288, 256, 1536, 2048, 8192, 16384, 256, 1536, 8192, 65536, 262144, 524288, 2097152, 67108864, 4194304, 16777216, 100663296, 134217728, 536870912, 524288, 2097152, 134217728, 268435456, 536870912, 1073741824, 0, 0, 524288, 2097152, 0, 0, 1048576, 2097152, 67108864, 1073741824, 0, 0, 1536, 65536, 262144, 524288, 33554432, 0, 1024, 65536, 262144, 2097152, 2097152, 1073741824, 0, 0, 2, 8, 16, 32, 0, 8192, 4096, 0, 0, 605503, 1066401792, 9476, 512, 0, 32, 384, 8192, 4194312, 4194312, 541065224, 4194312, 4194312, 4194312, 4194312, 4194344, -869654016, -869654016, 4203820, -869654016, -869654016, -869654016, -869654016, 1279402504, 1279402504, 1279402504, 1279402504, 2143549415, 2143549415, 2143549415, 2143549415, 2143549423, 2143549423, 2143549423, 2143549423, 2143549423, 2143549423, 0, 0, 2, 16384, 32768, 260, 512, 0, 0, 0, 65536, 0, 0, 0, 384, 8192, 0, 32, 512, 0, 1050624, 262144, 512, 1275208192, 139264, 1275068416, 0, 0, 4, 128, 1024, 2048, 16384, 262144, 8, 4194304, 0, 0, 0, 82432, 0, 40, 0, 0, 4, 256, 1024, 98304, 131072, 16777216, 268435456, 0, 0, 300, 4203520, 0, 0, 2097152, 1073741824, 0x80000000, 0, 0, 520, 4333568, 1275068416, 0, 0, 4194304, 1024, 0, 4096, 8192, 0, 0, 0, 520, 520, 0, 0, 0, 164096, 999, 29619200, 2113929216, 0, 0, 0, 1007, 1007, 1007, 0, 0, 8, 124160, 32, 512, 0, 2048, 524288, 0, 536870912, 0, 139264, 0, 0, 0, 139264, 0, 40, 0, 2621440, 0, 0, 0x80000000, 1610612736, 0, 0, 0, 229376, 0, 40, 0, 524288, 2097152, 1073741824, 44, 0, 0, 0, 262144, 0, 0, 16384, 229376, 4194304, 25165824, 100663296, 402653184, 1610612736, 0, 110, 110, 110, 0, 0, 8388608, 8388608, 8192, 33554432, 67108864, 134217728, 1073741824, 0, 0x80000000, 0, 0, 0, 12545, 25165824, 33554432, 67108864, 402653184, 536870912, 0, 104, 104, 104, 8192, 33554432, 134217728, 0, 0, 8388608, 134217728, 1073741824, 0, 229376, 25165824, 33554432, 402653184, 536870912, 0, 0, 256, 1024, 65536, 16777216, 268435456, 0, 0, 0, 524288, 0, 0, 0, 64, 0, 0, 0, 128, 0, 0, 0, 256, 0, 0, 0, 300, 524288, 2097152, 0x80000000, 0, 0, 1, 6, 32, 64, 256, 512, 256, 1024, 4096, 8192, 65536, 2, 4, 32, 64, 256, 1024, 0, 2, 4, 256, 1024, 65536, 4, 64, 256, 1024, 0, 0, 8, 8388608, 0, 98304, 131072, 25165824, 268435456, 536870912, 0, 0, 8388608, 4096, 0, 0, 8, 8, 8, 0, 2048, 524288, 67108864, 536870912, 32, 4100, 67108864, 0, 32768, 0, 32768, 0, 1049088, 0, 134348800, 270532608, 0, 1049088, 1049088, 8192, 1049088, 12845065, 12845065, 12845065, 12845065, 147193865, 5505537, 5591557, 5587465, 5587457, 5587457, 147202057, 5587457, 5587457, 5591557, 5587457, 13894153, 13894153, 13894153, 13894153, 81003049, 13894153, -1881791493, -1881791493, -1881791493, -1881791493, 0, 0, 8, 33554432, 262144, 0, 33554432, 1024, 0, 4, 0, 0, 0, 867647, 1, 5505024, 0, 0, 15, 16, 32, 192, 86528, 9, 0, 0, 16, 8192, 0, 0, 23, 0, 75497472, 0, 0, 0, 1048576, 5505024, -1887436800, 0, 0, 0, 2097152, 268435456, 0, 0, 4096, 8192, 67108864, 0, 0, 262144, 4194304, 8388608, 0, 0, 33554432, 8192, 0, 0, 288, 8388608, 0, 0, 0, 81920, 0, 0, 24, 282624, 64, 896, 8192, 131072, 262144, 1048576, 16777216, 33554432, -1946157056, 0, 0, 0, 2621440, 0, 131072, 0, 32, 0, 0, 2048, 3145728, 0, 16384, 65536, 0, 0, 268435456, 32, 64, 384, 512, 5120, 8192, 0, 64, 0, 2048, 1048576, 0, 0, 32, 64, 384, 8192, 131072, 0, 0, 32768, 134217728, 0, 0, 8, 32, 64, 1024, 2048, 0, 2, 8, 32, 384, 8192, 131072, 33554432, 131072, 1048576, 33554432, 134217728, 0x80000000, 0, 0, 2048, 524288, 536870912, 0, 1073741824, 0, 131072, 33554432, 0x80000000, 0, 0, 33554432, 1073741824, 0, 32, 0, 524288, 0, 0, 67108864, 64, 64, 0, 96, 96, 0, 524288, 524288, 524288, 64, 64, 64, 64, 96, 96, 96, 0, 0, 0, 28, 0, 8396800, 4194304, 134217728, 2048, 134217728, 0, 0, 32, 1, 0, 8396800, 0, 0, 32, 64, 128, 1024, 2048, 262144, 0, 16384, 0, 2, 4, 64, 128, 3840, 16384, 19922944, 2080374784, 0, 16384, 16384, 16777216, 16384, 32768, 1048576, 2097152, 4194304, 16777216, 524288, 268567040, 16384, 2113544, 68489237, 72618005, 68423701, 68423701, 68423701, 68489237, 68423701, -2079059883, -2079059947, 68423701, 85200917, 68423701, 68423701, 68423701, 68423701, 68423765, -2079059883, 68425749, 68423703, 69488664, 85200919, 69488664, 69488664, 69488664, 69488664, 70537244, 70537245, 70537245, 70537245, 70537309, 70537245, -2076946339, -2076946403, 70537245, -2076946339, 70537245, 70537245, 70537245, 70537245, 70539293, -2022351745, -2022351745, -2022351617, -2022351745, -2022351617, -2022351617, -2022351617, -2022351617, -2022351617, -2022351617, -2022351745, -2022351617, -2022351617, 0, 0, 40, 67108864, 331776, 83886080, 0, 0, 59, 140224, 5505024, 5242880, -2080374784, -2080374784, 268288, 29, 0, 284672, 0, 0, 68157440, 137363456, 0, 66, 66, 0, 63, 64, 351232, 63, 192, 351232, 7340032, -2030043136, 0, 0, 0, 4194304, 1, 1024, 32, 64, 256, 32768, 65536, 512, 131072, 268435456, 0, 0, 134348800, 134348800, 16, 4096, 262144, 1048576, 4194304, 8388608, 16777216, 33554432, 5242880, 0, 7, 0, 0, 142606336, 0, -872415232, 0, 0, 0, 131072, 0, 0, 0, 999, 259072, 4194304, 25165824, 0, 20480, 0, 0, 64, 256, 1536, 8192, 16384, 0, 12, 3145728, 0, 0, 0, 3145728, 64, 3072, 20480, 65536, 262144, 32, 192, 3072, 20480, 4, 1048576, 0, 0, 128, 131072, 0, 134218752, 0, 0, 128, 134217728, 5242880, 0, 6, 0, 0, 16384, 65536, 7340032, 50331648, 32, 192, 1024, 2048, 4096, 8192, 65536, 32768, 65536, 4194304, 16777216, 0x80000000, 0, 0, 1, 4, 0, 0, 256, 1536, 65536, 65536, 2097152, 4194304, 50331648, 0x80000000, 32, 192, 1024, 65536, 268435456, 0, 0, 32768, 4194304, 16777216, 0, 0, 184549376, 0, 0, 243269632, 0, 0, 32768, 131072, 131072, 0, 32768, 32768, 1, 2, 4, 2097152, 16777216, 134217728, 268435456, 1073741824, 0x80000000, 128, 2097152, 4194304, 50331648, 0, 0, 0, 8388608, 0, 0, 0, 768, 2, 4, 50331648, 0, 0, 536870912, 9216, 0, 0, 0, 49152, 2, 4, 128, 50331648, 0, 0, 4096, 4194304, 268435456, 0, 0, 1075838976, 2097152, 2097152, 268435456, 4194432, 268435968, 268435968, 1073743872, 268435968, 0, 128, 6144, 0, 229376, 128, 268435968, 268436032, 256, 256, 536871168, 256, 256, 256, 256, 257, 256, 384, -1879046336, -1879046334, 1073744256, -1879046334, -1879046326, -1879046334, -1879046334, -1879046326, -1879046326, -1845491902, -1878784182, 268444480, 268444480, 268436288, 268436288, 268436288, 268436288, 268436289, 268444480, 268444480, 268444480, 268444480, 2100318149, 2100318149, 2100318149, 2100318149, 2100326341, 2100326341, 2100318149, 2100326341, 2100326341, 0, 0, 256, 2048, 2048, 0, 0, 0, 4, 8, 262144, 134217728, 1, 1024, 0, 4096, 0, 64, 1856, 0x80000000, 0, 0, 256, 65536, 2432, 0, 1864, 0, 1, 2, 16, 32, 64, 0, 301989888, 0, 262144, 131072, 0, 0, 832, 8192, 0, 1, 2, 56, 64, 896, 0, 1, 4036, 19939328, 2080374784, 2080374784, 0, 0, 0, 16252928, 1, 16, 32, 128, 512, 2304, 0, 8, 0, 512, 301989888, 0, 0, 262144, 524288, 134217728, 536870912, 0, 24576, 0, 0, 0, 33554432, 0, 0, 0, 32768, 0, 0, 2097152, 134217728, 0, 32768, 196608, 0, 0, 0, 1, 128, 512, 2048, 524288, 268435456, 536870912, 0, 33554432, 262144, 8192, 0, 0, 256, 8388608, 0, 0, 1, 4, 128, 3584, 16384, 3145728, 16777216, 67108864, 134217728, 805306368, 1073741824, 0, 0, 1024, 2048, 16384, 3145728, 0, 8192, 0, 8192, 0, 536870912, 524288, 536870912, 1073741824, 0, 1, 2, 112, 128, 3072, 2048, 3145728, 16777216, 536870912, 1073741824, 0, 0, 2097152, 16777216, 1073741824, 0, 0, 0, 8192, 8192, 8192, 9216, 33554432, 32768, 33554432, 0, 0, 262144, 0, 16777216, 0, 16777216, 16777216, 16777216, 16777216, 0, 0, 2097152, 16777216, 0, 0, 16777216, 268500992, 4243456, 0, 0, 512, 65536, 0, 4096, 4096, 0, 4096, 4096, 4096, 4096, 0, 0, 0, 32, 0, 0, 0, 41, 0, 4243456, 4096, 12289, 1073754113, 12289, 12289, 1124073472, 12289, 12289, 1098920193, 1098920193, 1124073488, 1124073472, 1124073472, 1258292224, 1124073472, 1124073474, 1124073472, 1124073472, 1124073472, 1124073472, 1124073472, 1392574464, 1124073472, 12289, 1124085761, 1124085761, 1124085761, 1124085761, 1132474625, 1098920209, 1132474625, 1132474625, 1098920209, 1132474625, 1132474625, 1132474625, 1132474625, 1400975617, 1124085777, 1124085761, 1124085761, 1258304513, 2132360255, 2132360255, 2132622399, 2132360255, 2132622399, 2132622399, 2140749119, 2141011263, 2132622399, 2132622399, 2132622399, 2132622399, 2132360255, 2141011263, 2141011263, 0, 0, 512, 131072, 0, 128, 131072, 1024, 134217728, 0, 0, 0, 50331648, 1073741824, 0, 1, 4, 64, 128, 3584, 318767104, 0, 0, 0, 268435456, 0, 12289, 0, 0, 0, 159383552, 25165824, 0, 0, 0, 536870912, 0, 0, 0, 24576, 58720256, 0, 0, 12305, 13313, 0, 0, 0, 1073741824, 0, 0, 0, 12561, 0, 78081, 327155712, 0, 0, 0, 1275068416, 0, 605247, 1058013184, 1073741824, 1073741824, 8388608, 0, 0, 503616, 7864320, 867391, 1058013184, 1073741824, 0, 1, 6, 96, 384, 512, 1024, 4096, 8192, 16384, 229376, 25165824, 33554432, 268435456, 536870912, 0, 867647, 1066401792, 0, 0, 0, 512, 1048576, 0, 0, 9, 8388608, 12288, 0, 0, 0, 512, 2760704, 77824, 0, 0, 0, 1024, 2048, 3145728, 2048, 77824, 524288, 1048576, 0, 0, 0, 512, 0, 1048576, 0, 1, 30, 32, 1024, 2048, 1024, 2048, 339968, 524288, 1048576, 16777216, 100663296, 134217728, 805306368, 1073741824, 1024, 2048, 12288, 65536, 0, 65536, 0, 0, 19947520, 0, 0, 0, 16777216, 0, 0, 0, 5, 1024, 2048, 12288, 327680, 524288, 33554432, 134217728, 536870912, 1073741824, 14, 16, 1024, 4096, 8192, 229376, 0, 2, 16384, 4194304, 0x80000000, 0, 0, 0, 8, 0, 65536, 262144, 7340032, 50331648, 67108864, 0x80000000, 4096, 65536, 262144, 524288, 1048576, 33554432, 256, 0, 256, 0, 256, 1, 12, 1024, 134217728, 262144, 134217728, 536870912, 0, 0, 268435456, 1, 4, 8, 134217728, 4, 8, 536870912, 0, 2, 16, 64, 128, 0, 0, 262144, 536870912, 0, 0, 1073741824, 32768, 0, 8, 32, 512, 4096, 9437184, 0, 0, 1048576, 2097152, 4194304, 67108864, 134217728, 0, 1024, 137363456, 66, 25165824, 26214400, 92274688, 92274688, 25165952, 92274688, 25165824, 25165824, 92274688, 25165824, 25165824, 92274688, 92274688, 92274720, 92274688, 25165824, 92274688, 93323264, 25165890, 100721664, 100721664, 25165890, 100721928, 100721928, 100787464, 100853000, 100721928, 100721928, 125977600, 125977600, 125977600, 125977600, 127026176, 125977600, 125846528, 125846528, 125846560, 125846528, 125846528, 125846528, 126895104, 125846528, 125977600, 127026176, 125977600, 125977600, 127026176, 127026176, 281843, 281843, 1330419, 281843, 1330419, 281843, 1330419, 1330419, 281843, 281843, 281843, 5524723, 39079155, 72633587, 5524723, 5524723, 5524723, 5524723, 93605107, 72633587, 72633587, 92556531, 93605107, 127290611, 127290611, 97799411, 127290611, 131484915, 0, 0, 1536, 0x80000000, 0, 0, 17408, 33554432, 0, 1, 12, 1024, 262144, 0, 58624, 0, 0, 1536, 0, 189696, 0, 0, 0, 1792, 0x80000000, 0, 148480, 50331648, 0, 1, 14, 1024, 4096, 65536, 524288, 240, 19456, 262144, 0, 0, 19456, 262144, 0, 4194304, 0, 0, 1024, 2097152, 0, 0, 0, 150528, 0, 0, 0, 512, 4096, 8192, 131072, 0, 57344, 0, 0, 0, 2048, 100663296, 0, 0, 256, 0, 65536, 524288, 1048576, 33554432, 67108864, 2, 48, 64, 128, 3072, 16384, 262144, 0, 0, 32, 4096, 8192, 131072, 1048576, 8388608, 33554432, 134217728, 2048, 262144, 0, 0, 2048, 268435456, 16, 64, 128, 262144, 0, 0, 32768, 65536, 131072, 0, 1, 2, 16, 64, 0
+];
+
+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'",
+ "'{'",
+ "'{{'",
+ "'{|'",
+ "'|'",
+ "'||'",
+ "'|}'",
+ "'}'",
+ "'}}'"
+];
+
+},{}],"/node_modules/xqlint/lib/tree_ops.js":[function(_dereq_,module,exports){
+'use strict';
+
+exports.TreeOps = {
+ flatten: function(node){
+ var that = this;
+ var value = '';
+ if(!node) {
+ throw new Error('Invalid node found');
+ } else if (node.value === undefined) {
+ node.children.forEach(function(child){
+ value += that.flatten(child);
+ });
+ } else {
+ value += node.value;
+ }
+ return value;
+ },
+
+ concat: function(obj1, obj2, copy){
+ var result = copy ? {} : obj1;
+ if(copy){
+ Object.keys(obj1).forEach(function(key){
+ result[key] = obj1[key];
+ });
+ }
+ var keys = Object.keys(obj2);
+ keys.forEach(function(key){
+ result[key] = obj2[key];
+ });
+ return result;
+ },
+
+ removeParentPtr: function(ast){
+ if(ast.getParent !== undefined) {
+ delete ast.getParent;
+ }
+ for(var i in ast.children) {
+ var child = ast.children[i];
+ this.removeParentPtr(child);
+ }
+ },
+
+ inRange: function(p, pos, exclusive){
+ if(p && p.sl <= pos.line && pos.line <= p.el) {
+ if(p.sl < pos.line && pos.line < p.el) {
+ return true;
+ } else if(p.sl === pos.line && pos.line < p.el) {
+ return p.sc <= pos.col;
+ } else if(p.sl === pos.line && p.el === pos.line) {
+ return p.sc <= pos.col && pos.col <= p.ec + (exclusive ? 1 : 0);
+ } else if(p.sl < pos.line && p.el === pos.line) {
+ return pos.col <= p.ec + (exclusive ? 1 : 0);
+ }
+ }
+ },
+
+ findNode: function(ast, pos) {
+ if(!ast) {
+ return;
+ }
+ var p = ast.pos;
+ if(this.inRange(p, pos) === true) {
+ for(var i in ast.children) {
+ var child = ast.children[i];
+ var n = this.findNode(child, pos);
+ if(n !== undefined) {
+ return n;
+ }
+ }
+ return ast;
+ } else {
+ return;
+ }
+ },
+
+ astAsXML: function(node, indent){
+ var result = '';
+ indent = indent ? indent : '';
+ if(node.value) {
+ result += (indent + '<' + node.name + '>' + node.value + '</' + node.name + '>\n');
+ }
+ result += indent + '<' + node.name + '>\n';
+ var that = this;
+ node.children.forEach(function(child){
+ result += that.astAsXML(child, indent + ' ');
+ });
+ result += indent + '</' + node.name + '>\n';
+ return result;
+ }
+};
+},{}],"/node_modules/xqlint/lib/xqdoc/parse_comment.js":[function(_dereq_,module,exports){
+'use strict';
+
+exports.parseComment = function(comment){
+ comment = comment.trim();
+ var isXQDoc = comment.substring(0, 3) === '(:~';
+ if(isXQDoc){
+ var lines = comment.split('\n');
+ var ann = {
+ description: ''
+ };
+ lines.forEach(function(line, index){
+ if(index === 0) {
+ line = line.substring(3);
+ }
+ line = line.trim();
+ if(line[0] === ':') {
+ line = line.substring(1);
+ }
+ line = line.trim();
+ ann.description += ' ' + line;
+ });
+ ann.description = ann.description.trim();
+ ann.description = ann.description.substring(0, ann.description.length - 2).trim();
+ return ann;
+ }
+};
+},{}],"/node_modules/xqlint/lib/xqdoc/xqdoc.js":[function(_dereq_,module,exports){
+var _ = _dereq_('lodash');
+var parseComment = _dereq_('./parse_comment').parseComment;
+
+exports.XQDoc = function(ast){
+ 'use strict';
+
+ var doc = {};
+
+ this.getDoc = function(){
+ return doc;
+ };
+
+ this.WS = function(node){
+ if(node.value.trim().substring(0, 3) === '(:~') {
+ node.getParent.comment = parseComment(node.value);
+ }
+ };
+
+ this.AnnotatedDecl = function(node){
+ this.visitChildren(node);
+ node.comment = node.getParent.comment;
+ node.getParent.comment = undefined;
+ };
+
+ this.XQuery = function(node){
+ this.visitChildren(node);
+ };
+
+ this.getXQDoc = function(sctx){
+ var doc = {
+ moduleNamespace: sctx.moduleNamespace,
+ description: sctx.description,
+ variables: [],
+ functions: []
+ };
+
+ _.forEach(sctx.variables, function(variable){
+ var varDecl = _.cloneDeep(variable.qname);
+ varDecl.annotations = variable.annotations;
+ varDecl.description = variable.description;
+ varDecl.type = variable.type;
+ varDecl.occurrence = variable.occurrence;
+ doc.variables.push(varDecl);
+ });
+
+ _.forEach(sctx.functions, function(fn, key){
+ if(key.substring(0, 'http://www.w3.org/2001/XMLSchema#'.length) === 'http://www.w3.org/2001/XMLSchema#') {
+ return;
+ }
+
+ var tokens = key.split('#');
+ doc.functions.push({
+ name: tokens[0],
+ uri: tokens[1],
+ params: fn.params
+ });
+ });
+
+ return doc;
+ };
+
+ this.visit = function (node) {
+ var name = node.name;
+ var skip = false;
+
+ if (typeof this[name] === 'function') {
+ skip = this[name](node) === true;
+ }
+
+ if (!skip) {
+ this.visitChildren(node);
+ }
+ };
+
+ this.visitChildren = function (node, handler) {
+ for (var i = 0; i < node.children.length; i++) {
+ var child = node.children[i];
+ if (handler !== undefined && typeof handler[child.name] === 'function') {
+ handler[child.name](child);
+ } else {
+ this.visit(child);
+ }
+ }
+ };
+
+ this.visit(ast);
+};
+
+},{"./parse_comment":"/node_modules/xqlint/lib/xqdoc/parse_comment.js","lodash":"/node_modules/xqlint/node_modules/lodash/index.js"}],"/node_modules/xqlint/lib/xqlint.js":[function(_dereq_,module,exports){
+'use strict';
+
+var _ = _dereq_('lodash');
+
+var JSONiqParser = _dereq_('./parsers/JSONiqParser').JSONiqParser;
+var XQueryParser = _dereq_('./parsers/XQueryParser').XQueryParser;
+var JSONParseTreeHandler = _dereq_('./parsers/JSONParseTreeHandler').JSONParseTreeHandler;
+var Translator = _dereq_('./compiler/translator').Translator;
+var StyleChecker = _dereq_('./formatter/style_checker').StyleChecker;
+var XQDoc = _dereq_('./xqdoc/xqdoc').XQDoc;
+var completer = _dereq_('../lib/completion/completer');
+var TreeOps = _dereq_('./tree_ops').TreeOps;
+
+var createStaticContext = exports.createStaticContext = function(){
+ var StaticContext = _dereq_('./compiler/static_context').StaticContext;
+ return new StaticContext();
+};
+
+var convertPosition = function (code, begin, end) {
+ var before = code.substring(0, begin);
+ var after = code.substring(0, end);
+ var startline = before.split('\n').length;
+ var startcolumn = begin - before.lastIndexOf('\n');
+ var endline = after.split('\n').length;
+ var endcolumn = end - after.lastIndexOf('\n');
+ var pos = {
+ sl: startline - 1,
+ sc: startcolumn - 1,
+ el: endline - 1,
+ ec: endcolumn - 1
+ };
+ return pos;
+};
+
+exports.JSONiqLexer = _dereq_('./lexers/jsoniq_lexer').JSONiqLexer;
+exports.XQueryLexer = _dereq_('./lexers/xquery_lexer').XQueryLexer;
+exports.XQLint = function (source, opts) {
+ if(_.defaults) {
+ opts = _.defaults(opts ? opts : {}, { styleCheck: false });
+ }
+
+ var ast, xqdoc;
+ var sctx = opts.staticContext ? opts.staticContext : createStaticContext();
+
+ this.getAST = function () {
+ return ast;
+ };
+
+ this.printAST = function () {
+ return TreeOps.astAsXML(ast, ' ');
+ };
+
+ this.getXQDoc = function () {
+ return xqdoc.getXQDoc(sctx);
+ };
+
+ var markers = [];
+ this.getMarkers = function () {
+ return markers;
+ };
+
+ this.getMarkers = function(type){
+ var m = [];
+ markers.forEach(function(marker){
+ if(marker.type === type || type === undefined){
+ m.push(marker);
+ }
+ });
+ return m;
+ };
+
+ this.getErrors = function(){
+ return this.getMarkers('error');
+ };
+
+ this.getWarnings = function(){
+ return this.getMarkers('warning');
+ };
+
+ this.getCompletions = function(pos){
+ return completer.complete(source, ast, sctx, pos);
+ };
+
+ var syntaxError = false;
+ this.hasSyntaxError = function () {
+ return syntaxError;
+ };
+
+ var file = opts.fileName ? opts.fileName : '';
+ var isJSONiq = ((file.substring(file.length - '.jq'.length).indexOf('.jq') !== -1) && source.indexOf('xquery version') !== 0) || source.indexOf('jsoniq version') === 0;
+ var h = new JSONParseTreeHandler(source);
+ var parser = isJSONiq ? new JSONiqParser(source, h) : new XQueryParser(source, h);
+ try {
+ parser.parse_XQuery();
+ } catch (e) {
+ if (e instanceof parser.ParseException) {
+ syntaxError = true;
+ h.closeParseTree();
+ var pos = convertPosition(source, e.getBegin(), e.getEnd());
+ var message = parser.getErrorMessage(e);
+ if (pos.sc === pos.ec) {
+ pos.ec++;
+ }
+ markers.push({
+ pos: pos,
+ type: 'error',
+ level: 'error',
+ message: message
+ });
+ } else {
+ throw e;
+ }
+ }
+ ast = h.getParseTree();
+ if(opts.styleCheck) {
+ markers = markers.concat(new StyleChecker(ast, source).getMarkers());
+ }
+ xqdoc = new XQDoc(ast);
+ var translator = new Translator(sctx, ast);
+ markers = markers.concat(translator.getMarkers());
+};
+
+},{"../lib/completion/completer":"/node_modules/xqlint/lib/completion/completer.js","./compiler/static_context":"/node_modules/xqlint/lib/compiler/static_context.js","./compiler/translator":"/node_modules/xqlint/lib/compiler/translator.js","./formatter/style_checker":"/node_modules/xqlint/lib/formatter/style_checker.js","./lexers/jsoniq_lexer":"/node_modules/xqlint/lib/lexers/jsoniq_lexer.js","./lexers/xquery_lexer":"/node_modules/xqlint/lib/lexers/xquery_lexer.js","./parsers/JSONParseTreeHandler":"/node_modules/xqlint/lib/parsers/JSONParseTreeHandler.js","./parsers/JSONiqParser":"/node_modules/xqlint/lib/parsers/JSONiqParser.js","./parsers/XQueryParser":"/node_modules/xqlint/lib/parsers/XQueryParser.js","./tree_ops":"/node_modules/xqlint/lib/tree_ops.js","./xqdoc/xqdoc":"/node_modules/xqlint/lib/xqdoc/xqdoc.js","lodash":"/node_modules/xqlint/node_modules/lodash/index.js"}],"/node_modules/xqlint/node_modules/lodash/index.js":[function(_dereq_,module,exports){
+(function (global){
+;(function() {
+ var undefined;
+ var VERSION = '3.10.1';
+ var BIND_FLAG = 1,
+ BIND_KEY_FLAG = 2,
+ CURRY_BOUND_FLAG = 4,
+ CURRY_FLAG = 8,
+ CURRY_RIGHT_FLAG = 16,
+ PARTIAL_FLAG = 32,
+ PARTIAL_RIGHT_FLAG = 64,
+ ARY_FLAG = 128,
+ REARG_FLAG = 256;
+ var DEFAULT_TRUNC_LENGTH = 30,
+ DEFAULT_TRUNC_OMISSION = '...';
+ var HOT_COUNT = 150,
+ HOT_SPAN = 16;
+ var LARGE_ARRAY_SIZE = 200;
+ var LAZY_FILTER_FLAG = 1,
+ LAZY_MAP_FLAG = 2;
+ var FUNC_ERROR_TEXT = 'Expected a function';
+ var PLACEHOLDER = '__lodash_placeholder__';
+ var argsTag = '[object Arguments]',
+ arrayTag = '[object Array]',
+ boolTag = '[object Boolean]',
+ dateTag = '[object Date]',
+ errorTag = '[object Error]',
+ funcTag = '[object Function]',
+ mapTag = '[object Map]',
+ numberTag = '[object Number]',
+ objectTag = '[object Object]',
+ regexpTag = '[object RegExp]',
+ setTag = '[object Set]',
+ stringTag = '[object String]',
+ weakMapTag = '[object WeakMap]';
+
+ var arrayBufferTag = '[object ArrayBuffer]',
+ float32Tag = '[object Float32Array]',
+ float64Tag = '[object Float64Array]',
+ int8Tag = '[object Int8Array]',
+ int16Tag = '[object Int16Array]',
+ int32Tag = '[object Int32Array]',
+ uint8Tag = '[object Uint8Array]',
+ uint8ClampedTag = '[object Uint8ClampedArray]',
+ uint16Tag = '[object Uint16Array]',
+ uint32Tag = '[object Uint32Array]';
+ var reEmptyStringLeading = /\b__p \+= '';/g,
+ reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
+ reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
+ var reEscapedHtml = /&(?:amp|lt|gt|quot|#39|#96);/g,
+ reUnescapedHtml = /[&<>"'`]/g,
+ reHasEscapedHtml = RegExp(reEscapedHtml.source),
+ reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
+ var reEscape = /<%-([\s\S]+?)%>/g,
+ reEvaluate = /<%([\s\S]+?)%>/g,
+ reInterpolate = /<%=([\s\S]+?)%>/g;
+ var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,
+ reIsPlainProp = /^\w*$/,
+ rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g;
+ var reRegExpChars = /^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,
+ reHasRegExpChars = RegExp(reRegExpChars.source);
+ var reComboMark = /[\u0300-\u036f\ufe20-\ufe23]/g;
+ var reEscapeChar = /\\(\\)?/g;
+ var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
+ var reFlags = /\w*$/;
+ var reHasHexPrefix = /^0[xX]/;
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
+ var reIsUint = /^\d+$/;
+ var reLatin1 = /[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g;
+ var reNoMatch = /($^)/;
+ var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
+ var reWords = (function() {
+ var upper = '[A-Z\\xc0-\\xd6\\xd8-\\xde]',
+ lower = '[a-z\\xdf-\\xf6\\xf8-\\xff]+';
+
+ return RegExp(upper + '+(?=' + upper + lower + ')|' + upper + '?' + lower + '|' + upper + '+|[0-9]+', 'g');
+ }());
+ var contextProps = [
+ 'Array', 'ArrayBuffer', 'Date', 'Error', 'Float32Array', 'Float64Array',
+ 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Math', 'Number',
+ 'Object', 'RegExp', 'Set', 'String', '_', 'clearTimeout', 'isFinite',
+ 'parseFloat', 'parseInt', 'setTimeout', 'TypeError', 'Uint8Array',
+ 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap'
+ ];
+ var templateCounter = -1;
+ var typedArrayTags = {};
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
+ typedArrayTags[uint32Tag] = true;
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
+ typedArrayTags[dateTag] = typedArrayTags[errorTag] =
+ typedArrayTags[funcTag] = typedArrayTags[mapTag] =
+ typedArrayTags[numberTag] = typedArrayTags[objectTag] =
+ typedArrayTags[regexpTag] = typedArrayTags[setTag] =
+ typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
+ var cloneableTags = {};
+ cloneableTags[argsTag] = cloneableTags[arrayTag] =
+ cloneableTags[arrayBufferTag] = cloneableTags[boolTag] =
+ cloneableTags[dateTag] = cloneableTags[float32Tag] =
+ cloneableTags[float64Tag] = cloneableTags[int8Tag] =
+ cloneableTags[int16Tag] = cloneableTags[int32Tag] =
+ cloneableTags[numberTag] = cloneableTags[objectTag] =
+ cloneableTags[regexpTag] = cloneableTags[stringTag] =
+ cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
+ cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
+ cloneableTags[errorTag] = cloneableTags[funcTag] =
+ cloneableTags[mapTag] = cloneableTags[setTag] =
+ cloneableTags[weakMapTag] = false;
+ var deburredLetters = {
+ '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
+ '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
+ '\xc7': 'C', '\xe7': 'c',
+ '\xd0': 'D', '\xf0': 'd',
+ '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
+ '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
+ '\xcC': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
+ '\xeC': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
+ '\xd1': 'N', '\xf1': 'n',
+ '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
+ '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
+ '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
+ '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
+ '\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
+ '\xc6': 'Ae', '\xe6': 'ae',
+ '\xde': 'Th', '\xfe': 'th',
+ '\xdf': 'ss'
+ };
+ var htmlEscapes = {
+ '&': '&amp;',
+ '<': '&lt;',
+ '>': '&gt;',
+ '"': '&quot;',
+ "'": '&#39;',
+ '`': '&#96;'
+ };
+ var htmlUnescapes = {
+ '&amp;': '&',
+ '&lt;': '<',
+ '&gt;': '>',
+ '&quot;': '"',
+ '&#39;': "'",
+ '&#96;': '`'
+ };
+ var objectTypes = {
+ 'function': true,
+ 'object': true
+ };
+ var regexpEscapes = {
+ '0': 'x30', '1': 'x31', '2': 'x32', '3': 'x33', '4': 'x34',
+ '5': 'x35', '6': 'x36', '7': 'x37', '8': 'x38', '9': 'x39',
+ 'A': 'x41', 'B': 'x42', 'C': 'x43', 'D': 'x44', 'E': 'x45', 'F': 'x46',
+ 'a': 'x61', 'b': 'x62', 'c': 'x63', 'd': 'x64', 'e': 'x65', 'f': 'x66',
+ 'n': 'x6e', 'r': 'x72', 't': 'x74', 'u': 'x75', 'v': 'x76', 'x': 'x78'
+ };
+ var stringEscapes = {
+ '\\': '\\',
+ "'": "'",
+ '\n': 'n',
+ '\r': 'r',
+ '\u2028': 'u2028',
+ '\u2029': 'u2029'
+ };
+ var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports;
+ var freeModule = objectTypes[typeof module] && module && !module.nodeType && module;
+ var freeGlobal = freeExports && freeModule && typeof global == 'object' && global && global.Object && global;
+ var freeSelf = objectTypes[typeof self] && self && self.Object && self;
+ var freeWindow = objectTypes[typeof window] && window && window.Object && window;
+ var moduleExports = freeModule && freeModule.exports === freeExports && freeExports;
+ var root = freeGlobal || ((freeWindow !== (this && this.window)) && freeWindow) || freeSelf || this;
+ function baseCompareAscending(value, other) {
+ if (value !== other) {
+ var valIsNull = value === null,
+ valIsUndef = value === undefined,
+ valIsReflexive = value === value;
+
+ var othIsNull = other === null,
+ othIsUndef = other === undefined,
+ othIsReflexive = other === other;
+
+ if ((value > other && !othIsNull) || !valIsReflexive ||
+ (valIsNull && !othIsUndef && othIsReflexive) ||
+ (valIsUndef && othIsReflexive)) {
+ return 1;
+ }
+ if ((value < other && !valIsNull) || !othIsReflexive ||
+ (othIsNull && !valIsUndef && valIsReflexive) ||
+ (othIsUndef && valIsReflexive)) {
+ return -1;
+ }
+ }
+ return 0;
+ }
+ function baseFindIndex(array, predicate, fromRight) {
+ var length = array.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (predicate(array[index], index, array)) {
+ return index;
+ }
+ }
+ return -1;
+ }
+ function baseIndexOf(array, value, fromIndex) {
+ if (value !== value) {
+ return indexOfNaN(array, fromIndex);
+ }
+ var index = fromIndex - 1,
+ length = array.length;
+
+ while (++index < length) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+ }
+ function baseIsFunction(value) {
+ return typeof value == 'function' || false;
+ }
+ function baseToString(value) {
+ return value == null ? '' : (value + '');
+ }
+ function charsLeftIndex(string, chars) {
+ var index = -1,
+ length = string.length;
+
+ while (++index < length && chars.indexOf(string.charAt(index)) > -1) {}
+ return index;
+ }
+ function charsRightIndex(string, chars) {
+ var index = string.length;
+
+ while (index-- && chars.indexOf(string.charAt(index)) > -1) {}
+ return index;
+ }
+ function compareAscending(object, other) {
+ return baseCompareAscending(object.criteria, other.criteria) || (object.index - other.index);
+ }
+ function compareMultiple(object, other, orders) {
+ var index = -1,
+ objCriteria = object.criteria,
+ othCriteria = other.criteria,
+ length = objCriteria.length,
+ ordersLength = orders.length;
+
+ while (++index < length) {
+ var result = baseCompareAscending(objCriteria[index], othCriteria[index]);
+ if (result) {
+ if (index >= ordersLength) {
+ return result;
+ }
+ var order = orders[index];
+ return result * ((order === 'asc' || order === true) ? 1 : -1);
+ }
+ }
+ return object.index - other.index;
+ }
+ function deburrLetter(letter) {
+ return deburredLetters[letter];
+ }
+ function escapeHtmlChar(chr) {
+ return htmlEscapes[chr];
+ }
+ function escapeRegExpChar(chr, leadingChar, whitespaceChar) {
+ if (leadingChar) {
+ chr = regexpEscapes[chr];
+ } else if (whitespaceChar) {
+ chr = stringEscapes[chr];
+ }
+ return '\\' + chr;
+ }
+ function escapeStringChar(chr) {
+ return '\\' + stringEscapes[chr];
+ }
+ function indexOfNaN(array, fromIndex, fromRight) {
+ var length = array.length,
+ index = fromIndex + (fromRight ? 0 : -1);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ var other = array[index];
+ if (other !== other) {
+ return index;
+ }
+ }
+ return -1;
+ }
+ function isObjectLike(value) {
+ return !!value && typeof value == 'object';
+ }
+ function isSpace(charCode) {
+ return ((charCode <= 160 && (charCode >= 9 && charCode <= 13) || charCode == 32 || charCode == 160) || charCode == 5760 || charCode == 6158 ||
+ (charCode >= 8192 && (charCode <= 8202 || charCode == 8232 || charCode == 8233 || charCode == 8239 || charCode == 8287 || charCode == 12288 || charCode == 65279)));
+ }
+ function replaceHolders(array, placeholder) {
+ var index = -1,
+ length = array.length,
+ resIndex = -1,
+ result = [];
+
+ while (++index < length) {
+ if (array[index] === placeholder) {
+ array[index] = PLACEHOLDER;
+ result[++resIndex] = index;
+ }
+ }
+ return result;
+ }
+ function sortedUniq(array, iteratee) {
+ var seen,
+ index = -1,
+ length = array.length,
+ resIndex = -1,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value, index, array) : value;
+
+ if (!index || seen !== computed) {
+ seen = computed;
+ result[++resIndex] = value;
+ }
+ }
+ return result;
+ }
+ function trimmedLeftIndex(string) {
+ var index = -1,
+ length = string.length;
+
+ while (++index < length && isSpace(string.charCodeAt(index))) {}
+ return index;
+ }
+ function trimmedRightIndex(string) {
+ var index = string.length;
+
+ while (index-- && isSpace(string.charCodeAt(index))) {}
+ return index;
+ }
+ function unescapeHtmlChar(chr) {
+ return htmlUnescapes[chr];
+ }
+ function runInContext(context) {
+ context = context ? _.defaults(root.Object(), context, _.pick(root, contextProps)) : root;
+ var Array = context.Array,
+ Date = context.Date,
+ Error = context.Error,
+ Function = context.Function,
+ Math = context.Math,
+ Number = context.Number,
+ Object = context.Object,
+ RegExp = context.RegExp,
+ String = context.String,
+ TypeError = context.TypeError;
+ var arrayProto = Array.prototype,
+ objectProto = Object.prototype,
+ stringProto = String.prototype;
+ var fnToString = Function.prototype.toString;
+ var hasOwnProperty = objectProto.hasOwnProperty;
+ var idCounter = 0;
+ var objToString = objectProto.toString;
+ var oldDash = root._;
+ var reIsNative = RegExp('^' +
+ fnToString.call(hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g, '\\$&')
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
+ );
+ var ArrayBuffer = context.ArrayBuffer,
+ clearTimeout = context.clearTimeout,
+ parseFloat = context.parseFloat,
+ pow = Math.pow,
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
+ Set = getNative(context, 'Set'),
+ setTimeout = context.setTimeout,
+ splice = arrayProto.splice,
+ Uint8Array = context.Uint8Array,
+ WeakMap = getNative(context, 'WeakMap');
+ var nativeCeil = Math.ceil,
+ nativeCreate = getNative(Object, 'create'),
+ nativeFloor = Math.floor,
+ nativeIsArray = getNative(Array, 'isArray'),
+ nativeIsFinite = context.isFinite,
+ nativeKeys = getNative(Object, 'keys'),
+ nativeMax = Math.max,
+ nativeMin = Math.min,
+ nativeNow = getNative(Date, 'now'),
+ nativeParseInt = context.parseInt,
+ nativeRandom = Math.random;
+ var NEGATIVE_INFINITY = Number.NEGATIVE_INFINITY,
+ POSITIVE_INFINITY = Number.POSITIVE_INFINITY;
+ var MAX_ARRAY_LENGTH = 4294967295,
+ MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
+ HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
+ var MAX_SAFE_INTEGER = 9007199254740991;
+ var metaMap = WeakMap && new WeakMap;
+ var realNames = {};
+ function lodash(value) {
+ if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
+ if (value instanceof LodashWrapper) {
+ return value;
+ }
+ if (hasOwnProperty.call(value, '__chain__') && hasOwnProperty.call(value, '__wrapped__')) {
+ return wrapperClone(value);
+ }
+ }
+ return new LodashWrapper(value);
+ }
+ function baseLodash() {
+ }
+ function LodashWrapper(value, chainAll, actions) {
+ this.__wrapped__ = value;
+ this.__actions__ = actions || [];
+ this.__chain__ = !!chainAll;
+ }
+ var support = lodash.support = {};
+ lodash.templateSettings = {
+ 'escape': reEscape,
+ 'evaluate': reEvaluate,
+ 'interpolate': reInterpolate,
+ 'variable': '',
+ 'imports': {
+ '_': lodash
+ }
+ };
+ function LazyWrapper(value) {
+ this.__wrapped__ = value;
+ this.__actions__ = [];
+ this.__dir__ = 1;
+ this.__filtered__ = false;
+ this.__iteratees__ = [];
+ this.__takeCount__ = POSITIVE_INFINITY;
+ this.__views__ = [];
+ }
+ function lazyClone() {
+ var result = new LazyWrapper(this.__wrapped__);
+ result.__actions__ = arrayCopy(this.__actions__);
+ result.__dir__ = this.__dir__;
+ result.__filtered__ = this.__filtered__;
+ result.__iteratees__ = arrayCopy(this.__iteratees__);
+ result.__takeCount__ = this.__takeCount__;
+ result.__views__ = arrayCopy(this.__views__);
+ return result;
+ }
+ function lazyReverse() {
+ if (this.__filtered__) {
+ var result = new LazyWrapper(this);
+ result.__dir__ = -1;
+ result.__filtered__ = true;
+ } else {
+ result = this.clone();
+ result.__dir__ *= -1;
+ }
+ return result;
+ }
+ function lazyValue() {
+ var array = this.__wrapped__.value(),
+ dir = this.__dir__,
+ isArr = isArray(array),
+ isRight = dir < 0,
+ arrLength = isArr ? array.length : 0,
+ view = getView(0, arrLength, this.__views__),
+ start = view.start,
+ end = view.end,
+ length = end - start,
+ index = isRight ? end : (start - 1),
+ iteratees = this.__iteratees__,
+ iterLength = iteratees.length,
+ resIndex = 0,
+ takeCount = nativeMin(length, this.__takeCount__);
+
+ if (!isArr || arrLength < LARGE_ARRAY_SIZE || (arrLength == length && takeCount == length)) {
+ return baseWrapperValue((isRight && isArr) ? array.reverse() : array, this.__actions__);
+ }
+ var result = [];
+
+ outer:
+ while (length-- && resIndex < takeCount) {
+ index += dir;
+
+ var iterIndex = -1,
+ value = array[index];
+
+ while (++iterIndex < iterLength) {
+ var data = iteratees[iterIndex],
+ iteratee = data.iteratee,
+ type = data.type,
+ computed = iteratee(value);
+
+ if (type == LAZY_MAP_FLAG) {
+ value = computed;
+ } else if (!computed) {
+ if (type == LAZY_FILTER_FLAG) {
+ continue outer;
+ } else {
+ break outer;
+ }
+ }
+ }
+ result[resIndex++] = value;
+ }
+ return result;
+ }
+ function MapCache() {
+ this.__data__ = {};
+ }
+ function mapDelete(key) {
+ return this.has(key) && delete this.__data__[key];
+ }
+ function mapGet(key) {
+ return key == '__proto__' ? undefined : this.__data__[key];
+ }
+ function mapHas(key) {
+ return key != '__proto__' && hasOwnProperty.call(this.__data__, key);
+ }
+ function mapSet(key, value) {
+ if (key != '__proto__') {
+ this.__data__[key] = value;
+ }
+ return this;
+ }
+ function SetCache(values) {
+ var length = values ? values.length : 0;
+
+ this.data = { 'hash': nativeCreate(null), 'set': new Set };
+ while (length--) {
+ this.push(values[length]);
+ }
+ }
+ function cacheIndexOf(cache, value) {
+ var data = cache.data,
+ result = (typeof value == 'string' || isObject(value)) ? data.set.has(value) : data.hash[value];
+
+ return result ? 0 : -1;
+ }
+ function cachePush(value) {
+ var data = this.data;
+ if (typeof value == 'string' || isObject(value)) {
+ data.set.add(value);
+ } else {
+ data.hash[value] = true;
+ }
+ }
+ function arrayConcat(array, other) {
+ var index = -1,
+ length = array.length,
+ othIndex = -1,
+ othLength = other.length,
+ result = Array(length + othLength);
+
+ while (++index < length) {
+ result[index] = array[index];
+ }
+ while (++othIndex < othLength) {
+ result[index++] = other[othIndex];
+ }
+ return result;
+ }
+ function arrayCopy(source, array) {
+ var index = -1,
+ length = source.length;
+
+ array || (array = Array(length));
+ while (++index < length) {
+ array[index] = source[index];
+ }
+ return array;
+ }
+ function arrayEach(array, iteratee) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (iteratee(array[index], index, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+ function arrayEachRight(array, iteratee) {
+ var length = array.length;
+
+ while (length--) {
+ if (iteratee(array[length], length, array) === false) {
+ break;
+ }
+ }
+ return array;
+ }
+ function arrayEvery(array, predicate) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (!predicate(array[index], index, array)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ function arrayExtremum(array, iteratee, comparator, exValue) {
+ var index = -1,
+ length = array.length,
+ computed = exValue,
+ result = computed;
+
+ while (++index < length) {
+ var value = array[index],
+ current = +iteratee(value);
+
+ if (comparator(current, computed)) {
+ computed = current;
+ result = value;
+ }
+ }
+ return result;
+ }
+ function arrayFilter(array, predicate) {
+ var index = -1,
+ length = array.length,
+ resIndex = -1,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result[++resIndex] = value;
+ }
+ }
+ return result;
+ }
+ function arrayMap(array, iteratee) {
+ var index = -1,
+ length = array.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = iteratee(array[index], index, array);
+ }
+ return result;
+ }
+ function arrayPush(array, values) {
+ var index = -1,
+ length = values.length,
+ offset = array.length;
+
+ while (++index < length) {
+ array[offset + index] = values[index];
+ }
+ return array;
+ }
+ function arrayReduce(array, iteratee, accumulator, initFromArray) {
+ var index = -1,
+ length = array.length;
+
+ if (initFromArray && length) {
+ accumulator = array[++index];
+ }
+ while (++index < length) {
+ accumulator = iteratee(accumulator, array[index], index, array);
+ }
+ return accumulator;
+ }
+ function arrayReduceRight(array, iteratee, accumulator, initFromArray) {
+ var length = array.length;
+ if (initFromArray && length) {
+ accumulator = array[--length];
+ }
+ while (length--) {
+ accumulator = iteratee(accumulator, array[length], length, array);
+ }
+ return accumulator;
+ }
+ function arraySome(array, predicate) {
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ if (predicate(array[index], index, array)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ function arraySum(array, iteratee) {
+ var length = array.length,
+ result = 0;
+
+ while (length--) {
+ result += +iteratee(array[length]) || 0;
+ }
+ return result;
+ }
+ function assignDefaults(objectValue, sourceValue) {
+ return objectValue === undefined ? sourceValue : objectValue;
+ }
+ function assignOwnDefaults(objectValue, sourceValue, key, object) {
+ return (objectValue === undefined || !hasOwnProperty.call(object, key))
+ ? sourceValue
+ : objectValue;
+ }
+ function assignWith(object, source, customizer) {
+ var index = -1,
+ props = keys(source),
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index],
+ value = object[key],
+ result = customizer(value, source[key], key, object, source);
+
+ if ((result === result ? (result !== value) : (value === value)) ||
+ (value === undefined && !(key in object))) {
+ object[key] = result;
+ }
+ }
+ return object;
+ }
+ function baseAssign(object, source) {
+ return source == null
+ ? object
+ : baseCopy(source, keys(source), object);
+ }
+ function baseAt(collection, props) {
+ var index = -1,
+ isNil = collection == null,
+ isArr = !isNil && isArrayLike(collection),
+ length = isArr ? collection.length : 0,
+ propsLength = props.length,
+ result = Array(propsLength);
+
+ while(++index < propsLength) {
+ var key = props[index];
+ if (isArr) {
+ result[index] = isIndex(key, length) ? collection[key] : undefined;
+ } else {
+ result[index] = isNil ? undefined : collection[key];
+ }
+ }
+ return result;
+ }
+ function baseCopy(source, props, object) {
+ object || (object = {});
+
+ var index = -1,
+ length = props.length;
+
+ while (++index < length) {
+ var key = props[index];
+ object[key] = source[key];
+ }
+ return object;
+ }
+ function baseCallback(func, thisArg, argCount) {
+ var type = typeof func;
+ if (type == 'function') {
+ return thisArg === undefined
+ ? func
+ : bindCallback(func, thisArg, argCount);
+ }
+ if (func == null) {
+ return identity;
+ }
+ if (type == 'object') {
+ return baseMatches(func);
+ }
+ return thisArg === undefined
+ ? property(func)
+ : baseMatchesProperty(func, thisArg);
+ }
+ function baseClone(value, isDeep, customizer, key, object, stackA, stackB) {
+ var result;
+ if (customizer) {
+ result = object ? customizer(value, key, object) : customizer(value);
+ }
+ if (result !== undefined) {
+ return result;
+ }
+ if (!isObject(value)) {
+ return value;
+ }
+ var isArr = isArray(value);
+ if (isArr) {
+ result = initCloneArray(value);
+ if (!isDeep) {
+ return arrayCopy(value, result);
+ }
+ } else {
+ var tag = objToString.call(value),
+ isFunc = tag == funcTag;
+
+ if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
+ result = initCloneObject(isFunc ? {} : value);
+ if (!isDeep) {
+ return baseAssign(result, value);
+ }
+ } else {
+ return cloneableTags[tag]
+ ? initCloneByTag(value, tag, isDeep)
+ : (object ? value : {});
+ }
+ }
+ stackA || (stackA = []);
+ stackB || (stackB = []);
+
+ var length = stackA.length;
+ while (length--) {
+ if (stackA[length] == value) {
+ return stackB[length];
+ }
+ }
+ stackA.push(value);
+ stackB.push(result);
+ (isArr ? arrayEach : baseForOwn)(value, function(subValue, key) {
+ result[key] = baseClone(subValue, isDeep, customizer, key, value, stackA, stackB);
+ });
+ return result;
+ }
+ var baseCreate = (function() {
+ function object() {}
+ return function(prototype) {
+ if (isObject(prototype)) {
+ object.prototype = prototype;
+ var result = new object;
+ object.prototype = undefined;
+ }
+ return result || {};
+ };
+ }());
+ function baseDelay(func, wait, args) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return setTimeout(function() { func.apply(undefined, args); }, wait);
+ }
+ function baseDifference(array, values) {
+ var length = array ? array.length : 0,
+ result = [];
+
+ if (!length) {
+ return result;
+ }
+ var index = -1,
+ indexOf = getIndexOf(),
+ isCommon = indexOf == baseIndexOf,
+ cache = (isCommon && values.length >= LARGE_ARRAY_SIZE) ? createCache(values) : null,
+ valuesLength = values.length;
+
+ if (cache) {
+ indexOf = cacheIndexOf;
+ isCommon = false;
+ values = cache;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index];
+
+ if (isCommon && value === value) {
+ var valuesIndex = valuesLength;
+ while (valuesIndex--) {
+ if (values[valuesIndex] === value) {
+ continue outer;
+ }
+ }
+ result.push(value);
+ }
+ else if (indexOf(values, value, 0) < 0) {
+ result.push(value);
+ }
+ }
+ return result;
+ }
+ var baseEach = createBaseEach(baseForOwn);
+ var baseEachRight = createBaseEach(baseForOwnRight, true);
+ function baseEvery(collection, predicate) {
+ var result = true;
+ baseEach(collection, function(value, index, collection) {
+ result = !!predicate(value, index, collection);
+ return result;
+ });
+ return result;
+ }
+ function baseExtremum(collection, iteratee, comparator, exValue) {
+ var computed = exValue,
+ result = computed;
+
+ baseEach(collection, function(value, index, collection) {
+ var current = +iteratee(value, index, collection);
+ if (comparator(current, computed) || (current === exValue && current === result)) {
+ computed = current;
+ result = value;
+ }
+ });
+ return result;
+ }
+ function baseFill(array, value, start, end) {
+ var length = array.length;
+
+ start = start == null ? 0 : (+start || 0);
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = (end === undefined || end > length) ? length : (+end || 0);
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : (end >>> 0);
+ start >>>= 0;
+
+ while (start < length) {
+ array[start++] = value;
+ }
+ return array;
+ }
+ function baseFilter(collection, predicate) {
+ var result = [];
+ baseEach(collection, function(value, index, collection) {
+ if (predicate(value, index, collection)) {
+ result.push(value);
+ }
+ });
+ return result;
+ }
+ function baseFind(collection, predicate, eachFunc, retKey) {
+ var result;
+ eachFunc(collection, function(value, key, collection) {
+ if (predicate(value, key, collection)) {
+ result = retKey ? key : value;
+ return false;
+ }
+ });
+ return result;
+ }
+ function baseFlatten(array, isDeep, isStrict, result) {
+ result || (result = []);
+
+ var index = -1,
+ length = array.length;
+
+ while (++index < length) {
+ var value = array[index];
+ if (isObjectLike(value) && isArrayLike(value) &&
+ (isStrict || isArray(value) || isArguments(value))) {
+ if (isDeep) {
+ baseFlatten(value, isDeep, isStrict, result);
+ } else {
+ arrayPush(result, value);
+ }
+ } else if (!isStrict) {
+ result[result.length] = value;
+ }
+ }
+ return result;
+ }
+ var baseFor = createBaseFor();
+ var baseForRight = createBaseFor(true);
+ function baseForIn(object, iteratee) {
+ return baseFor(object, iteratee, keysIn);
+ }
+ function baseForOwn(object, iteratee) {
+ return baseFor(object, iteratee, keys);
+ }
+ function baseForOwnRight(object, iteratee) {
+ return baseForRight(object, iteratee, keys);
+ }
+ function baseFunctions(object, props) {
+ var index = -1,
+ length = props.length,
+ resIndex = -1,
+ result = [];
+
+ while (++index < length) {
+ var key = props[index];
+ if (isFunction(object[key])) {
+ result[++resIndex] = key;
+ }
+ }
+ return result;
+ }
+ function baseGet(object, path, pathKey) {
+ if (object == null) {
+ return;
+ }
+ if (pathKey !== undefined && pathKey in toObject(object)) {
+ path = [pathKey];
+ }
+ var index = 0,
+ length = path.length;
+
+ while (object != null && index < length) {
+ object = object[path[index++]];
+ }
+ return (index && index == length) ? object : undefined;
+ }
+ function baseIsEqual(value, other, customizer, isLoose, stackA, stackB) {
+ if (value === other) {
+ return true;
+ }
+ if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
+ return value !== value && other !== other;
+ }
+ return baseIsEqualDeep(value, other, baseIsEqual, customizer, isLoose, stackA, stackB);
+ }
+ function baseIsEqualDeep(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
+ var objIsArr = isArray(object),
+ othIsArr = isArray(other),
+ objTag = arrayTag,
+ othTag = arrayTag;
+
+ if (!objIsArr) {
+ objTag = objToString.call(object);
+ if (objTag == argsTag) {
+ objTag = objectTag;
+ } else if (objTag != objectTag) {
+ objIsArr = isTypedArray(object);
+ }
+ }
+ if (!othIsArr) {
+ othTag = objToString.call(other);
+ if (othTag == argsTag) {
+ othTag = objectTag;
+ } else if (othTag != objectTag) {
+ othIsArr = isTypedArray(other);
+ }
+ }
+ var objIsObj = objTag == objectTag,
+ othIsObj = othTag == objectTag,
+ isSameTag = objTag == othTag;
+
+ if (isSameTag && !(objIsArr || objIsObj)) {
+ return equalByTag(object, other, objTag);
+ }
+ if (!isLoose) {
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
+
+ if (objIsWrapped || othIsWrapped) {
+ return equalFunc(objIsWrapped ? object.value() : object, othIsWrapped ? other.value() : other, customizer, isLoose, stackA, stackB);
+ }
+ }
+ if (!isSameTag) {
+ return false;
+ }
+ stackA || (stackA = []);
+ stackB || (stackB = []);
+
+ var length = stackA.length;
+ while (length--) {
+ if (stackA[length] == object) {
+ return stackB[length] == other;
+ }
+ }
+ stackA.push(object);
+ stackB.push(other);
+
+ var result = (objIsArr ? equalArrays : equalObjects)(object, other, equalFunc, customizer, isLoose, stackA, stackB);
+
+ stackA.pop();
+ stackB.pop();
+
+ return result;
+ }
+ function baseIsMatch(object, matchData, customizer) {
+ var index = matchData.length,
+ length = index,
+ noCustomizer = !customizer;
+
+ if (object == null) {
+ return !length;
+ }
+ object = toObject(object);
+ while (index--) {
+ var data = matchData[index];
+ if ((noCustomizer && data[2])
+ ? data[1] !== object[data[0]]
+ : !(data[0] in object)
+ ) {
+ return false;
+ }
+ }
+ while (++index < length) {
+ data = matchData[index];
+ var key = data[0],
+ objValue = object[key],
+ srcValue = data[1];
+
+ if (noCustomizer && data[2]) {
+ if (objValue === undefined && !(key in object)) {
+ return false;
+ }
+ } else {
+ var result = customizer ? customizer(objValue, srcValue, key) : undefined;
+ if (!(result === undefined ? baseIsEqual(srcValue, objValue, customizer, true) : result)) {
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+ function baseMap(collection, iteratee) {
+ var index = -1,
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value, key, collection) {
+ result[++index] = iteratee(value, key, collection);
+ });
+ return result;
+ }
+ function baseMatches(source) {
+ var matchData = getMatchData(source);
+ if (matchData.length == 1 && matchData[0][2]) {
+ var key = matchData[0][0],
+ value = matchData[0][1];
+
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ return object[key] === value && (value !== undefined || (key in toObject(object)));
+ };
+ }
+ return function(object) {
+ return baseIsMatch(object, matchData);
+ };
+ }
+ function baseMatchesProperty(path, srcValue) {
+ var isArr = isArray(path),
+ isCommon = isKey(path) && isStrictComparable(srcValue),
+ pathKey = (path + '');
+
+ path = toPath(path);
+ return function(object) {
+ if (object == null) {
+ return false;
+ }
+ var key = pathKey;
+ object = toObject(object);
+ if ((isArr || !isCommon) && !(key in object)) {
+ object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ if (object == null) {
+ return false;
+ }
+ key = last(path);
+ object = toObject(object);
+ }
+ return object[key] === srcValue
+ ? (srcValue !== undefined || (key in object))
+ : baseIsEqual(srcValue, object[key], undefined, true);
+ };
+ }
+ function baseMerge(object, source, customizer, stackA, stackB) {
+ if (!isObject(object)) {
+ return object;
+ }
+ var isSrcArr = isArrayLike(source) && (isArray(source) || isTypedArray(source)),
+ props = isSrcArr ? undefined : keys(source);
+
+ arrayEach(props || source, function(srcValue, key) {
+ if (props) {
+ key = srcValue;
+ srcValue = source[key];
+ }
+ if (isObjectLike(srcValue)) {
+ stackA || (stackA = []);
+ stackB || (stackB = []);
+ baseMergeDeep(object, source, key, baseMerge, customizer, stackA, stackB);
+ }
+ else {
+ var value = object[key],
+ result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
+ isCommon = result === undefined;
+
+ if (isCommon) {
+ result = srcValue;
+ }
+ if ((result !== undefined || (isSrcArr && !(key in object))) &&
+ (isCommon || (result === result ? (result !== value) : (value === value)))) {
+ object[key] = result;
+ }
+ }
+ });
+ return object;
+ }
+ function baseMergeDeep(object, source, key, mergeFunc, customizer, stackA, stackB) {
+ var length = stackA.length,
+ srcValue = source[key];
+
+ while (length--) {
+ if (stackA[length] == srcValue) {
+ object[key] = stackB[length];
+ return;
+ }
+ }
+ var value = object[key],
+ result = customizer ? customizer(value, srcValue, key, object, source) : undefined,
+ isCommon = result === undefined;
+
+ if (isCommon) {
+ result = srcValue;
+ if (isArrayLike(srcValue) && (isArray(srcValue) || isTypedArray(srcValue))) {
+ result = isArray(value)
+ ? value
+ : (isArrayLike(value) ? arrayCopy(value) : []);
+ }
+ else if (isPlainObject(srcValue) || isArguments(srcValue)) {
+ result = isArguments(value)
+ ? toPlainObject(value)
+ : (isPlainObject(value) ? value : {});
+ }
+ else {
+ isCommon = false;
+ }
+ }
+ stackA.push(srcValue);
+ stackB.push(result);
+
+ if (isCommon) {
+ object[key] = mergeFunc(result, srcValue, customizer, stackA, stackB);
+ } else if (result === result ? (result !== value) : (value === value)) {
+ object[key] = result;
+ }
+ }
+ function baseProperty(key) {
+ return function(object) {
+ return object == null ? undefined : object[key];
+ };
+ }
+ function basePropertyDeep(path) {
+ var pathKey = (path + '');
+ path = toPath(path);
+ return function(object) {
+ return baseGet(object, path, pathKey);
+ };
+ }
+ function basePullAt(array, indexes) {
+ var length = array ? indexes.length : 0;
+ while (length--) {
+ var index = indexes[length];
+ if (index != previous && isIndex(index)) {
+ var previous = index;
+ splice.call(array, index, 1);
+ }
+ }
+ return array;
+ }
+ function baseRandom(min, max) {
+ return min + nativeFloor(nativeRandom() * (max - min + 1));
+ }
+ function baseReduce(collection, iteratee, accumulator, initFromCollection, eachFunc) {
+ eachFunc(collection, function(value, index, collection) {
+ accumulator = initFromCollection
+ ? (initFromCollection = false, value)
+ : iteratee(accumulator, value, index, collection);
+ });
+ return accumulator;
+ }
+ var baseSetData = !metaMap ? identity : function(func, data) {
+ metaMap.set(func, data);
+ return func;
+ };
+ function baseSlice(array, start, end) {
+ var index = -1,
+ length = array.length;
+
+ start = start == null ? 0 : (+start || 0);
+ if (start < 0) {
+ start = -start > length ? 0 : (length + start);
+ }
+ end = (end === undefined || end > length) ? length : (+end || 0);
+ if (end < 0) {
+ end += length;
+ }
+ length = start > end ? 0 : ((end - start) >>> 0);
+ start >>>= 0;
+
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = array[index + start];
+ }
+ return result;
+ }
+ function baseSome(collection, predicate) {
+ var result;
+
+ baseEach(collection, function(value, index, collection) {
+ result = predicate(value, index, collection);
+ return !result;
+ });
+ return !!result;
+ }
+ function baseSortBy(array, comparer) {
+ var length = array.length;
+
+ array.sort(comparer);
+ while (length--) {
+ array[length] = array[length].value;
+ }
+ return array;
+ }
+ function baseSortByOrder(collection, iteratees, orders) {
+ var callback = getCallback(),
+ index = -1;
+
+ iteratees = arrayMap(iteratees, function(iteratee) { return callback(iteratee); });
+
+ var result = baseMap(collection, function(value) {
+ var criteria = arrayMap(iteratees, function(iteratee) { return iteratee(value); });
+ return { 'criteria': criteria, 'index': ++index, 'value': value };
+ });
+
+ return baseSortBy(result, function(object, other) {
+ return compareMultiple(object, other, orders);
+ });
+ }
+ function baseSum(collection, iteratee) {
+ var result = 0;
+ baseEach(collection, function(value, index, collection) {
+ result += +iteratee(value, index, collection) || 0;
+ });
+ return result;
+ }
+ function baseUniq(array, iteratee) {
+ var index = -1,
+ indexOf = getIndexOf(),
+ length = array.length,
+ isCommon = indexOf == baseIndexOf,
+ isLarge = isCommon && length >= LARGE_ARRAY_SIZE,
+ seen = isLarge ? createCache() : null,
+ result = [];
+
+ if (seen) {
+ indexOf = cacheIndexOf;
+ isCommon = false;
+ } else {
+ isLarge = false;
+ seen = iteratee ? [] : result;
+ }
+ outer:
+ while (++index < length) {
+ var value = array[index],
+ computed = iteratee ? iteratee(value, index, array) : value;
+
+ if (isCommon && value === value) {
+ var seenIndex = seen.length;
+ while (seenIndex--) {
+ if (seen[seenIndex] === computed) {
+ continue outer;
+ }
+ }
+ if (iteratee) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ else if (indexOf(seen, computed, 0) < 0) {
+ if (iteratee || isLarge) {
+ seen.push(computed);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ }
+ function baseValues(object, props) {
+ var index = -1,
+ length = props.length,
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = object[props[index]];
+ }
+ return result;
+ }
+ function baseWhile(array, predicate, isDrop, fromRight) {
+ var length = array.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {}
+ return isDrop
+ ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
+ : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
+ }
+ function baseWrapperValue(value, actions) {
+ var result = value;
+ if (result instanceof LazyWrapper) {
+ result = result.value();
+ }
+ var index = -1,
+ length = actions.length;
+
+ while (++index < length) {
+ var action = actions[index];
+ result = action.func.apply(action.thisArg, arrayPush([result], action.args));
+ }
+ return result;
+ }
+ function binaryIndex(array, value, retHighest) {
+ var low = 0,
+ high = array ? array.length : low;
+
+ if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
+ while (low < high) {
+ var mid = (low + high) >>> 1,
+ computed = array[mid];
+
+ if ((retHighest ? (computed <= value) : (computed < value)) && computed !== null) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return high;
+ }
+ return binaryIndexBy(array, value, identity, retHighest);
+ }
+ function binaryIndexBy(array, value, iteratee, retHighest) {
+ value = iteratee(value);
+
+ var low = 0,
+ high = array ? array.length : 0,
+ valIsNaN = value !== value,
+ valIsNull = value === null,
+ valIsUndef = value === undefined;
+
+ while (low < high) {
+ var mid = nativeFloor((low + high) / 2),
+ computed = iteratee(array[mid]),
+ isDef = computed !== undefined,
+ isReflexive = computed === computed;
+
+ if (valIsNaN) {
+ var setLow = isReflexive || retHighest;
+ } else if (valIsNull) {
+ setLow = isReflexive && isDef && (retHighest || computed != null);
+ } else if (valIsUndef) {
+ setLow = isReflexive && (retHighest || isDef);
+ } else if (computed == null) {
+ setLow = false;
+ } else {
+ setLow = retHighest ? (computed <= value) : (computed < value);
+ }
+ if (setLow) {
+ low = mid + 1;
+ } else {
+ high = mid;
+ }
+ }
+ return nativeMin(high, MAX_ARRAY_INDEX);
+ }
+ function bindCallback(func, thisArg, argCount) {
+ if (typeof func != 'function') {
+ return identity;
+ }
+ if (thisArg === undefined) {
+ return func;
+ }
+ switch (argCount) {
+ case 1: return function(value) {
+ return func.call(thisArg, value);
+ };
+ case 3: return function(value, index, collection) {
+ return func.call(thisArg, value, index, collection);
+ };
+ case 4: return function(accumulator, value, index, collection) {
+ return func.call(thisArg, accumulator, value, index, collection);
+ };
+ case 5: return function(value, other, key, object, source) {
+ return func.call(thisArg, value, other, key, object, source);
+ };
+ }
+ return function() {
+ return func.apply(thisArg, arguments);
+ };
+ }
+ function bufferClone(buffer) {
+ var result = new ArrayBuffer(buffer.byteLength),
+ view = new Uint8Array(result);
+
+ view.set(new Uint8Array(buffer));
+ return result;
+ }
+ function composeArgs(args, partials, holders) {
+ var holdersLength = holders.length,
+ argsIndex = -1,
+ argsLength = nativeMax(args.length - holdersLength, 0),
+ leftIndex = -1,
+ leftLength = partials.length,
+ result = Array(leftLength + argsLength);
+
+ while (++leftIndex < leftLength) {
+ result[leftIndex] = partials[leftIndex];
+ }
+ while (++argsIndex < holdersLength) {
+ result[holders[argsIndex]] = args[argsIndex];
+ }
+ while (argsLength--) {
+ result[leftIndex++] = args[argsIndex++];
+ }
+ return result;
+ }
+ function composeArgsRight(args, partials, holders) {
+ var holdersIndex = -1,
+ holdersLength = holders.length,
+ argsIndex = -1,
+ argsLength = nativeMax(args.length - holdersLength, 0),
+ rightIndex = -1,
+ rightLength = partials.length,
+ result = Array(argsLength + rightLength);
+
+ while (++argsIndex < argsLength) {
+ result[argsIndex] = args[argsIndex];
+ }
+ var offset = argsIndex;
+ while (++rightIndex < rightLength) {
+ result[offset + rightIndex] = partials[rightIndex];
+ }
+ while (++holdersIndex < holdersLength) {
+ result[offset + holders[holdersIndex]] = args[argsIndex++];
+ }
+ return result;
+ }
+ function createAggregator(setter, initializer) {
+ return function(collection, iteratee, thisArg) {
+ var result = initializer ? initializer() : {};
+ iteratee = getCallback(iteratee, thisArg, 3);
+
+ if (isArray(collection)) {
+ var index = -1,
+ length = collection.length;
+
+ while (++index < length) {
+ var value = collection[index];
+ setter(result, value, iteratee(value, index, collection), collection);
+ }
+ } else {
+ baseEach(collection, function(value, key, collection) {
+ setter(result, value, iteratee(value, key, collection), collection);
+ });
+ }
+ return result;
+ };
+ }
+ function createAssigner(assigner) {
+ return restParam(function(object, sources) {
+ var index = -1,
+ length = object == null ? 0 : sources.length,
+ customizer = length > 2 ? sources[length - 2] : undefined,
+ guard = length > 2 ? sources[2] : undefined,
+ thisArg = length > 1 ? sources[length - 1] : undefined;
+
+ if (typeof customizer == 'function') {
+ customizer = bindCallback(customizer, thisArg, 5);
+ length -= 2;
+ } else {
+ customizer = typeof thisArg == 'function' ? thisArg : undefined;
+ length -= (customizer ? 1 : 0);
+ }
+ if (guard && isIterateeCall(sources[0], sources[1], guard)) {
+ customizer = length < 3 ? undefined : customizer;
+ length = 1;
+ }
+ while (++index < length) {
+ var source = sources[index];
+ if (source) {
+ assigner(object, source, customizer);
+ }
+ }
+ return object;
+ });
+ }
+ function createBaseEach(eachFunc, fromRight) {
+ return function(collection, iteratee) {
+ var length = collection ? getLength(collection) : 0;
+ if (!isLength(length)) {
+ return eachFunc(collection, iteratee);
+ }
+ var index = fromRight ? length : -1,
+ iterable = toObject(collection);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ if (iteratee(iterable[index], index, iterable) === false) {
+ break;
+ }
+ }
+ return collection;
+ };
+ }
+ function createBaseFor(fromRight) {
+ return function(object, iteratee, keysFunc) {
+ var iterable = toObject(object),
+ props = keysFunc(object),
+ length = props.length,
+ index = fromRight ? length : -1;
+
+ while ((fromRight ? index-- : ++index < length)) {
+ var key = props[index];
+ if (iteratee(iterable[key], key, iterable) === false) {
+ break;
+ }
+ }
+ return object;
+ };
+ }
+ function createBindWrapper(func, thisArg) {
+ var Ctor = createCtorWrapper(func);
+
+ function wrapper() {
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return fn.apply(thisArg, arguments);
+ }
+ return wrapper;
+ }
+ function createCache(values) {
+ return (nativeCreate && Set) ? new SetCache(values) : null;
+ }
+ function createCompounder(callback) {
+ return function(string) {
+ var index = -1,
+ array = words(deburr(string)),
+ length = array.length,
+ result = '';
+
+ while (++index < length) {
+ result = callback(result, array[index], index);
+ }
+ return result;
+ };
+ }
+ function createCtorWrapper(Ctor) {
+ return function() {
+ var args = arguments;
+ switch (args.length) {
+ case 0: return new Ctor;
+ case 1: return new Ctor(args[0]);
+ case 2: return new Ctor(args[0], args[1]);
+ case 3: return new Ctor(args[0], args[1], args[2]);
+ case 4: return new Ctor(args[0], args[1], args[2], args[3]);
+ case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
+ case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
+ case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
+ }
+ var thisBinding = baseCreate(Ctor.prototype),
+ result = Ctor.apply(thisBinding, args);
+ return isObject(result) ? result : thisBinding;
+ };
+ }
+ function createCurry(flag) {
+ function curryFunc(func, arity, guard) {
+ if (guard && isIterateeCall(func, arity, guard)) {
+ arity = undefined;
+ }
+ var result = createWrapper(func, flag, undefined, undefined, undefined, undefined, undefined, arity);
+ result.placeholder = curryFunc.placeholder;
+ return result;
+ }
+ return curryFunc;
+ }
+ function createDefaults(assigner, customizer) {
+ return restParam(function(args) {
+ var object = args[0];
+ if (object == null) {
+ return object;
+ }
+ args.push(customizer);
+ return assigner.apply(undefined, args);
+ });
+ }
+ function createExtremum(comparator, exValue) {
+ return function(collection, iteratee, thisArg) {
+ if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
+ iteratee = undefined;
+ }
+ iteratee = getCallback(iteratee, thisArg, 3);
+ if (iteratee.length == 1) {
+ collection = isArray(collection) ? collection : toIterable(collection);
+ var result = arrayExtremum(collection, iteratee, comparator, exValue);
+ if (!(collection.length && result === exValue)) {
+ return result;
+ }
+ }
+ return baseExtremum(collection, iteratee, comparator, exValue);
+ };
+ }
+ function createFind(eachFunc, fromRight) {
+ return function(collection, predicate, thisArg) {
+ predicate = getCallback(predicate, thisArg, 3);
+ if (isArray(collection)) {
+ var index = baseFindIndex(collection, predicate, fromRight);
+ return index > -1 ? collection[index] : undefined;
+ }
+ return baseFind(collection, predicate, eachFunc);
+ };
+ }
+ function createFindIndex(fromRight) {
+ return function(array, predicate, thisArg) {
+ if (!(array && array.length)) {
+ return -1;
+ }
+ predicate = getCallback(predicate, thisArg, 3);
+ return baseFindIndex(array, predicate, fromRight);
+ };
+ }
+ function createFindKey(objectFunc) {
+ return function(object, predicate, thisArg) {
+ predicate = getCallback(predicate, thisArg, 3);
+ return baseFind(object, predicate, objectFunc, true);
+ };
+ }
+ function createFlow(fromRight) {
+ return function() {
+ var wrapper,
+ length = arguments.length,
+ index = fromRight ? length : -1,
+ leftIndex = 0,
+ funcs = Array(length);
+
+ while ((fromRight ? index-- : ++index < length)) {
+ var func = funcs[leftIndex++] = arguments[index];
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (!wrapper && LodashWrapper.prototype.thru && getFuncName(func) == 'wrapper') {
+ wrapper = new LodashWrapper([], true);
+ }
+ }
+ index = wrapper ? -1 : length;
+ while (++index < length) {
+ func = funcs[index];
+
+ var funcName = getFuncName(func),
+ data = funcName == 'wrapper' ? getData(func) : undefined;
+
+ if (data && isLaziable(data[0]) && data[1] == (ARY_FLAG | CURRY_FLAG | PARTIAL_FLAG | REARG_FLAG) && !data[4].length && data[9] == 1) {
+ wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
+ } else {
+ wrapper = (func.length == 1 && isLaziable(func)) ? wrapper[funcName]() : wrapper.thru(func);
+ }
+ }
+ return function() {
+ var args = arguments,
+ value = args[0];
+
+ if (wrapper && args.length == 1 && isArray(value) && value.length >= LARGE_ARRAY_SIZE) {
+ return wrapper.plant(value).value();
+ }
+ var index = 0,
+ result = length ? funcs[index].apply(this, args) : value;
+
+ while (++index < length) {
+ result = funcs[index].call(this, result);
+ }
+ return result;
+ };
+ };
+ }
+ function createForEach(arrayFunc, eachFunc) {
+ return function(collection, iteratee, thisArg) {
+ return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection))
+ ? arrayFunc(collection, iteratee)
+ : eachFunc(collection, bindCallback(iteratee, thisArg, 3));
+ };
+ }
+ function createForIn(objectFunc) {
+ return function(object, iteratee, thisArg) {
+ if (typeof iteratee != 'function' || thisArg !== undefined) {
+ iteratee = bindCallback(iteratee, thisArg, 3);
+ }
+ return objectFunc(object, iteratee, keysIn);
+ };
+ }
+ function createForOwn(objectFunc) {
+ return function(object, iteratee, thisArg) {
+ if (typeof iteratee != 'function' || thisArg !== undefined) {
+ iteratee = bindCallback(iteratee, thisArg, 3);
+ }
+ return objectFunc(object, iteratee);
+ };
+ }
+ function createObjectMapper(isMapKeys) {
+ return function(object, iteratee, thisArg) {
+ var result = {};
+ iteratee = getCallback(iteratee, thisArg, 3);
+
+ baseForOwn(object, function(value, key, object) {
+ var mapped = iteratee(value, key, object);
+ key = isMapKeys ? mapped : key;
+ value = isMapKeys ? value : mapped;
+ result[key] = value;
+ });
+ return result;
+ };
+ }
+ function createPadDir(fromRight) {
+ return function(string, length, chars) {
+ string = baseToString(string);
+ return (fromRight ? string : '') + createPadding(string, length, chars) + (fromRight ? '' : string);
+ };
+ }
+ function createPartial(flag) {
+ var partialFunc = restParam(function(func, partials) {
+ var holders = replaceHolders(partials, partialFunc.placeholder);
+ return createWrapper(func, flag, undefined, partials, holders);
+ });
+ return partialFunc;
+ }
+ function createReduce(arrayFunc, eachFunc) {
+ return function(collection, iteratee, accumulator, thisArg) {
+ var initFromArray = arguments.length < 3;
+ return (typeof iteratee == 'function' && thisArg === undefined && isArray(collection))
+ ? arrayFunc(collection, iteratee, accumulator, initFromArray)
+ : baseReduce(collection, getCallback(iteratee, thisArg, 4), accumulator, initFromArray, eachFunc);
+ };
+ }
+ function createHybridWrapper(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
+ var isAry = bitmask & ARY_FLAG,
+ isBind = bitmask & BIND_FLAG,
+ isBindKey = bitmask & BIND_KEY_FLAG,
+ isCurry = bitmask & CURRY_FLAG,
+ isCurryBound = bitmask & CURRY_BOUND_FLAG,
+ isCurryRight = bitmask & CURRY_RIGHT_FLAG,
+ Ctor = isBindKey ? undefined : createCtorWrapper(func);
+
+ function wrapper() {
+ var length = arguments.length,
+ index = length,
+ args = Array(length);
+
+ while (index--) {
+ args[index] = arguments[index];
+ }
+ if (partials) {
+ args = composeArgs(args, partials, holders);
+ }
+ if (partialsRight) {
+ args = composeArgsRight(args, partialsRight, holdersRight);
+ }
+ if (isCurry || isCurryRight) {
+ var placeholder = wrapper.placeholder,
+ argsHolders = replaceHolders(args, placeholder);
+
+ length -= argsHolders.length;
+ if (length < arity) {
+ var newArgPos = argPos ? arrayCopy(argPos) : undefined,
+ newArity = nativeMax(arity - length, 0),
+ newsHolders = isCurry ? argsHolders : undefined,
+ newHoldersRight = isCurry ? undefined : argsHolders,
+ newPartials = isCurry ? args : undefined,
+ newPartialsRight = isCurry ? undefined : args;
+
+ bitmask |= (isCurry ? PARTIAL_FLAG : PARTIAL_RIGHT_FLAG);
+ bitmask &= ~(isCurry ? PARTIAL_RIGHT_FLAG : PARTIAL_FLAG);
+
+ if (!isCurryBound) {
+ bitmask &= ~(BIND_FLAG | BIND_KEY_FLAG);
+ }
+ var newData = [func, bitmask, thisArg, newPartials, newsHolders, newPartialsRight, newHoldersRight, newArgPos, ary, newArity],
+ result = createHybridWrapper.apply(undefined, newData);
+
+ if (isLaziable(func)) {
+ setData(result, newData);
+ }
+ result.placeholder = placeholder;
+ return result;
+ }
+ }
+ var thisBinding = isBind ? thisArg : this,
+ fn = isBindKey ? thisBinding[func] : func;
+
+ if (argPos) {
+ args = reorder(args, argPos);
+ }
+ if (isAry && ary < args.length) {
+ args.length = ary;
+ }
+ if (this && this !== root && this instanceof wrapper) {
+ fn = Ctor || createCtorWrapper(func);
+ }
+ return fn.apply(thisBinding, args);
+ }
+ return wrapper;
+ }
+ function createPadding(string, length, chars) {
+ var strLength = string.length;
+ length = +length;
+
+ if (strLength >= length || !nativeIsFinite(length)) {
+ return '';
+ }
+ var padLength = length - strLength;
+ chars = chars == null ? ' ' : (chars + '');
+ return repeat(chars, nativeCeil(padLength / chars.length)).slice(0, padLength);
+ }
+ function createPartialWrapper(func, bitmask, thisArg, partials) {
+ var isBind = bitmask & BIND_FLAG,
+ Ctor = createCtorWrapper(func);
+
+ function wrapper() {
+ var argsIndex = -1,
+ argsLength = arguments.length,
+ leftIndex = -1,
+ leftLength = partials.length,
+ args = Array(leftLength + argsLength);
+
+ while (++leftIndex < leftLength) {
+ args[leftIndex] = partials[leftIndex];
+ }
+ while (argsLength--) {
+ args[leftIndex++] = arguments[++argsIndex];
+ }
+ var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
+ return fn.apply(isBind ? thisArg : this, args);
+ }
+ return wrapper;
+ }
+ function createRound(methodName) {
+ var func = Math[methodName];
+ return function(number, precision) {
+ precision = precision === undefined ? 0 : (+precision || 0);
+ if (precision) {
+ precision = pow(10, precision);
+ return func(number * precision) / precision;
+ }
+ return func(number);
+ };
+ }
+ function createSortedIndex(retHighest) {
+ return function(array, value, iteratee, thisArg) {
+ var callback = getCallback(iteratee);
+ return (iteratee == null && callback === baseCallback)
+ ? binaryIndex(array, value, retHighest)
+ : binaryIndexBy(array, value, callback(iteratee, thisArg, 1), retHighest);
+ };
+ }
+ function createWrapper(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
+ var isBindKey = bitmask & BIND_KEY_FLAG;
+ if (!isBindKey && typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var length = partials ? partials.length : 0;
+ if (!length) {
+ bitmask &= ~(PARTIAL_FLAG | PARTIAL_RIGHT_FLAG);
+ partials = holders = undefined;
+ }
+ length -= (holders ? holders.length : 0);
+ if (bitmask & PARTIAL_RIGHT_FLAG) {
+ var partialsRight = partials,
+ holdersRight = holders;
+
+ partials = holders = undefined;
+ }
+ var data = isBindKey ? undefined : getData(func),
+ newData = [func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity];
+
+ if (data) {
+ mergeData(newData, data);
+ bitmask = newData[1];
+ arity = newData[9];
+ }
+ newData[9] = arity == null
+ ? (isBindKey ? 0 : func.length)
+ : (nativeMax(arity - length, 0) || 0);
+
+ if (bitmask == BIND_FLAG) {
+ var result = createBindWrapper(newData[0], newData[2]);
+ } else if ((bitmask == PARTIAL_FLAG || bitmask == (BIND_FLAG | PARTIAL_FLAG)) && !newData[4].length) {
+ result = createPartialWrapper.apply(undefined, newData);
+ } else {
+ result = createHybridWrapper.apply(undefined, newData);
+ }
+ var setter = data ? baseSetData : setData;
+ return setter(result, newData);
+ }
+ function equalArrays(array, other, equalFunc, customizer, isLoose, stackA, stackB) {
+ var index = -1,
+ arrLength = array.length,
+ othLength = other.length;
+
+ if (arrLength != othLength && !(isLoose && othLength > arrLength)) {
+ return false;
+ }
+ while (++index < arrLength) {
+ var arrValue = array[index],
+ othValue = other[index],
+ result = customizer ? customizer(isLoose ? othValue : arrValue, isLoose ? arrValue : othValue, index) : undefined;
+
+ if (result !== undefined) {
+ if (result) {
+ continue;
+ }
+ return false;
+ }
+ if (isLoose) {
+ if (!arraySome(other, function(othValue) {
+ return arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB);
+ })) {
+ return false;
+ }
+ } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, customizer, isLoose, stackA, stackB))) {
+ return false;
+ }
+ }
+ return true;
+ }
+ function equalByTag(object, other, tag) {
+ switch (tag) {
+ case boolTag:
+ case dateTag:
+ return +object == +other;
+
+ case errorTag:
+ return object.name == other.name && object.message == other.message;
+
+ case numberTag:
+ return (object != +object)
+ ? other != +other
+ : object == +other;
+
+ case regexpTag:
+ case stringTag:
+ return object == (other + '');
+ }
+ return false;
+ }
+ function equalObjects(object, other, equalFunc, customizer, isLoose, stackA, stackB) {
+ var objProps = keys(object),
+ objLength = objProps.length,
+ othProps = keys(other),
+ othLength = othProps.length;
+
+ if (objLength != othLength && !isLoose) {
+ return false;
+ }
+ var index = objLength;
+ while (index--) {
+ var key = objProps[index];
+ if (!(isLoose ? key in other : hasOwnProperty.call(other, key))) {
+ return false;
+ }
+ }
+ var skipCtor = isLoose;
+ while (++index < objLength) {
+ key = objProps[index];
+ var objValue = object[key],
+ othValue = other[key],
+ result = customizer ? customizer(isLoose ? othValue : objValue, isLoose? objValue : othValue, key) : undefined;
+ if (!(result === undefined ? equalFunc(objValue, othValue, customizer, isLoose, stackA, stackB) : result)) {
+ return false;
+ }
+ skipCtor || (skipCtor = key == 'constructor');
+ }
+ if (!skipCtor) {
+ var objCtor = object.constructor,
+ othCtor = other.constructor;
+ if (objCtor != othCtor &&
+ ('constructor' in object && 'constructor' in other) &&
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
+ return false;
+ }
+ }
+ return true;
+ }
+ function getCallback(func, thisArg, argCount) {
+ var result = lodash.callback || callback;
+ result = result === callback ? baseCallback : result;
+ return argCount ? result(func, thisArg, argCount) : result;
+ }
+ var getData = !metaMap ? noop : function(func) {
+ return metaMap.get(func);
+ };
+ function getFuncName(func) {
+ var result = func.name,
+ array = realNames[result],
+ length = array ? array.length : 0;
+
+ while (length--) {
+ var data = array[length],
+ otherFunc = data.func;
+ if (otherFunc == null || otherFunc == func) {
+ return data.name;
+ }
+ }
+ return result;
+ }
+ function getIndexOf(collection, target, fromIndex) {
+ var result = lodash.indexOf || indexOf;
+ result = result === indexOf ? baseIndexOf : result;
+ return collection ? result(collection, target, fromIndex) : result;
+ }
+ var getLength = baseProperty('length');
+ function getMatchData(object) {
+ var result = pairs(object),
+ length = result.length;
+
+ while (length--) {
+ result[length][2] = isStrictComparable(result[length][1]);
+ }
+ return result;
+ }
+ function getNative(object, key) {
+ var value = object == null ? undefined : object[key];
+ return isNative(value) ? value : undefined;
+ }
+ function getView(start, end, transforms) {
+ var index = -1,
+ length = transforms.length;
+
+ while (++index < length) {
+ var data = transforms[index],
+ size = data.size;
+
+ switch (data.type) {
+ case 'drop': start += size; break;
+ case 'dropRight': end -= size; break;
+ case 'take': end = nativeMin(end, start + size); break;
+ case 'takeRight': start = nativeMax(start, end - size); break;
+ }
+ }
+ return { 'start': start, 'end': end };
+ }
+ function initCloneArray(array) {
+ var length = array.length,
+ result = new array.constructor(length);
+ if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
+ result.index = array.index;
+ result.input = array.input;
+ }
+ return result;
+ }
+ function initCloneObject(object) {
+ var Ctor = object.constructor;
+ if (!(typeof Ctor == 'function' && Ctor instanceof Ctor)) {
+ Ctor = Object;
+ }
+ return new Ctor;
+ }
+ function initCloneByTag(object, tag, isDeep) {
+ var Ctor = object.constructor;
+ switch (tag) {
+ case arrayBufferTag:
+ return bufferClone(object);
+
+ case boolTag:
+ case dateTag:
+ return new Ctor(+object);
+
+ case float32Tag: case float64Tag:
+ case int8Tag: case int16Tag: case int32Tag:
+ case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
+ var buffer = object.buffer;
+ return new Ctor(isDeep ? bufferClone(buffer) : buffer, object.byteOffset, object.length);
+
+ case numberTag:
+ case stringTag:
+ return new Ctor(object);
+
+ case regexpTag:
+ var result = new Ctor(object.source, reFlags.exec(object));
+ result.lastIndex = object.lastIndex;
+ }
+ return result;
+ }
+ function invokePath(object, path, args) {
+ if (object != null && !isKey(path, object)) {
+ path = toPath(path);
+ object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ path = last(path);
+ }
+ var func = object == null ? object : object[path];
+ return func == null ? undefined : func.apply(object, args);
+ }
+ function isArrayLike(value) {
+ return value != null && isLength(getLength(value));
+ }
+ function isIndex(value, length) {
+ value = (typeof value == 'number' || reIsUint.test(value)) ? +value : -1;
+ length = length == null ? MAX_SAFE_INTEGER : length;
+ return value > -1 && value % 1 == 0 && value < length;
+ }
+ function isIterateeCall(value, index, object) {
+ if (!isObject(object)) {
+ return false;
+ }
+ var type = typeof index;
+ if (type == 'number'
+ ? (isArrayLike(object) && isIndex(index, object.length))
+ : (type == 'string' && index in object)) {
+ var other = object[index];
+ return value === value ? (value === other) : (other !== other);
+ }
+ return false;
+ }
+ function isKey(value, object) {
+ var type = typeof value;
+ if ((type == 'string' && reIsPlainProp.test(value)) || type == 'number') {
+ return true;
+ }
+ if (isArray(value)) {
+ return false;
+ }
+ var result = !reIsDeepProp.test(value);
+ return result || (object != null && value in toObject(object));
+ }
+ function isLaziable(func) {
+ var funcName = getFuncName(func);
+ if (!(funcName in LazyWrapper.prototype)) {
+ return false;
+ }
+ var other = lodash[funcName];
+ if (func === other) {
+ return true;
+ }
+ var data = getData(other);
+ return !!data && func === data[0];
+ }
+ function isLength(value) {
+ return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
+ }
+ function isStrictComparable(value) {
+ return value === value && !isObject(value);
+ }
+ function mergeData(data, source) {
+ var bitmask = data[1],
+ srcBitmask = source[1],
+ newBitmask = bitmask | srcBitmask,
+ isCommon = newBitmask < ARY_FLAG;
+
+ var isCombo =
+ (srcBitmask == ARY_FLAG && bitmask == CURRY_FLAG) ||
+ (srcBitmask == ARY_FLAG && bitmask == REARG_FLAG && data[7].length <= source[8]) ||
+ (srcBitmask == (ARY_FLAG | REARG_FLAG) && bitmask == CURRY_FLAG);
+ if (!(isCommon || isCombo)) {
+ return data;
+ }
+ if (srcBitmask & BIND_FLAG) {
+ data[2] = source[2];
+ newBitmask |= (bitmask & BIND_FLAG) ? 0 : CURRY_BOUND_FLAG;
+ }
+ var value = source[3];
+ if (value) {
+ var partials = data[3];
+ data[3] = partials ? composeArgs(partials, value, source[4]) : arrayCopy(value);
+ data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : arrayCopy(source[4]);
+ }
+ value = source[5];
+ if (value) {
+ partials = data[5];
+ data[5] = partials ? composeArgsRight(partials, value, source[6]) : arrayCopy(value);
+ data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : arrayCopy(source[6]);
+ }
+ value = source[7];
+ if (value) {
+ data[7] = arrayCopy(value);
+ }
+ if (srcBitmask & ARY_FLAG) {
+ data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
+ }
+ if (data[9] == null) {
+ data[9] = source[9];
+ }
+ data[0] = source[0];
+ data[1] = newBitmask;
+
+ return data;
+ }
+ function mergeDefaults(objectValue, sourceValue) {
+ return objectValue === undefined ? sourceValue : merge(objectValue, sourceValue, mergeDefaults);
+ }
+ function pickByArray(object, props) {
+ object = toObject(object);
+
+ var index = -1,
+ length = props.length,
+ result = {};
+
+ while (++index < length) {
+ var key = props[index];
+ if (key in object) {
+ result[key] = object[key];
+ }
+ }
+ return result;
+ }
+ function pickByCallback(object, predicate) {
+ var result = {};
+ baseForIn(object, function(value, key, object) {
+ if (predicate(value, key, object)) {
+ result[key] = value;
+ }
+ });
+ return result;
+ }
+ function reorder(array, indexes) {
+ var arrLength = array.length,
+ length = nativeMin(indexes.length, arrLength),
+ oldArray = arrayCopy(array);
+
+ while (length--) {
+ var index = indexes[length];
+ array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
+ }
+ return array;
+ }
+ var setData = (function() {
+ var count = 0,
+ lastCalled = 0;
+
+ return function(key, value) {
+ var stamp = now(),
+ remaining = HOT_SPAN - (stamp - lastCalled);
+
+ lastCalled = stamp;
+ if (remaining > 0) {
+ if (++count >= HOT_COUNT) {
+ return key;
+ }
+ } else {
+ count = 0;
+ }
+ return baseSetData(key, value);
+ };
+ }());
+ function shimKeys(object) {
+ var props = keysIn(object),
+ propsLength = props.length,
+ length = propsLength && object.length;
+
+ var allowIndexes = !!length && isLength(length) &&
+ (isArray(object) || isArguments(object));
+
+ var index = -1,
+ result = [];
+
+ while (++index < propsLength) {
+ var key = props[index];
+ if ((allowIndexes && isIndex(key, length)) || hasOwnProperty.call(object, key)) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+ function toIterable(value) {
+ if (value == null) {
+ return [];
+ }
+ if (!isArrayLike(value)) {
+ return values(value);
+ }
+ return isObject(value) ? value : Object(value);
+ }
+ function toObject(value) {
+ return isObject(value) ? value : Object(value);
+ }
+ function toPath(value) {
+ if (isArray(value)) {
+ return value;
+ }
+ var result = [];
+ baseToString(value).replace(rePropName, function(match, number, quote, string) {
+ result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
+ });
+ return result;
+ }
+ function wrapperClone(wrapper) {
+ return wrapper instanceof LazyWrapper
+ ? wrapper.clone()
+ : new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__, arrayCopy(wrapper.__actions__));
+ }
+ function chunk(array, size, guard) {
+ if (guard ? isIterateeCall(array, size, guard) : size == null) {
+ size = 1;
+ } else {
+ size = nativeMax(nativeFloor(size) || 1, 1);
+ }
+ var index = 0,
+ length = array ? array.length : 0,
+ resIndex = -1,
+ result = Array(nativeCeil(length / size));
+
+ while (index < length) {
+ result[++resIndex] = baseSlice(array, index, (index += size));
+ }
+ return result;
+ }
+ function compact(array) {
+ var index = -1,
+ length = array ? array.length : 0,
+ resIndex = -1,
+ result = [];
+
+ while (++index < length) {
+ var value = array[index];
+ if (value) {
+ result[++resIndex] = value;
+ }
+ }
+ return result;
+ }
+ var difference = restParam(function(array, values) {
+ return (isObjectLike(array) && isArrayLike(array))
+ ? baseDifference(array, baseFlatten(values, false, true))
+ : [];
+ });
+ function drop(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (guard ? isIterateeCall(array, n, guard) : n == null) {
+ n = 1;
+ }
+ return baseSlice(array, n < 0 ? 0 : n);
+ }
+ function dropRight(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (guard ? isIterateeCall(array, n, guard) : n == null) {
+ n = 1;
+ }
+ n = length - (+n || 0);
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+ function dropRightWhile(array, predicate, thisArg) {
+ return (array && array.length)
+ ? baseWhile(array, getCallback(predicate, thisArg, 3), true, true)
+ : [];
+ }
+ function dropWhile(array, predicate, thisArg) {
+ return (array && array.length)
+ ? baseWhile(array, getCallback(predicate, thisArg, 3), true)
+ : [];
+ }
+ function fill(array, value, start, end) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
+ start = 0;
+ end = length;
+ }
+ return baseFill(array, value, start, end);
+ }
+ var findIndex = createFindIndex();
+ var findLastIndex = createFindIndex(true);
+ function first(array) {
+ return array ? array[0] : undefined;
+ }
+ function flatten(array, isDeep, guard) {
+ var length = array ? array.length : 0;
+ if (guard && isIterateeCall(array, isDeep, guard)) {
+ isDeep = false;
+ }
+ return length ? baseFlatten(array, isDeep) : [];
+ }
+ function flattenDeep(array) {
+ var length = array ? array.length : 0;
+ return length ? baseFlatten(array, true) : [];
+ }
+ function indexOf(array, value, fromIndex) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return -1;
+ }
+ if (typeof fromIndex == 'number') {
+ fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : fromIndex;
+ } else if (fromIndex) {
+ var index = binaryIndex(array, value);
+ if (index < length &&
+ (value === value ? (value === array[index]) : (array[index] !== array[index]))) {
+ return index;
+ }
+ return -1;
+ }
+ return baseIndexOf(array, value, fromIndex || 0);
+ }
+ function initial(array) {
+ return dropRight(array, 1);
+ }
+ var intersection = restParam(function(arrays) {
+ var othLength = arrays.length,
+ othIndex = othLength,
+ caches = Array(length),
+ indexOf = getIndexOf(),
+ isCommon = indexOf == baseIndexOf,
+ result = [];
+
+ while (othIndex--) {
+ var value = arrays[othIndex] = isArrayLike(value = arrays[othIndex]) ? value : [];
+ caches[othIndex] = (isCommon && value.length >= 120) ? createCache(othIndex && value) : null;
+ }
+ var array = arrays[0],
+ index = -1,
+ length = array ? array.length : 0,
+ seen = caches[0];
+
+ outer:
+ while (++index < length) {
+ value = array[index];
+ if ((seen ? cacheIndexOf(seen, value) : indexOf(result, value, 0)) < 0) {
+ var othIndex = othLength;
+ while (--othIndex) {
+ var cache = caches[othIndex];
+ if ((cache ? cacheIndexOf(cache, value) : indexOf(arrays[othIndex], value, 0)) < 0) {
+ continue outer;
+ }
+ }
+ if (seen) {
+ seen.push(value);
+ }
+ result.push(value);
+ }
+ }
+ return result;
+ });
+ function last(array) {
+ var length = array ? array.length : 0;
+ return length ? array[length - 1] : undefined;
+ }
+ function lastIndexOf(array, value, fromIndex) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return -1;
+ }
+ var index = length;
+ if (typeof fromIndex == 'number') {
+ index = (fromIndex < 0 ? nativeMax(length + fromIndex, 0) : nativeMin(fromIndex || 0, length - 1)) + 1;
+ } else if (fromIndex) {
+ index = binaryIndex(array, value, true) - 1;
+ var other = array[index];
+ if (value === value ? (value === other) : (other !== other)) {
+ return index;
+ }
+ return -1;
+ }
+ if (value !== value) {
+ return indexOfNaN(array, index, true);
+ }
+ while (index--) {
+ if (array[index] === value) {
+ return index;
+ }
+ }
+ return -1;
+ }
+ function pull() {
+ var args = arguments,
+ array = args[0];
+
+ if (!(array && array.length)) {
+ return array;
+ }
+ var index = 0,
+ indexOf = getIndexOf(),
+ length = args.length;
+
+ while (++index < length) {
+ var fromIndex = 0,
+ value = args[index];
+
+ while ((fromIndex = indexOf(array, value, fromIndex)) > -1) {
+ splice.call(array, fromIndex, 1);
+ }
+ }
+ return array;
+ }
+ var pullAt = restParam(function(array, indexes) {
+ indexes = baseFlatten(indexes);
+
+ var result = baseAt(array, indexes);
+ basePullAt(array, indexes.sort(baseCompareAscending));
+ return result;
+ });
+ function remove(array, predicate, thisArg) {
+ var result = [];
+ if (!(array && array.length)) {
+ return result;
+ }
+ var index = -1,
+ indexes = [],
+ length = array.length;
+
+ predicate = getCallback(predicate, thisArg, 3);
+ while (++index < length) {
+ var value = array[index];
+ if (predicate(value, index, array)) {
+ result.push(value);
+ indexes.push(index);
+ }
+ }
+ basePullAt(array, indexes);
+ return result;
+ }
+ function rest(array) {
+ return drop(array, 1);
+ }
+ function slice(array, start, end) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
+ start = 0;
+ end = length;
+ }
+ return baseSlice(array, start, end);
+ }
+ var sortedIndex = createSortedIndex();
+ var sortedLastIndex = createSortedIndex(true);
+ function take(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (guard ? isIterateeCall(array, n, guard) : n == null) {
+ n = 1;
+ }
+ return baseSlice(array, 0, n < 0 ? 0 : n);
+ }
+ function takeRight(array, n, guard) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (guard ? isIterateeCall(array, n, guard) : n == null) {
+ n = 1;
+ }
+ n = length - (+n || 0);
+ return baseSlice(array, n < 0 ? 0 : n);
+ }
+ function takeRightWhile(array, predicate, thisArg) {
+ return (array && array.length)
+ ? baseWhile(array, getCallback(predicate, thisArg, 3), false, true)
+ : [];
+ }
+ function takeWhile(array, predicate, thisArg) {
+ return (array && array.length)
+ ? baseWhile(array, getCallback(predicate, thisArg, 3))
+ : [];
+ }
+ var union = restParam(function(arrays) {
+ return baseUniq(baseFlatten(arrays, false, true));
+ });
+ function uniq(array, isSorted, iteratee, thisArg) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ if (isSorted != null && typeof isSorted != 'boolean') {
+ thisArg = iteratee;
+ iteratee = isIterateeCall(array, isSorted, thisArg) ? undefined : isSorted;
+ isSorted = false;
+ }
+ var callback = getCallback();
+ if (!(iteratee == null && callback === baseCallback)) {
+ iteratee = callback(iteratee, thisArg, 3);
+ }
+ return (isSorted && getIndexOf() == baseIndexOf)
+ ? sortedUniq(array, iteratee)
+ : baseUniq(array, iteratee);
+ }
+ function unzip(array) {
+ if (!(array && array.length)) {
+ return [];
+ }
+ var index = -1,
+ length = 0;
+
+ array = arrayFilter(array, function(group) {
+ if (isArrayLike(group)) {
+ length = nativeMax(group.length, length);
+ return true;
+ }
+ });
+ var result = Array(length);
+ while (++index < length) {
+ result[index] = arrayMap(array, baseProperty(index));
+ }
+ return result;
+ }
+ function unzipWith(array, iteratee, thisArg) {
+ var length = array ? array.length : 0;
+ if (!length) {
+ return [];
+ }
+ var result = unzip(array);
+ if (iteratee == null) {
+ return result;
+ }
+ iteratee = bindCallback(iteratee, thisArg, 4);
+ return arrayMap(result, function(group) {
+ return arrayReduce(group, iteratee, undefined, true);
+ });
+ }
+ var without = restParam(function(array, values) {
+ return isArrayLike(array)
+ ? baseDifference(array, values)
+ : [];
+ });
+ function xor() {
+ var index = -1,
+ length = arguments.length;
+
+ while (++index < length) {
+ var array = arguments[index];
+ if (isArrayLike(array)) {
+ var result = result
+ ? arrayPush(baseDifference(result, array), baseDifference(array, result))
+ : array;
+ }
+ }
+ return result ? baseUniq(result) : [];
+ }
+ var zip = restParam(unzip);
+ function zipObject(props, values) {
+ var index = -1,
+ length = props ? props.length : 0,
+ result = {};
+
+ if (length && !values && !isArray(props[0])) {
+ values = [];
+ }
+ while (++index < length) {
+ var key = props[index];
+ if (values) {
+ result[key] = values[index];
+ } else if (key) {
+ result[key[0]] = key[1];
+ }
+ }
+ return result;
+ }
+ var zipWith = restParam(function(arrays) {
+ var length = arrays.length,
+ iteratee = length > 2 ? arrays[length - 2] : undefined,
+ thisArg = length > 1 ? arrays[length - 1] : undefined;
+
+ if (length > 2 && typeof iteratee == 'function') {
+ length -= 2;
+ } else {
+ iteratee = (length > 1 && typeof thisArg == 'function') ? (--length, thisArg) : undefined;
+ thisArg = undefined;
+ }
+ arrays.length = length;
+ return unzipWith(arrays, iteratee, thisArg);
+ });
+ function chain(value) {
+ var result = lodash(value);
+ result.__chain__ = true;
+ return result;
+ }
+ function tap(value, interceptor, thisArg) {
+ interceptor.call(thisArg, value);
+ return value;
+ }
+ function thru(value, interceptor, thisArg) {
+ return interceptor.call(thisArg, value);
+ }
+ function wrapperChain() {
+ return chain(this);
+ }
+ function wrapperCommit() {
+ return new LodashWrapper(this.value(), this.__chain__);
+ }
+ var wrapperConcat = restParam(function(values) {
+ values = baseFlatten(values);
+ return this.thru(function(array) {
+ return arrayConcat(isArray(array) ? array : [toObject(array)], values);
+ });
+ });
+ function wrapperPlant(value) {
+ var result,
+ parent = this;
+
+ while (parent instanceof baseLodash) {
+ var clone = wrapperClone(parent);
+ if (result) {
+ previous.__wrapped__ = clone;
+ } else {
+ result = clone;
+ }
+ var previous = clone;
+ parent = parent.__wrapped__;
+ }
+ previous.__wrapped__ = value;
+ return result;
+ }
+ function wrapperReverse() {
+ var value = this.__wrapped__;
+
+ var interceptor = function(value) {
+ return (wrapped && wrapped.__dir__ < 0) ? value : value.reverse();
+ };
+ if (value instanceof LazyWrapper) {
+ var wrapped = value;
+ if (this.__actions__.length) {
+ wrapped = new LazyWrapper(this);
+ }
+ wrapped = wrapped.reverse();
+ wrapped.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
+ return new LodashWrapper(wrapped, this.__chain__);
+ }
+ return this.thru(interceptor);
+ }
+ function wrapperToString() {
+ return (this.value() + '');
+ }
+ function wrapperValue() {
+ return baseWrapperValue(this.__wrapped__, this.__actions__);
+ }
+ var at = restParam(function(collection, props) {
+ return baseAt(collection, baseFlatten(props));
+ });
+ var countBy = createAggregator(function(result, value, key) {
+ hasOwnProperty.call(result, key) ? ++result[key] : (result[key] = 1);
+ });
+ function every(collection, predicate, thisArg) {
+ var func = isArray(collection) ? arrayEvery : baseEvery;
+ if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
+ predicate = undefined;
+ }
+ if (typeof predicate != 'function' || thisArg !== undefined) {
+ predicate = getCallback(predicate, thisArg, 3);
+ }
+ return func(collection, predicate);
+ }
+ function filter(collection, predicate, thisArg) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ predicate = getCallback(predicate, thisArg, 3);
+ return func(collection, predicate);
+ }
+ var find = createFind(baseEach);
+ var findLast = createFind(baseEachRight, true);
+ function findWhere(collection, source) {
+ return find(collection, baseMatches(source));
+ }
+ var forEach = createForEach(arrayEach, baseEach);
+ var forEachRight = createForEach(arrayEachRight, baseEachRight);
+ var groupBy = createAggregator(function(result, value, key) {
+ if (hasOwnProperty.call(result, key)) {
+ result[key].push(value);
+ } else {
+ result[key] = [value];
+ }
+ });
+ function includes(collection, target, fromIndex, guard) {
+ var length = collection ? getLength(collection) : 0;
+ if (!isLength(length)) {
+ collection = values(collection);
+ length = collection.length;
+ }
+ if (typeof fromIndex != 'number' || (guard && isIterateeCall(target, fromIndex, guard))) {
+ fromIndex = 0;
+ } else {
+ fromIndex = fromIndex < 0 ? nativeMax(length + fromIndex, 0) : (fromIndex || 0);
+ }
+ return (typeof collection == 'string' || !isArray(collection) && isString(collection))
+ ? (fromIndex <= length && collection.indexOf(target, fromIndex) > -1)
+ : (!!length && getIndexOf(collection, target, fromIndex) > -1);
+ }
+ var indexBy = createAggregator(function(result, value, key) {
+ result[key] = value;
+ });
+ var invoke = restParam(function(collection, path, args) {
+ var index = -1,
+ isFunc = typeof path == 'function',
+ isProp = isKey(path),
+ result = isArrayLike(collection) ? Array(collection.length) : [];
+
+ baseEach(collection, function(value) {
+ var func = isFunc ? path : ((isProp && value != null) ? value[path] : undefined);
+ result[++index] = func ? func.apply(value, args) : invokePath(value, path, args);
+ });
+ return result;
+ });
+ function map(collection, iteratee, thisArg) {
+ var func = isArray(collection) ? arrayMap : baseMap;
+ iteratee = getCallback(iteratee, thisArg, 3);
+ return func(collection, iteratee);
+ }
+ var partition = createAggregator(function(result, value, key) {
+ result[key ? 0 : 1].push(value);
+ }, function() { return [[], []]; });
+ function pluck(collection, path) {
+ return map(collection, property(path));
+ }
+ var reduce = createReduce(arrayReduce, baseEach);
+ var reduceRight = createReduce(arrayReduceRight, baseEachRight);
+ function reject(collection, predicate, thisArg) {
+ var func = isArray(collection) ? arrayFilter : baseFilter;
+ predicate = getCallback(predicate, thisArg, 3);
+ return func(collection, function(value, index, collection) {
+ return !predicate(value, index, collection);
+ });
+ }
+ function sample(collection, n, guard) {
+ if (guard ? isIterateeCall(collection, n, guard) : n == null) {
+ collection = toIterable(collection);
+ var length = collection.length;
+ return length > 0 ? collection[baseRandom(0, length - 1)] : undefined;
+ }
+ var index = -1,
+ result = toArray(collection),
+ length = result.length,
+ lastIndex = length - 1;
+
+ n = nativeMin(n < 0 ? 0 : (+n || 0), length);
+ while (++index < n) {
+ var rand = baseRandom(index, lastIndex),
+ value = result[rand];
+
+ result[rand] = result[index];
+ result[index] = value;
+ }
+ result.length = n;
+ return result;
+ }
+ function shuffle(collection) {
+ return sample(collection, POSITIVE_INFINITY);
+ }
+ function size(collection) {
+ var length = collection ? getLength(collection) : 0;
+ return isLength(length) ? length : keys(collection).length;
+ }
+ function some(collection, predicate, thisArg) {
+ var func = isArray(collection) ? arraySome : baseSome;
+ if (thisArg && isIterateeCall(collection, predicate, thisArg)) {
+ predicate = undefined;
+ }
+ if (typeof predicate != 'function' || thisArg !== undefined) {
+ predicate = getCallback(predicate, thisArg, 3);
+ }
+ return func(collection, predicate);
+ }
+ function sortBy(collection, iteratee, thisArg) {
+ if (collection == null) {
+ return [];
+ }
+ if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
+ iteratee = undefined;
+ }
+ var index = -1;
+ iteratee = getCallback(iteratee, thisArg, 3);
+
+ var result = baseMap(collection, function(value, key, collection) {
+ return { 'criteria': iteratee(value, key, collection), 'index': ++index, 'value': value };
+ });
+ return baseSortBy(result, compareAscending);
+ }
+ var sortByAll = restParam(function(collection, iteratees) {
+ if (collection == null) {
+ return [];
+ }
+ var guard = iteratees[2];
+ if (guard && isIterateeCall(iteratees[0], iteratees[1], guard)) {
+ iteratees.length = 1;
+ }
+ return baseSortByOrder(collection, baseFlatten(iteratees), []);
+ });
+ function sortByOrder(collection, iteratees, orders, guard) {
+ if (collection == null) {
+ return [];
+ }
+ if (guard && isIterateeCall(iteratees, orders, guard)) {
+ orders = undefined;
+ }
+ if (!isArray(iteratees)) {
+ iteratees = iteratees == null ? [] : [iteratees];
+ }
+ if (!isArray(orders)) {
+ orders = orders == null ? [] : [orders];
+ }
+ return baseSortByOrder(collection, iteratees, orders);
+ }
+ function where(collection, source) {
+ return filter(collection, baseMatches(source));
+ }
+ var now = nativeNow || function() {
+ return new Date().getTime();
+ };
+ function after(n, func) {
+ if (typeof func != 'function') {
+ if (typeof n == 'function') {
+ var temp = n;
+ n = func;
+ func = temp;
+ } else {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ }
+ n = nativeIsFinite(n = +n) ? n : 0;
+ return function() {
+ if (--n < 1) {
+ return func.apply(this, arguments);
+ }
+ };
+ }
+ function ary(func, n, guard) {
+ if (guard && isIterateeCall(func, n, guard)) {
+ n = undefined;
+ }
+ n = (func && n == null) ? func.length : nativeMax(+n || 0, 0);
+ return createWrapper(func, ARY_FLAG, undefined, undefined, undefined, undefined, n);
+ }
+ function before(n, func) {
+ var result;
+ if (typeof func != 'function') {
+ if (typeof n == 'function') {
+ var temp = n;
+ n = func;
+ func = temp;
+ } else {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ }
+ return function() {
+ if (--n > 0) {
+ result = func.apply(this, arguments);
+ }
+ if (n <= 1) {
+ func = undefined;
+ }
+ return result;
+ };
+ }
+ var bind = restParam(function(func, thisArg, partials) {
+ var bitmask = BIND_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, bind.placeholder);
+ bitmask |= PARTIAL_FLAG;
+ }
+ return createWrapper(func, bitmask, thisArg, partials, holders);
+ });
+ var bindAll = restParam(function(object, methodNames) {
+ methodNames = methodNames.length ? baseFlatten(methodNames) : functions(object);
+
+ var index = -1,
+ length = methodNames.length;
+
+ while (++index < length) {
+ var key = methodNames[index];
+ object[key] = createWrapper(object[key], BIND_FLAG, object);
+ }
+ return object;
+ });
+ var bindKey = restParam(function(object, key, partials) {
+ var bitmask = BIND_FLAG | BIND_KEY_FLAG;
+ if (partials.length) {
+ var holders = replaceHolders(partials, bindKey.placeholder);
+ bitmask |= PARTIAL_FLAG;
+ }
+ return createWrapper(key, bitmask, object, partials, holders);
+ });
+ var curry = createCurry(CURRY_FLAG);
+ var curryRight = createCurry(CURRY_RIGHT_FLAG);
+ function debounce(func, wait, options) {
+ var args,
+ maxTimeoutId,
+ result,
+ stamp,
+ thisArg,
+ timeoutId,
+ trailingCall,
+ lastCalled = 0,
+ maxWait = false,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ wait = wait < 0 ? 0 : (+wait || 0);
+ if (options === true) {
+ var leading = true;
+ trailing = false;
+ } else if (isObject(options)) {
+ leading = !!options.leading;
+ maxWait = 'maxWait' in options && nativeMax(+options.maxWait || 0, wait);
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+
+ function cancel() {
+ if (timeoutId) {
+ clearTimeout(timeoutId);
+ }
+ if (maxTimeoutId) {
+ clearTimeout(maxTimeoutId);
+ }
+ lastCalled = 0;
+ maxTimeoutId = timeoutId = trailingCall = undefined;
+ }
+
+ function complete(isCalled, id) {
+ if (id) {
+ clearTimeout(id);
+ }
+ maxTimeoutId = timeoutId = trailingCall = undefined;
+ if (isCalled) {
+ lastCalled = now();
+ result = func.apply(thisArg, args);
+ if (!timeoutId && !maxTimeoutId) {
+ args = thisArg = undefined;
+ }
+ }
+ }
+
+ function delayed() {
+ var remaining = wait - (now() - stamp);
+ if (remaining <= 0 || remaining > wait) {
+ complete(trailingCall, maxTimeoutId);
+ } else {
+ timeoutId = setTimeout(delayed, remaining);
+ }
+ }
+
+ function maxDelayed() {
+ complete(trailing, timeoutId);
+ }
+
+ function debounced() {
+ args = arguments;
+ stamp = now();
+ thisArg = this;
+ trailingCall = trailing && (timeoutId || !leading);
+
+ if (maxWait === false) {
+ var leadingCall = leading && !timeoutId;
+ } else {
+ if (!maxTimeoutId && !leading) {
+ lastCalled = stamp;
+ }
+ var remaining = maxWait - (stamp - lastCalled),
+ isCalled = remaining <= 0 || remaining > maxWait;
+
+ if (isCalled) {
+ if (maxTimeoutId) {
+ maxTimeoutId = clearTimeout(maxTimeoutId);
+ }
+ lastCalled = stamp;
+ result = func.apply(thisArg, args);
+ }
+ else if (!maxTimeoutId) {
+ maxTimeoutId = setTimeout(maxDelayed, remaining);
+ }
+ }
+ if (isCalled && timeoutId) {
+ timeoutId = clearTimeout(timeoutId);
+ }
+ else if (!timeoutId && wait !== maxWait) {
+ timeoutId = setTimeout(delayed, wait);
+ }
+ if (leadingCall) {
+ isCalled = true;
+ result = func.apply(thisArg, args);
+ }
+ if (isCalled && !timeoutId && !maxTimeoutId) {
+ args = thisArg = undefined;
+ }
+ return result;
+ }
+ debounced.cancel = cancel;
+ return debounced;
+ }
+ var defer = restParam(function(func, args) {
+ return baseDelay(func, 1, args);
+ });
+ var delay = restParam(function(func, wait, args) {
+ return baseDelay(func, wait, args);
+ });
+ var flow = createFlow();
+ var flowRight = createFlow(true);
+ function memoize(func, resolver) {
+ if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var memoized = function() {
+ var args = arguments,
+ key = resolver ? resolver.apply(this, args) : args[0],
+ cache = memoized.cache;
+
+ if (cache.has(key)) {
+ return cache.get(key);
+ }
+ var result = func.apply(this, args);
+ memoized.cache = cache.set(key, result);
+ return result;
+ };
+ memoized.cache = new memoize.Cache;
+ return memoized;
+ }
+ var modArgs = restParam(function(func, transforms) {
+ transforms = baseFlatten(transforms);
+ if (typeof func != 'function' || !arrayEvery(transforms, baseIsFunction)) {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ var length = transforms.length;
+ return restParam(function(args) {
+ var index = nativeMin(args.length, length);
+ while (index--) {
+ args[index] = transforms[index](args[index]);
+ }
+ return func.apply(this, args);
+ });
+ });
+ function negate(predicate) {
+ if (typeof predicate != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function() {
+ return !predicate.apply(this, arguments);
+ };
+ }
+ function once(func) {
+ return before(2, func);
+ }
+ var partial = createPartial(PARTIAL_FLAG);
+ var partialRight = createPartial(PARTIAL_RIGHT_FLAG);
+ var rearg = restParam(function(func, indexes) {
+ return createWrapper(func, REARG_FLAG, undefined, undefined, undefined, baseFlatten(indexes));
+ });
+ function restParam(func, start) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ start = nativeMax(start === undefined ? (func.length - 1) : (+start || 0), 0);
+ return function() {
+ var args = arguments,
+ index = -1,
+ length = nativeMax(args.length - start, 0),
+ rest = Array(length);
+
+ while (++index < length) {
+ rest[index] = args[start + index];
+ }
+ switch (start) {
+ case 0: return func.call(this, rest);
+ case 1: return func.call(this, args[0], rest);
+ case 2: return func.call(this, args[0], args[1], rest);
+ }
+ var otherArgs = Array(start + 1);
+ index = -1;
+ while (++index < start) {
+ otherArgs[index] = args[index];
+ }
+ otherArgs[start] = rest;
+ return func.apply(this, otherArgs);
+ };
+ }
+ function spread(func) {
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ return function(array) {
+ return func.apply(this, array);
+ };
+ }
+ function throttle(func, wait, options) {
+ var leading = true,
+ trailing = true;
+
+ if (typeof func != 'function') {
+ throw new TypeError(FUNC_ERROR_TEXT);
+ }
+ if (options === false) {
+ leading = false;
+ } else if (isObject(options)) {
+ leading = 'leading' in options ? !!options.leading : leading;
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
+ }
+ return debounce(func, wait, { 'leading': leading, 'maxWait': +wait, 'trailing': trailing });
+ }
+ function wrap(value, wrapper) {
+ wrapper = wrapper == null ? identity : wrapper;
+ return createWrapper(wrapper, PARTIAL_FLAG, undefined, [value], []);
+ }
+ function clone(value, isDeep, customizer, thisArg) {
+ if (isDeep && typeof isDeep != 'boolean' && isIterateeCall(value, isDeep, customizer)) {
+ isDeep = false;
+ }
+ else if (typeof isDeep == 'function') {
+ thisArg = customizer;
+ customizer = isDeep;
+ isDeep = false;
+ }
+ return typeof customizer == 'function'
+ ? baseClone(value, isDeep, bindCallback(customizer, thisArg, 1))
+ : baseClone(value, isDeep);
+ }
+ function cloneDeep(value, customizer, thisArg) {
+ return typeof customizer == 'function'
+ ? baseClone(value, true, bindCallback(customizer, thisArg, 1))
+ : baseClone(value, true);
+ }
+ function gt(value, other) {
+ return value > other;
+ }
+ function gte(value, other) {
+ return value >= other;
+ }
+ function isArguments(value) {
+ return isObjectLike(value) && isArrayLike(value) &&
+ hasOwnProperty.call(value, 'callee') && !propertyIsEnumerable.call(value, 'callee');
+ }
+ var isArray = nativeIsArray || function(value) {
+ return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
+ };
+ function isBoolean(value) {
+ return value === true || value === false || (isObjectLike(value) && objToString.call(value) == boolTag);
+ }
+ function isDate(value) {
+ return isObjectLike(value) && objToString.call(value) == dateTag;
+ }
+ function isElement(value) {
+ return !!value && value.nodeType === 1 && isObjectLike(value) && !isPlainObject(value);
+ }
+ function isEmpty(value) {
+ if (value == null) {
+ return true;
+ }
+ if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) ||
+ (isObjectLike(value) && isFunction(value.splice)))) {
+ return !value.length;
+ }
+ return !keys(value).length;
+ }
+ function isEqual(value, other, customizer, thisArg) {
+ customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined;
+ var result = customizer ? customizer(value, other) : undefined;
+ return result === undefined ? baseIsEqual(value, other, customizer) : !!result;
+ }
+ function isError(value) {
+ return isObjectLike(value) && typeof value.message == 'string' && objToString.call(value) == errorTag;
+ }
+ function isFinite(value) {
+ return typeof value == 'number' && nativeIsFinite(value);
+ }
+ function isFunction(value) {
+ return isObject(value) && objToString.call(value) == funcTag;
+ }
+ function isObject(value) {
+ var type = typeof value;
+ return !!value && (type == 'object' || type == 'function');
+ }
+ function isMatch(object, source, customizer, thisArg) {
+ customizer = typeof customizer == 'function' ? bindCallback(customizer, thisArg, 3) : undefined;
+ return baseIsMatch(object, getMatchData(source), customizer);
+ }
+ function isNaN(value) {
+ return isNumber(value) && value != +value;
+ }
+ function isNative(value) {
+ if (value == null) {
+ return false;
+ }
+ if (isFunction(value)) {
+ return reIsNative.test(fnToString.call(value));
+ }
+ return isObjectLike(value) && reIsHostCtor.test(value);
+ }
+ function isNull(value) {
+ return value === null;
+ }
+ function isNumber(value) {
+ return typeof value == 'number' || (isObjectLike(value) && objToString.call(value) == numberTag);
+ }
+ function isPlainObject(value) {
+ var Ctor;
+ if (!(isObjectLike(value) && objToString.call(value) == objectTag && !isArguments(value)) ||
+ (!hasOwnProperty.call(value, 'constructor') && (Ctor = value.constructor, typeof Ctor == 'function' && !(Ctor instanceof Ctor)))) {
+ return false;
+ }
+ var result;
+ baseForIn(value, function(subValue, key) {
+ result = key;
+ });
+ return result === undefined || hasOwnProperty.call(value, result);
+ }
+ function isRegExp(value) {
+ return isObject(value) && objToString.call(value) == regexpTag;
+ }
+ function isString(value) {
+ return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag);
+ }
+ function isTypedArray(value) {
+ return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[objToString.call(value)];
+ }
+ function isUndefined(value) {
+ return value === undefined;
+ }
+ function lt(value, other) {
+ return value < other;
+ }
+ function lte(value, other) {
+ return value <= other;
+ }
+ function toArray(value) {
+ var length = value ? getLength(value) : 0;
+ if (!isLength(length)) {
+ return values(value);
+ }
+ if (!length) {
+ return [];
+ }
+ return arrayCopy(value);
+ }
+ function toPlainObject(value) {
+ return baseCopy(value, keysIn(value));
+ }
+ var merge = createAssigner(baseMerge);
+ var assign = createAssigner(function(object, source, customizer) {
+ return customizer
+ ? assignWith(object, source, customizer)
+ : baseAssign(object, source);
+ });
+ function create(prototype, properties, guard) {
+ var result = baseCreate(prototype);
+ if (guard && isIterateeCall(prototype, properties, guard)) {
+ properties = undefined;
+ }
+ return properties ? baseAssign(result, properties) : result;
+ }
+ var defaults = createDefaults(assign, assignDefaults);
+ var defaultsDeep = createDefaults(merge, mergeDefaults);
+ var findKey = createFindKey(baseForOwn);
+ var findLastKey = createFindKey(baseForOwnRight);
+ var forIn = createForIn(baseFor);
+ var forInRight = createForIn(baseForRight);
+ var forOwn = createForOwn(baseForOwn);
+ var forOwnRight = createForOwn(baseForOwnRight);
+ function functions(object) {
+ return baseFunctions(object, keysIn(object));
+ }
+ function get(object, path, defaultValue) {
+ var result = object == null ? undefined : baseGet(object, toPath(path), path + '');
+ return result === undefined ? defaultValue : result;
+ }
+ function has(object, path) {
+ if (object == null) {
+ return false;
+ }
+ var result = hasOwnProperty.call(object, path);
+ if (!result && !isKey(path)) {
+ path = toPath(path);
+ object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ if (object == null) {
+ return false;
+ }
+ path = last(path);
+ result = hasOwnProperty.call(object, path);
+ }
+ return result || (isLength(object.length) && isIndex(path, object.length) &&
+ (isArray(object) || isArguments(object)));
+ }
+ function invert(object, multiValue, guard) {
+ if (guard && isIterateeCall(object, multiValue, guard)) {
+ multiValue = undefined;
+ }
+ var index = -1,
+ props = keys(object),
+ length = props.length,
+ result = {};
+
+ while (++index < length) {
+ var key = props[index],
+ value = object[key];
+
+ if (multiValue) {
+ if (hasOwnProperty.call(result, value)) {
+ result[value].push(key);
+ } else {
+ result[value] = [key];
+ }
+ }
+ else {
+ result[value] = key;
+ }
+ }
+ return result;
+ }
+ var keys = !nativeKeys ? shimKeys : function(object) {
+ var Ctor = object == null ? undefined : object.constructor;
+ if ((typeof Ctor == 'function' && Ctor.prototype === object) ||
+ (typeof object != 'function' && isArrayLike(object))) {
+ return shimKeys(object);
+ }
+ return isObject(object) ? nativeKeys(object) : [];
+ };
+ function keysIn(object) {
+ if (object == null) {
+ return [];
+ }
+ if (!isObject(object)) {
+ object = Object(object);
+ }
+ var length = object.length;
+ length = (length && isLength(length) &&
+ (isArray(object) || isArguments(object)) && length) || 0;
+
+ var Ctor = object.constructor,
+ index = -1,
+ isProto = typeof Ctor == 'function' && Ctor.prototype === object,
+ result = Array(length),
+ skipIndexes = length > 0;
+
+ while (++index < length) {
+ result[index] = (index + '');
+ }
+ for (var key in object) {
+ if (!(skipIndexes && isIndex(key, length)) &&
+ !(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
+ result.push(key);
+ }
+ }
+ return result;
+ }
+ var mapKeys = createObjectMapper(true);
+ var mapValues = createObjectMapper();
+ var omit = restParam(function(object, props) {
+ if (object == null) {
+ return {};
+ }
+ if (typeof props[0] != 'function') {
+ var props = arrayMap(baseFlatten(props), String);
+ return pickByArray(object, baseDifference(keysIn(object), props));
+ }
+ var predicate = bindCallback(props[0], props[1], 3);
+ return pickByCallback(object, function(value, key, object) {
+ return !predicate(value, key, object);
+ });
+ });
+ function pairs(object) {
+ object = toObject(object);
+
+ var index = -1,
+ props = keys(object),
+ length = props.length,
+ result = Array(length);
+
+ while (++index < length) {
+ var key = props[index];
+ result[index] = [key, object[key]];
+ }
+ return result;
+ }
+ var pick = restParam(function(object, props) {
+ if (object == null) {
+ return {};
+ }
+ return typeof props[0] == 'function'
+ ? pickByCallback(object, bindCallback(props[0], props[1], 3))
+ : pickByArray(object, baseFlatten(props));
+ });
+ function result(object, path, defaultValue) {
+ var result = object == null ? undefined : object[path];
+ if (result === undefined) {
+ if (object != null && !isKey(path, object)) {
+ path = toPath(path);
+ object = path.length == 1 ? object : baseGet(object, baseSlice(path, 0, -1));
+ result = object == null ? undefined : object[last(path)];
+ }
+ result = result === undefined ? defaultValue : result;
+ }
+ return isFunction(result) ? result.call(object) : result;
+ }
+ function set(object, path, value) {
+ if (object == null) {
+ return object;
+ }
+ var pathKey = (path + '');
+ path = (object[pathKey] != null || isKey(path, object)) ? [pathKey] : toPath(path);
+
+ var index = -1,
+ length = path.length,
+ lastIndex = length - 1,
+ nested = object;
+
+ while (nested != null && ++index < length) {
+ var key = path[index];
+ if (isObject(nested)) {
+ if (index == lastIndex) {
+ nested[key] = value;
+ } else if (nested[key] == null) {
+ nested[key] = isIndex(path[index + 1]) ? [] : {};
+ }
+ }
+ nested = nested[key];
+ }
+ return object;
+ }
+ function transform(object, iteratee, accumulator, thisArg) {
+ var isArr = isArray(object) || isTypedArray(object);
+ iteratee = getCallback(iteratee, thisArg, 4);
+
+ if (accumulator == null) {
+ if (isArr || isObject(object)) {
+ var Ctor = object.constructor;
+ if (isArr) {
+ accumulator = isArray(object) ? new Ctor : [];
+ } else {
+ accumulator = baseCreate(isFunction(Ctor) ? Ctor.prototype : undefined);
+ }
+ } else {
+ accumulator = {};
+ }
+ }
+ (isArr ? arrayEach : baseForOwn)(object, function(value, index, object) {
+ return iteratee(accumulator, value, index, object);
+ });
+ return accumulator;
+ }
+ function values(object) {
+ return baseValues(object, keys(object));
+ }
+ function valuesIn(object) {
+ return baseValues(object, keysIn(object));
+ }
+ function inRange(value, start, end) {
+ start = +start || 0;
+ if (end === undefined) {
+ end = start;
+ start = 0;
+ } else {
+ end = +end || 0;
+ }
+ return value >= nativeMin(start, end) && value < nativeMax(start, end);
+ }
+ function random(min, max, floating) {
+ if (floating && isIterateeCall(min, max, floating)) {
+ max = floating = undefined;
+ }
+ var noMin = min == null,
+ noMax = max == null;
+
+ if (floating == null) {
+ if (noMax && typeof min == 'boolean') {
+ floating = min;
+ min = 1;
+ }
+ else if (typeof max == 'boolean') {
+ floating = max;
+ noMax = true;
+ }
+ }
+ if (noMin && noMax) {
+ max = 1;
+ noMax = false;
+ }
+ min = +min || 0;
+ if (noMax) {
+ max = min;
+ min = 0;
+ } else {
+ max = +max || 0;
+ }
+ if (floating || min % 1 || max % 1) {
+ var rand = nativeRandom();
+ return nativeMin(min + (rand * (max - min + parseFloat('1e-' + ((rand + '').length - 1)))), max);
+ }
+ return baseRandom(min, max);
+ }
+ var camelCase = createCompounder(function(result, word, index) {
+ word = word.toLowerCase();
+ return result + (index ? (word.charAt(0).toUpperCase() + word.slice(1)) : word);
+ });
+ function capitalize(string) {
+ string = baseToString(string);
+ return string && (string.charAt(0).toUpperCase() + string.slice(1));
+ }
+ function deburr(string) {
+ string = baseToString(string);
+ return string && string.replace(reLatin1, deburrLetter).replace(reComboMark, '');
+ }
+ function endsWith(string, target, position) {
+ string = baseToString(string);
+ target = (target + '');
+
+ var length = string.length;
+ position = position === undefined
+ ? length
+ : nativeMin(position < 0 ? 0 : (+position || 0), length);
+
+ position -= target.length;
+ return position >= 0 && string.indexOf(target, position) == position;
+ }
+ function escape(string) {
+ string = baseToString(string);
+ return (string && reHasUnescapedHtml.test(string))
+ ? string.replace(reUnescapedHtml, escapeHtmlChar)
+ : string;
+ }
+ function escapeRegExp(string) {
+ string = baseToString(string);
+ return (string && reHasRegExpChars.test(string))
+ ? string.replace(reRegExpChars, escapeRegExpChar)
+ : (string || '(?:)');
+ }
+ var kebabCase = createCompounder(function(result, word, index) {
+ return result + (index ? '-' : '') + word.toLowerCase();
+ });
+ function pad(string, length, chars) {
+ string = baseToString(string);
+ length = +length;
+
+ var strLength = string.length;
+ if (strLength >= length || !nativeIsFinite(length)) {
+ return string;
+ }
+ var mid = (length - strLength) / 2,
+ leftLength = nativeFloor(mid),
+ rightLength = nativeCeil(mid);
+
+ chars = createPadding('', rightLength, chars);
+ return chars.slice(0, leftLength) + string + chars;
+ }
+ var padLeft = createPadDir();
+ var padRight = createPadDir(true);
+ function parseInt(string, radix, guard) {
+ if (guard ? isIterateeCall(string, radix, guard) : radix == null) {
+ radix = 0;
+ } else if (radix) {
+ radix = +radix;
+ }
+ string = trim(string);
+ return nativeParseInt(string, radix || (reHasHexPrefix.test(string) ? 16 : 10));
+ }
+ function repeat(string, n) {
+ var result = '';
+ string = baseToString(string);
+ n = +n;
+ if (n < 1 || !string || !nativeIsFinite(n)) {
+ return result;
+ }
+ do {
+ if (n % 2) {
+ result += string;
+ }
+ n = nativeFloor(n / 2);
+ string += string;
+ } while (n);
+
+ return result;
+ }
+ var snakeCase = createCompounder(function(result, word, index) {
+ return result + (index ? '_' : '') + word.toLowerCase();
+ });
+ var startCase = createCompounder(function(result, word, index) {
+ return result + (index ? ' ' : '') + (word.charAt(0).toUpperCase() + word.slice(1));
+ });
+ function startsWith(string, target, position) {
+ string = baseToString(string);
+ position = position == null
+ ? 0
+ : nativeMin(position < 0 ? 0 : (+position || 0), string.length);
+
+ return string.lastIndexOf(target, position) == position;
+ }
+ function template(string, options, otherOptions) {
+ var settings = lodash.templateSettings;
+
+ if (otherOptions && isIterateeCall(string, options, otherOptions)) {
+ options = otherOptions = undefined;
+ }
+ string = baseToString(string);
+ options = assignWith(baseAssign({}, otherOptions || options), settings, assignOwnDefaults);
+
+ var imports = assignWith(baseAssign({}, options.imports), settings.imports, assignOwnDefaults),
+ importsKeys = keys(imports),
+ importsValues = baseValues(imports, importsKeys);
+
+ var isEscaping,
+ isEvaluating,
+ index = 0,
+ interpolate = options.interpolate || reNoMatch,
+ source = "__p += '";
+ var reDelimiters = RegExp(
+ (options.escape || reNoMatch).source + '|' +
+ interpolate.source + '|' +
+ (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
+ (options.evaluate || reNoMatch).source + '|$'
+ , 'g');
+ var sourceURL = '//# sourceURL=' +
+ ('sourceURL' in options
+ ? options.sourceURL
+ : ('lodash.templateSources[' + (++templateCounter) + ']')
+ ) + '\n';
+
+ string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
+ interpolateValue || (interpolateValue = esTemplateValue);
+ source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
+ if (escapeValue) {
+ isEscaping = true;
+ source += "' +\n__e(" + escapeValue + ") +\n'";
+ }
+ if (evaluateValue) {
+ isEvaluating = true;
+ source += "';\n" + evaluateValue + ";\n__p += '";
+ }
+ if (interpolateValue) {
+ source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
+ }
+ index = offset + match.length;
+ return match;
+ });
+
+ source += "';\n";
+ var variable = options.variable;
+ if (!variable) {
+ source = 'with (obj) {\n' + source + '\n}\n';
+ }
+ source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
+ .replace(reEmptyStringMiddle, '$1')
+ .replace(reEmptyStringTrailing, '$1;');
+ source = 'function(' + (variable || 'obj') + ') {\n' +
+ (variable
+ ? ''
+ : 'obj || (obj = {});\n'
+ ) +
+ "var __t, __p = ''" +
+ (isEscaping
+ ? ', __e = _.escape'
+ : ''
+ ) +
+ (isEvaluating
+ ? ', __j = Array.prototype.join;\n' +
+ "function print() { __p += __j.call(arguments, '') }\n"
+ : ';\n'
+ ) +
+ source +
+ 'return __p\n}';
+
+ var result = attempt(function() {
+ return Function(importsKeys, sourceURL + 'return ' + source).apply(undefined, importsValues);
+ });
+ result.source = source;
+ if (isError(result)) {
+ throw result;
+ }
+ return result;
+ }
+ function trim(string, chars, guard) {
+ var value = string;
+ string = baseToString(string);
+ if (!string) {
+ return string;
+ }
+ if (guard ? isIterateeCall(value, chars, guard) : chars == null) {
+ return string.slice(trimmedLeftIndex(string), trimmedRightIndex(string) + 1);
+ }
+ chars = (chars + '');
+ return string.slice(charsLeftIndex(string, chars), charsRightIndex(string, chars) + 1);
+ }
+ function trimLeft(string, chars, guard) {
+ var value = string;
+ string = baseToString(string);
+ if (!string) {
+ return string;
+ }
+ if (guard ? isIterateeCall(value, chars, guard) : chars == null) {
+ return string.slice(trimmedLeftIndex(string));
+ }
+ return string.slice(charsLeftIndex(string, (chars + '')));
+ }
+ function trimRight(string, chars, guard) {
+ var value = string;
+ string = baseToString(string);
+ if (!string) {
+ return string;
+ }
+ if (guard ? isIterateeCall(value, chars, guard) : chars == null) {
+ return string.slice(0, trimmedRightIndex(string) + 1);
+ }
+ return string.slice(0, charsRightIndex(string, (chars + '')) + 1);
+ }
+ function trunc(string, options, guard) {
+ if (guard && isIterateeCall(string, options, guard)) {
+ options = undefined;
+ }
+ var length = DEFAULT_TRUNC_LENGTH,
+ omission = DEFAULT_TRUNC_OMISSION;
+
+ if (options != null) {
+ if (isObject(options)) {
+ var separator = 'separator' in options ? options.separator : separator;
+ length = 'length' in options ? (+options.length || 0) : length;
+ omission = 'omission' in options ? baseToString(options.omission) : omission;
+ } else {
+ length = +options || 0;
+ }
+ }
+ string = baseToString(string);
+ if (length >= string.length) {
+ return string;
+ }
+ var end = length - omission.length;
+ if (end < 1) {
+ return omission;
+ }
+ var result = string.slice(0, end);
+ if (separator == null) {
+ return result + omission;
+ }
+ if (isRegExp(separator)) {
+ if (string.slice(end).search(separator)) {
+ var match,
+ newEnd,
+ substring = string.slice(0, end);
+
+ if (!separator.global) {
+ separator = RegExp(separator.source, (reFlags.exec(separator) || '') + 'g');
+ }
+ separator.lastIndex = 0;
+ while ((match = separator.exec(substring))) {
+ newEnd = match.index;
+ }
+ result = result.slice(0, newEnd == null ? end : newEnd);
+ }
+ } else if (string.indexOf(separator, end) != end) {
+ var index = result.lastIndexOf(separator);
+ if (index > -1) {
+ result = result.slice(0, index);
+ }
+ }
+ return result + omission;
+ }
+ function unescape(string) {
+ string = baseToString(string);
+ return (string && reHasEscapedHtml.test(string))
+ ? string.replace(reEscapedHtml, unescapeHtmlChar)
+ : string;
+ }
+ function words(string, pattern, guard) {
+ if (guard && isIterateeCall(string, pattern, guard)) {
+ pattern = undefined;
+ }
+ string = baseToString(string);
+ return string.match(pattern || reWords) || [];
+ }
+ var attempt = restParam(function(func, args) {
+ try {
+ return func.apply(undefined, args);
+ } catch(e) {
+ return isError(e) ? e : new Error(e);
+ }
+ });
+ function callback(func, thisArg, guard) {
+ if (guard && isIterateeCall(func, thisArg, guard)) {
+ thisArg = undefined;
+ }
+ return isObjectLike(func)
+ ? matches(func)
+ : baseCallback(func, thisArg);
+ }
+ function constant(value) {
+ return function() {
+ return value;
+ };
+ }
+ function identity(value) {
+ return value;
+ }
+ function matches(source) {
+ return baseMatches(baseClone(source, true));
+ }
+ function matchesProperty(path, srcValue) {
+ return baseMatchesProperty(path, baseClone(srcValue, true));
+ }
+ var method = restParam(function(path, args) {
+ return function(object) {
+ return invokePath(object, path, args);
+ };
+ });
+ var methodOf = restParam(function(object, args) {
+ return function(path) {
+ return invokePath(object, path, args);
+ };
+ });
+ function mixin(object, source, options) {
+ if (options == null) {
+ var isObj = isObject(source),
+ props = isObj ? keys(source) : undefined,
+ methodNames = (props && props.length) ? baseFunctions(source, props) : undefined;
+
+ if (!(methodNames ? methodNames.length : isObj)) {
+ methodNames = false;
+ options = source;
+ source = object;
+ object = this;
+ }
+ }
+ if (!methodNames) {
+ methodNames = baseFunctions(source, keys(source));
+ }
+ var chain = true,
+ index = -1,
+ isFunc = isFunction(object),
+ length = methodNames.length;
+
+ if (options === false) {
+ chain = false;
+ } else if (isObject(options) && 'chain' in options) {
+ chain = options.chain;
+ }
+ while (++index < length) {
+ var methodName = methodNames[index],
+ func = source[methodName];
+
+ object[methodName] = func;
+ if (isFunc) {
+ object.prototype[methodName] = (function(func) {
+ return function() {
+ var chainAll = this.__chain__;
+ if (chain || chainAll) {
+ var result = object(this.__wrapped__),
+ actions = result.__actions__ = arrayCopy(this.__actions__);
+
+ actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
+ result.__chain__ = chainAll;
+ return result;
+ }
+ return func.apply(object, arrayPush([this.value()], arguments));
+ };
+ }(func));
+ }
+ }
+ return object;
+ }
+ function noConflict() {
+ root._ = oldDash;
+ return this;
+ }
+ function noop() {
+ }
+ function property(path) {
+ return isKey(path) ? baseProperty(path) : basePropertyDeep(path);
+ }
+ function propertyOf(object) {
+ return function(path) {
+ return baseGet(object, toPath(path), path + '');
+ };
+ }
+ function range(start, end, step) {
+ if (step && isIterateeCall(start, end, step)) {
+ end = step = undefined;
+ }
+ start = +start || 0;
+ step = step == null ? 1 : (+step || 0);
+
+ if (end == null) {
+ end = start;
+ start = 0;
+ } else {
+ end = +end || 0;
+ }
+ var index = -1,
+ length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
+ result = Array(length);
+
+ while (++index < length) {
+ result[index] = start;
+ start += step;
+ }
+ return result;
+ }
+ function times(n, iteratee, thisArg) {
+ n = nativeFloor(n);
+ if (n < 1 || !nativeIsFinite(n)) {
+ return [];
+ }
+ var index = -1,
+ result = Array(nativeMin(n, MAX_ARRAY_LENGTH));
+
+ iteratee = bindCallback(iteratee, thisArg, 1);
+ while (++index < n) {
+ if (index < MAX_ARRAY_LENGTH) {
+ result[index] = iteratee(index);
+ } else {
+ iteratee(index);
+ }
+ }
+ return result;
+ }
+ function uniqueId(prefix) {
+ var id = ++idCounter;
+ return baseToString(prefix) + id;
+ }
+ function add(augend, addend) {
+ return (+augend || 0) + (+addend || 0);
+ }
+ var ceil = createRound('ceil');
+ var floor = createRound('floor');
+ var max = createExtremum(gt, NEGATIVE_INFINITY);
+ var min = createExtremum(lt, POSITIVE_INFINITY);
+ var round = createRound('round');
+ function sum(collection, iteratee, thisArg) {
+ if (thisArg && isIterateeCall(collection, iteratee, thisArg)) {
+ iteratee = undefined;
+ }
+ iteratee = getCallback(iteratee, thisArg, 3);
+ return iteratee.length == 1
+ ? arraySum(isArray(collection) ? collection : toIterable(collection), iteratee)
+ : baseSum(collection, iteratee);
+ }
+ lodash.prototype = baseLodash.prototype;
+
+ LodashWrapper.prototype = baseCreate(baseLodash.prototype);
+ LodashWrapper.prototype.constructor = LodashWrapper;
+
+ LazyWrapper.prototype = baseCreate(baseLodash.prototype);
+ LazyWrapper.prototype.constructor = LazyWrapper;
+ MapCache.prototype['delete'] = mapDelete;
+ MapCache.prototype.get = mapGet;
+ MapCache.prototype.has = mapHas;
+ MapCache.prototype.set = mapSet;
+ SetCache.prototype.push = cachePush;
+ memoize.Cache = MapCache;
+ lodash.after = after;
+ lodash.ary = ary;
+ lodash.assign = assign;
+ lodash.at = at;
+ lodash.before = before;
+ lodash.bind = bind;
+ lodash.bindAll = bindAll;
+ lodash.bindKey = bindKey;
+ lodash.callback = callback;
+ lodash.chain = chain;
+ lodash.chunk = chunk;
+ lodash.compact = compact;
+ lodash.constant = constant;
+ lodash.countBy = countBy;
+ lodash.create = create;
+ lodash.curry = curry;
+ lodash.curryRight = curryRight;
+ lodash.debounce = debounce;
+ lodash.defaults = defaults;
+ lodash.defaultsDeep = defaultsDeep;
+ lodash.defer = defer;
+ lodash.delay = delay;
+ lodash.difference = difference;
+ lodash.drop = drop;
+ lodash.dropRight = dropRight;
+ lodash.dropRightWhile = dropRightWhile;
+ lodash.dropWhile = dropWhile;
+ lodash.fill = fill;
+ lodash.filter = filter;
+ lodash.flatten = flatten;
+ lodash.flattenDeep = flattenDeep;
+ lodash.flow = flow;
+ lodash.flowRight = flowRight;
+ lodash.forEach = forEach;
+ lodash.forEachRight = forEachRight;
+ lodash.forIn = forIn;
+ lodash.forInRight = forInRight;
+ lodash.forOwn = forOwn;
+ lodash.forOwnRight = forOwnRight;
+ lodash.functions = functions;
+ lodash.groupBy = groupBy;
+ lodash.indexBy = indexBy;
+ lodash.initial = initial;
+ lodash.intersection = intersection;
+ lodash.invert = invert;
+ lodash.invoke = invoke;
+ lodash.keys = keys;
+ lodash.keysIn = keysIn;
+ lodash.map = map;
+ lodash.mapKeys = mapKeys;
+ lodash.mapValues = mapValues;
+ lodash.matches = matches;
+ lodash.matchesProperty = matchesProperty;
+ lodash.memoize = memoize;
+ lodash.merge = merge;
+ lodash.method = method;
+ lodash.methodOf = methodOf;
+ lodash.mixin = mixin;
+ lodash.modArgs = modArgs;
+ lodash.negate = negate;
+ lodash.omit = omit;
+ lodash.once = once;
+ lodash.pairs = pairs;
+ lodash.partial = partial;
+ lodash.partialRight = partialRight;
+ lodash.partition = partition;
+ lodash.pick = pick;
+ lodash.pluck = pluck;
+ lodash.property = property;
+ lodash.propertyOf = propertyOf;
+ lodash.pull = pull;
+ lodash.pullAt = pullAt;
+ lodash.range = range;
+ lodash.rearg = rearg;
+ lodash.reject = reject;
+ lodash.remove = remove;
+ lodash.rest = rest;
+ lodash.restParam = restParam;
+ lodash.set = set;
+ lodash.shuffle = shuffle;
+ lodash.slice = slice;
+ lodash.sortBy = sortBy;
+ lodash.sortByAll = sortByAll;
+ lodash.sortByOrder = sortByOrder;
+ lodash.spread = spread;
+ lodash.take = take;
+ lodash.takeRight = takeRight;
+ lodash.takeRightWhile = takeRightWhile;
+ lodash.takeWhile = takeWhile;
+ lodash.tap = tap;
+ lodash.throttle = throttle;
+ lodash.thru = thru;
+ lodash.times = times;
+ lodash.toArray = toArray;
+ lodash.toPlainObject = toPlainObject;
+ lodash.transform = transform;
+ lodash.union = union;
+ lodash.uniq = uniq;
+ lodash.unzip = unzip;
+ lodash.unzipWith = unzipWith;
+ lodash.values = values;
+ lodash.valuesIn = valuesIn;
+ lodash.where = where;
+ lodash.without = without;
+ lodash.wrap = wrap;
+ lodash.xor = xor;
+ lodash.zip = zip;
+ lodash.zipObject = zipObject;
+ lodash.zipWith = zipWith;
+ lodash.backflow = flowRight;
+ lodash.collect = map;
+ lodash.compose = flowRight;
+ lodash.each = forEach;
+ lodash.eachRight = forEachRight;
+ lodash.extend = assign;
+ lodash.iteratee = callback;
+ lodash.methods = functions;
+ lodash.object = zipObject;
+ lodash.select = filter;
+ lodash.tail = rest;
+ lodash.unique = uniq;
+ mixin(lodash, lodash);
+ lodash.add = add;
+ lodash.attempt = attempt;
+ lodash.camelCase = camelCase;
+ lodash.capitalize = capitalize;
+ lodash.ceil = ceil;
+ lodash.clone = clone;
+ lodash.cloneDeep = cloneDeep;
+ lodash.deburr = deburr;
+ lodash.endsWith = endsWith;
+ lodash.escape = escape;
+ lodash.escapeRegExp = escapeRegExp;
+ lodash.every = every;
+ lodash.find = find;
+ lodash.findIndex = findIndex;
+ lodash.findKey = findKey;
+ lodash.findLast = findLast;
+ lodash.findLastIndex = findLastIndex;
+ lodash.findLastKey = findLastKey;
+ lodash.findWhere = findWhere;
+ lodash.first = first;
+ lodash.floor = floor;
+ lodash.get = get;
+ lodash.gt = gt;
+ lodash.gte = gte;
+ lodash.has = has;
+ lodash.identity = identity;
+ lodash.includes = includes;
+ lodash.indexOf = indexOf;
+ lodash.inRange = inRange;
+ lodash.isArguments = isArguments;
+ lodash.isArray = isArray;
+ lodash.isBoolean = isBoolean;
+ lodash.isDate = isDate;
+ lodash.isElement = isElement;
+ lodash.isEmpty = isEmpty;
+ lodash.isEqual = isEqual;
+ lodash.isError = isError;
+ lodash.isFinite = isFinite;
+ lodash.isFunction = isFunction;
+ lodash.isMatch = isMatch;
+ lodash.isNaN = isNaN;
+ lodash.isNative = isNative;
+ lodash.isNull = isNull;
+ lodash.isNumber = isNumber;
+ lodash.isObject = isObject;
+ lodash.isPlainObject = isPlainObject;
+ lodash.isRegExp = isRegExp;
+ lodash.isString = isString;
+ lodash.isTypedArray = isTypedArray;
+ lodash.isUndefined = isUndefined;
+ lodash.kebabCase = kebabCase;
+ lodash.last = last;
+ lodash.lastIndexOf = lastIndexOf;
+ lodash.lt = lt;
+ lodash.lte = lte;
+ lodash.max = max;
+ lodash.min = min;
+ lodash.noConflict = noConflict;
+ lodash.noop = noop;
+ lodash.now = now;
+ lodash.pad = pad;
+ lodash.padLeft = padLeft;
+ lodash.padRight = padRight;
+ lodash.parseInt = parseInt;
+ lodash.random = random;
+ lodash.reduce = reduce;
+ lodash.reduceRight = reduceRight;
+ lodash.repeat = repeat;
+ lodash.result = result;
+ lodash.round = round;
+ lodash.runInContext = runInContext;
+ lodash.size = size;
+ lodash.snakeCase = snakeCase;
+ lodash.some = some;
+ lodash.sortedIndex = sortedIndex;
+ lodash.sortedLastIndex = sortedLastIndex;
+ lodash.startCase = startCase;
+ lodash.startsWith = startsWith;
+ lodash.sum = sum;
+ lodash.template = template;
+ lodash.trim = trim;
+ lodash.trimLeft = trimLeft;
+ lodash.trimRight = trimRight;
+ lodash.trunc = trunc;
+ lodash.unescape = unescape;
+ lodash.uniqueId = uniqueId;
+ lodash.words = words;
+ lodash.all = every;
+ lodash.any = some;
+ lodash.contains = includes;
+ lodash.eq = isEqual;
+ lodash.detect = find;
+ lodash.foldl = reduce;
+ lodash.foldr = reduceRight;
+ lodash.head = first;
+ lodash.include = includes;
+ lodash.inject = reduce;
+
+ mixin(lodash, (function() {
+ var source = {};
+ baseForOwn(lodash, function(func, methodName) {
+ if (!lodash.prototype[methodName]) {
+ source[methodName] = func;
+ }
+ });
+ return source;
+ }()), false);
+ lodash.sample = sample;
+
+ lodash.prototype.sample = function(n) {
+ if (!this.__chain__ && n == null) {
+ return sample(this.value());
+ }
+ return this.thru(function(value) {
+ return sample(value, n);
+ });
+ };
+ lodash.VERSION = VERSION;
+ arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
+ lodash[methodName].placeholder = lodash;
+ });
+ arrayEach(['drop', 'take'], function(methodName, index) {
+ LazyWrapper.prototype[methodName] = function(n) {
+ var filtered = this.__filtered__;
+ if (filtered && !index) {
+ return new LazyWrapper(this);
+ }
+ n = n == null ? 1 : nativeMax(nativeFloor(n) || 0, 0);
+
+ var result = this.clone();
+ if (filtered) {
+ result.__takeCount__ = nativeMin(result.__takeCount__, n);
+ } else {
+ result.__views__.push({ 'size': n, 'type': methodName + (result.__dir__ < 0 ? 'Right' : '') });
+ }
+ return result;
+ };
+
+ LazyWrapper.prototype[methodName + 'Right'] = function(n) {
+ return this.reverse()[methodName](n).reverse();
+ };
+ });
+ arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
+ var type = index + 1,
+ isFilter = type != LAZY_MAP_FLAG;
+
+ LazyWrapper.prototype[methodName] = function(iteratee, thisArg) {
+ var result = this.clone();
+ result.__iteratees__.push({ 'iteratee': getCallback(iteratee, thisArg, 1), 'type': type });
+ result.__filtered__ = result.__filtered__ || isFilter;
+ return result;
+ };
+ });
+ arrayEach(['first', 'last'], function(methodName, index) {
+ var takeName = 'take' + (index ? 'Right' : '');
+
+ LazyWrapper.prototype[methodName] = function() {
+ return this[takeName](1).value()[0];
+ };
+ });
+ arrayEach(['initial', 'rest'], function(methodName, index) {
+ var dropName = 'drop' + (index ? '' : 'Right');
+
+ LazyWrapper.prototype[methodName] = function() {
+ return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
+ };
+ });
+ arrayEach(['pluck', 'where'], function(methodName, index) {
+ var operationName = index ? 'filter' : 'map',
+ createCallback = index ? baseMatches : property;
+
+ LazyWrapper.prototype[methodName] = function(value) {
+ return this[operationName](createCallback(value));
+ };
+ });
+
+ LazyWrapper.prototype.compact = function() {
+ return this.filter(identity);
+ };
+
+ LazyWrapper.prototype.reject = function(predicate, thisArg) {
+ predicate = getCallback(predicate, thisArg, 1);
+ return this.filter(function(value) {
+ return !predicate(value);
+ });
+ };
+
+ LazyWrapper.prototype.slice = function(start, end) {
+ start = start == null ? 0 : (+start || 0);
+
+ var result = this;
+ if (result.__filtered__ && (start > 0 || end < 0)) {
+ return new LazyWrapper(result);
+ }
+ if (start < 0) {
+ result = result.takeRight(-start);
+ } else if (start) {
+ result = result.drop(start);
+ }
+ if (end !== undefined) {
+ end = (+end || 0);
+ result = end < 0 ? result.dropRight(-end) : result.take(end - start);
+ }
+ return result;
+ };
+
+ LazyWrapper.prototype.takeRightWhile = function(predicate, thisArg) {
+ return this.reverse().takeWhile(predicate, thisArg).reverse();
+ };
+
+ LazyWrapper.prototype.toArray = function() {
+ return this.take(POSITIVE_INFINITY);
+ };
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+ var checkIteratee = /^(?:filter|map|reject)|While$/.test(methodName),
+ retUnwrapped = /^(?:first|last)$/.test(methodName),
+ lodashFunc = lodash[retUnwrapped ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName];
+
+ if (!lodashFunc) {
+ return;
+ }
+ lodash.prototype[methodName] = function() {
+ var args = retUnwrapped ? [1] : arguments,
+ chainAll = this.__chain__,
+ value = this.__wrapped__,
+ isHybrid = !!this.__actions__.length,
+ isLazy = value instanceof LazyWrapper,
+ iteratee = args[0],
+ useLazy = isLazy || isArray(value);
+
+ if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
+ isLazy = useLazy = false;
+ }
+ var interceptor = function(value) {
+ return (retUnwrapped && chainAll)
+ ? lodashFunc(value, 1)[0]
+ : lodashFunc.apply(undefined, arrayPush([value], args));
+ };
+
+ var action = { 'func': thru, 'args': [interceptor], 'thisArg': undefined },
+ onlyLazy = isLazy && !isHybrid;
+
+ if (retUnwrapped && !chainAll) {
+ if (onlyLazy) {
+ value = value.clone();
+ value.__actions__.push(action);
+ return func.call(value);
+ }
+ return lodashFunc.call(undefined, this.value())[0];
+ }
+ if (!retUnwrapped && useLazy) {
+ value = onlyLazy ? value : new LazyWrapper(this);
+ var result = func.apply(value, args);
+ result.__actions__.push(action);
+ return new LodashWrapper(result, chainAll);
+ }
+ return this.thru(interceptor);
+ };
+ });
+ arrayEach(['join', 'pop', 'push', 'replace', 'shift', 'sort', 'splice', 'split', 'unshift'], function(methodName) {
+ var func = (/^(?:replace|split)$/.test(methodName) ? stringProto : arrayProto)[methodName],
+ chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
+ retUnwrapped = /^(?:join|pop|replace|shift)$/.test(methodName);
+
+ lodash.prototype[methodName] = function() {
+ var args = arguments;
+ if (retUnwrapped && !this.__chain__) {
+ return func.apply(this.value(), args);
+ }
+ return this[chainName](function(value) {
+ return func.apply(value, args);
+ });
+ };
+ });
+ baseForOwn(LazyWrapper.prototype, function(func, methodName) {
+ var lodashFunc = lodash[methodName];
+ if (lodashFunc) {
+ var key = lodashFunc.name,
+ names = realNames[key] || (realNames[key] = []);
+
+ names.push({ 'name': methodName, 'func': lodashFunc });
+ }
+ });
+
+ realNames[createHybridWrapper(undefined, BIND_KEY_FLAG).name] = [{ 'name': 'wrapper', 'func': undefined }];
+ LazyWrapper.prototype.clone = lazyClone;
+ LazyWrapper.prototype.reverse = lazyReverse;
+ LazyWrapper.prototype.value = lazyValue;
+ lodash.prototype.chain = wrapperChain;
+ lodash.prototype.commit = wrapperCommit;
+ lodash.prototype.concat = wrapperConcat;
+ lodash.prototype.plant = wrapperPlant;
+ lodash.prototype.reverse = wrapperReverse;
+ lodash.prototype.toString = wrapperToString;
+ lodash.prototype.run = lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
+ lodash.prototype.collect = lodash.prototype.map;
+ lodash.prototype.head = lodash.prototype.first;
+ lodash.prototype.select = lodash.prototype.filter;
+ lodash.prototype.tail = lodash.prototype.rest;
+
+ return lodash;
+ }
+ var _ = runInContext();
+ if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) {
+ root._ = _;
+ ace.define(function() {
+ return _;
+ });
+ }
+ else if (freeExports && freeModule) {
+ if (moduleExports) {
+ (freeModule.exports = _)._ = _;
+ }
+ else {
+ freeExports._ = _;
+ }
+ }
+ else {
+ root._ = _;
+ }
+}.call(this));
+
+}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
+},{}]},{},["/node_modules/xqlint/lib/xqlint.js"]);
+
+});
+
+ace.define("ace/mode/xquery_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/xquery/xqlint"], function(require, exports, module) {
+"use strict";
+
+var oop = require("../lib/oop");
+var Mirror = require("../worker/mirror").Mirror;
+var XQLintLib = require("./xquery/xqlint");
+var XQLint = XQLintLib.XQLint;
+
+var getModuleResolverFromModules = function(modules){
+ return function(uri){
+ var index = modules;
+ var mod = index[uri];
+ var variables = {};
+ var functions = {};
+ mod.functions.forEach(function(fn){
+ functions[uri + '#' + fn.name + '#' + fn.arity] = {
+ params: []
+ };
+ fn.parameters.forEach(function(param){
+ functions[uri + '#' + fn.name + '#' + fn.arity].params.push('$' + param.name);
+ });
+ });
+ mod.variables.forEach(function(variable){
+ var name = variable.name.substring(variable.name.indexOf(':') + 1);
+ variables[uri + '#' + name] = { type: 'VarDecl', annotations: [] };
+ });
+ return {
+ variables: variables,
+ functions: functions
+ };
+ };
+};
+
+var XQueryWorker = exports.XQueryWorker = function(sender) {
+ Mirror.call(this, sender);
+ this.setTimeout(200);
+ var that = this;
+
+ this.sender.on("complete", function(e){
+ if(that.xqlint) {
+ var pos = { line: e.data.pos.row, col: e.data.pos.column };
+ var proposals = that.xqlint.getCompletions(pos);
+ that.sender.emit("complete", proposals);
+ }
+ });
+
+ this.sender.on("setAvailableModuleNamespaces", function(e){
+ that.availableModuleNamespaces = e.data;
+ });
+
+ this.sender.on("setFileName", function(e){
+ that.fileName = e.data;
+ });
+
+ this.sender.on("setModuleResolver", function(e){
+ that.moduleResolver = getModuleResolverFromModules(e.data);
+ });
+};
+
+oop.inherits(XQueryWorker, Mirror);
+
+(function() {
+
+ this.onUpdate = function() {
+ this.sender.emit("start");
+ var value = this.doc.getValue();
+ var sctx = XQLintLib.createStaticContext();
+ if(this.moduleResolver) {
+ sctx.setModuleResolver(this.moduleResolver);
+ }
+ if(this.availableModuleNamespaces) {
+ sctx.availableModuleNamespaces = this.availableModuleNamespaces;
+ }
+ var opts = {
+ styleCheck: this.styleCheck,
+ staticContext: sctx,
+ fileName: this.fileName
+ };
+ this.xqlint = new XQLint(value, opts);
+ this.sender.emit("markers", this.xqlint.getMarkers());
+ };
+}).call(XQueryWorker.prototype);
+
+});
+
+ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) {
+
+function Empty() {}
+
+if (!Function.prototype.bind) {
+ Function.prototype.bind = function bind(that) { // .length is 1
+ var target = this;
+ if (typeof target != "function") {
+ throw new TypeError("Function.prototype.bind called on incompatible " + target);
+ }
+ var args = slice.call(arguments, 1); // for normal call
+ var bound = function () {
+
+ if (this instanceof bound) {
+
+ var result = target.apply(
+ this,
+ args.concat(slice.call(arguments))
+ );
+ if (Object(result) === result) {
+ return result;
+ }
+ return this;
+
+ } else {
+ return target.apply(
+ that,
+ args.concat(slice.call(arguments))
+ );
+
+ }
+
+ };
+ if(target.prototype) {
+ Empty.prototype = target.prototype;
+ bound.prototype = new Empty();
+ Empty.prototype = null;
+ }
+ 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 ([1,2].splice(0).length != 2) {
+ if(function() { // test IE < 9 to splice bug - see issue #138
+ function makeArray(l) {
+ var a = new Array(l+2);
+ a[0] = a[1] = 0;
+ return a;
+ }
+ var array = [], lengthBefore;
+
+ array.splice.apply(array, makeArray(20));
+ array.splice.apply(array, makeArray(26));
+
+ lengthBefore = array.length; //46
+ array.splice(5, 0, "XXX"); // add one element
+
+ lengthBefore + 1 == array.length
+
+ if (lengthBefore + 1 == array.length) {
+ return true;// has right splice implementation without bugs
+ }
+ }()) {//IE 6/7
+ var array_splice = Array.prototype.splice;
+ Array.prototype.splice = function(start, deleteCount) {
+ if (!arguments.length) {
+ return [];
+ } else {
+ return array_splice.apply(this, [
+ start === void 0 ? 0 : start,
+ deleteCount === void 0 ? (this.length - start) : deleteCount
+ ].concat(slice.call(arguments, 2)))
+ }
+ };
+ } else {//IE8
+ Array.prototype.splice = function(pos, removeCount){
+ var length = this.length;
+ if (pos > 0) {
+ if (pos > length)
+ pos = length;
+ } else if (pos == void 0) {
+ pos = 0;
+ } else if (pos < 0) {
+ pos = Math.max(length + pos, 0);
+ }
+
+ if (!(pos+removeCount < length))
+ removeCount = length - pos;
+
+ var removed = this.slice(pos, pos+removeCount);
+ var insert = slice.call(arguments, 2);
+ var add = insert.length;
+ if (pos === length) {
+ if (add) {
+ this.push.apply(this, insert);
+ }
+ } else {
+ var remove = Math.min(removeCount, length - pos);
+ var tailOldPos = pos + remove;
+ var tailNewPos = tailOldPos + add - remove;
+ var tailCount = length - tailOldPos;
+ var lengthAfterRemove = length - remove;
+
+ if (tailNewPos < tailOldPos) { // case A
+ for (var i = 0; i < tailCount; ++i) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } else if (tailNewPos > tailOldPos) { // case B
+ for (i = tailCount; i--; ) {
+ this[tailNewPos+i] = this[tailOldPos+i];
+ }
+ } // else, add == remove (nothing to do)
+
+ if (add && pos === lengthAfterRemove) {
+ this.length = lengthAfterRemove; // truncate array
+ this.push.apply(this, insert);
+ } else {
+ this.length = lengthAfterRemove + add; // reserves space
+ for (i = 0; i < add; ++i) {
+ this[pos+i] = insert[i];
+ }
+ }
+ }
+ return removed;
+ };
+ }
+}
+if (!Array.isArray) {
+ Array.isArray = function isArray(obj) {
+ return _toString(obj) == "[object Array]";
+ };
+}
+var boxedString = Object("a"),
+ splitString = boxedString[0] != "a" || !(0 in boxedString);
+
+if (!Array.prototype.forEach) {
+ Array.prototype.forEach = function forEach(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ thisp = arguments[1],
+ i = -1,
+ 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, object);
+ }
+ }
+ };
+}
+if (!Array.prototype.map) {
+ Array.prototype.map = function map(fun /*, thisp*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = Array(length),
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self)
+ result[i] = fun.call(thisp, self[i], i, object);
+ }
+ return result;
+ };
+}
+if (!Array.prototype.filter) {
+ Array.prototype.filter = function filter(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ result = [],
+ value,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self) {
+ value = self[i];
+ if (fun.call(thisp, value, i, object)) {
+ result.push(value);
+ }
+ }
+ }
+ return result;
+ };
+}
+if (!Array.prototype.every) {
+ Array.prototype.every = function every(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && !fun.call(thisp, self[i], i, object)) {
+ return false;
+ }
+ }
+ return true;
+ };
+}
+if (!Array.prototype.some) {
+ Array.prototype.some = function some(fun /*, thisp */) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0,
+ thisp = arguments[1];
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+
+ for (var i = 0; i < length; i++) {
+ if (i in self && fun.call(thisp, self[i], i, object)) {
+ return true;
+ }
+ }
+ return false;
+ };
+}
+if (!Array.prototype.reduce) {
+ Array.prototype.reduce = function reduce(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduce of empty array with no initial value");
+ }
+
+ 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("reduce of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ for (; i < length; i++) {
+ if (i in self) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ }
+
+ return result;
+ };
+}
+if (!Array.prototype.reduceRight) {
+ Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) {
+ var object = toObject(this),
+ self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ object,
+ length = self.length >>> 0;
+ if (_toString(fun) != "[object Function]") {
+ throw new TypeError(fun + " is not a function");
+ }
+ if (!length && arguments.length == 1) {
+ throw new TypeError("reduceRight of empty array with no initial value");
+ }
+
+ 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("reduceRight of empty array with no initial value");
+ }
+ } while (true);
+ }
+
+ do {
+ if (i in this) {
+ result = fun.call(void 0, result, self[i], i, object);
+ }
+ } while (i--);
+
+ return result;
+ };
+}
+if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) {
+ Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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 || ([0, 1].lastIndexOf(0, -3) != -1)) {
+ Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) {
+ var self = splitString && _toString(this) == "[object String]" ?
+ this.split("") :
+ 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.now) {
+ Date.now = function now() {
+ return new Date().getTime();
+ };
+}
+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, "");
+ };
+}
+
+function toInteger(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;
+}
+
+function isPrimitive(input) {
+ var type = typeof input;
+ return (
+ input === null ||
+ type === "undefined" ||
+ type === "boolean" ||
+ type === "number" ||
+ type === "string"
+ );
+}
+
+function toPrimitive(input) {
+ var val, valueOf, toString;
+ if (isPrimitive(input)) {
+ return input;
+ }
+ valueOf = input.valueOf;
+ if (typeof valueOf === "function") {
+ val = valueOf.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ toString = input.toString;
+ if (typeof toString === "function") {
+ val = toString.call(input);
+ if (isPrimitive(val)) {
+ return val;
+ }
+ }
+ throw new TypeError();
+}
+var toObject = function (o) {
+ if (o == null) { // this matches both null and undefined
+ throw new TypeError("can't convert "+o+" to object");
+ }
+ return Object(o);
+};
+
+});
diff --git a/www/wiki/extensions/CodeEditor/modules/ext.codeEditor.js b/www/wiki/extensions/CodeEditor/modules/ext.codeEditor.js
new file mode 100644
index 00000000..7f77ff31
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/ext.codeEditor.js
@@ -0,0 +1,36 @@
+/**
+ * MediaWiki:Gadget-codeeditor.js
+ * (c) 2011 Brion Vibber <brion @ pobox.com>
+ * GPLv2 or later
+ *
+ * Syntax highlighting, auto-indenting code editor widget for on-wiki JS and CSS pages.
+ * Uses embedded Ajax.org Cloud9 Editor: https://ace.c9.io/
+ *
+ * Known issues:
+ * - extension version doesn't have optional bits correct
+ * - ties into WikiEditor, so doesn't work on classic toolbar
+ * - background worker for JS syntax check doesn't load in non-debug mode (probably also fails if extension assets are offsite)
+ * - copy/paste not available from context menu (Firefox, Chrome on Linux -- kbd & main menu commands ok)
+ * - accessibility: tab/shift-tab are overridden. is there a consistent alternative for keyboard-reliant users?
+ * - accessibility: accesskey on the original textarea needs to be moved over or otherwise handled
+ * - 'discard your changes?' check on tab close doesn't trigger
+ * - scrollbar initializes too wide; need to trigger resize check after that's filled
+ * - cursor/scroll position not maintained over previews/show changes
+ */
+/*
+ * JavaScript for WikiEditor Table of Contents
+ */
+
+$( function () {
+ var $wpTextbox1 = $( '#wpTextbox1' );
+
+ // Code is supposed to be always LTR. See bug 39364.
+ $wpTextbox1.parent().prop( 'dir', 'ltr' );
+
+ // Add code editor module
+ $wpTextbox1.wikiEditor( 'addModule', 'codeEditor' );
+
+ $wpTextbox1.on( 'wikiEditor-toolbar-doneInitialSections', function () {
+ $wpTextbox1.data( 'wikiEditor-context' ).fn.codeEditorMonitorFragment();
+ } );
+} );
diff --git a/www/wiki/extensions/CodeEditor/modules/jquery.codeEditor.js b/www/wiki/extensions/CodeEditor/modules/jquery.codeEditor.js
new file mode 100644
index 00000000..8ab5bd6c
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/jquery.codeEditor.js
@@ -0,0 +1,851 @@
+/* Ace syntax-highlighting code editor extension for wikiEditor */
+/* global ace */
+( function ( $, mw, OO ) {
+ $.wikiEditor.modules.codeEditor = {
+ /**
+ * Core Requirements
+ */
+ req: [ 'codeEditor' ],
+ /**
+ * Configuration
+ */
+ cfg: {
+ //
+ },
+ /**
+ * API accessible functions
+ */
+ api: {
+ //
+ },
+ /**
+ * Event handlers
+ */
+ evt: {
+ //
+ },
+ /**
+ * Internally used functions
+ */
+ fn: {
+ }
+
+ };
+
+ $.wikiEditor.extensions.codeEditor = function ( context ) {
+ var saveAndExtend,
+ textSelectionFn,
+ hasErrorsOnSave = false,
+ selectedLine = 0,
+ cookieEnabled,
+ returnFalse = function () { return false; },
+ api = new mw.Api();
+
+ // Initialize state
+ cookieEnabled = parseInt( mw.cookie.get( 'codeEditor-' + context.instance + '-showInvisibleChars' ), 10 );
+ context.showInvisibleChars = ( cookieEnabled === 1 );
+ cookieEnabled = parseInt( mw.cookie.get( 'codeEditor-' + context.instance + '-lineWrappingActive' ), 10 );
+ context.lineWrappingActive = ( cookieEnabled === 1 );
+ context.showSearchReplace = 0;
+
+ /*
+ * Event Handlers
+ *
+ * WikiEditor inspects the 'evt' object for event names and uses them if present as additional
+ * event handlers that fire before the default handling.
+ * To prevent WikiEditor from running its own handling, handlers should return false.
+ *
+ * This is also where we can attach some extra information to the events.
+ */
+ context.evt = $.extend( context.evt, {
+ keydown: returnFalse,
+ change: returnFalse,
+ delayedChange: returnFalse,
+ cut: returnFalse,
+ paste: returnFalse,
+ ready: returnFalse,
+ codeEditorSubmit: function () {
+ var form = this;
+ context.evt.codeEditorSync();
+ if ( hasErrorsOnSave ) {
+ hasErrorsOnSave = false;
+ OO.ui.confirm( mw.msg( 'codeeditor-save-with-errors' ) ).done( function ( confirmed ) {
+ if ( confirmed ) {
+ // Programmatic submit doesn't retrigger this event listener
+ form.submit();
+ }
+ } );
+ return false;
+ }
+ return true;
+ },
+ codeEditorSave: function () {
+ var i,
+ annotations = context.codeEditor.getSession().getAnnotations();
+ for ( i = 0; i < annotations.length; i++ ) {
+ if ( annotations[ i ].type === 'error' ) {
+ hasErrorsOnSave = true;
+ break;
+ }
+ }
+ },
+ codeEditorSync: function () {
+ context.$textarea.val( context.$textarea.textSelection( 'getContents' ) );
+
+ }
+ } );
+
+ // Make sure to cast '0' to false
+ context.codeEditorActive = !!Number( mw.user.options.get( 'usecodeeditor' ) );
+
+ /**
+ * Internally used functions
+ */
+ context.fn = $.extend( context.fn, {
+ isCodeEditorActive: function () {
+ return context.codeEditorActive;
+ },
+ isShowInvisibleChars: function () {
+ return context.showInvisibleChars;
+ },
+ isLineWrappingActive: function () {
+ return context.lineWrappingActive;
+ },
+ changeCookieValue: function ( cookieName, value ) {
+ mw.cookie.set(
+ 'codeEditor-' + context.instance + '-' + cookieName,
+ value
+ );
+ },
+ aceGotoLineColumn: function () {
+ OO.ui.prompt( mw.msg( 'codeeditor-gotoline-prompt' ), {
+ textInput: { placeholder: mw.msg( 'codeeditor-gotoline-placeholder' ) }
+ } ).done( function ( result ) {
+ var matches, line, column;
+
+ if ( !result ) {
+ return;
+ }
+
+ matches = result.split( ':' );
+ line = 0;
+ column = 0;
+
+ if ( matches.length > 0 ) {
+ line = +matches[ 0 ];
+ if ( isNaN( line ) ) {
+ return;
+ } else {
+ // Lines are zero-indexed
+ line--;
+ }
+ }
+ if ( matches.length > 1 ) {
+ column = +matches[ 1 ];
+ if ( isNaN( column ) ) {
+ column = 0;
+ }
+ }
+ context.codeEditor.navigateTo( line, column );
+ // Scroll up a bit to give some context
+ context.codeEditor.scrollToRow( line - 4 );
+ } );
+ },
+ setupCodeEditorToolbar: function () {
+ var toggleEditor,
+ toggleInvisibleChars,
+ toggleSearchReplace,
+ toggleLineWrapping,
+ indent, outdent, gotoLine;
+
+ toggleEditor = function ( context ) {
+ context.codeEditorActive = !context.codeEditorActive;
+
+ context.fn.setCodeEditorPreference( context.codeEditorActive );
+ context.fn.updateCodeEditorToolbarButton();
+
+ if ( context.codeEditorActive ) {
+ // set it back up!
+ context.fn.setupCodeEditor();
+ } else {
+ context.fn.disableCodeEditor();
+ }
+ };
+ toggleInvisibleChars = function ( context ) {
+ context.showInvisibleChars = !context.showInvisibleChars;
+
+ context.fn.changeCookieValue( 'showInvisibleChars', context.showInvisibleChars ? 1 : 0 );
+ context.fn.updateInvisibleCharsButton();
+
+ context.codeEditor.setShowInvisibles( context.showInvisibleChars );
+ };
+ toggleSearchReplace = function ( context ) {
+ context.showSearchReplace = !context.showSearchReplace;
+
+ if ( context.showSearchReplace ) {
+ ace.config.loadModule( 'ace/ext/searchbox', function ( e ) {
+ // ace.editor.searchBox.show();
+ e.Search( context.codeEditor, !0 );
+ } );
+ } else {
+ context.codeEditor.searchBox.hide();
+ }
+ };
+ toggleLineWrapping = function ( context ) {
+ context.lineWrappingActive = !context.lineWrappingActive;
+
+ context.fn.changeCookieValue( 'lineWrappingActive', context.lineWrappingActive ? 1 : 0 );
+ context.fn.updateLineWrappingButton();
+
+ context.codeEditor.getSession().setUseWrapMode( context.lineWrappingActive );
+ };
+ indent = function ( context ) {
+ context.codeEditor.execCommand( 'indent' );
+ };
+ outdent = function ( context ) {
+ context.codeEditor.execCommand( 'outdent' );
+ };
+ gotoLine = function ( context ) {
+ context.codeEditor.execCommand( 'gotolinecolumn' );
+ };
+
+ context.api.addToToolbar( context, {
+ section: 'main',
+ groups: {
+ 'codeeditor-main': {
+ tools: {
+ codeEditor: {
+ labelMsg: 'codeeditor-toolbar-toggle',
+ type: 'button',
+ oouiIcon: 'markup',
+ action: {
+ type: 'callback',
+ execute: toggleEditor
+ }
+ }
+ }
+ },
+ 'codeeditor-format': {
+ tools: {
+ indent: {
+ labelMsg: 'codeeditor-indent',
+ type: 'button',
+ oouiIcon: 'indent',
+ action: {
+ type: 'callback',
+ execute: indent
+ }
+ },
+ outdent: {
+ labelMsg: 'codeeditor-outdent',
+ type: 'button',
+ oouiIcon: 'outdent',
+ action: {
+ type: 'callback',
+ execute: outdent
+ }
+ }
+
+ }
+ },
+ 'codeeditor-style': {
+ tools: {
+ invisibleChars: {
+ labelMsg: 'codeeditor-invisibleChars-toggle',
+ type: 'button',
+ oouiIcon: 'pilcrow',
+ action: {
+ type: 'callback',
+ execute: toggleInvisibleChars
+ }
+ },
+ lineWrapping: {
+ labelMsg: 'codeeditor-lineWrapping-toggle',
+ type: 'button',
+ oouiIcon: 'wrapping',
+ action: {
+ type: 'callback',
+ execute: toggleLineWrapping
+ }
+ },
+ gotoLine: {
+ labelMsg: 'codeeditor-gotoline',
+ type: 'button',
+ oouiIcon: 'gotoLine',
+ action: {
+ type: 'callback',
+ execute: gotoLine
+ }
+ },
+ toggleSearchReplace: {
+ labelMsg: 'codeeditor-searchReplace-toggle',
+ type: 'button',
+ oouiIcon: 'articleSearch',
+ action: {
+ type: 'callback',
+ execute: toggleSearchReplace
+ }
+ }
+ }
+ }
+ }
+ } );
+ context.fn.updateCodeEditorToolbarButton();
+ context.fn.updateInvisibleCharsButton();
+ context.fn.updateLineWrappingButton();
+ $( '.group-codeeditor-style' ).prependTo( '.section-main' );
+ $( '.group-codeeditor-format' ).prependTo( '.section-main' );
+ $( '.group-codeeditor-main' ).prependTo( '.section-main' );
+ },
+ updateButtonIcon: function ( targetName, iconFn ) {
+ var target = '.tool[rel=' + targetName + ']',
+ $button = context.modules.toolbar.$toolbar.find( target );
+
+ $button.data( 'setActive' )( iconFn() );
+ },
+ updateCodeEditorToolbarButton: function () {
+ context.fn.updateButtonIcon( 'codeEditor', context.fn.isCodeEditorActive );
+ },
+ updateInvisibleCharsButton: function () {
+ context.fn.updateButtonIcon( 'invisibleChars', context.fn.isShowInvisibleChars );
+ },
+ updateLineWrappingButton: function () {
+ context.fn.updateButtonIcon( 'lineWrapping', context.fn.isLineWrappingActive );
+ },
+ setCodeEditorPreference: function ( prefValue ) {
+ // Do not try to save options for anonymous user
+ if ( mw.user.isAnon() ) {
+ return;
+ }
+
+ // Abort any previous request
+ api.abort();
+
+ api.saveOption( 'usecodeeditor', prefValue ? 1 : 0 )
+ .fail( function ( code, result ) {
+ var message;
+
+ if ( code === 'http' && result.textStatus === 'abort' ) {
+ // Request was aborted. Ignore error
+ return;
+ }
+
+ message = 'Failed to set code editor preference: ' + code;
+ if ( result.error && result.error.info ) {
+ message += '\n' + result.error.info;
+ }
+ mw.log.warn( message );
+ } );
+ },
+ /**
+ * Sets up the iframe in place of the textarea to allow more advanced operations
+ */
+ setupCodeEditor: function () {
+ var box, lang, basePath, container, editdiv, session;
+
+ box = context.$textarea;
+ lang = mw.config.get( 'wgCodeEditorCurrentLanguage' );
+ basePath = mw.config.get( 'wgExtensionAssetsPath', '' );
+ if ( basePath.slice( 0, 2 ) === '//' ) {
+ // ACE uses web workers, which have importScripts, which don't like relative links.
+ // This is a problem only when the assets are on another server, so this rewrite should suffice
+ // Protocol relative
+ basePath = window.location.protocol + basePath;
+ }
+ ace.config.set( 'basePath', basePath + '/CodeEditor/modules/ace' );
+
+ if ( lang ) {
+ // Ace doesn't like replacing a textarea directly.
+ // We'll stub this out to sit on top of it...
+ // line-height is needed to compensate for oddity in WikiEditor extension, which zeroes the line-height on a parent container
+ container = context.$codeEditorContainer = $( '<div style="position: relative"><div class="editor" style="line-height: 1.5em; top: 0; left: 0; right: 0; bottom: 0; position: absolute;"></div></div>' ).insertAfter( box );
+ editdiv = container.find( '.editor' );
+
+ box.css( 'display', 'none' );
+ container.height( box.height() );
+
+ // Non-lazy loaded dependencies: Enable code completion
+ ace.require( 'ace/ext/language_tools' );
+
+ // Load the editor now
+ context.codeEditor = ace.edit( editdiv[ 0 ] );
+ context.codeEditor.getSession().setValue( box.val() );
+ box.textSelection( 'register', textSelectionFn );
+
+ // Disable some annoying commands
+ context.codeEditor.commands.removeCommand( 'replace' ); // ctrl+R
+ context.codeEditor.commands.removeCommand( 'transposeletters' ); // ctrl+T
+ context.codeEditor.commands.removeCommand( 'gotoline' ); // ctrl+L
+
+ context.codeEditor.setReadOnly( box.prop( 'readonly' ) );
+ context.codeEditor.setShowInvisibles( context.showInvisibleChars );
+
+ // The options to enable
+ context.codeEditor.setOptions( {
+ enableBasicAutocompletion: true,
+ enableSnippets: true
+ } );
+
+ context.codeEditor.commands.addCommand( {
+ name: 'gotolinecolumn',
+ bindKey: { mac: 'Command-Shift-L', windows: 'Ctrl-Alt-L' },
+ exec: context.fn.aceGotoLineColumn,
+ readOnly: true
+ } );
+
+ box.closest( 'form' )
+ .submit( context.evt.codeEditorSubmit )
+ .find( '#wpSave' ).click( context.evt.codeEditorSave );
+
+ session = context.codeEditor.getSession();
+
+ // Use proper tabs
+ session.setUseSoftTabs( false );
+ session.setUseWrapMode( context.lineWrappingActive );
+
+ mw.hook( 'codeEditor.configure' ).fire( session );
+
+ ace.config.loadModule( 'ace/ext/modelist', function ( modelist ) {
+ if ( !modelist || !modelist.modesByName[ lang ] ) {
+ lang = 'text';
+ }
+ session.setMode( 'ace/mode/' + lang );
+ } );
+
+ // Use jquery.ui.resizable so user can make the box taller too
+ container.resizable( {
+ handles: 's',
+ minHeight: box.height(),
+ resize: function () {
+ context.codeEditor.resize();
+ }
+ } );
+ $( '.wikiEditor-ui-toolbar' ).addClass( 'codeEditor-ui-toolbar' );
+
+ if ( selectedLine > 0 ) {
+ // Line numbers in CodeEditor are zero-based
+ context.codeEditor.navigateTo( selectedLine - 1, 0 );
+ // Scroll up a bit to give some context
+ context.codeEditor.scrollToRow( selectedLine - 4 );
+ }
+
+ context.fn.setupStatusBar();
+
+ // Let modules know we're ready to start working with the content
+ context.fn.trigger( 'ready' );
+ }
+ },
+
+ /**
+ * Turn off the code editor view and return to the plain textarea.
+ * May be needed by some folks with funky browsers, or just to compare.
+ */
+ disableCodeEditor: function () {
+ // Kills it!
+ context.$textarea.closest( 'form' )
+ .off( 'submit', context.evt.codeEditorSubmit )
+ .find( '#wpSave' ).off( 'click', context.evt.codeEditorSave );
+
+ // Save contents
+ context.$textarea.textSelection( 'unregister' );
+ context.$textarea.val( textSelectionFn.getContents() );
+
+ // @todo fetch cursor, scroll position
+
+ // Drop the fancy editor widget...
+ context.fn.removeStatusBar();
+ context.$codeEditorContainer.remove();
+ context.$codeEditorContainer = undefined;
+ context.codeEditor = undefined;
+
+ // Restore textarea
+ context.$textarea.show();
+ // Restore toolbar
+ $( '.wikiEditor-ui-toolbar' ).removeClass( 'codeEditor-ui-toolbar' );
+
+ // @todo restore cursor, scroll position
+ },
+
+ /**
+ * Start monitoring the fragment of the current window for hash change
+ * events. If the hash is already set, handle it as a new event.
+ */
+ codeEditorMonitorFragment: function () {
+ function onHashChange() {
+ var regexp, result;
+
+ regexp = /#mw-ce-l(\d+)/;
+ result = regexp.exec( window.location.hash );
+
+ if ( result === null ) {
+ return;
+ }
+
+ selectedLine = parseInt( result[ 1 ], 10 );
+ if ( context.codeEditor && selectedLine > 0 ) {
+ // Line numbers in CodeEditor are zero-based
+ context.codeEditor.navigateTo( selectedLine - 1, 0 );
+ // Scroll up a bit to give some context
+ context.codeEditor.scrollToRow( selectedLine - 4 );
+ }
+ }
+
+ onHashChange();
+ $( window ).on( 'hashchange', onHashChange );
+ },
+ /**
+ * This creates a Statusbar, that allows you to see a count of the
+ * errors, warnings and the warning of the current line, as well as
+ * the position of the cursor.
+ */
+ setupStatusBar: function () {
+ var shouldUpdateAnnotations,
+ shouldUpdateSelection,
+ shouldUpdateLineInfo,
+ nextAnnotation,
+ delayedUpdate,
+ editor = context.codeEditor,
+ lang = ace.require( 'ace/lib/lang' ),
+ $errors = $( '<span class="codeEditor-status-worker-cell ace_gutter-cell ace_error">0</span>' ),
+ $warnings = $( '<span class="codeEditor-status-worker-cell ace_gutter-cell ace_warning">0</span>' ),
+ $infos = $( '<span class="codeEditor-status-worker-cell ace_gutter-cell ace_info">0</span>' ),
+ $message = $( '<div>' ).addClass( 'codeEditor-status-message' ),
+ $lineAndMode = $( '<div>' ).addClass( 'codeEditor-status-line' ),
+ $workerStatus = $( '<div>' )
+ .addClass( 'codeEditor-status-worker' )
+ .attr( 'title', mw.msg( 'codeeditor-next-annotation' ) )
+ .append( $errors )
+ .append( $warnings )
+ .append( $infos );
+
+ context.$statusBar = $( '<div>' )
+ .addClass( 'codeEditor-status' )
+ .append( $workerStatus )
+ .append( $message )
+ .append( $lineAndMode );
+
+ /* Help function to concatenate strings with different separators */
+ function addToStatus( status, str, separator ) {
+ if ( str ) {
+ status.push( str, separator || '|' );
+ }
+ }
+
+ /**
+ * Update all the information in the status bar
+ */
+ function updateStatusBar() {
+ var i, c, r,
+ status,
+ annotation,
+ errors = 0,
+ warnings = 0,
+ infos = 0,
+ distance,
+ shortestDistance = Infinity,
+ closestAnnotation,
+ currentLine = editor.selection.lead.row,
+ annotations = editor.getSession().getAnnotations(),
+ closestType;
+
+ // Reset the next annotation
+ nextAnnotation = null;
+
+ for ( i = 0; i < annotations.length; i++ ) {
+ annotation = annotations[ i ];
+ distance = Math.abs( currentLine - annotation.row );
+
+ if ( distance < shortestDistance ) {
+ shortestDistance = distance;
+ closestAnnotation = annotation;
+ }
+ if ( nextAnnotation === null && annotation.row > currentLine ) {
+ nextAnnotation = annotation;
+ }
+
+ switch ( annotations[ i ].type ) {
+ case 'error':
+ errors++;
+ break;
+ case 'warning':
+ warnings++;
+ break;
+ case 'info':
+ infos++;
+ break;
+ }
+ }
+ // Wrap around to the beginning for nextAnnotation
+ if ( nextAnnotation === null && annotations.length > 0 ) {
+ nextAnnotation = annotations[ 0 ];
+ }
+ // Update the annotation counts
+ if ( shouldUpdateAnnotations ) {
+ $errors.text( errors );
+ $warnings.text( warnings );
+ $infos.text( infos );
+ }
+
+ // Show the message of the current line, if we have not already done so
+ if ( closestAnnotation &&
+ currentLine === closestAnnotation.row &&
+ closestAnnotation !== $message.data( 'annotation' ) ) {
+ $message.data( 'annotation', closestAnnotation );
+ closestType =
+ closestAnnotation.type.charAt( 0 ).toUpperCase() +
+ closestAnnotation.type.slice( 1 );
+
+ $message.text( closestType + ': ' + closestAnnotation.text );
+ } else if ( $message.data( 'annotation' ) !== null &&
+ ( !closestAnnotation || currentLine !== closestAnnotation.row ) ) {
+ // If we are on a different line without an annotation, then blank the message
+ $message.data( 'annotation', null );
+ $message.text( '' );
+ }
+
+ // The cursor position has changed
+ if ( shouldUpdateSelection || shouldUpdateLineInfo ) {
+ // Adapted from Ajax.org's ace/ext/statusbar module
+ status = [];
+
+ if ( editor.$vimModeHandler ) {
+ addToStatus( status, editor.$vimModeHandler.getStatusText() );
+ } else if ( editor.commands.recording ) {
+ addToStatus( status, 'REC' );
+ }
+
+ c = editor.selection.lead;
+ addToStatus( status, ( c.row + 1 ) + ':' + c.column, '' );
+ if ( !editor.selection.isEmpty() ) {
+ r = editor.getSelectionRange();
+ addToStatus( status, '(' + ( r.end.row - r.start.row ) + ':' + ( r.end.column - r.start.column ) + ')' );
+ }
+ status.pop();
+ $lineAndMode.text( status.join( '' ) );
+ }
+
+ shouldUpdateLineInfo = shouldUpdateSelection = shouldUpdateAnnotations = false;
+ }
+
+ // Function to delay/debounce updates for the StatusBar
+ delayedUpdate = lang.delayedCall( function () {
+ updateStatusBar( editor );
+ } );
+
+ /**
+ * Click handler that allows you to skip to the next annotation
+ */
+ $workerStatus.on( 'click', function ( e ) {
+ if ( nextAnnotation ) {
+ context.codeEditor.navigateTo( nextAnnotation.row, nextAnnotation.column );
+ // Scroll up a bit to give some context
+ context.codeEditor.scrollToRow( nextAnnotation.row - 3 );
+ e.preventDefault();
+ }
+ } );
+
+ editor.getSession().on( 'changeAnnotation', function () {
+ shouldUpdateAnnotations = true;
+ delayedUpdate.schedule( 100 );
+ } );
+ editor.on( 'changeStatus', function () {
+ shouldUpdateLineInfo = true;
+ delayedUpdate.schedule( 100 );
+ } );
+ editor.on( 'changeSelection', function () {
+ shouldUpdateSelection = true;
+ delayedUpdate.schedule( 100 );
+ } );
+
+ // Force update
+ shouldUpdateLineInfo = shouldUpdateSelection = shouldUpdateAnnotations = true;
+ updateStatusBar( editor );
+
+ context.$statusBar.insertAfter( $( '.wikiEditor-ui-view-wikitext .wikiEditor-ui-bottom' ) );
+ },
+ removeStatusBar: function () {
+ context.codeEditor.getSession().removeListener( 'changeAnnotation' );
+ context.codeEditor.removeListener( 'changeSelection' );
+ context.codeEditor.removeListener( 'changeStatus' );
+ context.nextAnnotation = null;
+ context.$statusBar = null;
+
+ $( '.codeEditor-status' ).remove();
+ }
+
+ } );
+
+ /**
+ * Override the base functions in a way that lets
+ * us fall back to the originals when we turn off.
+ *
+ * @param {Object} base
+ * @param {Object} extended
+ */
+ saveAndExtend = function ( base, extended ) {
+ $.map( extended, function ( func, name ) {
+ var orig;
+ if ( name in base ) {
+ orig = base[ name ];
+ base[ name ] = function () {
+ if ( context.codeEditorActive ) {
+ return func.apply( this, arguments );
+ }
+ if ( orig ) {
+ return orig.apply( this, arguments );
+ }
+ throw new Error( 'CodeEditor: no original function to call for ' + name );
+ };
+ } else {
+ base[ name ] = func;
+ }
+ } );
+ };
+
+ saveAndExtend( context.fn, {
+ saveSelection: function () {
+ mw.log( 'codeEditor stub function saveSelection called' );
+ },
+ restoreSelection: function () {
+ mw.log( 'codeEditor stub function restoreSelection called' );
+ },
+
+ /**
+ * Scroll an element to the top of the iframe
+ */
+ scrollToTop: function () {
+ mw.log( 'codeEditor stub function scrollToTop called' );
+ }
+ } );
+
+ /**
+ * Compatibility with the $.textSelection jQuery plug-in. When the iframe is in use, these functions provide
+ * equivalant functionality to the otherwise textarea-based functionality.
+ */
+ textSelectionFn = {
+
+ /* Needed for search/replace */
+ getContents: function () {
+ return context.codeEditor.getSession().getValue();
+ },
+
+ setContents: function ( newContents ) {
+ context.codeEditor.getSession().setValue( newContents );
+ },
+
+ /**
+ * Gets the currently selected text in the content
+ * DO NOT CALL THIS DIRECTLY, use $.textSelection( 'functionname', options ) instead
+ *
+ * @return {string}
+ */
+ getSelection: function () {
+ return context.codeEditor.getCopyText();
+ },
+
+ /**
+ * Inserts text at the begining and end of a text selection, optionally inserting text at the caret when
+ * selection is empty.
+ * DO NOT CALL THIS DIRECTLY, use $.textSelection( 'functionname', options ) instead
+ *
+ * @param {Object} options
+ * @return {jQuery}
+ */
+ encapsulateSelection: function ( options ) {
+ var sel, range, selText, isSample, text;
+
+ // Does not yet handle 'ownline', 'splitlines' option
+ sel = context.codeEditor.getSelection();
+ range = sel.getRange();
+ selText = textSelectionFn.getSelection();
+ isSample = false;
+
+ if ( !selText ) {
+ selText = options.peri;
+ isSample = true;
+ } else if ( options.replace ) {
+ selText = options.peri;
+ }
+
+ text = options.pre;
+ text += selText;
+ text += options.post;
+ context.codeEditor.insert( text );
+ if ( isSample && options.selectPeri && !options.splitlines ) {
+ // May esplode if anything has newlines, be warned. :)
+ range.setStart( range.start.row, range.start.column + options.pre.length );
+ range.setEnd( range.start.row, range.start.column + selText.length );
+ sel.setSelectionRange( range );
+ }
+ return context.$textarea;
+ },
+
+ /**
+ * Gets the position (in resolution of bytes not nessecarily characters) in a textarea
+ * DO NOT CALL THIS DIRECTLY, use $.textSelection( 'functionname', options ) instead
+ */
+ getCaretPosition: function () {
+ mw.log( 'codeEditor stub function getCaretPosition called' );
+ },
+
+ /**
+ * Sets the selection of the content
+ * DO NOT CALL THIS DIRECTLY, use $.textSelection( 'functionname', options ) instead
+ *
+ * @param {Object} options
+ * @return {jQuery}
+ */
+ setSelection: function ( options ) {
+ var doc, lines, offsetToPos, start, end, sel, range;
+
+ // Ace stores positions for ranges as row/column pairs.
+ // To convert from character offsets, we'll need to iterate through the document
+ doc = context.codeEditor.getSession().getDocument();
+ lines = doc.getAllLines();
+
+ offsetToPos = function ( offset ) {
+ var row, col, pos;
+
+ row = 0;
+ col = 0;
+ pos = 0;
+
+ while ( row < lines.length && pos + lines[ row ].length < offset ) {
+ pos += lines[ row ].length;
+ pos++; // for the newline
+ row++;
+ }
+ col = offset - pos;
+ return { row: row, column: col };
+ };
+ start = offsetToPos( options.start );
+ end = offsetToPos( options.end );
+
+ sel = context.codeEditor.getSelection();
+ range = sel.getRange();
+ range.setStart( start.row, start.column );
+ range.setEnd( end.row, end.column );
+ sel.setSelectionRange( range );
+ return context.$textarea;
+ },
+
+ /**
+ * Scroll a textarea to the current cursor position. You can set the cursor position with setSelection()
+ * DO NOT CALL THIS DIRECTLY, use $.textSelection( 'functionname', options ) instead
+ *
+ * @return {jQuery}
+ */
+ scrollToCaretPosition: function () {
+ mw.log( 'codeEditor stub function scrollToCaretPosition called' );
+ return context.$textarea;
+ }
+ };
+
+ /* Setup the editor */
+ context.fn.setupCodeEditorToolbar();
+ if ( context.codeEditorActive ) {
+ context.fn.setupCodeEditor();
+ }
+
+ };
+}( jQuery, mediaWiki, OO ) );
diff --git a/www/wiki/extensions/CodeEditor/modules/jquery.codeEditor.less b/www/wiki/extensions/CodeEditor/modules/jquery.codeEditor.less
new file mode 100644
index 00000000..296455aa
--- /dev/null
+++ b/www/wiki/extensions/CodeEditor/modules/jquery.codeEditor.less
@@ -0,0 +1,75 @@
+@import 'mediawiki.mixins';
+
+.group-codeeditor-format,
+.group-codeeditor-style,
+.codeEditor-ui-toolbar .group-insert,
+.codeEditor-ui-toolbar .group-format,
+.codeEditor-ui-toolbar .tabs span.tab-advanced,
+.codeEditor-ui-toolbar .tabs span.tab-characters,
+.codeEditor-ui-toolbar .tabs span.tab-help,
+.codeEditor-ui-toolbar .sections {
+ display: none;
+}
+
+.codeEditor-ui-toolbar .group-codeeditor-format,
+.codeEditor-ui-toolbar .group-codeeditor-style {
+ display: block;
+}
+
+.wikiEditor-ui .ace_editor {
+ /* Same as mw-editfont-monospace, repeated for higher specificity */
+ font-size: 13px;
+ font-family: monospace, monospace;
+}
+
+.wikiEditor-ui-toolbar .group-codeeditor-style {
+ border-right: 0;
+}
+
+.ace_editor textarea,
+.ace_editor input {
+ /* Inherit directionality from editor, not sitedir (T186329) */
+ direction: inherit;
+}
+
+.codeEditor-status {
+ clear: both;
+ width: 100%;
+ background-color: #f8f9fa;
+ border-top: 1px solid #c8ccd1;
+ display: table;
+}
+
+.codeEditor-status .codeEditor-status-worker-cell.ace_gutter-cell {
+ background-position: 0 center;
+}
+
+.codeEditor-status-worker {
+ padding: 0 0.3em;
+ user-select: none;
+ cursor: pointer;
+ display: table-cell;
+}
+
+.codeEditor-status-message {
+ border-left: 1px solid #c8ccd1;
+ border-right: 1px solid #c8ccd1;
+ padding: 0 0.3em;
+ width: 100%;
+ display: table-cell;
+}
+
+.codeEditor-status-line {
+ padding: 0 0.3em;
+ text-align: right;
+ white-space: nowrap;
+ display: table-cell;
+}
+
+/* Hide vanilla MediaWiki's "Editing help" link, as we provide it in the toolbar */
+/* Copied from the same code in WikiEditor */
+.client-js .editButtons {
+ .editHelp {
+ display: none;
+ }
+}